@ws-ui/roles-editor 1.13.0-rc1 → 1.13.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,117 +1,75 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),C=require("react"),fe=require("@ws-ui/shared"),Qn=require("react-dom"),wn=require("@headlessui/react"),Ze=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 ht=jD(C),J$=jD(Qn);(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-100:not(#\\#){height:calc(var(--spacing)*100)}.h-\\[120px\\]:not(#\\#){height:120px}.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}.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(--theia-button-secondaryForeground,var(--ws-palette-primary-200)));--ws-primary-dark:var(--vscode-editor-lineHighlightBackground,var(--theia-button-secondaryBackground,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-0:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-grey-900)));--ws-panel-1:var(--vscode-sideBar-background,var(--vscode-panel-background,var(--theia-sideBar-background,var(--ws-palette-grey-700))));--ws-panel-2:var(--vscode-panel-background,var(--vscode-editor-background,var(--theia-panel-background,var(--ws-palette-grey-900))));--ws-panel-3:var(--vscode-editorGroupHeader-tabsBackground,var(--vscode-editorWidget-background,var(--theia-editorGroupHeader-tabsBackground,var(--ws-palette-grey-900))));--ws-panel-4:var(--vscode-editorWidget-background,var(--theia-editorWidget-background,var(--ws-palette-grey-300)));--ws-panel-5:var(--vscode-editorWidget-background,var(--theia-editorWidget-background,var(--ws-palette-grey-950)));--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"})}),bi=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"})}),Qu=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"})]}),ed=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"})}),Wi=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"})}),yu=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}),xu="-",SO=[],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(xu),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||SO}return r[i]||SO}}},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(xu):e.slice(t).join(xu),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(xu),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 m=0;m<d;m++){const b=i[m];if(a===0&&s===0){if(b===OO){o.push(i.slice(c,m)),c=m+1;continue}if(b==="/"){u=m;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}},EH=e=>({cache:yH(e.cacheSize),parseClassName:wH(e),sortModifiers:_H(e),...uH(e)}),SH=/\s+/,OH=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split(SH);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:m}=r(d);if(h){c=d+(c.length>0?" "+c:c);continue}let b=!!m,w=n(b?x.substring(0,m):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,S=_+w;if(a.indexOf(S)>-1)continue;a.push(S);const E=i(w,b);for(let I=0;I<E.length;++I){const N=E[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=EH(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=[],Zt=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)\(.+\)$/,Jo=e=>RH.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),Ai=e=>!!e&&Number.isInteger(Number(e)),wh=e=>e.endsWith("%")&&We(e.slice(0,-1)),gi=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=>!Ce(e)&&!Ie(e),zH=e=>Ra(e,cj,aj),Ce=e=>ij.test(e),fo=e=>Ra(e,uj,DH),_h=e=>Ra(e,VH,We),RO=e=>Ra(e,sj,aj),BH=e=>Ra(e,lj,qH),xc=e=>Ra(e,dj,jH),Ie=e=>oj.test(e),ls=e=>Na(e,uj),FH=e=>Na(e,WH),NO=e=>Na(e,sj),$H=e=>Na(e,cj),HH=e=>Na(e,lj),wc=e=>Na(e,dj,!0),Ra=(e,t,r)=>{const n=ij.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Na=(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=Zt("color"),t=Zt("font"),r=Zt("text"),n=Zt("font-weight"),i=Zt("tracking"),o=Zt("leading"),a=Zt("breakpoint"),s=Zt("container"),c=Zt("spacing"),u=Zt("radius"),d=Zt("shadow"),h=Zt("inset-shadow"),p=Zt("text-shadow"),v=Zt("drop-shadow"),x=Zt("blur"),m=Zt("perspective"),b=Zt("aspect"),w=Zt("ease"),y=Zt("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),Ie,Ce],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[Ie,Ce,c],k=()=>[Jo,"full","auto",...T()],L=()=>[Ai,"none","subgrid",Ie,Ce],B=()=>["auto",{span:["full",Ai,Ie,Ce]},Ai,Ie,Ce],G=()=>[Ai,"auto",Ie,Ce],z=()=>["auto","min","max","fr",Ie,Ce],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...T()],re=()=>[Jo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],X=()=>[e,Ie,Ce],ne=()=>[...S(),NO,RO,{position:[Ie,Ce]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",$H,zH,{size:[Ie,Ce]}],Z=()=>[wh,ls,fo],ee=()=>["","none","full",u,Ie,Ce],A=()=>["",We,ls,fo],W=()=>["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"],j=()=>[We,wh,NO,RO],V=()=>["","none",x,Ie,Ce],J=()=>["none",We,Ie,Ce],Y=()=>["none",We,Ie,Ce],se=()=>[We,Ie,Ce],te=()=>[Jo,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gi],breakpoint:[gi],color:[AH],container:[gi],"drop-shadow":[gi],ease:["in","out","in-out"],font:[LH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gi],shadow:[gi],spacing:["px",We],text:[gi],"text-shadow":[gi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Jo,Ce,Ie,b]}],container:["container"],columns:[{columns:[We,Ce,Ie,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:E()}],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:[Ai,"auto",Ie,Ce]}],basis:[{basis:[Jo,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,Jo,"auto","initial","none",Ce]}],grow:[{grow:["",We,Ie,Ce]}],shrink:[{shrink:["",We,Ie,Ce]}],order:[{order:[Ai,"first","last","none",Ie,Ce]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],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:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:re()}],w:[{w:[s,"screen",...re()]}],"min-w":[{"min-w":[s,"screen","none",...re()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...re()]}],h:[{h:["screen","lh",...re()]}],"min-h":[{"min-h":["screen","lh","none",...re()]}],"max-h":[{"max-h":["screen","lh",...re()]}],"font-size":[{text:["base",r,ls,fo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ie,_h]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wh,Ce]}],"font-family":[{font:[FH,Ce,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,Ie,Ce]}],"line-clamp":[{"line-clamp":[We,"none",Ie,_h]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Ie,Ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ie,Ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:X()}],"text-color":[{text:X()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Ie,fo]}],"text-decoration-color":[{decoration:X()}],"underline-offset":[{"underline-offset":[We,"auto",Ie,Ce]}],"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",Ie,Ce]}],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",Ie,Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ai,Ie,Ce],radial:["",Ie,Ce],conic:[Ai,Ie,Ce]},HH,BH]}],"bg-color":[{bg:X()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:X()}],"gradient-via":[{via:X()}],"gradient-to":[{to:X()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:A()}],"border-w-x":[{"border-x":A()}],"border-w-y":[{"border-y":A()}],"border-w-s":[{"border-s":A()}],"border-w-e":[{"border-e":A()}],"border-w-t":[{"border-t":A()}],"border-w-r":[{"border-r":A()}],"border-w-b":[{"border-b":A()}],"border-w-l":[{"border-l":A()}],"divide-x":[{"divide-x":A()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":A()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:X()}],"border-color-x":[{"border-x":X()}],"border-color-y":[{"border-y":X()}],"border-color-s":[{"border-s":X()}],"border-color-e":[{"border-e":X()}],"border-color-t":[{"border-t":X()}],"border-color-r":[{"border-r":X()}],"border-color-b":[{"border-b":X()}],"border-color-l":[{"border-l":X()}],"divide-color":[{divide:X()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Ie,Ce]}],"outline-w":[{outline:["",We,ls,fo]}],"outline-color":[{outline:X()}],shadow:[{shadow:["","none",d,wc,xc]}],"shadow-color":[{shadow:X()}],"inset-shadow":[{"inset-shadow":["none",h,wc,xc]}],"inset-shadow-color":[{"inset-shadow":X()}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:X()}],"ring-offset-w":[{"ring-offset":[We,fo]}],"ring-offset-color":[{"ring-offset":X()}],"inset-ring-w":[{"inset-ring":A()}],"inset-ring-color":[{"inset-ring":X()}],"text-shadow":[{"text-shadow":["none",p,wc,xc]}],"text-shadow-color":[{"text-shadow":X()}],opacity:[{opacity:[We,Ie,Ce]}],"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":j()}],"mask-image-linear-to-pos":[{"mask-linear-to":j()}],"mask-image-linear-from-color":[{"mask-linear-from":X()}],"mask-image-linear-to-color":[{"mask-linear-to":X()}],"mask-image-t-from-pos":[{"mask-t-from":j()}],"mask-image-t-to-pos":[{"mask-t-to":j()}],"mask-image-t-from-color":[{"mask-t-from":X()}],"mask-image-t-to-color":[{"mask-t-to":X()}],"mask-image-r-from-pos":[{"mask-r-from":j()}],"mask-image-r-to-pos":[{"mask-r-to":j()}],"mask-image-r-from-color":[{"mask-r-from":X()}],"mask-image-r-to-color":[{"mask-r-to":X()}],"mask-image-b-from-pos":[{"mask-b-from":j()}],"mask-image-b-to-pos":[{"mask-b-to":j()}],"mask-image-b-from-color":[{"mask-b-from":X()}],"mask-image-b-to-color":[{"mask-b-to":X()}],"mask-image-l-from-pos":[{"mask-l-from":j()}],"mask-image-l-to-pos":[{"mask-l-to":j()}],"mask-image-l-from-color":[{"mask-l-from":X()}],"mask-image-l-to-color":[{"mask-l-to":X()}],"mask-image-x-from-pos":[{"mask-x-from":j()}],"mask-image-x-to-pos":[{"mask-x-to":j()}],"mask-image-x-from-color":[{"mask-x-from":X()}],"mask-image-x-to-color":[{"mask-x-to":X()}],"mask-image-y-from-pos":[{"mask-y-from":j()}],"mask-image-y-to-pos":[{"mask-y-to":j()}],"mask-image-y-from-color":[{"mask-y-from":X()}],"mask-image-y-to-color":[{"mask-y-to":X()}],"mask-image-radial":[{"mask-radial":[Ie,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":j()}],"mask-image-radial-to-pos":[{"mask-radial-to":j()}],"mask-image-radial-from-color":[{"mask-radial-from":X()}],"mask-image-radial-to-color":[{"mask-radial-to":X()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":j()}],"mask-image-conic-to-pos":[{"mask-conic-to":j()}],"mask-image-conic-from-color":[{"mask-conic-from":X()}],"mask-image-conic-to-color":[{"mask-conic-to":X()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ie,Ce]}],filter:[{filter:["","none",Ie,Ce]}],blur:[{blur:V()}],brightness:[{brightness:[We,Ie,Ce]}],contrast:[{contrast:[We,Ie,Ce]}],"drop-shadow":[{"drop-shadow":["","none",v,wc,xc]}],"drop-shadow-color":[{"drop-shadow":X()}],grayscale:[{grayscale:["",We,Ie,Ce]}],"hue-rotate":[{"hue-rotate":[We,Ie,Ce]}],invert:[{invert:["",We,Ie,Ce]}],saturate:[{saturate:[We,Ie,Ce]}],sepia:[{sepia:["",We,Ie,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",Ie,Ce]}],"backdrop-blur":[{"backdrop-blur":V()}],"backdrop-brightness":[{"backdrop-brightness":[We,Ie,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[We,Ie,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Ie,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Ie,Ce]}],"backdrop-invert":[{"backdrop-invert":["",We,Ie,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[We,Ie,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[We,Ie,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Ie,Ce]}],"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",Ie,Ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Ie,Ce]}],ease:[{ease:["linear","initial",w,Ie,Ce]}],delay:[{delay:[We,Ie,Ce]}],animate:[{animate:["none",y,Ie,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Ie,Ce]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:Y()}],"scale-x":[{"scale-x":Y()}],"scale-y":[{"scale-y":Y()}],"scale-z":[{"scale-z":Y()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[Ie,Ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:X()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:X()}],"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",Ie,Ce]}],"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",Ie,Ce]}],fill:[{fill:["none",...X()]}],"stroke-w":[{stroke:[We,ls,fo,_h]}],stroke:[{stroke:["none",...X()]}],"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={}})=>(Ps(e,"cacheSize",t),Ps(e,"prefix",r),Ps(e,"experimentalParseClassName",n),_c(e.theme,o.theme),_c(e.classGroups,o.classGroups),_c(e.conflictingClassGroups,o.conflictingClassGroups),_c(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Ps(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Ec(e.theme,i.theme),Ec(e.classGroups,i.classGroups),Ec(e.conflictingClassGroups,i.conflictingClassGroups),Ec(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),fj(e,i,"orderSensitiveModifiers"),e),Ps=(e,t,r)=>{r!==void 0&&(e[t]=r)},_c=(e,t)=>{if(t)for(const r in t)Ps(e,r,t[r])},Ec=(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:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),Q=require("@ws-ui/store"),T=require("react"),Te=require("@ws-ui/shared"),_r=require("@headlessui/react"),nx=require("react-dom"),xe=require("@ws-ui/icons"),CD=require("./common.cjs.js");function RD(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=RD(T),ix=RD(nx);var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qf={exports:{}};/*!
3
2
  Copyright (c) 2018 Jed Watson.
4
3
  Licensed under the MIT License (MIT), see
5
4
  http://jedwatson.github.io/classnames
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 me(...e){return ZH(XH(e))}const sl={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"}},yn={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 me(JH,sl[e].checkbox,{"cursor-pointer":!o},a?{[yn.negative.checked]:s,[yn.negative.unchecked]:!s,[yn.negative.checkedHover]:!o&&s,[yn.negative.focus]:!o,"border-input-disable":o}:{[yn[t].checked]:s&&!o,[yn[t].unchecked]:!s&&!o,[yn[t].checkedHover]:!o&&s,[yn[t].focus]:!o,"border-input-disable":o,"bg-input-disable":o&&s})},eV=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return me(sl[e].text,i?{[yn.negative.label]:i}:{"text-input-disable":n,[yn[t].label]:!n,"cursor-pointer":!n})},tV=e=>me("inline-flex items-center ws-group",sl[e].spacing),rV=(e,t,r)=>me("center-absolute rounded-xs transition-all duration-200 opacity-0 ws-checkbox-hover-target",sl[e].hoverSquare,{[yn.negative.hoverSquare]:r,[yn[t].hoverSquare]:!r}),nV=e=>`${sl[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[m,b]=C.useState(d),w=u===!0||m===!0,y=u===null,_=w||y,S={isChecked:w,isIndeterminate:y,isDisabled:t,isInvalid:r},E=QH(i,o,S),I=eV(i,o,S),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:E,children:[O.jsx("input",{ref:x,type:"checkbox",className:"sr-only",checked:w,disabled:t,required:n,onChange:L=>{u===void 0&&b(L.target.checked),a==null||a(L)},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 ll={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"}},Gs={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 me(oV,ll[e].radio,i?Gs[t].radioInvalid:{[Gs[t].radio]:!n,"cursor-not-allowed opacity-60":n})},sV=(e,t,r)=>{const{checked:n,isDisabled:i,isInvalid:o}=r;return me("center-absolute rounded-full transition-all duration-200 ease-in-out",ll[e].dot,o?"bg-negative":{[Gs[t].dot]:!i,"border-neutral":i,"opacity-0 scale-0":!n,"opacity-100 scale-100":n&&!i})},lV=(e,t,r)=>me("center-absolute rounded-full transition-all duration-200 opacity-0 group-hover:opacity-100",ll[e].hoverDot,{[Gs[t].hoverDot]:!r,"bg-negative-bg":r}),cV=e=>me("cursor-pointer select-none transition-colors duration-200",ll[e].label),uV=(e,t,r,n)=>{const{isDisabled:i,isInvalid:o}=r;return me("inline-flex items-center group",ll[e].container,o?{"text-negative":o}:{[Gs[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,m=a??d.isRequired,b=d.value===e,w={checked:b,isDisabled:v,isInvalid:x},y=aV(h,p,w),_=sV(h,p,w),S=lV(h,p,x),E=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:me("relative",{hidden:d.hideIndicator}),children:[O.jsx("input",{ref:u,type:"radio",value:e,checked:b,disabled:v,required:m,"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:S})]})]}),t&&O.jsxs("span",{className:E,children:[t,m&&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=me("inline-flex items-center justify-center font-medium transition-colors duration-200 focus:outline-hidden border",{"cursor-pointer":!n},i.container);return n?me(a,"text-inactive-text",{"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"}):me(a,o.bg[t],o.text[t],o.hover[t],o.border[t])},gV=e=>me("flex items-center justify-center gap-1",pj[e].text),Qt=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:me(vV(e,t,r,o),gV(e),n),disabled:o,...a,children:i}));Qt.displayName="Button";const vj=C.createContext(null),cl=()=>{const e=C.useContext(vj);if(!e)throw new Error("Input components must be used within Input.Root");return e},Ta={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"}},go={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=()=>me("flex flex-col relative"),bV=({size:e,color:t,isDisabled:r,isReadOnly:n,hasMessage:i,hasArea:o,isInvalid:a})=>{const s=go[a?"negative":t];return me("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,Ta[e].group,{"ring-1":i,"opacity-60":r,"items-center":!o})},yV=({size:e,color:t})=>me("bg-transparent ring-0 w-full","focus:outline-hidden",[Ta[e].input],go[t].placeholder),MO=({size:e,color:t})=>me("bg-transparent ring-0 w-full h-fit resize-none py-0.5","focus:outline-hidden",Ta[e].input,go[t].placeholder),xV=({size:e,color:t,isDisabled:r,isAction:n})=>{const i=go[t];return me("transition-colors duration-200 rounded max-h-full h-fit",Ta[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})=>me("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":go[t].messageText,go[t].borderMessage,go[t].messageBackground,Ta[e].message,{"opacity-60":r}),_V=({size:e})=>me(Ta[e].icon);function wu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var EV=typeof global=="object"&&global&&global.Object===Object&&global,SV=typeof self=="object"&&self&&self.Object===Object&&self,gj=EV||SV||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 _u=gj.Symbol,mj=Object.prototype,NV=mj.hasOwnProperty,TV=mj.toString,cs=_u?_u.toStringTag:void 0;function PV(e){var t=NV.call(e,cs),r=e[cs];try{e[cs]=void 0;var n=!0}catch{}var i=TV.call(e);return n&&(t?e[cs]=r:delete e[cs]),i}var kV=Object.prototype,MV=kV.toString;function AV(e){return MV.call(e)}var DV="[object Null]",jV="[object Undefined]",AO=_u?_u.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(wu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=wu(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 tu(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,wu(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 m(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,m(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 S(){return s===void 0?a:y(Eh())}function E(){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 E.cancel=_,E.flush=S,E}var KV="Expected a function";function YV(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(KV);return wu(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),tu(e,t,{leading:n,maxWait:t,trailing:i})}var ca=function(){return ca=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},ca.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 Ej(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:Ej,getElementDocument:yj,getElementWindow:bj,getOptions:xj,removeClasses:_j}),sa=null,qO=null;Qw&&window.addEventListener("resize",function(){qO!==window.devicePixelRatio&&(qO=window.devicePixelRatio,sa=null)});function LO(){if(sa===null){if(typeof document>"u")return sa=0,sa;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),sa=r}return sa}var Di=bj,Sh=yj,ZV=xj,ji=wj,qi=_j,jr=Ej,us=(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=Di(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,ji(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(){qi(n.el,n.classNames.scrolling),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isScrolling=!1},this.onMouseEnter=function(){n.isMouseEntering||(ji(n.el,n.classNames.mouseEntered),n.showScrollbar("x"),n.showScrollbar("y"),n.isMouseEntering=!0),n.onMouseEntered()},this._onMouseEntered=function(){qi(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,m;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,S=(c=(s=n.contentWrapperEl)===null||s===void 0?void 0:s[n.axis[n.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,E=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*(S-E);n.draggedAxis==="x"&&n.isRtl&&(T=!((m=e.getRtlHelpers())===null||m===void 0)&&m.isScrollingToNegative?-T:T),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=T}},this.onEndDrag=function(i){n.isDragging=!1;var o=Sh(n.el),a=Di(n.el);i.preventDefault(),i.stopPropagation(),qi(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=ca(ca({},e.defaultOptions),r),this.classNames=ca(ca({},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=tu(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=tu(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=tu(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=Sh(t),i=Di(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(jr(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(jr(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(jr(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(jr(this.classNames.offset)),this.maskEl=this.el.querySelector(jr(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,jr(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(jr(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(jr(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(jr(this.classNames.track)).concat(jr(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(jr(this.classNames.track)).concat(jr(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(jr(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(jr(this.classNames.scrollbar)))||null,this.options.autoHide||(ji(this.axis.x.scrollbar.el,this.classNames.visible),ji(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,r,n=Di(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=Di(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&&(ji(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&&(qi(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),ji(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?ji(r.scrollbar.el,this.classNames.hover):qi(r.scrollbar.el,this.classNames.hover)):(qi(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),qi(this.axis[t].track.el,this.classNames.hover),qi(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=Sh(this.el),o=Di(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,ji(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=Di(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,m=x<0?-1:1,b=m===-1?v-p:v+p,w=40,y=function(){n.contentWrapperEl&&(m===-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=Di(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=ht.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=JV(e,["children","scrollableNodeProps"]),a=ht.useRef(),s=ht.useRef(),c=ht.useRef(),u={},d={};Object.keys(o).forEach(function(v){Object.prototype.hasOwnProperty.call(us.defaultOptions,v)?u[v]=o[v]:d[v]=o[v]});var h=en(en({},us.defaultOptions.classNames),u.classNames),p=en(en({},i),{className:"".concat(h.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:u.tabIndex||us.defaultOptions.tabIndex,role:"region","aria-label":u.ariaLabel||us.defaultOptions.ariaLabel});return ht.useEffect(function(){var v;return s.current=p.ref?p.ref.current:s.current,a.current&&(v=new us(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)}},[]),ht.createElement("div",en({"data-simplebar":"init",ref:a},d),ht.createElement("div",{className:h.wrapper},ht.createElement("div",{className:h.heightAutoObserverWrapperEl},ht.createElement("div",{className:h.heightAutoObserverEl})),ht.createElement("div",{className:h.mask},ht.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}}):ht.createElement("div",en({},p),ht.createElement("div",{className:h.contentEl},r)))),ht.createElement("div",{className:h.placeholder})),ht.createElement("div",{className:"".concat(h.track," ").concat(h.horizontal)},ht.createElement("div",{className:h.scrollbar})),ht.createElement("div",{className:"".concat(h.track," ").concat(h.vertical)},ht.createElement("div",{className:h.scrollbar})))});e1.displayName="SimpleBar";const Sj=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:me(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}=cl();return O.jsx("div",{ref:n,"data-qui":"InputGroup",className:me(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}=cl(),{isDisabled:c,isReadOnly:u,...d}=t;return O.jsx("input",{ref:r,disabled:a||c,readOnly:u||s||!1,"aria-invalid":o,className:me(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}=cl(),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 S;v(),(S=n.onInput)==null||S.call(n,_)};C.useEffect(()=>{v()},[v,n.value]),C.useEffect(()=>{r&&p.current&&p.current.style.removeProperty("height")},[r]);const m=_=>{_.preventDefault();const S=p.current;if(!S)return;const E=_.clientY,I=S.offsetHeight,N=k=>{const L=I+(k.clientY-E);L>30&&(S.style.height=L+"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:me("w-full relative",!r&&!n.rows&&"h-[120px]",t),children:[r?O.jsx("textarea",{ref:h,rows:1,className:me(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:me(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:m,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}=cl(),d=r||u,h=xV({size:s,color:c,isDisabled:d,isAction:e});return O.jsx("div",{ref:a,"data-qui":"InputIcon",className:me(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}=cl();return C.useEffect(()=>(s(!0),()=>{s(!1)}),[s]),O.jsxs("div",{ref:i,"data-qui":"InputMessage",role:"alert",className:me(wV({size:o,color:a,isDisabled:c}),t),...n,children:[e!==void 0&&O.jsx("div",{className:me(_V({size:o}),t),children:e}),O.jsx("p",{children:r})]})});Sj.displayName="InputRoot";Oj.displayName="InputGroup";Cj.displayName="InputField";QV.displayName="InputArea";Ij.displayName="InputIcon";Rj.displayName="InputMessage";const xt={Root:Sj,Group:Oj,Field:Cj,Icon:Ij,Message:Rj},Ks={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})=>me("min-h-6 absolute py-0.5 px-1 rounded whitespace-nowrap flex items-center gap-1",Ks[e].container,Ks[e].icon),tW=({color:e})=>me("text-xs font-medium leading-3",Ks[e].text),rW=({color:e})=>me("p-0.5 rounded cursor-pointer",Ks[e].button,Ks[e].icon),Lr=({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),[m,b]=C.useState({position:r,transform:""}),w=C.useRef(null),y=C.useRef(null),_=C.useRef(null),S=h&&!d;C.useEffect(()=>{S||x(!1)},[S]);const E=C.useCallback(()=>{if(!w.current||!y.current)return;const z=w.current.getBoundingClientRect(),P=y.current.getBoundingClientRect(),K=window.innerWidth,U=window.innerHeight,re=window.scrollX,X=window.scrollY,ne=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth,K),D=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,U),$=4;let Z=r,ee={position:Z,transform:""};const A=V=>{const{top:J,left:Y,width:se,height:te}=z,he=J+X,ce=Y+re;switch(V){case"up":return{top:`${he-P.height-$}px`,left:`${ce+se/2}px`,transform:"translateX(-50%)"};case"up-start":return{top:`${he-P.height-$}px`,left:`${ce}px`,transform:"translateX(0)"};case"up-end":return{top:`${he-P.height-$}px`,left:`${ce+se-P.width}px`,transform:"translateX(0)"};case"down":return{top:`${he+te+$}px`,left:`${ce+se/2}px`,transform:"translateX(-50%)"};case"down-start":return{top:`${he+te+$}px`,left:`${ce}px`,transform:"translateX(0)"};case"down-end":return{top:`${he+te+$}px`,left:`${ce+se-P.width}px`,transform:"translateX(0)"};case"left":return{top:`${he+te/2}px`,left:`${ce-P.width-$}px`,transform:"translateY(-50%)"};case"left-start":return{top:`${he}px`,left:`${ce-P.width-$}px`,transform:"translateY(0)"};case"left-end":return{top:`${he+te-P.height}px`,left:`${ce-P.width-$}px`,transform:"translateY(0)"};case"right":return{top:`${he+te/2}px`,left:`${ce+se+$}px`,transform:"translateY(-50%)"};case"right-start":return{top:`${he}px`,left:`${ce+se+$}px`,transform:"translateY(0)"};case"right-end":return{top:`${he+te-P.height}px`,left:`${ce+se+$}px`,transform:"translateY(0)"};default:return{}}},W={up:{fits:z.top-P.height-$>=0},"up-start":{fits:z.top-P.height-$>=0&&z.left+P.width<=K},"up-end":{fits:z.top-P.height-$>=0&&z.right-P.width>=0},down:{fits:z.bottom+P.height+$<=U&&z.bottom+P.height+$<=D},"down-start":{fits:z.bottom+P.height+$<=U&&z.bottom+P.height+$<=D&&z.left+P.width<=K},"down-end":{fits:z.bottom+P.height+$<=U&&z.bottom+P.height+$<=D&&z.right-P.width>=0},left:{fits:z.left-P.width-$>=0},"left-start":{fits:z.left-P.width-$>=0&&z.top+P.height<=U},"left-end":{fits:z.left-P.width-$>=0&&z.bottom-P.height>=0},right:{fits:z.right+P.width+$<=K&&z.right+P.width+$<=ne},"right-start":{fits:z.right+P.width+$<=K&&z.right+P.width+$<=ne&&z.top+P.height<=U},"right-end":{fits:z.right+P.width+$<=K&&z.right+P.width+$<=ne&&z.bottom-P.height>=0}},q=z.left+z.width/2-P.width/2,j=z.left+z.width/2+P.width/2;if((r==="up"||r==="down")&&(q<0||j>K)&&(W[r].fits=!1),W[r].fits){const V=A(r);ee={position:r,...V,transform:V.transform||""}}else{const V=["up","up-start","up-end","down","down-start","down-end","right","right-start","right-end","left","left-start","left-end"].find(J=>W[J].fits);if(V){Z=V;const J=A(V);ee={position:Z,...J,transform:J.transform||""}}else{const J={up:z.top,"up-start":z.top,"up-end":z.top,down:Math.min(U-z.bottom,D-z.bottom),"down-start":Math.min(U-z.bottom,D-z.bottom),"down-end":Math.min(U-z.bottom,D-z.bottom),left:z.left,"left-start":z.left,"left-end":z.left,right:Math.min(K-z.right,ne-z.right),"right-start":Math.min(K-z.right,ne-z.right),"right-end":Math.min(K-z.right,ne-z.right)},Y=Object.entries(J).reduce((te,[he,ce])=>ce>te.space?{position:he,space:ce}:te,{position:"up",space:0}).position;Z=Y;const se=A(Y);ee={position:Z,...se,transform:se.transform||""}}}b(ee)},[r]),I=()=>{s==="click"&&(p(!0),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{v||p(!1)},a))},N=z=>{z.stopPropagation(),p(!1),_.current&&clearTimeout(_.current)},T=()=>{x(!0),_.current&&clearTimeout(_.current)},k=()=>{x(!1),h&&(_.current=setTimeout(()=>{p(!1)},a))},L=()=>{s==="hover"&&(p(!0),_.current&&clearTimeout(_.current))},B=()=>{s==="hover"&&(_.current=setTimeout(()=>{p(!1)},a))};C.useEffect(()=>{if(h){const z=requestAnimationFrame(()=>{E()});return()=>cancelAnimationFrame(z)}},[h,e,E]),C.useEffect(()=>{if(h){const z=setTimeout(()=>E(),0);return()=>clearTimeout(z)}},[h,E]),C.useEffect(()=>{const z=()=>{h&&E()},P=()=>{h&&E()};return window.addEventListener("resize",z),window.addEventListener("scroll",P,!0),()=>{window.removeEventListener("resize",z),window.removeEventListener("scroll",P,!0),_.current&&clearTimeout(_.current)}},[h,E]);const G=u||(typeof document<"u"?document.body:null);return G?O.jsxs(O.Fragment,{children:[O.jsx("div",{"data-qui":"Tooltip",ref:w,onClick:I,onMouseEnter:L,onMouseLeave:B,className:me("relative inline-flex items-center",c),children:o}),h&&!d&&!!e&&Qn.createPortal(O.jsxs("div",{ref:y,role:"tooltip",className:eW({color:t}),style:{position:"absolute",left:m.left??0,top:m.top??0,transform:m.transform,zIndex:1e3,visibility:m.left?"visible":"hidden",pointerEvents:n?"auto":"none"},onMouseEnter:n?T: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:N,className:rW({color:t}),role:"button",children:O.jsx(Qu,{})})]}),G)]}):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 td=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Pa(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?Pa(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 ul(e){return Pa(e)?!1:e instanceof Ir(e).HTMLElement}function Nj(e){return e instanceof Ir(e).SVGElement}function ka(e){return e?Pa(e)?e.document:t1(e)?r1(e)?e:ul(e)||Nj(e)?e.ownerDocument:document:document:document}const Bn=td?C.useLayoutEffect:C.useEffect;function rd(e){const t=C.useRef(e);return Bn(()=>{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 Ys(e,t){t===void 0&&(t=[e]);const r=C.useRef(e);return Bn(()=>{r.current!==e&&(r.current=e)},t),r}function dl(e,t){const r=C.useRef();return C.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Eu(e){const t=rd(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 Su(e){const t=C.useRef();return C.useEffect(()=>{t.current=e},[e]),t.current}let Oh={};function fl(e,t){return C.useMemo(()=>{if(t)return t;const r=Oh[e]==null?0:Oh[e]+1;return Oh[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 fa=Tj(1),Ou=Tj(-1);function oW(e){return"clientX"in e&&"clientY"in e}function nd(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 Cu(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 Ui=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[Ui.Translate.toString(e),Ui.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=fl("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?Qn.createPortal(d,r):d}var Jt;(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"})(Jt||(Jt={}));function Iu(){}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 Fn=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=Cu(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 EW(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 SW=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}:Fn}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 Ma(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 Ma(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(!ul(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 Ch(e){return!td||!e?null:Pa(e)?e:t1(e)?r1(e)||e===ka(e).scrollingElement?window:ul(e)?e:null:null}function Dj(e){return Pa(e)?e.scrollX:e.scrollLeft}function jj(e){return Pa(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!td||!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},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(v.y=ir.Backward,x.y=n*Math.abs((t.top+m.height-o)/m.height)):!d&&c>=t.bottom-m.height&&(v.y=ir.Forward,x.y=n*Math.abs((t.bottom-m.height-c)/m.height)),!p&&s>=t.right-m.width?(v.x=ir.Forward,x.x=n*Math.abs((t.right-m.width-s)/m.width)):!h&&a<=t.left+m.width&&(v.x=ir.Backward,x.x=n*Math.abs((t.left+m.width-a)/m.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)=>fa(t,bw(r)),Fn)}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=Ma),!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 zs{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:ka(e)}function Ih(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 xn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(xn||(xn={}));function $O(e){e.preventDefault()}function $W(e){e.stopPropagation()}var nt;(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"})(nt||(nt={}));const Fj={start:[nt.Space,nt.Enter],cancel:[nt.Esc],end:[nt.Space,nt.Enter,nt.Tab]},HW=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case nt.Right:return{...r,x:r.x+25};case nt.Left:return{...r,x:r.x-25};case nt.Down:return{...r,y:r.y+25};case nt.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 zs(ka(r)),this.windowListeners=new zs(Ir(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xn.Resize,this.handleCancel),this.windowListeners.add(xn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&Bj(n),r(Fn)}handleKeyDown(t){if(nd(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}:Fn;this.referenceCoordinates||(this.referenceCoordinates=d);const h=a(t,{active:r,context:n.current,currentCoordinates:d});if(h){const p=Ou(h,d),v={x:0,y:0},{scrollableAncestors:x}=n.current;for(const m of x){const b=t.code,{isTop:w,isRight:y,isLeft:_,isBottom:S,maxScroll:E,minScroll:I}=Lj(m),N=qW(m),T={x:Math.min(b===nt.Right?N.right-N.width/2:N.right,Math.max(b===nt.Right?N.left:N.left+N.width/2,h.x)),y:Math.min(b===nt.Down?N.bottom-N.height/2:N.bottom,Math.max(b===nt.Down?N.top:N.top+N.height/2,h.y))},k=b===nt.Right&&!y||b===nt.Left&&!_,L=b===nt.Down&&!S||b===nt.Up&&!w;if(k&&T.x!==h.x){const B=m.scrollLeft+p.x,G=b===nt.Right&&B<=E.x||b===nt.Left&&B>=I.x;if(G&&!p.y){m.scrollTo({left:B,behavior:s});return}G?v.x=m.scrollLeft-B:v.x=b===nt.Right?m.scrollLeft-E.x:m.scrollLeft-I.x,v.x&&m.scrollBy({left:-v.x,behavior:s});break}else if(L&&T.y!==h.y){const B=m.scrollTop+p.y,G=b===nt.Down&&B<=E.y||b===nt.Up&&B>=I.y;if(G&&!p.x){m.scrollTo({top:B,behavior:s});return}G?v.y=m.scrollTop-B:v.y=b===nt.Down?m.scrollTop-E.y:m.scrollTop-I.y,v.y&&m.scrollBy({top:-v.y,behavior:s});break}}this.handleMove(t,fa(Ou(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=ka(a),this.documentListeners=new zs(this.document),this.listeners=new zs(n),this.windowListeners=new zs(Ir(a)),this.initialCoordinates=(i=Cu(o))!=null?i:Fn,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(xn.Resize,this.handleCancel),this.windowListeners.add(xn.DragStart,$O),this.windowListeners.add(xn.VisibilityChange,this.handleCancel),this.windowListeners.add(xn.ContextMenu,$O),this.documentListeners.add(xn.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(xn.Click,$W,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xn.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=Cu(t))!=null?r:Fn,u=Ou(i,c);if(!n&&s){if(HO(s)){if(s.tolerance!=null&&Ih(u,s.tolerance))return this.handleCancel();if(Ih(u,s.distance))return this.handleStart()}if(VO(s)&&Ih(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===nt.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=ka(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,ka(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 Rh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class GW extends o1{constructor(t){super(t,Rh)}static setup(){return window.addEventListener(Rh.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Rh.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 Bs;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Bs||(Bs={}));var Ru;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Ru||(Ru={}));function KW(e){let{acceleration:t,activator:r=Bs.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=Ru.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:h,threshold:p}=e;const v=XW({delta:h,disabled:!o}),[x,m]=iW(),b=C.useRef({x:0,y:0}),w=C.useRef({x:0,y:0}),y=C.useMemo(()=>{switch(r){case Bs.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Bs.DraggableRect:return i}},[r,i,c]),_=C.useRef(null),S=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)},[]),E=C.useMemo(()=>s===Ru.TreeOrder?[...u].reverse():u,[s,u]);C.useEffect(()=>{if(!o||!u.length||!y){m();return}for(const I of E){if((n==null?void 0:n(I))===!1)continue;const N=u.indexOf(I),T=d[N];if(!T)continue;const{direction:k,speed:L}=jW(I,T,y,t,p);for(const B of["x","y"])v[B][k[B]]||(L[B]=0,k[B]=0);if(L.x>0||L.y>0){m(),_.current=I,x(S,a),b.current=L,w.current=k;return}}b.current={x:0,y:0},w.current={x:0,y:0},m()},[t,S,n,m,o,a,JSON.stringify(y),JSON.stringify(v),x,u,E,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=Su(t);return dl(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 dl(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 Xs;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Xs||(Xs={}));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=Ys(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),m=dl(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 S=_.node.current,E=S?new i1(c(S),S):null;_.rect.current=E,E&&y.set(_.id,E)}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:m,measureDroppableContainers:v,measuringScheduled:o!=null};function b(){switch(u){case Xs.Always:return!1;case Xs.BeforeDragging:return r;default:return!r}}}function s1(e,t){return dl(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=rd(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 id(e){let{callback:t,disabled:r}=e;const n=rd(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(Ma(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=id({callback:o});return Bn(()=>{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=dl(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=Ch(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=Ch(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=Ch(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),C.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>fa(o,a),Fn):zj(e):Fn,[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!==Fn;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?Ou(e,r.current):Fn}function aU(e){C.useEffect(()=>{if(!td)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=Ma);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=id({callback:a});return Bn(()=>{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 ul(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(ul(d)){n(h=>{const p=t(d);return h?{...h,width:p.width,height:p.height}:p});break}},[t]),o=id({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]=Eu(a);return C.useMemo(()=>({nodeRef:s,rect:r,setRef:c}),[r,s,c])}const uU=[{sensor:a1,options:{}},{sensor:$j,options:{}}],dU={current:{}},ru={draggable:{measure:FO},droppable:{measure:FO,strategy:Xs.WhileDragging,frequency:xw.Optimized},dragOverlay:{measure:Ma}};class Fs 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 Fs,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Iu},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ru,measureDroppableContainers:Iu,windowRect:null,measuringScheduled:!1},Wj={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Iu,draggableNodes:new Map,over:null,measureDroppableContainers:Iu},hl=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 Fs}}}function pU(e,t){switch(t.type){case Jt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Jt.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 Jt.DragEnd:case Jt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Jt.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Fs(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Jt.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 Fs(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Jt.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Fs(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(hl),o=Su(n),a=Su(r==null?void 0:r.id);return C.useEffect(()=>{if(!t&&!n&&o&&a!=null){if(!nd(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:{...ru.draggable,...e==null?void 0:e.draggable},droppable:{...ru.droppable,...e==null?void 0:e.droppable},dragOverlay:{...ru.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;Bn(()=>{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 od=C.createContext({...Fn,scaleX:1,scaleY:1});var Fi;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Fi||(Fi={}));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),[m,b]=x,[w,y]=hW(),[_,S]=C.useState(Fi.Uninitialized),E=_===Fi.Initialized,{draggable:{active:I,nodes:N,translate:T},droppable:{containers:k}}=m,L=I!=null?N.get(I):null,B=C.useRef({initial:null,translated:null}),G=C.useMemo(()=>{var kt;return I!=null?{id:I,data:(kt=L==null?void 0:L.data)!=null?kt:dU,rect:B}:null},[I,L]),z=C.useRef(null),[P,K]=C.useState(null),[U,re]=C.useState(null),X=Ys(v,Object.values(v)),ne=fl("DndDescribedBy",o),D=C.useMemo(()=>k.getEnabled(),[k]),$=gU(h),{droppableRects:Z,measureDroppableContainers:ee,measuringScheduled:A}=QW(D,{dragging:E,dependencies:[T.x,T.y],config:$.droppable}),W=ZW(N,I),q=C.useMemo(()=>U?Cu(U):null,[U]),j=Tn(),V=eU(W,$.draggable.measure);mU({activeNode:I!=null?N.get(I):null,config:j.layoutShiftCompensation,initialRect:V,measure:$.draggable.measure});const J=UO(W,$.draggable.measure,V),Y=UO(W?W.parentElement:null),se=C.useRef({activatorEvent:null,active:null,activeNode:W,collisionRect:null,collisions:null,droppableRects:Z,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:k,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),te=k.getNodeFor((t=se.current.over)==null?void 0:t.id),he=cU({measure:$.dragOverlay.measure}),ce=(r=he.nodeRef.current)!=null?r:W,be=E?(n=he.rect)!=null?n:J:null,le=!!(he.nodeRef.current&&he.rect),ue=nU(le?null:J),we=Hj(ce?Ir(ce):null),Se=iU(E?te??W:null),Ne=lU(Se),De=Gj(p,{transform:{x:T.x-ue.x,y:T.y-ue.y,scaleX:1,scaleY:1},activatorEvent:U,active:G,activeNodeRect:J,containerNodeRect:Y,draggingNodeRect:be,over:se.current.over,overlayNodeRect:he.rect,scrollableAncestors:Se,scrollableAncestorRects:Ne,windowRect:we}),Le=q?fa(q,T):null,Ae=oU(Se),Je=KO(Ae),Et=KO(Ae,[J]),tt=fa(De,Je),Be=be?NW(be,De):null,je=G&&Be?d({active:G,collisionRect:Be,droppableRects:Z,droppableContainers:D,pointerCoordinates:Le}):null,Qe=EW(je,"id"),[Ue,Wt]=C.useState(null),Ut=le?De:fa(De,Et),St=IW(Ut,(i=Ue==null?void 0:Ue.rect)!=null?i:null,J),Nt=C.useRef(null),wr=C.useCallback((kt,Mt)=>{let{sensor:At,options:sr}=Mt;if(z.current==null)return;const Lt=N.get(z.current);if(!Lt)return;const zt=kt.nativeEvent,lr=new At({active:z.current,activeNode:Lt,event:zt,options:sr,context:se,onAbort(pt){if(!N.get(pt))return;const{onDragAbort:Gt}=X.current,Kt={id:pt};Gt==null||Gt(Kt),w({type:"onDragAbort",event:Kt})},onPending(pt,Gt,Kt,rr){if(!N.get(pt))return;const{onDragPending:vr}=X.current,cr={id:pt,constraint:Gt,initialCoordinates:Kt,offset:rr};vr==null||vr(cr),w({type:"onDragPending",event:cr})},onStart(pt){const Gt=z.current;if(Gt==null)return;const Kt=N.get(Gt);if(!Kt)return;const{onDragStart:rr}=X.current,vr={activatorEvent:zt,active:{id:Gt,data:Kt.data,rect:B}};Qn.unstable_batchedUpdates(()=>{rr==null||rr(vr),S(Fi.Initializing),b({type:Jt.DragStart,initialCoordinates:pt,active:Gt}),w({type:"onDragStart",event:vr}),K(Nt.current),re(zt)})},onMove(pt){b({type:Jt.DragMove,coordinates:pt})},onEnd:Ur(Jt.DragEnd),onCancel:Ur(Jt.DragCancel)});Nt.current=lr;function Ur(pt){return async function(){const{active:Gt,collisions:Kt,over:rr,scrollAdjustedTranslate:vr}=se.current;let cr=null;if(Gt&&vr){const{cancelDrop:Fe}=X.current;cr={activatorEvent:zt,active:Gt,collisions:Kt,delta:vr,over:rr},pt===Jt.DragEnd&&typeof Fe=="function"&&await Promise.resolve(Fe(cr))&&(pt=Jt.DragCancel)}z.current=null,Qn.unstable_batchedUpdates(()=>{b({type:pt}),S(Fi.Uninitialized),Wt(null),K(null),re(null),Nt.current=null;const Fe=pt===Jt.DragEnd?"onDragEnd":"onDragCancel";if(cr){const bt=X.current[Fe];bt==null||bt(cr),w({type:Fe,event:cr})}})}}},[N]),sn=C.useCallback((kt,Mt)=>(At,sr)=>{const Lt=At.nativeEvent,zt=N.get(sr);if(z.current!==null||!zt||Lt.dndKit||Lt.defaultPrevented)return;const lr={active:zt};kt(At,Mt.options,lr)===!0&&(Lt.dndKit={capturedBy:Mt.sensor},z.current=sr,wr(At,Mt))},[N,wr]),Tr=JW(u,sn);aU(u),Bn(()=>{J&&_===Fi.Initializing&&S(Fi.Initialized)},[J,_]),C.useEffect(()=>{const{onDragMove:kt}=X.current,{active:Mt,activatorEvent:At,collisions:sr,over:Lt}=se.current;if(!Mt||!At)return;const zt={active:Mt,activatorEvent:At,collisions:sr,delta:{x:tt.x,y:tt.y},over:Lt};Qn.unstable_batchedUpdates(()=>{kt==null||kt(zt),w({type:"onDragMove",event:zt})})},[tt.x,tt.y]),C.useEffect(()=>{const{active:kt,activatorEvent:Mt,collisions:At,droppableContainers:sr,scrollAdjustedTranslate:Lt}=se.current;if(!kt||z.current==null||!Mt||!Lt)return;const{onDragOver:zt}=X.current,lr=sr.get(Qe),Ur=lr&&lr.rect.current?{id:lr.id,rect:lr.rect.current,data:lr.data,disabled:lr.disabled}:null,pt={active:kt,activatorEvent:Mt,collisions:At,delta:{x:Lt.x,y:Lt.y},over:Ur};Qn.unstable_batchedUpdates(()=>{Wt(Ur),zt==null||zt(pt),w({type:"onDragOver",event:pt})})},[Qe]),Bn(()=>{se.current={activatorEvent:U,active:G,activeNode:W,collisionRect:Be,collisions:je,droppableRects:Z,draggableNodes:N,draggingNode:ce,draggingNodeRect:be,droppableContainers:k,over:Ue,scrollableAncestors:Se,scrollAdjustedTranslate:tt},B.current={initial:be,translated:Be}},[G,W,je,Be,N,ce,be,Z,k,Ue,Se,tt]),KW({...j,delta:T,draggingRect:Be,pointerCoordinates:Le,scrollableAncestors:Se,scrollableAncestorRects:Ne});const ar=C.useMemo(()=>({active:G,activeNode:W,activeNodeRect:J,activatorEvent:U,collisions:je,containerNodeRect:Y,dragOverlay:he,draggableNodes:N,droppableContainers:k,droppableRects:Z,over:Ue,measureDroppableContainers:ee,scrollableAncestors:Se,scrollableAncestorRects:Ne,measuringConfiguration:$,measuringScheduled:A,windowRect:we}),[G,W,J,U,je,Y,he,N,k,Z,Ue,ee,Se,Ne,$,A,we]),Nn=C.useMemo(()=>({activatorEvent:U,activators:Tr,active:G,activeNodeRect:J,ariaDescribedById:{draggable:ne},dispatch:b,draggableNodes:N,over:Ue,measureDroppableContainers:ee}),[U,Tr,G,J,b,ne,N,Ue,ee]);return C.createElement(Pj.Provider,{value:y},C.createElement(hl.Provider,{value:Nn},C.createElement(Uj.Provider,{value:ar},C.createElement(od.Provider,{value:St},c)),C.createElement(vU,{disabled:(a==null?void 0:a.restoreFocus)===!1})),C.createElement(gW,{...a,hiddenTextDescribedById:ne}));function Tn(){const kt=(P==null?void 0:P.autoScrollEnabled)===!1,Mt=typeof s=="object"?s.enabled===!1:s===!1,At=E&&!kt&&!Mt;return typeof s=="object"?{...s,enabled:At}:{enabled:At}}}),yU=C.createContext(null),XO="button",xU="Draggable";function wU(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=fl(xU),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:h,over:p}=C.useContext(hl),{role:v=XO,roleDescription:x="draggable",tabIndex:m=0}=i??{},b=(c==null?void 0:c.id)===t,w=C.useContext(b?od:yU),[y,_]=Eu(),[S,E]=Eu(),I=sU(a,t),N=Ys(r);Bn(()=>(h.set(t,{id:t,key:o,node:y,activatorNode:S,data:N}),()=>{const k=h.get(t);k&&k.key===o&&h.delete(t)}),[h,t]);const T=C.useMemo(()=>({role:v,tabIndex:m,"aria-disabled":n,"aria-pressed":b&&v===XO?!0:void 0,"aria-roledescription":x,"aria-describedby":d.draggable}),[n,v,m,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:E,transform:w}}function Kj(){return C.useContext(Uj)}const _U="Droppable",EU={timeout:25};function SU(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=fl(_U),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=C.useContext(hl),d=C.useRef({disabled:r}),h=C.useRef(!1),p=C.useRef(null),v=C.useRef(null),{disabled:x,updateMeasurementsFor:m,timeout:b}={...EU,...i},w=Ys(m??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]),_=id({callback:y,disabled:x||!a}),S=C.useCallback((T,k)=>{_&&(k&&(_.unobserve(k),h.current=!1),T&&_.observe(T))},[_]),[E,I]=Eu(S),N=Ys(t);return C.useEffect(()=>{!_||!E.current||(_.disconnect(),h.current=!1,_.observe(E.current))},[E,_]),C.useEffect(()=>(s({type:Jt.RegisterDroppable,element:{id:n,key:o,disabled:r,node:E,rect:p,data:N}}),()=>s({type:Jt.UnregisterDroppable,key:o,id:n})),[n]),C.useEffect(()=>{r!==d.current.disabled&&(s({type:Jt.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:E,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=Su(r);return!r&&!n&&s&&i(s),Bn(()=>{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(hl.Provider,{value:Wj},C.createElement(od.Provider,{value:CU},t))}const RU={position:"fixed",touchAction:"none"},NU=e=>nd(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:Ui.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:Ui.Transform.toString(t)},{transform:Ui.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 rd((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,m=v[v.length-1];if(JSON.stringify(x)===JSON.stringify(m))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:m,dragOverlay:b,over:w,measuringConfiguration:y,scrollableAncestors:_,scrollableAncestorRects:S,windowRect:E}=Kj(),I=C.useContext(od),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:S,transform:I,windowRect:E}),k=s1(p),L=AU({config:n,draggableNodes:x,droppableContainers:m,measuringConfiguration:y}),B=k?b.setRef:void 0;return C.createElement(IU,null,C.createElement(OU,{animation:L},h&&N?C.createElement(TU,{key:N,id:h.id,ref:B,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 Sc(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 Oc={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,...Oc}:null}return a>i&&a<=o?{x:-s.width-c,y:0,...Oc}:a<i&&a>=o?{x:s.width+c,y:0,...Oc}:{x:0,y:0,...Oc}};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=fl(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,m=a?v.indexOf(a.id):-1,b=u?v.indexOf(u.id):-1,w=C.useRef(v),y=!zU(v,w.current),_=b!==-1&&m===-1||y,S=BU(o);Bn(()=>{y&&x&&d(v)},[y,v,x,d]),C.useEffect(()=>{w.current=v},[v]);const E=C.useMemo(()=>({activeIndex:m,containerId:h,disabled:S,disableTransforms:_,items:v,overIndex:b,useDragOverlay:p,sortedRects:LU(v,c),strategy:i}),[m,h,S.draggable,S.droppable,_,v,b,c,p,i]);return C.createElement(Zj.Provider,{value:E},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=Ui.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 Bn(()=>{if(!t&&r!==s.current&&n.current){const c=i.current;if(c){const u=Ma(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:m,overIndex:b,useDragOverlay:w,strategy:y}=C.useContext(Zj),_=ZU(n,v),S=d.indexOf(a),E=C.useMemo(()=>({sortable:{containerId:h,index:S,items:d},...i}),[h,i,S,d]),I=C.useMemo(()=>d.slice(d.indexOf(a)),[d,a]),{rect:N,node:T,isOver:k,setNodeRef:L}=SU({id:a,data:E,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...c}}),{active:B,activatorEvent:G,activeNodeRect:z,attributes:P,setNodeRef:K,listeners:U,isDragging:re,over:X,setActivatorNodeRef:ne,transform:D}=wU({id:a,data:E,attributes:{...KU,...r},disabled:_.draggable}),$=nW(L,K),Z=!!B,ee=Z&&!x&&Sc(p)&&Sc(b),A=!w&&re,W=A&&ee?D:null,q=ee?W??(s??y)({rects:m,activeNodeRect:z,activeIndex:p,overIndex:b,index:S}):null,j=Sc(p)&&Sc(b)?o({id:a,items:d,activeIndex:p,overIndex:b}):S,V=B==null?void 0:B.id,J=C.useRef({activeId:V,items:d,newIndex:j,containerId:h}),Y=d!==J.current.items,se=t({active:B,containerId:h,isDragging:re,isSorting:Z,id:a,index:S,items:d,newIndex:J.current.newIndex,previousItems:J.current.items,previousContainerId:J.current.containerId,transition:u,wasDragging:J.current.activeId!=null}),te=YU({disabled:!se,index:S,node:T,rect:N});return C.useEffect(()=>{Z&&J.current.newIndex!==j&&(J.current.newIndex=j),h!==J.current.containerId&&(J.current.containerId=h),d!==J.current.items&&(J.current.items=d)},[Z,j,h,d]),C.useEffect(()=>{if(V===J.current.activeId)return;if(V!=null&&J.current.activeId==null){J.current.activeId=V;return}const ce=setTimeout(()=>{J.current.activeId=V},50);return()=>clearTimeout(ce)},[V]),{active:B,activeIndex:p,attributes:P,data:E,rect:N,index:S,newIndex:j,items:d,isOver:k,isSorting:Z,isDragging:re,listeners:U,node:T,overIndex:b,over:X,setNodeRef:$,setActivatorNodeRef:ne,setDroppableNodeRef:L,setDraggableNodeRef:K,transform:te??q,transition:he()};function he(){if(te||Y&&J.current.newIndex===S)return GU;if(!(A&&!nd(G)||!u)&&(Z||se))return Ui.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}}nt.Down,nt.Right,nt.Up,nt.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{onClose:o,renderTab:a}=e,{attributes:s,listeners:c,setNodeRef:u,transform:d,transition:h,isDragging:p}=XU({id:t}),v={transform:Ui.Transform.toString(d),transition:h||"transform 200ms cubic-bezier(0.2, 0, 0, 1) 0s",opacity:p&&!i?.5:1,cursor:"pointer"},x=()=>{n(t)},m=b=>{b==null||b.stopPropagation(),o&&o(t)};return a?O.jsx("div",{ref:u,style:v,...s,...c,className:"flex h-full shrink-0 select-none focus:outline-hidden","aria-roledescription":"sortable",children:a({tab:e,isActive:r,onClick:x,onClose:o?m: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=()=>me("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?me(a,o.padding,o.text,o.gap,"pointer-events-none cursor-not-allowed opacity-50","bg-card","text-inactive-text"):r?me(a,o.padding,o.text,o.gap,i.active.bg,i.active.text,"shadow-xs"):me(a,o.padding,o.text,o.gap,i.inactive.bg,i.inactive.text,i.hover.bg,i.hover.text)},t3=(e,t)=>me("flex items-center justify-center",Qj[e].icon,{"opacity-50":t}),r3=()=>me("whitespace-nowrap"),Nh=()=>me("min-w-full flex h-8 bg-tab-bg-default pt-0.5"),n3=(e,t)=>{const r=me("group flex items-center justify-between space-x-4","rounded-t px-2 text-xs","focus:outline-hidden");return e&&!t?me(r,"z-2 border border-b-0 border-tab-border","bg-tab-active-bg font-semibold text-tab-active-fg"):t&&!e?me(r,"border border-transparent bg-tab-inactive-bg text-inactive-text"):me(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,content:c,...u},d)=>{const h=C.useContext(ww);if(!h)return null;const{activeTab:p,onTabChange:v,variant:x,color:m,size:b,showIcons:w,disabled:y}=h,_=s!==void 0?s:p===e,S=n||y,E=I=>{S||(v(e),a==null||a(I))};return x==="file"?O.jsx("div",{"data-qui":"FileTabItem",className:me(n3(_,!1),"cursor-pointer",o),onClick:I=>!S&&E(I),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:d,"data-qui":"TabItem",type:"button",role:"tab","aria-selected":_,"aria-disabled":S,className:me(e3(m,b,_,S||!1),o),onClick:E,disabled:S,...u,children:[w&&r&&O.jsx("span",{className:t3(b,S||!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{icon:c,disabled:u=!1,onClose:d,renderTab:h}=e,p=()=>{u||s(t)},v=x=>{x==null||x.stopPropagation(),!u&&d&&d(t)};return h?O.jsx(O.Fragment,{children:h({tab:e,isActive:n,onClick:p,onClose:d?v:void 0})}):O.jsxs("button",{"data-qui":"TabItem",type:"button",role:"tab","aria-selected":n,"aria-disabled":u,className:e3(i,o,n,u),onClick:p,disabled:u,children:[a&&c&&O.jsx("span",{className:t3(o,u),children:c}),O.jsx("span",{className:r3(),children:r})]})},nG=({tab:e,value:t,isActive:r,onTabClick:n})=>{const{onClose:i,renderTab:o}=e,a=()=>{n(t)},s=c=>{c==null||c.stopPropagation(),i&&i(t)};return o?O.jsx("div",{"data-qui":"FileTabItem",className:"flex h-full shrink-0 select-none focus:outline-hidden",children:o({tab:e,isActive:r,onClick:a,onClose:i?s: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:m,children:b})=>{const w=X=>{const ne=X[t]??X.value??X.key;return ne!==void 0?String(ne):""},y=X=>X[r]??X.label,_=i||(e[0]?w(e[0]):""),[S,E]=C.useState(_),[I,N]=C.useState(null),[T,k]=C.useState(e),L=n!==void 0?n:S,B=T,G=bW(mW(a1,{activationConstraint:{distance:10}})),z=X=>{n===void 0&&E(X),v==null||v(X)},P=X=>B.findIndex(ne=>w(ne)===X),K=I?P(I):-1;C.useEffect(()=>{k(e)},[e]);const U={activeTab:L,onTabChange:z,variant:o,color:a,size:s,showIcons:u,disabled:d};if(b)return O.jsxs(ww.Provider,{value:U,children:[O.jsx("div",{"data-qui":"Tabs",role:"tablist",className:me(o==="file"?Nh():QO(),h,p),children:b}),o==="file"&&O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]});const re=o==="file"&&c?O.jsxs("div",{className:"relative h-full w-full",children:[O.jsxs(bU,{collisionDetection:SW,modifiers:[JU,eG],sensors:G,onDragStart:({active:X})=>{X&&N(X.id)},onDragEnd:({over:X})=>{if(N(null),X){const ne=P(X.id);if(K!==ne&&K!==-1){const D=l1(B,K,ne);k(D),x&&x(D,D[ne]),z(w(D[ne]))}}},onDragCancel:()=>{N(null)},children:[O.jsx(HU,{items:B.map(X=>w(X)),strategy:FU,children:O.jsx("div",{role:"tablist",className:me(Nh(),p),children:B.map(X=>{const ne=w(X);return O.jsx(JO,{value:ne,tab:{...X,renderTab:X.renderTab||m},isActive:L===ne,onTabClick:z,className:h},ne)})})}),O.jsx(qU,{children:I&&K!==-1?O.jsx(JO,{value:w(B[K]),tab:{...B[K],renderTab:B[K].renderTab||m},isActive:L===w(B[K]),onTabClick:z,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:me(Nh(),p),children:e.map(X=>{const ne=w(X);return O.jsx(nG,{value:ne,tab:{...X,renderTab:X.renderTab||m},isActive:L===ne,onTabClick:z},ne)})}),O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):O.jsx("div",{role:"tablist",className:me(QO(),p),children:e.map(X=>{const ne=w(X);return O.jsx(rG,{value:ne,label:y(X),tab:{...X,renderTab:X.renderTab||m},isActive:L===ne,color:a,size:s,showIcons:u,onTabClick:z},ne)})});return O.jsx(ww.Provider,{value:U,children:O.jsx("div",{"data-qui":"Tabs",className:h,children:re})})},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 Th=c1;var $t=function(){return $t=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},$t.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"},Cc={width:"20px",height:"20px",position:"absolute",zIndex:1},aG={top:$t($t({},eC),{top:"-5px"}),right:$t($t({},tC),{left:void 0,right:"-5px"}),bottom:$t($t({},eC),{top:void 0,bottom:"-5px"}),left:$t($t({},tC),{left:"-5px"}),topRight:$t($t({},Cc),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:$t($t({},Cc),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:$t($t({},Cc),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:$t($t({},Cc),{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 $t($t({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)}})(),Zn=function(){return Zn=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},Zn.apply(this,arguments)},cG={width:"auto",height:"auto"},Ic=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)},Qo=function(e,t){return new RegExp(e,"i").test(t)},Rc=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},Ph=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")},Nc=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=Nc(n,e.width,t,r),i=Nc(i,e.height,t,r),o=Nc(o,e.width,t,r),a=Nc(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 Ph(r.state[s])},o=n&&typeof n.width<"u"&&!this.state.isResizing?Ph(n.width):i("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?Ph(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&&Qo("left",o),s=i&&Qo("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,m=d.width,b=d.height,w=v||0,y=x||0;return Qo("right",u)&&(m=d.width+(r-d.x)*a/i,p&&(b=(m-y)/this.ratio+w)),Qo("left",u)&&(m=d.width-(r-d.x)*a/i,p&&(b=(m-y)/this.ratio+w)),Qo("bottom",u)&&(b=d.height+(n-d.y)*s/i,p&&(m=(b-w)*this.ratio+y)),Qo("top",u)&&(b=d.height-(n-d.y)*s/i,p&&(m=(b-w)*this.ratio+y)),{newWidth:m,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,m=u||0;if(s){var b=(p-x)*this.ratio+m,w=(v-x)*this.ratio+m,y=(d-m)/this.ratio+x,_=(h-m)/this.ratio+x,S=Math.max(d,b),E=Math.min(h,w),I=Math.max(p,y),N=Math.min(v,_);r=Ic(r,S,E),n=Ic(n,I,N)}else r=Ic(r,d,h),n=Ic(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&&Rc(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:Zn(Zn({},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&&Rc(r))try{r.preventDefault(),r.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,c=i.minHeight,u=Rc(r)?r.touches[0].clientX:r.clientX,d=Rc(r)?r.touches[0].clientY:r.clientY,h=this.state,p=h.direction,v=h.original,x=h.width,m=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,S=y.newWidth,E=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(S=nC(S,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(S,_,{width:E.maxWidth,height:E.maxHeight},{width:s,height:c});if(S=I.newWidth,_=I.newHeight,this.props.grid){var N=rC(S,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,L=k===0||Math.abs(N-S)<=k?N:S,B=k===0||Math.abs(T-_)<=k?T:_;S=L,_=B}var G={width:S-v.width,height:_-v.height};if(this.delta=G,x&&typeof x=="string"){if(x.endsWith("%")){var z=S/b.width*100;S="".concat(z,"%")}else if(x.endsWith("vw")){var P=S/this.window.innerWidth*100;S="".concat(P,"vw")}else if(x.endsWith("vh")){var K=S/this.window.innerHeight*100;S="".concat(K,"vh")}}if(m&&typeof m=="string"){if(m.endsWith("%")){var z=_/b.height*100;_="".concat(z,"%")}else if(m.endsWith("vw")){var P=_/this.window.innerWidth*100;_="".concat(P,"vw")}else if(m.endsWith("vh")){var K=_/this.window.innerHeight*100;_="".concat(K,"vh")}}var U={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(_,"height")};this.flexDir==="row"?U.flexBasis=U.width:this.flexDir==="column"&&(U.flexBasis=U.height);var re=this.state.width!==U.width,X=this.state.height!==U.height,ne=this.state.flexBasis!==U.flexBasis,D=re||X||ne;D&&Qn.flushSync(function(){n.setState(U)}),this.props.onResize&&D&&this.props.onResize(r,p,this.resizable,G)}},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:Zn(Zn({},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=Zn(Zn(Zn({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,Zn({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})=>me("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:m={},handleClasses:b={},handleComponent:w={},style:y={},className:_,onResizeStart:S,onResize:E,onResizeStop:I,scale:N=1,bounds:T,snapGap:k,as:L="div",depth:B,disabled:G},z)=>{const P=o3({depth:B,className:_,disabled:G}),K=mG(_),U=d?{size:d}:t!==void 0||r!==void 0?{size:{width:t??"auto",height:r??"auto"}}:{},re=u?{defaultSize:u}:s!==void 0||c!==void 0?{defaultSize:{width:s??"auto",height:c??"auto"}}:{},X=C.useRef(null);return C.useImperativeHandle(z,()=>{var ne;return(ne=X.current)==null?void 0:ne.resizable}),O.jsx(pG,{"data-qui":"Resizable",ref:X,...U,...re,minWidth:n??K.minWidth,minHeight:i??K.minHeight,maxWidth:o??K.maxWidth,maxHeight:a??K.maxHeight,grid:h,snap:p,lockAspectRatio:v,enable:x,handleStyles:m,handleClasses:b,handleComponent:w,style:y,className:me("relative box-border",P),onResizeStart:S,onResize:E,onResizeStop:I,scale:N,bounds:T,snapGap:k,as:L,children:e})});bG.displayName="Resizable";const ea={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"}},Tc={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:me("inline-flex items-center",ea[e].gap,o),track:me("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 px-0.5",ea[e].track,{[Tc[t].bg]:r&&!n&&!i,"bg-input-bg":!r&&!n||i,"bg-panel cursor-not-allowed":n,"cursor-pointer":!n}),thumb:me("bg-input-text pointer-events-none inline-flex items-center justify-center shadow-xs","transition-all duration-200 ease-in-out","rounded-full absolute",ea[e].thumb,r?ea[e].thumbChecked:ea[e].thumbUnchecked,{[Tc[t].thumb]:!n,"bg-canvas-subtle":n}),iconLeft:me("flex items-center justify-center z-10 w-1/2 p-0.5",{[Tc[t].icon]:!r&&!n,"text-panel-subtle":n||r}),iconRight:me("flex items-center justify-center z-10 w-1/2 p-0.5",{[Tc[t].icon]:r&&!n,"text-panel-subtle":n||!r}),label:me("font-medium text-body",ea[e].label,{"cursor-pointer":!n,"cursor-not-allowed text-muted":n})}),Nu=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),m=t!==void 0,b=m?t:v,w=()=>{const _=!b;m||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})]})]})});Nu.displayName="Toggle";C.createContext(null);const yr=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})});yr.displayName="Panel";const Zs={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"}},nu={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)=>me("inline-flex items-center justify-center font-medium border",Zs[e].container,nu[t].bg,nu[t].text,nu[t].border,Zs[e].text,{"opacity-60 pointer-events-none":r,"cursor-pointer hover:bg-opacity-90 transition-opacity":n&&!r}),wG=(e,t,r)=>me({[Zs[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=>me(Zs[e].text),a3=(e,t,r)=>me("inline-flex items-center justify-center rounded transition-colors duration-200 focus:outline-hidden ",Zs[e].iconButton,nu[t].buttonHover,{"pointer-events-none":r}),s3=C.createContext(null),ad=()=>{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:me(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}=ad();return O.jsx("span",{ref:n,className:me(_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}=ad(),u=!!r,d=O.jsx("span",{ref:o,className:me(wG(a,s,u),e,{"opacity-60":c}),...i,children:t});return u&&!c?O.jsx(Lr,{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}=ad();return O.jsx("button",{ref:n,type:"button",disabled:a,className:me(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}=ad();return O.jsx("button",{ref:o,type:"button",disabled:c,className:me(a3(a,s,c),e),onClick:t,"aria-label":r,...i,children:n||O.jsx(Qu,{})})});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 iu=Object.assign(c3,{Root:u1,Text:d1,Icon:f1,Button:l3,Close:h1});function ta(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,m=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`,`
5
+ */var K1;function pH(){return K1||(K1=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})()})(Qf)),Qf.exports}var vH=pH();const We=Vn(vH);function gH({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 ID=T.createContext(void 0),mH=({children:e})=>{const[t,r]=T.useState(null),[n,i]=T.useState(null);function o(u){r(u),setTimeout(()=>i(u),0)}const a={selectedRole:t,deferredSelectedRole:n,selectRole:o};return C.jsx(ID.Provider,{value:a,children:e})};function ox(){const e=T.useContext(ID);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var Y1=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},X1=typeof window<"u"&&window.document&&window.document.createElement?ve.useLayoutEffect:ve.useEffect,Gt="top",Sr="bottom",Or="right",Kt="left",ax="auto",Ka=[Gt,Sr,Or,Kt],yo="start",La="end",yH="clippingParents",PD="viewport",oa="popper",bH="reference",Z1=Ka.reduce(function(e,t){return e.concat([t+"-"+yo,t+"-"+La])},[]),ND=[].concat(Ka,[ax]).reduce(function(e,t){return e.concat([t,t+"-"+yo,t+"-"+La])},[]),xH="beforeRead",wH="read",_H="afterRead",EH="beforeMain",SH="main",OH="afterMain",CH="beforeWrite",RH="write",IH="afterWrite",PH=[xH,wH,_H,EH,SH,OH,CH,RH,IH];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 bi(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 sx(e){if(typeof ShadowRoot>"u")return!1;var t=ur(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function NH(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 TH(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 AH={name:"applyStyles",enabled:!0,phase:"write",fn:NH,effect:TH,requires:["computeStyles"]};function en(e){return e.split("-")[0]}var hi=Math.max,$u=Math.min,bo=Math.round;function Ab(){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 TD(){return!/^((?!chrome|android).)*safari/i.test(Ab())}function xo(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&&bo(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&bo(n.height)/e.offsetHeight||1);var a=bi(e)?ur(e):window,u=a.visualViewport,l=!TD()&&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 ux(e){var t=xo(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 AD(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&sx(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 MH(e){return["table","td","th"].indexOf(nn(e))>=0}function Un(e){return((bi(e)?e.ownerDocument:e.document)||window.document).documentElement}function bl(e){return nn(e)==="html"?e:e.assignedSlot||e.parentNode||(sx(e)?e.host:null)||Un(e)}function J1(e){return!Er(e)||bn(e).position==="fixed"?null:e.offsetParent}function DH(e){var t=/firefox/i.test(Ab()),r=/Trident/i.test(Ab());if(r&&Er(e)){var n=bn(e);if(n.position==="fixed")return null}var i=bl(e);for(sx(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 Ya(e){for(var t=ur(e),r=J1(e);r&&MH(r)&&bn(r).position==="static";)r=J1(r);return r&&(nn(r)==="html"||nn(r)==="body"&&bn(r).position==="static")?t:r||DH(e)||t}function lx(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ma(e,t,r){return hi(e,$u(t,r))}function jH(e,t,r){var n=Ma(e,t,r);return n>r?r:n}function MD(){return{top:0,right:0,bottom:0,left:0}}function DD(e){return Object.assign({},MD(),e)}function jD(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var qH=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,DD(typeof t!="number"?t:jD(t,Ka))};function kH(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=lx(u),d=[Kt,Or].indexOf(u)>=0,f=d?"height":"width";if(!(!o||!a)){var h=qH(i.padding,r),p=ux(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=Ya(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=Ma(_,R,S),P=l;r.modifiersData[n]=(t={},t[P]=I,t.centerOffset=I-R,t)}}function LH(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)||AD(t.elements.popper,i)&&(t.elements.arrow=i))}const BH={name:"arrow",enabled:!0,phase:"main",fn:kH,effect:LH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wo(e){return e.split("-")[1]}var FH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $H(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:bo(r*i)/i||0,y:bo(n*i)/i||0}}function Q1(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=Ya(r),I="clientHeight",P="clientWidth";if(R===ur(r)&&(R=Un(r),bn(R).position!=="static"&&u==="absolute"&&(I="scrollHeight",P="scrollWidth")),R=R,i===Gt||(i===Kt||i===Or)&&o===La){_=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===La){E=Or;var k=h&&R===S&&S.visualViewport?S.visualViewport.width:R[P];v-=k-n.width,v*=l?1:-1}}var L=Object.assign({position:u},d&&FH),$=f===!0?$H({x:v,y},ur(r)):{x:v,y};if(v=$.x,y=$.y,l){var j;return Object.assign({},L,(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({},L,(t={},t[_]=w?y+"px":"",t[E]=b?v+"px":"",t.transform="",t))}function zH(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:wo(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,Q1(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,Q1(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 HH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zH,data:{}};var au={passive:!0};function VH(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,au)}),u&&l.addEventListener("resize",r.update,au),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",r.update,au)}),u&&l.removeEventListener("resize",r.update,au)}}const UH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:VH,data:{}};var WH={left:"right",right:"left",bottom:"top",top:"bottom"};function Tu(e){return e.replace(/left|right|bottom|top/g,function(t){return WH[t]})}var GH={start:"end",end:"start"};function eE(e){return e.replace(/start|end/g,function(t){return GH[t]})}function cx(e){var t=ur(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function fx(e){return xo(Un(e)).left+cx(e).scrollLeft}function KH(e,t){var r=ur(e),n=Un(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;var d=TD();(d||!d&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u+fx(e),y:l}}function YH(e){var t,r=Un(e),n=cx(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=hi(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=hi(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-n.scrollLeft+fx(e),l=-n.scrollTop;return bn(i||r).direction==="rtl"&&(u+=hi(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:l}}function dx(e){var t=bn(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function qD(e){return["html","body","#document"].indexOf(nn(e))>=0?e.ownerDocument.body:Er(e)&&dx(e)?e:qD(bl(e))}function Da(e,t){var r;t===void 0&&(t=[]);var n=qD(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=ur(n),a=i?[o].concat(o.visualViewport||[],dx(n)?n:[]):n,u=t.concat(a);return i?u:u.concat(Da(bl(a)))}function Mb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function XH(e,t){var r=xo(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 tE(e,t,r){return t===PD?Mb(KH(e,r)):bi(t)?XH(t,r):Mb(YH(Un(e)))}function ZH(e){var t=Da(bl(e)),r=["absolute","fixed"].indexOf(bn(e).position)>=0,n=r&&Er(e)?Ya(e):e;return bi(n)?t.filter(function(i){return bi(i)&&AD(i,n)&&nn(i)!=="body"}):[]}function JH(e,t,r,n){var i=t==="clippingParents"?ZH(e):[].concat(t),o=[].concat(i,[r]),a=o[0],u=o.reduce(function(l,d){var f=tE(e,d,n);return l.top=hi(f.top,l.top),l.right=$u(f.right,l.right),l.bottom=$u(f.bottom,l.bottom),l.left=hi(f.left,l.left),l},tE(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 kD(e){var t=e.reference,r=e.element,n=e.placement,i=n?en(n):null,o=n?wo(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?lx(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case yo:l[d]=l[d]-(t[f]/2-r[f]/2);break;case La:l[d]=l[d]+(t[f]/2-r[f]/2);break}}return l}function Ba(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?yH:u,d=r.rootBoundary,f=d===void 0?PD:d,h=r.elementContext,p=h===void 0?oa:h,v=r.altBoundary,m=v===void 0?!1:v,y=r.padding,x=y===void 0?0:y,b=DD(typeof x!="number"?x:jD(x,Ka)),w=p===oa?bH:oa,E=e.rects.popper,_=e.elements[m?w:p],S=JH(bi(_)?_:_.contextElement||Un(e.elements.popper),l,f,a),R=xo(e.elements.reference),I=kD({reference:R,element:E,placement:i}),P=Mb(Object.assign({},E,I)),A=p===oa?P:R,k={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},L=e.modifiersData.offset;if(p===oa&&L){var $=L[i];Object.keys(k).forEach(function(j){var D=[Or,Sr].indexOf(j)>=0?1:-1,G=[Gt,Sr].indexOf(j)>=0?"y":"x";k[j]+=$[G]*D})}return k}function QH(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?ND:l,f=wo(n),h=f?u?Z1:Z1.filter(function(m){return wo(m)===f}):Ka,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]=Ba(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 e4(e){if(en(e)===ax)return[];var t=Tu(e);return[eE(e),t,eE(t)]}function t4(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?[Tu(x)]:e4(x)),_=[x].concat(E).reduce(function(F,W){return F.concat(en(W)===ax?QH(t,{placement:W,boundary:f,rootBoundary:h,padding:d,flipVariations:m,allowedAutoPlacements:y}):W)},[]),S=t.rects.reference,R=t.rects.popper,I=new Map,P=!0,A=_[0],k=0;k<_.length;k++){var L=_[k],$=en(L),j=wo(L)===yo,D=[Gt,Sr].indexOf($)>=0,G=D?"width":"height",B=Ba(t,{placement:L,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),Y=D?j?Or:Kt:j?Sr:Gt;S[G]>R[G]&&(Y=Tu(Y));var Z=Tu(Y),te=[];if(o&&te.push(B[$]<=0),u&&te.push(B[Y]<=0,B[Z]<=0),te.every(function(F){return F})){A=L,P=!1;break}I.set(L,te)}if(P)for(var U=m?3:1,re=function(W){var J=_.find(function(H){var K=I.get(H);if(K)return K.slice(0,W).every(function(se){return se})});if(J)return A=J,"break"},ae=U;ae>0;ae--){var le=re(ae);if(le==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const r4={name:"flip",enabled:!0,phase:"main",fn:t4,requiresIfExists:["offset"],data:{_skip:!1}};function rE(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 nE(e){return[Gt,Or,Sr,Kt].some(function(t){return e[t]>=0})}function n4(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Ba(t,{elementContext:"reference"}),u=Ba(t,{altBoundary:!0}),l=rE(a,n),d=rE(u,i,o),f=nE(l),h=nE(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 i4={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:n4};function o4(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 a4(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=ND.reduce(function(f,h){return f[h]=o4(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 s4={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:a4};function u4(e){var t=e.state,r=e.name;t.modifiersData[r]=kD({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const l4={name:"popperOffsets",enabled:!0,phase:"read",fn:u4,data:{}};function c4(e){return e==="x"?"y":"x"}function f4(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=Ba(t,{boundary:l,rootBoundary:d,padding:h,altBoundary:f}),b=en(t.placement),w=wo(t.placement),E=!w,_=lx(b),S=c4(_),R=t.modifiersData.popperOffsets,I=t.rects.reference,P=t.rects.popper,A=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,k=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),L=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(R){if(o){var j,D=_==="y"?Gt:Kt,G=_==="y"?Sr:Or,B=_==="y"?"height":"width",Y=R[_],Z=Y+x[D],te=Y-x[G],U=v?-P[B]/2:0,re=w===yo?I[B]:P[B],ae=w===yo?-P[B]:-I[B],le=t.elements.arrow,F=v&&le?ux(le):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:MD(),J=W[D],H=W[G],K=Ma(0,I[B],F[B]),se=E?I[B]/2-U-K-J-k.mainAxis:re-K-J-k.mainAxis,oe=E?-I[B]/2+U+K+H+k.mainAxis:ae+K+H+k.mainAxis,fe=t.elements.arrow&&Ya(t.elements.arrow),V=fe?_==="y"?fe.clientTop||0:fe.clientLeft||0:0,ee=(j=L==null?void 0:L[_])!=null?j:0,we=Y+se-ee-V,be=Y+oe-ee,de=Ma(v?$u(Z,we):Z,Y,v?hi(te,be):te);R[_]=de,$[_]=de-Y}if(u){var ue,Ee=_==="x"?Gt:Kt,Pe=_==="x"?Sr:Or,Ze=R[S],ze=S==="y"?"height":"width",Fe=Ze+x[Ee],Ve=Ze-x[Pe],lt=[Gt,Kt].indexOf(b)!==-1,ct=(ue=L==null?void 0:L[S])!=null?ue:0,mt=lt?Fe:Ze-I[ze]-P[ze]-ct+k.altAxis,yt=lt?Ze+I[ze]+P[ze]-ct-k.altAxis:Ve,rt=v&&lt?jH(mt,Ze,yt):Ma(v?mt:Fe,Ze,v?yt:Ve);R[S]=rt,$[S]=rt-Ze}t.modifiersData[n]=$}}const d4={name:"preventOverflow",enabled:!0,phase:"main",fn:f4,requiresIfExists:["offset"]};function h4(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function p4(e){return e===ur(e)||!Er(e)?cx(e):h4(e)}function v4(e){var t=e.getBoundingClientRect(),r=bo(t.width)/e.offsetWidth||1,n=bo(t.height)/e.offsetHeight||1;return r!==1||n!==1}function g4(e,t,r){r===void 0&&(r=!1);var n=Er(t),i=Er(t)&&v4(t),o=Un(t),a=xo(e,i,r),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((nn(t)!=="body"||dx(o))&&(u=p4(t)),Er(t)?(l=xo(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=fx(o))),{x:a.left+u.scrollLeft-l.x,y:a.top+u.scrollTop-l.y,width:a.width,height:a.height}}function m4(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 y4(e){var t=m4(e);return PH.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function b4(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function x4(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 iE={placement:"bottom",modifiers:[],strategy:"absolute"};function oE(){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 w4(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?iE:i;return function(u,l,d){d===void 0&&(d=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},iE,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:bi(u)?Da(u):u.contextElement?Da(u.contextElement):[],popper:Da(l)};var E=y4(x4([].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(oE(w,E)){f.rects={reference:g4(w,Ya(E),f.options.strategy==="fixed"),popper:ux(E)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(k){return f.modifiersData[k.name]=Object.assign({},k.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,P=I===void 0?{}:I,A=S.name;typeof R=="function"&&(f=R({state:f,options:P,name:A,instance:v})||f)}}}},update:b4(function(){return new Promise(function(x){v.forceUpdate(),x(f)})}),destroy:function(){y(),p=!0}};if(!oE(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 _4=[UH,l4,HH,AH,s4,r4,d4,BH,i4],E4=w4({defaultModifiers:_4}),ed,aE;function S4(){if(aE)return ed;aE=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 ed=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}},ed}var O4=S4();const C4=Vn(O4);var R4=[],xl=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||R4},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);ix.flushSync(function(){l({styles:Y1(y.map(function(x){return[x,m.styles[x]||{}]})),attributes:Y1(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 C4(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,d]),h=ve.useRef();return X1(function(){h.current&&h.current.setOptions(f)},[f]),X1(function(){if(!(t==null||r==null)){var p=n.createPopper||E4,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 LD=({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(xe.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 hx(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 td,sE;function I4(){if(sE)return td;sE=1;function e(){this.__data__=[],this.size=0}return td=e,td}var rd,uE;function Co(){if(uE)return rd;uE=1;function e(t,r){return t===r||t!==t&&r!==r}return rd=e,rd}var nd,lE;function wl(){if(lE)return nd;lE=1;var e=Co();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return nd=t,nd}var id,cE;function P4(){if(cE)return id;cE=1;var e=wl(),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 id=n,id}var od,fE;function N4(){if(fE)return od;fE=1;var e=wl();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return od=t,od}var ad,dE;function T4(){if(dE)return ad;dE=1;var e=wl();function t(r){return e(this.__data__,r)>-1}return ad=t,ad}var sd,hE;function A4(){if(hE)return sd;hE=1;var e=wl();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 sd=t,sd}var ud,pE;function _l(){if(pE)return ud;pE=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,ud=o,ud}var ld,vE;function M4(){if(vE)return ld;vE=1;var e=_l();function t(){this.__data__=new e,this.size=0}return ld=t,ld}var cd,gE;function D4(){if(gE)return cd;gE=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return cd=e,cd}var fd,mE;function j4(){if(mE)return fd;mE=1;function e(t){return this.__data__.get(t)}return fd=e,fd}var dd,yE;function q4(){if(yE)return dd;yE=1;function e(t){return this.__data__.has(t)}return dd=e,dd}var hd,bE;function BD(){if(bE)return hd;bE=1;var e=typeof ht=="object"&&ht&&ht.Object===Object&&ht;return hd=e,hd}var pd,xE;function Hr(){if(xE)return pd;xE=1;var e=BD(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return pd=r,pd}var vd,wE;function Ro(){if(wE)return vd;wE=1;var e=Hr(),t=e.Symbol;return vd=t,vd}var gd,_E;function k4(){if(_E)return gd;_E=1;var e=Ro(),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 gd=o,gd}var md,EE;function L4(){if(EE)return md;EE=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return md=r,md}var yd,SE;function Oi(){if(SE)return yd;SE=1;var e=Ro(),t=k4(),r=L4(),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 yd=a,yd}var bd,OE;function Cr(){if(OE)return bd;OE=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return bd=e,bd}var xd,CE;function Xa(){if(CE)return xd;CE=1;var e=Oi(),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 xd=a,xd}var wd,RE;function B4(){if(RE)return wd;RE=1;var e=Hr(),t=e["__core-js_shared__"];return wd=t,wd}var _d,IE;function F4(){if(IE)return _d;IE=1;var e=B4(),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 _d=r,_d}var Ed,PE;function FD(){if(PE)return Ed;PE=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 Ed=r,Ed}var Sd,NE;function $4(){if(NE)return Sd;NE=1;var e=Xa(),t=F4(),r=Cr(),n=FD(),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 Sd=h,Sd}var Od,TE;function z4(){if(TE)return Od;TE=1;function e(t,r){return t==null?void 0:t[r]}return Od=e,Od}var Cd,AE;function Ci(){if(AE)return Cd;AE=1;var e=$4(),t=z4();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return Cd=r,Cd}var Rd,ME;function px(){if(ME)return Rd;ME=1;var e=Ci(),t=Hr(),r=e(t,"Map");return Rd=r,Rd}var Id,DE;function El(){if(DE)return Id;DE=1;var e=Ci(),t=e(Object,"create");return Id=t,Id}var Pd,jE;function H4(){if(jE)return Pd;jE=1;var e=El();function t(){this.__data__=e?e(null):{},this.size=0}return Pd=t,Pd}var Nd,qE;function V4(){if(qE)return Nd;qE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Nd=e,Nd}var Td,kE;function U4(){if(kE)return Td;kE=1;var e=El(),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 Td=i,Td}var Ad,LE;function W4(){if(LE)return Ad;LE=1;var e=El(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Ad=n,Ad}var Md,BE;function G4(){if(BE)return Md;BE=1;var e=El(),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 Md=r,Md}var Dd,FE;function K4(){if(FE)return Dd;FE=1;var e=H4(),t=V4(),r=U4(),n=W4(),i=G4();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,Dd=o,Dd}var jd,$E;function Y4(){if($E)return jd;$E=1;var e=K4(),t=_l(),r=px();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return jd=n,jd}var qd,zE;function X4(){if(zE)return qd;zE=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return qd=e,qd}var kd,HE;function Sl(){if(HE)return kd;HE=1;var e=X4();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return kd=t,kd}var Ld,VE;function Z4(){if(VE)return Ld;VE=1;var e=Sl();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Ld=t,Ld}var Bd,UE;function J4(){if(UE)return Bd;UE=1;var e=Sl();function t(r){return e(this,r).get(r)}return Bd=t,Bd}var Fd,WE;function Q4(){if(WE)return Fd;WE=1;var e=Sl();function t(r){return e(this,r).has(r)}return Fd=t,Fd}var $d,GE;function eV(){if(GE)return $d;GE=1;var e=Sl();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 $d=t,$d}var zd,KE;function vx(){if(KE)return zd;KE=1;var e=Y4(),t=Z4(),r=J4(),n=Q4(),i=eV();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,zd=o,zd}var Hd,YE;function tV(){if(YE)return Hd;YE=1;var e=_l(),t=px(),r=vx(),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 Hd=i,Hd}var Vd,XE;function Ol(){if(XE)return Vd;XE=1;var e=_l(),t=M4(),r=D4(),n=j4(),i=q4(),o=tV();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,Vd=a,Vd}var Ud,ZE;function gx(){if(ZE)return Ud;ZE=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 Ud=e,Ud}var Wd,JE;function $D(){if(JE)return Wd;JE=1;var e=Ci(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Wd=t,Wd}var Gd,QE;function Cl(){if(QE)return Gd;QE=1;var e=$D();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Gd=t,Gd}var Kd,eS;function Rl(){if(eS)return Kd;eS=1;var e=Cl(),t=Co(),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 Kd=i,Kd}var Yd,tS;function Za(){if(tS)return Yd;tS=1;var e=Rl(),t=Cl();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 Yd=r,Yd}var Xd,rS;function rV(){if(rS)return Xd;rS=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Xd=e,Xd}var Zd,nS;function on(){if(nS)return Zd;nS=1;function e(t){return t!=null&&typeof t=="object"}return Zd=e,Zd}var Jd,iS;function nV(){if(iS)return Jd;iS=1;var e=Oi(),t=on(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Jd=n,Jd}var Qd,oS;function Ja(){if(oS)return Qd;oS=1;var e=nV(),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 Qd=o,Qd}var eh,aS;function xt(){if(aS)return eh;aS=1;var e=Array.isArray;return eh=e,eh}var Ca={exports:{}},th,sS;function iV(){if(sS)return th;sS=1;function e(){return!1}return th=e,th}Ca.exports;var uS;function Io(){return uS||(uS=1,(function(e,t){var r=Hr(),n=iV(),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})(Ca,Ca.exports)),Ca.exports}var rh,lS;function Il(){if(lS)return rh;lS=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 rh=r,rh}var nh,cS;function mx(){if(cS)return nh;cS=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return nh=t,nh}var ih,fS;function oV(){if(fS)return ih;fS=1;var e=Oi(),t=mx(),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]",P="[object Uint8ClampedArray]",A="[object Uint16Array]",k="[object Uint32Array]",L={};L[w]=L[E]=L[_]=L[S]=L[R]=L[I]=L[P]=L[A]=L[k]=!0,L[n]=L[i]=L[x]=L[o]=L[b]=L[a]=L[u]=L[l]=L[d]=L[f]=L[h]=L[p]=L[v]=L[m]=L[y]=!1;function $(j){return r(j)&&t(j.length)&&!!L[e(j)]}return ih=$,ih}var oh,dS;function Pl(){if(dS)return oh;dS=1;function e(t){return function(r){return t(r)}}return oh=e,oh}var Ra={exports:{}};Ra.exports;var hS;function yx(){return hS||(hS=1,(function(e,t){var r=BD(),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})(Ra,Ra.exports)),Ra.exports}var ah,pS;function Qa(){if(pS)return ah;pS=1;var e=oV(),t=Pl(),r=yx(),n=r&&r.isTypedArray,i=n?t(n):e;return ah=i,ah}var sh,vS;function zD(){if(vS)return sh;vS=1;var e=rV(),t=Ja(),r=xt(),n=Io(),i=Il(),o=Qa(),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 sh=l,sh}var uh,gS;function Nl(){if(gS)return uh;gS=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return uh=t,uh}var lh,mS;function HD(){if(mS)return lh;mS=1;function e(t,r){return function(n){return t(r(n))}}return lh=e,lh}var ch,yS;function aV(){if(yS)return ch;yS=1;var e=HD(),t=e(Object.keys,Object);return ch=t,ch}var fh,bS;function bx(){if(bS)return fh;bS=1;var e=Nl(),t=aV(),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 fh=i,fh}var dh,xS;function En(){if(xS)return dh;xS=1;var e=Xa(),t=mx();function r(n){return n!=null&&t(n.length)&&!e(n)}return dh=r,dh}var hh,wS;function Wn(){if(wS)return hh;wS=1;var e=zD(),t=bx(),r=En();function n(i){return r(i)?e(i):t(i)}return hh=n,hh}var ph,_S;function sV(){if(_S)return ph;_S=1;var e=Za(),t=Wn();function r(n,i){return n&&e(i,t(i),n)}return ph=r,ph}var vh,ES;function uV(){if(ES)return vh;ES=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return vh=e,vh}var gh,SS;function lV(){if(SS)return gh;SS=1;var e=Cr(),t=Nl(),r=uV(),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 gh=o,gh}var mh,OS;function Ri(){if(OS)return mh;OS=1;var e=zD(),t=lV(),r=En();function n(i){return r(i)?e(i,!0):t(i)}return mh=n,mh}var yh,CS;function cV(){if(CS)return yh;CS=1;var e=Za(),t=Ri();function r(n,i){return n&&e(i,t(i),n)}return yh=r,yh}var Ia={exports:{}};Ia.exports;var RS;function VD(){return RS||(RS=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})(Ia,Ia.exports)),Ia.exports}var bh,IS;function UD(){if(IS)return bh;IS=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 bh=e,bh}var xh,PS;function WD(){if(PS)return xh;PS=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 xh=e,xh}var wh,NS;function GD(){if(NS)return wh;NS=1;function e(){return[]}return wh=e,wh}var _h,TS;function xx(){if(TS)return _h;TS=1;var e=WD(),t=GD(),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 _h=o,_h}var Eh,AS;function fV(){if(AS)return Eh;AS=1;var e=Za(),t=xx();function r(n,i){return e(n,t(n),i)}return Eh=r,Eh}var Sh,MS;function wx(){if(MS)return Sh;MS=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 Sh=e,Sh}var Oh,DS;function Tl(){if(DS)return Oh;DS=1;var e=HD(),t=e(Object.getPrototypeOf,Object);return Oh=t,Oh}var Ch,jS;function KD(){if(jS)return Ch;jS=1;var e=wx(),t=Tl(),r=xx(),n=GD(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var u=[];a;)e(u,r(a)),a=t(a);return u}:n;return Ch=o,Ch}var Rh,qS;function dV(){if(qS)return Rh;qS=1;var e=Za(),t=KD();function r(n,i){return e(n,t(n),i)}return Rh=r,Rh}var Ih,kS;function YD(){if(kS)return Ih;kS=1;var e=wx(),t=xt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return Ih=r,Ih}var Ph,LS;function XD(){if(LS)return Ph;LS=1;var e=YD(),t=xx(),r=Wn();function n(i){return e(i,r,t)}return Ph=n,Ph}var Nh,BS;function hV(){if(BS)return Nh;BS=1;var e=YD(),t=KD(),r=Ri();function n(i){return e(i,r,t)}return Nh=n,Nh}var Th,FS;function pV(){if(FS)return Th;FS=1;var e=Ci(),t=Hr(),r=e(t,"DataView");return Th=r,Th}var Ah,$S;function vV(){if($S)return Ah;$S=1;var e=Ci(),t=Hr(),r=e(t,"Promise");return Ah=r,Ah}var Mh,zS;function ZD(){if(zS)return Mh;zS=1;var e=Ci(),t=Hr(),r=e(t,"Set");return Mh=r,Mh}var Dh,HS;function gV(){if(HS)return Dh;HS=1;var e=Ci(),t=Hr(),r=e(t,"WeakMap");return Dh=r,Dh}var jh,VS;function Po(){if(VS)return jh;VS=1;var e=pV(),t=px(),r=vV(),n=ZD(),i=gV(),o=Oi(),a=FD(),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 _}),jh=w,jh}var qh,US;function mV(){if(US)return qh;US=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 qh=r,qh}var kh,WS;function JD(){if(WS)return kh;WS=1;var e=Hr(),t=e.Uint8Array;return kh=t,kh}var Lh,GS;function _x(){if(GS)return Lh;GS=1;var e=JD();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return Lh=t,Lh}var Bh,KS;function yV(){if(KS)return Bh;KS=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 Bh=t,Bh}var Fh,YS;function bV(){if(YS)return Fh;YS=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Fh=t,Fh}var $h,XS;function xV(){if(XS)return $h;XS=1;var e=Ro(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return $h=n,$h}var zh,ZS;function QD(){if(ZS)return zh;ZS=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 zh=t,zh}var Hh,JS;function wV(){if(JS)return Hh;JS=1;var e=_x(),t=yV(),r=bV(),n=xV(),i=QD(),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 P(A,k,L){var $=A.constructor;switch(k){case v:return e(A);case o:case a:return new $(+A);case m:return t(A,L);case y:case x:case b:case w:case E:case _:case S:case R:case I:return i(A,L);case u:return new $;case l:case h:return new $(A);case d:return r(A);case f:return new $;case p:return n(A)}}return Hh=P,Hh}var Vh,QS;function ej(){if(QS)return Vh;QS=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 Vh=r,Vh}var Uh,eO;function tj(){if(eO)return Uh;eO=1;var e=ej(),t=Tl(),r=Nl();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Uh=n,Uh}var Wh,tO;function _V(){if(tO)return Wh;tO=1;var e=Po(),t=on(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Wh=n,Wh}var Gh,rO;function EV(){if(rO)return Gh;rO=1;var e=_V(),t=Pl(),r=yx(),n=r&&r.isMap,i=n?t(n):e;return Gh=i,Gh}var Kh,nO;function SV(){if(nO)return Kh;nO=1;var e=Po(),t=on(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Kh=n,Kh}var Yh,iO;function OV(){if(iO)return Yh;iO=1;var e=SV(),t=Pl(),r=yx(),n=r&&r.isSet,i=n?t(n):e;return Yh=i,Yh}var Xh,oO;function rj(){if(oO)return Xh;oO=1;var e=Ol(),t=gx(),r=Rl(),n=sV(),i=cV(),o=VD(),a=UD(),u=fV(),l=dV(),d=XD(),f=hV(),h=Po(),p=mV(),v=wV(),m=tj(),y=xt(),x=Io(),b=EV(),w=Cr(),E=OV(),_=Wn(),S=Ri(),R=1,I=2,P=4,A="[object Arguments]",k="[object Array]",L="[object Boolean]",$="[object Date]",j="[object Error]",D="[object Function]",G="[object GeneratorFunction]",B="[object Map]",Y="[object Number]",Z="[object Object]",te="[object RegExp]",U="[object Set]",re="[object String]",ae="[object Symbol]",le="[object WeakMap]",F="[object ArrayBuffer]",W="[object DataView]",J="[object Float32Array]",H="[object Float64Array]",K="[object Int8Array]",se="[object Int16Array]",oe="[object Int32Array]",fe="[object Uint8Array]",V="[object Uint8ClampedArray]",ee="[object Uint16Array]",we="[object Uint32Array]",be={};be[A]=be[k]=be[F]=be[W]=be[L]=be[$]=be[J]=be[H]=be[K]=be[se]=be[oe]=be[B]=be[Y]=be[Z]=be[te]=be[U]=be[re]=be[ae]=be[fe]=be[V]=be[ee]=be[we]=!0,be[j]=be[D]=be[le]=!1;function de(ue,Ee,Pe,Ze,ze,Fe){var Ve,lt=Ee&R,ct=Ee&I,mt=Ee&P;if(Pe&&(Ve=ze?Pe(ue,Ze,ze,Fe):Pe(ue)),Ve!==void 0)return Ve;if(!w(ue))return ue;var yt=y(ue);if(yt){if(Ve=p(ue),!lt)return a(ue,Ve)}else{var rt=h(ue),bt=rt==D||rt==G;if(x(ue))return o(ue,lt);if(rt==Z||rt==A||bt&&!ze){if(Ve=ct||bt?{}:m(ue),!lt)return ct?l(ue,i(Ve,ue)):u(ue,n(Ve,ue))}else{if(!be[rt])return ze?ue:{};Ve=v(ue,rt,lt)}}Fe||(Fe=new e);var Jt=Fe.get(ue);if(Jt)return Jt;Fe.set(ue,Ve),E(ue)?ue.forEach(function(_t){Ve.add(de(_t,Ee,Pe,_t,ue,Fe))}):b(ue)&&ue.forEach(function(_t,jt){Ve.set(jt,de(_t,Ee,Pe,jt,ue,Fe))});var fr=mt?ct?f:d:ct?S:_,Dt=yt?void 0:fr(ue);return t(Dt||ue,function(_t,jt){Dt&&(jt=_t,_t=ue[jt]),r(Ve,jt,de(_t,Ee,Pe,jt,ue,Fe))}),Ve}return Xh=de,Xh}var Zh,aO;function CV(){if(aO)return Zh;aO=1;var e=rj(),t=4;function r(n){return e(n,t)}return Zh=r,Zh}var Jh,sO;function Ex(){if(sO)return Jh;sO=1;function e(t){return function(){return t}}return Jh=e,Jh}var Qh,uO;function RV(){if(uO)return Qh;uO=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 Qh=e,Qh}var ep,lO;function Sx(){if(lO)return ep;lO=1;var e=RV(),t=e();return ep=t,ep}var tp,cO;function Ox(){if(cO)return tp;cO=1;var e=Sx(),t=Wn();function r(n,i){return n&&e(n,i,t)}return tp=r,tp}var rp,fO;function IV(){if(fO)return rp;fO=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 rp=t,rp}var np,dO;function Al(){if(dO)return np;dO=1;var e=Ox(),t=IV(),r=t(e);return np=r,np}var ip,hO;function Ii(){if(hO)return ip;hO=1;function e(t){return t}return ip=e,ip}var op,pO;function nj(){if(pO)return op;pO=1;var e=Ii();function t(r){return typeof r=="function"?r:e}return op=t,op}var ap,vO;function ij(){if(vO)return ap;vO=1;var e=gx(),t=Al(),r=nj(),n=xt();function i(o,a){var u=n(o)?e:t;return u(o,r(a))}return ap=i,ap}var sp,gO;function oj(){return gO||(gO=1,sp=ij()),sp}var up,mO;function PV(){if(mO)return up;mO=1;var e=Al();function t(r,n){var i=[];return e(r,function(o,a,u){n(o,a,u)&&i.push(o)}),i}return up=t,up}var lp,yO;function NV(){if(yO)return lp;yO=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return lp=t,lp}var cp,bO;function TV(){if(bO)return cp;bO=1;function e(t){return this.__data__.has(t)}return cp=e,cp}var fp,xO;function aj(){if(xO)return fp;xO=1;var e=vx(),t=NV(),r=TV();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,fp=n,fp}var dp,wO;function AV(){if(wO)return dp;wO=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 dp=e,dp}var hp,_O;function sj(){if(_O)return hp;_O=1;function e(t,r){return t.has(r)}return hp=e,hp}var pp,EO;function uj(){if(EO)return pp;EO=1;var e=aj(),t=AV(),r=sj(),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,P){if(!r(E,P)&&(_===I||f(_,I,l,d,h)))return E.push(P)})){w=!1;break}}else if(!(_===S||f(_,S,l,d,h))){w=!1;break}}return h.delete(a),h.delete(u),w}return pp=o,pp}var vp,SO;function MV(){if(SO)return vp;SO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return vp=e,vp}var gp,OO;function Cx(){if(OO)return gp;OO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return gp=e,gp}var mp,CO;function DV(){if(CO)return mp;CO=1;var e=Ro(),t=JD(),r=Co(),n=uj(),i=MV(),o=Cx(),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,P,A,k,L,$){switch(P){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||!L(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=$.get(R);if(G)return G==I;A|=u,$.set(R,I);var B=n(j(R),j(I),A,k,L,$);return $.delete(R),B;case x:if(_)return _.call(R)==_.call(I)}return!1}return mp=S,mp}var yp,RO;function jV(){if(RO)return yp;RO=1;var e=XD(),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 P=h?l(I,R,b,a,o,f):l(R,I,b,o,a,f);if(!(P===void 0?R===I||d(R,I,u,l,f):P)){_=!1;break}S||(S=b=="constructor")}if(_&&!S){var A=o.constructor,k=a.constructor;A!=k&&"constructor"in o&&"constructor"in a&&!(typeof A=="function"&&A instanceof A&&typeof k=="function"&&k instanceof k)&&(_=!1)}return f.delete(o),f.delete(a),_}return yp=i,yp}var bp,IO;function qV(){if(IO)return bp;IO=1;var e=Ol(),t=uj(),r=DV(),n=jV(),i=Po(),o=xt(),a=Io(),u=Qa(),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),P=R?f:i(x);I=I==d?h:I,P=P==d?h:P;var A=I==h,k=P==h,L=I==P;if(L&&a(y)){if(!a(x))return!1;S=!0,A=!1}if(L&&!A)return _||(_=new e),S||u(y)?t(y,x,b,w,E,_):r(y,x,I,b,w,E,_);if(!(b&l)){var $=A&&v.call(y,"__wrapped__"),j=k&&v.call(x,"__wrapped__");if($||j){var D=$?y.value():y,G=j?x.value():x;return _||(_=new e),E(D,G,b,w,_)}}return L?(_||(_=new e),n(y,x,b,w,E,_)):!1}return bp=m,bp}var xp,PO;function lj(){if(PO)return xp;PO=1;var e=qV(),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 xp=r,xp}var wp,NO;function kV(){if(NO)return wp;NO=1;var e=Ol(),t=lj(),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 wp=i,wp}var _p,TO;function cj(){if(TO)return _p;TO=1;var e=Cr();function t(r){return r===r&&!e(r)}return _p=t,_p}var Ep,AO;function LV(){if(AO)return Ep;AO=1;var e=cj(),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 Ep=r,Ep}var Sp,MO;function fj(){if(MO)return Sp;MO=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return Sp=e,Sp}var Op,DO;function BV(){if(DO)return Op;DO=1;var e=kV(),t=LV(),r=fj();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 Op=n,Op}var Cp,jO;function No(){if(jO)return Cp;jO=1;var e=Oi(),t=on(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return Cp=n,Cp}var Rp,qO;function Rx(){if(qO)return Rp;qO=1;var e=xt(),t=No(),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 Rp=i,Rp}var Ip,kO;function FV(){if(kO)return Ip;kO=1;var e=vx(),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,Ip=r,Ip}var Pp,LO;function $V(){if(LO)return Pp;LO=1;var e=FV(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return Pp=r,Pp}var Np,BO;function zV(){if(BO)return Np;BO=1;var e=$V(),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 Np=n,Np}var Tp,FO;function Ml(){if(FO)return Tp;FO=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 Tp=e,Tp}var Ap,$O;function HV(){if($O)return Ap;$O=1;var e=Ro(),t=Ml(),r=xt(),n=No(),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 Ap=a,Ap}var Mp,zO;function dj(){if(zO)return Mp;zO=1;var e=HV();function t(r){return r==null?"":e(r)}return Mp=t,Mp}var Dp,HO;function Dl(){if(HO)return Dp;HO=1;var e=xt(),t=Rx(),r=zV(),n=dj();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Dp=i,Dp}var jp,VO;function es(){if(VO)return jp;VO=1;var e=No();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return jp=t,jp}var qp,UO;function jl(){if(UO)return qp;UO=1;var e=Dl(),t=es();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 qp=r,qp}var kp,WO;function VV(){if(WO)return kp;WO=1;var e=jl();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return kp=t,kp}var Lp,GO;function UV(){if(GO)return Lp;GO=1;function e(t,r){return t!=null&&r in Object(t)}return Lp=e,Lp}var Bp,KO;function hj(){if(KO)return Bp;KO=1;var e=Dl(),t=Ja(),r=xt(),n=Il(),i=mx(),o=es();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 Bp=a,Bp}var Fp,YO;function pj(){if(YO)return Fp;YO=1;var e=UV(),t=hj();function r(n,i){return n!=null&&t(n,i,e)}return Fp=r,Fp}var $p,XO;function WV(){if(XO)return $p;XO=1;var e=lj(),t=VV(),r=pj(),n=Rx(),i=cj(),o=fj(),a=es(),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 $p=d,$p}var zp,ZO;function vj(){if(ZO)return zp;ZO=1;function e(t){return function(r){return r==null?void 0:r[t]}}return zp=e,zp}var Hp,JO;function GV(){if(JO)return Hp;JO=1;var e=jl();function t(r){return function(n){return e(n,r)}}return Hp=t,Hp}var Vp,QO;function KV(){if(QO)return Vp;QO=1;var e=vj(),t=GV(),r=Rx(),n=es();function i(o){return r(o)?e(n(o)):t(o)}return Vp=i,Vp}var Up,eC;function Sn(){if(eC)return Up;eC=1;var e=BV(),t=WV(),r=Ii(),n=xt(),i=KV();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 Up=o,Up}var Wp,tC;function gj(){if(tC)return Wp;tC=1;var e=WD(),t=PV(),r=Sn(),n=xt();function i(o,a){var u=n(o)?e:t;return u(o,r(a,3))}return Wp=i,Wp}var Gp,rC;function YV(){if(rC)return Gp;rC=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Gp=r,Gp}var Kp,nC;function mj(){if(nC)return Kp;nC=1;var e=YV(),t=hj();function r(n,i){return n!=null&&t(n,i,e)}return Kp=r,Kp}var Yp,iC;function XV(){if(iC)return Yp;iC=1;var e=bx(),t=Po(),r=Ja(),n=xt(),i=En(),o=Io(),a=Nl(),u=Qa(),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 Yp=p,Yp}var Xp,oC;function yj(){if(oC)return Xp;oC=1;function e(t){return t===void 0}return Xp=e,Xp}var Zp,aC;function bj(){if(aC)return Zp;aC=1;var e=Al(),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 Zp=r,Zp}var Jp,sC;function xj(){if(sC)return Jp;sC=1;var e=Ml(),t=Sn(),r=bj(),n=xt();function i(o,a){var u=n(o)?e:r;return u(o,t(a,3))}return Jp=i,Jp}var Qp,uC;function ZV(){if(uC)return Qp;uC=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 Qp=e,Qp}var ev,lC;function JV(){if(lC)return ev;lC=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 ev=e,ev}var tv,cC;function wj(){if(cC)return tv;cC=1;var e=ZV(),t=Al(),r=Sn(),n=JV(),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 tv=o,tv}var rv,fC;function QV(){if(fC)return rv;fC=1;var e=Oi(),t=xt(),r=on(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return rv=i,rv}var nv,dC;function eU(){if(dC)return nv;dC=1;var e=vj(),t=e("length");return nv=t,nv}var iv,hC;function tU(){if(hC)return iv;hC=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 iv=l,iv}var ov,pC;function rU(){if(pC)return ov;pC=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 ov=_,ov}var av,vC;function nU(){if(vC)return av;vC=1;var e=eU(),t=tU(),r=rU();function n(i){return t(i)?r(i):e(i)}return av=n,av}var sv,gC;function iU(){if(gC)return sv;gC=1;var e=bx(),t=Po(),r=En(),n=QV(),i=nU(),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 sv=u,sv}var uv,mC;function oU(){if(mC)return uv;mC=1;var e=gx(),t=ej(),r=Ox(),n=Sn(),i=Tl(),o=xt(),a=Io(),u=Xa(),l=Cr(),d=Qa();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 uv=f,uv}var lv,yC;function aU(){if(yC)return lv;yC=1;var e=Ro(),t=Ja(),r=xt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return lv=i,lv}var cv,bC;function Ix(){if(bC)return cv;bC=1;var e=wx(),t=aU();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 cv=r,cv}var fv,xC;function sU(){if(xC)return fv;xC=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 fv=e,fv}var dv,wC;function _j(){if(wC)return dv;wC=1;var e=sU(),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 dv=r,dv}var hv,_C;function uU(){if(_C)return hv;_C=1;var e=Ex(),t=$D(),r=Ii(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return hv=n,hv}var pv,EC;function lU(){if(EC)return pv;EC=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 pv=n,pv}var vv,SC;function Ej(){if(SC)return vv;SC=1;var e=uU(),t=lU(),r=t(e);return vv=r,vv}var gv,OC;function ql(){if(OC)return gv;OC=1;var e=Ii(),t=_j(),r=Ej();function n(i,o){return r(t(i,o,e),i+"")}return gv=n,gv}var mv,CC;function Sj(){if(CC)return mv;CC=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 mv=e,mv}var yv,RC;function cU(){if(RC)return yv;RC=1;function e(t){return t!==t}return yv=e,yv}var bv,IC;function fU(){if(IC)return bv;IC=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 bv=e,bv}var xv,PC;function dU(){if(PC)return xv;PC=1;var e=Sj(),t=cU(),r=fU();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return xv=n,xv}var wv,NC;function hU(){if(NC)return wv;NC=1;var e=dU();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return wv=t,wv}var _v,TC;function pU(){if(TC)return _v;TC=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 _v=e,_v}var Ev,AC;function vU(){if(AC)return Ev;AC=1;function e(){}return Ev=e,Ev}var Sv,MC;function gU(){if(MC)return Sv;MC=1;var e=ZD(),t=vU(),r=Cx(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return Sv=i,Sv}var Ov,DC;function mU(){if(DC)return Ov;DC=1;var e=aj(),t=hU(),r=pU(),n=sj(),i=gU(),o=Cx(),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 Ov=u,Ov}var Cv,jC;function Oj(){if(jC)return Cv;jC=1;var e=En(),t=on();function r(n){return t(n)&&e(n)}return Cv=r,Cv}var Rv,qC;function yU(){if(qC)return Rv;qC=1;var e=Ix(),t=ql(),r=mU(),n=Oj(),i=t(function(o){return r(e(o,1,n,!0))});return Rv=i,Rv}var Iv,kC;function bU(){if(kC)return Iv;kC=1;var e=Ml();function t(r,n){return e(n,function(i){return r[i]})}return Iv=t,Iv}var Pv,LC;function Cj(){if(LC)return Pv;LC=1;var e=bU(),t=Wn();function r(n){return n==null?[]:e(n,t(n))}return Pv=r,Pv}var Nv,BC;function Rr(){if(BC)return Nv;BC=1;var e;if(typeof hx=="function")try{e={clone:CV(),constant:Ex(),each:oj(),filter:gj(),has:mj(),isArray:xt(),isEmpty:XV(),isFunction:Xa(),isUndefined:yj(),keys:Wn(),map:xj(),reduce:wj(),size:iU(),transform:oU(),union:yU(),values:Cj()}}catch{}return e||(e=window._),Nv=e,Nv}var Tv,FC;function Px(){if(FC)return Tv;FC=1;var e=Rr();Tv=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 Tv}var Av,$C;function xU(){return $C||($C=1,Av="2.1.8"),Av}var Mv,zC;function wU(){return zC||(zC=1,Mv={Graph:Px(),version:xU()}),Mv}var Dv,HC;function _U(){if(HC)return Dv;HC=1;var e=Rr(),t=Px();Dv={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 Dv}var jv,VC;function EU(){if(VC)return jv;VC=1;var e=Rr();jv=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 jv}var qv,UC;function Rj(){if(UC)return qv;UC=1;var e=Rr();qv=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},qv}var kv,WC;function Ij(){if(WC)return kv;WC=1;var e=Rr(),t=Rj();kv=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 kv}var Lv,GC;function SU(){if(GC)return Lv;GC=1;var e=Ij(),t=Rr();Lv=r;function r(n,i,o){return t.transform(n.nodes(),function(a,u){a[u]=e(n,u,i,o)},{})}return Lv}var Bv,KC;function Pj(){if(KC)return Bv;KC=1;var e=Rr();Bv=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 Bv}var Fv,YC;function OU(){if(YC)return Fv;YC=1;var e=Rr(),t=Pj();Fv=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 Fv}var $v,XC;function CU(){if(XC)return $v;XC=1;var e=Rr();$v=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 $v}var zv,ZC;function Nj(){if(ZC)return zv;ZC=1;var e=Rr();zv=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,zv}var Hv,JC;function RU(){if(JC)return Hv;JC=1;var e=Nj();Hv=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Hv}var Vv,QC;function Tj(){if(QC)return Vv;QC=1;var e=Rr();Vv=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 Vv}var Uv,eR;function IU(){if(eR)return Uv;eR=1;var e=Tj();Uv=t;function t(r,n){return e(r,n,"post")}return Uv}var Wv,tR;function PU(){if(tR)return Wv;tR=1;var e=Tj();Wv=t;function t(r,n){return e(r,n,"pre")}return Wv}var Gv,rR;function NU(){if(rR)return Gv;rR=1;var e=Rr(),t=Px(),r=Rj();Gv=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 Gv}var Kv,nR;function TU(){return nR||(nR=1,Kv={components:EU(),dijkstra:Ij(),dijkstraAll:SU(),findCycles:OU(),floydWarshall:CU(),isAcyclic:RU(),postorder:IU(),preorder:PU(),prim:NU(),tarjan:Pj(),topsort:Nj()}),Kv}var Yv,iR;function AU(){if(iR)return Yv;iR=1;var e=wU();return Yv={Graph:e.Graph,json:_U(),alg:TU(),version:e.version},Yv}var Xv,oR;function Fr(){if(oR)return Xv;oR=1;var e;if(typeof hx=="function")try{e=AU()}catch{}return e||(e=window.graphlib),Xv=e,Xv}var Zv,aR;function MU(){if(aR)return Zv;aR=1;var e=rj(),t=1,r=4;function n(i){return e(i,t|r)}return Zv=n,Zv}var Jv,sR;function kl(){if(sR)return Jv;sR=1;var e=Co(),t=En(),r=Il(),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 Jv=i,Jv}var Qv,uR;function DU(){if(uR)return Qv;uR=1;var e=ql(),t=Co(),r=kl(),n=Ri(),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 Qv=a,Qv}var eg,lR;function jU(){if(lR)return eg;lR=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 eg=n,eg}var tg,cR;function qU(){if(cR)return tg;cR=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return tg=t,tg}var rg,fR;function kU(){if(fR)return rg;fR=1;var e=qU(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return rg=r,rg}var ng,dR;function LU(){if(dR)return ng;dR=1;var e=kU(),t=Cr(),r=No(),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 ng=l,ng}var ig,hR;function Aj(){if(hR)return ig;hR=1;var e=LU(),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 ig=n,ig}var og,pR;function BU(){if(pR)return og;pR=1;var e=Aj();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return og=t,og}var ag,vR;function FU(){if(vR)return ag;vR=1;var e=Sj(),t=Sn(),r=BU(),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 ag=i,ag}var sg,gR;function $U(){if(gR)return sg;gR=1;var e=jU(),t=FU(),r=e(t);return sg=r,sg}var ug,mR;function Mj(){if(mR)return ug;mR=1;var e=Ix();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return ug=t,ug}var lg,yR;function zU(){if(yR)return lg;yR=1;var e=Sx(),t=nj(),r=Ri();function n(i,o){return i==null?i:e(i,t(o),r)}return lg=n,lg}var cg,bR;function HU(){if(bR)return cg;bR=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return cg=e,cg}var fg,xR;function VU(){if(xR)return fg;xR=1;var e=Cl(),t=Ox(),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 fg=n,fg}var dg,wR;function Nx(){if(wR)return dg;wR=1;var e=No();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 dg=t,dg}var hg,_R;function UU(){if(_R)return hg;_R=1;function e(t,r){return t>r}return hg=e,hg}var pg,ER;function WU(){if(ER)return pg;ER=1;var e=Nx(),t=UU(),r=Ii();function n(i){return i&&i.length?e(i,r,t):void 0}return pg=n,pg}var vg,SR;function Dj(){if(SR)return vg;SR=1;var e=Cl(),t=Co();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return vg=r,vg}var gg,OR;function GU(){if(OR)return gg;OR=1;var e=Oi(),t=Tl(),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 gg=d,gg}var mg,CR;function jj(){if(CR)return mg;CR=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return mg=e,mg}var yg,RR;function KU(){if(RR)return yg;RR=1;var e=Za(),t=Ri();function r(n){return e(n,t(n))}return yg=r,yg}var bg,IR;function YU(){if(IR)return bg;IR=1;var e=Dj(),t=VD(),r=QD(),n=UD(),i=tj(),o=Ja(),a=xt(),u=Oj(),l=Io(),d=Xa(),f=Cr(),h=GU(),p=Qa(),v=jj(),m=KU();function y(x,b,w,E,_,S,R){var I=v(x,w),P=v(b,w),A=R.get(P);if(A){e(x,w,A);return}var k=S?S(I,P,w+"",x,b,R):void 0,L=k===void 0;if(L){var $=a(P),j=!$&&l(P),D=!$&&!j&&p(P);k=P,$||j||D?a(I)?k=I:u(I)?k=n(I):j?(L=!1,k=t(P,!0)):D?(L=!1,k=r(P,!0)):k=[]:h(P)||o(P)?(k=I,o(I)?k=m(I):(!f(I)||d(I))&&(k=i(P))):L=!1}L&&(R.set(P,k),_(k,P,E,S,R),R.delete(P)),e(x,w,k)}return bg=y,bg}var xg,PR;function XU(){if(PR)return xg;PR=1;var e=Ol(),t=Dj(),r=Sx(),n=YU(),i=Cr(),o=Ri(),a=jj();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 xg=u,xg}var wg,NR;function ZU(){if(NR)return wg;NR=1;var e=ql(),t=kl();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 wg=r,wg}var _g,TR;function JU(){if(TR)return _g;TR=1;var e=XU(),t=ZU(),r=t(function(n,i,o){e(n,i,o)});return _g=r,_g}var Eg,AR;function qj(){if(AR)return Eg;AR=1;function e(t,r){return t<r}return Eg=e,Eg}var Sg,MR;function QU(){if(MR)return Sg;MR=1;var e=Nx(),t=qj(),r=Ii();function n(i){return i&&i.length?e(i,r,t):void 0}return Sg=n,Sg}var Og,DR;function eW(){if(DR)return Og;DR=1;var e=Nx(),t=Sn(),r=qj();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return Og=n,Og}var Cg,jR;function tW(){if(jR)return Cg;jR=1;var e=Hr(),t=function(){return e.Date.now()};return Cg=t,Cg}var Rg,qR;function rW(){if(qR)return Rg;qR=1;var e=Rl(),t=Dl(),r=Il(),n=Cr(),i=es();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 Rg=o,Rg}var Ig,kR;function nW(){if(kR)return Ig;kR=1;var e=jl(),t=rW(),r=Dl();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 Ig=n,Ig}var Pg,LR;function iW(){if(LR)return Pg;LR=1;var e=nW(),t=pj();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return Pg=r,Pg}var Ng,BR;function oW(){if(BR)return Ng;BR=1;var e=Mj(),t=_j(),r=Ej();function n(i){return r(t(i,void 0,e),i+"")}return Ng=n,Ng}var Tg,FR;function aW(){if(FR)return Tg;FR=1;var e=iW(),t=oW(),r=t(function(n,i){return n==null?{}:e(n,i)});return Tg=r,Tg}var Ag,$R;function sW(){if($R)return Ag;$R=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 Ag=r,Ag}var Mg,zR;function uW(){if(zR)return Mg;zR=1;var e=sW(),t=kl(),r=Aj();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 Mg=n,Mg}var Dg,HR;function lW(){if(HR)return Dg;HR=1;var e=uW(),t=e();return Dg=t,Dg}var jg,VR;function cW(){if(VR)return jg;VR=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return jg=e,jg}var qg,UR;function fW(){if(UR)return qg;UR=1;var e=No();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 qg=t,qg}var kg,WR;function dW(){if(WR)return kg;WR=1;var e=fW();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 kg=t,kg}var Lg,GR;function hW(){if(GR)return Lg;GR=1;var e=Ml(),t=jl(),r=Sn(),n=bj(),i=cW(),o=Pl(),a=dW(),u=Ii(),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 Lg=d,Lg}var Bg,KR;function pW(){if(KR)return Bg;KR=1;var e=Ix(),t=hW(),r=ql(),n=kl(),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 Bg=i,Bg}var Fg,YR;function vW(){if(YR)return Fg;YR=1;var e=dj(),t=0;function r(n){var i=++t;return e(n)+i}return Fg=r,Fg}var $g,XR;function gW(){if(XR)return $g;XR=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 $g=e,$g}var zg,ZR;function mW(){if(ZR)return zg;ZR=1;var e=Rl(),t=gW();function r(n,i){return t(n||[],i||[],e)}return zg=r,zg}var Hg,JR;function ut(){if(JR)return Hg;JR=1;var e;if(typeof hx=="function")try{e={cloneDeep:MU(),constant:Ex(),defaults:DU(),each:oj(),filter:gj(),find:$U(),flatten:Mj(),forEach:ij(),forIn:zU(),has:mj(),isUndefined:yj(),last:HU(),map:xj(),mapValues:VU(),max:WU(),merge:JU(),min:QU(),minBy:eW(),now:tW(),pick:aW(),range:lW(),reduce:wj(),sortBy:pW(),uniqueId:vW(),values:Cj(),zipObject:mW()}}catch{}return e||(e=window._),Hg=e,Hg}var Vg,QR;function yW(){if(QR)return Vg;QR=1,Vg=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 Vg}var Ug,eI;function bW(){if(eI)return Ug;eI=1;var e=ut(),t=Fr().Graph,r=yW();Ug=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 Ug}var Wg,tI;function xW(){if(tI)return Wg;tI=1;var e=ut(),t=bW();Wg={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 Wg}var Gg,rI;function Yt(){if(rI)return Gg;rI=1;var e=ut(),t=Fr().Graph;Gg={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 P,A;return Math.abs(S)*R>Math.abs(_)*I?(S<0&&(I=-I),P=I*_/S,A=I):(_<0&&(R=-R),P=R,A=R*S/_),{x:w+P,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 Gg}var Kg,nI;function wW(){if(nI)return Kg;nI=1;var e=ut(),t=Yt();Kg={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 Kg}var Yg,iI;function zu(){if(iI)return Yg;iI=1;var e=ut();Yg={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 Yg}var Xg,oI;function kj(){if(oI)return Xg;oI=1;var e=ut(),t=Fr().Graph,r=zu().slack;Xg=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 Xg}var Zg,aI;function _W(){if(aI)return Zg;aI=1;var e=ut(),t=kj(),r=zu().slack,n=zu().longestPath,i=Fr().alg.preorder,o=Fr().alg.postorder,a=Yt().simplify;Zg=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,P=!0,A=_.edge(S,I),k=0;return A||(P=!1,A=_.edge(I,S)),k=A.weight,e.forEach(_.nodeEdges(S),function(L){var $=L.v===S,j=$?L.w:L.v;if(j!==I){var D=$===P,G=_.edge(L).weight;if(k+=D?G:-G,b(E,S,j)){var B=E.edge(S,j).cutvalue;k+=D?-B:B}}}),k}function h(E,_){arguments.length<2&&(_=E.nodes()[0]),p(E,{},1,_)}function p(E,_,S,R,I){var P=S,A=E.node(R);return _[R]=!0,e.forEach(E.neighbors(R),function(k){e.has(_,k)||(S=p(E,_,S,k,R))}),A.low=P,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 P=E.node(R),A=E.node(I),k=P,L=!1;P.lim>A.lim&&(k=A,L=!0);var $=e.filter(_.edges(),function(j){return L===w(E,E.node(j.v),k)&&L!==w(E,E.node(j.w),k)});return e.minBy($,function(j){return r(_,j)})}function y(E,_,S,R){var I=S.v,P=S.w;E.removeEdge(I,P),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 P=E.node(I).parent,A=_.edge(I,P),k=!1;A||(A=_.edge(P,I),k=!0),_.node(I).rank=_.node(P).rank+(k?A.minlen:-A.minlen)})}function b(E,_,S){return E.hasEdge(_,S)}function w(E,_,S){return S.low<=_.lim&&_.lim<=S.lim}return Zg}var Jg,sI;function EW(){if(sI)return Jg;sI=1;var e=zu(),t=e.longestPath,r=kj(),n=_W();Jg=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 Jg}var Qg,uI;function SW(){if(uI)return Qg;uI=1;var e=ut();Qg=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 Qg}var em,lI;function OW(){if(lI)return em;lI=1;var e=ut(),t=Yt();em={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 em}var tm,cI;function CW(){if(cI)return tm;cI=1;var e=ut(),t=Yt();tm=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 tm}var rm,fI;function RW(){if(fI)return rm;fI=1;var e=ut();rm={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 rm}var nm,dI;function IW(){if(dI)return nm;dI=1;var e=ut();nm=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 nm}var im,hI;function PW(){if(hI)return im;hI=1;var e=ut();im=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 im}var om,pI;function NW(){if(pI)return om;pI=1;var e=ut();om=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 om}var am,vI;function TW(){if(vI)return am;vI=1;var e=ut();am=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 am}var sm,gI;function AW(){if(gI)return sm;gI=1;var e=ut(),t=Yt();sm=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 sm}var um,mI;function MW(){if(mI)return um;mI=1;var e=ut(),t=NW(),r=TW(),n=AW();um=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 um}var lm,yI;function DW(){if(yI)return lm;yI=1;var e=ut(),t=Fr().Graph;lm=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 lm}var cm,bI;function jW(){if(bI)return cm;bI=1;var e=ut();cm=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 cm}var fm,xI;function qW(){if(xI)return fm;xI=1;var e=ut(),t=IW(),r=PW(),n=MW(),i=DW(),o=jW(),a=Fr().Graph,u=Yt();fm=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 fm}var dm,wI;function kW(){if(wI)return dm;wI=1;var e=ut(),t=Fr().Graph,r=Yt();dm={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,P=0,A=S.length,k=e.last(R);return e.forEach(R,function(L,$){var j=o(b,L),D=j?b.node(j).order:A;(j||L===k)&&(e.forEach(R.slice(P,$+1),function(G){e.forEach(b.predecessors(G),function(B){var Y=b.node(B),Z=Y.order;(Z<I||D<Z)&&!(Y.dummy&&b.node(G).dummy)&&a(E,B,G)})}),P=$+1,I=D)}),R}return e.reduce(w,_),E}function i(b,w){var E={};function _(R,I,P,A,k){var L;e.forEach(e.range(I,P),function($){L=R[$],b.node(L).dummy&&e.forEach(b.predecessors(L),function(j){var D=b.node(j);D.dummy&&(D.order<A||D.order>k)&&a(E,j,L)})})}function S(R,I){var P=-1,A,k=0;return e.forEach(I,function(L,$){if(b.node(L).dummy==="border"){var j=b.predecessors(L);j.length&&(A=b.node(j[0]).order,_(I,k,$,P,A),k=$,P=A)}_(I,k,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(P){e.forEach(P,function(A,k){S[A]=A,R[A]=A,I[A]=k})}),e.forEach(w,function(P){var A=-1;e.forEach(P,function(k){var L=_(k);if(L.length){L=e.sortBy(L,function(B){return I[B]});for(var $=(L.length-1)/2,j=Math.floor($),D=Math.ceil($);j<=D;++j){var G=L[j];R[k]===k&&A<I[G]&&!u(E,k,G)&&(R[G]=k,R[k]=S[k]=S[G],A=I[G])}}})}),{root:S,align:R}}function d(b,w,E,_,S){var R={},I=f(b,w,E,S),P=S?"borderLeft":"borderRight";function A($,j){for(var D=I.nodes(),G=D.pop(),B={};G;)B[G]?$(G):(B[G]=!0,D.push(G),D=D.concat(j(G))),G=D.pop()}function k($){R[$]=I.inEdges($).reduce(function(j,D){return Math.max(j,R[D.v]+I.edge(D))},0)}function L($){var j=I.outEdges($).reduce(function(G,B){return Math.min(G,R[B.w]-I.edge(B))},Number.POSITIVE_INFINITY),D=b.node($);j!==Number.POSITIVE_INFINITY&&D.borderType!==P&&(R[$]=Math.max(R[$],j))}return A(k,I.predecessors.bind(I)),A(L,I.successors.bind(I)),e.forEach(_,function($){R[$]=R[E[$]]}),R}function f(b,w,E,_){var S=new t,R=b.graph(),I=y(R.nodesep,R.edgesep,_);return e.forEach(w,function(P){var A;e.forEach(P,function(k){var L=E[k];if(S.setNode(L),A){var $=E[A],j=S.edge($,L);S.setEdge($,L,Math.max(I(b,k,A),j||0))}A=k})}),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 P=x(b,I)/2;_=Math.max(R+P,_),S=Math.min(R-P,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 P=R+I,A=b[P],k;if(A!==w){var L=e.values(A);k=I==="l"?_-e.min(L):S-e.max(L),k&&(b[P]=e.mapValues(A,function($){return $+k}))}})})}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(P){P==="r"&&(S=e.map(S,function($){return e.values($).reverse()}));var A=(I==="u"?b.predecessors:b.successors).bind(b),k=l(b,S,E,A),L=d(b,S,k.root,k.align,P==="r");P==="r"&&(L=e.mapValues(L,function($){return-$})),_[I+P]=L})});var R=h(b,_);return p(_,R),v(_,b.graph().align)}function y(b,w,E){return function(_,S,R){var I=_.node(S),P=_.node(R),A=0,k;if(A+=I.width/2,e.has(I,"labelpos"))switch(I.labelpos.toLowerCase()){case"l":k=-I.width/2;break;case"r":k=I.width/2;break}if(k&&(A+=E?k:-k),k=0,A+=(I.dummy?w:b)/2,A+=(P.dummy?w:b)/2,A+=P.width/2,e.has(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":k=P.width/2;break;case"r":k=-P.width/2;break}return k&&(A+=E?k:-k),k=0,A}}function x(b,w){return b.node(w).width}return dm}var hm,_I;function LW(){if(_I)return hm;_I=1;var e=ut(),t=Yt(),r=kW().positionX;hm=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 hm}var pm,EI;function BW(){if(EI)return pm;EI=1;var e=ut(),t=xW(),r=wW(),n=EW(),i=Yt().normalizeRanks,o=SW(),a=Yt().removeEmptyRanks,u=OW(),l=CW(),d=RW(),f=qW(),h=LW(),p=Yt(),v=Fr().Graph;pm=m;function m(F,W){var J=W&&W.debugTiming?p.time:p.notime;J("layout",function(){var H=J(" buildLayoutGraph",function(){return A(F)});J(" runLayout",function(){y(H,J)}),J(" updateInputGraph",function(){x(F,H)})})}function y(F,W){W(" makeSpaceForEdgeLabels",function(){k(F)}),W(" removeSelfEdges",function(){te(F)}),W(" acyclic",function(){t.run(F)}),W(" nestingGraph.run",function(){u.run(F)}),W(" rank",function(){n(p.asNonCompoundGraph(F))}),W(" injectEdgeLabelProxies",function(){L(F)}),W(" removeEmptyRanks",function(){a(F)}),W(" nestingGraph.cleanup",function(){u.cleanup(F)}),W(" normalizeRanks",function(){i(F)}),W(" assignRankMinMax",function(){$(F)}),W(" removeEdgeLabelProxies",function(){j(F)}),W(" normalize.run",function(){r.run(F)}),W(" parentDummyChains",function(){o(F)}),W(" addBorderSegments",function(){l(F)}),W(" order",function(){f(F)}),W(" insertSelfEdges",function(){U(F)}),W(" adjustCoordinateSystem",function(){d.adjust(F)}),W(" position",function(){h(F)}),W(" positionSelfEdges",function(){re(F)}),W(" removeBorderNodes",function(){Z(F)}),W(" normalize.undo",function(){r.undo(F)}),W(" fixupEdgeLabelCoords",function(){B(F)}),W(" undoCoordinateSystem",function(){d.undo(F)}),W(" translateGraph",function(){D(F)}),W(" assignNodeIntersects",function(){G(F)}),W(" reversePoints",function(){Y(F)}),W(" acyclic.undo",function(){t.undo(F)})}function x(F,W){e.forEach(F.nodes(),function(J){var H=F.node(J),K=W.node(J);H&&(H.x=K.x,H.y=K.y,W.children(J).length&&(H.width=K.width,H.height=K.height))}),e.forEach(F.edges(),function(J){var H=F.edge(J),K=W.edge(J);H.points=K.points,e.has(K,"x")&&(H.x=K.x,H.y=K.y)}),F.graph().width=W.graph().width,F.graph().height=W.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"},P=["labelpos"];function A(F){var W=new v({multigraph:!0,compound:!0}),J=le(F.graph());return W.setGraph(e.merge({},w,ae(J,b),e.pick(J,E))),e.forEach(F.nodes(),function(H){var K=le(F.node(H));W.setNode(H,e.defaults(ae(K,_),S)),W.setParent(H,F.parent(H))}),e.forEach(F.edges(),function(H){var K=le(F.edge(H));W.setEdge(H,e.merge({},I,ae(K,R),e.pick(K,P)))}),W}function k(F){var W=F.graph();W.ranksep/=2,e.forEach(F.edges(),function(J){var H=F.edge(J);H.minlen*=2,H.labelpos.toLowerCase()!=="c"&&(W.rankdir==="TB"||W.rankdir==="BT"?H.width+=H.labeloffset:H.height+=H.labeloffset)})}function L(F){e.forEach(F.edges(),function(W){var J=F.edge(W);if(J.width&&J.height){var H=F.node(W.v),K=F.node(W.w),se={rank:(K.rank-H.rank)/2+H.rank,e:W};p.addDummyNode(F,"edge-proxy",se,"_ep")}})}function $(F){var W=0;e.forEach(F.nodes(),function(J){var H=F.node(J);H.borderTop&&(H.minRank=F.node(H.borderTop).rank,H.maxRank=F.node(H.borderBottom).rank,W=e.max(W,H.maxRank))}),F.graph().maxRank=W}function j(F){e.forEach(F.nodes(),function(W){var J=F.node(W);J.dummy==="edge-proxy"&&(F.edge(J.e).labelRank=J.rank,F.removeNode(W))})}function D(F){var W=Number.POSITIVE_INFINITY,J=0,H=Number.POSITIVE_INFINITY,K=0,se=F.graph(),oe=se.marginx||0,fe=se.marginy||0;function V(ee){var we=ee.x,be=ee.y,de=ee.width,ue=ee.height;W=Math.min(W,we-de/2),J=Math.max(J,we+de/2),H=Math.min(H,be-ue/2),K=Math.max(K,be+ue/2)}e.forEach(F.nodes(),function(ee){V(F.node(ee))}),e.forEach(F.edges(),function(ee){var we=F.edge(ee);e.has(we,"x")&&V(we)}),W-=oe,H-=fe,e.forEach(F.nodes(),function(ee){var we=F.node(ee);we.x-=W,we.y-=H}),e.forEach(F.edges(),function(ee){var we=F.edge(ee);e.forEach(we.points,function(be){be.x-=W,be.y-=H}),e.has(we,"x")&&(we.x-=W),e.has(we,"y")&&(we.y-=H)}),se.width=J-W+oe,se.height=K-H+fe}function G(F){e.forEach(F.edges(),function(W){var J=F.edge(W),H=F.node(W.v),K=F.node(W.w),se,oe;J.points?(se=J.points[0],oe=J.points[J.points.length-1]):(J.points=[],se=K,oe=H),J.points.unshift(p.intersectRect(H,se)),J.points.push(p.intersectRect(K,oe))})}function B(F){e.forEach(F.edges(),function(W){var J=F.edge(W);if(e.has(J,"x"))switch((J.labelpos==="l"||J.labelpos==="r")&&(J.width-=J.labeloffset),J.labelpos){case"l":J.x-=J.width/2+J.labeloffset;break;case"r":J.x+=J.width/2+J.labeloffset;break}})}function Y(F){e.forEach(F.edges(),function(W){var J=F.edge(W);J.reversed&&J.points.reverse()})}function Z(F){e.forEach(F.nodes(),function(W){if(F.children(W).length){var J=F.node(W),H=F.node(J.borderTop),K=F.node(J.borderBottom),se=F.node(e.last(J.borderLeft)),oe=F.node(e.last(J.borderRight));J.width=Math.abs(oe.x-se.x),J.height=Math.abs(K.y-H.y),J.x=se.x+J.width/2,J.y=H.y+J.height/2}}),e.forEach(F.nodes(),function(W){F.node(W).dummy==="border"&&F.removeNode(W)})}function te(F){e.forEach(F.edges(),function(W){if(W.v===W.w){var J=F.node(W.v);J.selfEdges||(J.selfEdges=[]),J.selfEdges.push({e:W,label:F.edge(W)}),F.removeEdge(W)}})}function U(F){var W=p.buildLayerMatrix(F);e.forEach(W,function(J){var H=0;e.forEach(J,function(K,se){var oe=F.node(K);oe.order=se+H,e.forEach(oe.selfEdges,function(fe){p.addDummyNode(F,"selfedge",{width:fe.label.width,height:fe.label.height,rank:oe.rank,order:se+ ++H,e:fe.e,label:fe.label},"_se")}),delete oe.selfEdges})})}function re(F){e.forEach(F.nodes(),function(W){var J=F.node(W);if(J.dummy==="selfedge"){var H=F.node(J.e.v),K=H.x+H.width/2,se=H.y,oe=J.x-K,fe=H.height/2;F.setEdge(J.e,J.label),F.removeNode(W),J.label.points=[{x:K+2*oe/3,y:se-fe},{x:K+5*oe/6,y:se-fe},{x:K+oe,y:se},{x:K+5*oe/6,y:se+fe},{x:K+2*oe/3,y:se+fe}],J.label.x=J.x,J.label.y=J.y}})}function ae(F,W){return e.mapValues(e.pick(F,W),Number)}function le(F){var W={};return e.forEach(F,function(J,H){W[H.toLowerCase()]=J}),W}return pm}var vm,SI;function FW(){if(SI)return vm;SI=1;var e=ut(),t=Yt(),r=Fr().Graph;vm={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 vm}var gm,OI;function $W(){return OI||(OI=1,gm="0.8.5"),gm}var mm,CI;function zW(){return CI||(CI=1,mm={graphlib:Fr(),layout:BW(),debug:FW(),util:{time:Yt().time,notime:Yt().notime},version:$W()}),mm}var HW=zW();const RI=Vn(HW);function VW(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 UW=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),II=UW?T.useEffect:T.useLayoutEffect;function WW(e){const t=typeof e=="function"?VW(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)),II(()=>{v&&(h.current=p),u.current=a,l.current=n,d.current=i,f.current=!1});const m=T.useRef(a);II(()=>{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 GW(){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 KW={value:()=>{}};function Ll(){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 Au(r)}function Au(e){this._=e}function YW(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}})}Au.prototype=Ll.prototype={constructor:Au,on:function(e,t){var r=this._,n=YW(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=XW(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]=PI(r[i],e.name,t);else if(t==null)for(i in r)r[i]=PI(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 Au(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 XW(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function PI(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=KW,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Db="http://www.w3.org/1999/xhtml";const NI={svg:"http://www.w3.org/2000/svg",xhtml:Db,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Bl(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),NI.hasOwnProperty(t)?{space:NI[t],local:e}:e}function ZW(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Db&&t.documentElement.namespaceURI===Db?t.createElement(e):t.createElementNS(r,e)}}function JW(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Lj(e){var t=Bl(e);return(t.local?JW:ZW)(t)}function QW(){}function Tx(e){return e==null?QW:function(){return this.querySelector(e)}}function e6(e){typeof e!="function"&&(e=Tx(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 lr(n,this._parents)}function t6(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function r6(){return[]}function Bj(e){return e==null?r6:function(){return this.querySelectorAll(e)}}function n6(e){return function(){return t6(e.apply(this,arguments))}}function i6(e){typeof e=="function"?e=n6(e):e=Bj(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 lr(n,i)}function Fj(e){return function(){return this.matches(e)}}function $j(e){return function(t){return t.matches(e)}}var o6=Array.prototype.find;function a6(e){return function(){return o6.call(this.children,e)}}function s6(){return this.firstElementChild}function u6(e){return this.select(e==null?s6:a6(typeof e=="function"?e:$j(e)))}var l6=Array.prototype.filter;function c6(){return Array.from(this.children)}function f6(e){return function(){return l6.call(this.children,e)}}function d6(e){return this.selectAll(e==null?c6:f6(typeof e=="function"?e:$j(e)))}function h6(e){typeof e!="function"&&(e=Fj(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 lr(n,this._parents)}function zj(e){return new Array(e.length)}function p6(){return new lr(this._enter||this._groups.map(zj),this._parents)}function Hu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Hu.prototype={constructor:Hu,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 v6(e){return function(){return e}}function g6(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 Hu(e,o[a]);for(;a<l;++a)(u=t[a])&&(i[a]=u)}function m6(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 Hu(e,o[u]);for(u=0;u<f;++u)(l=t[u])&&d.get(p[u])===l&&(i[u]=l)}function y6(e){return e.__data__}function b6(e,t){if(!arguments.length)return Array.from(this,y6);var r=t?m6:g6,n=this._parents,i=this._groups;typeof e!="function"&&(e=v6(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=x6(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 lr(a,n),a._enter=u,a._exit=l,a}function x6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function w6(){return new lr(this._exit||this._groups.map(zj),this._parents)}function _6(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 E6(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 lr(u,this._parents)}function S6(){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 O6(e){e||(e=C6);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 lr(i,this._parents).order()}function C6(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function R6(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function I6(){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 N6(){let e=0;for(const t of this)++e;return e}function T6(){return!this.node()}function A6(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 M6(e){return function(){this.removeAttribute(e)}}function D6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function j6(e,t){return function(){this.setAttribute(e,t)}}function q6(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function k6(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function L6(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 B6(e,t){var r=Bl(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?D6:M6:typeof t=="function"?r.local?L6:k6:r.local?q6:j6)(r,t))}function Hj(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function F6(e){return function(){this.style.removeProperty(e)}}function $6(e,t,r){return function(){this.style.setProperty(e,t,r)}}function z6(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function H6(e,t,r){return arguments.length>1?this.each((t==null?F6:typeof t=="function"?z6:$6)(e,t,r??"")):_o(this.node(),e)}function _o(e,t){return e.style.getPropertyValue(t)||Hj(e).getComputedStyle(e,null).getPropertyValue(t)}function V6(e){return function(){delete this[e]}}function U6(e,t){return function(){this[e]=t}}function W6(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function G6(e,t){return arguments.length>1?this.each((t==null?V6:typeof t=="function"?W6:U6)(e,t)):this.node()[e]}function Vj(e){return e.trim().split(/^|\s+/)}function Ax(e){return e.classList||new Uj(e)}function Uj(e){this._node=e,this._names=Vj(e.getAttribute("class")||"")}Uj.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 Wj(e,t){for(var r=Ax(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Gj(e,t){for(var r=Ax(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function K6(e){return function(){Wj(this,e)}}function Y6(e){return function(){Gj(this,e)}}function X6(e,t){return function(){(t.apply(this,arguments)?Wj:Gj)(this,e)}}function Z6(e,t){var r=Vj(e+"");if(arguments.length<2){for(var n=Ax(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?X6:t?K6:Y6)(r,t))}function J6(){this.textContent=""}function Q6(e){return function(){this.textContent=e}}function e8(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function t8(e){return arguments.length?this.each(e==null?J6:(typeof e=="function"?e8:Q6)(e)):this.node().textContent}function r8(){this.innerHTML=""}function n8(e){return function(){this.innerHTML=e}}function i8(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function o8(e){return arguments.length?this.each(e==null?r8:(typeof e=="function"?i8:n8)(e)):this.node().innerHTML}function a8(){this.nextSibling&&this.parentNode.appendChild(this)}function s8(){return this.each(a8)}function u8(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function l8(){return this.each(u8)}function c8(e){var t=typeof e=="function"?e:Lj(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function f8(){return null}function d8(e,t){var r=typeof e=="function"?e:Lj(e),n=t==null?f8:typeof t=="function"?t:Tx(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function h8(){var e=this.parentNode;e&&e.removeChild(this)}function p8(){return this.each(h8)}function v8(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function g8(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function m8(e){return this.select(e?g8:v8)}function y8(e){return arguments.length?this.property("__data__",e):this.node().__data__}function b8(e){return function(t){e.call(this,t,this.__data__)}}function x8(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 w8(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 _8(e,t,r){return function(){var n=this.__on,i,o=b8(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 E8(e,t,r){var n=x8(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?_8:w8,i=0;i<o;++i)this.each(u(n[i],t,r));return this}function Kj(e,t,r){var n=Hj(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 S8(e,t){return function(){return Kj(this,e,t)}}function O8(e,t){return function(){return Kj(this,e,t.apply(this,arguments))}}function C8(e,t){return this.each((typeof t=="function"?O8:S8)(e,t))}function*R8(){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 Yj=[null];function lr(e,t){this._groups=e,this._parents=t}function ts(){return new lr([[document.documentElement]],Yj)}function I8(){return this}lr.prototype=ts.prototype={constructor:lr,select:e6,selectAll:i6,selectChild:u6,selectChildren:d6,filter:h6,data:b6,enter:p6,exit:w6,join:_6,merge:E6,selection:I8,order:S6,sort:O6,call:R6,nodes:I6,node:P6,size:N6,empty:T6,each:A6,attr:B6,style:H6,property:G6,classed:Z6,text:t8,html:o8,raise:s8,lower:l8,append:c8,insert:d8,remove:p8,clone:m8,datum:y8,on:E8,dispatch:C8,[Symbol.iterator]:R8};function qr(e){return typeof e=="string"?new lr([[document.querySelector(e)]],[document.documentElement]):new lr([[e]],Yj)}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 N8={passive:!1},Fa={capture:!0,passive:!1};function ym(e){e.stopImmediatePropagation()}function co(e){e.preventDefault(),e.stopImmediatePropagation()}function Xj(e){var t=e.document.documentElement,r=qr(e).on("dragstart.drag",co,Fa);"onselectstart"in t?r.on("selectstart.drag",co,Fa):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Zj(e,t){var r=e.document.documentElement,n=qr(e).on("dragstart.drag",null);t&&(n.on("click.drag",co,Fa),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 su=e=>()=>e;function jb(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}})}jb.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function T8(e){return!e.ctrlKey&&!e.button}function A8(){return this.parentNode}function M8(e,t){return t??{x:e.x,y:e.y}}function D8(){return navigator.maxTouchPoints||"ontouchstart"in this}function j8(){var e=T8,t=A8,r=M8,n=D8,i={},o=Ll("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,N8).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,Fa).on("mouseup.drag",y,Fa),Xj(_.view),ym(_),d=!1,u=_.clientX,l=_.clientY,R("start",_))}}function m(_){if(co(_),!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),Zj(_.view,d),co(_),i.mouse("end",_)}function x(_,S){if(e.call(this,_,S)){var R=_.changedTouches,I=t.call(this,_,S),P=R.length,A,k;for(A=0;A<P;++A)(k=E(this,I,_,S,R[A].identifier,R[A]))&&(ym(_),k("start",_,R[A]))}}function b(_){var S=_.changedTouches,R=S.length,I,P;for(I=0;I<R;++I)(P=i[S[I].identifier])&&(co(_),P("drag",_,S[I]))}function w(_){var S=_.changedTouches,R=S.length,I,P;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),I=0;I<R;++I)(P=i[S[I].identifier])&&(ym(_),P("end",_,S[I]))}function E(_,S,R,I,P,A){var k=o.copy(),L=Zr(A||R,S),$,j,D;if((D=r.call(_,new jb("beforestart",{sourceEvent:R,target:p,identifier:P,active:a,x:L[0],y:L[1],dx:0,dy:0,dispatch:k}),I))!=null)return $=D.x-L[0]||0,j=D.y-L[1]||0,function G(B,Y,Z){var te=L,U;switch(B){case"start":i[P]=G,U=a++;break;case"end":delete i[P],--a;case"drag":L=Zr(Z||Y,S),U=a;break}k.call(B,_,new jb(B,{sourceEvent:Y,subject:D,target:p,identifier:P,active:U,x:L[0]+$,y:L[1]+j,dx:L[0]-te[0],dy:L[1]-te[1],dispatch:k}),I)}}return p.filter=function(_){return arguments.length?(e=typeof _=="function"?_:su(!!_),p):e},p.container=function(_){return arguments.length?(t=typeof _=="function"?_:su(_),p):t},p.subject=function(_){return arguments.length?(r=typeof _=="function"?_:su(_),p):r},p.touchable=function(_){return arguments.length?(n=typeof _=="function"?_:su(!!_),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 Mx(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Jj(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function rs(){}var $a=.7,Vu=1/$a,fo="\\s*([+-]?\\d+)\\s*",za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",q8=/^#([0-9a-f]{3,8})$/,k8=new RegExp(`^rgb\\(${fo},${fo},${fo}\\)$`),L8=new RegExp(`^rgb\\(${tn},${tn},${tn}\\)$`),B8=new RegExp(`^rgba\\(${fo},${fo},${fo},${za}\\)$`),F8=new RegExp(`^rgba\\(${tn},${tn},${tn},${za}\\)$`),$8=new RegExp(`^hsl\\(${za},${tn},${tn}\\)$`),z8=new RegExp(`^hsla\\(${za},${tn},${tn},${za}\\)$`),TI={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};Mx(rs,Ha,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:AI,formatHex:AI,formatHex8:H8,formatHsl:V8,formatRgb:MI,toString:MI});function AI(){return this.rgb().formatHex()}function H8(){return this.rgb().formatHex8()}function V8(){return Qj(this).formatHsl()}function MI(){return this.rgb().formatRgb()}function Ha(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=q8.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?DI(t):r===3?new Wt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?uu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?uu(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=k8.exec(e))?new Wt(t[1],t[2],t[3],1):(t=L8.exec(e))?new Wt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=B8.exec(e))?uu(t[1],t[2],t[3],t[4]):(t=F8.exec(e))?uu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$8.exec(e))?kI(t[1],t[2]/100,t[3]/100,1):(t=z8.exec(e))?kI(t[1],t[2]/100,t[3]/100,t[4]):TI.hasOwnProperty(e)?DI(TI[e]):e==="transparent"?new Wt(NaN,NaN,NaN,0):null}function DI(e){return new Wt(e>>16&255,e>>8&255,e&255,1)}function uu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Wt(e,t,r,n)}function U8(e){return e instanceof rs||(e=Ha(e)),e?(e=e.rgb(),new Wt(e.r,e.g,e.b,e.opacity)):new Wt}function qb(e,t,r,n){return arguments.length===1?U8(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}Mx(Wt,qb,Jj(rs,{brighter(e){return e=e==null?Vu:Math.pow(Vu,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?$a:Math.pow($a,e),new Wt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wt(pi(this.r),pi(this.g),pi(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:jI,formatHex:jI,formatHex8:W8,formatRgb:qI,toString:qI}));function jI(){return`#${di(this.r)}${di(this.g)}${di(this.b)}`}function W8(){return`#${di(this.r)}${di(this.g)}${di(this.b)}${di((isNaN(this.opacity)?1:this.opacity)*255)}`}function qI(){const e=Uu(this.opacity);return`${e===1?"rgb(":"rgba("}${pi(this.r)}, ${pi(this.g)}, ${pi(this.b)}${e===1?")":`, ${e})`}`}function Uu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function di(e){return e=pi(e),(e<16?"0":"")+e.toString(16)}function kI(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 Qj(e){if(e instanceof kr)return new kr(e.h,e.s,e.l,e.opacity);if(e instanceof rs||(e=Ha(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 G8(e,t,r,n){return arguments.length===1?Qj(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}Mx(kr,G8,Jj(rs,{brighter(e){return e=e==null?Vu:Math.pow(Vu,e),new kr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?$a:Math.pow($a,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(bm(e>=240?e-240:e+120,i,n),bm(e,i,n),bm(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new kr(LI(this.h),lu(this.s),lu(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("}${LI(this.h)}, ${lu(this.s)*100}%, ${lu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function LI(e){return e=(e||0)%360,e<0?e+360:e}function lu(e){return Math.max(0,Math.min(1,e||0))}function bm(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 e2=e=>()=>e;function K8(e,t){return function(r){return e+r*t}}function Y8(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 X8(e){return(e=+e)==1?t2:function(t,r){return r-t?Y8(t,r,e):e2(isNaN(t)?r:t)}}function t2(e,t){var r=t-e;return r?K8(e,r):e2(isNaN(e)?t:e)}const BI=(function e(t){var r=X8(t);function n(i,o){var a=r((i=qb(i)).r,(o=qb(o)).r),u=r(i.g,o.g),l=r(i.b,o.b),d=t2(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 kb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xm=new RegExp(kb.source,"g");function Z8(e){return function(){return e}}function J8(e){return function(t){return e(t)+""}}function Q8(e,t){var r=kb.lastIndex=xm.lastIndex=0,n,i,o,a=-1,u=[],l=[];for(e=e+"",t=t+"";(n=kb.exec(e))&&(i=xm.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=xm.lastIndex;return r<t.length&&(o=t.slice(r),u[a]?u[a]+=o:u[++a]=o),u.length<2?l[0]?J8(l[0].x):Z8(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 FI=180/Math.PI,Lb={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function r2(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)*FI,skewX:Math.atan(l)*FI,scaleX:a,scaleY:u}}var cu;function eG(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Lb:r2(t.a,t.b,t.c,t.d,t.e,t.f)}function tG(e){return e==null||(cu||(cu=document.createElementNS("http://www.w3.org/2000/svg","g")),cu.setAttribute("transform",e),!(e=cu.transform.baseVal.consolidate()))?Lb:(e=e.matrix,r2(e.a,e.b,e.c,e.d,e.e,e.f))}function n2(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 rG=n2(eG,"px, ","px)","deg)"),nG=n2(tG,", ",")",")"),iG=1e-12;function $I(e){return((e=Math.exp(e))+1/e)/2}function oG(e){return((e=Math.exp(e))-1/e)/2}function aG(e){return((e=Math.exp(2*e))-1)/(e+1)}const sG=(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<iG)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 P=I*b,A=$I(S),k=d/(r*w)*(A*aG(t*P+S)-oG(S));return[u+k*v,l+k*m,d*A/$I(t*P+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 Eo=0,Pa=0,aa=0,i2=1e3,Wu,Na,Gu=0,xi=0,Fl=0,Va=typeof performance=="object"&&performance.now?performance:Date,o2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Dx(){return xi||(o2(uG),xi=Va.now()+Fl)}function uG(){xi=0}function Ku(){this._call=this._time=this._next=null}Ku.prototype=a2.prototype={constructor:Ku,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Dx():+r)+(t==null?0:+t),!this._next&&Na!==this&&(Na?Na._next=this:Wu=this,Na=this),this._call=e,this._time=r,Bb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bb())}};function a2(e,t,r){var n=new Ku;return n.restart(e,t,r),n}function lG(){Dx(),++Eo;for(var e=Wu,t;e;)(t=xi-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Eo}function zI(){xi=(Gu=Va.now())+Fl,Eo=Pa=0;try{lG()}finally{Eo=0,fG(),xi=0}}function cG(){var e=Va.now(),t=e-Gu;t>i2&&(Fl-=t,Gu=e)}function fG(){for(var e,t=Wu,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:Wu=r);Na=e,Bb(n)}function Bb(e){if(!Eo){Pa&&(Pa=clearTimeout(Pa));var t=e-xi;t>24?(e<1/0&&(Pa=setTimeout(zI,e-Va.now()-Fl)),aa&&(aa=clearInterval(aa))):(aa||(Gu=Va.now(),aa=setInterval(cG,i2)),Eo=1,o2(zI))}}function HI(e,t,r){var n=new Ku;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var dG=Ll("start","end","cancel","interrupt"),hG=[],s2=0,VI=1,Fb=2,Mu=3,UI=4,$b=5,Du=6;function $l(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;pG(e,r,{name:t,index:n,group:i,on:dG,tween:hG,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:s2})}function jx(e,t){var r=Vr(e,t);if(r.state>s2)throw new Error("too late; already scheduled");return r}function an(e,t){var r=Vr(e,t);if(r.state>Mu)throw new Error("too late; already running");return r}function Vr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function pG(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=a2(o,0,r.time);function o(d){r.state=VI,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!==VI)return l();for(f in n)if(v=n[f],v.name===r.name){if(v.state===Mu)return HI(a);v.state===UI?(v.state=Du,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[f]):+f<t&&(v.state=Du,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[f])}if(HI(function(){r.state===Mu&&(r.state=UI,r.timer.restart(u,r.delay,r.time),u(d))}),r.state=Fb,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Fb){for(r.state=Mu,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=$b,1),h=-1,p=i.length;++h<p;)i[h].call(e,f);r.state===$b&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Du,r.timer.stop(),delete n[t];for(var d in n)return;delete e.__transition}}function ju(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>Fb&&n.state<$b,n.state=Du,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function vG(e){return this.each(function(){ju(this,e)})}function gG(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 mG(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 yG(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Vr(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?gG:mG)(r,e,t))}function qx(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 Vr(i,n).value[t]}}function u2(e,t){var r;return(typeof t=="number"?Bn:t instanceof Ha?BI:(r=Ha(t))?(t=r,BI):Q8)(e,t)}function bG(e){return function(){this.removeAttribute(e)}}function xG(e){return function(){this.removeAttributeNS(e.space,e.local)}}function wG(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 _G(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 EG(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 SG(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 OG(e,t){var r=Bl(e),n=r==="transform"?nG:u2;return this.attrTween(e,typeof t=="function"?(r.local?SG:EG)(r,n,qx(this,"attr."+e,t)):t==null?(r.local?xG:bG)(r):(r.local?_G:wG)(r,n,t))}function CG(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function RG(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function IG(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&RG(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)&&CG(e,o)),r}return i._value=t,i}function NG(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=Bl(e);return this.tween(r,(n.local?IG:PG)(n,t))}function TG(e,t){return function(){jx(this,e).delay=+t.apply(this,arguments)}}function AG(e,t){return t=+t,function(){jx(this,e).delay=t}}function MG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?TG:AG)(t,e)):Vr(this.node(),t).delay}function DG(e,t){return function(){an(this,e).duration=+t.apply(this,arguments)}}function jG(e,t){return t=+t,function(){an(this,e).duration=t}}function qG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?DG:jG)(t,e)):Vr(this.node(),t).duration}function kG(e,t){if(typeof t!="function")throw new Error;return function(){an(this,e).ease=t}}function LG(e){var t=this._id;return arguments.length?this.each(kG(t,e)):Vr(this.node(),t).ease}function BG(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;an(this,e).ease=r}}function FG(e){if(typeof e!="function")throw new Error;return this.each(BG(this._id,e))}function $G(e){typeof e!="function"&&(e=Fj(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 zG(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 HG(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 VG(e,t,r){var n,i,o=HG(t)?jx:an;return function(){var a=o(this,e),u=a.on;u!==n&&(i=(n=u).copy()).on(t,r),a.on=i}}function UG(e,t){var r=this._id;return arguments.length<2?Vr(this.node(),r).on.on(e):this.each(VG(r,e,t))}function WG(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function GG(){return this.on("end.remove",WG(this._id))}function KG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Tx(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,$l(d[p],t,r,p,d,Vr(f,r)));return new xn(o,this._parents,t,r)}function YG(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Bj(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=Vr(f,r),y=0,x=p.length;y<x;++y)(v=p[y])&&$l(v,t,r,y,p,m);o.push(p),a.push(f)}return new xn(o,a,t,r)}var XG=ts.prototype.constructor;function ZG(){return new XG(this._groups,this._parents)}function JG(e,t){var r,n,i;return function(){var o=_o(this,e),a=(this.style.removeProperty(e),_o(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function l2(e){return function(){this.style.removeProperty(e)}}function QG(e,t,r){var n,i=r+"",o;return function(){var a=_o(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function eK(e,t,r){var n,i,o;return function(){var a=_o(this,e),u=r(this),l=u+"";return u==null&&(l=u=(this.style.removeProperty(e),_o(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,u))}}function tK(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=l2(t)):void 0;(d!==r||i!==f)&&(n=(r=d).copy()).on(a,i=f),l.on=n}}function rK(e,t,r){var n=(e+="")=="transform"?rG:u2;return t==null?this.styleTween(e,JG(e,n)).on("end.style."+e,l2(e)):typeof t=="function"?this.styleTween(e,eK(e,n,qx(this,"style."+e,t))).each(tK(this._id,e)):this.styleTween(e,QG(e,n,t),r).on("end.style."+e,null)}function nK(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function iK(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&nK(e,a,r)),n}return o._value=t,o}function oK(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,iK(e,t,r??""))}function aK(e){return function(){this.textContent=e}}function sK(e){return function(){var t=e(this);this.textContent=t??""}}function uK(e){return this.tween("text",typeof e=="function"?sK(qx(this,"text",e)):aK(e==null?"":e+""))}function lK(e){return function(t){this.textContent=e.call(this,t)}}function cK(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&lK(i)),t}return n._value=e,n}function fK(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,cK(e))}function dK(){for(var e=this._name,t=this._id,r=c2(),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=Vr(l,t);$l(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 hK(){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 pK=0;function xn(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function c2(){return++pK}var mn=ts.prototype;xn.prototype={constructor:xn,select:KG,selectAll:YG,selectChild:mn.selectChild,selectChildren:mn.selectChildren,filter:$G,merge:zG,selection:ZG,transition:dK,call:mn.call,nodes:mn.nodes,node:mn.node,size:mn.size,empty:mn.empty,each:mn.each,on:UG,attr:OG,attrTween:NG,style:rK,styleTween:oK,text:uK,textTween:fK,remove:GG,tween:yG,delay:MG,duration:qG,ease:LG,easeVarying:FG,end:hK,[Symbol.iterator]:mn[Symbol.iterator]};function vK(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var gK={time:null,delay:0,duration:250,ease:vK};function mK(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 yK(e){var t,r;e instanceof xn?(t=e._id,e=e._name):(t=c2(),(r=gK).time=Dx(),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])&&$l(l,e,t,d,a,r||mK(l,t));return new xn(n,this._parents,e,t)}ts.prototype.interrupt=vG;ts.prototype.transition=yK;const fu=e=>()=>e;function bK(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 vi=new yn(1,0,0);yn.prototype;function wm(e){e.stopImmediatePropagation()}function sa(e){e.preventDefault(),e.stopImmediatePropagation()}function xK(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function wK(){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 WI(){return this.__zoom||vi}function _K(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function EK(){return navigator.maxTouchPoints||"ontouchstart"in this}function SK(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 OK(){var e=xK,t=wK,r=SK,n=_K,i=EK,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,l=sG,d=Ll("start","zoom","end"),f,h,p,v=500,m=150,y=0,x=10;function b(D){D.property("__zoom",WI).on("wheel.zoom",P,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",k).filter(i).on("touchstart.zoom",L).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",j).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(D,G,B,Y){var Z=D.selection?D.selection():D;Z.property("__zoom",WI),D!==Z?S(D,G,B,Y):Z.interrupt().each(function(){R(this,arguments).event(Y).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},b.scaleBy=function(D,G,B,Y){b.scaleTo(D,function(){var Z=this.__zoom.k,te=typeof G=="function"?G.apply(this,arguments):G;return Z*te},B,Y)},b.scaleTo=function(D,G,B,Y){b.transform(D,function(){var Z=t.apply(this,arguments),te=this.__zoom,U=B==null?_(Z):typeof B=="function"?B.apply(this,arguments):B,re=te.invert(U),ae=typeof G=="function"?G.apply(this,arguments):G;return r(E(w(te,ae),U,re),Z,a)},B,Y)},b.translateBy=function(D,G,B,Y){b.transform(D,function(){return r(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof B=="function"?B.apply(this,arguments):B),t.apply(this,arguments),a)},null,Y)},b.translateTo=function(D,G,B,Y,Z){b.transform(D,function(){var te=t.apply(this,arguments),U=this.__zoom,re=Y==null?_(te):typeof Y=="function"?Y.apply(this,arguments):Y;return r(vi.translate(re[0],re[1]).scale(U.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof B=="function"?-B.apply(this,arguments):-B),te,a)},Y,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,B){var Y=G[0]-B[0]*D.k,Z=G[1]-B[1]*D.k;return Y===D.x&&Z===D.y?D:new yn(D.k,Y,Z)}function _(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function S(D,G,B,Y){D.on("start.zoom",function(){R(this,arguments).event(Y).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(Y).end()}).tween("zoom",function(){var Z=this,te=arguments,U=R(Z,te).event(Y),re=t.apply(Z,te),ae=B==null?_(re):typeof B=="function"?B.apply(Z,te):B,le=Math.max(re[1][0]-re[0][0],re[1][1]-re[0][1]),F=Z.__zoom,W=typeof G=="function"?G.apply(Z,te):G,J=l(F.invert(ae).concat(le/F.k),W.invert(ae).concat(le/W.k));return function(H){if(H===1)H=W;else{var K=J(H),se=le/K[2];H=new yn(se,ae[0]-K[0]*se,ae[1]-K[1]*se)}U.zoom(null,H)}})}function R(D,G,B){return!B&&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 bK(D,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:d}),G)}};function P(D,...G){if(!e.apply(this,arguments))return;var B=R(this,G).event(D),Y=this.__zoom,Z=Math.max(o[0],Math.min(o[1],Y.k*Math.pow(2,n.apply(this,arguments)))),te=Zr(D);if(B.wheel)(B.mouse[0][0]!==te[0]||B.mouse[0][1]!==te[1])&&(B.mouse[1]=Y.invert(B.mouse[0]=te)),clearTimeout(B.wheel);else{if(Y.k===Z)return;B.mouse=[te,Y.invert(te)],ju(this),B.start()}sa(D),B.wheel=setTimeout(U,m),B.zoom("mouse",r(E(w(Y,Z),B.mouse[0],B.mouse[1]),B.extent,a));function U(){B.wheel=null,B.end()}}function A(D,...G){if(p||!e.apply(this,arguments))return;var B=D.currentTarget,Y=R(this,G,!0).event(D),Z=qr(D.view).on("mousemove.zoom",ae,!0).on("mouseup.zoom",le,!0),te=Zr(D,B),U=D.clientX,re=D.clientY;Xj(D.view),wm(D),Y.mouse=[te,this.__zoom.invert(te)],ju(this),Y.start();function ae(F){if(sa(F),!Y.moved){var W=F.clientX-U,J=F.clientY-re;Y.moved=W*W+J*J>y}Y.event(F).zoom("mouse",r(E(Y.that.__zoom,Y.mouse[0]=Zr(F,B),Y.mouse[1]),Y.extent,a))}function le(F){Z.on("mousemove.zoom mouseup.zoom",null),Zj(F.view,Y.moved),sa(F),Y.event(F).end()}}function k(D,...G){if(e.apply(this,arguments)){var B=this.__zoom,Y=Zr(D.changedTouches?D.changedTouches[0]:D,this),Z=B.invert(Y),te=B.k*(D.shiftKey?.5:2),U=r(E(w(B,te),Y,Z),t.apply(this,G),a);sa(D),u>0?qr(this).transition().duration(u).call(S,U,Y,D):qr(this).call(b.transform,U,Y,D)}}function L(D,...G){if(e.apply(this,arguments)){var B=D.touches,Y=B.length,Z=R(this,G,D.changedTouches.length===Y).event(D),te,U,re,ae;for(wm(D),U=0;U<Y;++U)re=B[U],ae=Zr(re,this),ae=[ae,this.__zoom.invert(ae),re.identifier],Z.touch0?!Z.touch1&&Z.touch0[2]!==ae[2]&&(Z.touch1=ae,Z.taps=0):(Z.touch0=ae,te=!0,Z.taps=1+!!f);f&&(f=clearTimeout(f)),te&&(Z.taps<2&&(h=ae[0],f=setTimeout(function(){f=null},v)),ju(this),Z.start())}}function $(D,...G){if(this.__zooming){var B=R(this,G).event(D),Y=D.changedTouches,Z=Y.length,te,U,re,ae;for(sa(D),te=0;te<Z;++te)U=Y[te],re=Zr(U,this),B.touch0&&B.touch0[2]===U.identifier?B.touch0[0]=re:B.touch1&&B.touch1[2]===U.identifier&&(B.touch1[0]=re);if(U=B.that.__zoom,B.touch1){var le=B.touch0[0],F=B.touch0[1],W=B.touch1[0],J=B.touch1[1],H=(H=W[0]-le[0])*H+(H=W[1]-le[1])*H,K=(K=J[0]-F[0])*K+(K=J[1]-F[1])*K;U=w(U,Math.sqrt(H/K)),re=[(le[0]+W[0])/2,(le[1]+W[1])/2],ae=[(F[0]+J[0])/2,(F[1]+J[1])/2]}else if(B.touch0)re=B.touch0[0],ae=B.touch0[1];else return;B.zoom("touch",r(E(U,re,ae),B.extent,a))}}function j(D,...G){if(this.__zooming){var B=R(this,G).event(D),Y=D.changedTouches,Z=Y.length,te,U;for(wm(D),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),te=0;te<Z;++te)U=Y[te],B.touch0&&B.touch0[2]===U.identifier?delete B.touch0:B.touch1&&B.touch1[2]===U.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&&(U=Zr(U,this),Math.hypot(h[0]-U[0],h[1]-U[1])<x)){var re=qr(this).on("dblclick.zoom");re&&re.apply(this,arguments)}}}return b.wheelDelta=function(D){return arguments.length?(n=typeof D=="function"?D:fu(+D),b):n},b.filter=function(D){return arguments.length?(e=typeof D=="function"?D:fu(!!D),b):e},b.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:fu(!!D),b):i},b.extent=function(D){return arguments.length?(t=typeof D=="function"?D:fu([[+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 zb(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 f2(e,t){if(e){if(typeof e=="string")return zb(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 zb(e,t)}}function CK(e){if(Array.isArray(e))return e}function RK(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 IK(){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 CK(e)||RK(e,t)||f2(e,t)||IK()}var So;(function(e){e.Strict="strict",e.Loose="loose"})(So||(So={}));var wi;(function(e){e.Lines="lines",e.Dots="dots"})(wi||(wi={}));var ho;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ho||(ho={}));var $n;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})($n||($n={}));var Yu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Yu||(Yu={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));var kx=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},po=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)},d2=function(t,r){return{x:po(t.x,r[0][0],r[1][0]),y:po(t.y,r[0][1],r[1][1])}},h2=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)}},Xu=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}},NK=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}},p2=function(t){return!isNaN(t)&&isFinite(t)},Nt=Symbol("internals");function GI(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?GI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KI(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=Ta({},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 v2(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(Ta(Ta({},i),{},{selected:o.selected})),n;case"position":{var a=Ta({},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&&KI(n,a),n.push(a),n}case"dimensions":{var u=Ta({},i);return typeof o.dimensions<"u"&&(u.width=o.dimensions.width,u.height=o.dimensions.height),u.expandParent&&KI(n,u),n.push(u),n}case"remove":return n}return n.push(i),n},r)}function g2(e,t){return v2(e,t)}function TK(e,t){return v2(e,t)}var Fn=function(t,r){return{id:t,type:"select",selected:r}};function so(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 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 m2(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}var XI=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 m2({id:u.getAttribute("data-handleid"),position:u.getAttribute("data-handlepos"),x:(l.left-a.left)/n,y:(l.top-a.top)/n},kx(u))})};function ua(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,m2({},i))}}function y2(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 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 ja(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 AK=function(t){return"id"in t&&"source"in t&&"target"in t},MK=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||"")},Hb=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("&"))},DK=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)})},jK=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 AK(t)?n=ja({},t):n=ja(ja({},t),{},{id:MK(t)}),DK(n,r)?r:r.concat(n)},b2=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},Lx=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,Xu({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 NK(r)},x2=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=Xu({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=Xu(ja(ja({},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,P=(m||0)*(y||0),A=R||I||S>=P;A&&h.push(p)}),h},w2=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)})},_2=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=po(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 JI(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 uo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JI(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JI(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E2(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 E2(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 _m(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=p2(i.zIndex)?i.zIndex:i.selected?1e3:0,u=t.get(i.id),l=uo(uo({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=E2(i,r,n,uo(uo({},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 S2(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(P){return t.includeHiddenNodes?P.width&&P.height:!P.hidden}),v=p.every(function(P){return P.width&&P.height});if(p.length>0&&v){var m,y,x,b=Lx(p),w=_2(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=vi.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 qK(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,uo(uo({},n),{},(i={},He(i,Nt,n[Nt]),He(i,"selected",r.selected),i)))}}),new Map(t)}function kK(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 du(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:qK(t,a)}),l==null||l(t)),r!=null&&r.length&&(h&&i({edges:kK(r,u)}),d==null||d(r))}var Vb=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],QI={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:Vb,nodeExtent:Vb,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:So.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 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 Yr(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 Bx=GW(),LK=Bx.Provider,gt=Bx.useStore,Ft=Bx.useStoreApi,BK=function(){return WW(function(t,r){return Yr(Yr({},QI),{},{setNodes:function(i){t({nodeInternals:_m(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?_m(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=kx(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:XI(".source",E.nodeElement,y),target:XI(".target",E.nodeElement,y)}})),S)),w.push({id:_.id,type:"dimensions",dimensions:S}))}return w},[]),b=d||l&&!d&&S2(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=g2(h,Array.from(d.values())),v=_m(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=so(Array.from(u.values()),i),f=so(l,[])),du({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=so(u,i),f=so(Array.from(l.values()),[])),du({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)});du({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)});du({changedNodes:l,changedEdges:d,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(u){u.positionAbsolute=d2(u.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Yr({},QI))}})})};function cr(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=cr(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 FK(e){if(Array.isArray(e))return zb(e)}function $K(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zK(){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 gi(e){return FK(e)||$K(e)||f2(e)||zK()}var HK={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},VK=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},UK=function(){var t=Ft(),r=gt(VK,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=vi.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 S2(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=vi.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=_2(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],_=vi.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 b2(u,d,f,h)},viewportInitialized:!0}:HK},[n,i]);return o};function tP(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?tP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O2(){var e=UK(),t=Ft(),r=T.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(m){return Ji({},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 Ji({},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,gi(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(gi(y),gi(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 Ji({},S)}),edges:m.map(function(S){return Ji({},S)}),viewport:{x:w,y:E,zoom:_}}},[]);return T.useMemo(function(){return Ji(Ji({},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 WK(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 zl(e,t){if(e==null)return{};var r=WK(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 GK(){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 KK(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},T.createElement("path",{d:"M0 0h32v4.2H0z"}))}function YK(){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 XK(){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 ZK(){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 JK=["children","className"];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 QK(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 hu=function(t){var r=t.children,n=t.className,i=zl(t,JK);return T.createElement("button",QK({type:"button",className:cr(["react-flow__controls-button",n])},i),r)},eY=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},tY=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(eY),R=O2(),I=R.zoomIn,P=R.zoomOut,A=R.fitView;if(T.useEffect(function(){_(!0)},[]),!E)return null;var k=function(){I==null||I(),f==null||f()},L=function(){P==null||P(),h==null||h()},$=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:cr(["react-flow__controls",m]),style:r},i&&T.createElement(T.Fragment,null,T.createElement(hu,{onClick:k,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},T.createElement(GK,null)),T.createElement(hu,{onClick:L,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},T.createElement(KK,null))),a&&T.createElement(hu,{className:"react-flow__controls-fitview",onClick:$,title:"fit view","aria-label":"fit view"},T.createElement(YK,null)),l&&T.createElement(hu,{className:"react-flow__controls-interactive",onClick:j,title:"toggle interactivity","aria-label":"toggle interactivity"},S?T.createElement(ZK,null):T.createElement(XK,null)),y)};tY.displayName="Controls";var rY=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)})},nY=function(t,r){return T.createElement("circle",{cx:t,cy:t,r:t,fill:r})},pu;function nP(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 iP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var iY=(pu={},He(pu,wi.Dots,"#81818a"),He(pu,wi.Lines,"#eee"),pu),oY=function(t){return t.transform},C2=function(t){var r=t.variant,n=r===void 0?wi.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(oY),b=Le(x,3),w=b[0],E=b[1],_=b[2];T.useEffect(function(){var L=document.querySelectorAll(".react-flow__background"),$=Array.from(L).findIndex(function(j){return j===h.current});y("pattern-".concat($))},[]);var S=o*_||1,R=w%S,I=E%S,P=n===wi.Lines,A=l||iY[n],k=P?rY(S,u,A):nY(u*_,A);return T.createElement("svg",{className:cr(["react-flow__background","react-flow__container",f]),style:iP(iP({},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"},k),T.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(m,")")})))};C2.displayName="Background";var aY=T.memo(C2),sY=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function uY(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&sY.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:cr(["react-flow__attribution"].concat(gi(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 lY=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];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 cY(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 fY=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=zl(t,lY),w=T.useRef(null),E=T.useState({x:0,y:0,width:0,height:0}),_=Le(E,2),S=_[0],R=_[1],I=cr(["react-flow__edge-textwrapper",x]);return T.useEffect(function(){if(w.current){var P=w.current.getBBox();R({x:P.x,y:P.y,width:P.width,height:P.height})}},[i]),typeof i>"u"||!i?null:T.createElement("g",cY({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)},dY=T.memo(fY),Hl=(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(dY,{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 Zu(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,u;switch(t){case Se.Left:case Se.Right:a=.5*(r+i),u=n;break;case Se.Top:case Se.Bottom:a=r,u=.5*(n+o);break}return[a,u]}function R2(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?Se.Top:u,d=Zu({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Le(d,2),h=f[0],p=f[1],v=Zu({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 hY(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?Se.Top:u,d=Zu({pos:i,x1:t,y1:r,x2:o,y2:a}),f=Le(d,2),h=f[0],p=f[1],v=Zu({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 I2=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Se.Bottom:o,u=e.targetPosition,l=u===void 0?Se.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=R2(w),_=hY(w),S=Le(_,2),R=S[0],I=S[1];return T.createElement(Hl,{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 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 pY(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}var sP=[Se.Left,Se.Right],P2=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,u=a===void 0?Se.Bottom:a,l=t.targetPosition,d=l===void 0?Se.Top:l,f=sP.includes(u),h=sP.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 la(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,pY({},i))}}var 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)},Om=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},Cm=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},Rm=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},Im=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},Pm=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},Nm=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Ub(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?Se.Top:u,d=e.borderRadius,f=d===void 0?5:d,h=e.centerX,p=e.centerY,v=P2({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=[Se.Left,Se.Right],I=typeof h<"u"?h:y,P=typeof p<"u"?p:x,A=null,k=null;return t<=o?(A=r<=a?Em(t,P,S):Im(t,P,S),k=r<=a?Nm(o,P,S):Cm(o,P,S)):(A=r<a?Om(t,P,S):Pm(t,P,S),k=r<a?Rm(o,P,S):Sm(o,P,S)),R.includes(i)&&R.includes(l)?t<=o?(A=r<=a?Nm(I,r,S):Cm(I,r,S),k=r<=a?Em(I,a,S):Im(I,a,S)):(i===Se.Right&&l===Se.Left||i===Se.Left&&l===Se.Right||i===Se.Left&&l===Se.Left)&&(A=r<=a?Rm(I,r,S):Sm(I,r,S),k=r<=a?Om(I,a,S):Pm(I,a,S)):R.includes(i)&&!R.includes(l)?(t<=o?A=r<=a?Nm(o,r,S):Cm(o,r,S):A=r<=a?Rm(o,r,S):Sm(o,r,S),k=""):!R.includes(i)&&R.includes(l)&&(t<=o?A=r<=a?Em(t,a,S):Im(t,a,S):A=r<=a?Om(t,a,S):Pm(t,a,S),k=""),"M ".concat(t,",").concat(r).concat(A).concat(k,"L ").concat(o,",").concat(a)}var Fx=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?Se.Bottom:p,m=e.targetPosition,y=m===void 0?Se.Top:m,x=e.markerEnd,b=e.markerStart,w=e.borderRadius,E=w===void 0?5:w,_=P2({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:y}),S=Le(_,2),R=S[0],I=S[1],P=Ub({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:y,borderRadius:E});return T.createElement(Hl,{path:P,centerX:R,centerY:I,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:l,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:x,markerStart:b})});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 lP(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){He(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}var N2=T.memo(function(e){return T.createElement(Fx,lP(lP({},e),{},{borderRadius:0}))}),T2=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(Hl,{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 vu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ju(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 Se.Left:u=r-vu(r-i,a),l=n;break;case Se.Right:u=r+vu(i-r,a),l=n;break;case Se.Top:u=r,l=n-vu(n-o,a);break;case Se.Bottom:u=r,l=n+vu(o-n,a);break}return[u,l]}function Vl(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?Se.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Ju({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Le(h,2),v=p[0],m=p[1],y=Ju({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 vY(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Se.Bottom:n,o=e.targetX,a=e.targetY,u=e.targetPosition,l=u===void 0?Se.Top:u,d=e.curvature,f=d===void 0?.25:d,h=Ju({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=Le(h,2),v=p[0],m=p[1],y=Ju({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 Wb=T.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Se.Bottom:o,u=e.targetPosition,l=u===void 0?Se.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},_=Vl(E),S=vY(E),R=Le(S,2),I=R[0],P=R[1];return T.createElement(Hl,{path:_,centerX:I,centerY:P,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:x,markerStart:b})}),$x=T.createContext(null),gY=$x.Provider;$x.Consumer;function Gb(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===So.Strict?r&&d||!r&&l:!0;m&&(f.isValid=o(v))}return f}function Tm(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function A2(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=h2(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(P){u({connectionPosition:{x:P.clientX-_.left,y:P.clientY-_.top}});var A=Gb(P,w,o,n,r,l,p),k=A.connection,L=A.elementBelow,$=A.isValid,j=A.isHoveringHandle;if(!j)return Tm(S);k.source!==k.target&&L&&(Tm(S),S=L,L.classList.add("react-flow__handle-connecting"),L.classList.toggle("react-flow__handle-valid",$))}function I(P){var A=a(),k=A.onConnectStop,L=A.onConnectEnd,$=Gb(P,w,o,n,r,l,p),j=$.connection,D=$.isValid;k==null||k(P),D&&(i==null||i(j)),L==null||L(P),d&&f&&f(P),Tm(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 mY=["type","position","isValidConnection","isConnectable","id","onConnect","children","className","onMouseDown"];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 Am(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 yY=function(){return!0},bY=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},M2=T.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?Se.Top:i,a=e.isValidConnection,u=a===void 0?yY: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=zl(e,mY),x=Ft(),b=T.useContext($x),w=gt(bY,Xt),E=w.connectionStartHandle,_=w.connectOnClick,S=f||null,R=n==="target",I=function(L){var $=x.getState(),j=$.defaultEdgeOptions,D=$.onConnect,G=$.hasDefaultEdges,B=Am(Am({},j),L);if(G){var Y=x.getState(),Z=Y.edges;x.setState({edges:jK(B,Z)})}D==null||D(B),h==null||h(B)},P=function(L){L.button===0&&A2({event:L,handleId:S,nodeId:b,onConnect:I,isTarget:R,getState:x.getState,setState:x.setState,isValidConnection:u}),m==null||m(L)},A=function(L){var $=x.getState(),j=$.onClickConnectStart,D=$.onClickConnectStop,G=$.onClickConnectEnd,B=$.connectionMode;if(!E){j==null||j(L,{nodeId:b,handleId:S,handleType:n}),x.setState({connectionStartHandle:{nodeId:b,type:n,handleId:S}});return}var Y=h2(L.target),Z=Gb(L,B,E.type==="target",E.nodeId,E.handleId||null,u,Y),te=Z.connection,U=Z.isValid;D==null||D(L),U&&I(te),G==null||G(L),x.setState({connectionStartHandle:null})};return T.createElement("div",Am({"data-handleid":S,"data-nodeid":b,"data-handlepos":o,className:cr(["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:P,onClick:_?A:void 0,ref:t},y),p)});M2.displayName="Handle";var Qu=T.memo(M2),D2=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Se.Top:i,a=t.sourcePosition,u=a===void 0?Se.Bottom:a;return T.createElement(T.Fragment,null,T.createElement(Qu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,T.createElement(Qu,{type:"source",position:u,isConnectable:n}))};D2.displayName="DefaultNode";var Kb=T.memo(D2),j2=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?Se.Bottom:i;return T.createElement(T.Fragment,null,r==null?void 0:r.label,T.createElement(Qu,{type:"source",position:o,isConnectable:n}))};j2.displayName="InputNode";var q2=T.memo(j2),k2=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Se.Top:i;return T.createElement(T.Fragment,null,T.createElement(Qu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};k2.displayName="OutputNode";var L2=T.memo(k2),xY=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},wY=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 _Y(e){var t=e.onSelectionChange,r=gt(xY,wY),n=r.selectedNodes,i=r.selectedEdges;return T.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var EY=T.memo(_Y),SY=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 OY=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,P=t.translateExtent,A=t.connectOnClick,k=t.defaultEdgeOptions,L=t.fitView,$=t.fitViewOptions,j=t.onNodesDelete,D=t.onEdgesDelete,G=t.onNodeDrag,B=t.onNodeDragStart,Y=t.onNodeDragStop,Z=t.onSelectionDrag,te=t.onSelectionDragStart,U=t.onSelectionDragStop,re=gt(SY,Xt),ae=re.setNodes,le=re.setEdges,F=re.setDefaultNodesAndEdges,W=re.setMinZoom,J=re.setMaxZoom,H=re.setTranslateExtent,K=re.setNodeExtent,se=re.reset,oe=Ft();return T.useEffect(function(){return F(i,o),function(){se()}},[]),tt("defaultEdgeOptions",k,oe.setState),tt("connectionMode",S,oe.setState),tt("onConnect",a,oe.setState),tt("onConnectStart",u,oe.setState),tt("onConnectStop",l,oe.setState),tt("onConnectEnd",d,oe.setState),tt("onClickConnectStart",f,oe.setState),tt("onClickConnectStop",h,oe.setState),tt("onClickConnectEnd",p,oe.setState),tt("nodesDraggable",v,oe.setState),tt("nodesConnectable",m,oe.setState),tt("elementsSelectable",_,oe.setState),tt("snapToGrid",I,oe.setState),tt("snapGrid",R,oe.setState),tt("onNodesChange",w,oe.setState),tt("onEdgesChange",E,oe.setState),tt("connectOnClick",A,oe.setState),tt("fitViewOnInit",L,oe.setState),tt("fitViewOnInitOptions",$,oe.setState),tt("onNodesDelete",j,oe.setState),tt("onEdgesDelete",D,oe.setState),tt("onNodeDrag",G,oe.setState),tt("onNodeDragStart",B,oe.setState),tt("onNodeDragStop",Y,oe.setState),tt("onSelectionDrag",Z,oe.setState),tt("onSelectionDragStart",te,oe.setState),tt("onSelectionDragStop",U,oe.setState),qn(r,ae),qn(n,le),qn(i,ae),qn(o,le),qn(y,W),qn(x,J),qn(P,H),qn(b,K),null},CY=".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%)}",RY=CY,IY=".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=IY,NY=function(t,r,n){return n===Se.Left?t-r:n===Se.Right?t+r:t},TY=function(t,r,n){return n===Se.Top?t-r:n===Se.Bottom?t+r:t},fP=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:cr(["react-flow__edgeupdater",r]),cx:NY(i,u,n),cy:TY(o,u,n),r:u,stroke:"transparent",fill:"transparent"})},Qi=(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,P=n.targetY,A=n.sourcePosition,k=n.targetPosition,L=n.elementsSelectable,$=n.hidden,j=n.sourceHandleId,D=n.targetHandleId,G=n.onContextMenu,B=n.onMouseEnter,Y=n.onMouseMove,Z=n.onMouseLeave,te=n.edgeUpdaterRadius,U=n.onEdgeUpdate,re=n.onEdgeUpdateStart,ae=n.onEdgeUpdateEnd,le=n.markerEnd,F=n.markerStart,W=n.rfId,J=T.useState(!1),H=Le(J,2),K=H[0],se=H[1],oe=Ft(),fe=function(rt){var bt=oe.getState(),Jt=bt.edges,fr=bt.addSelectedEdges,Dt=Jt.find(function(_t){return _t.id===i});L&&(oe.setState({nodesSelectionActive:!1}),fr([i])),l==null||l(rt,Dt)},V=la(i,oe.getState,d),ee=la(i,oe.getState,G),we=la(i,oe.getState,B),be=la(i,oe.getState,Y),de=la(i,oe.getState,Z),ue=function(rt,bt){var Jt=bt?_:E,fr=(bt?D:j)||null,Dt=bt?"target":"source",_t=function(){return!0},jt=bt,Ur=oe.getState().edges.find(function(dr){return dr.id===i});re==null||re(rt,Ur,Dt);var Yn=ae?function(dr){return ae(dr,Ur,Dt)}:void 0,Cn=function(Mi){return U==null?void 0:U(Ur,Mi)};A2({event:rt,handleId:fr,nodeId:Jt,onConnect:Cn,isTarget:jt,getState:oe.getState,setState:oe.setState,isValidConnection:_t,elementEdgeUpdaterType:Dt,onEdgeUpdateEnd:Yn})},Ee=function(rt){return ue(rt,!0)},Pe=function(rt){return ue(rt,!1)},Ze=function(){return se(!0)},ze=function(){return se(!1)},Fe=T.useMemo(function(){return"url(#".concat(Hb(F,W),")")},[F,W]),Ve=T.useMemo(function(){return"url(#".concat(Hb(le,W),")")},[le,W]);if($)return null;var lt=!L&&!l,ct=typeof U<"u",mt=cr(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:f,animated:h,inactive:lt,updating:K}]);return T.createElement("g",{className:mt,onClick:fe,onDoubleClick:V,onContextMenu:ee,onMouseEnter:we,onMouseMove:be,onMouseLeave:de},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:P,sourcePosition:A,targetPosition:k,sourceHandleId:j,targetHandleId:D,markerStart:Fe,markerEnd:Ve,"data-testid":"rf__edge-".concat(i)}),ct&&T.createElement("g",{onMouseDown:Ee,onMouseEnter:Ze,onMouseOut:ze},T.createElement(fP,{position:A,centerX:S,centerY:R,radius:te})),ct&&T.createElement("g",{onMouseDown:Pe,onMouseEnter:Ze,onMouseOut:ze},T.createElement(fP,{position:k,centerX:I,centerY:P,radius:te})))};return t.displayName="EdgeWrapper",T.memo(t)});function dP(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 hP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AY(e){var t={default:Qi(e.default||Wb),straight:Qi(e.bezier||T2),step:Qi(e.step||N2),smoothstep:Qi(e.step||Fx),simplebezier:Qi(e.simplebezier||I2)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=Qi(e[o]||Wb),i},r);return hP(hP({},t),n)}function pP(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 Se.Top:return{x:n+o/2,y:i};case Se.Right:return{x:n+o,y:i+a/2};case Se.Bottom:return{x:n+o/2,y:i+a};case Se.Left:return{x:n,y:i+a/2}}}function vP(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 MY=function(t,r,n,i,o,a){var u=pP(n,t,r),l=pP(a,i,o);return{sourceX:u.x,sourceY:u.y,targetX:l.x,targetY:l.y}};function DY(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=Xu({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 gP(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 jY=typeof document<"u"?document:null,el=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:jY},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,gi(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(bP(b))return!1;var w=yP(b.code,f);a.current.add(b[w]),mP(d,a.current,!1)&&(b.preventDefault(),o(!0))},m=function(b){if(bP(b))return!1;var w=yP(b.code,f);mP(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 mP(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 yP(e,t){return t.includes(e)?"code":"key"}function bP(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 qY=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},kY=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Ft(),i=gt(qY,Xt),o=i.onNodesChange,a=i.onEdgesChange,u=el(t),l=el(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(P,A){return(!A.selected&&A.parentNode&&P.find(function(k){return k.id===A.parentNode})||A.selected)&&P.push(A),P},[]),w=h.filter(function(P){return P.selected});if(u&&(b||w)){var E=w2(b,h),_=[].concat(gi(w),gi(E)),S=_.reduce(function(P,A){return P.includes(A.id)||P.push(A.id),P},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(P){return!S.includes(P.id)})}),p&&(b.forEach(function(P){f.delete(P.id)}),n.setState({nodeInternals:new Map(f)}))),S.length>0&&(y==null||y(_),a)){var R=S.map(function(P){return{id:P,type:"remove"}});a(R)}if(b.length>0&&(m==null||m(b),o)){var I=b.map(function(P){return{id:P.id,type:"remove"}});o(I)}n.setState({nodesSelectionActive:!1})}},[u,o,a]),T.useEffect(function(){n.setState({multiSelectionActive:l})},[l])});function LY(e){var t=Ft();T.useEffect(function(){var r,n=function(){if(e.current){var o=kx(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 BY=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},Mm=function(t){return{x:t.x,y:t.y,zoom:t.k}},gu=function(t,r){return t.target.closest(".".concat(r))},FY=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},$Y=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?ho.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,P=t.defaultZoom,A=P===void 0?1:P,k=t.defaultPosition,L=k===void 0?[0,0]:k,$=t.zoomActivationKeyCode,j=t.preventScrolling,D=j===void 0?!0:j,G=t.children,B=t.noWheelClassName,Y=t.noPanClassName,Z=Ft(),te=T.useRef(!1),U=T.useRef(null),re=T.useRef({x:0,y:0,zoom:0}),ae=gt(FY,Xt),le=ae.d3Zoom,F=ae.d3Selection,W=ae.d3ZoomHandler,J=el($);return LY(U),T.useEffect(function(){if(U.current){var H,K=OK().scaleExtent([R,I]).translateExtent(S),se=qr(U.current).call(K),oe=po(L[0],S[0][0],S[1][0]),fe=po(L[1],S[0][1],S[1][1]),V=po(A,R,I),ee=vi.translate(oe,fe).scale(V);K.transform(se,ee),Z.setState({d3Zoom:K,d3Selection:se,d3ZoomHandler:se.on("wheel.zoom"),transform:[oe,fe,V],domNode:(H=se.node())===null||H===void 0?void 0:H.closest(".react-flow")})}},[]),T.useEffect(function(){F&&le&&(f&&!J?F.on("wheel",function(H){if(gu(H,B))return!1;H.preventDefault(),H.stopImmediatePropagation();var K=F.property("__zoom").k||1;if(H.ctrlKey&&l){var se=Zr(H),oe=-H.deltaY*(H.deltaMode===1?.05:H.deltaMode?1:.002)*10,fe=K*Math.pow(2,oe);le.scaleTo(F,fe,se);return}var V=H.deltaMode===1?20:1,ee=m===ho.Vertical?0:H.deltaX*V,we=m===ho.Horizontal?0:H.deltaY*V;le.translateBy(F,-(ee/K)*p,-(we/K)*p)}).on("wheel.zoom",null):typeof W<"u"&&F.on("wheel",function(H){if(!D||gu(H,B))return null;H.preventDefault()}).on("wheel.zoom",W))},[f,m,F,le,W,J,l,D,B]),T.useEffect(function(){le&&(b&&!te.current?le.on("zoom",null):b||le.on("zoom",function(H){if(Z.setState({transform:[H.transform.x,H.transform.y,H.transform.k]}),r){var K=Mm(H.transform);r(H.sourceEvent,K)}}))},[b,le,r]),T.useEffect(function(){le&&le.on("start",function(H){if(te.current=!0,n){var K=Mm(H.transform);re.current=K,n(H.sourceEvent,K)}})},[le,n]),T.useEffect(function(){le&&le.on("end",function(H){if(te.current=!1,i&&BY(re.current,H.transform)){var K=Mm(H.transform);re.current=K,i(H.sourceEvent,K)}})},[le,i]),T.useEffect(function(){le&&le.filter(function(H){var K=J||a,se=l&&H.ctrlKey;return!_&&!K&&!f&&!x&&!l||b||!x&&H.type==="dblclick"||gu(H,B)&&H.type==="wheel"||gu(H,Y)&&H.type!=="wheel"||!l&&H.ctrlKey&&H.type==="wheel"||!K&&!f&&!se&&H.type==="wheel"||!_&&(H.type==="mousedown"||H.type==="touchstart")?!1:(!H.ctrlKey||H.type==="wheel")&&!H.button})},[le,a,l,f,x,_,b,w,J]),T.createElement("div",{className:"react-flow__renderer react-flow__container",ref:U},G)};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){He(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 _P(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var zY=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},EP={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},HY=T.memo(function(e){var t=e.selectionKeyPressed,r=Ft(),n=T.useRef(0),i=T.useRef(0),o=T.useRef(),a=T.useState(EP),u=Le(a,2),l=u[0],d=u[1],f=gt(zY,Xt),h=f.userSelectionActive,p=f.elementsSelectable,v=h||t;if(!p||!v)return null;var m=function(){d(EP),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},y=function(_){var S=_.target.closest(".react-flow");o.current=S.getBoundingClientRect();var R=_P(_,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=_P(_,o.current),P=(S=l.startX)!==null&&S!==void 0?S:0,A=(R=l.startY)!==null&&R!==void 0?R:0,k=wP(wP({},l),{},{x:I.x<P?I.x:P,y:I.y<A?I.y:A,width:Math.abs(I.x-P),height:Math.abs(I.y-A)}),L=r.getState(),$=L.nodeInternals,j=L.edges,D=L.transform,G=L.onNodesChange,B=L.onEdgesChange,Y=Array.from($.values()),Z=x2($,k,D,!1,!0),te=w2(Z,j).map(function(le){return le.id}),U=Z.map(function(le){return le.id});if(n.current!==U.length){n.current=U.length;var re=so(Y,U);re.length&&(G==null||G(re))}if(i.current!==te.length){i.current=te.length;var ae=so(j,te);ae.length&&(B==null||B(ae))}d(k)}},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 SP(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?SP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B2(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:B2(r,t):!1}function CP(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 VY(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!B2(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 UY(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,P=i.get(e.parentNode);E={x:(_=P==null||(S=P.positionAbsolute)===null||S===void 0?void 0:S.x)!==null&&_!==void 0?_:0,y:(R=P==null||(I=P.positionAbsolute)===null||I===void 0?void 0:I.y)!==null&&R!==void 0?R:0}}return e.positionAbsolute=d?d2(f,d):f,e.position={x:e.positionAbsolute.x-E.x,y:e.positionAbsolute.y-E.y},e}function Dm(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return OP(OP({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function jm(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function F2(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,P=w.touches?w.touches[0].clientY:w.clientY,A=b2({x:I,y:P},_,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=j8().on("start",function(E){var _=v.getState(),S=_.nodeInternals,R=_.multiSelectionActive,I=_.unselectNodesAndEdges,P=_.onNodeDragStart,A=_.onSelectionDragStart,k=a?P:jm(A);if(!l&&!R&&a){var L;(L=S.get(a))!==null&&L!==void 0&&L.selected||I()}a&&u&&l&&y2({id:a,store:v});var $=x(E);if(y.current=$,m.current=VY(S,$,a),k&&m.current){var j=Dm({nodeId:a,dragItems:m.current,nodeInternals:S}),D=Le(j,2),G=D[0],B=D[1];k(E.sourceEvent,G,B)}}).on("drag",function(E){var _=v.getState(),S=_.updateNodePositions,R=_.snapToGrid,I=_.snapGrid,P=_.nodeInternals,A=_.nodeExtent,k=_.onNodeDrag,L=_.onSelectionDrag,$=x(E);if((y.current.x!==$.x||y.current.y!==$.y)&&m.current){y.current=$,m.current=m.current.map(function(Z){return UY(Z,$,R,I,P,A)});var j=a?k:jm(L);if(S(m.current,!0,!0),p(!0),j){var D=Dm({nodeId:a,dragItems:m.current,nodeInternals:P}),G=Le(D,2),B=G[0],Y=G[1];j(E.sourceEvent,B,Y)}}E.on("end",function(Z){if(p(!1),m.current){var te=v.getState(),U=te.updateNodePositions,re=te.nodeInternals,ae=te.onNodeDragStop,le=te.onSelectionDragStop,F=a?ae:jm(le);if(U(m.current,!1,!1),F){var W=Dm({nodeId:a,dragItems:m.current,nodeInternals:re}),J=Le(W,2),H=J[0],K=J[1];F(Z.sourceEvent,H,K)}}})}).filter(function(E){var _=E.target,S=!E.button&&(!i||!CP(_,".".concat(i),t))&&(!o||CP(_,o,t));return S});return b.call(w),function(){b.on(".drag",null)}}}},[t,n,i,o,u,v,a,l,x]),h}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 WY(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 GY=function(t){return WY({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},Lx(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},KY=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return Lx(r)};function YY(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Ft(),i=gt(GY,Xt),o=i.transformString,a=i.userSelectionActive,u=gt(KY,Xt),l=u.width,d=u.height,f=u.x,h=u.y,p=T.useRef(null);if(F2({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:cr(["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 XY=T.memo(YY),ZY=function(t){return t.nodesSelectionActive},$2=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,P=t.defaultZoom,A=t.defaultPosition,k=t.preventScrolling,L=t.onSelectionContextMenu,$=t.noWheelClassName,j=t.noPanClassName,D=Ft(),G=gt(ZY),B=el(f);kY({deleteKeyCode:a,multiSelectionKeyCode:h});var Y=function(re){n==null||n(re),D.getState().resetSelectedElements(),D.setState({nodesSelectionActive:!1})},Z=i?function(U){return i(U)}:void 0,te=o?function(U){return o(U)}:void 0;return T.createElement($Y,{onMove:u,onMoveStart:l,onMoveEnd:d,selectionKeyPressed:B,elementsSelectable:v,zoomOnScroll:m,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:b,panOnScrollMode:w,zoomOnDoubleClick:E,panOnDrag:_,translateExtent:S,minZoom:R,maxZoom:I,defaultZoom:P,defaultPosition:A,zoomActivationKeyCode:p,preventScrolling:k,noWheelClassName:$,noPanClassName:j},r,T.createElement(HY,{selectionKeyPressed:B}),G&&T.createElement(XY,{onSelectionContextMenu:L,noPanClassName:j}),T.createElement("div",{className:"react-flow__pane react-flow__container",onClick:Y,onContextMenu:Z,onWheel:te}))};$2.displayName="FlowRenderer";var JY=T.memo($2);function QY(e){var t=gt(T.useCallback(function(r){return e?x2(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var e9=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},z2=function(t){var r=gt(e9,Xt),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,u=QY(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||Se.Bottom,targetPosition:f.targetPosition||Se.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})}))};z2.displayName="NodeRenderer";var t9=T.memo(z2),eo;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}var r9=(eo={},He(eo,Se.Left,Se.Right),He(eo,Se.Right,Se.Left),He(eo,Se.Top,Se.Bottom),He(eo,Se.Bottom,Se.Top),eo),n9=(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(te){return{fromNode:te.nodeInternals.get(a),handleId:te.connectionHandleId,toX:(te.connectionPosition.x-te.transform[0])/te.transform[2],toY:(te.connectionPosition.y-te.transform[1])/te.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(te){return te.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,P=((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 k=r9[A],L,$,j,D,G,B;switch(u){case"source":L=I,$=P,j=A,D=x,G=b,B=k;break;case"target":L=x,$=b,j=k,D=I,G=P,B=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:P,toX:x,toY:b,fromPosition:A,toPosition:k,sourcePosition:j,targetPosition:B,sourceNode:m,sourceHandle:_,targetX:D,targetY:G,sourceX:L,sourceY:$}));var Y="",Z={sourceX:L,sourceY:$,sourcePosition:j,targetX:D,targetY:G,targetPosition:B};return f===$n.Bezier?Y=Vl(Z):f===$n.Step?Y=Ub(PP(PP({},Z),{},{borderRadius:0})):f===$n.SmoothStep?Y=Ub(Z):f===$n.SimpleBezier?Y=R2(Z):Y="M".concat(L,",").concat($," ").concat(D,",").concat(G),T.createElement("g",{className:"react-flow__connection"},T.createElement("path",{d:Y,className:"react-flow__connection-path",style:l}))});function Yb(e){"@babel/helpers - typeof";return Yb=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},Yb(e)}var mu,i9=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"})},o9=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"})},NP=(mu={},He(mu,Yu.Arrow,i9),He(mu,Yu.ArrowClosed,o9),mu);function a9(e){var t=T.useMemo(function(){var r=NP.hasOwnProperty(e);return r?NP[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 TP(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 s9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var u9=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=a9(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}))},l9=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&&Yb(l)==="object"){var d=Hb(l,n);o.includes(d)||(a.push(s9({id:d,color:l.color||r},l)),o.push(d))}}),a},[]).sort(function(a,u){return a.id.localeCompare(u.id)})}},H2=function(t){var r=t.defaultColor,n=t.rfId,i=gt(T.useCallback(l9({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(u9,{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})}))};H2.displayName="MarkerDefinitions";var c9=T.memo(H2),f9=[{level:0,isMaxLevel:!0,edges:[]}];function d9(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,u){var l=p2(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?f9:o}function h9(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)&&DY({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 d9(n,t,r)}var p9=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}},V2=function(t){var r=gt(p9,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=h9(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(c9,{defaultColor:v,rfId:t.rfId}),T.createElement("g",null,_.map(function(R){var I=gP(f,R.source),P=Le(I,3),A=P[0],k=P[1],L=P[2],$=gP(f,R.target),j=Le($,3),D=j[0],G=j[1],B=j[2];if(!L||!B)return null;var Y=R.type||"default";t.edgeTypes[Y]||(console.warn('[React Flow]: Edge type "'.concat(Y,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),Y="default");var Z=t.edgeTypes[Y]||t.edgeTypes.default,te=d===So.Strict?G.target:G.target||G.source,U=vP(k.source,R.sourceHandle||null),re=vP(te,R.targetHandle||null),ae=(U==null?void 0:U.position)||Se.Bottom,le=(re==null?void 0:re.position)||Se.Top;if(!U)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(!re)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 F=MY(A,U,ae,D,re,le),W=F.sourceX,J=F.sourceY,H=F.targetX,K=F.targetY;return T.createElement(Z,{key:R.id,id:R.id,className:cr([R.className,t.noPanClassName]),type:Y,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:W,sourceY:J,targetX:H,targetY:K,sourcePosition:ae,targetPosition:le,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(n9,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:m,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:y})))};V2.displayName="EdgeRenderer";var v9=T.memo(V2),g9=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function m9(e){var t=e.children,r=gt(g9);return T.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function y9(e){var t=O2(),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 U2=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,P=t.deleteKeyCode,A=t.onlyRenderVisibleElements,k=t.elementsSelectable,L=t.selectNodesOnDrag,$=t.translateExtent,j=t.minZoom,D=t.maxZoom,G=t.defaultZoom,B=t.defaultPosition,Y=t.preventScrolling,Z=t.defaultMarkerColor,te=t.zoomOnScroll,U=t.zoomOnPinch,re=t.panOnScroll,ae=t.panOnScrollSpeed,le=t.panOnScrollMode,F=t.zoomOnDoubleClick,W=t.panOnDrag,J=t.onPaneClick,H=t.onPaneScroll,K=t.onPaneContextMenu,se=t.onEdgeUpdate,oe=t.onEdgeContextMenu,fe=t.onEdgeMouseEnter,V=t.onEdgeMouseMove,ee=t.onEdgeMouseLeave,we=t.edgeUpdaterRadius,be=t.onEdgeUpdateStart,de=t.onEdgeUpdateEnd,ue=t.noDragClassName,Ee=t.noWheelClassName,Pe=t.noPanClassName,Ze=t.elevateEdgesOnSelect,ze=t.id;return y9(u),T.createElement(JY,{onPaneClick:J,onPaneContextMenu:K,onPaneScroll:H,deleteKeyCode:P,selectionKeyCode:S,multiSelectionKeyCode:R,zoomActivationKeyCode:I,elementsSelectable:k,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:te,zoomOnPinch:U,zoomOnDoubleClick:F,panOnScroll:re,panOnScrollSpeed:ae,panOnScrollMode:le,panOnDrag:W,translateExtent:$,minZoom:j,maxZoom:D,defaultZoom:G,defaultPosition:B,onSelectionContextMenu:x,preventScrolling:Y,noDragClassName:ue,noWheelClassName:Ee,noPanClassName:Pe},T.createElement(m9,null,T.createElement(v9,{edgeTypes:n,onEdgeClick:d,onEdgeDoubleClick:h,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:_,onEdgeUpdate:se,onlyRenderVisibleElements:A,onEdgeContextMenu:oe,onEdgeMouseEnter:fe,onEdgeMouseMove:V,onEdgeMouseLeave:ee,onEdgeUpdateStart:be,onEdgeUpdateEnd:de,edgeUpdaterRadius:we,defaultMarkerColor:Z,noPanClassName:Pe,elevateEdgesOnSelect:!!Ze,rfId:ze}),T.createElement(t9,{nodeTypes:r,onNodeClick:l,onNodeDoubleClick:f,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:m,onNodeContextMenu:y,selectNodesOnDrag:L,onlyRenderVisibleElements:A,noPanClassName:Pe,noDragClassName:ue})))};U2.displayName="GraphView";var b9=T.memo(U2),W2=function(){return null};W2.displayName="GroupNode";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}var ca=(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,P=n.hidden,A=n.resizeObserver,k=n.dragHandle,L=n.zIndex,$=n.isParent,j=n.noPanClassName,D=n.noDragClassName,G=n.initialized,B=Ft(),Y=T.useRef(null),Z=T.useRef(R),te=T.useRef(I),U=T.useRef(o),re=E||w||f||h||p||v,ae=ua(i,B.getState,h),le=ua(i,B.getState,p),F=ua(i,B.getState,v),W=ua(i,B.getState,m),J=ua(i,B.getState,y),H=function(oe){if(E&&(!S||!w)&&y2({id:i,store:B}),f){var fe=B.getState().nodeInternals.get(i);f(oe,MP({},fe))}};T.useEffect(function(){if(Y.current&&!P){var se=Y.current;return A==null||A.observe(se),function(){return A==null?void 0:A.unobserve(se)}}},[P]),T.useEffect(function(){var se=U.current!==o,oe=Z.current!==R,fe=te.current!==I;Y.current&&(se||oe||fe)&&(se&&(U.current=o),oe&&(Z.current=R),fe&&(te.current=I),B.getState().updateNodeDimensions([{id:i,nodeElement:Y.current,forceUpdate:!0}]))},[i,o,R,I]);var K=F2({nodeRef:Y,disabled:P||!w,noDragClassName:D,handleSelector:k,nodeId:i,isSelectable:E,selectNodesOnDrag:S});return P?null:T.createElement("div",{className:cr(["react-flow__node","react-flow__node-".concat(o),j,b,{selected:d,selectable:E,parent:$}]),ref:Y,style:MP({zIndex:L,transform:"translate(".concat(u,"px,").concat(l,"px)"),pointerEvents:re?"all":"none",visibility:G?"visible":"hidden"},x),onMouseEnter:ae,onMouseMove:le,onMouseLeave:F,onContextMenu:W,onClick:H,onDoubleClick:J,"data-testid":"rf__node-".concat(i),"data-id":i},T.createElement(gY,{value:i},T.createElement(e,{id:i,data:a,type:o,xPos:u,yPos:l,selected:d,isConnectable:_,sourcePosition:R,targetPosition:I,dragging:K,dragHandle:k,zIndex:L})))};return t.displayName="NodeWrapper",T.memo(t)});function DP(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 jP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x9(e){var t={input:ca(e.input||q2),default:ca(e.default||Kb),output:ca(e.output||L2),group:ca(e.group||W2)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=ca(e[o]||Kb),i},r);return jP(jP({},t),n)}function qP(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 kP(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 G2=function(t){var r=t.children,n=!0;try{Ft()}catch{n=!1}return n?T.createElement(T.Fragment,null,r):T.createElement(LK,{createStore:BK},r)};G2.displayName="ReactFlowWrapper";var w9=["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 LP(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?LP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}kP(RY),kP(PY);var _9={input:q2,default:Kb,output:L2},E9={default:Wb,straight:T2,step:N2,smoothstep:Fx,simplebezier:I2},S9=[15,15],O9=[0,0],K2=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?_9:u,d=e.edgeTypes,f=d===void 0?E9: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,P=e.onNodeMouseEnter,A=e.onNodeMouseMove,k=e.onNodeMouseLeave,L=e.onNodeContextMenu,$=e.onNodeDoubleClick,j=e.onNodeDragStart,D=e.onNodeDrag,G=e.onNodeDragStop,B=e.onNodesDelete,Y=e.onEdgesDelete,Z=e.onSelectionChange,te=e.onSelectionDragStart,U=e.onSelectionDrag,re=e.onSelectionDragStop,ae=e.onSelectionContextMenu,le=e.connectionMode,F=le===void 0?So.Strict:le,W=e.connectionLineType,J=W===void 0?$n.Bezier:W,H=e.connectionLineStyle,K=e.connectionLineComponent,se=e.connectionLineContainerStyle,oe=e.deleteKeyCode,fe=oe===void 0?"Backspace":oe,V=e.selectionKeyCode,ee=V===void 0?"Shift":V,we=e.multiSelectionKeyCode,be=we===void 0?"Meta":we,de=e.zoomActivationKeyCode,ue=de===void 0?"Meta":de,Ee=e.snapToGrid,Pe=Ee===void 0?!1:Ee,Ze=e.snapGrid,ze=Ze===void 0?S9:Ze,Fe=e.onlyRenderVisibleElements,Ve=Fe===void 0?!1:Fe,lt=e.selectNodesOnDrag,ct=lt===void 0?!0:lt,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,Ur=e.defaultPosition,Yn=Ur===void 0?O9:Ur,Cn=e.translateExtent,dr=Cn===void 0?Vb:Cn,Mi=e.preventScrolling,vc=Mi===void 0?!0:Mi,gc=e.nodeExtent,ko=e.defaultMarkerColor,ls=ko===void 0?"#b1b1b7":ko,cs=e.zoomOnScroll,mc=cs===void 0?!0:cs,fs=e.zoomOnPinch,yc=fs===void 0?!0:fs,Lo=e.panOnScroll,bc=Lo===void 0?!1:Lo,ds=e.panOnScrollSpeed,xc=ds===void 0?.5:ds,Di=e.panOnScrollMode,wc=Di===void 0?ho.Free:Di,ji=e.zoomOnDoubleClick,_c=ji===void 0?!0:ji,hs=e.panOnDrag,Ec=hs===void 0?!0:hs,Sc=e.onPaneClick,Oc=e.onPaneScroll,ps=e.onPaneContextMenu,Cc=e.children,Rc=e.onEdgeUpdate,vs=e.onEdgeContextMenu,Ic=e.onEdgeDoubleClick,Pc=e.onEdgeMouseEnter,Nc=e.onEdgeMouseMove,Tc=e.onEdgeMouseLeave,Ac=e.onEdgeUpdateStart,Mc=e.onEdgeUpdateEnd,Xn=e.edgeUpdaterRadius,Dc=Xn===void 0?10:Xn,qi=e.onNodesChange,jc=e.onEdgesChange,gs=e.noDragClassName,qc=gs===void 0?"nodrag":gs,Bo=e.noWheelClassName,ms=Bo===void 0?"nowheel":Bo,Fo=e.noPanClassName,kc=Fo===void 0?"nopan":Fo,ys=e.fitView,Lc=ys===void 0?!1:ys,Bc=e.fitViewOptions,$o=e.connectOnClick,bs=$o===void 0?!0:$o,xs=e.attributionPosition,zo=e.proOptions,Fc=e.defaultEdgeOptions,Ho=e.elevateEdgesOnSelect,ki=Ho===void 0?!1:Ho,Zn=zl(e,w9),$c=qP(l,x9),ws=qP(f,AY);return T.createElement("div",BP(BP({},Zn),{},{ref:t,className:cr(["react-flow",a])}),T.createElement(G2,null,T.createElement(b9,{onInit:v,onMove:m,onMoveStart:y,onMoveEnd:x,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:P,onNodeMouseMove:A,onNodeMouseLeave:k,onNodeContextMenu:L,onNodeDoubleClick:$,nodeTypes:$c,edgeTypes:ws,connectionLineType:J,connectionLineStyle:H,connectionLineComponent:K,connectionLineContainerStyle:se,selectionKeyCode:ee,deleteKeyCode:fe,multiSelectionKeyCode:be,zoomActivationKeyCode:ue,onlyRenderVisibleElements:Ve,selectNodesOnDrag:ct,translateExtent:dr,minZoom:Jt,maxZoom:Dt,defaultZoom:jt,defaultPosition:Yn,preventScrolling:vc,zoomOnScroll:mc,zoomOnPinch:yc,zoomOnDoubleClick:_c,panOnScroll:bc,panOnScrollSpeed:xc,panOnScrollMode:wc,panOnDrag:Ec,onPaneClick:Sc,onPaneScroll:Oc,onPaneContextMenu:ps,onSelectionContextMenu:ae,onEdgeUpdate:Rc,onEdgeContextMenu:vs,onEdgeDoubleClick:Ic,onEdgeMouseEnter:Pc,onEdgeMouseMove:Nc,onEdgeMouseLeave:Tc,onEdgeUpdateStart:Ac,onEdgeUpdateEnd:Mc,edgeUpdaterRadius:Dc,defaultMarkerColor:ls,noDragClassName:qc,noWheelClassName:ms,noPanClassName:kc,elevateEdgesOnSelect:ki,id:Zn==null?void 0:Zn.id}),T.createElement(OY,{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:gc,onNodesChange:qi,onEdgesChange:jc,snapToGrid:Pe,snapGrid:ze,connectionMode:F,translateExtent:dr,connectOnClick:bs,defaultEdgeOptions:Fc,fitView:Lc,fitViewOptions:Bc,onNodesDelete:B,onEdgesDelete:Y,onNodeDragStart:j,onNodeDrag:D,onNodeDragStop:G,onSelectionDrag:U,onSelectionDragStart:te,onSelectionDragStop:re}),Z&&T.createElement(EY,{onSelectionChange:Z}),Cc,T.createElement(uY,{proOptions:zo,position:xs})))});K2.displayName="ReactFlow";function Y2(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 C9=Y2(g2),R9=Y2(TK);function FP(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 $P(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?Se.Left:o>=n+r.width-1?Se.Right:a<=i+1?Se.Top:a>=r.y+r.height-1?Se.Bottom:Se.Top}function X2(e,t){const r=FP(e,t),n=FP(t,e),i=$P(e,r),o=$P(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const I9=({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}=X2(i,o),l=Vl({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}=X2(o,a),v=Vl({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})},zP=172,HP=36,N9={custom:P9},T9=(e,t,r="LR")=>{const n=new RI.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:zP,height:HP})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),RI.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?Se.Left:Se.Top,o.sourcePosition=i?Se.Right:Se.Bottom,o.position={x:a.x-zP/2,y:a.y-HP/2},o}),{nodes:e,edges:t}},A9=()=>{},M9=({data:e,dict:t,onSelect:r=A9})=>{const{nodes:n,edges:i}=T9(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:Se.Right,targetPosition:Se.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]=C9(n),[l,d,f]=R9(i);return T.useEffect(()=>{a([...n]),d([...i])},[e]),C.jsx(K2,{nodes:o,edges:l,fitView:!0,onNodesChange:u,onEdgesChange:f,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:N9,connectionLineComponent:I9,children:C.jsx(aY,{variant:wi.Dots,color:"#81818140",gap:18,size:1})})};var Z2=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(Z2||{});const J2=e=>{switch(e){case"entityCollection":return Q.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return Q.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return Q.ESubPermissionType.DS_METHOD;case"entity":return Q.ESubPermissionType.ENTITY_METHOD;default:return Q.EPermissionType.METHOD}},VP=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[Z2[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===Q.EPermissionType.METHOD&&(l.subType=J2(a.applyTo)),n.push(l)}});return n},D9=(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:Q.EPermissionType.SINGLETON_METHOD})});return r};function zx(e,t=[],r=[],n=[]){const i=VP(r,e,Q.EPermissionType.ATTRIBUTE),o=VP(r,e,Q.EPermissionType.METHOD),a=D9(n,e),u=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:Q.ESubPermissionType.DS_METHOD})),l=[],d=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{l.push({applyTo:h.name,type:Q.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{d.push({applyTo:h.name,type:Q.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:Q.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 j9=(e=[],t=[],r=[])=>{const n=zx("",e,t,r),i={ds:{applyTo:"ds",type:Q.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===Q.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:l,type:Q.EPermissionType.DATACLASS,methods:[],attributes:[]}):u.type===Q.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:l,type:Q.EPermissionType.SINGLETON,methods:[],attributes:[]})),d){const f=(h,p,v)=>{h.forEach(m=>{m.applyTo===l&&m[p].push(v)})};[Q.ESubPermissionType.DS_METHOD,Q.ESubPermissionType.DATACLASS_METHOD,Q.ESubPermissionType.ENTITY_METHOD,Q.ESubPermissionType.ENTITY_SEL_METHOD].includes(u.type)?l==="ds"?i.ds.methods.push(u):f(i.ds.dataClasses,"methods",u):u.type===Q.EPermissionType.ATTRIBUTE?(f(i.ds.dataClasses,"attributes",u),f(i.ds.singletons,"attributes",u)):u.type===Q.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},Q2=(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===Q.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:J2(h)}}return o})}}),r},eq=(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 Q.EPermissionType.DATASTORE:l=!!t;break;case Q.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 Q.ESubPermissionType.DS_METHOD:l=!!t.methods.find(b=>b.name===u&&b.applyTo==="dataStore");break;case Q.EPermissionType.DATACLASS:l=!!t.dataClasses[a];break;case Q.EPermissionType.ATTRIBUTE:l=!!((p=(h=t.dataClasses[a])==null?void 0:h.attributes)!=null&&p.find(b=>b.name===u));break;case Q.ESubPermissionType.ENTITY_SEL_METHOD:l=!!((v=t.dataClasses[a])!=null&&v.methods.find(b=>b.name===u&&b.applyTo==="entityCollection"));break;case Q.ESubPermissionType.DATACLASS_METHOD:l=!!((m=t.dataClasses[a])!=null&&m.methods.find(b=>b.name===u&&b.applyTo==="dataClass"));break;case Q.ESubPermissionType.ENTITY_METHOD:l=!!((y=t.dataClasses[a])!=null&&y.methods.find(b=>b.name===u&&b.applyTo==="entity"));break;case Q.EPermissionType.SINGLETON_METHOD:l=!!((x=t.singletons[a])!=null&&x.methods.find(b=>b.name===u));break;case Q.EPermissionType.SINGLETON:l=!!t.singletons[a];break;default:l=!0}return{...o,exists:l}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{}),qm=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=Q.useAppDispatch(),a=Q.useAppSelector(Q.selectPrivileges);function u(){const d=Q.addIn(t.id,e.id,a);o(Q.updatePrivileges(d))}function l(){const d=Q.removeFrom(t.id,e.id,a);o(Q.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(xe.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(xe.FdPlus,{className:"text-white"})})})]})},q9=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=Q.getPrivilegeById(e.id,t);let u=a?Q.populateShallow(a.includes,t):[],l=a?Q.populateShallow(Q.parents(a.id,t),t):[],d=a?Q.populateShallow(Q.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(qm,{child:f,parent:e,status:"included",onSelect:r,currentPrivilegeId:f.id},f.id)),d.map(f=>C.jsx(qm,{child:f,parent:e,status:"available",onSelect:r,currentPrivilegeId:f.id},f.id)),l.map(f=>C.jsx(qm,{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 tq(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,k9(i,...t)]}function k9(...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 _i=globalThis!=null&&globalThis.document?ve.useLayoutEffect:()=>{},L9=ve[" useInsertionEffect ".trim().toString()]||_i;function B9({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,a]=F9({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=$9(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 F9({defaultProp:e,onChange:t}){const[r,n]=ve.useState(e),i=ve.useRef(r),o=ve.useRef(t);return L9(()=>{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 $9(e){return typeof e=="function"}function UP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rq(...e){return t=>{let r=!1;const n=e.map(i=>{const o=UP(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():UP(e[i],null)}}}}function To(...e){return ve.useCallback(rq(...e),e)}const z9=["top","right","bottom","left"],zn=Math.min,ar=Math.max,tl=Math.round,yu=Math.floor,rn=e=>({x:e,y:e}),H9={left:"right",right:"left",bottom:"top",top:"bottom"};function Xb(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 Ao(e){return e.split("-")[1]}function Hx(e){return e==="x"?"y":"x"}function Vx(e){return e==="y"?"height":"width"}function Qr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ux(e){return Hx(Qr(e))}function V9(e,t,r){r===void 0&&(r=!1);const n=Ao(e),i=Ux(e),o=Vx(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=rl(a)),[a,rl(a)]}function U9(e){const t=rl(e);return[Zb(e),t,Zb(t)]}function Zb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const WP=["left","right"],GP=["right","left"],W9=["top","bottom"],G9=["bottom","top"];function K9(e,t,r){switch(e){case"top":case"bottom":return r?t?GP:WP:t?WP:GP;case"left":case"right":return t?W9:G9;default:return[]}}function Y9(e,t,r,n){const i=Ao(e);let o=K9(_n(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Zb)))),o}function rl(e){const t=_n(e);return H9[t]+e.slice(t.length)}function X9(e){return{top:0,right:0,bottom:0,left:0,...e}}function nq(e){return typeof e!="number"?X9(e):{top:e,right:e,bottom:e,left:e}}function nl(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 KP(e,t,r){let{reference:n,floating:i}=e;const o=Qr(t),a=Ux(t),u=Vx(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(Ao(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 Z9(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=nq(v),x=u[p?h==="floating"?"reference":"floating":h],b=nl(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=nl(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 J9=50,Q9=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=a.detectOverflow?a:{...a,detectOverflow:Z9},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}=KP(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<J9&&(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}=KP(d,p,l)),y=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:m}},e7=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=nq(f),p={x:r,y:n},v=Ux(i),m=Vx(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 P=_/2-S/2,A=I/2-y[m]/2-1,k=zn(h[b],A),L=zn(h[w],A),$=k,j=I-y[m]-L,D=I/2-y[m]/2+P,G=Xb($,D,j),B=!l.arrow&&Ao(i)!=null&&D!==G&&o.reference[m]/2-(D<$?k:L)-y[m]/2<0,Y=B?D<$?D-$:D-j:0;return{[v]:p[v]+Y,data:{[v]:G,centerOffset:D-G-Y,...B&&{alignmentOffset:Y}},reset:B}}}),t7=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?[rl(u)]:U9(u)),R=m!=="none";!p&&R&&S.push(...Y9(u,y,m,_));const I=[u,...S],P=await l.detectOverflow(t,x),A=[];let k=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&A.push(P[b]),h){const D=V9(i,a,_);A.push(P[D[0]],P[D[1]])}if(k=[...k,{placement:i,overflows:A}],!A.every(D=>D<=0)){var L,$;const D=(((L=o.flip)==null?void 0:L.index)||0)+1,G=I[D];if(G&&(!(h==="alignment"?w!==Qr(G):!1)||k.every(Z=>Qr(Z.placement)===w?Z.overflows[0]>0:!0)))return{data:{index:D,overflows:k},reset:{placement:G}};let B=($=k.filter(Y=>Y.overflows[0]<=0).sort((Y,Z)=>Y.overflows[1]-Z.overflows[1])[0])==null?void 0:$.placement;if(!B)switch(v){case"bestFit":{var j;const Y=(j=k.filter(Z=>{if(R){const te=Qr(Z.placement);return te===w||te==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(te=>te>0).reduce((te,U)=>te+U,0)]).sort((Z,te)=>Z[1]-te[1])[0])==null?void 0:j[0];Y&&(B=Y);break}case"initialPlacement":B=u;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function YP(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function XP(e){return z9.some(t=>e[t]>=0)}const r7=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=YP(a,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:XP(u)}}}case"escaped":{const a=await n.detectOverflow(t,{...o,altBoundary:!0}),u=YP(a,r.floating);return{data:{escapedOffsets:u,escaped:XP(u)}}}default:return{}}}}},iq=new Set(["left","top"]);async function n7(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=Ao(r),l=Qr(r)==="y",d=iq.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 i7=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 n7(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}}}}},o7=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=Hx(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=Xb(E,m,_)}if(u){const b=p==="y"?"top":"left",w=p==="y"?"bottom":"right",E=y+h[b],_=y-h[w];y=Xb(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}}}}}},a7=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=Hx(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",_=iq.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}}}},s7=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=Ao(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=_,P=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(I=w),R&&!p){const k=ar(f.left,0),L=ar(f.right,0),$=ar(f.top,0),j=ar(f.bottom,0);v?P=m-2*(k!==0||L!==0?k+L:ar(f.left,f.right)):I=y-2*($!==0||j!==0?$+j:ar(f.top,f.bottom))}await l({...t,availableWidth:P,availableHeight:I});const A=await a.getDimensions(u.floating);return m!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function Ul(){return typeof window<"u"}function Mo(e){return oq(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=(oq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function oq(e){return Ul()?e instanceof Node||e instanceof sr(e).Node:!1}function $r(e){return Ul()?e instanceof Element||e instanceof sr(e).Element:!1}function On(e){return Ul()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function ZP(e){return!Ul()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}function ns(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 u7(e){return/^(table|td|th)$/.test(Mo(e))}function Wl(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const l7=/transform|translate|scale|rotate|perspective|filter/,c7=/paint|layout|strict|content/,si=e=>!!e&&e!=="none";let km;function Wx(e){const t=$r(e)?zr(e):e;return si(t.transform)||si(t.translate)||si(t.scale)||si(t.rotate)||si(t.perspective)||!Gx()&&(si(t.backdropFilter)||si(t.filter))||l7.test(t.willChange||"")||c7.test(t.contain||"")}function f7(e){let t=Hn(e);for(;On(t)&&!Oo(t);){if(Wx(t))return t;if(Wl(t))return null;t=Hn(t)}return null}function Gx(){return km==null&&(km=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),km}function Oo(e){return/^(html|body|#document)$/.test(Mo(e))}function zr(e){return sr(e).getComputedStyle(e)}function Gl(e){return $r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hn(e){if(Mo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ZP(e)&&e.host||sn(e);return ZP(t)?t.host:t}function aq(e){const t=Hn(e);return Oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:On(t)&&ns(t)?t:aq(t)}function Ua(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=aq(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=sr(i);if(o){const u=Jb(a);return t.concat(a,a.visualViewport||[],ns(i)?i:[],u&&r?Ua(u):[])}else return t.concat(i,Ua(i,[],r))}function Jb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function sq(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=tl(r)!==o||tl(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function Kx(e){return $r(e)?e:e.contextElement}function vo(e){const t=Kx(e);if(!On(t))return rn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=sq(t);let a=(o?tl(r.width):r.width)/n,u=(o?tl(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const d7=rn(0);function uq(e){const t=sr(e);return!Gx()||!t.visualViewport?d7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function h7(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==sr(e)?!1:t}function Ei(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=Kx(e);let a=rn(1);t&&(n?$r(n)&&(a=vo(n)):a=vo(e));const u=h7(o,r,n)?uq(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=Jb(m);for(;y&&n&&v!==m;){const x=vo(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=Jb(m)}}return nl({width:f,height:h,x:l,y:d})}function Kl(e,t){const r=Gl(e).scrollLeft;return t?t.left+r:Ei(sn(e)).left+r}function lq(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Kl(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function p7(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",a=sn(n),u=t?Wl(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)&&((Mo(n)!=="body"||ns(a))&&(l=Gl(n)),h)){const v=Ei(n);d=vo(n),f.x=v.x+n.clientLeft,f.y=v.y+n.clientTop}const p=a&&!h&&!o?lq(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 v7(e){return Array.from(e.getClientRects())}function g7(e){const t=sn(e),r=Gl(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+Kl(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 JP=25;function m7(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=Gx();(!f||f&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}const d=Kl(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<=JP&&(o-=m)}else d<=JP&&(o+=d);return{width:o,height:a,x:u,y:l}}function y7(e,t){const r=Ei(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=On(e)?vo(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 QP(e,t,r){let n;if(t==="viewport")n=m7(e,r);else if(t==="document")n=g7(sn(e));else if($r(t))n=y7(t,r);else{const i=uq(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return nl(n)}function cq(e,t){const r=Hn(e);return r===t||!$r(r)||Oo(r)?!1:zr(r).position==="fixed"||cq(r,t)}function b7(e,t){const r=t.get(e);if(r)return r;let n=Ua(e,[],!1).filter(u=>$r(u)&&Mo(u)!=="body"),i=null;const o=zr(e).position==="fixed";let a=o?Hn(e):e;for(;$r(a)&&!Oo(a);){const u=zr(a),l=Wx(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||ns(a)&&!l&&cq(e,a))?n=n.filter(f=>f!==a):i=u,a=Hn(a)}return t.set(e,n),n}function x7(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?Wl(t)?[]:b7(t,this._c):[].concat(r),n],u=QP(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=QP(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 w7(e){const{width:t,height:r}=sq(e);return{width:t,height:r}}function _7(e,t,r){const n=On(t),i=sn(t),o=r==="fixed",a=Ei(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const l=rn(0);function d(){l.x=Kl(i)}if(n||!n&&!o)if((Mo(t)!=="body"||ns(i))&&(u=Gl(t)),n){const v=Ei(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?lq(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 Lm(e){return zr(e).position==="static"}function eN(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 fq(e,t){const r=sr(e);if(Wl(e))return r;if(!On(e)){let i=Hn(e);for(;i&&!Oo(i);){if($r(i)&&!Lm(i))return i;i=Hn(i)}return r}let n=eN(e,t);for(;n&&u7(n)&&Lm(n);)n=eN(n,t);return n&&Oo(n)&&Lm(n)&&!Wx(n)?r:n||f7(e)||r}const E7=async function(e){const t=this.getOffsetParent||fq,r=this.getDimensions,n=await r(e.floating);return{reference:_7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function S7(e){return zr(e).direction==="rtl"}const O7={convertOffsetParentRelativeRectToViewportRelativeRect:p7,getDocumentElement:sn,getClippingRect:x7,getOffsetParent:fq,getElementRects:E7,getClientRects:v7,getDimensions:w7,getScale:vo,isElement:$r,isRTL:S7};function dq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function C7(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=yu(h),y=yu(i.clientWidth-(f+p)),x=yu(i.clientHeight-(h+v)),b=yu(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&&!dq(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 R7(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=Kx(e),f=i||o?[...d?Ua(d):[],...t?Ua(t):[]]:[];f.forEach(b=>{i&&b.addEventListener("scroll",r,{passive:!0}),o&&b.addEventListener("resize",r)});const h=d&&u?C7(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?Ei(e):null;l&&x();function x(){const b=Ei(e);y&&!dq(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 I7=i7,P7=o7,N7=t7,T7=s7,A7=r7,tN=e7,M7=a7,D7=(e,t,r)=>{const n=new Map,i={platform:O7,...r},o={...i.platform,_c:n};return Q9(e,t,{...i,platform:o})};var j7=typeof document<"u",q7=function(){},qu=j7?T.useLayoutEffect:q7;function il(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(!il(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)&&!il(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function hq(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function rN(e,t){const r=hq(e);return Math.round(t*r)/r}function Bm(e){const t=ve.useRef(e);return qu(()=>{t.current=e}),t}function k7(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);il(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),P=ve.useRef(f),A=l!=null,k=Bm(l),L=Bm(i),$=Bm(d),j=ve.useCallback(()=>{if(!R.current||!I.current)return;const Z={placement:t,strategy:r,middleware:p};L.current&&(Z.platform=L.current),D7(R.current,I.current,Z).then(te=>{const U={...te,isPositioned:$.current!==!1};D.current&&!il(P.current,U)&&(P.current=U,ix.flushSync(()=>{h(U)}))})},[p,t,r,L,$]);qu(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,h(Z=>({...Z,isPositioned:!1})))},[d]);const D=ve.useRef(!1);qu(()=>(D.current=!0,()=>{D.current=!1}),[]),qu(()=>{if(_&&(R.current=_),S&&(I.current=S),_&&S){if(k.current)return k.current(_,S,j);j()}},[_,S,j,k,A]);const G=ve.useMemo(()=>({reference:R,floating:I,setReference:w,setFloating:E}),[w,E]),B=ve.useMemo(()=>({reference:_,floating:S}),[_,S]),Y=ve.useMemo(()=>{const Z={position:r,left:0,top:0};if(!B.floating)return Z;const te=rN(B.floating,f.x),U=rN(B.floating,f.y);return u?{...Z,transform:"translate("+te+"px, "+U+"px)",...hq(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:te,top:U}},[r,u,B.floating,f.x,f.y]);return ve.useMemo(()=>({...f,update:j,refs:G,elements:B,floatingStyles:Y}),[f,j,G,B,Y])}const L7=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?tN({element:n.current,padding:i}).fn(r):{}:n?tN({element:n,padding:i}).fn(r):{}}}},B7=(e,t)=>{const r=I7(e);return{name:r.name,fn:r.fn,options:[e,t]}},F7=(e,t)=>{const r=P7(e);return{name:r.name,fn:r.fn,options:[e,t]}},$7=(e,t)=>({fn:M7(e).fn,options:[e,t]}),z7=(e,t)=>{const r=N7(e);return{name:r.name,fn:r.fn,options:[e,t]}},H7=(e,t)=>{const r=T7(e);return{name:r.name,fn:r.fn,options:[e,t]}},V7=(e,t)=>{const r=A7(e);return{name:r.name,fn:r.fn,options:[e,t]}},U7=(e,t)=>{const r=L7(e);return{name:r.name,fn:r.fn,options:[e,t]}};function W7(e){const t=G7(e),r=ve.forwardRef((n,i)=>{const{children:o,...a}=n,u=ve.Children.toArray(o),l=u.find(Y7);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 G7(e){const t=ve.forwardRef((r,n)=>{const{children:i,...o}=r;if(ve.isValidElement(i)){const a=Z7(i),u=X7(o,i.props);return i.type!==ve.Fragment&&(u.ref=n?rq(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 K7=Symbol("radix.slottable");function Y7(e){return ve.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===K7}function X7(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 Z7(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 J7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pi=J7.reduce((e,t)=>{const r=W7(`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 Q7(e,t){e&&ix.flushSync(()=>e.dispatchEvent(t))}var eX="Arrow",pq=ve.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return C.jsx(Pi.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"})})});pq.displayName=eX;var tX=pq;function Yl(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 rX(e){const[t,r]=ve.useState(void 0);return _i(()=>{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 Yx="Popper",[vq,gq]=tq(Yx),[nX,mq]=vq(Yx),yq=e=>{const{__scopePopper:t,children:r}=e,[n,i]=ve.useState(null);return C.jsx(nX,{scope:t,anchor:n,onAnchorChange:i,children:r})};yq.displayName=Yx;var bq="PopperAnchor",xq=ve.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=mq(bq,r),a=ve.useRef(null),u=To(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(Pi.div,{...i,ref:u})});xq.displayName=bq;var Xx="PopperContent",[iX,oX]=vq(Xx),wq=ve.forwardRef((e,t)=>{var H,K,se,oe,fe,V;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=mq(Xx,r),[b,w]=ve.useState(null),E=To(t,ee=>w(ee)),[_,S]=ve.useState(null),R=rX(_),I=(R==null?void 0:R.width)??0,P=(R==null?void 0:R.height)??0,A=n+(o!=="center"?"-"+o:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(d)?d:[d],$=L.length>0,j={padding:k,boundary:L.filter(sX),altBoundary:$},{refs:D,floatingStyles:G,placement:B,isPositioned:Y,middlewareData:Z}=k7({strategy:"fixed",placement:A,whileElementsMounted:(...ee)=>R7(...ee,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[B7({mainAxis:i+P,alignmentAxis:a}),l&&F7({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?$7():void 0,...j}),l&&z7({...j}),H7({...j,apply:({elements:ee,rects:we,availableWidth:be,availableHeight:de})=>{const{width:ue,height:Ee}=we.reference,Pe=ee.floating.style;Pe.setProperty("--radix-popper-available-width",`${be}px`),Pe.setProperty("--radix-popper-available-height",`${de}px`),Pe.setProperty("--radix-popper-anchor-width",`${ue}px`),Pe.setProperty("--radix-popper-anchor-height",`${Ee}px`)}}),_&&U7({element:_,padding:u}),uX({arrowWidth:I,arrowHeight:P}),p&&V7({strategy:"referenceHidden",...j})]}),[te,U]=Sq(B),re=Yl(m);_i(()=>{Y&&(re==null||re())},[Y,re]);const ae=(H=Z.arrow)==null?void 0:H.x,le=(K=Z.arrow)==null?void 0:K.y,F=((se=Z.arrow)==null?void 0:se.centerOffset)!==0,[W,J]=ve.useState();return _i(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),C.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:Y?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(oe=Z.transformOrigin)==null?void 0:oe.x,(fe=Z.transformOrigin)==null?void 0:fe.y].join(" "),...((V=Z.hide)==null?void 0:V.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:C.jsx(iX,{scope:r,placedSide:te,onArrowChange:S,arrowX:ae,arrowY:le,shouldHideArrow:F,children:C.jsx(Pi.div,{"data-side":te,"data-align":U,...y,ref:E,style:{...y.style,animation:Y?void 0:"none"}})})})});wq.displayName=Xx;var _q="PopperArrow",aX={top:"bottom",right:"left",bottom:"top",left:"right"},Eq=ve.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=oX(_q,n),a=aX[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(tX,{...i,ref:r,style:{...i.style,display:"block"}})})});Eq.displayName=_q;function sX(e){return e!==null}var uX=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]=Sq(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 Sq(e){const[t,r="center"]=e.split("-");return[t,r]}var lX=yq,cX=xq,fX=wq,dX=Eq,hX="Portal",Oq=ve.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=ve.useState(!1);_i(()=>o(!0),[]);const a=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?nx.createPortal(C.jsx(Pi.div,{...n,ref:t}),a):null});Oq.displayName=hX;function pX(e,t){return ve.useReducer((r,n)=>t[r][n]??r,e)}var Zx=e=>{const{present:t,children:r}=e,n=vX(t),i=typeof r=="function"?r({present:n.isPresent}):ve.Children.only(r),o=To(n.ref,gX(i));return typeof r=="function"||n.isPresent?ve.cloneElement(i,{ref:o}):null};Zx.displayName="Presence";function vX(e){const[t,r]=ve.useState(),n=ve.useRef(null),i=ve.useRef(e),o=ve.useRef("none"),a=e?"mounted":"unmounted",[u,l]=pX(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ve.useEffect(()=>{const d=bu(n.current);o.current=u==="mounted"?d:"none"},[u]),_i(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,v=bu(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]),_i(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=v=>{const y=bu(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=bu(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 bu(e){return(e==null?void 0:e.animationName)||"none"}function gX(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 mX(e,t=globalThis==null?void 0:globalThis.document){const r=Yl(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 yX="DismissableLayer",Qb="dismissableLayer.update",bX="dismissableLayer.pointerDownOutside",xX="dismissableLayer.focusOutside",nN,Cq=ve.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rq=ve.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...l}=e,d=ve.useContext(Cq),[f,h]=ve.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=ve.useState({}),m=To(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=EX(I=>{const P=I.target,A=[...d.branches].some(k=>k.contains(P));!_||A||(i==null||i(I),a==null||a(I),I.defaultPrevented||u==null||u())},p),R=SX(I=>{const P=I.target;[...d.branches].some(k=>k.contains(P))||(o==null||o(I),a==null||a(I),I.defaultPrevented||u==null||u())},p);return mX(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&&(nN=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),iN(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=nN)}},[f,p,r,d]),ve.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),iN())},[f,d]),ve.useEffect(()=>{const I=()=>v({});return document.addEventListener(Qb,I),()=>document.removeEventListener(Qb,I)},[]),C.jsx(Pi.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)})});Rq.displayName=yX;var wX="DismissableLayerBranch",_X=ve.forwardRef((e,t)=>{const r=ve.useContext(Cq),n=ve.useRef(null),i=To(t,n);return ve.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),C.jsx(Pi.div,{...e,ref:i})});_X.displayName=wX;function EX(e,t=globalThis==null?void 0:globalThis.document){const r=Yl(e),n=ve.useRef(!1),i=ve.useRef(()=>{});return ve.useEffect(()=>{const o=u=>{if(u.target&&!n.current){let l=function(){Iq(bX,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 SX(e,t=globalThis==null?void 0:globalThis.document){const r=Yl(e),n=ve.useRef(!1);return ve.useEffect(()=>{const i=o=>{o.target&&!n.current&&Iq(xX,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 iN(){const e=new CustomEvent(Qb);document.dispatchEvent(e)}function Iq(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?Q7(i,o):i.dispatchEvent(o)}var Fm,Xl="HoverCard",[Pq]=tq(Xl,[gq]),Zl=gq(),[OX,Jl]=Pq(Xl),Nq=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:u=300}=e,l=Zl(t),d=ve.useRef(0),f=ve.useRef(0),h=ve.useRef(!1),p=ve.useRef(!1),[v,m]=B9({prop:n,defaultProp:i??!1,onChange:o,caller:Xl}),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(OX,{scope:t,open:v,onOpenChange:m,onOpen:y,onClose:x,onDismiss:b,hasSelectionRef:h,isPointerDownOnContentRef:p,children:C.jsx(lX,{...l,children:r})})};Nq.displayName=Xl;var Tq="HoverCardTrigger",Aq=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Jl(Tq,r),o=Zl(r);return C.jsx(cX,{asChild:!0,...o,children:C.jsx(Pi.a,{"data-state":i.open?"open":"closed",...n,ref:t,onPointerEnter:wr(e.onPointerEnter,al(i.onOpen)),onPointerLeave:wr(e.onPointerLeave,al(i.onClose)),onFocus:wr(e.onFocus,i.onOpen),onBlur:wr(e.onBlur,i.onClose),onTouchStart:wr(e.onTouchStart,a=>a.preventDefault())})})});Aq.displayName=Tq;var Jx="HoverCardPortal",[CX,RX]=Pq(Jx,{forceMount:void 0}),Mq=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,o=Jl(Jx,t);return C.jsx(CX,{scope:t,forceMount:r,children:C.jsx(Zx,{present:r||o.open,children:C.jsx(Oq,{asChild:!0,container:i,children:n})})})};Mq.displayName=Jx;var ol="HoverCardContent",Dq=ve.forwardRef((e,t)=>{const r=RX(ol,e.__scopeHoverCard),{forceMount:n=r.forceMount,...i}=e,o=Jl(ol,e.__scopeHoverCard);return C.jsx(Zx,{present:n||o.open,children:C.jsx(IX,{"data-state":o.open?"open":"closed",...i,onPointerEnter:wr(e.onPointerEnter,al(o.onOpen)),onPointerLeave:wr(e.onPointerLeave,al(o.onClose)),ref:t})})});Dq.displayName=ol;var IX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,...u}=e,l=Jl(ol,r),d=Zl(r),f=ve.useRef(null),h=To(t,f),[p,v]=ve.useState(!1);return ve.useEffect(()=>{if(p){const m=document.body;return Fm=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=Fm,m.style.webkitUserSelect=Fm}}},[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&&TX(f.current).forEach(y=>y.setAttribute("tabindex","-1"))}),C.jsx(Rq,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:wr(o,m=>{m.preventDefault()}),onDismiss:l.onDismiss,children:C.jsx(fX,{...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",NX=ve.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=Zl(r);return C.jsx(dX,{...i,...n,ref:t})});NX.displayName=PX;function al(e){return t=>t.pointerType==="touch"?void 0:e()}function TX(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 Qx=Nq,ew=Aq,Lr=Mq,Br=Dq;function to(e,t,r){let n=r.initialDeps??[],i,o=!0;function a(){var u,l,d;let f;r.key&&((u=r.debug)!=null&&u.call(r))&&(f=Date.now());const h=e();if(!(h.length!==n.length||h.some((m,y)=>n[y]!==m)))return i;n=h;let v;if(r.key&&((l=r.debug)!=null&&l.call(r))&&(v=Date.now()),i=t(...h),r.key&&((d=r.debug)!=null&&d.call(r))){const m=Math.round((Date.now()-f)*100)/100,y=Math.round((Date.now()-v)*100)/100,x=y/16,b=(w,E)=>{for(w=String(w);w.length<E;)w=" "+w;return w};console.info(`%c⏱ ${b(y,5)} /${b(m,5)} ms`,`
19
8
  font-size: .6rem;
20
9
  font-weight: bold;
21
- color: hsl(${Math.max(0,Math.min(120-120*m,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 EG=(e,t)=>Math.abs(e-t)<1.01,SG=(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?()=>{}:SG(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=ta(()=>(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=ta(()=>[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=ta(()=>[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 m,b;if(x!==void 0&&this.options.lanes>1){m=x;const S=h[m],E=S!==void 0?d[S]:void 0;b=E?E.end+this.options.gap:n+i}else{const S=this.options.lanes===1?d[p-1]:this.getFurthestMeasurement(d,p);b=S?S.end+this.options.gap:n+i,m=S?S.lane:p%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(p,m)}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:m},h[m]=p}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=ta(()=>[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=ta(()=>{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=ta(()=>[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&&EG(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"?ht.useLayoutEffect:ht.useEffect;function MG({useFlushSync:e=!0,...t}){const r=ht.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var s;e&&a?Qn.flushSync(r):r(),(s=t.onChange)==null||s.call(t,o,a)}},[i]=ht.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),hr=()=>{const e=C.useContext(d3);if(!e)throw new Error("Select compound components must be used within Select.Root");return e},er={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"}},Rt={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=()=>me("flex flex-col relative"),jG=({size:e,color:t,isDisabled:r,hasMessage:n,isInvalid:i,isFocused:o,menuPlacement:a})=>{const s=Rt[i?"negative":t];return me("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}`],er[e].trigger,{"ring-1":n,[s.controlDisabled]:r})},qG=({size:e,color:t,isDisabled:r,isAction:n})=>{const i=Rt[t];return me("transition-colors duration-200 rounded max-h-full h-fit px-0.5",er[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=Rt[i?"negative":t];return a?me("flex items-center justify-between flex-1 min-w-0",er[e].control,"bg-transparent border-0",{[c.controlDisabled]:r}):me("flex items-center justify-between",n&&s?s==="top"?"rounded-b":"rounded-t":"rounded",er[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})=>me("flex items-center gap-1 flex-1 min-w-0 overflow-hidden",{"flex-wrap":e,"px-0.5":!e}),BG=({size:e,color:t})=>me("bg-transparent border-0 outline-hidden flex-1 min-w-7.5 text-input-text",er[e].input,Rt[t].placeholder),FG=({size:e,color:t})=>me("select-none truncate",er[e].placeholder,Rt[t].placeholder),$G=({size:e,color:t,isDisabled:r})=>me("truncate",er[e].singleValue,r?Rt[t].singleValueDisabled:Rt[t].singleValue),HG=({size:e,color:t,isDisabled:r,isFocused:n})=>me("inline-flex items-center rounded-xs",er[e].multiValue,r?Rt[t].multiValueDisabled:Rt[t].multiValue,{"border border-white":n&&!r}),VG=({size:e})=>me("truncate",er[e].multiValueLabel),WG=({size:e,color:t,isDisabled:r})=>me("flex items-center justify-center cursor-pointer transition-colors",er[e].multiValueRemove,Rt[t].multiValueRemove),f3=({size:e,color:t,isDisabled:r})=>me("flex items-center justify-center transition-colors rounded",er[e].clearIndicator,r?"hidden":[Rt[t].clearIndicator,Rt[t].clearIndicatorHover]),UG=({size:e,color:t,isDisabled:r})=>me("flex items-center justify-center transition-colors rounded",er[e].dropdownIndicator,r?"text-grey-200":[Rt[t].dropdownIndicator,Rt[t].dropdownIndicatorHover]),GG=({size:e,placement:t,hasMessage:r,color:n,hasGroup:i})=>{const o=t==="top";return me("absolute z-50 overflow-hidden border",i?"-left-px -right-px":"w-full",Rt[n].menu,{[Rt[n].messageBorder]:r},o?"bottom-full rounded-t rounded-b-none border-b-0":"top-full rounded-b border-t-0",er[e].menu)},KG=({size:e})=>me("overflow-y-auto",er[e].menuList,Rt.primary.menuList),YG=({size:e,color:t,isDisabled:r,isFocused:n,isSelected:i})=>me("transition-colors duration-150 cursor-pointer mx-1 rounded flex items-center gap-2",er[e].option,{[Rt[t].optionDisabled]:r,[Rt[t].optionSelected]:i&&!r,[Rt[t].optionFocused]:n&&!i&&!r,[Rt[t].option]:!i&&!n&&!r}),XG=({size:e})=>me(er[e].group),ZG=({size:e,color:t})=>me(er[e].groupHeading,Rt[t].groupHeading),JG=({size:e})=>me("text-grey-100",er[e].loadingMessage),QG=({size:e})=>me(er[e].noOptionsMessage,Rt.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 ke(){return ke=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},ke.apply(null,arguments)}function Ew(e,t){return Ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ew(e,t)}function tK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ew(e,t)}var Pc={exports:{}},kh={exports:{}},st={};/** @license React v16.13.1
10
+ color: hsl(${Math.max(0,Math.min(120-120*x,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=u=>{n=u},a}function oN(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const AX=(e,t)=>Math.abs(e-t)<1.01,MX=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},aN=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},DX=e=>e,jX=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},qX=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;const i=a=>{const{width:u,height:l}=a;t({width:Math.round(u),height:Math.round(l)})};if(i(aN(r)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const u=()=>{const l=a[0];if(l!=null&&l.borderBoxSize){const d=l.borderBoxSize[0];if(d){i({width:d.inlineSize,height:d.blockSize});return}}i(aN(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},sN={passive:!0},uN=typeof window>"u"?!0:"onscrollend"in window,kX=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&uN?()=>{}:MX(n,()=>{t(i,!1)},e.options.isScrollingResetDelay),a=f=>()=>{const{horizontal:h,isRtl:p}=e.options;i=h?r.scrollLeft*(p&&-1||1):r.scrollTop,o(),t(i,f)},u=a(!0),l=a(!1);r.addEventListener("scroll",u,sN);const d=e.options.useScrollendEvent&&uN;return d&&r.addEventListener("scrollend",l,sN),()=>{r.removeEventListener("scroll",u),d&&r.removeEventListener("scrollend",l)}},LX=(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"]},BX=(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 FX{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 u=o.target,l=this.indexFromElement(u);if(!u.isConnected){this.observer.unobserve(u);return}this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(u,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:DX,rangeExtractor:jX,onChange:()=>{},measureElement:LX,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=to(()=>(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 u=r[a];if(i.has(u.lane))continue;const l=o.get(u.lane);if(l==null||u.end>l.end?o.set(u.lane,u):u.end<l.end&&i.set(u.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,u)=>a.end===u.end?a.index-u.index:a.end-u.end)[0]:void 0},this.getMeasurementOptions=to(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,n,i,o,a,u)=>(this.prevLanes!==void 0&&this.prevLanes!==u&&(this.lanesChangedFlag=!0),this.prevLanes=u,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:u}),{key:!1}),this.getMeasurements=to(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:u},l)=>{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 d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const f=this.measurementsCache.slice(0,d),h=new Array(u).fill(void 0);for(let p=0;p<d;p++){const v=f[p];v&&(h[v.lane]=p)}for(let p=d;p<r;p++){const v=o(p),m=this.laneAssignments.get(p);let y,x;if(m!==void 0&&this.options.lanes>1){y=m;const _=h[y],S=_!==void 0?f[_]:void 0;x=S?S.end+this.options.gap:n+i}else{const _=this.options.lanes===1?f[p-1]:this.getFurthestMeasurement(f,p);x=_?_.end+this.options.gap:n+i,y=_?_.lane:p%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(p,y)}const b=l.get(v),w=typeof b=="number"?b:this.options.estimateSize(p),E=x+w;f[p]={index:p,start:x,size:w,end:E,key:v,lane:y},h[y]=p}return this.measurementsCache=f,f},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=to(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?$X({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=to(()=>{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),u=Math.min(this.options.count-1,i+o);return r>=a&&r<=u}return!0},this.measureElement=r=>{if(!r){this.elementsCache.forEach((a,u)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(u))});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,u=n-a;u!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,u,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",u),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=u,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.getVirtualItems=to(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,n)=>{const i=[];for(let o=0,a=r.length;o<a;o++){const u=r[o],l=n[u];i.push(l)}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 oN(n[jq(0,n.length-1,i=>oN(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 u=this.getMaxScrollOffset();return Math.max(Math.min(u,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 u=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,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,u]=o,l=this.now();this.scrollState={index:r,align:u,behavior:i,startedAt:l,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(u=>u===null);){const u=n[a];o[u.lane]===null&&(o[u.lane]=u.end),a--}i=Math.max(...o.filter(u=>u!==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 n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=n?n[0]:this.scrollState.lastTargetOffset,o=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&AX(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,a&&(this.scrollState.lastTargetOffset=i,this.scrollState.behavior="auto",this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const jq=(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 $X({measurements:e,outerSize:t,scrollOffset:r,lanes:n}){const i=e.length-1,o=l=>e[l].start;if(e.length<=n)return{startIndex:0,endIndex:i};let a=jq(0,i,o,r),u=a;if(n===1)for(;u<i&&e[u].end<r+t;)u++;else if(n>1){const l=Array(n).fill(0);for(;u<i&&l.some(f=>f<r+t);){const f=e[u];l[f.lane]=f.end,u++}const d=Array(n).fill(r+t);for(;a>=0&&d.some(f=>f>=r);){const f=e[a];d[f.lane]=f.start,a--}a=Math.max(0,a-a%n),u=Math.min(i,u+(n-1-u%n))}return{startIndex:a,endIndex:u}}const lN=typeof document<"u"?ve.useLayoutEffect:ve.useEffect;function zX({useFlushSync:e=!0,...t}){const r=ve.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var u;e&&a?nx.flushSync(r):r(),(u=t.onChange)==null||u.call(t,o,a)}},[i]=ve.useState(()=>new FX(n));return i.setOptions(n),lN(()=>i._didMount(),[]),lN(()=>i._willUpdate()),i}function Wa(e){return zX({observeElementRect:qX,observeElementOffset:kX,scrollToFn:BX,...e})}const HX=({item:e,depth:t})=>{const[r,n]=T.useState(!1),i=Q.useAppSelector(Q.selectPrivileges),o=Q.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(xe.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(qq,{depth:t+1,data:o})})]})},qq=({data:e,depth:t=0})=>e.map(r=>r.includes.length?C.jsx(HX,{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(`.${CD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Ql=({container:e,...t})=>C.jsx(Te.Portal,{...t,container:e||Bt()}),cN=Qx,fN=ew,dN=T.memo(function({privilege:t,selectedPrivilege:r,onSelect:n,privileges:i,isGuest:o=!1}){const a=Q.useAppDispatch(),u=Q.populateShallow(t.includes,i),[l,d]=T.useState(!1),[f,h]=T.useState(t.privilege),[p,v]=T.useState(null),m=Te.useOutsideClick(()=>{l&&b()});Te.useDidMountEffect(()=>{t.privilege!==f&&h(t.privilege)},[t.privilege]);function y(){d(!0),v(null)}function x(){d(!1),h(t.privilege)}function b(){v(null);try{Te.validateName(f);const _=Q.rename(f,t.id,i);a(Q.updatePrivileges(_)),d(!1)}catch(_){v(_.message)}}const w=async _=>{_.stopPropagation();const{confirmed:S}=await a(Q.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(S){const R=Q.remove(t.id,i);if((r==null?void 0:r.id)!==t.id){a(Q.updatePrivileges(R));return}const I=Object.keys(R).filter(P=>R[P].privilege!=="guest");if(I.length===0)n(null);else{const P=Object.keys(i).filter($=>i[$].privilege!=="guest"),A=P.indexOf(t.id),k=Math.max(0,A-1),L=P[k];A===0?n(R[I[0]]):R[L]?n(R[L]):n(R[I[0]])}a(Q.updatePrivileges(R))}},E=T.useMemo(()=>t.resources.some(_=>_.exists===!1),[t]);return C.jsxs(cN,{openDelay:0,closeDelay:0,children:[C.jsx(fN,{asChild:!0,children:C.jsxs("div",{className:We("rounded border bg-grey-300 p-2",{"border-grey-100":(r==null?void 0:r.id)!==t.id,"border-primary-dark":(r==null?void 0:r.id)===t.id,"border-red-400":E&&(r==null?void 0:r.id)!==t.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{n(t)},ref:m,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:o?C.jsx(xe.FdGuest,{className:"h-6 w-6"}):C.jsx(xe.FdGroup,{className:"h-6 w-6"})}),l?C.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[C.jsx("input",{autoFocus:!0,onKeyDown:_=>{_.key==="Enter"&&b(),_.key==="Escape"&&x()},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":p,"focus:border-primary-dark":!p}),value:f,onChange:_=>h(_.target.value)}),p&&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:p})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:f})]}),o?C.jsx("div",{className:"flex items-center justify-center",children:C.jsxs(cN,{openDelay:0,closeDelay:0,children:[C.jsx(fN,{asChild:!0,children:C.jsx("span",{children:C.jsx(xe.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(xe.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:l?C.jsxs(C.Fragment,{children:[C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:x,children:C.jsx("span",{children:C.jsx(xe.FdClose,{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(xe.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:y,children:C.jsx("span",{children:C.jsx(xe.FdPen,{className:"h-4 w-4 text-grey-50"})})}),C.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:w,children:C.jsx("span",{children:C.jsx(xe.FdTrash,{className:"h-4 w-4 text-grey-50"})})})]})})]}),u.length?C.jsx("div",{className:"ml-[43px]",children:C.jsx(qq,{data:u})}):null]})}),C.jsx(Lr,{container:Bt(),children:C.jsxs(Br,{hidden:!E,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(xe.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),C.jsx("p",{children:"This privilege uses non-existing resources"})]})})]})}),VX=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=Q.useAppSelector(Q.selectGuestPrivilege),i=Q.useAppSelector(Q.selectCatalog),o=T.useMemo(()=>{if(i===null||!n)return n;const d=Q2({guest:n},Object.values((i==null?void 0:i.dataClasses)??{}));return eq(d,i).guest},[e,i]),a=T.useMemo(()=>Object.entries(e).filter(([,d])=>d.privilege!=="guest").sort(([,d],[,f])=>Te.localeCompare(d.privilege,f.privilege)),[e]),u=T.useRef(null),l=Wa({count:a.length,getScrollElement:()=>u.current,estimateSize:()=>72,overscan:5});return C.jsxs("div",{ref:u,className:"flex flex-1 flex-col overflow-auto p-4 pb-10 pt-1",children:[o?C.jsx("div",{className:"mb-4",children:C.jsx(dN,{privilege:o,onSelect:t,selectedPrivilege:r,privileges:e,isGuest:!0})}):null,a.length?C.jsx("div",{style:{position:"relative",height:`${l.getTotalSize()}px`},children:l.getVirtualItems().map(d=>{const[f,h]=a[d.index];return C.jsx("div",{ref:l.measureElement,"data-index":d.index,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${d.start}px)`,paddingBottom:"16px"},children:C.jsx(dN,{privilege:h,onSelect:t,selectedPrivilege:r,privileges:e})},f)})}):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(xe.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(xe.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})]})};var xu={exports:{}},wu={exports:{}},Ye={};/** @license React v16.13.1
23
11
  * react-is.production.min.js
24
12
  *
25
13
  * Copyright (c) Facebook, Inc. and its affiliates.
26
14
  *
27
15
  * This source code is licensed under the MIT license found in the
28
16
  * LICENSE file in the root directory of this source tree.
29
- */var uC;function rK(){if(uC)return st;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,m=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 _(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case c:case u:case n:case o:case i:case h:return E;default:switch(E=E&&E.$$typeof,E){case s:case d:case x:case v:case a:return E;default:return I}}case r:return I}}}function S(E){return _(E)===u}return st.AsyncMode=c,st.ConcurrentMode=u,st.ContextConsumer=s,st.ContextProvider=a,st.Element=t,st.ForwardRef=d,st.Fragment=n,st.Lazy=x,st.Memo=v,st.Portal=r,st.Profiler=o,st.StrictMode=i,st.Suspense=h,st.isAsyncMode=function(E){return S(E)||_(E)===c},st.isConcurrentMode=S,st.isContextConsumer=function(E){return _(E)===s},st.isContextProvider=function(E){return _(E)===a},st.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},st.isForwardRef=function(E){return _(E)===d},st.isFragment=function(E){return _(E)===n},st.isLazy=function(E){return _(E)===x},st.isMemo=function(E){return _(E)===v},st.isPortal=function(E){return _(E)===r},st.isProfiler=function(E){return _(E)===o},st.isStrictMode=function(E){return _(E)===i},st.isSuspense=function(E){return _(E)===h},st.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===u||E===o||E===i||E===h||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===x||E.$$typeof===v||E.$$typeof===a||E.$$typeof===s||E.$$typeof===d||E.$$typeof===b||E.$$typeof===w||E.$$typeof===y||E.$$typeof===m)},st.typeOf=_,st}var dt={};/** @license React v16.13.1
17
+ */var hN;function UX(){if(hN)return Ye;hN=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
30
18
  * react-is.development.js
31
19
  *
32
20
  * Copyright (c) Facebook, Inc. and its affiliates.
33
21
  *
34
22
  * This source code is licensed under the MIT license found in the
35
23
  * LICENSE file in the root directory of this source tree.
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,m=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 _(te){return typeof te=="string"||typeof te=="function"||te===n||te===u||te===o||te===i||te===h||te===p||typeof te=="object"&&te!==null&&(te.$$typeof===x||te.$$typeof===v||te.$$typeof===a||te.$$typeof===s||te.$$typeof===d||te.$$typeof===b||te.$$typeof===w||te.$$typeof===y||te.$$typeof===m)}function S(te){if(typeof te=="object"&&te!==null){var he=te.$$typeof;switch(he){case t:var ce=te.type;switch(ce){case c:case u:case n:case o:case i:case h:return ce;default:var be=ce&&ce.$$typeof;switch(be){case s:case d:case x:case v:case a:return be;default:return he}}case r:return he}}}var E=c,I=u,N=s,T=a,k=t,L=d,B=n,G=x,z=v,P=r,K=o,U=i,re=h,X=!1;function ne(te){return X||(X=!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.")),D(te)||S(te)===c}function D(te){return S(te)===u}function $(te){return S(te)===s}function Z(te){return S(te)===a}function ee(te){return typeof te=="object"&&te!==null&&te.$$typeof===t}function A(te){return S(te)===d}function W(te){return S(te)===n}function q(te){return S(te)===x}function j(te){return S(te)===v}function V(te){return S(te)===r}function J(te){return S(te)===o}function Y(te){return S(te)===i}function se(te){return S(te)===h}dt.AsyncMode=E,dt.ConcurrentMode=I,dt.ContextConsumer=N,dt.ContextProvider=T,dt.Element=k,dt.ForwardRef=L,dt.Fragment=B,dt.Lazy=G,dt.Memo=z,dt.Portal=P,dt.Profiler=K,dt.StrictMode=U,dt.Suspense=re,dt.isAsyncMode=ne,dt.isConcurrentMode=D,dt.isContextConsumer=$,dt.isContextProvider=Z,dt.isElement=ee,dt.isForwardRef=A,dt.isFragment=W,dt.isLazy=q,dt.isMemo=j,dt.isPortal=V,dt.isProfiler=J,dt.isStrictMode=Y,dt.isSuspense=se,dt.isValidElementType=_,dt.typeOf=S})()),dt}var fC;function h3(){return fC||(fC=1,process.env.NODE_ENV==="production"?kh.exports=rK():kh.exports=nK()),kh.exports}/*
24
+ */var pN;function WX(){return pN||(pN=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(V){return typeof V=="string"||typeof V=="function"||V===n||V===d||V===o||V===i||V===h||V===p||typeof V=="object"&&V!==null&&(V.$$typeof===m||V.$$typeof===v||V.$$typeof===a||V.$$typeof===u||V.$$typeof===f||V.$$typeof===x||V.$$typeof===b||V.$$typeof===w||V.$$typeof===y)}function _(V){if(typeof V=="object"&&V!==null){var ee=V.$$typeof;switch(ee){case t:var we=V.type;switch(we){case l:case d:case n:case o:case i:case h:return we;default:var be=we&&we.$$typeof;switch(be){case u:case f:case m:case v:case a:return be;default:return ee}}case r:return ee}}}var S=l,R=d,I=u,P=a,A=t,k=f,L=n,$=m,j=v,D=r,G=o,B=i,Y=h,Z=!1;function te(V){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.")),U(V)||_(V)===l}function U(V){return _(V)===d}function re(V){return _(V)===u}function ae(V){return _(V)===a}function le(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function F(V){return _(V)===f}function W(V){return _(V)===n}function J(V){return _(V)===m}function H(V){return _(V)===v}function K(V){return _(V)===r}function se(V){return _(V)===o}function oe(V){return _(V)===i}function fe(V){return _(V)===h}Xe.AsyncMode=S,Xe.ConcurrentMode=R,Xe.ContextConsumer=I,Xe.ContextProvider=P,Xe.Element=A,Xe.ForwardRef=k,Xe.Fragment=L,Xe.Lazy=$,Xe.Memo=j,Xe.Portal=D,Xe.Profiler=G,Xe.StrictMode=B,Xe.Suspense=Y,Xe.isAsyncMode=te,Xe.isConcurrentMode=U,Xe.isContextConsumer=re,Xe.isContextProvider=ae,Xe.isElement=le,Xe.isForwardRef=F,Xe.isFragment=W,Xe.isLazy=J,Xe.isMemo=H,Xe.isPortal=K,Xe.isProfiler=se,Xe.isStrictMode=oe,Xe.isSuspense=fe,Xe.isValidElementType=E,Xe.typeOf=_})()),Xe}var vN;function kq(){return vN||(vN=1,process.env.NODE_ENV==="production"?wu.exports=UX():wu.exports=WX()),wu.exports}/*
37
25
  object-assign
38
26
  (c) Sindre Sorhus
39
27
  @license MIT
40
- */var Mh,hC;function iK(){if(hC)return Mh;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 Mh=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},Mh}var Ah,pC;function p1(){if(pC)return Ah;pC=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ah=e,Ah}var vC,gC;function p3(){return gC||(gC=1,vC=Function.call.bind(Object.prototype.hasOwnProperty)),vC}var Dh,mC;function oK(){if(mC)return Dh;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={})},Dh=i,Dh}var jh,bC;function aK(){if(bC)return jh;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 jh=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function h(D){var $=D&&(u&&D[u]||D[d]);if(typeof $=="function")return $}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:S(),elementType:E(),instanceOf:I,node:L(),objectOf:T,oneOf:N,oneOfType:k,shape:G,exact:z};function x(D,$){return D===$?D!==0||1/D===1/$:D!==D&&$!==$}function m(D,$){this.message=D,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function b(D){if(process.env.NODE_ENV!=="production")var $={},Z=0;function ee(W,q,j,V,J,Y,se){if(V=V||p,Y=Y||j,se!==r){if(c){var te=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 te.name="Invariant Violation",te}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var he=V+":"+j;!$[he]&&Z<3&&(o("You are manually calling a React.PropTypes validation function for the `"+Y+"` 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."),$[he]=!0,Z++)}}return q[j]==null?W?q[j]===null?new m("The "+J+" `"+Y+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new m("The "+J+" `"+Y+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:D(q,j,V,J,Y)}var A=ee.bind(null,!1);return A.isRequired=ee.bind(null,!0),A}function w(D){function $(Z,ee,A,W,q,j){var V=Z[ee],J=U(V);if(J!==D){var Y=re(V);return new m("Invalid "+W+" `"+q+"` of type "+("`"+Y+"` supplied to `"+A+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return b($)}function y(){return b(a)}function _(D){function $(Z,ee,A,W,q){if(typeof D!="function")return new m("Property `"+q+"` of component `"+A+"` has invalid PropType notation inside arrayOf.");var j=Z[ee];if(!Array.isArray(j)){var V=U(j);return new m("Invalid "+W+" `"+q+"` of type "+("`"+V+"` supplied to `"+A+"`, expected an array."))}for(var J=0;J<j.length;J++){var Y=D(j,J,A,W,q+"["+J+"]",r);if(Y instanceof Error)return Y}return null}return b($)}function S(){function D($,Z,ee,A,W){var q=$[Z];if(!s(q)){var j=U(q);return new m("Invalid "+A+" `"+W+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return b(D)}function E(){function D($,Z,ee,A,W){var q=$[Z];if(!e.isValidElementType(q)){var j=U(q);return new m("Invalid "+A+" `"+W+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return b(D)}function I(D){function $(Z,ee,A,W,q){if(!(Z[ee]instanceof D)){var j=D.name||p,V=ne(Z[ee]);return new m("Invalid "+W+" `"+q+"` of type "+("`"+V+"` supplied to `"+A+"`, expected ")+("instance of `"+j+"`."))}return null}return b($)}function N(D){if(!Array.isArray(D))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 $(Z,ee,A,W,q){for(var j=Z[ee],V=0;V<D.length;V++)if(x(j,D[V]))return null;var J=JSON.stringify(D,function(Y,se){var te=re(se);return te==="symbol"?String(se):se});return new m("Invalid "+W+" `"+q+"` of value `"+String(j)+"` "+("supplied to `"+A+"`, expected one of "+J+"."))}return b($)}function T(D){function $(Z,ee,A,W,q){if(typeof D!="function")return new m("Property `"+q+"` of component `"+A+"` has invalid PropType notation inside objectOf.");var j=Z[ee],V=U(j);if(V!=="object")return new m("Invalid "+W+" `"+q+"` of type "+("`"+V+"` supplied to `"+A+"`, expected an object."));for(var J in j)if(n(j,J)){var Y=D(j,J,A,W,q+"."+J,r);if(Y instanceof Error)return Y}return null}return b($)}function k(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var $=0;$<D.length;$++){var Z=D[$];if(typeof Z!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+X(Z)+" at index "+$+"."),a}function ee(A,W,q,j,V){for(var J=[],Y=0;Y<D.length;Y++){var se=D[Y],te=se(A,W,q,j,V,r);if(te==null)return null;te.data&&n(te.data,"expectedType")&&J.push(te.data.expectedType)}var he=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new m("Invalid "+j+" `"+V+"` supplied to "+("`"+q+"`"+he+"."))}return b(ee)}function L(){function D($,Z,ee,A,W){return P($[Z])?null:new m("Invalid "+A+" `"+W+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return b(D)}function B(D,$,Z,ee,A){return new m((D||"React class")+": "+$+" type `"+Z+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+A+"`.")}function G(D){function $(Z,ee,A,W,q){var j=Z[ee],V=U(j);if(V!=="object")return new m("Invalid "+W+" `"+q+"` of type `"+V+"` "+("supplied to `"+A+"`, expected `object`."));for(var J in D){var Y=D[J];if(typeof Y!="function")return B(A,W,q,J,re(Y));var se=Y(j,J,A,W,q+"."+J,r);if(se)return se}return null}return b($)}function z(D){function $(Z,ee,A,W,q){var j=Z[ee],V=U(j);if(V!=="object")return new m("Invalid "+W+" `"+q+"` of type `"+V+"` "+("supplied to `"+A+"`, expected `object`."));var J=t({},Z[ee],D);for(var Y in J){var se=D[Y];if(n(D,Y)&&typeof se!="function")return B(A,W,q,Y,re(se));if(!se)return new m("Invalid "+W+" `"+q+"` key `"+Y+"` supplied to `"+A+"`.\nBad object: "+JSON.stringify(Z[ee],null," ")+`
41
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var te=se(j,Y,A,W,q+"."+Y,r);if(te)return te}return null}return b($)}function P(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(P);if(D===null||s(D))return!0;var $=h(D);if($){var Z=$.call(D),ee;if($!==D.entries){for(;!(ee=Z.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=Z.next()).done;){var A=ee.value;if(A&&!P(A[1]))return!1}}else return!1;return!0;default:return!1}}function K(D,$){return D==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function U(D){var $=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":K($,D)?"symbol":$}function re(D){if(typeof D>"u"||D===null)return""+D;var $=U(D);if($==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return $}function X(D){var $=re(D);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function ne(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},jh}var qh,yC;function sK(){if(yC)return qh;yC=1;var e=p1();function t(){}function r(){}return r.resetWarningCache=t,qh=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},qh}var xC;function lK(){if(xC)return Pc.exports;if(xC=1,process.env.NODE_ENV!=="production"){var e=h3(),t=!0;Pc.exports=aK()(e.isElement,t)}else Pc.exports=sK()();return Pc.exports}var cK=lK();const xe=hj(cK);var Lh={exports:{}},lt={};/**
42
- * @license React
28
+ */var $m,gN;function GX(){if(gN)return $m;gN=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 $m=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},$m}var zm,mN;function tw(){if(mN)return zm;mN=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return zm=e,zm}var Hm,yN;function Lq(){return yN||(yN=1,Hm=Function.call.bind(Object.prototype.hasOwnProperty)),Hm}var Vm,bN;function KX(){if(bN)return Vm;bN=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=tw(),r={},n=Lq();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={})},Vm=i,Vm}var Um,xN;function YX(){if(xN)return Um;xN=1;var e=kq(),t=GX(),r=tw(),n=Lq(),i=KX(),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 Um=function(u,l){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(U){var re=U&&(d&&U[d]||U[f]);if(typeof re=="function")return re}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:k(),objectOf:P,oneOf:I,oneOfType:A,shape:$,exact:j};function m(U,re){return U===re?U!==0||1/U===1/re:U!==U&&re!==re}function y(U,re){this.message=U,this.data=re&&typeof re=="object"?re:{},this.stack=""}y.prototype=Error.prototype;function x(U){if(process.env.NODE_ENV!=="production")var re={},ae=0;function le(W,J,H,K,se,oe,fe){if(K=K||p,oe=oe||H,fe!==r){if(l){var V=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 V.name="Invariant Violation",V}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ee=K+":"+H;!re[ee]&&ae<3&&(o("You are manually calling a React.PropTypes validation function for the `"+oe+"` prop on `"+K+"`. 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."),re[ee]=!0,ae++)}}return J[H]==null?W?J[H]===null?new y("The "+se+" `"+oe+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new y("The "+se+" `"+oe+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:U(J,H,K,se,oe)}var F=le.bind(null,!1);return F.isRequired=le.bind(null,!0),F}function b(U){function re(ae,le,F,W,J,H){var K=ae[le],se=B(K);if(se!==U){var oe=Y(K);return new y("Invalid "+W+" `"+J+"` of type "+("`"+oe+"` supplied to `"+F+"`, expected ")+("`"+U+"`."),{expectedType:U})}return null}return x(re)}function w(){return x(a)}function E(U){function re(ae,le,F,W,J){if(typeof U!="function")return new y("Property `"+J+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var H=ae[le];if(!Array.isArray(H)){var K=B(H);return new y("Invalid "+W+" `"+J+"` of type "+("`"+K+"` supplied to `"+F+"`, expected an array."))}for(var se=0;se<H.length;se++){var oe=U(H,se,F,W,J+"["+se+"]",r);if(oe instanceof Error)return oe}return null}return x(re)}function _(){function U(re,ae,le,F,W){var J=re[ae];if(!u(J)){var H=B(J);return new y("Invalid "+F+" `"+W+"` of type "+("`"+H+"` supplied to `"+le+"`, expected a single ReactElement."))}return null}return x(U)}function S(){function U(re,ae,le,F,W){var J=re[ae];if(!e.isValidElementType(J)){var H=B(J);return new y("Invalid "+F+" `"+W+"` of type "+("`"+H+"` supplied to `"+le+"`, expected a single ReactElement type."))}return null}return x(U)}function R(U){function re(ae,le,F,W,J){if(!(ae[le]instanceof U)){var H=U.name||p,K=te(ae[le]);return new y("Invalid "+W+" `"+J+"` of type "+("`"+K+"` supplied to `"+F+"`, expected ")+("instance of `"+H+"`."))}return null}return x(re)}function I(U){if(!Array.isArray(U))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 re(ae,le,F,W,J){for(var H=ae[le],K=0;K<U.length;K++)if(m(H,U[K]))return null;var se=JSON.stringify(U,function(fe,V){var ee=Y(V);return ee==="symbol"?String(V):V});return new y("Invalid "+W+" `"+J+"` of value `"+String(H)+"` "+("supplied to `"+F+"`, expected one of "+se+"."))}return x(re)}function P(U){function re(ae,le,F,W,J){if(typeof U!="function")return new y("Property `"+J+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var H=ae[le],K=B(H);if(K!=="object")return new y("Invalid "+W+" `"+J+"` of type "+("`"+K+"` supplied to `"+F+"`, expected an object."));for(var se in H)if(n(H,se)){var oe=U(H,se,F,W,J+"."+se,r);if(oe instanceof Error)return oe}return null}return x(re)}function A(U){if(!Array.isArray(U))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var re=0;re<U.length;re++){var ae=U[re];if(typeof ae!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(ae)+" at index "+re+"."),a}function le(F,W,J,H,K){for(var se=[],oe=0;oe<U.length;oe++){var fe=U[oe],V=fe(F,W,J,H,K,r);if(V==null)return null;V.data&&n(V.data,"expectedType")&&se.push(V.data.expectedType)}var ee=se.length>0?", expected one of type ["+se.join(", ")+"]":"";return new y("Invalid "+H+" `"+K+"` supplied to "+("`"+J+"`"+ee+"."))}return x(le)}function k(){function U(re,ae,le,F,W){return D(re[ae])?null:new y("Invalid "+F+" `"+W+"` supplied to "+("`"+le+"`, expected a ReactNode."))}return x(U)}function L(U,re,ae,le,F){return new y((U||"React class")+": "+re+" type `"+ae+"."+le+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function $(U){function re(ae,le,F,W,J){var H=ae[le],K=B(H);if(K!=="object")return new y("Invalid "+W+" `"+J+"` of type `"+K+"` "+("supplied to `"+F+"`, expected `object`."));for(var se in U){var oe=U[se];if(typeof oe!="function")return L(F,W,J,se,Y(oe));var fe=oe(H,se,F,W,J+"."+se,r);if(fe)return fe}return null}return x(re)}function j(U){function re(ae,le,F,W,J){var H=ae[le],K=B(H);if(K!=="object")return new y("Invalid "+W+" `"+J+"` of type `"+K+"` "+("supplied to `"+F+"`, expected `object`."));var se=t({},ae[le],U);for(var oe in se){var fe=U[oe];if(n(U,oe)&&typeof fe!="function")return L(F,W,J,oe,Y(fe));if(!fe)return new y("Invalid "+W+" `"+J+"` key `"+oe+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(ae[le],null," ")+`
29
+ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var V=fe(H,oe,F,W,J+"."+oe,r);if(V)return V}return null}return x(re)}function D(U){switch(typeof U){case"number":case"string":case"undefined":return!0;case"boolean":return!U;case"object":if(Array.isArray(U))return U.every(D);if(U===null||u(U))return!0;var re=h(U);if(re){var ae=re.call(U),le;if(re!==U.entries){for(;!(le=ae.next()).done;)if(!D(le.value))return!1}else for(;!(le=ae.next()).done;){var F=le.value;if(F&&!D(F[1]))return!1}}else return!1;return!0;default:return!1}}function G(U,re){return U==="symbol"?!0:re?re["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&re instanceof Symbol:!1}function B(U){var re=typeof U;return Array.isArray(U)?"array":U instanceof RegExp?"object":G(re,U)?"symbol":re}function Y(U){if(typeof U>"u"||U===null)return""+U;var re=B(U);if(re==="object"){if(U instanceof Date)return"date";if(U instanceof RegExp)return"regexp"}return re}function Z(U){var re=Y(U);switch(re){case"array":case"object":return"an "+re;case"boolean":case"date":case"regexp":return"a "+re;default:return re}}function te(U){return!U.constructor||!U.constructor.name?p:U.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},Um}var Wm,wN;function XX(){if(wN)return Wm;wN=1;var e=tw();function t(){}function r(){}return r.resetWarningCache=t,Wm=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},Wm}var _N;function ZX(){if(_N)return xu.exports;if(_N=1,process.env.NODE_ENV!=="production"){var e=kq(),t=!0;xu.exports=YX()(e.isElement,t)}else xu.exports=XX()();return xu.exports}var JX=ZX();const he=Vn(JX);var _u={exports:{}},Je={};/** @license React v17.0.2
43
30
  * react-is.production.min.js
44
31
  *
45
32
  * Copyright (c) Facebook, Inc. and its affiliates.
46
33
  *
47
34
  * This source code is licensed under the MIT license found in the
48
35
  * LICENSE file in the root directory of this source tree.
49
- */var wC;function uK(){if(wC)return lt;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 m(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 lt.ContextConsumer=a,lt.ContextProvider=o,lt.Element=e,lt.ForwardRef=c,lt.Fragment=r,lt.Lazy=p,lt.Memo=h,lt.Portal=t,lt.Profiler=i,lt.StrictMode=n,lt.Suspense=u,lt.SuspenseList=d,lt.isAsyncMode=function(){return!1},lt.isConcurrentMode=function(){return!1},lt.isContextConsumer=function(b){return m(b)===a},lt.isContextProvider=function(b){return m(b)===o},lt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},lt.isForwardRef=function(b){return m(b)===c},lt.isFragment=function(b){return m(b)===r},lt.isLazy=function(b){return m(b)===p},lt.isMemo=function(b){return m(b)===h},lt.isPortal=function(b){return m(b)===t},lt.isProfiler=function(b){return m(b)===i},lt.isStrictMode=function(b){return m(b)===n},lt.isSuspense=function(b){return m(b)===u},lt.isSuspenseList=function(b){return m(b)===d},lt.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)},lt.typeOf=m,lt}var ft={};/**
50
- * @license React
36
+ */var EN;function QX(){if(EN)return Je;EN=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,P=f,A=t,k=i,L=n,$=l;return Je.ContextConsumer=a,Je.ContextProvider=E,Je.Element=_,Je.ForwardRef=S,Je.Fragment=R,Je.Lazy=I,Je.Memo=P,Je.Portal=A,Je.Profiler=k,Je.StrictMode=L,Je.Suspense=$,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
51
37
  * react-is.development.js
52
38
  *
53
39
  * Copyright (c) Facebook, Inc. and its affiliates.
54
40
  *
55
41
  * This source code is licensed under the MIT license found in the
56
42
  * LICENSE file in the root directory of this source tree.
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,m=!1,b=!1,w=!1,y=!1,_;_=Symbol.for("react.module.reference");function S(ce){return!!(typeof ce=="string"||typeof ce=="function"||ce===r||ce===i||y||ce===n||ce===u||ce===d||w||ce===v||x||m||b||typeof ce=="object"&&ce!==null&&(ce.$$typeof===p||ce.$$typeof===h||ce.$$typeof===o||ce.$$typeof===a||ce.$$typeof===c||ce.$$typeof===_||ce.getModuleId!==void 0))}function E(ce){if(typeof ce=="object"&&ce!==null){var be=ce.$$typeof;switch(be){case e:var le=ce.type;switch(le){case r:case i:case n:case u:case d:return le;default:var ue=le&&le.$$typeof;switch(ue){case s:case a:case c:case p:case h:case o:return ue;default:return be}}case t:return be}}}var I=a,N=o,T=e,k=c,L=r,B=p,G=h,z=t,P=i,K=n,U=u,re=d,X=!1,ne=!1;function D(ce){return X||(X=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function $(ce){return ne||(ne=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Z(ce){return E(ce)===a}function ee(ce){return E(ce)===o}function A(ce){return typeof ce=="object"&&ce!==null&&ce.$$typeof===e}function W(ce){return E(ce)===c}function q(ce){return E(ce)===r}function j(ce){return E(ce)===p}function V(ce){return E(ce)===h}function J(ce){return E(ce)===t}function Y(ce){return E(ce)===i}function se(ce){return E(ce)===n}function te(ce){return E(ce)===u}function he(ce){return E(ce)===d}ft.ContextConsumer=I,ft.ContextProvider=N,ft.Element=T,ft.ForwardRef=k,ft.Fragment=L,ft.Lazy=B,ft.Memo=G,ft.Portal=z,ft.Profiler=P,ft.StrictMode=K,ft.Suspense=U,ft.SuspenseList=re,ft.isAsyncMode=D,ft.isConcurrentMode=$,ft.isContextConsumer=Z,ft.isContextProvider=ee,ft.isElement=A,ft.isForwardRef=W,ft.isFragment=q,ft.isLazy=j,ft.isMemo=V,ft.isPortal=J,ft.isProfiler=Y,ft.isStrictMode=se,ft.isSuspense=te,ft.isSuspenseList=he,ft.isValidElementType=S,ft.typeOf=E})()),ft}var EC;function fK(){return EC||(EC=1,process.env.NODE_ENV==="production"?Lh.exports=uK():Lh.exports=dK()),Lh.exports}var SC=fK();const OC=e=>typeof e=="object"&&e!=null&&e.nodeType===1,CC=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",kc=(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},Mc=(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:z=>z!==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&&kc(p)&&!kc(document.documentElement)||p!=null&&kc(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:m,scrollY:b}=window,{height:w,width:y,top:_,right:S,bottom:E,left:I}=e.getBoundingClientRect(),{top:N,right:T,left:k}=(z=>{const P=window.getComputedStyle(z);return{top:parseFloat(P.scrollMarginTop)||0,right:parseFloat(P.scrollMarginRight)||0,bottom:parseFloat(P.scrollMarginBottom)||0,left:parseFloat(P.scrollMarginLeft)||0}})(e);let L=_-N,B=a==="center"?I+y/2-k+T:a==="end"?S+T:I-k;const G=[];for(let z=0;z<h.length;z++){const P=h[z],{height:K,width:U,top:re,right:X,bottom:ne,left:D}=P.getBoundingClientRect();if(_>=0&&I>=0&&E<=x&&S<=v&&(P===d&&!kc(P)||_>=re&&E<=ne&&I>=D&&S<=X))return G;const $=getComputedStyle(P),Z=parseInt($.borderLeftWidth,10),ee=parseInt($.borderTopWidth,10),A=parseInt($.borderRightWidth,10),W=parseInt($.borderBottomWidth,10);let q=0,j=0;const V="offsetWidth"in P?P.offsetWidth-P.clientWidth-Z-A:0,J="offsetHeight"in P?P.offsetHeight-P.clientHeight-ee-W:0,Y="offsetWidth"in P?P.offsetWidth===0?0:U/P.offsetWidth:0,se="offsetHeight"in P?P.offsetHeight===0?0:K/P.offsetHeight:0;if(d===P)q=Mc(b,b+x,x,ee,W,b+L,b+L+w,w),j=a==="start"?B:a==="center"?B-v/2:a==="end"?B-v:Mc(m,m+v,v,Z,A,m+B,m+B+y,y),q=Math.max(0,q+b),j=Math.max(0,j+m);else{q=Mc(re,ne,K,ee,W+J,L,L+w,w),j=a==="start"?B-D-Z:a==="center"?B-(D+U/2)+V/2:a==="end"?B-X+A+V:Mc(D,X,U,Z,A+V,B,B+y,y);const{scrollLeft:te,scrollTop:he}=P;q=se===0?0:Math.max(0,Math.min(he+q/se,P.scrollHeight-K/se+J)),j=Y===0?0:Math.max(0,Math.min(te+j/Y,P.scrollWidth-U/Y+V)),L+=he-q,B+=te-j}G.push({el:P,top:q,left:j})}return G};var ya=function(){return ya=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},ya.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 sd(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 it(){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 Ln(){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 Ac(e){e===void 0&&(e={});var t={};return bK.forEach(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function Js(e,t){return!e||!t?e:Object.keys(e).reduce(function(r,n){return r[n]=Tu(t,n)?t[n]:e[n],r},{})}function Tu(e,t){return e[t]!==void 0}function xa(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 zn(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=Gi(s,t<0,r,n,i);return c===-1?e>=o?-1:e:c}function Gi(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?Gi(t?o-1:0,t,r,n):-1}function Pu(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=sd(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,E3=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,ou=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,au=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,S3=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,Sw=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:Sw,clickItem:R3,controlledPropUpdatedSelectedItem:M3,itemMouseEnter:E3,keyDownArrowDown:au,keyDownArrowUp:ou,keyDownEnd:I3,keyDownEnter:O3,keyDownEscape:S3,keyDownHome:C3,keyDownSpaceButton:P3,mouseUp:_3,touchEnd:A3,unknown:w3}),EK=["refKey","ref"],SK=["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 S=setTimeout(function(){o.timeoutIds=o.timeoutIds.filter(function(E){return E!==S}),y()},_);o.timeoutIds.push(S)},o.setItemCount=function(y){o.itemCount=y},o.unsetItemCount=function(){o.itemCount=null},o.isItemDisabled=function(y,_){var S=o.getItemNodeFromIndex(_);return S&&S.hasAttribute("disabled")},o.setHighlightedIndex=function(y,_){y===void 0&&(y=o.props.defaultHighlightedIndex),_===void 0&&(_={}),_=Ac(_),o.internalSetState(ke({highlightedIndex:y},_))},o.clearSelection=function(y){o.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:o.props.defaultHighlightedIndex,isOpen:o.props.defaultIsOpen},y)},o.selectItem=function(y,_,S){_=Ac(_),o.internalSetState(ke({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,selectedItem:y,inputValue:o.props.itemToString(y)},_),S)},o.selectItemAtIndex=function(y,_,S){var E=o.items[y];E!=null&&o.selectItem(E,_,S)},o.selectHighlightedItem=function(y,_){return o.selectItemAtIndex(o.getState().highlightedIndex,y,_)},o.internalSetState=function(y,_){var S,E,I={},N=typeof y=="function";return!N&&y.hasOwnProperty("inputValue")&&o.props.onInputValueChange(y.inputValue,ke({},o.getStateAndHelpers(),y)),o.setState(function(T){var k;T=o.getState(T);var L=N?y(T):y;L=o.props.stateReducer(T,L),S=L.hasOwnProperty("selectedItem");var B={};return S&&L.selectedItem!==T.selectedItem&&(E=L.selectedItem),(k=L).type||(k.type=w3),Object.keys(L).forEach(function(G){T[G]!==L[G]&&(I[G]=L[G]),G!=="type"&&(L[G],Tu(o.props,G)||(B[G]=L[G]))}),N&&L.hasOwnProperty("inputValue")&&o.props.onInputValueChange(L.inputValue,ke({},o.getStateAndHelpers(),L)),B},function(){IC(_)();var T=Object.keys(I).length>1;T&&o.props.onStateChange(I,o.getStateAndHelpers()),S&&o.props.onSelect(y.selectedItem,o.getStateAndHelpers()),E!==void 0&&o.props.onChange(E,o.getStateAndHelpers()),o.props.onUserAction(I,o.getStateAndHelpers())})},o.rootRef=function(y){return o._rootNode=y},o.getRootProps=function(y,_){var S,E=y===void 0?{}:y,I=E.refKey,N=I===void 0?"ref":I,T=E.ref,k=Cr(E,EK),L=_===void 0?{}:_,B=L.suppressRefError,G=B===void 0?!1:B;o.getRootProps.called=!0,o.getRootProps.refKey=N,o.getRootProps.suppressRefError=G;var z=o.getState(),P=z.isOpen;return ke((S={},S[N]=Ln(T,o.rootRef),S.role="combobox",S["aria-expanded"]=P,S["aria-haspopup"]="listbox",S["aria-owns"]=P?o.menuId:void 0,S["aria-labelledby"]=o.labelId,S),k)},o.keyDownHandlers={ArrowDown:function(y){var _=this;if(y.preventDefault(),this.getState().isOpen){var S=y.shiftKey?5:1;this.moveHighlightedIndex(S,{type:au})}else this.internalSetState({isOpen:!0,type:au},function(){var E=_.getItemCount();if(E>0){var I=_.getState(),N=I.highlightedIndex,T=zn(N,1,{length:E},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:au})}})},ArrowUp:function(y){var _=this;if(y.preventDefault(),this.getState().isOpen){var S=y.shiftKey?-5:-1;this.moveHighlightedIndex(S,{type:ou})}else this.internalSetState({isOpen:!0,type:ou},function(){var E=_.getItemCount();if(E>0){var I=_.getState(),N=I.highlightedIndex,T=zn(N,-1,{length:E},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:ou})}})},Enter:function(y){if(y.which!==229){var _=this.getState(),S=_.isOpen,E=_.highlightedIndex;if(S&&E!=null){y.preventDefault();var I=this.items[E],N=this.getItemNodeFromIndex(E);if(I==null||N&&N.hasAttribute("disabled"))return;this.selectHighlightedItem({type:O3})}}},Escape:function(y){y.preventDefault(),this.reset(ke({type:S3},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},o.buttonKeyDownHandlers=ke({},o.keyDownHandlers,{" ":function(y){y.preventDefault(),this.toggleMenu({type:P3})}}),o.inputKeyDownHandlers=ke({},o.keyDownHandlers,{Home:function(y){var _=this.getState(),S=_.isOpen;if(S){y.preventDefault();var E=this.getItemCount();if(!(E<=0||!S)){var I=Gi(0,!1,{length:E},this.isItemDisabled);this.setHighlightedIndex(I,{type:C3})}}},End:function(y){var _=this.getState(),S=_.isOpen;if(S){y.preventDefault();var E=this.getItemCount();if(!(E<=0||!S)){var I=Gi(E-1,!0,{length:E},this.isItemDisabled);this.setHighlightedIndex(I,{type:I3})}}}}),o.getToggleButtonProps=function(y){var _=y===void 0?{}:y,S=_.onClick;_.onPress;var E=_.onKeyDown,I=_.onKeyUp,N=_.onBlur,T=Cr(_,SK),k=o.getState(),L=k.isOpen,B={onClick:it(S,o.buttonHandleClick),onKeyDown:it(E,o.buttonHandleKeyDown),onKeyUp:it(I,o.buttonHandleKeyUp),onBlur:it(N,o.buttonHandleBlur)},G=T.disabled?{}:B;return ke({type:"button",role:"button","aria-label":L?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},G,T)},o.buttonHandleKeyUp=function(y){y.preventDefault()},o.buttonHandleKeyDown=function(y){var _=xa(y);o.buttonKeyDownHandlers[_]&&o.buttonKeyDownHandlers[_].call(o,y)},o.buttonHandleClick=function(y){if(y.preventDefault(),o.props.environment){var _=o.props.environment.document,S=_.body,E=_.activeElement;S&&S===E&&y.target.focus()}process.env.NODE_ENV==="test"?o.toggleMenu({type:Sw}):o.internalSetTimeout(function(){return o.toggleMenu({type:Sw})})},o.buttonHandleBlur=function(y){var _=y.target;o.internalSetTimeout(function(){if(!(o.isMouseDown||!o.props.environment)){var S=o.props.environment.document.activeElement;(S==null||S.id!==o.inputId)&&S!==_&&o.reset({type:k3})}})},o.getLabelProps=function(y){return ke({htmlFor:o.inputId,id:o.labelId},y)},o.getInputProps=function(y){var _=y===void 0?{}:y,S=_.onKeyDown,E=_.onBlur,I=_.onChange,N=_.onInput;_.onChangeText;var T=Cr(_,OK),k,L={};k="onChange";var B=o.getState(),G=B.inputValue,z=B.isOpen,P=B.highlightedIndex;if(!T.disabled){var K;L=(K={},K[k]=it(I,N,o.inputHandleChange),K.onKeyDown=it(S,o.inputHandleKeyDown),K.onBlur=it(E,o.inputHandleBlur),K)}return ke({"aria-autocomplete":"list","aria-activedescendant":z&&typeof P=="number"&&P>=0?o.getItemId(P):void 0,"aria-controls":z?o.menuId:void 0,"aria-labelledby":T&&T["aria-label"]?void 0:o.labelId,autoComplete:"off",value:G,id:o.inputId},L,T)},o.inputHandleKeyDown=function(y){var _=xa(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,S=(_==null||(y=_.dataset)==null?void 0:y.toggle)&&o._rootNode&&o._rootNode.contains(_);S||o.reset({type:N3})}})},o.menuRef=function(y){o._menuNode=y},o.getMenuProps=function(y,_){var S,E=y===void 0?{}:y,I=E.refKey,N=I===void 0?"ref":I,T=E.ref,k=Cr(E,CK),L=_===void 0?{}:_,B=L.suppressRefError,G=B===void 0?!1:B;return o.getMenuProps.called=!0,o.getMenuProps.refKey=N,o.getMenuProps.suppressRefError=G,ke((S={},S[N]=Ln(T,o.menuRef),S.role="listbox",S["aria-labelledby"]=k&&k["aria-label"]?void 0:o.labelId,S.id=o.menuId,S),k)},o.getItemProps=function(y){var _,S=y===void 0?{}:y,E=S.onMouseMove,I=S.onMouseDown,N=S.onClick;S.onPress;var T=S.index,k=S.item,L=k===void 0?process.env.NODE_ENV==="production"?void 0:mK("getItemProps","item"):k,B=Cr(S,IK);T===void 0?(o.items.push(L),T=o.items.indexOf(L)):o.items[T]=L;var G="onClick",z=N,P=(_={onMouseMove:it(E,function(){T!==o.getState().highlightedIndex&&(o.setHighlightedIndex(T,{type:E3}),o.avoidScrolling=!0,o.internalSetTimeout(function(){return o.avoidScrolling=!1},250))}),onMouseDown:it(I,function(U){U.preventDefault()})},_[G]=it(z,function(){o.selectItemAtIndex(T,{type:R3})}),_),K=B.disabled?{onMouseDown:P.onMouseDown}:P;return ke({id:o.getItemId(T),role:"option","aria-selected":o.getState().highlightedIndex===T},K,B)},o.clearItems=function(){o.items=[]},o.reset=function(y,_){y===void 0&&(y={}),y=Ac(y),o.internalSetState(function(S){var E=S.selectedItem;return ke({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,inputValue:o.props.itemToString(E)},y)},_)},o.toggleMenu=function(y,_){y===void 0&&(y={}),y=Ac(y),o.internalSetState(function(S){var E=S.isOpen;return ke({isOpen:!E},E&&{highlightedIndex:o.props.defaultHighlightedIndex},y)},function(){var S=o.getState(),E=S.isOpen,I=S.highlightedIndex;E&&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=sd(function(){var y;if((y=o.props)!=null&&(y=y.environment)!=null&&y.document){var _=o.getState(),S=o.items[_.highlightedIndex],E=o.getItemCount(),I=o.props.getA11yStatusMessage(ke({itemToString:o.props.itemToString,previousResultCount:o.previousResultCount,resultCount:E,highlightedItem:S},_));o.previousResultCount=E,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,m=a.initialSelectedItem,b=m===void 0?null:m,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),Js(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=zn(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,m=this.getInputProps,b=this.getItemProps,w=this.openMenu,y=this.closeMenu,_=this.toggleMenu,S=this.selectItem,E=this.selectItemAtIndex,I=this.selectHighlightedItem,N=this.setHighlightedIndex,T=this.clearSelection,k=this.clearItems,L=this.reset,B=this.setItemCount,G=this.unsetItemCount,z=this.internalSetState;return{getRootProps:h,getToggleButtonProps:p,getLabelProps:v,getMenuProps:x,getInputProps:m,getItemProps:b,reset:L,openMenu:w,closeMenu:y,toggleMenu:_,selectItem:S,selectItemAtIndex:E,selectHighlightedItem:I,setHighlightedIndex:N,clearSelection:T,clearItems:k,setItemCount:B,unsetItemCount:G,setState:z,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=Pu(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=Pu(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)),Tu(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:xe.func,defaultHighlightedIndex:xe.number,defaultIsOpen:xe.bool,initialHighlightedIndex:xe.number,initialSelectedItem:xe.any,initialInputValue:xe.string,initialIsOpen:xe.bool,getA11yStatusMessage:xe.func,itemToString:xe.func,onChange:xe.func,onSelect:xe.func,onStateChange:xe.func,onInputValueChange:xe.func,onUserAction:xe.func,onOuterClick:xe.func,selectedItemChanged:xe.func,stateReducer:xe.func,itemCount:xe.number,id:xe.string,environment:xe.shape({addEventListener:xe.func.isRequired,removeEventListener:xe.func.isRequired,document:xe.shape({createElement:xe.func.isRequired,getElementById:xe.func.isRequired,activeElement:xe.any.isRequired,body:xe.any.isRequired}).isRequired,Node:xe.func.isRequired}),suppressRefError:xe.bool,scrollIntoView:xe.func,selectedItem:xe.any,isOpen:xe.bool,inputValue:xe.string,highlightedIndex:xe.number,labelId:xe.string,inputId:xe.string,menuId:xe.string,getItemId:xe.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&&!SC.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+'"'),!SC.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(ke({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](ke({type:o},n))}function kK(e,t){return t.changes}var PC=sd(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 ld(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=Js(v,x.props);var m=e(v,x),b=x.props.stateReducer(v,ke({},x,{changes:m}));return b},[e]),s=C.useReducer(a,t,r),c=s[0],u=s[1],d=ld(t),h=C.useCallback(function(v){return u(ke({props:d.current},v))},[d]),p=o.current;return C.useEffect(function(){var v=Js(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[Js(o,t),a]}var $s={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:kK,scrollIntoView:v3,environment:typeof window>"u"?void 0:window};function ei(e,t,r){r===void 0&&(r=D3);var n=e["default"+m1(t)];return n!==void 0?n:r[t]}function mo(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:ei(e,t,r)}function z3(e){var t=mo(e,"selectedItem"),r=mo(e,"isOpen"),n=DK(e),i=mo(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 bo(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,Pu(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&&!Pu(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 cd=function(){return Or};process.env.NODE_ENV!=="production"&&(cd=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=pl();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 ud=Or;process.env.NODE_ENV!=="production"&&(ud=function(e){var t=e.props,r=e.state,n=C.useRef(t),i=pl();C.useEffect(function(){i||(v1(r,n.current,t),n.current=t)},[r,t,i])});function ku(e,t,r){var n;r===void 0&&(r=!0);var i=((n=e.items)==null?void 0:n.length)&&t>=0;return ke({isOpen:!1,highlightedIndex:-1},i&&ke({selectedItem:e.items[t],isOpen:ei(e,"isOpen"),highlightedIndex:ei(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 pl(){var e=C.useRef(!0);return C.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Mu(e){var t=ei(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function DK(e){var t=mo(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}var su={environment:xe.shape({addEventListener:xe.func.isRequired,removeEventListener:xe.func.isRequired,document:xe.shape({createElement:xe.func.isRequired,getElementById:xe.func.isRequired,activeElement:xe.any.isRequired,body:xe.any.isRequired}).isRequired,Node:xe.func.isRequired}),itemToString:xe.func,itemToKey:xe.func,stateReducer:xe.func},H3=ke({},su,{getA11yStatusMessage:xe.func,highlightedIndex:xe.number,defaultHighlightedIndex:xe.number,initialHighlightedIndex:xe.number,isOpen:xe.bool,defaultIsOpen:xe.bool,initialIsOpen:xe.bool,selectedItem:xe.any,initialSelectedItem:xe.any,defaultSelectedItem:xe.any,id:xe.string,labelId:xe.string,menuId:xe.string,getItemId:xe.func,toggleButtonId:xe.string,onSelectedItemChange:xe.func,onHighlightedIndexChange:xe.func,onStateChange:xe.func,onIsOpenChange:xe.func,scrollIntoView:xe.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:bo(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:bo(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:Mu(i),isOpen:ei(i,"isOpen"),selectedItem:ei(i,"selectedItem"),inputValue:ei(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return ke({},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=ya(ya({},H3),{items:xe.array.isRequired,isItemDisabled:xe.func}),LK=ya(ya({},$s),{isItemDisabled:function(){return!1}}),W3=Or;process.env.NODE_ENV!=="production"&&(W3=function(e,t){xe.checkPropTypes(qK,e,"prop",t.name)});var lu=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,Au=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,E1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_end__":6,S1=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,Du=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:Du,ToggleButtonClick:lu,ToggleButtonKeyDownArrowDown:y1,ToggleButtonKeyDownArrowUp:x1,ToggleButtonKeyDownCharacter:Au,ToggleButtonKeyDownEnd:E1,ToggleButtonKeyDownEnter:S1,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:ei(i,"isOpen"),highlightedIndex:Mu(i),selectedItem:i.items[t.index]};break;case Au:{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?zn(e.highlightedIndex,1,i.items,i.isItemDisabled):o&&e.selectedItem==null?-1:bo(i,e,1);a={highlightedIndex:h,isOpen:!0}}break;case x1:if(e.isOpen&&o)a=ku(i,e.highlightedIndex,!1);else{var p=e.isOpen?zn(e.highlightedIndex,-1,i.items,i.isItemDisabled):bo(i,e,-1);a={highlightedIndex:p,isOpen:!0}}break;case S1:case O1:a=ku(i,e.highlightedIndex,!1);break;case _1:a={highlightedIndex:Gi(0,!1,i.items,i.isItemDisabled),isOpen:!0};break;case E1:a={highlightedIndex:Gi(i.items.length-1,!0,i.items,i.isItemDisabled),isOpen:!0};break;case C1:a={highlightedIndex:zn(e.highlightedIndex,-10,i.items,i.isItemDisabled)};break;case I1:a={highlightedIndex:zn(e.highlightedIndex,10,i.items,i.isItemDisabled)};break;case w1:a={isOpen:!1,highlightedIndex:-1};break;case Du:a=ke({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 ke({},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"];po.stateChangeTypes=Q3;function po(e){e===void 0&&(e={}),W3(e,po);var t=ke({},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({}),m=C.useRef(null),b=j3(t),w=ld({state:a,props:t}),y=C.useCallback(function(D){return x.current[b.getItemId(D)]},[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 m.current=sd(function(D){D({type:Ow,inputValue:""})},500),function(){m.current.cancel()}},[]),C.useEffect(function(){h&&m.current(s)},[s,h]),ud({props:t,state:a}),C.useEffect(function(){var D=mo(t,"isOpen");D&&p.current&&p.current.focus()},[]);var S=C.useCallback(function(){w.current.state.isOpen&&s({type:Du})},[s,w]),E=C.useMemo(function(){return[v,p]},[]),I=B3(n,S,E),N=cd("getMenuProps","getToggleButtonProps");C.useEffect(function(){c||(x.current={})},[c]);var T=C.useMemo(function(){return{ArrowDown:function(D){D.preventDefault(),s({type:y1,altKey:D.altKey})},ArrowUp:function(D){D.preventDefault(),s({type:x1,altKey:D.altKey})},Home:function(D){D.preventDefault(),s({type:_1})},End:function(D){D.preventDefault(),s({type:E1})},Escape:function(){w.current.state.isOpen&&s({type:w1})},Enter:function(D){D.preventDefault(),s({type:w.current.state.isOpen?S1:lu})},PageUp:function(D){w.current.state.isOpen&&(D.preventDefault(),s({type:C1}))},PageDown:function(D){w.current.state.isOpen&&(D.preventDefault(),s({type:I1}))}," ":function(D){D.preventDefault();var $=w.current.state;if(!$.isOpen){s({type:lu});return}$.inputValue?s({type:Au,key:" "}):s({type:O1})}}},[s,w]),k=C.useCallback(function(){s({type:K3})},[s]),L=C.useCallback(function(){s({type:X3})},[s]),B=C.useCallback(function(){s({type:Y3})},[s]),G=C.useCallback(function(D){s({type:Z3,highlightedIndex:D})},[s]),z=C.useCallback(function(D){s({type:N1,selectedItem:D})},[s]),P=C.useCallback(function(){s({type:J3})},[s]),K=C.useCallback(function(D){s({type:Ow,inputValue:D})},[s]),U=C.useCallback(function(D){var $=D===void 0?{}:D,Z=$.onClick,ee=Cr($,BK),A=function(){var W;(W=p.current)==null||W.focus()};return ke({id:b.labelId,htmlFor:b.toggleButtonId,onClick:it(Z,A)},ee)},[b]),re=C.useCallback(function(D,$){var Z,ee=D===void 0?{}:D,A=ee.onMouseLeave,W=ee.refKey,q=W===void 0?"ref":W,j=ee.ref,V=Cr(ee,FK),J=$===void 0?{}:$,Y=J.suppressRefError,se=Y===void 0?!1:Y,te=function(){s({type:U3})};return N("getMenuProps",se,q,v),ke((Z={},Z[q]=Ln(j,function(he){v.current=he}),Z.id=b.menuId,Z.role="listbox",Z["aria-labelledby"]=V&&V["aria-label"]?void 0:""+b.labelId,Z.onMouseLeave=it(A,te),Z),V)},[s,N,b]),X=C.useCallback(function(D,$){var Z,ee=D===void 0?{}:D,A=ee.onBlur,W=ee.onClick;ee.onPress;var q=ee.onKeyDown,j=ee.refKey,V=j===void 0?"ref":j,J=ee.ref,Y=Cr(ee,$K),se=$===void 0?{}:$,te=se.suppressRefError,he=te===void 0?!1:te,ce=w.current.state,be=function(){s({type:lu})},le=function(){ce.isOpen&&!I.isMouseDown&&s({type:Du})},ue=function(Se){var Ne=xa(Se);Ne&&T[Ne]?T[Ne](Se):AK(Ne)&&s({type:Au,key:Ne})},we=ke((Z={},Z[V]=Ln(J,function(Se){p.current=Se}),Z["aria-activedescendant"]=ce.isOpen&&ce.highlightedIndex>-1?b.getItemId(ce.highlightedIndex):"",Z["aria-controls"]=b.menuId,Z["aria-expanded"]=w.current.state.isOpen,Z["aria-haspopup"]="listbox",Z["aria-labelledby"]=Y&&Y["aria-label"]?void 0:""+b.labelId,Z.id=b.toggleButtonId,Z.role="combobox",Z.tabIndex=0,Z.onBlur=it(A,le),Z),Y);return Y.disabled||(we.onClick=it(W,be),we.onKeyDown=it(q,ue)),N("getToggleButtonProps",he,V,p),we},[s,b,w,I,N,T]),ne=C.useCallback(function(D){var $,Z=D===void 0?{}:D,ee=Z.item,A=Z.index,W=Z.onMouseMove,q=Z.onClick,j=Z.onMouseDown;Z.onPress;var V=Z.refKey,J=V===void 0?"ref":V,Y=Z.disabled,se=Z.ref,te=Cr(Z,HK);Y!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var he=w.current,ce=he.state,be=he.props,le=g1(ee,A,be.items,"Pass either item or index to getItemProps!"),ue=le[0],we=le[1],Se=be.isItemDisabled(ue,we),Ne=function(){I.isTouchEnd||we===ce.highlightedIndex||(_.current=!1,s({type:G3,index:we,disabled:Se}))},De=function(){s({type:R1,index:we})},Le=function(Je){return Je.preventDefault()},Ae=ke(($={},$[J]=Ln(se,function(Je){Je&&(x.current[b.getItemId(we)]=Je)}),$["aria-disabled"]=Se,$["aria-selected"]=ue===ce.selectedItem,$.id=b.getItemId(we),$.role="option",$),te);return Se||(Ae.onClick=it(q,De)),Ae.onMouseMove=it(W,Ne),Ae.onMouseDown=it(j,Le),Ae},[w,b,I,_,s]);return{getToggleButtonProps:X,getLabelProps:U,getMenuProps:re,getItemProps:ne,toggleMenu:k,openMenu:B,closeMenu:L,setHighlightedIndex:G,selectItem:z,reset:P,setInputValue:K,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,ju=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:ju,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)),ke({},t,{inputValue:n})}var WK=ke({},H3,{items:xe.array.isRequired,isItemDisabled:xe.func,inputValue:xe.string,defaultInputValue:xe.string,initialInputValue:xe.string,inputId:xe.string,onInputValueChange:xe.func});function UK(e,t,r,n){var i=C.useRef(),o=q3(e,t,r,n),a=o[0],s=o[1],c=pl();return C.useEffect(function(){if(Tu(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]),[Js(a,t),s]}var u4=Or;process.env.NODE_ENV!=="production"&&(u4=function(e,t){xe.checkPropTypes(WK,e,"prop",t.name)});var GK=ke({},$s,{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:ei(i,"isOpen"),highlightedIndex:Mu(i),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case T1:e.isOpen?a={highlightedIndex:zn(e.highlightedIndex,1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:o&&e.selectedItem==null?-1:bo(i,e,1),isOpen:i.items.length>=0};break;case P1:e.isOpen?o?a=ku(i,e.highlightedIndex):a={highlightedIndex:zn(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:bo(i,e,-1),isOpen:i.items.length>=0};break;case q1:a=ku(i,e.highlightedIndex);break;case k1:a=ke({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case D1:a={highlightedIndex:zn(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case j1:a={highlightedIndex:zn(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case M1:a={highlightedIndex:Gi(0,!1,i.items,i.isItemDisabled)};break;case A1:a={highlightedIndex:Gi(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case ju:a=ke({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:Mu(i),inputValue:t.inputValue};break;case z1:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:bo(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 ke({},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"];qr.stateChangeTypes=c4;function qr(e){e===void 0&&(e={}),u4(e,qr);var t=ke({},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({}),m=C.useRef(null),b=C.useRef(null),w=pl(),y=j3(t),_=C.useRef(),S=ld({state:s,props:t}),E=C.useCallback(function(A){return x.current[y.getItemId(A)]},[y]);b1(o,s,[u,d,h,p],i);var I=F3({menuElement:v.current,highlightedIndex:d,isOpen:u,itemRefs:x,scrollIntoView:n,getItemNodeFromIndex:E});ud({props:t,state:s}),C.useEffect(function(){var A=mo(t,"isOpen");A&&m.current&&m.current.focus()},[]),C.useEffect(function(){w||(_.current=r.length)});var N=C.useCallback(function(){S.current.state.isOpen&&c({type:ju})},[c,S]),T=C.useMemo(function(){return[v,b,m]},[]),k=B3(i,N,T),L=cd("getInputProps","getMenuProps");C.useEffect(function(){u||(x.current={})},[u]),C.useEffect(function(){var A;!u||!(i!=null&&i.document)||!(m!=null&&(A=m.current)!=null&&A.focus)||i.document.activeElement!==m.current&&m.current.focus()},[u,i]);var B=C.useMemo(function(){return{ArrowDown:function(A){A.preventDefault(),c({type:T1,altKey:A.altKey})},ArrowUp:function(A){A.preventDefault(),c({type:P1,altKey:A.altKey})},Home:function(A){S.current.state.isOpen&&(A.preventDefault(),c({type:M1}))},End:function(A){S.current.state.isOpen&&(A.preventDefault(),c({type:A1}))},Escape:function(A){var W=S.current.state;(W.isOpen||W.inputValue||W.selectedItem||W.highlightedIndex>-1)&&(A.preventDefault(),c({type:k1}))},Enter:function(A){var W=S.current.state;!W.isOpen||A.which===229||(A.preventDefault(),c({type:q1}))},PageUp:function(A){S.current.state.isOpen&&(A.preventDefault(),c({type:D1}))},PageDown:function(A){S.current.state.isOpen&&(A.preventDefault(),c({type:j1}))}}},[c,S]),G=C.useCallback(function(A){return ke({id:y.labelId,htmlFor:y.inputId},A)},[y]),z=C.useCallback(function(A,W){var q,j=A===void 0?{}:A,V=j.onMouseLeave,J=j.refKey,Y=J===void 0?"ref":J,se=j.ref,te=Cr(j,YK),he=W===void 0?{}:W,ce=he.suppressRefError,be=ce===void 0?!1:ce;return L("getMenuProps",be,Y,v),ke((q={},q[Y]=Ln(se,function(le){v.current=le}),q.id=y.menuId,q.role="listbox",q["aria-labelledby"]=te&&te["aria-label"]?void 0:""+y.labelId,q.onMouseLeave=it(V,function(){c({type:e4})}),q),te)},[c,L,y]),P=C.useCallback(function(A){var W,q,j=A===void 0?{}:A,V=j.item,J=j.index,Y=j.refKey,se=Y===void 0?"ref":Y,te=j.ref,he=j.onMouseMove,ce=j.onMouseDown,be=j.onClick;j.onPress;var le=j.disabled,ue=Cr(j,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 we=S.current,Se=we.props,Ne=we.state,De=g1(V,J,Se.items,"Pass either item or index to getItemProps!"),Le=De[0],Ae=De[1],Je=Se.isItemDisabled(Le,Ae),Et="onClick",tt=be,Be=function(){k.isTouchEnd||Ae===Ne.highlightedIndex||(I.current=!1,c({type:t4,index:Ae,disabled:Je}))},je=function(){c({type:B1,index:Ae})},Qe=function(Ue){return Ue.preventDefault()};return ke((W={},W[se]=Ln(te,function(Ue){Ue&&(x.current[y.getItemId(Ae)]=Ue)}),W["aria-disabled"]=Je,W["aria-selected"]=Ae===Ne.highlightedIndex,W.id=y.getItemId(Ae),W.role="option",W),!Je&&(q={},q[Et]=it(tt,je),q),{onMouseMove:it(he,Be),onMouseDown:it(ce,Qe)},ue)},[c,y,S,k,I]),K=C.useCallback(function(A){var W,q=A===void 0?{}:A,j=q.onClick;q.onPress;var V=q.refKey,J=V===void 0?"ref":V,Y=q.ref,se=Cr(q,ZK),te=S.current.state,he=function(){c({type:r4})};return ke((W={},W[J]=Ln(Y,function(ce){b.current=ce}),W["aria-controls"]=y.menuId,W["aria-expanded"]=te.isOpen,W.id=y.toggleButtonId,W.tabIndex=-1,W),!se.disabled&&ke({},{onClick:it(j,he)}),se)},[c,S,y]),U=C.useCallback(function(A,W){var q,j=A===void 0?{}:A,V=j.onKeyDown,J=j.onChange,Y=j.onInput,se=j.onBlur;j.onChangeText;var te=j.onClick,he=j.refKey,ce=he===void 0?"ref":he,be=j.ref,le=Cr(j,JK),ue=W===void 0?{}:W,we=ue.suppressRefError,Se=we===void 0?!1:we;L("getInputProps",Se,ce,m);var Ne=S.current.state,De=function(je){var Qe=xa(je);Qe&&B[Qe]&&B[Qe](je)},Le=function(je){c({type:L1,inputValue:je.target.value})},Ae=function(je){if(i!=null&&i.document&&Ne.isOpen&&!k.isMouseDown){var Qe=je.relatedTarget===null&&i.document.activeElement!==i.document.body;c({type:ju,selectItem:!Qe})}},Je=function(){c({type:z1})},Et="onChange",tt={};if(!le.disabled){var Be;tt=(Be={},Be[Et]=it(J,Y,Le),Be.onKeyDown=it(V,De),Be.onBlur=it(se,Ae),Be.onClick=it(te,Je),Be)}return ke((q={},q[ce]=Ln(be,function(je){m.current=je}),q["aria-activedescendant"]=Ne.isOpen&&Ne.highlightedIndex>-1?y.getItemId(Ne.highlightedIndex):"",q["aria-autocomplete"]="list",q["aria-controls"]=y.menuId,q["aria-expanded"]=Ne.isOpen,q["aria-labelledby"]=le&&le["aria-label"]?void 0:y.labelId,q.autoComplete="off",q.id=y.inputId,q.role="combobox",q.value=Ne.inputValue,q),tt,le)},[c,y,i,B,S,k,L]),re=C.useCallback(function(){c({type:n4})},[c]),X=C.useCallback(function(){c({type:o4})},[c]),ne=C.useCallback(function(){c({type:i4})},[c]),D=C.useCallback(function(A){c({type:a4,highlightedIndex:A})},[c]),$=C.useCallback(function(A){c({type:F1,selectedItem:A})},[c]),Z=C.useCallback(function(A){c({type:s4,inputValue:A})},[c]),ee=C.useCallback(function(){c({type:l4})},[c]);return{getItemProps:P,getLabelProps:G,getMenuProps:z,getInputProps:U,getToggleButtonProps:K,toggleMenu:re,openMenu:ne,closeMenu:X,setHighlightedIndex:D,setInputValue:Z,selectItem:$,reset:ee,highlightedIndex:d,isOpen:u,selectedItem:h,inputValue:p}}var d4={activeIndex:-1,selectedItems:[]};function kC(e,t){return mo(e,t,d4)}function MC(e,t){return ei(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:su.stateReducer,itemToKey:su.itemToKey,environment:su.environment,selectedItems:xe.array,initialSelectedItems:xe.array,defaultSelectedItems:xe.array,getA11yStatusMessage:xe.func,activeIndex:xe.number,initialActiveIndex:xe.number,defaultActiveIndex:xe.number,onActiveIndexChange:xe.func,onSelectedItemsChange:xe.func,keyNavigationNext:xe.string,keyNavigationPrevious:xe.string},rY={itemToKey:$s.itemToKey,stateReducer:$s.stateReducer,environment:$s.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},f4=Or;process.env.NODE_ENV!=="production"&&(f4=function(e,t){xe.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=ke({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 ke({},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=ke({},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=pl(),p=C.useRef(null),v=C.useRef();v.current=[];var x=ld({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]),ud({props:t,state:s});var m=cd("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(L){AC(L)&&c({type:K1})},k.Backspace=function(L){AC(L)&&c({type:Y1})},k},[c,o]),y=C.useCallback(function(k){var L,B=k===void 0?{}:k,G=B.refKey,z=G===void 0?"ref":G,P=B.ref,K=B.onClick,U=B.onKeyDown,re=B.selectedItem,X=B.index,ne=Cr(B,oY),D=x.current.state,$=g1(re,X,D.selectedItems,"Pass either item or index to getSelectedItemProps!"),Z=$[1],ee=Z>-1&&Z===D.activeIndex,A=function(){c({type:H1,index:Z})},W=function(q){var j=xa(q);j&&b[j]&&b[j](q)};return ke((L={},L[z]=Ln(P,function(q){q&&v.current.push(q)}),L.tabIndex=ee?0:-1,L.onClick=it(K,A),L.onKeyDown=it(U,W),L),ne)},[c,x,b]),_=C.useCallback(function(k,L){var B,G=k===void 0?{}:k,z=G.refKey,P=z===void 0?"ref":z,K=G.ref,U=G.onKeyDown,re=G.onClick,X=G.preventKeyAction,ne=X===void 0?!1:X,D=Cr(G,aY),$=L===void 0?{}:L,Z=$.suppressRefError,ee=Z===void 0?!1:Z;m("getDropdownProps",ee,P,p);var A=function(q){var j=xa(q);j&&w[j]&&w[j](q)},W=function(){c({type:X1})};return ke((B={},B[P]=Ln(K,function(q){q&&(p.current=q)}),B),!ne&&{onKeyDown:it(U,A),onClick:it(re,W)},D)},[c,w,m]),S=C.useCallback(function(k){c({type:Z1,selectedItem:k})},[c]),E=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:S,removeSelectedItem:E,setSelectedItems:I,setActiveIndex:N,reset:T,selectedItems:d,activeIndex:u}}const sY=e=>{const{items:t=[],isMulti:r=!1,isSearchable:n=!1,value:i,defaultValue:o,inputValue:a,onChange:s,onInputChange:c,getOptionLabel:u=Y=>(Y==null?void 0:Y.label)||"",getOptionValue:d=Y=>(Y==null?void 0:Y.value)||"",isOpen:h,onOpenChange:p,customOptionGenerator:v,disableInternalFiltering:x=!1,stateReducer:m,isDisabled:b=!1,clearSearchOnSelect:w=!1,closeMenuOnSelect:y=!0}=e,_=C.useCallback(Y=>{const se=u(Y);if(typeof se=="string")return se;if(typeof se=="number")return String(se);const te=Y;if(typeof te=="object"&&te!==null){if(typeof te.label=="string")return te.label;if(typeof te.name=="string")return te.name}return String(d(Y))},[u,d]),S=Y=>Y?Array.isArray(Y)?Y:[Y]:[],E=o!==void 0?o:i!==void 0?i:null,[I,N]=C.useState(()=>S(E)),[T,k]=C.useState(a||""),[L,B]=C.useState(()=>h!==void 0?h:!1),G=i!==void 0?S(i):I,z=a!==void 0?a:T,P=h!==void 0?h:L,K=C.useCallback(Y=>{h===void 0&&B(Y),p==null||p(Y)},[h,p]),U=C.useCallback(Y=>{i===void 0&&N(Y);const se=r?Y:Y[0]||null;s==null||s(se)},[i,r,s]),re=C.useCallback(Y=>{a===void 0&&k(Y),c==null||c(Y)},[a,c]),[X,ne]=C.useState(z);C.useEffect(()=>{const Y=setTimeout(()=>ne(z),120);return()=>clearTimeout(Y)},[z]);const D=C.useMemo(()=>v?v(z,t):x||!n||!X?t:t.filter(Y=>_(Y).toLowerCase().includes(X.toLowerCase())),[t,z,X,v,x,n,_]),$=r_({selectedItems:G,onSelectedItemsChange:Y=>{const se=Y.selectedItems||[];U(se)}}),Z={items:D,itemToString:Y=>Y?_(Y):"",isOpen:P,onIsOpenChange:({isOpen:Y})=>{Y!==void 0&&K(Y)},selectedItem:r?null:G[0]||null,onSelectedItemChange:Y=>{!r&&Y.selectedItem&&U([Y.selectedItem])}},ee=Y=>{const se=new Map;for(const[te,he]of Object.entries(Y.stateChangeTypes))se.set(he,te);return(te,he)=>{const ce=(()=>{const{changes:be,type:le}=he;if((le===qr.stateChangeTypes.InputBlur||le===po.stateChangeTypes.ToggleButtonBlur)&&typeof document<"u"){const Se=document.activeElement;if(Se!=null&&Se.closest('[data-qui="SelectMenu"]'))return{...be,isOpen:!0}}const ue=Y===qr?[qr.stateChangeTypes.InputKeyDownEnter,qr.stateChangeTypes.ItemClick]:[po.stateChangeTypes.ToggleButtonKeyDownEnter,po.stateChangeTypes.ItemClick],we=y??!r;if(r&&be.selectedItem&&ue.includes(le)&&(!G.some(Se=>d(Se)===d(be.selectedItem))&&be.selectedItem&&$.addSelectedItem(be.selectedItem),!we))return{...be,isOpen:!0,highlightedIndex:te.highlightedIndex,...n&&{inputValue:""}};if(!r&&be.selectedItem&&ue.includes(le)){const Se={...be};return w&&(Se.inputValue=""),y===!1&&(Se.isOpen=!0,Se.highlightedIndex=te.highlightedIndex),Se}return le===qr.stateChangeTypes.InputBlur&&!r&&G.length>0?{...be,inputValue:_(G[0])}:n&&!ue.includes(le)&&le!==qr.stateChangeTypes.InputChange&&(le===qr.stateChangeTypes.ControlledPropUpdatedSelectedItem||le===qr.stateChangeTypes.FunctionSetInputValue||le===qr.stateChangeTypes.InputBlur&&!be.isOpen)?{...be,inputValue:z}:be})();if(m){const be=se.get(he.type)||he.type;return m(te,{...he,type:be,changes:ce})}return ce}},A=n?qr({...Z,inputValue:z,onInputValueChange:({inputValue:Y,type:se})=>{!Y&&se===qr.stateChangeTypes.InputChange&&U([]),re(Y||"")},stateReducer:ee(qr),initialIsOpen:h!==void 0?h:!1,defaultIsOpen:!1}):po({...Z,stateReducer:ee(po),initialIsOpen:h!==void 0?h:!1,defaultIsOpen:!1}),W=()=>{b||(K(!P),"toggleMenu"in A&&A.toggleMenu())},q=C.useCallback(()=>{b||(K(!0),"openMenu"in A&&A.openMenu())},[K,A,b]),j=C.useCallback(()=>{K(!1),"closeMenu"in A&&A.closeMenu()},[K,A]),V=C.useCallback(()=>{U([]),re(""),r&&$.reset()},[U,re,r,$]),J=C.useCallback(Y=>{r&&$.removeSelectedItem(Y)},[r,$]);return{isOpen:A.isOpen,selectedItem:A.selectedItem,highlightedIndex:A.highlightedIndex,inputValue:z,getToggleButtonProps:A.getToggleButtonProps,getMenuProps:A.getMenuProps,getItemProps:A.getItemProps,getInputProps:n?(Y,se)=>({..."getInputProps"in A?A.getInputProps(Y,se):{},value:z}):void 0,selectedItems:G,filteredItems:D,setInputValue:re,setIsOpen:K,toggleMenu:W,openMenu:q,closeMenu:j,clearSelection:V,removeItem:J,multipleSelection:$,isMulti:r,isSearchable:n}},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:m,customOptionGenerator:b,disableInternalFiltering:w,getOptionLabel:y=k=>typeof k=="string"||typeof k=="number"?String(k):(k==null?void 0:k.label)||(k==null?void 0:k.name)||String(k),getOptionValue:_=k=>typeof k=="string"||typeof k=="number"?String(k):(k==null?void 0:k.value)||(k==null?void 0:k.id)||(k==null?void 0:k.name)||String(k),isOptionDisabled:S=k=>(k==null?void 0:k.isDisabled)||!1,stateReducer:E,clearSearchOnSelect:I,closeMenuOnSelect:N,...T})=>{const[k,L]=C.useState(!1),[B,G]=C.useState(!1),[z,P]=C.useState(!1),[K,U]=C.useState("bottom"),re=C.useMemo(()=>eK(a),[a]),X=sY({items:re,value:s,defaultValue:c,onChange:u,isMulti:d,inputValue:h,onInputChange:p,isSearchable:v,isOpen:x,onOpenChange:m,getOptionLabel:y,getOptionValue:_,customOptionGenerator:b,disableInternalFiltering:w,stateReducer:E,isDisabled:n,clearSearchOnSelect:I,closeMenuOnSelect:N}),ne={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,hasMessage:k,setHasMessage:L,hasGroup:B,setHasGroup:G,menuVisible:z,setMenuVisible:P,menuPlacement:K,setMenuPlacement:U,downshift:X,options:a,getOptionLabel:y,getOptionValue:_,isOptionDisabled:S};return O.jsx(d3.Provider,{value:ne,children:O.jsx("div",{"data-qui":"Select",className:me(DG(),i),...T,children:o})})},lY=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}=hr(),x=n??c,m=r??h.isOpen;return O.jsx("div",{ref:o,className:me(LG({size:a,color:s,isDisabled:x,isFocused:!!m,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})}),cY=({className:e,children:t,isMulti:r})=>O.jsx("div",{className:me(zG({isMulti:r}),e),children:t}),cu=C.forwardRef(({isHidden:e,inputClassName:t,className:r,...n},i)=>{const{size:o,color:a}=hr();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",className:me(BG({size:o,color:a}),t,r),...n})}),uY=({className:e,children:t})=>{const{size:r,color:n}=hr();return O.jsx("div",{className:me(FG({size:r,color:n}),e),children:t})},dY=({className:e,children:t,data:r,isDisabled:n})=>{const{size:i,color:o,getOptionLabel:a}=hr();return O.jsx("div",{className:me($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}=hr(),d=()=>{o?o(r):c.removeItem(r)};return O.jsxs("div",{className:me(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(Qu,{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}=hr(),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:me(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,{})})},fY=({className:e,children:t,onClick:r,isDisabled:n,...i})=>{const{size:o,color:a,isDisabled:s,downshift:c}=hr(),u=n??s,d=c.inputValue.length>0&&c.isSearchable;if(u||!d)return null;const h=p=>{p.stopPropagation(),r?r(p):c.setInputValue("")};return O.jsx("div",{className:me(f3({size:o,color:a,isDisabled:u}),e),onClick:h,role:"button",tabIndex:0,"aria-label":"Clear selection",...i,children:t||O.jsx(Qu,{})})},g4=C.forwardRef(({color:e,className:t,children:r,onClick:n,isDisabled:i,...o},a)=>{const{size:s,color:c,isDisabled:u,downshift:d}=hr(),h=i??u,p=d.isOpen,v=x=>{x.stopPropagation(),h||(n?n(x):d.toggleMenu())};return O.jsx("div",{ref:a,className:me(UG({size:s,color:e||c,isDisabled:h}),"cursor-pointer",t),onClick:v,role:"button",tabIndex:h?-1:0,"aria-label":p?"Close menu":"Open menu","aria-expanded":p,"aria-disabled":h,onMouseDown:x=>{x.preventDefault()},...o,children:r||O.jsx(FD,{className:me("transition-transform duration-200",{"rotate-180":p})})})}),hY=C.forwardRef(({className:e,children:t,placement:r,...n},i)=>{const{size:o,hasMessage:a,color:s,hasGroup:c}=hr();return O.jsx("div",{"data-qui":"SelectMenu",ref:i,className:me(GG({size:o,placement:r,hasMessage:a,color:s,hasGroup:c}),e),...n,children:t})}),pY=C.forwardRef(({className:e,children:t,maxHeight:r=300,totalHeight:n,...i},o)=>{const{size:a}=hr();return O.jsx(e1,{scrollableNodeProps:{ref:o},className:me(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})}),uu=({className:e,children:t,data:r,isDisabled:n,isFocused:i,isSelected:o,innerProps:a,optionClassName:s,...c})=>{const{size:u,color:d,getOptionLabel:h}=hr();return O.jsx("div",{"data-qui":"SelectOption",className:me(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}=hr();return O.jsxs("div",{"data-qui":"SelectOptionGroup",className:me(XG({size:o}),e),children:[O.jsx(vY,{children:i?i(r):n||r.label}),t]})},vY=({className:e,children:t})=>{const{size:r,color:n}=hr();return O.jsx("div",{className:me(ZG({size:r,color:n}),e),children:t})},zh=({className:e,children:t,inputValue:r})=>{const{size:n}=hr();return O.jsx("div",{className:me(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}=hr();return C.useEffect(()=>(u(!0),()=>{u(!1)}),[u]),O.jsx("div",{ref:n,"data-qui":"SelectGroup",className:me(jG({size:i,color:o,isDisabled:a,hasMessage:s,isInvalid:c,isFocused:d,menuPlacement:d?h:void 0}),e),...r,children:t})}),gY=C.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:u}=hr(),d=r||u,h=qG({size:s,color:c,isDisabled:d,isAction:e});return O.jsx("div",{ref:a,"data-qui":"SelectIcon",className:me(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})}),mY=({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?Qn.createPortal(O.jsx("div",{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},Bh=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,clearSearchOnSelect:a=!1,isLoading:s=!1,isRequired:c=!1,hideIndicators:u=!1,hideDropdownIndicator:d=!1,searchPlacement:h="trigger",hideSelectedOptions:p=!1,onFocus:v,onBlur:x,renderMenuHeader:m,formatOptionLabel:b,renderOption:w,optionClassName:y,renderValue:_,renderGroupHeading:S,inputRef:E,controlShouldRenderValue:I=!0,name:N,id:T,onSelectionComplete:k,"aria-label":L,"aria-labelledby":B,"aria-describedby":G,children:z,usePortal:P=!1,virtualizeThreshold:K=100,...U},re)=>{const{size:X,isInvalid:ne,isDisabled:D,hasGroup:$,downshift:Z,options:ee=[],getOptionLabel:A,getOptionValue:W,isOptionDisabled:q,menuPlacement:j,setMenuPlacement:V,menuVisible:J,setMenuVisible:Y}=hr(),se=C.useMemo(()=>{if(w)return w;if(b)return({data:Fe})=>b(Fe)},[w,b]),te=C.useRef(null),he=E||te,ce=C.useRef(null),be=C.useRef(null),le=C.useRef(null),{isOpen:ue,openMenu:we,selectedItem:Se,inputValue:Ne,highlightedIndex:De,getToggleButtonProps:Le,getMenuProps:Ae,getInputProps:Je,getItemProps:Et,isMulti:tt,isSearchable:Be,multipleSelection:je}=Z,{getDropdownProps:Qe}=je;C.useLayoutEffect(()=>{if(!ue||!ce.current)return;const Fe=ce.current.getBoundingClientRect(),bt=window.innerHeight-Fe.bottom;V(bt<300?"top":"bottom")},[ue,V]),C.useLayoutEffect(()=>{const Fe=ue&&!(r&&Z.filteredItems.length===0);return Y(Fe),()=>Y(!1)},[ue,r,Z.filteredItems.length,Y]);const Ue=tt?Z.selectedItems??[]:Se?[Se]:[],Wt=Ue.length>0,Ut=o&&!D&&!u,St=i&&Wt&&!D&&!u,Nt=!d&&!u,wr=!Wt&&(!Be||!Ne)||!I,sn={},Tr={};Object.entries(U).forEach(([Fe,bt])=>{Fe.startsWith("data-")||Fe.startsWith("aria-")||Fe==="role"?sn[Fe]=bt:Tr[Fe]=bt});const ar=C.useMemo(()=>Bh([ce,re]),[re]),Nn=Ae({},{suppressRefError:!0}),Tn=Qe({preventKeyAction:ue}),kt={ref:he,disabled:D,required:c,name:N,id:T,"aria-label":L,"aria-labelledby":B,"aria-describedby":G,"aria-invalid":ne,onFocus:v,onBlur:x,...Tr},Mt=(Je==null?void 0:Je({...kt,...Tn}))??kt,{ref:At,...sr}=Mt,Lt=C.useMemo(()=>Bh([At,Tn.ref]),[At,Tn.ref]),zt=Fe=>Ue.some(bt=>W(bt)===W(Fe)),lr=Fe=>p?Fe.filter(bt=>!zt(bt)):Fe,Ur=Fe=>p?Fe.map(bt=>({...bt,options:lr(bt.options)})).filter(bt=>bt.options.length>0):Fe,pt=_w(ee)?[]:lr(Z.filteredItems),Gt={sm:22,md:28,lg:36}[X]??28,Kt=pt.length>=K,rr=AG({count:Kt?pt.length:0,getScrollElement:()=>le.current,estimateSize:()=>Gt,overscan:5});C.useEffect(()=>{Kt&&ue&&De>=0&&De<pt.length&&rr.scrollToIndex(De,{align:"auto"})},[De,Kt,ue]);const vr=Fe=>{k==null||k(W(Fe),Fe)},cr=Be?{}:Le({disabled:D,...Tn,ref:Bh([ar,Tn.ref])});return O.jsxs("div",{className:me({relative:!$,"flex-1 min-w-0":$}),children:[O.jsxs(lY,{...Be?{ref:ar}:cr,...sn,isFocused:J,isDisabled:D,onClick:Fe=>{Fe.stopPropagation(),Be?we():Be||Z.toggleMenu()},children:[z||O.jsxs(cY,{isMulti:tt,children:[tt&&I&&Ue.map((Fe,bt)=>O.jsx(p4,{data:Fe,index:bt,isDisabled:D,children:_?_(Fe):void 0},W(Fe))),!tt&&Wt&&I&&!Be&&O.jsx("div",{className:"flex items-center gap-2",children:O.jsx(dY,{data:Ue[0],isDisabled:D,children:_?_(Ue[0]):A(Ue[0])})}),Be&&h==="trigger"?O.jsx(cu,{ref:Lt,...sr,placeholder:e}):O.jsxs(O.Fragment,{children:[O.jsx(cu,{ref:Lt,...sr,isHidden:!0,readOnly:!0,value:Ue.map(Fe=>W(Fe)).join(",")}),wr&&O.jsx(uY,{children:e})]})]}),O.jsxs("div",{className:me("flex items-center size-fit gap-1",{hidden:!St&&!Nt}),children:[Ut&&O.jsx(fY,{}),St&&O.jsx(v4,{}),Nt&&O.jsx(g4,{...Be?Le({disabled:D,"aria-label":ue?"Close menu":"Open menu"}):{}})]})]}),O.jsx("div",{ref:Nn.ref,style:{display:"none"},"aria-hidden":"true"}),O.jsx(mY,{isOpen:ue,usePortal:P,controlRef:ce,children:(()=>{const{ref:Fe,...bt}=Nn;return r&&Z.filteredItems.length===0?O.jsx("div",{...bt,style:{display:"none"},"aria-hidden":"true"}):O.jsxs(hY,{ref:be,...bt,placement:j,children:[m&&m(Z),Be&&h==="menu"&&O.jsx("div",{className:"p-2",children:O.jsx(cu,{ref:Lt,...sr,autoFocus:!0,placeholder:e,onClick:Bt=>Bt.stopPropagation()})}),O.jsx(pY,{ref:le,totalHeight:Kt?rr.getTotalSize():void 0,children:s?O.jsx("div",{className:JG({size:X}),children:n}):Z.filteredItems.length===0?O.jsx(zh,{inputValue:Ne,children:typeof t=="function"?t(Ne):t}):_w(ee)?(()=>{const Bt=Ur(ee);return Bt.length===0?O.jsx(zh,{inputValue:Ne,children:typeof t=="function"?t(Ne):t}):Bt.map(Ft=>O.jsx(m4,{data:Ft,label:Ft.label,options:Ft.options,renderGroupHeading:S,children:Ft.options.map(gr=>{const Pr=W(gr),ln=Ue.some(Qi=>W(Qi)===Pr),cn=Z.filteredItems.findIndex(Qi=>W(Qi)===Pr),un=De===cn,dn=q(gr),si=Et({item:gr,index:cn,onClick:()=>vr(gr)});return O.jsx(uu,{...si,data:gr,isDisabled:dn,isFocused:un,isSelected:ln,optionClassName:y,children:se?se({data:gr,isFocused:un,isSelected:ln,isDisabled:dn}):void 0},Pr)})},Ft.label))})():pt.length===0?O.jsx(zh,{inputValue:Ne,children:typeof t=="function"?t(Ne):t}):Kt?rr.getVirtualItems().map(Bt=>{const Ft=pt[Bt.index],gr=W(Ft),Pr=Ue.some(si=>W(si)===gr),ln=Z.filteredItems.findIndex(si=>W(si)===gr),cn=De===ln,un=q(Ft),dn=Et({item:Ft,index:ln,onClick:()=>vr(Ft)});return O.jsx("div",{"data-index":Bt.index,ref:rr.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${Bt.start}px)`},children:O.jsx(uu,{...dn,data:Ft,isDisabled:un,isFocused:cn,isSelected:Pr,optionClassName:y,children:se?se({data:Ft,isFocused:cn,isSelected:Pr,isDisabled:un}):void 0})},Bt.key)}):pt.map(Bt=>{const Ft=W(Bt),gr=Ue.some(dn=>W(dn)===Ft),Pr=Z.filteredItems.findIndex(dn=>W(dn)===Ft),ln=De===Pr,cn=q(Bt),un=Et({item:Bt,index:Pr,onClick:()=>vr(Bt)});return O.jsx(uu,{...un,data:Bt,isDisabled:cn,isFocused:ln,isSelected:gr,optionClassName:y,children:se?se({data:Bt,isFocused:ln,isSelected:gr,isDisabled:cn}):void 0},Ft)})})]})})()})]})});h4.displayName="Select.Root";b4.displayName="Select.Group";gY.displayName="Select.Icon";cu.displayName="Select.Input";p4.displayName="Select.MultiValue";v4.displayName="Select.ClearIndicator";g4.displayName="Select.DropdownIndicator";uu.displayName="Select.Option";m4.displayName="Select.OptionGroup";const bY=y4;bY.displayName="Select.Field";const Fh={Root:h4,Group:b4,Field:y4};C.createContext(void 0);const yY=({active:e,disabled:t,error:r,isOpen:n,className:i})=>me("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),xY=C.forwardRef(({active:e,disabled:t,error:r,isOpen:n,className:i,children:o,as:a="div",...s},c)=>{const u=yY({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})});xY.displayName="ListItem";function wY({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return O.jsx(O.Fragment,{children:O.jsx(yr,{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(Th,{defaultValue:t,onTabChange:s=>n(s),children:[O.jsx(Th.Item,{label:"Roles",value:"roles","data-cy":"roles_btn_navbar",className:"min-w-[110px] place-content-center"}),O.jsx(Th.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(Nu,{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(Nu,{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),_Y=({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?ht.useLayoutEffect:ht.useEffect,Fr="top",En="bottom",Sn="right",$r="left",i_="auto",vl=[Fr,En,Sn,$r],wa="start",Qs="end",EY="clippingParents",w4="viewport",ds="popper",SY="reference",qC=vl.reduce(function(e,t){return e.concat([t+"-"+wa,t+"-"+Qs])},[]),_4=[].concat(vl,[i_]).reduce(function(e,t){return e.concat([t,t+"-"+wa,t+"-"+Qs])},[]),OY="beforeRead",CY="read",IY="afterRead",RY="beforeMain",NY="main",TY="afterMain",PY="beforeWrite",kY="write",MY="afterWrite",AY=[OY,CY,IY,RY,NY,TY,PY,kY,MY];function ii(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 Co(e){var t=nn(e).Element;return e instanceof t||e instanceof Element}function _n(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 DY(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];!_n(o)||!ii(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 jY(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},{});!_n(i)||!ii(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const qY={name:"applyStyles",enabled:!0,phase:"write",fn:DY,effect:jY,requires:["computeStyles"]};function ti(e){return e.split("-")[0]}var yo=Math.max,qu=Math.min,_a=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 E4(){return!/^((?!chrome|android).)*safari/i.test(Cw())}function Ea(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&_n(e)&&(i=e.offsetWidth>0&&_a(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&_a(n.height)/e.offsetHeight||1);var a=Co(e)?nn(e):window,s=a.visualViewport,c=!E4()&&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=Ea(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 S4(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 xi(e){return nn(e).getComputedStyle(e)}function LY(e){return["table","td","th"].indexOf(ii(e))>=0}function Ki(e){return((Co(e)?e.ownerDocument:e.document)||window.document).documentElement}function dd(e){return ii(e)==="html"?e:e.assignedSlot||e.parentNode||(o_(e)?e.host:null)||Ki(e)}function LC(e){return!_n(e)||xi(e).position==="fixed"?null:e.offsetParent}function zY(e){var t=/firefox/i.test(Cw()),r=/Trident/i.test(Cw());if(r&&_n(e)){var n=xi(e);if(n.position==="fixed")return null}var i=dd(e);for(o_(i)&&(i=i.host);_n(i)&&["html","body"].indexOf(ii(i))<0;){var o=xi(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 gl(e){for(var t=nn(e),r=LC(e);r&&LY(r)&&xi(r).position==="static";)r=LC(r);return r&&(ii(r)==="html"||ii(r)==="body"&&xi(r).position==="static")?t:r||zY(e)||t}function s_(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Hs(e,t,r){return yo(e,qu(t,r))}function BY(e,t,r){var n=Hs(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 FY=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,C4(typeof t!="number"?t:I4(t,vl))};function $Y(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=ti(r.placement),c=s_(s),u=[$r,Sn].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var h=FY(i.padding,r),p=a_(o),v=c==="y"?Fr:$r,x=c==="y"?En:Sn,m=r.rects.reference[d]+r.rects.reference[c]-a[c]-r.rects.popper[d],b=a[c]-r.rects.reference[c],w=gl(o),y=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,_=m/2-b/2,S=h[v],E=y-p[d]-h[x],I=y/2-p[d]/2+_,N=Hs(S,I,E),T=c;r.modifiersData[n]=(t={},t[T]=N,t.centerOffset=N-I,t)}}function HY(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)||S4(t.elements.popper,i)&&(t.elements.arrow=i))}const VY={name:"arrow",enabled:!0,phase:"main",fn:$Y,effect:HY,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Sa(e){return e.split("-")[1]}var WY={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UY(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:_a(r*i)/i||0,y:_a(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,m=x===void 0?0:x,b=typeof d=="function"?d({x:v,y:m}):{x:v,y:m};v=b.x,m=b.y;var w=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),_=$r,S=Fr,E=window;if(u){var I=gl(r),N="clientHeight",T="clientWidth";if(I===nn(r)&&(I=Ki(r),xi(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",T="scrollWidth")),I=I,i===Fr||(i===$r||i===Sn)&&o===Qs){S=En;var k=h&&I===E&&E.visualViewport?E.visualViewport.height:I[N];m-=k-n.height,m*=c?1:-1}if(i===$r||(i===Fr||i===En)&&o===Qs){_=Sn;var L=h&&I===E&&E.visualViewport?E.visualViewport.width:I[T];v-=L-n.width,v*=c?1:-1}}var B=Object.assign({position:s},u&&WY),G=d===!0?UY({x:v,y:m},nn(r)):{x:v,y:m};if(v=G.x,m=G.y,c){var z;return Object.assign({},B,(z={},z[S]=y?"0":"",z[_]=w?"0":"",z.transform=(E.devicePixelRatio||1)<=1?"translate("+v+"px, "+m+"px)":"translate3d("+v+"px, "+m+"px, 0)",z))}return Object.assign({},B,(t={},t[S]=y?m+"px":"",t[_]=w?v+"px":"",t.transform="",t))}function GY(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:ti(t.placement),variation:Sa(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 KY={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:GY,data:{}};var Dc={passive:!0};function YY(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,Dc)}),s&&c.addEventListener("resize",r.update,Dc),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",r.update,Dc)}),s&&c.removeEventListener("resize",r.update,Dc)}}const XY={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:YY,data:{}};var ZY={left:"right",right:"left",bottom:"top",top:"bottom"};function du(e){return e.replace(/left|right|bottom|top/g,function(t){return ZY[t]})}var JY={start:"end",end:"start"};function BC(e){return e.replace(/start|end/g,function(t){return JY[t]})}function l_(e){var t=nn(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function c_(e){return Ea(Ki(e)).left+l_(e).scrollLeft}function QY(e,t){var r=nn(e),n=Ki(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var u=E4();(u||!u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+c_(e),y:c}}function eX(e){var t,r=Ki(e),n=l_(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=yo(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=yo(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+c_(e),c=-n.scrollTop;return xi(i||r).direction==="rtl"&&(s+=yo(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}function u_(e){var t=xi(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(ii(e))>=0?e.ownerDocument.body:_n(e)&&u_(e)?e:R4(dd(e))}function Vs(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(Vs(dd(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 tX(e,t){var r=Ea(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(QY(e,r)):Co(t)?tX(t,r):Iw(eX(Ki(e)))}function rX(e){var t=Vs(dd(e)),r=["absolute","fixed"].indexOf(xi(e).position)>=0,n=r&&_n(e)?gl(e):e;return Co(n)?t.filter(function(i){return Co(i)&&S4(i,n)&&ii(i)!=="body"}):[]}function nX(e,t,r,n){var i=t==="clippingParents"?rX(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=yo(d.top,c.top),c.right=qu(d.right,c.right),c.bottom=qu(d.bottom,c.bottom),c.left=yo(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?ti(n):null,o=n?Sa(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(i){case Fr:c={x:a,y:t.y-r.height};break;case En:c={x:a,y:t.y+t.height};break;case Sn:c={x:t.x+t.width,y:s};break;case $r: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 wa:c[u]=c[u]-(t[d]/2-r[d]/2);break;case Qs:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function el(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?EY:s,u=r.rootBoundary,d=u===void 0?w4:u,h=r.elementContext,p=h===void 0?ds:h,v=r.altBoundary,x=v===void 0?!1:v,m=r.padding,b=m===void 0?0:m,w=C4(typeof b!="number"?b:I4(b,vl)),y=p===ds?SY:ds,_=e.rects.popper,S=e.elements[x?y:p],E=nX(Co(S)?S:S.contextElement||Ki(e.elements.popper),c,d,a),I=Ea(e.elements.reference),N=N4({reference:I,element:_,placement:i}),T=Iw(Object.assign({},_,N)),k=p===ds?T:I,L={top:E.top-k.top+w.top,bottom:k.bottom-E.bottom+w.bottom,left:E.left-k.left+w.left,right:k.right-E.right+w.right},B=e.modifiersData.offset;if(p===ds&&B){var G=B[i];Object.keys(L).forEach(function(z){var P=[Sn,En].indexOf(z)>=0?1:-1,K=[Fr,En].indexOf(z)>=0?"y":"x";L[z]+=G[K]*P})}return L}function iX(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=Sa(n),h=d?s?qC:qC.filter(function(x){return Sa(x)===d}):vl,p=h.filter(function(x){return u.indexOf(x)>=0});p.length===0&&(p=h);var v=p.reduce(function(x,m){return x[m]=el(e,{placement:m,boundary:i,rootBoundary:o,padding:a})[ti(m)],x},{});return Object.keys(v).sort(function(x,m){return v[x]-v[m]})}function oX(e){if(ti(e)===i_)return[];var t=du(e);return[BC(e),t,BC(t)]}function aX(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,m=r.allowedAutoPlacements,b=t.options.placement,w=ti(b),y=w===b,_=c||(y||!x?[du(b)]:oX(b)),S=[b].concat(_).reduce(function(A,W){return A.concat(ti(W)===i_?iX(t,{placement:W,boundary:d,rootBoundary:h,padding:u,flipVariations:x,allowedAutoPlacements:m}):W)},[]),E=t.rects.reference,I=t.rects.popper,N=new Map,T=!0,k=S[0],L=0;L<S.length;L++){var B=S[L],G=ti(B),z=Sa(B)===wa,P=[Fr,En].indexOf(G)>=0,K=P?"width":"height",U=el(t,{placement:B,boundary:d,rootBoundary:h,altBoundary:p,padding:u}),re=P?z?Sn:$r:z?En:Fr;E[K]>I[K]&&(re=du(re));var X=du(re),ne=[];if(o&&ne.push(U[G]<=0),s&&ne.push(U[re]<=0,U[X]<=0),ne.every(function(A){return A})){k=B,T=!1;break}N.set(B,ne)}if(T)for(var D=x?3:1,$=function(W){var q=S.find(function(j){var V=N.get(j);if(V)return V.slice(0,W).every(function(J){return J})});if(q)return k=q,"break"},Z=D;Z>0;Z--){var ee=$(Z);if(ee==="break")break}t.placement!==k&&(t.modifiersData[n]._skip=!0,t.placement=k,t.reset=!0)}}const sX={name:"flip",enabled:!0,phase:"main",fn:aX,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[Fr,Sn,En,$r].some(function(t){return e[t]>=0})}function lX(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=el(t,{elementContext:"reference"}),s=el(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 cX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:lX};function uX(e,t,r){var n=ti(e),i=[$r,Fr].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,[$r,Sn].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function dX(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]=uX(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 fX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:dX};function hX(e){var t=e.state,r=e.name;t.modifiersData[r]=N4({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const pX={name:"popperOffsets",enabled:!0,phase:"read",fn:hX,data:{}};function vX(e){return e==="x"?"y":"x"}function gX(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,m=x===void 0?0:x,b=el(t,{boundary:c,rootBoundary:u,padding:h,altBoundary:d}),w=ti(t.placement),y=Sa(t.placement),_=!y,S=s_(w),E=vX(S),I=t.modifiersData.popperOffsets,N=t.rects.reference,T=t.rects.popper,k=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,L=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,G={x:0,y:0};if(I){if(o){var z,P=S==="y"?Fr:$r,K=S==="y"?En:Sn,U=S==="y"?"height":"width",re=I[S],X=re+b[P],ne=re-b[K],D=v?-T[U]/2:0,$=y===wa?N[U]:T[U],Z=y===wa?-T[U]:-N[U],ee=t.elements.arrow,A=v&&ee?a_(ee):{width:0,height:0},W=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:O4(),q=W[P],j=W[K],V=Hs(0,N[U],A[U]),J=_?N[U]/2-D-V-q-L.mainAxis:$-V-q-L.mainAxis,Y=_?-N[U]/2+D+V+j+L.mainAxis:Z+V+j+L.mainAxis,se=t.elements.arrow&&gl(t.elements.arrow),te=se?S==="y"?se.clientTop||0:se.clientLeft||0:0,he=(z=B==null?void 0:B[S])!=null?z:0,ce=re+J-he-te,be=re+Y-he,le=Hs(v?qu(X,ce):X,re,v?yo(ne,be):ne);I[S]=le,G[S]=le-re}if(s){var ue,we=S==="x"?Fr:$r,Se=S==="x"?En:Sn,Ne=I[E],De=E==="y"?"height":"width",Le=Ne+b[we],Ae=Ne-b[Se],Je=[Fr,$r].indexOf(w)!==-1,Et=(ue=B==null?void 0:B[E])!=null?ue:0,tt=Je?Le:Ne-N[De]-T[De]-Et+L.altAxis,Be=Je?Ne+N[De]+T[De]-Et-L.altAxis:Ae,je=v&&Je?BY(tt,Ne,Be):Hs(v?tt:Le,Ne,v?Be:Ae);I[E]=je,G[E]=je-Ne}t.modifiersData[n]=G}}const mX={name:"preventOverflow",enabled:!0,phase:"main",fn:gX,requiresIfExists:["offset"]};function bX(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function yX(e){return e===nn(e)||!_n(e)?l_(e):bX(e)}function xX(e){var t=e.getBoundingClientRect(),r=_a(t.width)/e.offsetWidth||1,n=_a(t.height)/e.offsetHeight||1;return r!==1||n!==1}function wX(e,t,r){r===void 0&&(r=!1);var n=_n(t),i=_n(t)&&xX(t),o=Ki(t),a=Ea(e,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((ii(t)!=="body"||u_(o))&&(s=yX(t)),_n(t)?(c=Ea(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 _X(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 EX(e){var t=_X(e);return AY.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function SX(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function OX(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 CX(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;m(),d.options=Object.assign({},o,d.options,y),d.scrollParents={reference:Co(s)?Vs(s):s.contextElement?Vs(s.contextElement):[],popper:Vs(c)};var _=EX(OX([].concat(n,d.options.modifiers)));return d.orderedModifiers=_.filter(function(S){return S.enabled}),x(),v.update()},forceUpdate:function(){if(!p){var w=d.elements,y=w.reference,_=w.popper;if(WC(y,_)){d.rects={reference:wX(y,gl(_),d.options.strategy==="fixed"),popper:a_(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(L){return d.modifiersData[L.name]=Object.assign({},L.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var E=d.orderedModifiers[S],I=E.fn,N=E.options,T=N===void 0?{}:N,k=E.name;typeof I=="function"&&(d=I({state:d,options:T,name:k,instance:v})||d)}}}},update:SX(function(){return new Promise(function(b){v.forceUpdate(),b(d)})}),destroy:function(){m(),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,S=b.effect;if(typeof S=="function"){var E=S({state:d,name:w,instance:v,options:_}),I=function(){};h.push(E||I)}})}function m(){h.forEach(function(b){return b()}),h=[]}return v}}var IX=[XY,pX,KY,qY,fX,sX,mX,VY,cX],RX=CX({defaultModifiers:IX}),Pt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $h,UC;function NX(){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 TX=NX();const PX=Yi(TX);var kX=[],fd=function(t,r,n){n===void 0&&(n={});var i=ht.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||kX},a=ht.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],u=ht.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var x=v.state,m=Object.keys(x.elements);J$.flushSync(function(){c({styles:DC(m.map(function(b){return[b,x.styles[b]||{}]})),attributes:DC(m.map(function(b){return[b,x.attributes[b]]}))})})},requires:["computeStyles"]}},[]),d=ht.useMemo(function(){var p={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[u,{name:"applyStyles",enabled:!1}])};return PX(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,u]),h=ht.useRef();return jC(function(){h.current&&h.current.setOptions(d)},[d]),jC(function(){if(!(t==null||r==null)){var p=n.createPopper||RX,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(yr,{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 space-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 MX(){if(GC)return Hh;GC=1;function e(){this.__data__=[],this.size=0}return Hh=e,Hh}var Vh,KC;function Aa(){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 hd(){if(YC)return Wh;YC=1;var e=Aa();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 AX(){if(XC)return Uh;XC=1;var e=hd(),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 DX(){if(ZC)return Gh;ZC=1;var e=hd();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 jX(){if(JC)return Kh;JC=1;var e=hd();function t(r){return e(this.__data__,r)>-1}return Kh=t,Kh}var Yh,QC;function qX(){if(QC)return Yh;QC=1;var e=hd();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 pd(){if(e2)return Xh;e2=1;var e=MX(),t=AX(),r=DX(),n=jX(),i=qX();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 LX(){if(t2)return Zh;t2=1;var e=pd();function t(){this.__data__=new e,this.size=0}return Zh=t,Zh}var Jh,r2;function zX(){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 BX(){if(n2)return Qh;n2=1;function e(t){return this.__data__.get(t)}return Qh=e,Qh}var ep,i2;function FX(){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 Pt=="object"&&Pt&&Pt.Object===Object&&Pt;return tp=e,tp}var rp,a2;function Hn(){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 Da(){if(s2)return np;s2=1;var e=Hn(),t=e.Symbol;return np=t,np}var ip,l2;function $X(){if(l2)return ip;l2=1;var e=Da(),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 HX(){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 No(){if(u2)return ap;u2=1;var e=Da(),t=$X(),r=HX(),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 On(){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 ml(){if(f2)return lp;f2=1;var e=No(),t=On(),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 VX(){if(h2)return cp;h2=1;var e=Hn(),t=e["__core-js_shared__"];return cp=t,cp}var up,p2;function WX(){if(p2)return up;p2=1;var e=VX(),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 UX(){if(g2)return fp;g2=1;var e=ml(),t=WX(),r=On(),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 GX(){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 To(){if(b2)return pp;b2=1;var e=UX(),t=GX();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=To(),t=Hn(),r=e(t,"Map");return vp=r,vp}var gp,x2;function vd(){if(x2)return gp;x2=1;var e=To(),t=e(Object,"create");return gp=t,gp}var mp,w2;function KX(){if(w2)return mp;w2=1;var e=vd();function t(){this.__data__=e?e(null):{},this.size=0}return mp=t,mp}var bp,_2;function YX(){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,E2;function XX(){if(E2)return yp;E2=1;var e=vd(),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,S2;function ZX(){if(S2)return xp;S2=1;var e=vd(),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 JX(){if(O2)return wp;O2=1;var e=vd(),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 QX(){if(C2)return _p;C2=1;var e=KX(),t=YX(),r=XX(),n=ZX(),i=JX();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 Ep,I2;function eZ(){if(I2)return Ep;I2=1;var e=QX(),t=pd(),r=f_();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Ep=n,Ep}var Sp,R2;function tZ(){if(R2)return Sp;R2=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Sp=e,Sp}var Op,N2;function gd(){if(N2)return Op;N2=1;var e=tZ();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 rZ(){if(T2)return Cp;T2=1;var e=gd();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 nZ(){if(P2)return Ip;P2=1;var e=gd();function t(r){return e(this,r).get(r)}return Ip=t,Ip}var Rp,k2;function iZ(){if(k2)return Rp;k2=1;var e=gd();function t(r){return e(this,r).has(r)}return Rp=t,Rp}var Np,M2;function oZ(){if(M2)return Np;M2=1;var e=gd();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=eZ(),t=rZ(),r=nZ(),n=iZ(),i=oZ();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 aZ(){if(D2)return Pp;D2=1;var e=pd(),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 md(){if(j2)return kp;j2=1;var e=pd(),t=LX(),r=zX(),n=BX(),i=FX(),o=aZ();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=To(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Ap=t,Ap}var Dp,z2;function bd(){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 yd(){if(B2)return jp;B2=1;var e=bd(),t=Aa(),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 bl(){if(F2)return qp;F2=1;var e=yd(),t=bd();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 sZ(){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 oi(){if(H2)return zp;H2=1;function e(t){return t!=null&&typeof t=="object"}return zp=e,zp}var Bp,V2;function lZ(){if(V2)return Bp;V2=1;var e=No(),t=oi(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Bp=n,Bp}var Fp,W2;function yl(){if(W2)return Fp;W2=1;var e=lZ(),t=oi(),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 Ht(){if(U2)return $p;U2=1;var e=Array.isArray;return $p=e,$p}var ks={exports:{}},Hp,G2;function cZ(){if(G2)return Hp;G2=1;function e(){return!1}return Hp=e,Hp}ks.exports;var K2;function ja(){return K2||(K2=1,(function(e,t){var r=Hn(),n=cZ(),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})(ks,ks.exports)),ks.exports}var Vp,Y2;function xd(){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 uZ(){if(Z2)return Up;Z2=1;var e=No(),t=v_(),r=oi(),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]",m="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",y="[object Float32Array]",_="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",I="[object Int32Array]",N="[object Uint8Array]",T="[object Uint8ClampedArray]",k="[object Uint16Array]",L="[object Uint32Array]",B={};B[y]=B[_]=B[S]=B[E]=B[I]=B[N]=B[T]=B[k]=B[L]=!0,B[n]=B[i]=B[b]=B[o]=B[w]=B[a]=B[s]=B[c]=B[u]=B[d]=B[h]=B[p]=B[v]=B[x]=B[m]=!1;function G(z){return r(z)&&t(z.length)&&!!B[e(z)]}return Up=G,Up}var Gp,J2;function wd(){if(J2)return Gp;J2=1;function e(t){return function(r){return t(r)}}return Gp=e,Gp}var Ms={exports:{}};Ms.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})(Ms,Ms.exports)),Ms.exports}var Kp,eI;function xl(){if(eI)return Kp;eI=1;var e=uZ(),t=wd(),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=sZ(),t=yl(),r=Ht(),n=ja(),i=xd(),o=xl(),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),m=h||p||v||x,b=m?e(u.length,String):[],w=b.length;for(var y in u)(d||s.call(u,y))&&!(m&&(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 _d(){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 dZ(){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=_d(),t=dZ(),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 _i(){if(aI)return ev;aI=1;var e=ml(),t=v_();function r(n){return n!=null&&t(n.length)&&!e(n)}return ev=r,ev}var tv,sI;function Xi(){if(sI)return tv;sI=1;var e=A4(),t=m_(),r=_i();function n(i){return r(i)?e(i):t(i)}return tv=n,tv}var rv,lI;function fZ(){if(lI)return rv;lI=1;var e=bl(),t=Xi();function r(n,i){return n&&e(i,t(i),n)}return rv=r,rv}var nv,cI;function hZ(){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 pZ(){if(uI)return iv;uI=1;var e=On(),t=_d(),r=hZ(),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 Po(){if(dI)return ov;dI=1;var e=A4(),t=pZ(),r=_i();function n(i){return r(i)?e(i,!0):t(i)}return ov=n,ov}var av,fI;function vZ(){if(fI)return av;fI=1;var e=bl(),t=Po();function r(n,i){return n&&e(i,t(i),n)}return av=r,av}var As={exports:{}};As.exports;var hI;function j4(){return hI||(hI=1,(function(e,t){var r=Hn(),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})(As,As.exports)),As.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 gZ(){if(bI)return dv;bI=1;var e=bl(),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 Ed(){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=Ed(),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 mZ(){if(_I)return vv;_I=1;var e=bl(),t=B4();function r(n,i){return e(n,t(n),i)}return vv=r,vv}var gv,EI;function F4(){if(EI)return gv;EI=1;var e=y_(),t=Ht();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return gv=r,gv}var mv,SI;function $4(){if(SI)return mv;SI=1;var e=F4(),t=b_(),r=Xi();function n(i){return e(i,r,t)}return mv=n,mv}var bv,OI;function bZ(){if(OI)return bv;OI=1;var e=F4(),t=B4(),r=Po();function n(i){return e(i,r,t)}return bv=n,bv}var yv,CI;function yZ(){if(CI)return yv;CI=1;var e=To(),t=Hn(),r=e(t,"DataView");return yv=r,yv}var xv,II;function xZ(){if(II)return xv;II=1;var e=To(),t=Hn(),r=e(t,"Promise");return xv=r,xv}var wv,RI;function H4(){if(RI)return wv;RI=1;var e=To(),t=Hn(),r=e(t,"Set");return wv=r,wv}var _v,NI;function wZ(){if(NI)return _v;NI=1;var e=To(),t=Hn(),r=e(t,"WeakMap");return _v=r,_v}var Ev,TI;function qa(){if(TI)return Ev;TI=1;var e=yZ(),t=f_(),r=xZ(),n=H4(),i=wZ(),o=No(),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),m=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 S=o(_),E=S==c?_.constructor:void 0,I=E?a(E):"";if(I)switch(I){case v:return p;case x:return s;case m:return u;case b:return d;case w:return h}return S}),Ev=y,Ev}var Sv,PI;function _Z(){if(PI)return Sv;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 Sv=r,Sv}var Ov,kI;function V4(){if(kI)return Ov;kI=1;var e=Hn(),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 EZ(){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 SZ(){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 OZ(){if(jI)return Nv;jI=1;var e=Da(),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 CZ(){if(LI)return Pv;LI=1;var e=x_(),t=EZ(),r=SZ(),n=OZ(),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]",m="[object Float32Array]",b="[object Float64Array]",w="[object Int8Array]",y="[object Int16Array]",_="[object Int32Array]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",I="[object Uint16Array]",N="[object Uint32Array]";function T(k,L,B){var G=k.constructor;switch(L){case v:return e(k);case o:case a:return new G(+k);case x:return t(k,B);case m:case b:case w:case y:case _:case S:case E:case I:case N:return i(k,B);case s:return new G;case c:case h:return new G(k);case u:return r(k);case d:return new G;case p:return n(k)}}return Pv=T,Pv}var kv,zI;function U4(){if(zI)return kv;zI=1;var e=On(),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=Ed(),r=_d();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Mv=n,Mv}var Av,FI;function IZ(){if(FI)return Av;FI=1;var e=qa(),t=oi(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Av=n,Av}var Dv,$I;function RZ(){if($I)return Dv;$I=1;var e=IZ(),t=wd(),r=g_(),n=r&&r.isMap,i=n?t(n):e;return Dv=i,Dv}var jv,HI;function NZ(){if(HI)return jv;HI=1;var e=qa(),t=oi(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return jv=n,jv}var qv,VI;function TZ(){if(VI)return qv;VI=1;var e=NZ(),t=wd(),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=md(),t=p_(),r=yd(),n=fZ(),i=vZ(),o=j4(),a=q4(),s=gZ(),c=mZ(),u=$4(),d=bZ(),h=qa(),p=_Z(),v=CZ(),x=G4(),m=Ht(),b=ja(),w=RZ(),y=On(),_=TZ(),S=Xi(),E=Po(),I=1,N=2,T=4,k="[object Arguments]",L="[object Array]",B="[object Boolean]",G="[object Date]",z="[object Error]",P="[object Function]",K="[object GeneratorFunction]",U="[object Map]",re="[object Number]",X="[object Object]",ne="[object RegExp]",D="[object Set]",$="[object String]",Z="[object Symbol]",ee="[object WeakMap]",A="[object ArrayBuffer]",W="[object DataView]",q="[object Float32Array]",j="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",Y="[object Int32Array]",se="[object Uint8Array]",te="[object Uint8ClampedArray]",he="[object Uint16Array]",ce="[object Uint32Array]",be={};be[k]=be[L]=be[A]=be[W]=be[B]=be[G]=be[q]=be[j]=be[V]=be[J]=be[Y]=be[U]=be[re]=be[X]=be[ne]=be[D]=be[$]=be[Z]=be[se]=be[te]=be[he]=be[ce]=!0,be[z]=be[P]=be[ee]=!1;function le(ue,we,Se,Ne,De,Le){var Ae,Je=we&I,Et=we&N,tt=we&T;if(Se&&(Ae=De?Se(ue,Ne,De,Le):Se(ue)),Ae!==void 0)return Ae;if(!y(ue))return ue;var Be=m(ue);if(Be){if(Ae=p(ue),!Je)return a(ue,Ae)}else{var je=h(ue),Qe=je==P||je==K;if(b(ue))return o(ue,Je);if(je==X||je==k||Qe&&!De){if(Ae=Et||Qe?{}:x(ue),!Je)return Et?c(ue,i(Ae,ue)):s(ue,n(Ae,ue))}else{if(!be[je])return De?ue:{};Ae=v(ue,je,Je)}}Le||(Le=new e);var Ue=Le.get(ue);if(Ue)return Ue;Le.set(ue,Ae),_(ue)?ue.forEach(function(St){Ae.add(le(St,we,Se,St,ue,Le))}):w(ue)&&ue.forEach(function(St,Nt){Ae.set(Nt,le(St,we,Se,Nt,ue,Le))});var Wt=tt?Et?d:u:Et?E:S,Ut=Be?void 0:Wt(ue);return t(Ut||ue,function(St,Nt){Ut&&(Nt=St,St=ue[Nt]),r(Ae,Nt,le(St,we,Se,Nt,ue,Le))}),Ae}return Lv=le,Lv}var zv,UI;function PZ(){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 kZ(){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=kZ(),t=e();return $v=t,$v}var Hv,XI;function E_(){if(XI)return Hv;XI=1;var e=__(),t=Xi();function r(n,i){return n&&e(n,i,t)}return Hv=r,Hv}var Vv,ZI;function MZ(){if(ZI)return Vv;ZI=1;var e=_i();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 Sd(){if(JI)return Wv;JI=1;var e=E_(),t=MZ(),r=t(e);return Wv=r,Wv}var Uv,QI;function ko(){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=ko();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=Sd(),r=Y4(),n=Ht();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 AZ(){if(nR)return Xv;nR=1;var e=Sd();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 DZ(){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 jZ(){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=DZ(),r=jZ();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 qZ(){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=qZ(),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 m=h.get(a),b=h.get(s);if(m&&b)return m==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 S=a[w],E=s[w];if(u)var I=p?u(E,S,w,s,a,h):u(S,E,w,a,s,h);if(I!==void 0){if(I)continue;y=!1;break}if(_){if(!t(s,function(N,T){if(!r(_,T)&&(S===N||d(S,N,c,u,h)))return _.push(T)})){y=!1;break}}else if(!(S===E||d(S,E,c,u,h))){y=!1;break}}return h.delete(a),h.delete(s),y}return rg=o,rg}var ng,uR;function LZ(){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 S_(){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 zZ(){if(fR)return og;fR=1;var e=Da(),t=V4(),r=Aa(),n=e6(),i=LZ(),o=S_(),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]",m="[object String]",b="[object Symbol]",w="[object ArrayBuffer]",y="[object DataView]",_=e?e.prototype:void 0,S=_?_.valueOf:void 0;function E(I,N,T,k,L,B,G){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||!B(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 m:return I==N+"";case h:var z=i;case x:var P=k&a;if(z||(z=o),I.size!=N.size&&!P)return!1;var K=G.get(I);if(K)return K==N;k|=s,G.set(I,N);var U=n(z(I),z(N),k,L,B,G);return G.delete(I),U;case b:if(S)return S.call(I)==S.call(N)}return!1}return og=E,og}var ag,hR;function BZ(){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),m=x.length;if(v!=m&&!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 S=!0;d.set(o,a),d.set(a,o);for(var E=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)){S=!1;break}E||(E=w=="constructor")}if(S&&!E){var k=o.constructor,L=a.constructor;k!=L&&"constructor"in o&&"constructor"in a&&!(typeof k=="function"&&k instanceof k&&typeof L=="function"&&L instanceof L)&&(S=!1)}return d.delete(o),d.delete(a),S}return ag=i,ag}var sg,pR;function FZ(){if(pR)return sg;pR=1;var e=md(),t=e6(),r=zZ(),n=BZ(),i=qa(),o=Ht(),a=ja(),s=xl(),c=1,u="[object Arguments]",d="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function x(m,b,w,y,_,S){var E=o(m),I=o(b),N=E?d:i(m),T=I?d:i(b);N=N==u?h:N,T=T==u?h:T;var k=N==h,L=T==h,B=N==T;if(B&&a(m)){if(!a(b))return!1;E=!0,k=!1}if(B&&!k)return S||(S=new e),E||s(m)?t(m,b,w,y,_,S):r(m,b,N,w,y,_,S);if(!(w&c)){var G=k&&v.call(m,"__wrapped__"),z=L&&v.call(b,"__wrapped__");if(G||z){var P=G?m.value():m,K=z?b.value():b;return S||(S=new e),_(P,K,w,y,S)}}return B?(S||(S=new e),n(m,b,w,y,_,S)):!1}return sg=x,sg}var lg,vR;function t6(){if(vR)return lg;vR=1;var e=FZ(),t=oi();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 $Z(){if(gR)return cg;gR=1;var e=md(),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],m=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,m,v,o,a,b);if(!(w===void 0?t(m,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=On();function t(r){return r===r&&!e(r)}return ug=t,ug}var dg,bR;function HZ(){if(bR)return dg;bR=1;var e=r6(),t=Xi();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 VZ(){if(xR)return hg;xR=1;var e=$Z(),t=HZ(),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 La(){if(wR)return pg;wR=1;var e=No(),t=oi(),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=Ht(),t=La(),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,ER;function WZ(){if(ER)return gg;ER=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,SR;function UZ(){if(SR)return mg;SR=1;var e=WZ(),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 GZ(){if(OR)return bg;OR=1;var e=UZ(),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 Od(){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 KZ(){if(IR)return xg;IR=1;var e=Da(),t=Od(),r=Ht(),n=La(),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=KZ();function t(r){return r==null?"":e(r)}return wg=t,wg}var _g,NR;function Cd(){if(NR)return _g;NR=1;var e=Ht(),t=O_(),r=GZ(),n=i6();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return _g=i,_g}var Eg,TR;function wl(){if(TR)return Eg;TR=1;var e=La();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Eg=t,Eg}var Sg,PR;function Id(){if(PR)return Sg;PR=1;var e=Cd(),t=wl();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 Sg=r,Sg}var Og,kR;function YZ(){if(kR)return Og;kR=1;var e=Id();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 XZ(){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=Cd(),t=yl(),r=Ht(),n=xd(),i=v_(),o=wl();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=XZ(),t=o6();function r(n,i){return n!=null&&t(n,i,e)}return Rg=r,Rg}var Ng,jR;function ZZ(){if(jR)return Ng;jR=1;var e=t6(),t=YZ(),r=a6(),n=O_(),i=r6(),o=n6(),a=wl(),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 JZ(){if(LR)return Pg;LR=1;var e=Id();function t(r){return function(n){return e(n,r)}}return Pg=t,Pg}var kg,zR;function QZ(){if(zR)return kg;zR=1;var e=s6(),t=JZ(),r=O_(),n=wl();function i(o){return r(o)?e(n(o)):t(o)}return kg=i,kg}var Mg,BR;function Ei(){if(BR)return Mg;BR=1;var e=VZ(),t=ZZ(),r=ko(),n=Ht(),i=QZ();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=AZ(),r=Ei(),n=Ht();function i(o,a){var s=n(o)?e:t;return s(o,r(a,3))}return Ag=i,Ag}var Dg,$R;function eJ(){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=eJ(),t=o6();function r(n,i){return n!=null&&t(n,i,e)}return jg=r,jg}var qg,VR;function tJ(){if(VR)return qg;VR=1;var e=m_(),t=qa(),r=yl(),n=Ht(),i=_i(),o=ja(),a=_d(),s=xl(),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 m in v)if(h.call(v,m))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=Sd(),t=_i();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=Od(),t=Ei(),r=d6(),n=Ht();function i(o,a){var s=n(o)?e:r;return s(o,t(a,3))}return Bg=i,Bg}var Fg,KR;function rJ(){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 nJ(){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=rJ(),t=Sd(),r=Ei(),n=nJ(),i=Ht();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 iJ(){if(ZR)return Vg;ZR=1;var e=No(),t=Ht(),r=oi(),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 oJ(){if(JR)return Wg;JR=1;var e=s6(),t=e("length");return Wg=t,Wg}var Ug,QR;function aJ(){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 sJ(){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+"?",m="["+o+"]?",b="(?:"+v+"(?:"+[d,h,p].join("|")+")"+m+x+")*",w=m+x+b,y="(?:"+[d+s+"?",s,h,p,a].join("|")+")",_=RegExp(c+"(?="+c+")|"+y+w,"g");function S(E){for(var I=_.lastIndex=0;_.test(E);)++I;return I}return Gg=S,Gg}var Kg,tN;function lJ(){if(tN)return Kg;tN=1;var e=oJ(),t=aJ(),r=sJ();function n(i){return t(i)?r(i):e(i)}return Kg=n,Kg}var Yg,rN;function cJ(){if(rN)return Yg;rN=1;var e=m_(),t=qa(),r=_i(),n=iJ(),i=lJ(),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 uJ(){if(nN)return Xg;nN=1;var e=p_(),t=U4(),r=E_(),n=Ei(),i=Ed(),o=Ht(),a=ja(),s=ml(),c=On(),u=xl();function d(h,p,v){var x=o(h),m=x||a(h)||u(h);if(p=n(p,4),v==null){var b=h&&h.constructor;m?v=x?new b:[]:c(h)?v=s(b)?t(i(h)):{}:v={}}return(m?e:r)(h,function(w,y,_){return p(v,w,y,_)}),v}return Xg=d,Xg}var Zg,iN;function dJ(){if(iN)return Zg;iN=1;var e=Da(),t=yl(),r=Ht(),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=dJ();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 fJ(){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=fJ(),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 hJ(){if(lN)return tm;lN=1;var e=w_(),t=M4(),r=ko(),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 pJ(){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=hJ(),t=pJ(),r=t(e);return nm=r,nm}var im,dN;function Rd(){if(dN)return im;dN=1;var e=ko(),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 vJ(){if(hN)return am;hN=1;function e(t){return t!==t}return am=e,am}var sm,pN;function gJ(){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 mJ(){if(vN)return lm;vN=1;var e=g6(),t=vJ(),r=gJ();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return lm=n,lm}var cm,gN;function bJ(){if(gN)return cm;gN=1;var e=mJ();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 yJ(){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 xJ(){if(bN)return dm;bN=1;function e(){}return dm=e,dm}var fm,yN;function wJ(){if(yN)return fm;yN=1;var e=H4(),t=xJ(),r=S_(),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 _J(){if(xN)return hm;xN=1;var e=J4(),t=bJ(),r=yJ(),n=Q4(),i=wJ(),o=S_(),a=200;function s(c,u,d){var h=-1,p=t,v=c.length,x=!0,m=[],b=m;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?[]:m;e:for(;++h<v;){var y=c[h],_=u?u(y):y;if(y=d||y!==0?y:0,x&&_===_){for(var S=b.length;S--;)if(b[S]===_)continue e;u&&b.push(_),m.push(y)}else p(b,_,d)||(b!==m&&b.push(_),m.push(y))}return m}return hm=s,hm}var pm,wN;function m6(){if(wN)return pm;wN=1;var e=_i(),t=oi();function r(n){return t(n)&&e(n)}return pm=r,pm}var vm,_N;function EJ(){if(_N)return vm;_N=1;var e=C_(),t=Rd(),r=_J(),n=m6(),i=t(function(o){return r(e(o,1,n,!0))});return vm=i,vm}var gm,EN;function SJ(){if(EN)return gm;EN=1;var e=Od();function t(r,n){return e(n,function(i){return r[i]})}return gm=t,gm}var mm,SN;function b6(){if(SN)return mm;SN=1;var e=SJ(),t=Xi();function r(n){return n==null?[]:e(n,t(n))}return mm=r,mm}var bm,ON;function Cn(){if(ON)return bm;ON=1;var e;if(typeof d_=="function")try{e={clone:PZ(),constant:w_(),each:Z4(),filter:l6(),has:c6(),isArray:Ht(),isEmpty:tJ(),isFunction:ml(),isUndefined:u6(),keys:Xi(),map:f6(),reduce:h6(),size:cJ(),transform:uJ(),union:EJ(),values:b6()}}catch{}return e||(e=window._),bm=e,bm}var ym,CN;function I_(){if(CN)return ym;CN=1;var e=Cn();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(m,b){d(b)&&h.setNode(b,m)}),e.each(this._edgeObjs,function(m){h.hasNode(m.v)&&h.hasNode(m.w)&&h.setEdge(m,p.edge(m))});var v={};function x(m){var b=p.parent(m);return b===void 0||h.hasNode(b)?(v[m]=b,b):b in v?v[b]:x(b)}return this._isCompound&&e.each(h.nodes(),function(m){h.setParent(m,x(m))}),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,m){return v.length>1?p.setEdge(x,m,h):p.setEdge(x,m),m}),this},i.prototype.setEdge=function(){var d,h,p,v,x=!1,m=arguments[0];typeof m=="object"&&m!==null&&"v"in m?(d=m.v,h=m.w,p=m.name,arguments.length===2&&(v=arguments[1],x=!0)):(d=m,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,m=""+p;if(!d&&x>m){var b=x;x=m,m=b}return x+n+m+n+(e.isUndefined(v)?t:v)}function c(d,h,p,v){var x=""+h,m=""+p;if(!d&&x>m){var b=x;x=m,m=b}var w={v:x,w:m};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 OJ(){return IN||(IN=1,xm="2.1.8"),xm}var wm,RN;function CJ(){return RN||(RN=1,wm={Graph:I_(),version:OJ()}),wm}var _m,NN;function IJ(){if(NN)return _m;NN=1;var e=Cn(),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 Em,TN;function RJ(){if(TN)return Em;TN=1;var e=Cn();Em=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 Em}var Sm,PN;function y6(){if(PN)return Sm;PN=1;var e=Cn();Sm=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},Sm}var Om,kN;function x6(){if(kN)return Om;kN=1;var e=Cn(),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 m=x.v!==h?x.v:x.w,b=u[m],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(m,y))};for(o.nodes().forEach(function(x){var m=x===a?0:Number.POSITIVE_INFINITY;u[x]={distance:m},d.add(x,m)});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 NJ(){if(MN)return Cm;MN=1;var e=x6(),t=Cn();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=Cn();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 TJ(){if(DN)return Rm;DN=1;var e=Cn(),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 PJ(){if(jN)return Nm;jN=1;var e=Cn();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],m=d[v],b=p[v],w=x.distance+m.distance;w<b.distance&&(b.distance=w,b.predecessor=m.predecessor)})})}),s}return Nm}var Tm,qN;function _6(){if(qN)return Tm;qN=1;var e=Cn();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 kJ(){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 E6(){if(zN)return km;zN=1;var e=Cn();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 MJ(){if(BN)return Mm;BN=1;var e=E6();Mm=t;function t(r,n){return e(r,n,"post")}return Mm}var Am,FN;function AJ(){if(FN)return Am;FN=1;var e=E6();Am=t;function t(r,n){return e(r,n,"pre")}return Am}var Dm,$N;function DJ(){if($N)return Dm;$N=1;var e=Cn(),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 m=o(p);m<x&&(s[v]=u,c.decrease(v,m))}}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 jJ(){return HN||(HN=1,jm={components:RJ(),dijkstra:x6(),dijkstraAll:NJ(),findCycles:TJ(),floydWarshall:PJ(),isAcyclic:kJ(),postorder:MJ(),preorder:AJ(),prim:DJ(),tarjan:w6(),topsort:_6()}),jm}var qm,VN;function qJ(){if(VN)return qm;VN=1;var e=CJ();return qm={Graph:e.Graph,json:IJ(),alg:jJ(),version:e.version},qm}var Lm,WN;function $n(){if(WN)return Lm;WN=1;var e;if(typeof d_=="function")try{e=qJ()}catch{}return e||(e=window.graphlib),Lm=e,Lm}var zm,UN;function LJ(){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 Nd(){if(GN)return Bm;GN=1;var e=Aa(),t=_i(),r=xd(),n=On();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 zJ(){if(KN)return Fm;KN=1;var e=Rd(),t=Aa(),r=Nd(),n=Po(),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,m=v.length;++x<m;){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 BJ(){if(YN)return $m;YN=1;var e=Ei(),t=_i(),r=Xi();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 FJ(){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 $J(){if(ZN)return Vm;ZN=1;var e=FJ(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Vm=r,Vm}var Wm,JN;function HJ(){if(JN)return Wm;JN=1;var e=$J(),t=On(),r=La(),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 S6(){if(QN)return Um;QN=1;var e=HJ(),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 VJ(){if(eT)return Gm;eT=1;var e=S6();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 WJ(){if(tT)return Km;tT=1;var e=g6(),t=Ei(),r=VJ(),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 UJ(){if(rT)return Ym;rT=1;var e=BJ(),t=WJ(),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 GJ(){if(iT)return Zm;iT=1;var e=__(),t=Y4(),r=Po();function n(i,o){return i==null?i:e(i,t(o),r)}return Zm=n,Zm}var Jm,oT;function KJ(){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 YJ(){if(aT)return Qm;aT=1;var e=bd(),t=E_(),r=Ei();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=La();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 XJ(){if(lT)return tb;lT=1;function e(t,r){return t>r}return tb=e,tb}var rb,cT;function ZJ(){if(cT)return rb;cT=1;var e=R_(),t=XJ(),r=ko();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=bd(),t=Aa();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 JJ(){if(dT)return ib;dT=1;var e=No(),t=Ed(),r=oi(),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 QJ(){if(hT)return ab;hT=1;var e=bl(),t=Po();function r(n){return e(n,t(n))}return ab=r,ab}var sb,pT;function eQ(){if(pT)return sb;pT=1;var e=C6(),t=j4(),r=W4(),n=q4(),i=G4(),o=yl(),a=Ht(),s=m6(),c=ja(),u=ml(),d=On(),h=JJ(),p=xl(),v=I6(),x=QJ();function m(b,w,y,_,S,E,I){var N=v(b,y),T=v(w,y),k=I.get(T);if(k){e(b,y,k);return}var L=E?E(N,T,y+"",b,w,I):void 0,B=L===void 0;if(B){var G=a(T),z=!G&&c(T),P=!G&&!z&&p(T);L=T,G||z||P?a(N)?L=N:s(N)?L=n(N):z?(B=!1,L=t(T,!0)):P?(B=!1,L=r(T,!0)):L=[]:h(T)||o(T)?(L=N,o(N)?L=x(N):(!d(N)||u(N))&&(L=i(T))):B=!1}B&&(I.set(T,L),S(L,T,_,E,I),I.delete(T)),e(b,y,L)}return sb=m,sb}var lb,vT;function tQ(){if(vT)return lb;vT=1;var e=md(),t=C6(),r=__(),n=eQ(),i=On(),o=Po(),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 m=h?h(a(c,x),v,x+"",c,u,p):void 0;m===void 0&&(m=v),t(c,x,m)}},o)}return lb=s,lb}var cb,gT;function rQ(){if(gT)return cb;gT=1;var e=Rd(),t=Nd();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 nQ(){if(mT)return ub;mT=1;var e=tQ(),t=rQ(),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 iQ(){if(yT)return fb;yT=1;var e=R_(),t=R6(),r=ko();function n(i){return i&&i.length?e(i,r,t):void 0}return fb=n,fb}var hb,xT;function oQ(){if(xT)return hb;xT=1;var e=R_(),t=Ei(),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 aQ(){if(wT)return pb;wT=1;var e=Hn(),t=function(){return e.Date.now()};return pb=t,pb}var vb,_T;function sQ(){if(_T)return vb;_T=1;var e=yd(),t=Cd(),r=xd(),n=On(),i=wl();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]),m=c;if(x==="__proto__"||x==="constructor"||x==="prototype")return a;if(d!=p){var b=v[x];m=u?u(b,x,v):void 0,m===void 0&&(m=n(b)?b:r(s[d+1])?[]:{})}e(v,x,m),v=v[x]}return a}return vb=o,vb}var gb,ET;function lQ(){if(ET)return gb;ET=1;var e=Id(),t=sQ(),r=Cd();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,ST;function cQ(){if(ST)return mb;ST=1;var e=lQ(),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 uQ(){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 dQ(){if(CT)return yb;CT=1;var e=cQ(),t=uQ(),r=t(function(n,i){return n==null?{}:e(n,i)});return yb=r,yb}var xb,IT;function fQ(){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 hQ(){if(RT)return wb;RT=1;var e=fQ(),t=Nd(),r=S6();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 pQ(){if(NT)return _b;NT=1;var e=hQ(),t=e();return _b=t,_b}var Eb,TT;function vQ(){if(TT)return Eb;TT=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Eb=e,Eb}var Sb,PT;function gQ(){if(PT)return Sb;PT=1;var e=La();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 Sb=t,Sb}var Ob,kT;function mQ(){if(kT)return Ob;kT=1;var e=gQ();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 bQ(){if(MT)return Cb;MT=1;var e=Od(),t=Id(),r=Ei(),n=d6(),i=vQ(),o=wd(),a=mQ(),s=ko(),c=Ht();function u(d,h,p){h.length?h=e(h,function(m){return c(m)?function(b){return t(b,m.length===1?m[0]:m)}:m}):h=[s];var v=-1;h=e(h,o(r));var x=n(d,function(m,b,w){var y=e(h,function(_){return _(m)});return{criteria:y,index:++v,value:m}});return i(x,function(m,b){return a(m,b,p)})}return Cb=u,Cb}var Ib,AT;function yQ(){if(AT)return Ib;AT=1;var e=C_(),t=bQ(),r=Rd(),n=Nd(),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 xQ(){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 wQ(){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 _Q(){if(qT)return Tb;qT=1;var e=yd(),t=wQ();function r(n,i){return t(n||[],i||[],e)}return Tb=r,Tb}var Pb,LT;function Ct(){if(LT)return Pb;LT=1;var e;if(typeof d_=="function")try{e={cloneDeep:LJ(),constant:w_(),defaults:zJ(),each:Z4(),filter:l6(),find:UJ(),flatten:O6(),forEach:X4(),forIn:GJ(),has:c6(),isUndefined:u6(),last:KJ(),map:f6(),mapValues:YJ(),max:ZJ(),merge:nQ(),min:iQ(),minBy:oQ(),now:aQ(),pick:dQ(),range:pQ(),reduce:h6(),sortBy:yQ(),uniqueId:xQ(),values:b6(),zipObject:_Q()}}catch{}return e||(e=window._),Pb=e,Pb}var kb,zT;function EQ(){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 SQ(){if(BT)return Mb;BT=1;var e=Ct(),t=$n().Graph,r=EQ();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],m;u.nodeCount();){for(;m=x.dequeue();)a(u,d,h,m);for(;m=v.dequeue();)a(u,d,h,m);if(u.nodeCount()){for(var b=d.length-2;b>0;--b)if(m=d[b].dequeue(),m){p=p.concat(a(u,d,h,m,!0));break}}}return p}function a(u,d,h,p,v){var x=v?[]:void 0;return e.forEach(u.inEdges(p.v),function(m){var b=u.edge(m),w=u.node(m.v);v&&x.push({v:m.v,w:m.w}),w.out-=b,c(d,h,w)}),e.forEach(u.outEdges(p.v),function(m){var b=u.edge(m),w=m.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}),m=p+1;return e.forEach(h.nodes(),function(b){c(x,m,h.node(b))}),{graph:h,buckets:x,zeroIdx:m}}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 OQ(){if(FT)return Ab;FT=1;var e=Ct(),t=SQ();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 Hr(){if($T)return Db;$T=1;var e=Ct(),t=$n().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:m};function r(b,w,y,_){var S;do S=e.uniqueId(_);while(b.hasNode(S));return y.dummy=w,b.setNode(S,y),S}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},S=b.edge(y);w.setEdge(y.v,y.w,{weight:_.weight+S.weight,minlen:Math.max(_.minlen,S.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(S){_[S.w]=(_[S.w]||0)+b.edge(S).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(S){_[S.v]=(_[S.v]||0)+b.edge(S).weight}),_});return e.zipObject(b.nodes(),w)}function s(b,w){var y=b.x,_=b.y,S=w.x-y,E=w.y-_,I=b.width/2,N=b.height/2;if(!S&&!E)throw new Error("Not possible to find intersection inside of the rectangle");var T,k;return Math.abs(E)*I>Math.abs(S)*N?(E<0&&(N=-N),T=N*S/E,k=N):(S<0&&(I=-I),T=I,k=I*E/S),{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),S=_.rank;e.isUndefined(S)||(w[S][_.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(E){return b.node(E).rank})),y=[];e.forEach(b.nodes(),function(E){var I=b.node(E).rank-w;y[I]||(y[I]=[]),y[I].push(E)});var _=0,S=b.graph().nodeRankFactor;e.forEach(y,function(E,I){e.isUndefined(E)&&I%S!==0?--_:_&&e.forEach(E,function(N){b.node(N).rank+=_})})}function h(b,w,y,_){var S={width:0,height:0};return arguments.length>=4&&(S.rank=y,S.order=_),r(b,"border",S,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 m(b,w){return w()}return Db}var jb,HT;function CQ(){if(HT)return jb;HT=1;var e=Ct(),t=Hr();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,m,b;for(b=0,++c;c<d;++b,++c)p.points=[],m={width:0,height:0,edgeLabel:p,edgeObj:a,rank:c},x=t.addDummyNode(o,"edge",m,"_d"),c===v&&(m.width=p.width,m.height=p.height,m.dummy="edge-label",m.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 Lu(){if(VT)return qb;VT=1;var e=Ct();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=Ct(),t=$n().Graph,r=Lu().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 IQ(){if(UT)return zb;UT=1;var e=Ct(),t=N6(),r=Lu().slack,n=Lu().longestPath,i=$n().alg.preorder,o=$n().alg.postorder,a=Hr().simplify;zb=s,s.initLowLimValues=h,s.initCutValues=c,s.calcCutValue=d,s.leaveEdge=v,s.enterEdge=x,s.exchangeEdges=m;function s(_){_=a(_),n(_);var S=t(_);h(S),c(S,_);for(var E,I;E=v(S);)I=x(S,_,E),m(S,_,E,I)}function c(_,S){var E=o(_,_.nodes());E=E.slice(0,E.length-1),e.forEach(E,function(I){u(_,S,I)})}function u(_,S,E){var I=_.node(E),N=I.parent;_.edge(E,N).cutvalue=d(_,S,E)}function d(_,S,E){var I=_.node(E),N=I.parent,T=!0,k=S.edge(E,N),L=0;return k||(T=!1,k=S.edge(N,E)),L=k.weight,e.forEach(S.nodeEdges(E),function(B){var G=B.v===E,z=G?B.w:B.v;if(z!==N){var P=G===T,K=S.edge(B).weight;if(L+=P?K:-K,w(_,E,z)){var U=_.edge(E,z).cutvalue;L+=P?-U:U}}}),L}function h(_,S){arguments.length<2&&(S=_.nodes()[0]),p(_,{},1,S)}function p(_,S,E,I,N){var T=E,k=_.node(I);return S[I]=!0,e.forEach(_.neighbors(I),function(L){e.has(S,L)||(E=p(_,S,E,L,I))}),k.low=T,k.lim=E++,N?k.parent=N:delete k.parent,E}function v(_){return e.find(_.edges(),function(S){return _.edge(S).cutvalue<0})}function x(_,S,E){var I=E.v,N=E.w;S.hasEdge(I,N)||(I=E.w,N=E.v);var T=_.node(I),k=_.node(N),L=T,B=!1;T.lim>k.lim&&(L=k,B=!0);var G=e.filter(S.edges(),function(z){return B===y(_,_.node(z.v),L)&&B!==y(_,_.node(z.w),L)});return e.minBy(G,function(z){return r(S,z)})}function m(_,S,E,I){var N=E.v,T=E.w;_.removeEdge(N,T),_.setEdge(I.v,I.w,{}),h(_),c(_,S),b(_,S)}function b(_,S){var E=e.find(_.nodes(),function(N){return!S.node(N).parent}),I=i(_,E);I=I.slice(1),e.forEach(I,function(N){var T=_.node(N).parent,k=S.edge(N,T),L=!1;k||(k=S.edge(T,N),L=!0),S.node(N).rank=S.node(T).rank+(L?k.minlen:-k.minlen)})}function w(_,S,E){return _.hasEdge(S,E)}function y(_,S,E){return E.low<=S.lim&&S.lim<=E.lim}return zb}var Bb,GT;function RQ(){if(GT)return Bb;GT=1;var e=Lu(),t=e.longestPath,r=N6(),n=IQ();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 NQ(){if(KT)return Fb;KT=1;var e=Ct();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 TQ(){if(YT)return $b;YT=1;var e=Ct(),t=Hr();$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 m=t.addBorderNode(s,"_bt"),b=t.addBorderNode(s,"_bb"),w=s.node(v);s.setParent(m,v),w.borderTop=m,s.setParent(b,v),w.borderBottom=b,e.forEach(x,function(y){n(s,c,u,d,h,p,y);var _=s.node(y),S=_.borderTop?_.borderTop:y,E=_.borderBottom?_.borderBottom:y,I=_.borderTop?d:2*d,N=S!==E?1:h-p[v]+1;s.setEdge(m,S,{weight:I,minlen:N,nestingEdge:!0}),s.setEdge(E,b,{weight:I,minlen:N,nestingEdge:!0})}),s.parent(v)||s.setEdge(c,m,{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 PQ(){if(XT)return Hb;XT=1;var e=Ct(),t=Hr();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 kQ(){if(ZT)return Vb;ZT=1;var e=Ct();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 MQ(){if(JT)return Wb;JT=1;var e=Ct();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 AQ(){if(QT)return Ub;QT=1;var e=Ct();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 DQ(){if(e5)return Gb;e5=1;var e=Ct();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 jQ(){if(t5)return Kb;t5=1;var e=Ct();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 qQ(){if(r5)return Yb;r5=1;var e=Ct(),t=Hr();Yb=r;function r(o,a){var s=t.partition(o,function(m){return e.has(m,"barycenter")}),c=s.lhs,u=e.sortBy(s.rhs,function(m){return-m.i}),d=[],h=0,p=0,v=0;c.sort(i(!!a)),v=n(d,u,v),e.forEach(c,function(m){v+=m.vs.length,d.push(m.vs),h+=m.barycenter*m.weight,p+=m.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 LQ(){if(n5)return Xb;n5=1;var e=Ct(),t=DQ(),r=jQ(),n=qQ();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,m={};v&&(h=e.filter(h,function(E){return E!==v&&E!==x}));var b=t(s,h);e.forEach(b,function(E){if(s.children(E.v).length){var I=i(s,E.v,u,d);m[E.v]=I,e.has(I,"barycenter")&&a(E,I)}});var w=r(b,u);o(w,m);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]),S=s.node(s.predecessors(x)[0]);e.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+_.order+S.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 zQ(){if(i5)return Zb;i5=1;var e=Ct(),t=$n().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),m=e.isUndefined(x)?0:x.weight;c.setEdge(v,u,{weight:i.edge(p).weight+m})}),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 BQ(){if(o5)return Jb;o5=1;var e=Ct();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 FQ(){if(a5)return Qb;a5=1;var e=Ct(),t=MQ(),r=AQ(),n=LQ(),i=zQ(),o=BQ(),a=$n().Graph,s=Hr();Qb=c;function c(p){var v=s.maxRank(p),x=u(p,e.range(1,v+1),"inEdges"),m=u(p,e.range(v-1,-1,-1),"outEdges"),b=t(p);h(p,b);for(var w=Number.POSITIVE_INFINITY,y,_=0,S=0;S<4;++_,++S){d(_%2?x:m,_%4>=2),b=s.buildLayerMatrix(p);var E=r(p,b);E<w&&(S=0,y=e.cloneDeep(b),w=E)}h(p,y)}function u(p,v,x){return e.map(v,function(m){return i(p,m,x)})}function d(p,v){var x=new a;e.forEach(p,function(m){var b=m.graph().root,w=n(m,b,x,v);e.forEach(w.vs,function(y,_){m.node(y).order=_}),o(m,x,w.vs)})}function h(p,v){e.forEach(v,function(x){e.forEach(x,function(m,b){p.node(m).order=b})})}return Qb}var e0,s5;function $Q(){if(s5)return e0;s5=1;var e=Ct(),t=$n().Graph,r=Hr();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 S(E,I){var N=0,T=0,k=E.length,L=e.last(I);return e.forEach(I,function(B,G){var z=o(w,B),P=z?w.node(z).order:k;(z||B===L)&&(e.forEach(I.slice(T,G+1),function(K){e.forEach(w.predecessors(K),function(U){var re=w.node(U),X=re.order;(X<N||P<X)&&!(re.dummy&&w.node(K).dummy)&&a(_,U,K)})}),T=G+1,N=P)}),I}return e.reduce(y,S),_}function i(w,y){var _={};function S(I,N,T,k,L){var B;e.forEach(e.range(N,T),function(G){B=I[G],w.node(B).dummy&&e.forEach(w.predecessors(B),function(z){var P=w.node(z);P.dummy&&(P.order<k||P.order>L)&&a(_,z,B)})})}function E(I,N){var T=-1,k,L=0;return e.forEach(N,function(B,G){if(w.node(B).dummy==="border"){var z=w.predecessors(B);z.length&&(k=w.node(z[0]).order,S(N,L,G,T,k),L=G,T=k)}S(N,L,N.length,k,I.length)}),N}return e.reduce(y,E),_}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 S=y;y=_,_=S}var E=w[y];E||(w[y]=E={}),E[_]=!0}function s(w,y,_){if(y>_){var S=y;y=_,_=S}return e.has(w[y],_)}function c(w,y,_,S){var E={},I={},N={};return e.forEach(y,function(T){e.forEach(T,function(k,L){E[k]=k,I[k]=k,N[k]=L})}),e.forEach(y,function(T){var k=-1;e.forEach(T,function(L){var B=S(L);if(B.length){B=e.sortBy(B,function(U){return N[U]});for(var G=(B.length-1)/2,z=Math.floor(G),P=Math.ceil(G);z<=P;++z){var K=B[z];I[L]===L&&k<N[K]&&!s(_,L,K)&&(I[K]=L,I[L]=E[L]=E[K],k=N[K])}}})}),{root:E,align:I}}function u(w,y,_,S,E){var I={},N=d(w,y,_,E),T=E?"borderLeft":"borderRight";function k(G,z){for(var P=N.nodes(),K=P.pop(),U={};K;)U[K]?G(K):(U[K]=!0,P.push(K),P=P.concat(z(K))),K=P.pop()}function L(G){I[G]=N.inEdges(G).reduce(function(z,P){return Math.max(z,I[P.v]+N.edge(P))},0)}function B(G){var z=N.outEdges(G).reduce(function(K,U){return Math.min(K,I[U.w]-N.edge(U))},Number.POSITIVE_INFINITY),P=w.node(G);z!==Number.POSITIVE_INFINITY&&P.borderType!==T&&(I[G]=Math.max(I[G],z))}return k(L,N.predecessors.bind(N)),k(B,N.successors.bind(N)),e.forEach(S,function(G){I[G]=I[_[G]]}),I}function d(w,y,_,S){var E=new t,I=w.graph(),N=m(I.nodesep,I.edgesep,S);return e.forEach(y,function(T){var k;e.forEach(T,function(L){var B=_[L];if(E.setNode(B),k){var G=_[k],z=E.edge(G,B);E.setEdge(G,B,Math.max(N(w,L,k),z||0))}k=L})}),E}function h(w,y){return e.minBy(e.values(y),function(_){var S=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY;return e.forIn(_,function(I,N){var T=b(w,N)/2;S=Math.max(I+T,S),E=Math.min(I-T,E)}),S-E})}function p(w,y){var _=e.values(y),S=e.min(_),E=e.max(_);e.forEach(["u","d"],function(I){e.forEach(["l","r"],function(N){var T=I+N,k=w[T],L;if(k!==y){var B=e.values(k);L=N==="l"?S-e.min(B):E-e.max(B),L&&(w[T]=e.mapValues(k,function(G){return G+L}))}})})}function v(w,y){return e.mapValues(w.ul,function(_,S){if(y)return w[y.toLowerCase()][S];var E=e.sortBy(e.map(w,S));return(E[1]+E[2])/2})}function x(w){var y=r.buildLayerMatrix(w),_=e.merge(n(w,y),i(w,y)),S={},E;e.forEach(["u","d"],function(N){E=N==="u"?y:e.values(y).reverse(),e.forEach(["l","r"],function(T){T==="r"&&(E=e.map(E,function(G){return e.values(G).reverse()}));var k=(N==="u"?w.predecessors:w.successors).bind(w),L=c(w,E,_,k),B=u(w,E,L.root,L.align,T==="r");T==="r"&&(B=e.mapValues(B,function(G){return-G})),S[N+T]=B})});var I=h(w,S);return p(S,I),v(S,w.graph().align)}function m(w,y,_){return function(S,E,I){var N=S.node(E),T=S.node(I),k=0,L;if(k+=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}if(L&&(k+=_?L:-L),L=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":L=T.width/2;break;case"r":L=-T.width/2;break}return L&&(k+=_?L:-L),L=0,k}}function b(w,y){return w.node(y).width}return e0}var t0,l5;function HQ(){if(l5)return t0;l5=1;var e=Ct(),t=Hr(),r=$Q().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 VQ(){if(c5)return r0;c5=1;var e=Ct(),t=OQ(),r=CQ(),n=RQ(),i=Hr().normalizeRanks,o=NQ(),a=Hr().removeEmptyRanks,s=TQ(),c=PQ(),u=kQ(),d=FQ(),h=HQ(),p=Hr(),v=$n().Graph;r0=x;function x(A,W){var q=W&&W.debugTiming?p.time:p.notime;q("layout",function(){var j=q(" buildLayoutGraph",function(){return k(A)});q(" runLayout",function(){m(j,q)}),q(" updateInputGraph",function(){b(A,j)})})}function m(A,W){W(" makeSpaceForEdgeLabels",function(){L(A)}),W(" removeSelfEdges",function(){ne(A)}),W(" acyclic",function(){t.run(A)}),W(" nestingGraph.run",function(){s.run(A)}),W(" rank",function(){n(p.asNonCompoundGraph(A))}),W(" injectEdgeLabelProxies",function(){B(A)}),W(" removeEmptyRanks",function(){a(A)}),W(" nestingGraph.cleanup",function(){s.cleanup(A)}),W(" normalizeRanks",function(){i(A)}),W(" assignRankMinMax",function(){G(A)}),W(" removeEdgeLabelProxies",function(){z(A)}),W(" normalize.run",function(){r.run(A)}),W(" parentDummyChains",function(){o(A)}),W(" addBorderSegments",function(){c(A)}),W(" order",function(){d(A)}),W(" insertSelfEdges",function(){D(A)}),W(" adjustCoordinateSystem",function(){u.adjust(A)}),W(" position",function(){h(A)}),W(" positionSelfEdges",function(){$(A)}),W(" removeBorderNodes",function(){X(A)}),W(" normalize.undo",function(){r.undo(A)}),W(" fixupEdgeLabelCoords",function(){U(A)}),W(" undoCoordinateSystem",function(){u.undo(A)}),W(" translateGraph",function(){P(A)}),W(" assignNodeIntersects",function(){K(A)}),W(" reversePoints",function(){re(A)}),W(" acyclic.undo",function(){t.undo(A)})}function b(A,W){e.forEach(A.nodes(),function(q){var j=A.node(q),V=W.node(q);j&&(j.x=V.x,j.y=V.y,W.children(q).length&&(j.width=V.width,j.height=V.height))}),e.forEach(A.edges(),function(q){var j=A.edge(q),V=W.edge(q);j.points=V.points,e.has(V,"x")&&(j.x=V.x,j.y=V.y)}),A.graph().width=W.graph().width,A.graph().height=W.graph().height}var w=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],S=["width","height"],E={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(A){var W=new v({multigraph:!0,compound:!0}),q=ee(A.graph());return W.setGraph(e.merge({},y,Z(q,w),e.pick(q,_))),e.forEach(A.nodes(),function(j){var V=ee(A.node(j));W.setNode(j,e.defaults(Z(V,S),E)),W.setParent(j,A.parent(j))}),e.forEach(A.edges(),function(j){var V=ee(A.edge(j));W.setEdge(j,e.merge({},N,Z(V,I),e.pick(V,T)))}),W}function L(A){var W=A.graph();W.ranksep/=2,e.forEach(A.edges(),function(q){var j=A.edge(q);j.minlen*=2,j.labelpos.toLowerCase()!=="c"&&(W.rankdir==="TB"||W.rankdir==="BT"?j.width+=j.labeloffset:j.height+=j.labeloffset)})}function B(A){e.forEach(A.edges(),function(W){var q=A.edge(W);if(q.width&&q.height){var j=A.node(W.v),V=A.node(W.w),J={rank:(V.rank-j.rank)/2+j.rank,e:W};p.addDummyNode(A,"edge-proxy",J,"_ep")}})}function G(A){var W=0;e.forEach(A.nodes(),function(q){var j=A.node(q);j.borderTop&&(j.minRank=A.node(j.borderTop).rank,j.maxRank=A.node(j.borderBottom).rank,W=e.max(W,j.maxRank))}),A.graph().maxRank=W}function z(A){e.forEach(A.nodes(),function(W){var q=A.node(W);q.dummy==="edge-proxy"&&(A.edge(q.e).labelRank=q.rank,A.removeNode(W))})}function P(A){var W=Number.POSITIVE_INFINITY,q=0,j=Number.POSITIVE_INFINITY,V=0,J=A.graph(),Y=J.marginx||0,se=J.marginy||0;function te(he){var ce=he.x,be=he.y,le=he.width,ue=he.height;W=Math.min(W,ce-le/2),q=Math.max(q,ce+le/2),j=Math.min(j,be-ue/2),V=Math.max(V,be+ue/2)}e.forEach(A.nodes(),function(he){te(A.node(he))}),e.forEach(A.edges(),function(he){var ce=A.edge(he);e.has(ce,"x")&&te(ce)}),W-=Y,j-=se,e.forEach(A.nodes(),function(he){var ce=A.node(he);ce.x-=W,ce.y-=j}),e.forEach(A.edges(),function(he){var ce=A.edge(he);e.forEach(ce.points,function(be){be.x-=W,be.y-=j}),e.has(ce,"x")&&(ce.x-=W),e.has(ce,"y")&&(ce.y-=j)}),J.width=q-W+Y,J.height=V-j+se}function K(A){e.forEach(A.edges(),function(W){var q=A.edge(W),j=A.node(W.v),V=A.node(W.w),J,Y;q.points?(J=q.points[0],Y=q.points[q.points.length-1]):(q.points=[],J=V,Y=j),q.points.unshift(p.intersectRect(j,J)),q.points.push(p.intersectRect(V,Y))})}function U(A){e.forEach(A.edges(),function(W){var q=A.edge(W);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 re(A){e.forEach(A.edges(),function(W){var q=A.edge(W);q.reversed&&q.points.reverse()})}function X(A){e.forEach(A.nodes(),function(W){if(A.children(W).length){var q=A.node(W),j=A.node(q.borderTop),V=A.node(q.borderBottom),J=A.node(e.last(q.borderLeft)),Y=A.node(e.last(q.borderRight));q.width=Math.abs(Y.x-J.x),q.height=Math.abs(V.y-j.y),q.x=J.x+q.width/2,q.y=j.y+q.height/2}}),e.forEach(A.nodes(),function(W){A.node(W).dummy==="border"&&A.removeNode(W)})}function ne(A){e.forEach(A.edges(),function(W){if(W.v===W.w){var q=A.node(W.v);q.selfEdges||(q.selfEdges=[]),q.selfEdges.push({e:W,label:A.edge(W)}),A.removeEdge(W)}})}function D(A){var W=p.buildLayerMatrix(A);e.forEach(W,function(q){var j=0;e.forEach(q,function(V,J){var Y=A.node(V);Y.order=J+j,e.forEach(Y.selfEdges,function(se){p.addDummyNode(A,"selfedge",{width:se.label.width,height:se.label.height,rank:Y.rank,order:J+ ++j,e:se.e,label:se.label},"_se")}),delete Y.selfEdges})})}function $(A){e.forEach(A.nodes(),function(W){var q=A.node(W);if(q.dummy==="selfedge"){var j=A.node(q.e.v),V=j.x+j.width/2,J=j.y,Y=q.x-V,se=j.height/2;A.setEdge(q.e,q.label),A.removeNode(W),q.label.points=[{x:V+2*Y/3,y:J-se},{x:V+5*Y/6,y:J-se},{x:V+Y,y:J},{x:V+5*Y/6,y:J+se},{x:V+2*Y/3,y:J+se}],q.label.x=q.x,q.label.y=q.y}})}function Z(A,W){return e.mapValues(e.pick(A,W),Number)}function ee(A){var W={};return e.forEach(A,function(q,j){W[j.toLowerCase()]=q}),W}return r0}var n0,u5;function WQ(){if(u5)return n0;u5=1;var e=Ct(),t=Hr(),r=$n().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 UQ(){return d5||(d5=1,i0="0.8.5"),i0}var o0,f5;function GQ(){return f5||(f5=1,o0={graphlib:$n(),layout:VQ(),debug:WQ(),util:{time:Hr().time,notime:Hr().notime},version:UQ()}),o0}var KQ=GQ();const h5=Yi(KQ);function YQ(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 m=p;u(p=x,m)}}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 XQ=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),p5=XQ?C.useEffect:C.useLayoutEffect;function ZQ(e){const t=typeof e=="function"?YQ(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 m=v?p:h.current;return C.useDebugValue(m),m};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 JQ(){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 QQ={value:()=>{}};function Td(){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 fu(r)}function fu(e){this._=e}function eee(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}})}fu.prototype=Td.prototype={constructor:fu,on:function(e,t){var r=this._,n=eee(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=tee(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 fu(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 tee(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]=QQ,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 Pd(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 ree(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 nee(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function T6(e){var t=Pd(e);return(t.local?nee:ree)(t)}function iee(){}function N_(e){return e==null?iee:function(){return this.querySelector(e)}}function oee(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 aee(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function see(){return[]}function P6(e){return e==null?see:function(){return this.querySelectorAll(e)}}function lee(e){return function(){return aee(e.apply(this,arguments))}}function cee(e){typeof e=="function"?e=lee(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 uee=Array.prototype.find;function dee(e){return function(){return uee.call(this.children,e)}}function fee(){return this.firstElementChild}function hee(e){return this.select(e==null?fee:dee(typeof e=="function"?e:M6(e)))}var pee=Array.prototype.filter;function vee(){return Array.from(this.children)}function gee(e){return function(){return pee.call(this.children,e)}}function mee(e){return this.selectAll(e==null?vee:gee(typeof e=="function"?e:M6(e)))}function bee(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 yee(){return new on(this._enter||this._groups.map(A6),this._parents)}function zu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}zu.prototype={constructor:zu,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 xee(e){return function(){return e}}function wee(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 zu(e,o[a]);for(;a<c;++a)(s=t[a])&&(i[a]=s)}function _ee(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 zu(e,o[s]);for(s=0;s<d;++s)(c=t[s])&&u.get(p[s])===c&&(i[s]=c)}function Eee(e){return e.__data__}function See(e,t){if(!arguments.length)return Array.from(this,Eee);var r=t?_ee:wee,n=this._parents,i=this._groups;typeof e!="function"&&(e=xee(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=Oee(e.call(d,d&&d.__data__,u,n)),x=v.length,m=s[u]=new Array(x),b=a[u]=new Array(x),w=c[u]=new Array(p);r(d,h,m,b,w,v,t);for(var y=0,_=0,S,E;y<x;++y)if(S=m[y]){for(y>=_&&(_=y+1);!(E=b[_])&&++_<x;);S._next=E||null}}return a=new on(a,n),a._enter=s,a._exit=c,a}function Oee(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Cee(){return new on(this._exit||this._groups.map(A6),this._parents)}function Iee(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 Ree(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 Nee(){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 Tee(e){e||(e=Pee);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 Pee(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function kee(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Mee(){return Array.from(this)}function Aee(){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 Dee(){let e=0;for(const t of this)++e;return e}function jee(){return!this.node()}function qee(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 Lee(e){return function(){this.removeAttribute(e)}}function zee(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Bee(e,t){return function(){this.setAttribute(e,t)}}function Fee(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function $ee(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Hee(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 Vee(e,t){var r=Pd(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?zee:Lee:typeof t=="function"?r.local?Hee:$ee:r.local?Fee:Bee)(r,t))}function D6(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Wee(e){return function(){this.style.removeProperty(e)}}function Uee(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Gee(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function Kee(e,t,r){return arguments.length>1?this.each((t==null?Wee:typeof t=="function"?Gee:Uee)(e,t,r??"")):Oa(this.node(),e)}function Oa(e,t){return e.style.getPropertyValue(t)||D6(e).getComputedStyle(e,null).getPropertyValue(t)}function Yee(e){return function(){delete this[e]}}function Xee(e,t){return function(){this[e]=t}}function Zee(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Jee(e,t){return arguments.length>1?this.each((t==null?Yee:typeof t=="function"?Zee:Xee)(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 Qee(e){return function(){L6(this,e)}}function ete(e){return function(){z6(this,e)}}function tte(e,t){return function(){(t.apply(this,arguments)?L6:z6)(this,e)}}function rte(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"?tte:t?Qee:ete)(r,t))}function nte(){this.textContent=""}function ite(e){return function(){this.textContent=e}}function ote(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function ate(e){return arguments.length?this.each(e==null?nte:(typeof e=="function"?ote:ite)(e)):this.node().textContent}function ste(){this.innerHTML=""}function lte(e){return function(){this.innerHTML=e}}function cte(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ute(e){return arguments.length?this.each(e==null?ste:(typeof e=="function"?cte:lte)(e)):this.node().innerHTML}function dte(){this.nextSibling&&this.parentNode.appendChild(this)}function fte(){return this.each(dte)}function hte(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pte(){return this.each(hte)}function vte(e){var t=typeof e=="function"?e:T6(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function gte(){return null}function mte(e,t){var r=typeof e=="function"?e:T6(e),n=t==null?gte:typeof t=="function"?t:N_(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function bte(){var e=this.parentNode;e&&e.removeChild(this)}function yte(){return this.each(bte)}function xte(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wte(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _te(e){return this.select(e?wte:xte)}function Ete(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ste(e){return function(t){e.call(this,t,this.__data__)}}function Ote(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 Cte(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 Ite(e,t,r){return function(){var n=this.__on,i,o=Ste(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 Rte(e,t,r){var n=Ote(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?Ite:Cte,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 Nte(e,t){return function(){return B6(this,e,t)}}function Tte(e,t){return function(){return B6(this,e,t.apply(this,arguments))}}function Pte(e,t){return this.each((typeof t=="function"?Tte:Nte)(e,t))}function*kte(){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 _l(){return new on([[document.documentElement]],F6)}function Mte(){return this}on.prototype=_l.prototype={constructor:on,select:oee,selectAll:cee,selectChild:hee,selectChildren:mee,filter:bee,data:See,enter:yee,exit:Cee,join:Iee,merge:Ree,selection:Mte,order:Nee,sort:Tee,call:kee,nodes:Mee,node:Aee,size:Dee,empty:jee,each:qee,attr:Vee,style:Kee,property:Jee,classed:rte,text:ate,html:ute,raise:fte,lower:pte,append:vte,insert:mte,remove:yte,clone:_te,datum:Ete,on:Rte,dispatch:Pte,[Symbol.iterator]:kte};function jn(e){return typeof e=="string"?new on([[document.querySelector(e)]],[document.documentElement]):new on([[e]],F6)}function Ate(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Jn(e,t){if(e=Ate(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 Dte={passive:!1},tl={capture:!0,passive:!1};function a0(e){e.stopImmediatePropagation()}function ha(e){e.preventDefault(),e.stopImmediatePropagation()}function $6(e){var t=e.document.documentElement,r=jn(e).on("dragstart.drag",ha,tl);"onselectstart"in t?r.on("selectstart.drag",ha,tl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function H6(e,t){var r=e.document.documentElement,n=jn(e).on("dragstart.drag",null);t&&(n.on("click.drag",ha,tl),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 jc=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 jte(e){return!e.ctrlKey&&!e.button}function qte(){return this.parentNode}function Lte(e,t){return t??{x:e.x,y:e.y}}function zte(){return navigator.maxTouchPoints||"ontouchstart"in this}function Bte(){var e=jte,t=qte,r=Lte,n=zte,i={},o=Td("start","drag","end"),a=0,s,c,u,d,h=0;function p(S){S.on("mousedown.drag",v).filter(n).on("touchstart.drag",b).on("touchmove.drag",w,Dte).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(S,E){if(!(d||!e.call(this,S,E))){var I=_(this,t.call(this,S,E),S,E,"mouse");I&&(jn(S.view).on("mousemove.drag",x,tl).on("mouseup.drag",m,tl),$6(S.view),a0(S),u=!1,s=S.clientX,c=S.clientY,I("start",S))}}function x(S){if(ha(S),!u){var E=S.clientX-s,I=S.clientY-c;u=E*E+I*I>h}i.mouse("drag",S)}function m(S){jn(S.view).on("mousemove.drag mouseup.drag",null),H6(S.view,u),ha(S),i.mouse("end",S)}function b(S,E){if(e.call(this,S,E)){var I=S.changedTouches,N=t.call(this,S,E),T=I.length,k,L;for(k=0;k<T;++k)(L=_(this,N,S,E,I[k].identifier,I[k]))&&(a0(S),L("start",S,I[k]))}}function w(S){var E=S.changedTouches,I=E.length,N,T;for(N=0;N<I;++N)(T=i[E[N].identifier])&&(ha(S),T("drag",S,E[N]))}function y(S){var E=S.changedTouches,I=E.length,N,T;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),N=0;N<I;++N)(T=i[E[N].identifier])&&(a0(S),T("end",S,E[N]))}function _(S,E,I,N,T,k){var L=o.copy(),B=Jn(k||I,E),G,z,P;if((P=r.call(S,new Nw("beforestart",{sourceEvent:I,target:p,identifier:T,active:a,x:B[0],y:B[1],dx:0,dy:0,dispatch:L}),N))!=null)return G=P.x-B[0]||0,z=P.y-B[1]||0,function K(U,re,X){var ne=B,D;switch(U){case"start":i[T]=K,D=a++;break;case"end":delete i[T],--a;case"drag":B=Jn(X||re,E),D=a;break}L.call(U,S,new Nw(U,{sourceEvent:re,subject:P,target:p,identifier:T,active:D,x:B[0]+G,y:B[1]+z,dx:B[0]-ne[0],dy:B[1]-ne[1],dispatch:L}),N)}}return p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:jc(!!S),p):e},p.container=function(S){return arguments.length?(t=typeof S=="function"?S:jc(S),p):t},p.subject=function(S){return arguments.length?(r=typeof S=="function"?S:jc(S),p):r},p.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:jc(!!S),p):n},p.on=function(){var S=o.on.apply(o,arguments);return S===o?p:S},p.clickDistance=function(S){return arguments.length?(h=(S=+S)*S,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 El(){}var rl=.7,Bu=1/rl,pa="\\s*([+-]?\\d+)\\s*",nl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ri="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fte=/^#([0-9a-f]{3,8})$/,$te=new RegExp(`^rgb\\(${pa},${pa},${pa}\\)$`),Hte=new RegExp(`^rgb\\(${ri},${ri},${ri}\\)$`),Vte=new RegExp(`^rgba\\(${pa},${pa},${pa},${nl}\\)$`),Wte=new RegExp(`^rgba\\(${ri},${ri},${ri},${nl}\\)$`),Ute=new RegExp(`^hsl\\(${nl},${ri},${ri}\\)$`),Gte=new RegExp(`^hsla\\(${nl},${ri},${ri},${nl}\\)$`),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_(El,il,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:b5,formatHex:b5,formatHex8:Kte,formatHsl:Yte,formatRgb:y5,toString:y5});function b5(){return this.rgb().formatHex()}function Kte(){return this.rgb().formatHex8()}function Yte(){return W6(this).formatHsl()}function y5(){return this.rgb().formatRgb()}function il(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Fte.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?x5(t):r===3?new Br(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?qc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?qc(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=$te.exec(e))?new Br(t[1],t[2],t[3],1):(t=Hte.exec(e))?new Br(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Vte.exec(e))?qc(t[1],t[2],t[3],t[4]):(t=Wte.exec(e))?qc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ute.exec(e))?E5(t[1],t[2]/100,t[3]/100,1):(t=Gte.exec(e))?E5(t[1],t[2]/100,t[3]/100,t[4]):m5.hasOwnProperty(e)?x5(m5[e]):e==="transparent"?new Br(NaN,NaN,NaN,0):null}function x5(e){return new Br(e>>16&255,e>>8&255,e&255,1)}function qc(e,t,r,n){return n<=0&&(e=t=r=NaN),new Br(e,t,r,n)}function Xte(e){return e instanceof El||(e=il(e)),e?(e=e.rgb(),new Br(e.r,e.g,e.b,e.opacity)):new Br}function Tw(e,t,r,n){return arguments.length===1?Xte(e):new Br(e,t,r,n??1)}function Br(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}P_(Br,Tw,V6(El,{brighter(e){return e=e==null?Bu:Math.pow(Bu,e),new Br(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?rl:Math.pow(rl,e),new Br(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Br(xo(this.r),xo(this.g),xo(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:w5,formatHex:w5,formatHex8:Zte,formatRgb:_5,toString:_5}));function w5(){return`#${vo(this.r)}${vo(this.g)}${vo(this.b)}`}function Zte(){return`#${vo(this.r)}${vo(this.g)}${vo(this.b)}${vo((isNaN(this.opacity)?1:this.opacity)*255)}`}function _5(){const e=Fu(this.opacity);return`${e===1?"rgb(":"rgba("}${xo(this.r)}, ${xo(this.g)}, ${xo(this.b)}${e===1?")":`, ${e})`}`}function Fu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vo(e){return e=xo(e),(e<16?"0":"")+e.toString(16)}function E5(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new qn(e,t,r,n)}function W6(e){if(e instanceof qn)return new qn(e.h,e.s,e.l,e.opacity);if(e instanceof El||(e=il(e)),!e)return new qn;if(e instanceof qn)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 qn(a,s,c,e.opacity)}function Jte(e,t,r,n){return arguments.length===1?W6(e):new qn(e,t,r,n??1)}function qn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}P_(qn,Jte,V6(El,{brighter(e){return e=e==null?Bu:Math.pow(Bu,e),new qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?rl:Math.pow(rl,e),new qn(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 Br(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 qn(S5(this.h),Lc(this.s),Lc(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("}${S5(this.h)}, ${Lc(this.s)*100}%, ${Lc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function S5(e){return e=(e||0)%360,e<0?e+360:e}function Lc(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 Qte(e,t){return function(r){return e+r*t}}function ere(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 tre(e){return(e=+e)==1?G6:function(t,r){return r-t?ere(t,r,e):U6(isNaN(t)?r:t)}}function G6(e,t){var r=t-e;return r?Qte(e,r):U6(isNaN(e)?t:e)}const O5=(function e(t){var r=tre(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 $i(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 rre(e){return function(){return e}}function nre(e){return function(t){return e(t)+""}}function ire(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:$i(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]?nre(c[0].x):rre(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 zc;function ore(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 are(e){return e==null||(zc||(zc=document.createElementNS("http://www.w3.org/2000/svg","g")),zc.setAttribute("transform",e),!(e=zc.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 m=v.push("translate(",null,t,null,r);x.push({i:m-4,x:$i(u,h)},{i:m-2,x:$i(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:$i(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:$i(u,d)}):d&&h.push(i(h)+"skewX("+d+n)}function c(u,d,h,p,v,x){if(u!==h||d!==p){var m=v.push(i(v)+"scale(",null,",",null,")");x.push({i:m-4,x:$i(u,h)},{i:m-2,x:$i(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,m=p.length,b;++x<m;)h[(b=p[x]).i]=b.x(v);return h.join("")}}}var sre=Y6(ore,"px, ","px)","deg)"),lre=Y6(are,", ",")",")"),cre=1e-12;function I5(e){return((e=Math.exp(e))+1/e)/2}function ure(e){return((e=Math.exp(e))-1/e)/2}function dre(e){return((e=Math.exp(2*e))-1)/(e+1)}const fre=(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,m=v*v+x*x,b,w;if(m<cre)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(m),_=(p*p-u*u+n*m)/(2*u*r*y),S=(p*p-u*u-n*m)/(2*p*r*y),E=Math.log(Math.sqrt(_*_+1)-_),I=Math.log(Math.sqrt(S*S+1)-S);w=(I-E)/t,b=function(N){var T=N*w,k=I5(E),L=u/(r*y)*(k*dre(t*T+E)-ure(E));return[s+L*v,c+L*x,u*k/I5(t*T+E)]}}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 Ca=0,Ds=0,fs=0,X6=1e3,$u,js,Hu=0,Io=0,kd=0,ol=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 Io||(Z6(hre),Io=ol.now()+kd)}function hre(){Io=0}function Vu(){this._call=this._time=this._next=null}Vu.prototype=J6.prototype={constructor:Vu,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&&js!==this&&(js?js._next=this:$u=this,js=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 Vu;return n.restart(e,t,r),n}function pre(){k_(),++Ca;for(var e=$u,t;e;)(t=Io-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ca}function R5(){Io=(Hu=ol.now())+kd,Ca=Ds=0;try{pre()}finally{Ca=0,gre(),Io=0}}function vre(){var e=ol.now(),t=e-Hu;t>X6&&(kd-=t,Hu=e)}function gre(){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);js=e,Mw(n)}function Mw(e){if(!Ca){Ds&&(Ds=clearTimeout(Ds));var t=e-Io;t>24?(e<1/0&&(Ds=setTimeout(R5,e-ol.now()-kd)),fs&&(fs=clearInterval(fs))):(fs||(Hu=ol.now(),fs=setInterval(vre,X6)),Ca=1,Z6(R5))}}function N5(e,t,r){var n=new Vu;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var mre=Td("start","end","cancel","interrupt"),bre=[],Q6=0,T5=1,Aw=2,hu=3,P5=4,Dw=5,pu=6;function Md(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;yre(e,r,{name:t,index:n,group:i,on:mre,tween:bre,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Q6})}function M_(e,t){var r=Vn(e,t);if(r.state>Q6)throw new Error("too late; already scheduled");return r}function ai(e,t){var r=Vn(e,t);if(r.state>hu)throw new Error("too late; already running");return r}function Vn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function yre(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===hu)return N5(a);v.state===P5?(v.state=pu,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[d]):+d<t&&(v.state=pu,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[d])}if(N5(function(){r.state===hu&&(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=hu,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=pu,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function vu(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=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 xre(e){return this.each(function(){vu(this,e)})}function wre(e,t){var r,n;return function(){var i=ai(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 _re(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=ai(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 Ere(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Vn(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?wre:_re)(r,e,t))}function A_(e,t,r){var n=e._id;return e.each(function(){var i=ai(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Vn(i,n).value[t]}}function eq(e,t){var r;return(typeof t=="number"?$i:t instanceof il?O5:(r=il(t))?(t=r,O5):ire)(e,t)}function Sre(e){return function(){this.removeAttribute(e)}}function Ore(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Cre(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 Ire(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 Rre(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 Nre(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 Tre(e,t){var r=Pd(e),n=r==="transform"?lre:eq;return this.attrTween(e,typeof t=="function"?(r.local?Nre:Rre)(r,n,A_(this,"attr."+e,t)):t==null?(r.local?Ore:Sre)(r):(r.local?Ire:Cre)(r,n,t))}function Pre(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function kre(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Mre(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&kre(e,o)),r}return i._value=t,i}function Are(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Pre(e,o)),r}return i._value=t,i}function Dre(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=Pd(e);return this.tween(r,(n.local?Mre:Are)(n,t))}function jre(e,t){return function(){M_(this,e).delay=+t.apply(this,arguments)}}function qre(e,t){return t=+t,function(){M_(this,e).delay=t}}function Lre(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?jre:qre)(t,e)):Vn(this.node(),t).delay}function zre(e,t){return function(){ai(this,e).duration=+t.apply(this,arguments)}}function Bre(e,t){return t=+t,function(){ai(this,e).duration=t}}function Fre(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zre:Bre)(t,e)):Vn(this.node(),t).duration}function $re(e,t){if(typeof t!="function")throw new Error;return function(){ai(this,e).ease=t}}function Hre(e){var t=this._id;return arguments.length?this.each($re(t,e)):Vn(this.node(),t).ease}function Vre(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;ai(this,e).ease=r}}function Wre(e){if(typeof e!="function")throw new Error;return this.each(Vre(this._id,e))}function Ure(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 wi(n,this._parents,this._name,this._id)}function Gre(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 wi(a,this._parents,this._name,this._id)}function Kre(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 Yre(e,t,r){var n,i,o=Kre(t)?M_:ai;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function Xre(e,t){var r=this._id;return arguments.length<2?Vn(this.node(),r).on.on(e):this.each(Yre(r,e,t))}function Zre(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Jre(){return this.on("end.remove",Zre(this._id))}function Qre(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,Md(u[p],t,r,p,u,Vn(d,r)));return new wi(o,this._parents,t,r)}function ene(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=Vn(d,r),m=0,b=p.length;m<b;++m)(v=p[m])&&Md(v,t,r,m,p,x);o.push(p),a.push(d)}return new wi(o,a,t,r)}var tne=_l.prototype.constructor;function rne(){return new tne(this._groups,this._parents)}function nne(e,t){var r,n,i;return function(){var o=Oa(this,e),a=(this.style.removeProperty(e),Oa(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 ine(e,t,r){var n,i=r+"",o;return function(){var a=Oa(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function one(e,t,r){var n,i,o;return function(){var a=Oa(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),Oa(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s))}}function ane(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var c=ai(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 sne(e,t,r){var n=(e+="")=="transform"?sre:eq;return t==null?this.styleTween(e,nne(e,n)).on("end.style."+e,tq(e)):typeof t=="function"?this.styleTween(e,one(e,n,A_(this,"style."+e,t))).each(ane(this._id,e)):this.styleTween(e,ine(e,n,t),r).on("end.style."+e,null)}function lne(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function cne(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&lne(e,a,r)),n}return o._value=t,o}function une(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,cne(e,t,r??""))}function dne(e){return function(){this.textContent=e}}function fne(e){return function(){var t=e(this);this.textContent=t??""}}function hne(e){return this.tween("text",typeof e=="function"?fne(A_(this,"text",e)):dne(e==null?"":e+""))}function pne(e){return function(t){this.textContent=e.call(this,t)}}function vne(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&pne(i)),t}return n._value=e,n}function gne(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,vne(e))}function mne(){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=Vn(c,t);Md(c,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new wi(n,this._parents,e,r)}function bne(){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=ai(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 yne=0;function wi(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function rq(){return++yne}var mi=_l.prototype;wi.prototype={constructor:wi,select:Qre,selectAll:ene,selectChild:mi.selectChild,selectChildren:mi.selectChildren,filter:Ure,merge:Gre,selection:rne,transition:mne,call:mi.call,nodes:mi.nodes,node:mi.node,size:mi.size,empty:mi.empty,each:mi.each,on:Xre,attr:Tre,attrTween:Dre,style:sne,styleTween:une,text:hne,textTween:gne,remove:Jre,tween:Ere,delay:Lre,duration:Fre,ease:Hre,easeVarying:Wre,end:bne,[Symbol.iterator]:mi[Symbol.iterator]};function xne(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var wne={time:null,delay:0,duration:250,ease:xne};function _ne(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 Ene(e){var t,r;e instanceof wi?(t=e._id,e=e._name):(t=rq(),(r=wne).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])&&Md(c,e,t,u,a,r||_ne(c,t));return new wi(n,this._parents,e,t)}_l.prototype.interrupt=xre;_l.prototype.transition=Ene;const Bc=e=>()=>e;function Sne(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 yi(e,t,r){this.k=e,this.x=t,this.y=r}yi.prototype={constructor:yi,scale:function(e){return e===1?this:new yi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new yi(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 wo=new yi(1,0,0);yi.prototype;function c0(e){e.stopImmediatePropagation()}function hs(e){e.preventDefault(),e.stopImmediatePropagation()}function One(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Cne(){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||wo}function Ine(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Rne(){return navigator.maxTouchPoints||"ontouchstart"in this}function Nne(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 Tne(){var e=One,t=Cne,r=Nne,n=Ine,i=Rne,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=fre,u=Td("start","zoom","end"),d,h,p,v=500,x=150,m=0,b=10;function w(P){P.property("__zoom",k5).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",L).filter(i).on("touchstart.zoom",B).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(P,K,U,re){var X=P.selection?P.selection():P;X.property("__zoom",k5),P!==X?E(P,K,U,re):X.interrupt().each(function(){I(this,arguments).event(re).start().zoom(null,typeof K=="function"?K.apply(this,arguments):K).end()})},w.scaleBy=function(P,K,U,re){w.scaleTo(P,function(){var X=this.__zoom.k,ne=typeof K=="function"?K.apply(this,arguments):K;return X*ne},U,re)},w.scaleTo=function(P,K,U,re){w.transform(P,function(){var X=t.apply(this,arguments),ne=this.__zoom,D=U==null?S(X):typeof U=="function"?U.apply(this,arguments):U,$=ne.invert(D),Z=typeof K=="function"?K.apply(this,arguments):K;return r(_(y(ne,Z),D,$),X,a)},U,re)},w.translateBy=function(P,K,U,re){w.transform(P,function(){return r(this.__zoom.translate(typeof K=="function"?K.apply(this,arguments):K,typeof U=="function"?U.apply(this,arguments):U),t.apply(this,arguments),a)},null,re)},w.translateTo=function(P,K,U,re,X){w.transform(P,function(){var ne=t.apply(this,arguments),D=this.__zoom,$=re==null?S(ne):typeof re=="function"?re.apply(this,arguments):re;return r(wo.translate($[0],$[1]).scale(D.k).translate(typeof K=="function"?-K.apply(this,arguments):-K,typeof U=="function"?-U.apply(this,arguments):-U),ne,a)},re,X)};function y(P,K){return K=Math.max(o[0],Math.min(o[1],K)),K===P.k?P:new yi(K,P.x,P.y)}function _(P,K,U){var re=K[0]-U[0]*P.k,X=K[1]-U[1]*P.k;return re===P.x&&X===P.y?P:new yi(P.k,re,X)}function S(P){return[(+P[0][0]+ +P[1][0])/2,(+P[0][1]+ +P[1][1])/2]}function E(P,K,U,re){P.on("start.zoom",function(){I(this,arguments).event(re).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(re).end()}).tween("zoom",function(){var X=this,ne=arguments,D=I(X,ne).event(re),$=t.apply(X,ne),Z=U==null?S($):typeof U=="function"?U.apply(X,ne):U,ee=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),A=X.__zoom,W=typeof K=="function"?K.apply(X,ne):K,q=c(A.invert(Z).concat(ee/A.k),W.invert(Z).concat(ee/W.k));return function(j){if(j===1)j=W;else{var V=q(j),J=ee/V[2];j=new yi(J,Z[0]-V[0]*J,Z[1]-V[1]*J)}D.zoom(null,j)}})}function I(P,K,U){return!U&&P.__zooming||new N(P,K)}function N(P,K){this.that=P,this.args=K,this.active=0,this.sourceEvent=null,this.extent=t.apply(P,K),this.taps=0}N.prototype={event:function(P){return P&&(this.sourceEvent=P),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(P,K){return this.mouse&&P!=="mouse"&&(this.mouse[1]=K.invert(this.mouse[0])),this.touch0&&P!=="touch"&&(this.touch0[1]=K.invert(this.touch0[0])),this.touch1&&P!=="touch"&&(this.touch1[1]=K.invert(this.touch1[0])),this.that.__zoom=K,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(P){var K=jn(this.that).datum();u.call(P,this.that,new Sne(P,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:u}),K)}};function T(P,...K){if(!e.apply(this,arguments))return;var U=I(this,K).event(P),re=this.__zoom,X=Math.max(o[0],Math.min(o[1],re.k*Math.pow(2,n.apply(this,arguments)))),ne=Jn(P);if(U.wheel)(U.mouse[0][0]!==ne[0]||U.mouse[0][1]!==ne[1])&&(U.mouse[1]=re.invert(U.mouse[0]=ne)),clearTimeout(U.wheel);else{if(re.k===X)return;U.mouse=[ne,re.invert(ne)],vu(this),U.start()}hs(P),U.wheel=setTimeout(D,x),U.zoom("mouse",r(_(y(re,X),U.mouse[0],U.mouse[1]),U.extent,a));function D(){U.wheel=null,U.end()}}function k(P,...K){if(p||!e.apply(this,arguments))return;var U=P.currentTarget,re=I(this,K,!0).event(P),X=jn(P.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",ee,!0),ne=Jn(P,U),D=P.clientX,$=P.clientY;$6(P.view),c0(P),re.mouse=[ne,this.__zoom.invert(ne)],vu(this),re.start();function Z(A){if(hs(A),!re.moved){var W=A.clientX-D,q=A.clientY-$;re.moved=W*W+q*q>m}re.event(A).zoom("mouse",r(_(re.that.__zoom,re.mouse[0]=Jn(A,U),re.mouse[1]),re.extent,a))}function ee(A){X.on("mousemove.zoom mouseup.zoom",null),H6(A.view,re.moved),hs(A),re.event(A).end()}}function L(P,...K){if(e.apply(this,arguments)){var U=this.__zoom,re=Jn(P.changedTouches?P.changedTouches[0]:P,this),X=U.invert(re),ne=U.k*(P.shiftKey?.5:2),D=r(_(y(U,ne),re,X),t.apply(this,K),a);hs(P),s>0?jn(this).transition().duration(s).call(E,D,re,P):jn(this).call(w.transform,D,re,P)}}function B(P,...K){if(e.apply(this,arguments)){var U=P.touches,re=U.length,X=I(this,K,P.changedTouches.length===re).event(P),ne,D,$,Z;for(c0(P),D=0;D<re;++D)$=U[D],Z=Jn($,this),Z=[Z,this.__zoom.invert(Z),$.identifier],X.touch0?!X.touch1&&X.touch0[2]!==Z[2]&&(X.touch1=Z,X.taps=0):(X.touch0=Z,ne=!0,X.taps=1+!!d);d&&(d=clearTimeout(d)),ne&&(X.taps<2&&(h=Z[0],d=setTimeout(function(){d=null},v)),vu(this),X.start())}}function G(P,...K){if(this.__zooming){var U=I(this,K).event(P),re=P.changedTouches,X=re.length,ne,D,$,Z;for(hs(P),ne=0;ne<X;++ne)D=re[ne],$=Jn(D,this),U.touch0&&U.touch0[2]===D.identifier?U.touch0[0]=$:U.touch1&&U.touch1[2]===D.identifier&&(U.touch1[0]=$);if(D=U.that.__zoom,U.touch1){var ee=U.touch0[0],A=U.touch0[1],W=U.touch1[0],q=U.touch1[1],j=(j=W[0]-ee[0])*j+(j=W[1]-ee[1])*j,V=(V=q[0]-A[0])*V+(V=q[1]-A[1])*V;D=y(D,Math.sqrt(j/V)),$=[(ee[0]+W[0])/2,(ee[1]+W[1])/2],Z=[(A[0]+q[0])/2,(A[1]+q[1])/2]}else if(U.touch0)$=U.touch0[0],Z=U.touch0[1];else return;U.zoom("touch",r(_(D,$,Z),U.extent,a))}}function z(P,...K){if(this.__zooming){var U=I(this,K).event(P),re=P.changedTouches,X=re.length,ne,D;for(c0(P),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),ne=0;ne<X;++ne)D=re[ne],U.touch0&&U.touch0[2]===D.identifier?delete U.touch0:U.touch1&&U.touch1[2]===D.identifier&&delete U.touch1;if(U.touch1&&!U.touch0&&(U.touch0=U.touch1,delete U.touch1),U.touch0)U.touch0[1]=this.__zoom.invert(U.touch0[0]);else if(U.end(),U.taps===2&&(D=Jn(D,this),Math.hypot(h[0]-D[0],h[1]-D[1])<b)){var $=jn(this).on("dblclick.zoom");$&&$.apply(this,arguments)}}}return w.wheelDelta=function(P){return arguments.length?(n=typeof P=="function"?P:Bc(+P),w):n},w.filter=function(P){return arguments.length?(e=typeof P=="function"?P:Bc(!!P),w):e},w.touchable=function(P){return arguments.length?(i=typeof P=="function"?P:Bc(!!P),w):i},w.extent=function(P){return arguments.length?(t=typeof P=="function"?P:Bc([[+P[0][0],+P[0][1]],[+P[1][0],+P[1][1]]]),w):t},w.scaleExtent=function(P){return arguments.length?(o[0]=+P[0],o[1]=+P[1],w):[o[0],o[1]]},w.translateExtent=function(P){return arguments.length?(a[0][0]=+P[0][0],a[1][0]=+P[1][0],a[0][1]=+P[0][1],a[1][1]=+P[1][1],w):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},w.constrain=function(P){return arguments.length?(r=P,w):r},w.duration=function(P){return arguments.length?(s=+P,w):s},w.interpolate=function(P){return arguments.length?(c=P,w):c},w.on=function(){var P=u.on.apply(u,arguments);return P===u?w:P},w.clickDistance=function(P){return arguments.length?(m=(P=+P)*P,w):Math.sqrt(m)},w.tapDistance=function(P){return arguments.length?(b=+P,w):b},w}function et(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 Pne(e){if(Array.isArray(e))return e}function kne(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 Mne(){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 Pne(e)||kne(e,t)||nq(e,t)||Mne()}var Ia;(function(e){e.Strict="strict",e.Loose="loose"})(Ia||(Ia={}));var Ro;(function(e){e.Lines="lines",e.Dots="dots"})(Ro||(Ro={}));var va;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(va||(va={}));var Vi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Vi||(Vi={}));var Wu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Wu||(Wu={}));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}},ga=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:ga(t.x,r[0][0],r[1][0]),y:ga(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)},Ane=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)}},Uu=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}},Dne=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 qs(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){et(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=qs({},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(qs(qs({},i),{},{selected:o.selected})),n;case"position":{var a=qs({},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=qs({},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 jne(e,t){return sq(e,t)}var Hi=function(t,r){return{id:t,type:"select",selected:r}};function ua(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Hi(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Hi(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){et(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 ps(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 Ws(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){et(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 qne=function(t){return"id"in t&&"source"in t&&"target"in t},Lne=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("&"))},zne=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)})},Bne=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 qne(t)?n=Ws({},t):n=Ws(Ws({},t),{},{id:Lne(t)}),zne(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 Ane(n,Uu({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 Dne(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=Uu({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,m=p.height,b=p.selectable,w=b===void 0?!0:b;if(u&&!w)return!1;var y=Uu(Ws(Ws({},v),{},{width:x||0,height:m||0})),_=Math.max(0,Math.min(d.x2,y.x2)-Math.max(d.x,y.x)),S=Math.max(0,Math.min(d.y2,y.y2)-Math.max(d.y,y.y)),E=Math.ceil(_*S),I=typeof x>"u"||typeof m>"u"||x===null||m===null,N=c&&E>0,T=(x||0)*(m||0),k=I||N||E>=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=ga(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]},ho=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 da(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){et(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,m;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:(m=n.z)!==null&&m!==void 0?m: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=da(da({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,da(da({},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,m,b,w=j_(p),y=pq(w,i,o,(x=t.minZoom)!==null&&x!==void 0?x:a,(m=t.maxZoom)!==null&&m!==void 0?m:s,(b=t.padding)!==null&&b!==void 0?b:.1),_=Ke(y,3),S=_[0],E=_[1],I=_[2],N=wo.translate(S,E).scale(I);return typeof t.duration=="number"&&t.duration>0?c.transform(ho(u,t.duration),N):c.transform(u,N),!0}}return!1}function Fne(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,da(da({},n),{},(i={},et(i,fr,n[fr]),et(i,"selected",r.selected),i)))}}),new Map(t)}function $ne(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 Fc(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:Fne(t,a)}),c==null||c(t)),r!=null&&r.length&&(h&&i({edges:$ne(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:Ia.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 Yn(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){et(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_=JQ(),Hne=q_.Provider,qt=q_.useStore,Rr=q_.useStoreApi,Vne=function(){return ZQ(function(t,r){return Yn(Yn({},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 Yn(Yn({},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),m=x.m22,b=i.reduce(function(y,_){var S=s.get(_.id);if(S){var E=D_(_.nodeElement),I=!!(E.width&&E.height&&(S.width!==E.width||S.height!==E.height||_.forceUpdate));I&&(s.set(S.id,Yn(Yn({},S),{},et({},fr,Yn(Yn({},S[fr]),{},{handleBounds:{source:j5(".source",_.nodeElement,m),target:j5(".target",_.nodeElement,m)}})),E)),y.push({id:S.id,type:"dimensions",dimensions:E}))}return y},[]),w=u||c&&!u&&gq(r,Yn({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 m={id:x.id,type:"position",dragging:a};return o&&(m.positionAbsolute=x.positionAbsolute,m.position=x.position),m});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 Hi(h,!0)}):(u=ua(Array.from(s.values()),i),d=ua(c,[])),Fc({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 Hi(h,!0)}):(u=ua(s,i),d=ua(Array.from(c.values()),[])),Fc({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,Hi(x.id,!1)}),v=h.map(function(x){return Hi(x.id,!1)});Fc({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 Hi(d.id,!1)}),u=a.filter(function(d){return d.selected}).map(function(d){return Hi(d.id,!1)});Fc({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(Yn({},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 Vr(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 Wne(e){if(Array.isArray(e))return jw(e)}function Une(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gne(){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 _o(e){return Wne(e)||Une(e)||nq(e)||Gne()}var Kne={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},Yne=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},Xne=function(){var t=Rr(),r=qt(Yne,Vr),n=r.d3Zoom,i=r.d3Selection,o=C.useMemo(function(){return i&&n?{zoomIn:function(s){return n.scaleBy(ho(i,s==null?void 0:s.duration),1.2)},zoomOut:function(s){return n.scaleBy(ho(i,s==null?void 0:s.duration),1/1.2)},zoomTo:function(s,c){return n.scaleTo(ho(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],m=p[2],b=wo.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:m);n.transform(ho(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,m=h/2-s*x,b=p/2-c*x,w=wo.translate(m,b).scale(x);n.transform(ho(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,m=pq(s,h,p,v,x,(u=c==null?void 0:c.padding)!==null&&u!==void 0?u:.1),b=Ke(m,3),w=b[0],y=b[1],_=b[2],S=wo.translate(w,y).scale(_);n.transform(ho(i,c==null?void 0:c.duration),S)},project:function(s){var c=t.getState(),u=c.transform,d=c.snapToGrid,h=c.snapGrid;return dq(s,u,d,h)},viewportInitialized:!0}:Kne},[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 ra(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){et(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=Xne(),t=Rr(),r=C.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(x){return ra({},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 ra({},x)})},[]),o=C.useCallback(function(h){var p=t.getState(),v=p.edges,x=v===void 0?[]:v;return x.find(function(m){return m.id===h})},[]),a=C.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,x=p.setNodes,m=p.hasDefaultNodes,b=p.onNodesChange,w=Array.from(v.values()),y=typeof h=="function"?h(w):h;if(m)x(y);else if(b){var _=y.length===0?w.map(function(S){return{type:"remove",id:S.id}}):y.map(function(S){return{item:S,type:"reset"}});b(_)}},[]),s=C.useCallback(function(h){var p=t.getState(),v=p.edges,x=v===void 0?[]:v,m=p.setEdges,b=p.hasDefaultEdges,w=p.onEdgesChange,y=typeof h=="function"?h(x):h;if(b)m(y);else if(w){var _=y.length===0?x.map(function(S){return{type:"remove",id:S.id}}):y.map(function(S){return{item:S,type:"reset"}});w(_)}},[]),c=C.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),x=v.nodeInternals,m=v.setNodes,b=v.hasDefaultNodes,w=v.onNodesChange;if(b){var y=Array.from(x.values()),_=[].concat(y,_o(p));m(_)}else if(w){var S=p.map(function(E){return{item:E,type:"add"}});w(S)}},[]),u=C.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),x=v.edges,m=x===void 0?[]:x,b=v.setEdges,w=v.hasDefaultEdges,y=v.onEdgesChange;if(w)b([].concat(_o(m),_o(p)));else if(y){var _=p.map(function(S){return{item:S,type:"add"}});y(_)}},[]),d=C.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,x=v===void 0?[]:v,m=h.transform,b=Array.from(p.values()),w=Ke(m,3),y=w[0],_=w[1],S=w[2];return{nodes:b.map(function(E){return ra({},E)}),edges:x.map(function(E){return ra({},E)}),viewport:{x:y,y:_,zoom:S}}},[]);return C.useMemo(function(){return ra(ra({},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 Zne(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 Ad(e,t){if(e==null)return{};var r=Zne(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 Jne(){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 Qne(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},C.createElement("path",{d:"M0 0h32v4.2H0z"}))}function eie(){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 tie(){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 rie(){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 nie=["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 iie(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){et(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 $c=function(t){var r=t.children,n=t.className,i=Ad(t,nie);return C.createElement("button",iie({type:"button",className:an(["react-flow__controls-button",n])},i),r)},oie=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},aie=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,m=t.children,b=Rr(),w=C.useState(!1),y=Ke(w,2),_=y[0],S=y[1],E=qt(oie),I=mq(),N=I.zoomIn,T=I.zoomOut,k=I.fitView;if(C.useEffect(function(){S(!0)},[]),!_)return null;var L=function(){N==null||N(),d==null||d()},B=function(){T==null||T(),h==null||h()},G=function(){k==null||k(u),p==null||p()},z=function(){b.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),v==null||v(!E)};return C.createElement("div",{className:an(["react-flow__controls",x]),style:r},i&&C.createElement(C.Fragment,null,C.createElement($c,{onClick:L,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},C.createElement(Jne,null)),C.createElement($c,{onClick:B,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},C.createElement(Qne,null))),a&&C.createElement($c,{className:"react-flow__controls-fitview",onClick:G,title:"fit view","aria-label":"fit view"},C.createElement(eie,null)),c&&C.createElement($c,{className:"react-flow__controls-interactive",onClick:z,title:"toggle interactivity","aria-label":"toggle interactivity"},E?C.createElement(rie,null):C.createElement(tie,null)),m)};aie.displayName="Controls";var sie=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)})},lie=function(t,r){return C.createElement("circle",{cx:t,cy:t,r:t,fill:r})},Hc;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){et(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 cie=(Hc={},et(Hc,Ro.Dots,"#81818a"),et(Hc,Ro.Lines,"#eee"),Hc),uie=function(t){return t.transform},bq=function(t){var r=t.variant,n=r===void 0?Ro.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],m=v[1],b=qt(uie),w=Ke(b,3),y=w[0],_=w[1],S=w[2];C.useEffect(function(){var B=document.querySelectorAll(".react-flow__background"),G=Array.from(B).findIndex(function(z){return z===h.current});m("pattern-".concat(G))},[]);var E=o*S||1,I=y%E,N=_%E,T=n===Ro.Lines,k=c||cie[n],L=T?sie(E,s,k):lie(s*S,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:E,height:E,patternUnits:"userSpaceOnUse"},L),C.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(x,")")})))};bq.displayName="Background";var die=C.memo(bq),fie=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function hie(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&fie.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(_o(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 pie=["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 vie(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){et(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 gie=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,m=t.children,b=t.className,w=Ad(t,pie),y=C.useRef(null),_=C.useState({x:0,y:0,width:0,height:0}),S=Ke(_,2),E=S[0],I=S[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",vie({transform:"translate(".concat(r-E.width/2," ").concat(n-E.height/2,")"),className:N},w),c&&C.createElement("rect",{width:E.width+2*p[0],x:-p[0],y:-p[1],height:E.height+2*p[1],className:"react-flow__edge-textbg",style:d,rx:x,ry:x}),C.createElement("text",{className:"react-flow__edge-text",y:E.height/2,dy:"0.3em",ref:y,style:a},i),m)},mie=C.memo(gie),Dd=(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(mie,{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 Gu(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=Gu({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ke(u,2),h=d[0],p=d[1],v=Gu({pos:c,x1:o,y1:a,x2:t,y2:r}),x=Ke(v,2),m=x[0],b=x[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(p," ").concat(m,",").concat(b," ").concat(o,",").concat(a)}function bie(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=Gu({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ke(u,2),h=d[0],p=d[1],v=Gu({pos:c,x1:o,y1:a,x2:t,y2:r}),x=Ke(v,2),m=x[0],b=x[1],w=t*.125+h*.375+m*.375+o*.125,y=r*.125+p*.375+b*.375+a*.125,_=Math.abs(w-t),S=Math.abs(y-r);return[w,y,_,S]}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,m=e.style,b=e.markerEnd,w=e.markerStart,y={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},_=yq(y),S=bie(y),E=Ke(S,2),I=E[0],N=E[1];return C.createElement(Dd,{path:_,centerX:I,centerY:N,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:x,style:m,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 yie(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){et(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,m=d?0:Math.abs(o-n),b=n<o?n+m:n-m;return[x,b,v,m]}var w=Math.abs(i-r)/2,y=i<r?i+w:i-w,_=Math.abs(o-n)/2,S=o<n?o+_:o-_;return[y,S,w,_]};function vs(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,yie({},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),m=x[0],b=x[1],w=x[2],y=x[3],_=Math.min(d,Math.abs(o-t)),S=Math.min(d,Math.abs(a-r)),E=Math.min(_,S,w,y),I=[Ee.Left,Ee.Right],N=typeof h<"u"?h:m,T=typeof p<"u"?p:b,k=null,L=null;return t<=o?(k=r<=a?d0(t,T,E):g0(t,T,E),L=r<=a?b0(o,T,E):p0(o,T,E)):(k=r<a?h0(t,T,E):m0(t,T,E),L=r<a?v0(o,T,E):f0(o,T,E)),I.includes(i)&&I.includes(c)?t<=o?(k=r<=a?b0(N,r,E):p0(N,r,E),L=r<=a?d0(N,a,E):g0(N,a,E)):(i===Ee.Right&&c===Ee.Left||i===Ee.Left&&c===Ee.Right||i===Ee.Left&&c===Ee.Left)&&(k=r<=a?v0(N,r,E):f0(N,r,E),L=r<=a?h0(N,a,E):m0(N,a,E)):I.includes(i)&&!I.includes(c)?(t<=o?k=r<=a?b0(o,r,E):p0(o,r,E):k=r<=a?v0(o,r,E):f0(o,r,E),L=""):!I.includes(i)&&I.includes(c)&&(t<=o?k=r<=a?d0(t,a,E):g0(t,a,E):k=r<=a?h0(t,a,E):m0(t,a,E),L=""),"M ".concat(t,",").concat(r).concat(k).concat(L,"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,m=x===void 0?Ee.Top:x,b=e.markerEnd,w=e.markerStart,y=e.borderRadius,_=y===void 0?5:y,S=wq({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:m}),E=Ke(S,2),I=E[0],N=E[1],T=zw({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:m,borderRadius:_});return C.createElement(Dd,{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){et(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}))}),Eq=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,m=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(Dd,{path:y,centerX:w,centerY:m,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:h,markerEnd:p,markerStart:v})});function Vc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ku(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-Vc(r-i,a),c=n;break;case Ee.Right:s=r+Vc(i-r,a),c=n;break;case Ee.Top:s=r,c=n-Vc(n-o,a);break;case Ee.Bottom:s=r,c=n+Vc(o-n,a);break}return[s,c]}function jd(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=Ku({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),p=Ke(h,2),v=p[0],x=p[1],m=Ku({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),b=Ke(m,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 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=e.curvature,d=u===void 0?.25:u,h=Ku({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),p=Ke(h,2),v=p[0],x=p[1],m=Ku({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),b=Ke(m,2),w=b[0],y=b[1],_=t*.125+v*.375+w*.375+o*.125,S=r*.125+x*.375+y*.375+a*.125,E=Math.abs(_-t),I=Math.abs(S-r);return[_,S,E,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,m=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},S=jd(_),E=xie(_),I=Ke(E,2),N=I[0],T=I[1];return C.createElement(Dd,{path:S,centerX:N,centerY:T,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:x,style:m,markerEnd:b,markerStart:w})}),z_=C.createContext(null),wie=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===Ia.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 Sq(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"),m=v==null?void 0:v.classList.contains("source");if(!h||!x&&!m&&!u)return;var b=a(),w=b.onConnectStart,y=b.connectionMode,_=u||(x?"target":"source"),S=h.getBoundingClientRect(),E;s({connectionPosition:{x:t.clientX-S.left,y:t.clientY-S.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:_}),w==null||w(t,{nodeId:n,handleId:r,handleType:_});function I(T){s({connectionPosition:{x:T.clientX-S.left,y:T.clientY-S.top}});var k=Fw(T,y,o,n,r,c,p),L=k.connection,B=k.elementBelow,G=k.isValid,z=k.isHoveringHandle;if(!z)return y0(E);L.source!==L.target&&B&&(y0(E),E=B,B.classList.add("react-flow__handle-connecting"),B.classList.toggle("react-flow__handle-valid",G))}function N(T){var k=a(),L=k.onConnectStop,B=k.onConnectEnd,G=Fw(T,y,o,n,r,c,p),z=G.connection,P=G.isValid;L==null||L(T),P&&(i==null||i(z)),B==null||B(T),u&&d&&d(T),y0(E),s({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),p.removeEventListener("mousemove",I),p.removeEventListener("mouseup",N)}p.addEventListener("mousemove",I),p.addEventListener("mouseup",N)}var _ie=["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){et(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 Eie=function(){return!0},Sie=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?Eie: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,m=Ad(e,_ie),b=Rr(),w=C.useContext(z_),y=qt(Sie,Vr),_=y.connectionStartHandle,S=y.connectOnClick,E=d||null,I=n==="target",N=function(B){var G=b.getState(),z=G.defaultEdgeOptions,P=G.onConnect,K=G.hasDefaultEdges,U=x0(x0({},z),B);if(K){var re=b.getState(),X=re.edges;b.setState({edges:Bne(U,X)})}P==null||P(U),h==null||h(U)},T=function(B){B.button===0&&Sq({event:B,handleId:E,nodeId:w,onConnect:N,isTarget:I,getState:b.getState,setState:b.setState,isValidConnection:s}),x==null||x(B)},k=function(B){var G=b.getState(),z=G.onClickConnectStart,P=G.onClickConnectStop,K=G.onClickConnectEnd,U=G.connectionMode;if(!_){z==null||z(B,{nodeId:w,handleId:E,handleType:n}),b.setState({connectionStartHandle:{nodeId:w,type:n,handleId:E}});return}var re=oq(B.target),X=Fw(B,U,_.type==="target",_.nodeId,_.handleId||null,s,re),ne=X.connection,D=X.isValid;P==null||P(B),D&&N(ne),K==null||K(B),b.setState({connectionStartHandle:null})};return C.createElement("div",x0({"data-handleid":E,"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)===E&&(_==null?void 0:_.type)===n}]),onMouseDown:T,onClick:S?k:void 0,ref:t},m),p)});Oq.displayName="Handle";var Yu=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(Yu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,C.createElement(Yu,{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(Yu,{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(Yu,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};Nq.displayName="OutputNode";var Tq=C.memo(Nq),Oie=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},Cie=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 Vr(n,i)&&Vr(o,a)};function Iie(e){var t=e.onSelectionChange,r=qt(Oie,Cie),n=r.selectedNodes,i=r.selectedEdges;return C.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var Rie=C.memo(Iie),Nie=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 Li(e,t){C.useEffect(function(){typeof e<"u"&&t(e)},[e])}function gt(e,t,r){C.useEffect(function(){typeof t<"u"&&r(et({},e,t))},[t])}var Tie=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,m=t.minZoom,b=t.maxZoom,w=t.nodeExtent,y=t.onNodesChange,_=t.onEdgesChange,S=t.elementsSelectable,E=t.connectionMode,I=t.snapGrid,N=t.snapToGrid,T=t.translateExtent,k=t.connectOnClick,L=t.defaultEdgeOptions,B=t.fitView,G=t.fitViewOptions,z=t.onNodesDelete,P=t.onEdgesDelete,K=t.onNodeDrag,U=t.onNodeDragStart,re=t.onNodeDragStop,X=t.onSelectionDrag,ne=t.onSelectionDragStart,D=t.onSelectionDragStop,$=qt(Nie,Vr),Z=$.setNodes,ee=$.setEdges,A=$.setDefaultNodesAndEdges,W=$.setMinZoom,q=$.setMaxZoom,j=$.setTranslateExtent,V=$.setNodeExtent,J=$.reset,Y=Rr();return C.useEffect(function(){return A(i,o),function(){J()}},[]),gt("defaultEdgeOptions",L,Y.setState),gt("connectionMode",E,Y.setState),gt("onConnect",a,Y.setState),gt("onConnectStart",s,Y.setState),gt("onConnectStop",c,Y.setState),gt("onConnectEnd",u,Y.setState),gt("onClickConnectStart",d,Y.setState),gt("onClickConnectStop",h,Y.setState),gt("onClickConnectEnd",p,Y.setState),gt("nodesDraggable",v,Y.setState),gt("nodesConnectable",x,Y.setState),gt("elementsSelectable",S,Y.setState),gt("snapToGrid",N,Y.setState),gt("snapGrid",I,Y.setState),gt("onNodesChange",y,Y.setState),gt("onEdgesChange",_,Y.setState),gt("connectOnClick",k,Y.setState),gt("fitViewOnInit",B,Y.setState),gt("fitViewOnInitOptions",G,Y.setState),gt("onNodesDelete",z,Y.setState),gt("onEdgesDelete",P,Y.setState),gt("onNodeDrag",K,Y.setState),gt("onNodeDragStart",U,Y.setState),gt("onNodeDragStop",re,Y.setState),gt("onSelectionDrag",X,Y.setState),gt("onSelectionDragStart",ne,Y.setState),gt("onSelectionDragStop",D,Y.setState),Li(r,Z),Li(n,ee),Li(i,Z),Li(o,ee),Li(m,W),Li(b,q),Li(T,j),Li(w,V),null},Pie=".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%)}",kie=Pie,Mie=".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}",Aie=Mie,Die=function(t,r,n){return n===Ee.Left?t-r:n===Ee.Right?t+r:t},jie=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:Die(i,s,n),cy:jie(o,s,n),r:s,stroke:"transparent",fill:"transparent"})},na=(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,m=n.labelBgStyle,b=n.labelBgPadding,w=n.labelBgBorderRadius,y=n.style,_=n.source,S=n.target,E=n.sourceX,I=n.sourceY,N=n.targetX,T=n.targetY,k=n.sourcePosition,L=n.targetPosition,B=n.elementsSelectable,G=n.hidden,z=n.sourceHandleId,P=n.targetHandleId,K=n.onContextMenu,U=n.onMouseEnter,re=n.onMouseMove,X=n.onMouseLeave,ne=n.edgeUpdaterRadius,D=n.onEdgeUpdate,$=n.onEdgeUpdateStart,Z=n.onEdgeUpdateEnd,ee=n.markerEnd,A=n.markerStart,W=n.rfId,q=C.useState(!1),j=Ke(q,2),V=j[0],J=j[1],Y=Rr(),se=function(je){var Qe=Y.getState(),Ue=Qe.edges,Wt=Qe.addSelectedEdges,Ut=Ue.find(function(St){return St.id===i});B&&(Y.setState({nodesSelectionActive:!1}),Wt([i])),c==null||c(je,Ut)},te=vs(i,Y.getState,u),he=vs(i,Y.getState,K),ce=vs(i,Y.getState,U),be=vs(i,Y.getState,re),le=vs(i,Y.getState,X),ue=function(je,Qe){var Ue=Qe?S:_,Wt=(Qe?P:z)||null,Ut=Qe?"target":"source",St=function(){return!0},Nt=Qe,wr=Y.getState().edges.find(function(ar){return ar.id===i});$==null||$(je,wr,Ut);var sn=Z?function(ar){return Z(ar,wr,Ut)}:void 0,Tr=function(Nn){return D==null?void 0:D(wr,Nn)};Sq({event:je,handleId:Wt,nodeId:Ue,onConnect:Tr,isTarget:Nt,getState:Y.getState,setState:Y.setState,isValidConnection:St,elementEdgeUpdaterType:Ut,onEdgeUpdateEnd:sn})},we=function(je){return ue(je,!0)},Se=function(je){return ue(je,!1)},Ne=function(){return J(!0)},De=function(){return J(!1)},Le=C.useMemo(function(){return"url(#".concat(qw(A,W),")")},[A,W]),Ae=C.useMemo(function(){return"url(#".concat(qw(ee,W),")")},[ee,W]);if(G)return null;var Je=!B&&!c,Et=typeof D<"u",tt=an(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:d,animated:h,inactive:Je,updating:V}]);return C.createElement("g",{className:tt,onClick:se,onDoubleClick:te,onContextMenu:he,onMouseEnter:ce,onMouseMove:be,onMouseLeave:le},C.createElement(e,{id:i,source:_,target:S,selected:d,animated:h,label:p,labelStyle:v,labelShowBg:x,labelBgStyle:m,labelBgPadding:b,labelBgBorderRadius:w,data:s,style:y,sourceX:E,sourceY:I,targetX:N,targetY:T,sourcePosition:k,targetPosition:L,sourceHandleId:z,targetHandleId:P,markerStart:Le,markerEnd:Ae,"data-testid":"rf__edge-".concat(i)}),Et&&C.createElement("g",{onMouseDown:we,onMouseEnter:Ne,onMouseOut:De},C.createElement(Z5,{position:k,centerX:E,centerY:I,radius:ne})),Et&&C.createElement("g",{onMouseDown:Se,onMouseEnter:Ne,onMouseOut:De},C.createElement(Z5,{position:L,centerX:N,centerY:T,radius:ne})))};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){et(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 qie(e){var t={default:na(e.default||Bw),straight:na(e.bezier||Eq),step:na(e.step||_q),smoothstep:na(e.step||L_),simplebezier:na(e.simplebezier||xq)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=na(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 Lie=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 zie(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=Uu({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 Bie=typeof document<"u"?document:null,Xu=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:Bie},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,m){return x.concat.apply(x,_o(m))},[]);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])},m=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",m),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",m)}}},[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 Fie=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},$ie=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Rr(),i=qt(Fie,Vr),o=i.onNodesChange,a=i.onEdgesChange,s=Xu(t),c=Xu(r);C.useEffect(function(){var u=n.getState(),d=u.nodeInternals,h=u.edges,p=u.hasDefaultNodes,v=u.hasDefaultEdges,x=u.onNodesDelete,m=u.onEdgesDelete,b=Array.from(d.values()),w=b.reduce(function(T,k){return(!k.selected&&k.parentNode&&T.find(function(L){return L.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),S=[].concat(_o(y),_o(_)),E=S.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!E.includes(T.id)})}),p&&(w.forEach(function(T){d.delete(T.id)}),n.setState({nodeInternals:new Map(d)}))),E.length>0&&(m==null||m(S),a)){var I=E.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 Hie(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 Vie=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}},Wc=function(t,r){return t.target.closest(".".concat(r))},Wie=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},Uie=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?va.Free:v,m=t.zoomOnDoubleClick,b=m===void 0?!0:m,w=t.selectionKeyPressed,y=t.elementsSelectable,_=t.panOnDrag,S=_===void 0?!0:_,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,k=T===void 0?1:T,L=t.defaultPosition,B=L===void 0?[0,0]:L,G=t.zoomActivationKeyCode,z=t.preventScrolling,P=z===void 0?!0:z,K=t.children,U=t.noWheelClassName,re=t.noPanClassName,X=Rr(),ne=C.useRef(!1),D=C.useRef(null),$=C.useRef({x:0,y:0,zoom:0}),Z=qt(Wie,Vr),ee=Z.d3Zoom,A=Z.d3Selection,W=Z.d3ZoomHandler,q=Xu(G);return Hie(D),C.useEffect(function(){if(D.current){var j,V=Tne().scaleExtent([I,N]).translateExtent(E),J=jn(D.current).call(V),Y=ga(B[0],E[0][0],E[1][0]),se=ga(B[1],E[0][1],E[1][1]),te=ga(k,I,N),he=wo.translate(Y,se).scale(te);V.transform(J,he),X.setState({d3Zoom:V,d3Selection:J,d3ZoomHandler:J.on("wheel.zoom"),transform:[Y,se,te],domNode:(j=J.node())===null||j===void 0?void 0:j.closest(".react-flow")})}},[]),C.useEffect(function(){A&&ee&&(d&&!q?A.on("wheel",function(j){if(Wc(j,U))return!1;j.preventDefault(),j.stopImmediatePropagation();var V=A.property("__zoom").k||1;if(j.ctrlKey&&c){var J=Jn(j),Y=-j.deltaY*(j.deltaMode===1?.05:j.deltaMode?1:.002)*10,se=V*Math.pow(2,Y);ee.scaleTo(A,se,J);return}var te=j.deltaMode===1?20:1,he=x===va.Vertical?0:j.deltaX*te,ce=x===va.Horizontal?0:j.deltaY*te;ee.translateBy(A,-(he/V)*p,-(ce/V)*p)}).on("wheel.zoom",null):typeof W<"u"&&A.on("wheel",function(j){if(!P||Wc(j,U))return null;j.preventDefault()}).on("wheel.zoom",W))},[d,x,A,ee,W,q,c,P,U]),C.useEffect(function(){ee&&(w&&!ne.current?ee.on("zoom",null):w||ee.on("zoom",function(j){if(X.setState({transform:[j.transform.x,j.transform.y,j.transform.k]}),r){var V=w0(j.transform);r(j.sourceEvent,V)}}))},[w,ee,r]),C.useEffect(function(){ee&&ee.on("start",function(j){if(ne.current=!0,n){var V=w0(j.transform);$.current=V,n(j.sourceEvent,V)}})},[ee,n]),C.useEffect(function(){ee&&ee.on("end",function(j){if(ne.current=!1,i&&Vie($.current,j.transform)){var V=w0(j.transform);$.current=V,i(j.sourceEvent,V)}})},[ee,i]),C.useEffect(function(){ee&&ee.filter(function(j){var V=q||a,J=c&&j.ctrlKey;return!S&&!V&&!d&&!b&&!c||w||!b&&j.type==="dblclick"||Wc(j,U)&&j.type==="wheel"||Wc(j,re)&&j.type!=="wheel"||!c&&j.ctrlKey&&j.type==="wheel"||!V&&!d&&!J&&j.type==="wheel"||!S&&(j.type==="mousedown"||j.type==="touchstart")?!1:(!j.ctrlKey||j.type==="wheel")&&!j.button})},[ee,a,c,d,b,S,w,y,q]),C.createElement("div",{className:"react-flow__renderer react-flow__container",ref:D},K)};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){et(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 Gie=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},cP={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},Kie=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=qt(Gie,Vr),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},m=function(S){var E=S.target.closest(".react-flow");o.current=E.getBoundingClientRect();var I=lP(S,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(S){var E,I;if(!(!t||!c.draw||!o.current)){var N=lP(S,o.current),T=(E=c.startX)!==null&&E!==void 0?E:0,k=(I=c.startY)!==null&&I!==void 0?I:0,L=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)}),B=r.getState(),G=B.nodeInternals,z=B.edges,P=B.transform,K=B.onNodesChange,U=B.onEdgesChange,re=Array.from(G.values()),X=fq(G,L,P,!1,!0),ne=hq(X,z).map(function(ee){return ee.id}),D=X.map(function(ee){return ee.id});if(n.current!==D.length){n.current=D.length;var $=ua(re,D);$.length&&(K==null||K($))}if(i.current!==ne.length){i.current=ne.length;var Z=ua(z,ne);Z.length&&(U==null||U(Z))}u(L)}},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:m,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){et(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 Yie(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 Xie(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,m,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||(m=b.positionAbsolute)===null||m===void 0?void 0:m.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 S,E,I,N,T=i.get(e.parentNode);_={x:(S=T==null||(E=T.positionAbsolute)===null||E===void 0?void 0:E.x)!==null&&S!==void 0?S: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 E0(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(),m=C.useRef({x:null,y:null}),b=C.useCallback(function(w){var y=w.sourceEvent,_=v.getState(),S=_.transform,E=_.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},S,I,E);return k},[]);return C.useEffect(function(){if(t!=null&&t.current){var w=jn(t.current);if(n)w.on(".drag",null);else{var y=Bte().on("start",function(_){var S=v.getState(),E=S.nodeInternals,I=S.multiSelectionActive,N=S.unselectNodesAndEdges,T=S.onNodeDragStart,k=S.onSelectionDragStart,L=a?T:E0(k);if(!c&&!I&&a){var B;(B=E.get(a))!==null&&B!==void 0&&B.selected||N()}a&&s&&c&&uq({id:a,store:v});var G=b(_);if(m.current=G,x.current=Yie(E,G,a),L&&x.current){var z=_0({nodeId:a,dragItems:x.current,nodeInternals:E}),P=Ke(z,2),K=P[0],U=P[1];L(_.sourceEvent,K,U)}}).on("drag",function(_){var S=v.getState(),E=S.updateNodePositions,I=S.snapToGrid,N=S.snapGrid,T=S.nodeInternals,k=S.nodeExtent,L=S.onNodeDrag,B=S.onSelectionDrag,G=b(_);if((m.current.x!==G.x||m.current.y!==G.y)&&x.current){m.current=G,x.current=x.current.map(function(X){return Xie(X,G,I,N,T,k)});var z=a?L:E0(B);if(E(x.current,!0,!0),p(!0),z){var P=_0({nodeId:a,dragItems:x.current,nodeInternals:T}),K=Ke(P,2),U=K[0],re=K[1];z(_.sourceEvent,U,re)}}_.on("end",function(X){if(p(!1),x.current){var ne=v.getState(),D=ne.updateNodePositions,$=ne.nodeInternals,Z=ne.onNodeDragStop,ee=ne.onSelectionDragStop,A=a?Z:E0(ee);if(D(x.current,!1,!1),A){var W=_0({nodeId:a,dragItems:x.current,nodeInternals:$}),q=Ke(W,2),j=q[0],V=q[1];A(X.sourceEvent,j,V)}}})}).filter(function(_){var S=_.target,E=!_.button&&(!i||!fP(S,".".concat(i),t))&&(!o||fP(S,o,t));return E});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 Zie(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){et(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 Jie=function(t){return Zie({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})))},Qie=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return j_(r)};function eoe(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Rr(),i=qt(Jie,Vr),o=i.transformString,a=i.userSelectionActive,s=qt(Qie,Vr),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 m=Array.from(n.getState().nodeInternals.values()).filter(function(b){return b.selected});t(x,m)}: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 toe=C.memo(eoe),roe=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,m=t.zoomOnPinch,b=t.panOnScroll,w=t.panOnScrollSpeed,y=t.panOnScrollMode,_=t.zoomOnDoubleClick,S=t.panOnDrag,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,k=t.defaultPosition,L=t.preventScrolling,B=t.onSelectionContextMenu,G=t.noWheelClassName,z=t.noPanClassName,P=Rr(),K=qt(roe),U=Xu(d);$ie({deleteKeyCode:a,multiSelectionKeyCode:h});var re=function($){n==null||n($),P.getState().resetSelectedElements(),P.setState({nodesSelectionActive:!1})},X=i?function(D){return i(D)}:void 0,ne=o?function(D){return o(D)}:void 0;return C.createElement(Uie,{onMove:s,onMoveStart:c,onMoveEnd:u,selectionKeyPressed:U,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:m,panOnScroll:b,panOnScrollSpeed:w,panOnScrollMode:y,zoomOnDoubleClick:_,panOnDrag:S,translateExtent:E,minZoom:I,maxZoom:N,defaultZoom:T,defaultPosition:k,zoomActivationKeyCode:p,preventScrolling:L,noWheelClassName:G,noPanClassName:z},r,C.createElement(Kie,{selectionKeyPressed:U}),K&&C.createElement(toe,{onSelectionContextMenu:B,noPanClassName:z}),C.createElement("div",{className:"react-flow__pane react-flow__container",onClick:re,onContextMenu:X,onWheel:ne}))};Mq.displayName="FlowRenderer";var noe=C.memo(Mq);function ioe(e){var t=qt(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 ooe=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},Aq=function(t){var r=qt(ooe,Vr),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,s=ioe(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,m,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,S=!!(d.draggable||n&&typeof d.draggable>"u"),E=!!(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:S,isSelectable:E,isConnectable:I,resizeObserver:u,dragHandle:d.dragHandle,zIndex:(m=(b=d[fr])===null||b===void 0?void 0:b.z)!==null&&m!==void 0?m: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 aoe=C.memo(Aq),ia;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){et(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 soe=(ia={},et(ia,Ee.Left,Ee.Right),et(ia,Ee.Right,Ee.Left),et(ia,Ee.Top,Ee.Bottom),et(ia,Ee.Bottom,Ee.Top),ia),loe=(function(e){var t,r,n,i,o,a=e.connectionNodeId,s=e.connectionHandleType,c=e.connectionLineStyle,u=e.connectionLineType,d=u===void 0?Vi.Bezier:u,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=qt(C.useCallback(function(ne){return{fromNode:ne.nodeInternals.get(a),handleId:ne.connectionHandleId,toX:(ne.connectionPosition.x-ne.transform[0])/ne.transform[2],toY:(ne.connectionPosition.y-ne.transform[1])/ne.transform[2]}},[a]),Vr),x=v.fromNode,m=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],S=m?_.find(function(ne){return ne.id===m}):_[0],E=S?S.x+S.width/2:((r=x==null?void 0:x.width)!==null&&r!==void 0?r:0)/2,I=S?S.y+S.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)+E,T=((x==null||(o=x.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+I,k=S==null?void 0:S.position;if(!k)return null;var L=soe[k],B,G,z,P,K,U;switch(s){case"source":B=N,G=T,z=k,P=b,K=w,U=L;break;case"target":B=b,G=w,z=L,P=N,K=T,U=k;break}if(p)return C.createElement("g",{className:"react-flow__connection"},C.createElement(p,{connectionLineType:d,connectionLineStyle:c,fromNode:x,fromHandle:S,fromX:N,fromY:T,toX:b,toY:w,fromPosition:k,toPosition:L,sourcePosition:z,targetPosition:U,sourceNode:x,sourceHandle:S,targetX:P,targetY:K,sourceX:B,sourceY:G}));var re="",X={sourceX:B,sourceY:G,sourcePosition:z,targetX:P,targetY:K,targetPosition:U};return d===Vi.Bezier?re=jd(X):d===Vi.Step?re=zw(vP(vP({},X),{},{borderRadius:0})):d===Vi.SmoothStep?re=zw(X):d===Vi.SimpleBezier?re=yq(X):re="M".concat(B,",").concat(G," ").concat(P,",").concat(K),C.createElement("g",{className:"react-flow__connection"},C.createElement("path",{d:re,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 Uc,coe=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"})},uoe=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=(Uc={},et(Uc,Wu.Arrow,coe),et(Uc,Wu.ArrowClosed,uoe),Uc);function doe(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 foe(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){et(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 hoe=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=doe(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}))},poe=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(foe({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=qt(C.useCallback(poe({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(hoe,{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 voe=C.memo(Dq),goe=[{level:0,isMaxLevel:!0,edges:[]}];function moe(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?goe:o}function boe(e,t,r){var n=qt(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)&&zie({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 moe(n,t,r)}var yoe=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=qt(yoe,Vr),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=boe(t.onlyRenderVisibleElements,d,t.elevateEdgesOnSelect);if(!s)return null;var p=t.connectionLineType,v=t.defaultMarkerColor,x=t.connectionLineStyle,m=t.connectionLineComponent,b=t.connectionLineContainerStyle,w=n&&i;return C.createElement(C.Fragment,null,h.map(function(y){var _=y.level,S=y.edges,E=y.isMaxLevel;return C.createElement("svg",{key:_,style:{zIndex:_},width:s,height:c,className:"react-flow__edges react-flow__container"},E&&C.createElement(voe,{defaultColor:v,rfId:t.rfId}),C.createElement("g",null,S.map(function(I){var N=rP(d,I.source),T=Ke(N,3),k=T[0],L=T[1],B=T[2],G=rP(d,I.target),z=Ke(G,3),P=z[0],K=z[1],U=z[2];if(!B||!U)return null;var re=I.type||"default";t.edgeTypes[re]||(console.warn('[React Flow]: Edge type "'.concat(re,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),re="default");var X=t.edgeTypes[re]||t.edgeTypes.default,ne=u===Ia.Strict?K.target:K.target||K.source,D=tP(L.source,I.sourceHandle||null),$=tP(ne,I.targetHandle||null),Z=(D==null?void 0:D.position)||Ee.Bottom,ee=($==null?void 0:$.position)||Ee.Top;if(!D)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(!$)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 A=Lie(k,D,Z,P,$,ee),W=A.sourceX,q=A.sourceY,j=A.targetX,V=A.targetY;return C.createElement(X,{key:I.id,id:I.id,className:an([I.className,t.noPanClassName]),type:re,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:W,sourceY:q,targetX:j,targetY:V,sourcePosition:Z,targetPosition:ee,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(loe,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:x,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:m})))};jq.displayName="EdgeRenderer";var xoe=C.memo(jq),woe=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function _oe(e){var t=e.children,r=qt(woe);return C.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function Eoe(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,m=t.onNodeContextMenu,b=t.onSelectionContextMenu,w=t.connectionLineType,y=t.connectionLineStyle,_=t.connectionLineComponent,S=t.connectionLineContainerStyle,E=t.selectionKeyCode,I=t.multiSelectionKeyCode,N=t.zoomActivationKeyCode,T=t.deleteKeyCode,k=t.onlyRenderVisibleElements,L=t.elementsSelectable,B=t.selectNodesOnDrag,G=t.translateExtent,z=t.minZoom,P=t.maxZoom,K=t.defaultZoom,U=t.defaultPosition,re=t.preventScrolling,X=t.defaultMarkerColor,ne=t.zoomOnScroll,D=t.zoomOnPinch,$=t.panOnScroll,Z=t.panOnScrollSpeed,ee=t.panOnScrollMode,A=t.zoomOnDoubleClick,W=t.panOnDrag,q=t.onPaneClick,j=t.onPaneScroll,V=t.onPaneContextMenu,J=t.onEdgeUpdate,Y=t.onEdgeContextMenu,se=t.onEdgeMouseEnter,te=t.onEdgeMouseMove,he=t.onEdgeMouseLeave,ce=t.edgeUpdaterRadius,be=t.onEdgeUpdateStart,le=t.onEdgeUpdateEnd,ue=t.noDragClassName,we=t.noWheelClassName,Se=t.noPanClassName,Ne=t.elevateEdgesOnSelect,De=t.id;return Eoe(s),C.createElement(noe,{onPaneClick:q,onPaneContextMenu:V,onPaneScroll:j,deleteKeyCode:T,selectionKeyCode:E,multiSelectionKeyCode:I,zoomActivationKeyCode:N,elementsSelectable:L,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:ne,zoomOnPinch:D,zoomOnDoubleClick:A,panOnScroll:$,panOnScrollSpeed:Z,panOnScrollMode:ee,panOnDrag:W,translateExtent:G,minZoom:z,maxZoom:P,defaultZoom:K,defaultPosition:U,onSelectionContextMenu:b,preventScrolling:re,noDragClassName:ue,noWheelClassName:we,noPanClassName:Se},C.createElement(_oe,null,C.createElement(xoe,{edgeTypes:n,onEdgeClick:u,onEdgeDoubleClick:h,connectionLineType:w,connectionLineStyle:y,connectionLineComponent:_,connectionLineContainerStyle:S,onEdgeUpdate:J,onlyRenderVisibleElements:k,onEdgeContextMenu:Y,onEdgeMouseEnter:se,onEdgeMouseMove:te,onEdgeMouseLeave:he,onEdgeUpdateStart:be,onEdgeUpdateEnd:le,edgeUpdaterRadius:ce,defaultMarkerColor:X,noPanClassName:Se,elevateEdgesOnSelect:!!Ne,rfId:De}),C.createElement(aoe,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:d,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:x,onNodeContextMenu:m,selectNodesOnDrag:B,onlyRenderVisibleElements:k,noPanClassName:Se,noDragClassName:ue})))};qq.displayName="GraphView";var Soe=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){et(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 gs=(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,m=n.onDoubleClick,b=n.style,w=n.className,y=n.isDraggable,_=n.isSelectable,S=n.isConnectable,E=n.selectNodesOnDrag,I=n.sourcePosition,N=n.targetPosition,T=n.hidden,k=n.resizeObserver,L=n.dragHandle,B=n.zIndex,G=n.isParent,z=n.noPanClassName,P=n.noDragClassName,K=n.initialized,U=Rr(),re=C.useRef(null),X=C.useRef(I),ne=C.useRef(N),D=C.useRef(o),$=_||y||d||h||p||v,Z=ps(i,U.getState,h),ee=ps(i,U.getState,p),A=ps(i,U.getState,v),W=ps(i,U.getState,x),q=ps(i,U.getState,m),j=function(Y){if(_&&(!E||!y)&&uq({id:i,store:U}),d){var se=U.getState().nodeInternals.get(i);d(Y,yP({},se))}};C.useEffect(function(){if(re.current&&!T){var J=re.current;return k==null||k.observe(J),function(){return k==null?void 0:k.unobserve(J)}}},[T]),C.useEffect(function(){var J=D.current!==o,Y=X.current!==I,se=ne.current!==N;re.current&&(J||Y||se)&&(J&&(D.current=o),Y&&(X.current=I),se&&(ne.current=N),U.getState().updateNodeDimensions([{id:i,nodeElement:re.current,forceUpdate:!0}]))},[i,o,I,N]);var V=kq({nodeRef:re,disabled:T||!y,noDragClassName:P,handleSelector:L,nodeId:i,isSelectable:_,selectNodesOnDrag:E});return T?null:C.createElement("div",{className:an(["react-flow__node","react-flow__node-".concat(o),z,w,{selected:u,selectable:_,parent:G}]),ref:re,style:yP({zIndex:B,transform:"translate(".concat(s,"px,").concat(c,"px)"),pointerEvents:$?"all":"none",visibility:K?"visible":"hidden"},b),onMouseEnter:Z,onMouseMove:ee,onMouseLeave:A,onContextMenu:W,onClick:j,onDoubleClick:q,"data-testid":"rf__node-".concat(i),"data-id":i},C.createElement(wie,{value:i},C.createElement(e,{id:i,data:a,type:o,xPos:s,yPos:c,selected:u,isConnectable:S,sourcePosition:I,targetPosition:N,dragging:V,dragHandle:L,zIndex:B})))};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){et(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 Ooe(e){var t={input:gs(e.input||Rq),default:gs(e.default||$w),output:gs(e.output||Tq),group:gs(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]=gs(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);Vr(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 EP(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(Hne,{createStore:Vne},r)};zq.displayName="ReactFlowWrapper";var Coe=["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 SP(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?SP(Object(r),!0).forEach(function(n){et(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}EP(kie),EP(Aie);var Ioe={input:Rq,default:$w,output:Tq},Roe={default:Bw,straight:Eq,step:_q,smoothstep:L_,simplebezier:xq},Noe=[15,15],Toe=[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?Ioe:s,u=e.edgeTypes,d=u===void 0?Roe:u,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,x=e.onMove,m=e.onMoveStart,b=e.onMoveEnd,w=e.onConnect,y=e.onConnectStart,_=e.onConnectStop,S=e.onConnectEnd,E=e.onClickConnectStart,I=e.onClickConnectStop,N=e.onClickConnectEnd,T=e.onNodeMouseEnter,k=e.onNodeMouseMove,L=e.onNodeMouseLeave,B=e.onNodeContextMenu,G=e.onNodeDoubleClick,z=e.onNodeDragStart,P=e.onNodeDrag,K=e.onNodeDragStop,U=e.onNodesDelete,re=e.onEdgesDelete,X=e.onSelectionChange,ne=e.onSelectionDragStart,D=e.onSelectionDrag,$=e.onSelectionDragStop,Z=e.onSelectionContextMenu,ee=e.connectionMode,A=ee===void 0?Ia.Strict:ee,W=e.connectionLineType,q=W===void 0?Vi.Bezier:W,j=e.connectionLineStyle,V=e.connectionLineComponent,J=e.connectionLineContainerStyle,Y=e.deleteKeyCode,se=Y===void 0?"Backspace":Y,te=e.selectionKeyCode,he=te===void 0?"Shift":te,ce=e.multiSelectionKeyCode,be=ce===void 0?"Meta":ce,le=e.zoomActivationKeyCode,ue=le===void 0?"Meta":le,we=e.snapToGrid,Se=we===void 0?!1:we,Ne=e.snapGrid,De=Ne===void 0?Noe:Ne,Le=e.onlyRenderVisibleElements,Ae=Le===void 0?!1:Le,Je=e.selectNodesOnDrag,Et=Je===void 0?!0:Je,tt=e.nodesDraggable,Be=e.nodesConnectable,je=e.elementsSelectable,Qe=e.minZoom,Ue=Qe===void 0?.5:Qe,Wt=e.maxZoom,Ut=Wt===void 0?2:Wt,St=e.defaultZoom,Nt=St===void 0?1:St,wr=e.defaultPosition,sn=wr===void 0?Toe:wr,Tr=e.translateExtent,ar=Tr===void 0?Lw:Tr,Nn=e.preventScrolling,Tn=Nn===void 0?!0:Nn,kt=e.nodeExtent,Mt=e.defaultMarkerColor,At=Mt===void 0?"#b1b1b7":Mt,sr=e.zoomOnScroll,Lt=sr===void 0?!0:sr,zt=e.zoomOnPinch,lr=zt===void 0?!0:zt,Ur=e.panOnScroll,pt=Ur===void 0?!1:Ur,Gt=e.panOnScrollSpeed,Kt=Gt===void 0?.5:Gt,rr=e.panOnScrollMode,vr=rr===void 0?va.Free:rr,cr=e.zoomOnDoubleClick,Fe=cr===void 0?!0:cr,bt=e.panOnDrag,Bt=bt===void 0?!0:bt,Ft=e.onPaneClick,gr=e.onPaneScroll,Pr=e.onPaneContextMenu,ln=e.children,cn=e.onEdgeUpdate,un=e.onEdgeContextMenu,dn=e.onEdgeDoubleClick,si=e.onEdgeMouseEnter,Qi=e.onEdgeMouseMove,Qd=e.onEdgeMouseLeave,ef=e.onEdgeUpdateStart,tf=e.onEdgeUpdateEnd,eo=e.edgeUpdaterRadius,rf=eo===void 0?10:eo,jo=e.onNodesChange,nf=e.onEdgesChange,Tl=e.noDragClassName,of=Tl===void 0?"nodrag":Tl,$a=e.noWheelClassName,Pl=$a===void 0?"nowheel":$a,Ha=e.noPanClassName,af=Ha===void 0?"nopan":Ha,kl=e.fitView,sf=kl===void 0?!1:kl,lf=e.fitViewOptions,Va=e.connectOnClick,Ml=Va===void 0?!0:Va,Al=e.attributionPosition,Wa=e.proOptions,cf=e.defaultEdgeOptions,Ua=e.elevateEdgesOnSelect,qo=Ua===void 0?!1:Ua,to=Ad(e,Coe),uf=_P(c,Ooe),Dl=_P(d,qie);return C.createElement("div",OP(OP({},to),{},{ref:t,className:an(["react-flow",a])}),C.createElement(zq,null,C.createElement(Soe,{onInit:v,onMove:x,onMoveStart:m,onMoveEnd:b,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:T,onNodeMouseMove:k,onNodeMouseLeave:L,onNodeContextMenu:B,onNodeDoubleClick:G,nodeTypes:uf,edgeTypes:Dl,connectionLineType:q,connectionLineStyle:j,connectionLineComponent:V,connectionLineContainerStyle:J,selectionKeyCode:he,deleteKeyCode:se,multiSelectionKeyCode:be,zoomActivationKeyCode:ue,onlyRenderVisibleElements:Ae,selectNodesOnDrag:Et,translateExtent:ar,minZoom:Ue,maxZoom:Ut,defaultZoom:Nt,defaultPosition:sn,preventScrolling:Tn,zoomOnScroll:Lt,zoomOnPinch:lr,zoomOnDoubleClick:Fe,panOnScroll:pt,panOnScrollSpeed:Kt,panOnScrollMode:vr,panOnDrag:Bt,onPaneClick:Ft,onPaneScroll:gr,onPaneContextMenu:Pr,onSelectionContextMenu:Z,onEdgeUpdate:cn,onEdgeContextMenu:un,onEdgeDoubleClick:dn,onEdgeMouseEnter:si,onEdgeMouseMove:Qi,onEdgeMouseLeave:Qd,onEdgeUpdateStart:ef,onEdgeUpdateEnd:tf,edgeUpdaterRadius:rf,defaultMarkerColor:At,noDragClassName:of,noWheelClassName:Pl,noPanClassName:af,elevateEdgesOnSelect:qo,id:to==null?void 0:to.id}),C.createElement(Tie,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:w,onConnectStart:y,onConnectStop:_,onConnectEnd:S,onClickConnectStart:E,onClickConnectStop:I,onClickConnectEnd:N,nodesDraggable:tt,nodesConnectable:Be,elementsSelectable:je,minZoom:Ue,maxZoom:Ut,nodeExtent:kt,onNodesChange:jo,onEdgesChange:nf,snapToGrid:Se,snapGrid:De,connectionMode:A,translateExtent:ar,connectOnClick:Ml,defaultEdgeOptions:cf,fitView:sf,fitViewOptions:lf,onNodesDelete:U,onEdgesDelete:re,onNodeDragStart:z,onNodeDrag:P,onNodeDragStop:K,onSelectionDrag:D,onSelectionDragStart:ne,onSelectionDragStop:$}),X&&C.createElement(Rie,{onSelectionChange:X}),ln,C.createElement(hie,{proOptions:Wa,position:Al})))});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 Poe=Fq(lq),koe=Fq(jne);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)),m=x*p,b=x*v,w=a*(m+b)+c,y=s*(-m+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 Moe=({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=jd({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})]})},Aoe=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=qt(C.useCallback(x=>x.nodeInternals.get(t),[t])),a=qt(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=jd({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,Doe={custom:Aoe},joe=(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}},qoe=()=>{},Loe=({data:e,dict:t,onSelect:r=qoe})=>{const{nodes:n,edges:i}=joe(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]=Poe(n),[c,u,d]=koe(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:Doe,connectionLineComponent:Moe,children:O.jsx(die,{variant:Ro.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},zoe=(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=zoe(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,m]=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),S=v.indexOf(y.type);return _>S?1:-1}),b.type=m?b.type:p.type,[...h].sort((w,y)=>{const _=v.indexOf(w.type),S=v.indexOf(y.type);return _>S?1:-1})):[...h,{prefix:x,type:m?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const Boe=(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,m,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=!!((m=t.dataClasses[a])!=null&&m.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 S0={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 Foe(){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})()})(S0)),S0.exports}var $oe=Foe();const rn=Yi($oe);var Ls={exports:{}};/**
43
+ */var SN;function eZ(){return SN||(SN=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(fe){return!!(typeof fe=="string"||typeof fe=="function"||fe===r||fe===i||fe===y||fe===n||fe===l||fe===d||fe===x||w||typeof fe=="object"&&fe!==null&&(fe.$$typeof===h||fe.$$typeof===f||fe.$$typeof===o||fe.$$typeof===a||fe.$$typeof===u||fe.$$typeof===m||fe.$$typeof===p||fe[0]===v))}function _(fe){if(typeof fe=="object"&&fe!==null){var V=fe.$$typeof;switch(V){case e:var ee=fe.type;switch(ee){case r:case i:case n:case l:case d:return ee;default:var we=ee&&ee.$$typeof;switch(we){case a:case u:case h:case f:case o:return we;default:return V}}case t:return V}}}var S=a,R=o,I=e,P=u,A=r,k=h,L=f,$=t,j=i,D=n,G=l,B=!1,Y=!1;function Z(fe){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function te(fe){return Y||(Y=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function U(fe){return _(fe)===a}function re(fe){return _(fe)===o}function ae(fe){return typeof fe=="object"&&fe!==null&&fe.$$typeof===e}function le(fe){return _(fe)===u}function F(fe){return _(fe)===r}function W(fe){return _(fe)===h}function J(fe){return _(fe)===f}function H(fe){return _(fe)===t}function K(fe){return _(fe)===i}function se(fe){return _(fe)===n}function oe(fe){return _(fe)===l}Qe.ContextConsumer=S,Qe.ContextProvider=R,Qe.Element=I,Qe.ForwardRef=P,Qe.Fragment=A,Qe.Lazy=k,Qe.Memo=L,Qe.Portal=$,Qe.Profiler=j,Qe.StrictMode=D,Qe.Suspense=G,Qe.isAsyncMode=Z,Qe.isConcurrentMode=te,Qe.isContextConsumer=U,Qe.isContextProvider=re,Qe.isElement=ae,Qe.isForwardRef=le,Qe.isFragment=F,Qe.isLazy=W,Qe.isMemo=J,Qe.isPortal=H,Qe.isProfiler=K,Qe.isStrictMode=se,Qe.isSuspense=oe,Qe.isValidElementType=E,Qe.typeOf=_})()),Qe}var ON;function tZ(){return ON||(ON=1,process.env.NODE_ENV==="production"?_u.exports=QX():_u.exports=eZ()),_u.exports}var CN=tZ();function RN(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function IN(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Gm(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return IN(r.overflowY,t)||IN(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 Eu(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 rZ=function(e,t){var r=window,n=t.inline,i=t.boundary,o=t.skipOverflowHiddenElements,a=typeof i=="function"?i:function(V){return V!==i};if(!RN(e))throw new TypeError("Invalid target");for(var u,l,d=document.scrollingElement||document.documentElement,f=[],h=e;RN(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&&Gm(h)&&!Gm(document.documentElement)||h!=null&&Gm(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,P=n==="center"?R+w/2:n==="end"?_:R,A=[],k=0;k<f.length;k++){var L=f[k],$=L.getBoundingClientRect(),j=$.height,D=$.width,G=$.top,B=$.right,Y=$.bottom,Z=$.left;if(E>=0&&R>=0&&S<=v&&_<=p&&E>=G&&S<=Y&&R>=Z&&_<=B)return A;var te=getComputedStyle(L),U=parseInt(te.borderLeftWidth,10),re=parseInt(te.borderTopWidth,10),ae=parseInt(te.borderRightWidth,10),le=parseInt(te.borderBottomWidth,10),F=0,W=0,J="offsetWidth"in L?L.offsetWidth-L.clientWidth-U-ae:0,H="offsetHeight"in L?L.offsetHeight-L.clientHeight-re-le:0,K="offsetWidth"in L?L.offsetWidth===0?0:D/L.offsetWidth:0,se="offsetHeight"in L?L.offsetHeight===0?0:j/L.offsetHeight:0;if(d===L)F=Eu(y,y+v,v,re,le,y+I,y+I+b,b),W=n==="start"?P:n==="center"?P-p/2:n==="end"?P-p:Eu(m,m+p,p,U,ae,m+P,m+P+w,w),F=Math.max(0,F+y),W=Math.max(0,W+m);else{F=Eu(G,Y,j,re,le+H,I,I+b,b),W=n==="start"?P-Z-U:n==="center"?P-(Z+D/2)+J/2:n==="end"?P-B+ae+J:Eu(Z,B,D,U,ae+J,P,P+w,w);var oe=L.scrollLeft,fe=L.scrollTop;I+=fe-(F=Math.max(0,Math.min(fe+F/se,L.scrollHeight-j/se+H))),P+=oe-(W=Math.max(0,Math.min(oe+W/K,L.scrollWidth-D/K+J)))}A.push({el:L,top:F,left:W})}return A},sl=function(){return sl=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},sl.apply(this,arguments)};let nZ=0;function PN(e){return typeof e=="function"?e:xr}function xr(){}function Bq(e,t){if(!e)return;rZ(e,{boundary:t}).forEach(n=>{let{el:i,top:o,left:a}=n;i.scrollTop=o,i.scrollLeft=a})}function NN(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function rw(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 fi(){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 Fq(){return String(nZ++)}function $q(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 TN(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function zq(e){return typeof e.type=="string"}function Hq(e){return e.props}function iZ(e,t){console.error(`The property "${t}" is required in "${e}"`)}const oZ=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Su(e){e===void 0&&(e={});const t={};return oZ.forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function ul(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=ll(t,n)?t[n]:e[n],r),{})}function ll(e,t){return e[t]!==void 0}function ex(e){const{key:t,keyCode:r}=e;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?`Arrow${t}`:t}function aZ(e){return Object.prototype.toString.call(e)==="[object Object]"}function go(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=Si(e,a,r,n,i);return u===-1?t>=r?-1:t:u}function Si(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?Si(1,0,r,n,!1):Si(-1,r-1,r,n,!1):-1}function cl(e,t,r,n){return n===void 0&&(n=!0),t.some(i=>i&&(NN(i,e,r)||n&&NN(i,r.document.activeElement,r)))}let nw=xr;process.env.NODE_ENV!=="production"&&(nw=(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 sZ=rw(e=>{Uq(e).textContent=""},500);function Vq(e,t){const r=Uq(t);e&&(r.textContent=e,sZ(t))}function Uq(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 Wq=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,Gq=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Kq=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,ku=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Lu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,Yq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Xq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Zq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Jq=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,Qq=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,ek=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,tk=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,rk=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,tx=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,nk=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,ik=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,ok=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var uZ=Object.freeze({__proto__:null,unknown:Wq,mouseUp:Gq,itemMouseEnter:Kq,keyDownArrowUp:ku,keyDownArrowDown:Lu,keyDownEscape:Yq,keyDownEnter:Xq,keyDownHome:Zq,keyDownEnd:Jq,clickItem:Qq,blurInput:ek,changeInput:tk,keyDownSpaceButton:rk,clickButton:tx,blurButton:nk,controlledPropUpdatedSelectedItem:ik,touchEnd:ok});const lZ=(()=>{class e extends T.Component{constructor(r){var n;super(r),n=this,this.id=this.props.id||`downshift-${Fq()}`,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=Su(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=Su(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||Wq,Object.keys(w).forEach(_=>{b[_]!==w[_]&&(y[_]=w[_]),_!=="type"&&(w[_],ll(this.props,_)||(E[_]=w[_]))}),x&&w.hasOwnProperty("inputValue")&&this.props.onInputValueChange(w.inputValue,{...this.getStateAndHelpers(),...w}),E},()=>{PN(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]:fi(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:Lu})}else this.internalSetState({isOpen:!0,type:Lu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=go(1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Lu})}})},ArrowUp(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?-5:-1;this.moveHighlightedIndex(p,{type:ku})}else this.internalSetState({isOpen:!0,type:ku},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=go(-1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:ku})}})},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:Xq})}},Escape(h){h.preventDefault(),this.reset({type:Yq,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(h){h.preventDefault(),this.toggleMenu({type:rk})}},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=Si(1,0,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:Zq})},End(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=Si(-1,v-1,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:Jq})}},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=ex(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:tx}):this.internalSetTimeout(()=>this.toggleMenu({type:tx}))},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:nk})})},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=ex(h);p&&this.inputKeyDownHandlers[p]&&this.inputKeyDownHandlers[p].call(this,h)},this.inputHandleChange=h=>{this.internalSetState({type:tk,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:ek})})},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]:fi(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:iZ("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:Kq}),n.avoidScrolling=!0,n.internalSetTimeout(()=>n.avoidScrolling=!1,250))}),onMouseDown:Rt(v,I=>{I.preventDefault()}),[E]:Rt(_,()=>{n.selectItemAtIndex(x,{type:Qq})})},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=Su(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=Su(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),PN(p)()})},this.openMenu=h=>{this.internalSetState({isOpen:!0},h)},this.closeMenu=h=>{this.internalSetState({isOpen:!1},h)},this.updateStatus=rw(()=>{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,Vq(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),ul(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=go(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:P,unsetItemCount:A,internalSetState:k}=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:P,unsetItemCount:A,setState:k,itemToString:a,id:u,highlightedIndex:r,inputValue:n,isOpen:o,selectedItem:i}}componentDidMount(){process.env.NODE_ENV!=="production"&&this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&AN(this._menuNode,this.getMenuProps);{const r=()=>{this.isMouseDown=!0},n=l=>{this.isMouseDown=!1,!cl(l.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:Gq},()=>this.props.onOuterClick(this.getStateAndHelpers()))},i=()=>{this.isTouchMove=!1},o=()=>{this.isTouchMove=!0},a=l=>{const d=cl(l.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!d&&this.getState().isOpen&&this.reset({type:ok},()=>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"&&(nw(this.state,r,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&AN(this._menuNode,this.getMenuProps)),ll(this.props,"selectedItem")&&this.props.selectedItemChanged(r.selectedItem,this.props.selectedItem)&&this.internalSetState({type:ik,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(n,r)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const r=TN(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=TN(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&&cZ(n,this.getRootProps),n;if(zq(n))return T.cloneElement(n,this.getRootProps(Hq(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:$q,itemToString:t=>t==null?"":(process.env.NODE_ENV!=="production"&&aZ(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:Bq},e.stateChangeTypes=uZ,e})();process.env.NODE_ENV!=="production"&&(lZ.propTypes={children:he.func,defaultHighlightedIndex:he.number,defaultIsOpen:he.bool,initialHighlightedIndex:he.number,initialSelectedItem:he.any,initialInputValue:he.string,initialIsOpen:he.bool,getA11yStatusMessage:he.func,itemToString:he.func,onChange:he.func,onSelect:he.func,onStateChange:he.func,onInputValueChange:he.func,onUserAction:he.func,onOuterClick:he.func,selectedItemChanged:he.func,stateReducer:he.func,itemCount:he.number,id:he.string,environment:he.shape({addEventListener:he.func,removeEventListener:he.func,document:he.shape({getElementById:he.func,activeElement:he.any,body:he.any})}),suppressRefError:he.bool,scrollIntoView:he.func,selectedItem:he.any,isOpen:he.bool,inputValue:he.string,highlightedIndex:he.number,labelId:he.string,inputId:he.string,menuId:he.string,getItemId:he.func});function AN(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 cZ(e,t){let{refKey:r}=t;const n=r!=="ref",i=!zq(e);i&&!n&&!CN.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}"`),!CN.isForwardRef(e)&&!Hq(e)[r]&&console.error(`downshift: You must apply the ref prop "${r}" from getRootProps onto your root element.`)}const ak={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function fZ(e,t,r){const{props:n,type:i}=e,o={};Object.keys(t).forEach(a=>{dZ(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange({type:i,...o})}function dZ(e,t,r,n){const{props:i,type:o}=t,a=`on${iw(e)}Change`;i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a]({type:o,...n})}function hZ(e,t){return t.changes}function pZ(e){const{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""}const vZ=rw((e,t)=>{Vq(e(),t)},200),gZ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?T.useLayoutEffect:T.useEffect;function mZ(e){let{id:t=`downshift-${Fq()}`,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 yZ(e,t,r){return e!==void 0?e:r.length===0?-1:r.indexOf(t)}function bZ(e){return e?String(e):""}function iw(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function sk(e){const t=T.useRef(e);return t.current=e,t}function xZ(e,t,r){const n=T.useRef(),i=T.useRef(),o=T.useCallback((h,p)=>{i.current=p,h=ul(h,p.props);const v=e(h,p);return p.props.stateReducer(h,{...p,changes:v})},[e]),[a,u]=T.useReducer(o,t),l=sk(r),d=T.useCallback(h=>u({props:l.current,...h}),[l]),f=i.current;return T.useEffect(()=>{f&&n.current&&n.current!==a&&fZ(f,ul(n.current,f.props),a),n.current=a},[a,r,f]),[a,d]}const qa={itemToString:bZ,stateReducer:hZ,getA11ySelectionMessage:pZ,scrollIntoView:Bq,circularNavigation:!1,environment:typeof window>"u"?{}:window};function Jr(e,t,r){r===void 0&&(r=ak);const n=e[`default${iw(t)}`];return n!==void 0?n:r[t]}function Ou(e,t,r){r===void 0&&(r=ak);const n=e[t];if(n!==void 0)return n;const i=e[`initial${iw(t)}`];return i!==void 0?i:Jr(e,t,r)}function wZ(e){const t=Ou(e,"selectedItem"),r=Ou(e,"isOpen"),n=Ou(e,"highlightedIndex"),i=Ou(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:i}}function fl(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):go(r,i.indexOf(u),i.length,n,!1):r===0?-1:r<0?i.length-1:0}function _Z(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&&!cl(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&&!cl(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 uk=()=>xr;process.env.NODE_ENV!=="production"&&(uk=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 MN(e,t,r){let{isInitialMount:n,highlightedIndex:i,items:o,environment:a,...u}=r;T.useEffect(()=>{n||vZ(()=>e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length,...u}),a.document)},t)}function EZ(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:i,menuElement:o,scrollIntoView:a}=e;const u=T.useRef(!0);return gZ(()=>{t<0||!r||!Object.keys(n.current).length||(u.current===!1?u.current=!0:a(i(t),o))},[t]),u}let lk=xr;process.env.NODE_ENV!=="production"&&(lk=e=>{let{isInitialMount:t,props:r,state:n}=e;const i=T.useRef(r);T.useEffect(()=>{t||(nw(n,i.current,r),i.current=r)},[n,r,t])});function SZ(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:fl(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:fl(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}}he.array.isRequired,he.func,he.func,he.func,he.bool,he.number,he.number,he.number,he.bool,he.bool,he.bool,he.any,he.any,he.any,he.string,he.string,he.string,he.func,he.string,he.func,he.func,he.func,he.func,he.func,he.shape({addEventListener:he.func,removeEventListener:he.func,document:he.shape({getElementById:he.func,activeElement:he.any,body:he.any})});function OZ(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.":""}sl(sl({},qa),{getA11yStatusMessage:OZ});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 ow=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,aw=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,sw=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,uw=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,lw=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,cw=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":5,fw=process.env.NODE_ENV!=="production"?"__input_change__":6,dl=process.env.NODE_ENV!=="production"?"__input_blur__":7,ck=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":8,fk=process.env.NODE_ENV!=="production"?"__item_mouse_move__":9,dw=process.env.NODE_ENV!=="production"?"__item_click__":10,dk=process.env.NODE_ENV!=="production"?"__togglebutton_click__":11,hk=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":12,pk=process.env.NODE_ENV!=="production"?"__function_open_menu__":13,vk=process.env.NODE_ENV!=="production"?"__function_close_menu__":14,gk=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,hw=process.env.NODE_ENV!=="production"?"__function_select_item__":16,mk=process.env.NODE_ENV!=="production"?"__function_set_input_value__":17,yk=process.env.NODE_ENV!=="production"?"__function_reset__":18,pw=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var bk=Object.freeze({__proto__:null,InputKeyDownArrowDown:ow,InputKeyDownArrowUp:aw,InputKeyDownEscape:sw,InputKeyDownHome:uw,InputKeyDownEnd:lw,InputKeyDownEnter:cw,InputChange:fw,InputBlur:dl,MenuMouseLeave:ck,ItemMouseMove:fk,ItemClick:dw,ToggleButtonClick:dk,FunctionToggleMenu:hk,FunctionOpenMenu:pk,FunctionCloseMenu:vk,FunctionSetHighlightedIndex:gk,FunctionSelectItem:hw,FunctionSetInputValue:mk,FunctionReset:yk,ControlledPropUpdatedSelectedItem:pw});function CZ(e){const t=wZ(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 RZ={items:he.array.isRequired,itemToString:he.func,getA11yStatusMessage:he.func,getA11ySelectionMessage:he.func,circularNavigation:he.bool,highlightedIndex:he.number,defaultHighlightedIndex:he.number,initialHighlightedIndex:he.number,isOpen:he.bool,defaultIsOpen:he.bool,initialIsOpen:he.bool,selectedItem:he.any,initialSelectedItem:he.any,defaultSelectedItem:he.any,inputValue:he.string,defaultInputValue:he.string,initialInputValue:he.string,id:he.string,labelId:he.string,menuId:he.string,getItemId:he.func,inputId:he.string,toggleButtonId:he.string,stateReducer:he.func,onSelectedItemChange:he.func,onHighlightedIndexChange:he.func,onStateChange:he.func,onIsOpenChange:he.func,onInputValueChange:he.func,environment:he.shape({addEventListener:he.func,removeEventListener:he.func,document:he.shape({getElementById:he.func,activeElement:he.any,body:he.any})})};function IZ(e,t,r){const n=T.useRef(),[i,o]=xZ(e,t,r);return T.useEffect(()=>{ll(r,"selectedItem")&&(n.current!==r.selectedItem&&o({type:pw,inputValue:r.itemToString(r.selectedItem)}),n.current=i.selectedItem===n.current?r.selectedItem:i.selectedItem)}),[ul(i,r),o]}let xk=xr;process.env.NODE_ENV!=="production"&&(xk=(e,t)=>{he.checkPropTypes(RZ,e,"prop",t.name)});const PZ={...qa,getA11yStatusMessage:$q,circularNavigation:!0};function NZ(e,t){const{type:r,props:n,shiftKey:i}=t;let o;switch(r){case dw:o={isOpen:Jr(n,"isOpen"),highlightedIndex:Jr(n,"highlightedIndex"),selectedItem:n.items[t.index],inputValue:n.itemToString(n.items[t.index])};break;case ow:e.isOpen?o={highlightedIndex:go(i?5:1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:fl(n,e,1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case aw:e.isOpen?o={highlightedIndex:go(i?-5:-1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:fl(n,e,-1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case cw: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 sw:o={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case uw:o={highlightedIndex:Si(1,0,n.items.length,t.getItemNodeFromIndex,!1)};break;case lw:o={highlightedIndex:Si(-1,n.items.length-1,n.items.length,t.getItemNodeFromIndex,!1)};break;case dl:o={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:n.items[e.highlightedIndex],inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case fw:o={isOpen:!0,highlightedIndex:Jr(n,"highlightedIndex"),inputValue:t.inputValue};break;case hw:o={selectedItem:t.selectedItem,inputValue:n.itemToString(t.selectedItem)};break;case pw:o={inputValue:t.inputValue};break;default:return SZ(e,t,bk)}return{...e,...o}}lo.stateChangeTypes=bk;function lo(e){e===void 0&&(e={}),xk(e,lo);const t={...PZ,...e},{initialIsOpen:r,defaultIsOpen:n,items:i,scrollIntoView:o,environment:a,getA11yStatusMessage:u,getA11ySelectionMessage:l,itemToString:d}=t,f=CZ(t),[h,p]=IZ(NZ,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=mZ(t),P=T.useRef(),A=sk({state:h,props:t}),k=T.useCallback(K=>w.current[I.getItemId(K)],[I]);MN(u,[v,m,x,i],{isInitialMount:R.current,previousResultCount:P.current,items:i,environment:a,itemToString:d,...h}),MN(l,[y],{isInitialMount:R.current,previousResultCount:P.current,items:i,environment:a,itemToString:d,...h});const L=EZ({menuElement:b.current,highlightedIndex:m,isOpen:v,itemRefs:w,scrollIntoView:o,getItemNodeFromIndex:k});lk({isInitialMount:R.current,props:t,state:h}),T.useEffect(()=>{(r||n||v)&&E.current&&E.current.focus()},[]),T.useEffect(()=>{R.current||(P.current=i.length)});const $=_Z(v,[S,b,_],a,()=>{p({type:dl,selectItem:!1})}),j=uk("getInputProps","getComboboxProps","getMenuProps");T.useEffect(()=>{R.current=!1},[]),T.useEffect(()=>{v||(w.current={})},[v]);const D=T.useMemo(()=>({ArrowDown(K){K.preventDefault(),p({type:ow,shiftKey:K.shiftKey,getItemNodeFromIndex:k})},ArrowUp(K){K.preventDefault(),p({type:aw,shiftKey:K.shiftKey,getItemNodeFromIndex:k})},Home(K){A.current.state.isOpen&&(K.preventDefault(),p({type:uw,getItemNodeFromIndex:k}))},End(K){A.current.state.isOpen&&(K.preventDefault(),p({type:lw,getItemNodeFromIndex:k}))},Escape(K){const se=A.current.state;(se.isOpen||se.inputValue||se.selectedItem||se.highlightedIndex>-1)&&(K.preventDefault(),p({type:sw}))},Enter(K){const se=A.current.state;!se.isOpen||se.highlightedIndex<0||K.which===229||(K.preventDefault(),p({type:cw,getItemNodeFromIndex:k}))}}),[p,A,k]),G=T.useCallback(K=>({id:I.labelId,htmlFor:I.inputId,...K}),[I]),B=T.useCallback(function(K,se){let{onMouseLeave:oe,refKey:fe="ref",ref:V,...ee}=K===void 0?{}:K,{suppressRefError:we=!1}=se===void 0?{}:se;return j("getMenuProps",we,fe,b),{[fe]:fi(V,be=>{b.current=be}),id:I.menuId,role:"listbox","aria-labelledby":I.labelId,onMouseLeave:Rt(oe,()=>{p({type:ck})}),...ee}},[p,j,I]),Y=T.useCallback(function(K){let{item:se,index:oe,refKey:fe="ref",ref:V,onMouseMove:ee,onMouseDown:we,onClick:be,onPress:de,disabled:ue,...Ee}=K===void 0?{}:K;const{props:Pe,state:Ze}=A.current,ze=yZ(oe,se,Pe.items);if(ze<0)throw new Error("Pass either item or item index in getItemProps!");const Fe="onClick",Ve=be,lt=()=>{oe!==Ze.highlightedIndex&&(L.current=!1,p({type:fk,index:oe,disabled:ue}))},ct=()=>{p({type:dw,index:oe})},mt=yt=>yt.preventDefault();return{[fe]:fi(V,yt=>{yt&&(w.current[I.getItemId(ze)]=yt)}),disabled:ue,role:"option","aria-selected":`${ze===Ze.highlightedIndex}`,id:I.getItemId(ze),...!ue&&{[Fe]:Rt(Ve,ct)},onMouseMove:Rt(ee,lt),onMouseDown:Rt(we,mt),...Ee}},[p,A,L,I]),Z=T.useCallback(function(K){let{onClick:se,onPress:oe,refKey:fe="ref",ref:V,...ee}=K===void 0?{}:K;const we=()=>{p({type:dk}),!A.current.state.isOpen&&E.current&&E.current.focus()};return{[fe]:fi(V,be=>{_.current=be}),id:I.toggleButtonId,tabIndex:-1,...!ee.disabled&&{onClick:Rt(se,we)},...ee}},[p,A,I]),te=T.useCallback(function(K,se){let{onKeyDown:oe,onChange:fe,onInput:V,onBlur:ee,onChangeText:we,refKey:be="ref",ref:de,...ue}=K===void 0?{}:K,{suppressRefError:Ee=!1}=se===void 0?{}:se;j("getInputProps",Ee,be,E);const Pe=A.current.state,Ze=ct=>{const mt=ex(ct);mt&&D[mt]&&D[mt](ct)},ze=ct=>{p({type:fw,inputValue:ct.target.value})},Fe=()=>{Pe.isOpen&&!$.current.isMouseDown&&p({type:dl,selectItem:!0})},Ve="onChange";let lt={};return ue.disabled||(lt={[Ve]:Rt(fe,V,ze),onKeyDown:Rt(oe,Ze),onBlur:Rt(ee,Fe)}),{[be]:fi(de,ct=>{E.current=ct}),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,...lt,...ue}},[p,D,A,$,j,I]),U=T.useCallback(function(K,se){let{refKey:oe="ref",ref:fe,...V}=K===void 0?{}:K,{suppressRefError:ee=!1}=se===void 0?{}:se;return j("getComboboxProps",ee,oe,S),{[oe]:fi(fe,we=>{S.current=we}),role:"combobox","aria-haspopup":"listbox","aria-owns":I.menuId,"aria-expanded":A.current.state.isOpen,...V}},[A,j,I]),re=T.useCallback(()=>{p({type:hk})},[p]),ae=T.useCallback(()=>{p({type:vk})},[p]),le=T.useCallback(()=>{p({type:pk})},[p]),F=T.useCallback(K=>{p({type:gk,highlightedIndex:K})},[p]),W=T.useCallback(K=>{p({type:hw,selectedItem:K})},[p]),J=T.useCallback(K=>{p({type:mk,inputValue:K})},[p]),H=T.useCallback(()=>{p({type:yk})},[p]);return{getItemProps:Y,getLabelProps:G,getMenuProps:B,getInputProps:te,getComboboxProps:U,getToggleButtonProps:Z,toggleMenu:re,openMenu:le,closeMenu:ae,setHighlightedIndex:F,setInputValue:J,selectItem:W,reset:H,highlightedIndex:m,isOpen:v,selectedItem:y,inputValue:x}}he.array,he.array,he.array,he.func,he.func,he.func,he.number,he.number,he.number,he.func,he.func,he.string,he.string,he.shape({addEventListener:he.func,removeEventListener:he.func,document:he.shape({getElementById:he.func,activeElement:he.any,body:he.any})});qa.itemToString,qa.stateReducer,qa.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 Aa={exports:{}};/**
64
44
  * @license
65
45
  * Lodash <https://lodash.com/>
66
46
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
67
47
  * Released under MIT license <https://lodash.com/license>
68
48
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
69
49
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
70
- */var Hoe=Ls.exports,kP;function Voe(){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,m=1,b=2,w=1,y=2,_=4,S=8,E=16,I=32,N=64,T=128,k=256,L=512,B=30,G="...",z=800,P=16,K=1,U=2,re=3,X=1/0,ne=9007199254740991,D=17976931348623157e292,$=NaN,Z=4294967295,ee=Z-1,A=Z>>>1,W=[["ary",T],["bind",w],["bindKey",y],["curry",S],["curryRight",E],["flip",L],["partial",I],["partialRight",N],["rearg",k]],q="[object Arguments]",j="[object Array]",V="[object AsyncFunction]",J="[object Boolean]",Y="[object Date]",se="[object DOMException]",te="[object Error]",he="[object Function]",ce="[object GeneratorFunction]",be="[object Map]",le="[object Number]",ue="[object Null]",we="[object Object]",Se="[object Promise]",Ne="[object Proxy]",De="[object RegExp]",Le="[object Set]",Ae="[object String]",Je="[object Symbol]",Et="[object Undefined]",tt="[object WeakMap]",Be="[object WeakSet]",je="[object ArrayBuffer]",Qe="[object DataView]",Ue="[object Float32Array]",Wt="[object Float64Array]",Ut="[object Int8Array]",St="[object Int16Array]",Nt="[object Int32Array]",wr="[object Uint8Array]",sn="[object Uint8ClampedArray]",Tr="[object Uint16Array]",ar="[object Uint32Array]",Nn=/\b__p \+= '';/g,Tn=/\b(__p \+=) '' \+/g,kt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mt=/&(?:amp|lt|gt|quot|#39);/g,At=/[&<>"']/g,sr=RegExp(Mt.source),Lt=RegExp(At.source),zt=/<%-([\s\S]+?)%>/g,lr=/<%([\s\S]+?)%>/g,Ur=/<%=([\s\S]+?)%>/g,pt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Gt=/^\w*$/,Kt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rr=/[\\^$.*+?()[\]{}|]/g,vr=RegExp(rr.source),cr=/^\s+/,Fe=/\s/,bt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Ft=/,? & /,gr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Pr=/[()=,{}\[\]\/\s]/,ln=/\\(\\)?/g,cn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,un=/\w*$/,dn=/^[-+]0x[0-9a-f]+$/i,si=/^0b[01]+$/i,Qi=/^\[object .+?Constructor\]$/,Qd=/^0o[0-7]+$/i,ef=/^(?:0|[1-9]\d*)$/,tf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,eo=/($^)/,rf=/['\n\r\u2028\u2029\\]/g,jo="\\ud800-\\udfff",nf="\\u0300-\\u036f",Tl="\\ufe20-\\ufe2f",of="\\u20d0-\\u20ff",$a=nf+Tl+of,Pl="\\u2700-\\u27bf",Ha="a-z\\xdf-\\xf6\\xf8-\\xff",af="\\xac\\xb1\\xd7\\xf7",kl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",sf="\\u2000-\\u206f",lf=" \\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",Va="A-Z\\xc0-\\xd6\\xd8-\\xde",Ml="\\ufe0e\\ufe0f",Al=af+kl+sf+lf,Wa="['’]",cf="["+jo+"]",Ua="["+Al+"]",qo="["+$a+"]",to="\\d+",uf="["+Pl+"]",Dl="["+Ha+"]",sE="[^"+jo+Al+to+Pl+Ha+Va+"]",df="\\ud83c[\\udffb-\\udfff]",tz="(?:"+qo+"|"+df+")",lE="[^"+jo+"]",ff="(?:\\ud83c[\\udde6-\\uddff]){2}",hf="[\\ud800-\\udbff][\\udc00-\\udfff]",Lo="["+Va+"]",cE="\\u200d",uE="(?:"+Dl+"|"+sE+")",rz="(?:"+Lo+"|"+sE+")",dE="(?:"+Wa+"(?:d|ll|m|re|s|t|ve))?",fE="(?:"+Wa+"(?:D|LL|M|RE|S|T|VE))?",hE=tz+"?",pE="["+Ml+"]?",nz="(?:"+cE+"(?:"+[lE,ff,hf].join("|")+")"+pE+hE+")*",iz="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",oz="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vE=pE+hE+nz,az="(?:"+[uf,ff,hf].join("|")+")"+vE,sz="(?:"+[lE+qo+"?",qo,ff,hf,cf].join("|")+")",lz=RegExp(Wa,"g"),cz=RegExp(qo,"g"),pf=RegExp(df+"(?="+df+")|"+sz+vE,"g"),uz=RegExp([Lo+"?"+Dl+"+"+dE+"(?="+[Ua,Lo,"$"].join("|")+")",rz+"+"+fE+"(?="+[Ua,Lo+uE,"$"].join("|")+")",Lo+"?"+uE+"+"+dE,Lo+"+"+fE,oz,iz,to,az].join("|"),"g"),dz=RegExp("["+cE+jo+$a+Ml+"]"),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[Wt]=_t[Ut]=_t[St]=_t[Nt]=_t[wr]=_t[sn]=_t[Tr]=_t[ar]=!0,_t[q]=_t[j]=_t[je]=_t[J]=_t[Qe]=_t[Y]=_t[te]=_t[he]=_t[be]=_t[le]=_t[we]=_t[De]=_t[Le]=_t[Ae]=_t[tt]=!1;var yt={};yt[q]=yt[j]=yt[je]=yt[Qe]=yt[J]=yt[Y]=yt[Ue]=yt[Wt]=yt[Ut]=yt[St]=yt[Nt]=yt[be]=yt[le]=yt[we]=yt[De]=yt[Le]=yt[Ae]=yt[Je]=yt[wr]=yt[sn]=yt[Tr]=yt[ar]=!0,yt[te]=yt[he]=yt[tt]=!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,gE=typeof Pt=="object"&&Pt&&Pt.Object===Object&&Pt,wz=typeof self=="object"&&self&&self.Object===Object&&self,ur=gE||wz||Function("return this")(),vf=t&&!t.nodeType&&t,ro=vf&&!0&&e&&!e.nodeType&&e,mE=ro&&ro.exports===vf,gf=mE&&gE.process,fn=(function(){try{var oe=ro&&ro.require&&ro.require("util").types;return oe||gf&&gf.binding&&gf.binding("util")}catch{}})(),bE=fn&&fn.isArrayBuffer,yE=fn&&fn.isDate,xE=fn&&fn.isMap,wE=fn&&fn.isRegExp,_E=fn&&fn.isSet,EE=fn&&fn.isTypedArray;function Gr(oe,pe,de){switch(de.length){case 0:return oe.call(pe);case 1:return oe.call(pe,de[0]);case 2:return oe.call(pe,de[0],de[1]);case 3:return oe.call(pe,de[0],de[1],de[2])}return oe.apply(pe,de)}function _z(oe,pe,de,Oe){for(var qe=-1,rt=oe==null?0:oe.length;++qe<rt;){var Yt=oe[qe];pe(Oe,Yt,de(Yt),oe)}return Oe}function Kr(oe,pe){for(var de=-1,Oe=oe==null?0:oe.length;++de<Oe&&pe(oe[de],de,oe)!==!1;);return oe}function Ez(oe,pe){for(var de=oe==null?0:oe.length;de--&&pe(oe[de],de,oe)!==!1;);return oe}function SE(oe,pe){for(var de=-1,Oe=oe==null?0:oe.length;++de<Oe;)if(!pe(oe[de],de,oe))return!1;return!0}function Oi(oe,pe){for(var de=-1,Oe=oe==null?0:oe.length,qe=0,rt=[];++de<Oe;){var Yt=oe[de];pe(Yt,de,oe)&&(rt[qe++]=Yt)}return rt}function jl(oe,pe){var de=oe==null?0:oe.length;return!!de&&zo(oe,pe,0)>-1}function mf(oe,pe,de){for(var Oe=-1,qe=oe==null?0:oe.length;++Oe<qe;)if(de(pe,oe[Oe]))return!0;return!1}function Ot(oe,pe){for(var de=-1,Oe=oe==null?0:oe.length,qe=Array(Oe);++de<Oe;)qe[de]=pe(oe[de],de,oe);return qe}function Ci(oe,pe){for(var de=-1,Oe=pe.length,qe=oe.length;++de<Oe;)oe[qe+de]=pe[de];return oe}function bf(oe,pe,de,Oe){var qe=-1,rt=oe==null?0:oe.length;for(Oe&&rt&&(de=oe[++qe]);++qe<rt;)de=pe(de,oe[qe],qe,oe);return de}function Sz(oe,pe,de,Oe){var qe=oe==null?0:oe.length;for(Oe&&qe&&(de=oe[--qe]);qe--;)de=pe(de,oe[qe],qe,oe);return de}function yf(oe,pe){for(var de=-1,Oe=oe==null?0:oe.length;++de<Oe;)if(pe(oe[de],de,oe))return!0;return!1}var Oz=xf("length");function Cz(oe){return oe.split("")}function Iz(oe){return oe.match(gr)||[]}function OE(oe,pe,de){var Oe;return de(oe,function(qe,rt,Yt){if(pe(qe,rt,Yt))return Oe=rt,!1}),Oe}function ql(oe,pe,de,Oe){for(var qe=oe.length,rt=de+(Oe?1:-1);Oe?rt--:++rt<qe;)if(pe(oe[rt],rt,oe))return rt;return-1}function zo(oe,pe,de){return pe===pe?zz(oe,pe,de):ql(oe,CE,de)}function Rz(oe,pe,de,Oe){for(var qe=de-1,rt=oe.length;++qe<rt;)if(Oe(oe[qe],pe))return qe;return-1}function CE(oe){return oe!==oe}function IE(oe,pe){var de=oe==null?0:oe.length;return de?_f(oe,pe)/de:$}function xf(oe){return function(pe){return pe==null?r:pe[oe]}}function wf(oe){return function(pe){return oe==null?r:oe[pe]}}function RE(oe,pe,de,Oe,qe){return qe(oe,function(rt,Yt,vt){de=Oe?(Oe=!1,rt):pe(de,rt,Yt,vt)}),de}function Nz(oe,pe){var de=oe.length;for(oe.sort(pe);de--;)oe[de]=oe[de].value;return oe}function _f(oe,pe){for(var de,Oe=-1,qe=oe.length;++Oe<qe;){var rt=pe(oe[Oe]);rt!==r&&(de=de===r?rt:de+rt)}return de}function Ef(oe,pe){for(var de=-1,Oe=Array(oe);++de<oe;)Oe[de]=pe(de);return Oe}function Tz(oe,pe){return Ot(pe,function(de){return[de,oe[de]]})}function NE(oe){return oe&&oe.slice(0,ME(oe)+1).replace(cr,"")}function Yr(oe){return function(pe){return oe(pe)}}function Sf(oe,pe){return Ot(pe,function(de){return oe[de]})}function Ga(oe,pe){return oe.has(pe)}function TE(oe,pe){for(var de=-1,Oe=oe.length;++de<Oe&&zo(pe,oe[de],0)>-1;);return de}function PE(oe,pe){for(var de=oe.length;de--&&zo(pe,oe[de],0)>-1;);return de}function Pz(oe,pe){for(var de=oe.length,Oe=0;de--;)oe[de]===pe&&++Oe;return Oe}var kz=wf(vz),Mz=wf(gz);function Az(oe){return"\\"+bz[oe]}function Dz(oe,pe){return oe==null?r:oe[pe]}function Bo(oe){return dz.test(oe)}function jz(oe){return fz.test(oe)}function qz(oe){for(var pe,de=[];!(pe=oe.next()).done;)de.push(pe.value);return de}function Of(oe){var pe=-1,de=Array(oe.size);return oe.forEach(function(Oe,qe){de[++pe]=[qe,Oe]}),de}function kE(oe,pe){return function(de){return oe(pe(de))}}function Ii(oe,pe){for(var de=-1,Oe=oe.length,qe=0,rt=[];++de<Oe;){var Yt=oe[de];(Yt===pe||Yt===h)&&(oe[de]=h,rt[qe++]=de)}return rt}function Ll(oe){var pe=-1,de=Array(oe.size);return oe.forEach(function(Oe){de[++pe]=Oe}),de}function Lz(oe){var pe=-1,de=Array(oe.size);return oe.forEach(function(Oe){de[++pe]=[Oe,Oe]}),de}function zz(oe,pe,de){for(var Oe=de-1,qe=oe.length;++Oe<qe;)if(oe[Oe]===pe)return Oe;return-1}function Bz(oe,pe,de){for(var Oe=de+1;Oe--;)if(oe[Oe]===pe)return Oe;return Oe}function Fo(oe){return Bo(oe)?$z(oe):Oz(oe)}function Pn(oe){return Bo(oe)?Hz(oe):Cz(oe)}function ME(oe){for(var pe=oe.length;pe--&&Fe.test(oe.charAt(pe)););return pe}var Fz=wf(mz);function $z(oe){for(var pe=pf.lastIndex=0;pf.test(oe);)++pe;return pe}function Hz(oe){return oe.match(pf)||[]}function Vz(oe){return oe.match(uz)||[]}var Wz=(function oe(pe){pe=pe==null?ur:$o.defaults(ur.Object(),pe,$o.pick(ur,hz));var de=pe.Array,Oe=pe.Date,qe=pe.Error,rt=pe.Function,Yt=pe.Math,vt=pe.Object,Cf=pe.RegExp,Uz=pe.String,hn=pe.TypeError,zl=de.prototype,Gz=rt.prototype,Ho=vt.prototype,Bl=pe["__core-js_shared__"],Fl=Gz.toString,ot=Ho.hasOwnProperty,Kz=0,AE=(function(){var l=/[^.]+$/.exec(Bl&&Bl.keys&&Bl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),$l=Ho.toString,Yz=Fl.call(vt),Xz=ur._,Zz=Cf("^"+Fl.call(ot).replace(rr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hl=mE?pe.Buffer:r,Ri=pe.Symbol,Vl=pe.Uint8Array,DE=Hl?Hl.allocUnsafe:r,Wl=kE(vt.getPrototypeOf,vt),jE=vt.create,qE=Ho.propertyIsEnumerable,Ul=zl.splice,LE=Ri?Ri.isConcatSpreadable:r,Ka=Ri?Ri.iterator:r,no=Ri?Ri.toStringTag:r,Gl=(function(){try{var l=lo(vt,"defineProperty");return l({},"",{}),l}catch{}})(),Jz=pe.clearTimeout!==ur.clearTimeout&&pe.clearTimeout,Qz=Oe&&Oe.now!==ur.Date.now&&Oe.now,e7=pe.setTimeout!==ur.setTimeout&&pe.setTimeout,Kl=Yt.ceil,Yl=Yt.floor,If=vt.getOwnPropertySymbols,t7=Hl?Hl.isBuffer:r,zE=pe.isFinite,r7=zl.join,n7=kE(vt.keys,vt),Xt=Yt.max,mr=Yt.min,i7=Oe.now,o7=pe.parseInt,BE=Yt.random,a7=zl.reverse,Rf=lo(pe,"DataView"),Ya=lo(pe,"Map"),Nf=lo(pe,"Promise"),Vo=lo(pe,"Set"),Xa=lo(pe,"WeakMap"),Za=lo(vt,"create"),Xl=Xa&&new Xa,Wo={},s7=co(Rf),l7=co(Ya),c7=co(Nf),u7=co(Vo),d7=co(Xa),Zl=Ri?Ri.prototype:r,Ja=Zl?Zl.valueOf:r,FE=Zl?Zl.toString:r;function F(l){if(Tt(l)&&!ze(l)&&!(l instanceof Ye)){if(l instanceof pn)return l;if(ot.call(l,"__wrapped__"))return $S(l)}return new pn(l)}var Uo=(function(){function l(){}return function(f){if(!It(f))return{};if(jE)return jE(f);l.prototype=f;var g=new l;return l.prototype=r,g}})();function Jl(){}function pn(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}F.templateSettings={escape:zt,evaluate:lr,interpolate:Ur,variable:"",imports:{_:F}},F.prototype=Jl.prototype,F.prototype.constructor=F,pn.prototype=Uo(Jl.prototype),pn.prototype.constructor=pn;function Ye(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Z,this.__views__=[]}function f7(){var l=new Ye(this.__wrapped__);return l.__actions__=kr(this.__actions__),l.__dir__=this.__dir__,l.__filtered__=this.__filtered__,l.__iteratees__=kr(this.__iteratees__),l.__takeCount__=this.__takeCount__,l.__views__=kr(this.__views__),l}function h7(){if(this.__filtered__){var l=new Ye(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__,g=ze(l),R=f<0,M=g?l.length:0,H=C8(0,M,this.__views__),Q=H.start,ie=H.end,ae=ie-Q,ve=R?ie:Q-1,ge=this.__iteratees__,ye=ge.length,_e=0,Re=mr(ae,this.__takeCount__);if(!g||!R&&M==ae&&Re==ae)return dS(l,this.__actions__);var Me=[];e:for(;ae--&&_e<Re;){ve+=f;for(var He=-1,Te=l[ve];++He<ye;){var Ge=ge[He],Xe=Ge.iteratee,Jr=Ge.type,Sr=Xe(Te);if(Jr==U)Te=Sr;else if(!Sr){if(Jr==K)continue e;break e}}Me[_e++]=Te}return Me}Ye.prototype=Uo(Jl.prototype),Ye.prototype.constructor=Ye;function io(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f<g;){var R=l[f];this.set(R[0],R[1])}}function v7(){this.__data__=Za?Za(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(Za){var g=f[l];return g===u?r:g}return ot.call(f,l)?f[l]:r}function b7(l){var f=this.__data__;return Za?f[l]!==r:ot.call(f,l)}function y7(l,f){var g=this.__data__;return this.size+=this.has(l)?0:1,g[l]=Za&&f===r?u:f,this}io.prototype.clear=v7,io.prototype.delete=g7,io.prototype.get=m7,io.prototype.has=b7,io.prototype.set=y7;function li(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f<g;){var R=l[f];this.set(R[0],R[1])}}function x7(){this.__data__=[],this.size=0}function w7(l){var f=this.__data__,g=Ql(f,l);if(g<0)return!1;var R=f.length-1;return g==R?f.pop():Ul.call(f,g,1),--this.size,!0}function _7(l){var f=this.__data__,g=Ql(f,l);return g<0?r:f[g][1]}function E7(l){return Ql(this.__data__,l)>-1}function S7(l,f){var g=this.__data__,R=Ql(g,l);return R<0?(++this.size,g.push([l,f])):g[R][1]=f,this}li.prototype.clear=x7,li.prototype.delete=w7,li.prototype.get=_7,li.prototype.has=E7,li.prototype.set=S7;function ci(l){var f=-1,g=l==null?0:l.length;for(this.clear();++f<g;){var R=l[f];this.set(R[0],R[1])}}function O7(){this.size=0,this.__data__={hash:new io,map:new(Ya||li),string:new io}}function C7(l){var f=dc(this,l).delete(l);return this.size-=f?1:0,f}function I7(l){return dc(this,l).get(l)}function R7(l){return dc(this,l).has(l)}function N7(l,f){var g=dc(this,l),R=g.size;return g.set(l,f),this.size+=g.size==R?0:1,this}ci.prototype.clear=O7,ci.prototype.delete=C7,ci.prototype.get=I7,ci.prototype.has=R7,ci.prototype.set=N7;function oo(l){var f=-1,g=l==null?0:l.length;for(this.__data__=new ci;++f<g;)this.add(l[f])}function T7(l){return this.__data__.set(l,u),this}function P7(l){return this.__data__.has(l)}oo.prototype.add=oo.prototype.push=T7,oo.prototype.has=P7;function kn(l){var f=this.__data__=new li(l);this.size=f.size}function k7(){this.__data__=new li,this.size=0}function M7(l){var f=this.__data__,g=f.delete(l);return this.size=f.size,g}function A7(l){return this.__data__.get(l)}function D7(l){return this.__data__.has(l)}function j7(l,f){var g=this.__data__;if(g instanceof li){var R=g.__data__;if(!Ya||R.length<i-1)return R.push([l,f]),this.size=++g.size,this;g=this.__data__=new ci(R)}return g.set(l,f),this.size=g.size,this}kn.prototype.clear=k7,kn.prototype.delete=M7,kn.prototype.get=A7,kn.prototype.has=D7,kn.prototype.set=j7;function $E(l,f){var g=ze(l),R=!g&&uo(l),M=!g&&!R&&Mi(l),H=!g&&!R&&!M&&Xo(l),Q=g||R||M||H,ie=Q?Ef(l.length,Uz):[],ae=ie.length;for(var ve in l)(f||ot.call(l,ve))&&!(Q&&(ve=="length"||M&&(ve=="offset"||ve=="parent")||H&&(ve=="buffer"||ve=="byteLength"||ve=="byteOffset")||fi(ve,ae)))&&ie.push(ve);return ie}function HE(l){var f=l.length;return f?l[Bf(0,f-1)]:r}function q7(l,f){return fc(kr(l),ao(f,0,l.length))}function L7(l){return fc(kr(l))}function Tf(l,f,g){(g!==r&&!An(l[f],g)||g===r&&!(f in l))&&Un(l,f,g)}function Qa(l,f,g){var R=l[f];(!(ot.call(l,f)&&An(R,g))||g===r&&!(f in l))&&Un(l,f,g)}function Ql(l,f){for(var g=l.length;g--;)if(An(l[g][0],f))return g;return-1}function z7(l,f,g,R){return Ni(l,function(M,H,Q){f(R,M,g(M),Q)}),R}function VE(l,f){return l&&Kn(f,nr(f),l)}function B7(l,f){return l&&Kn(f,Ar(f),l)}function Un(l,f,g){f=="__proto__"&&Gl?Gl(l,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):l[f]=g}function Pf(l,f){for(var g=-1,R=f.length,M=de(R),H=l==null;++g<R;)M[g]=H?r:fh(l,f[g]);return M}function ao(l,f,g){return l===l&&(g!==r&&(l=l<=g?l:g),f!==r&&(l=l>=f?l:f)),l}function vn(l,f,g,R,M,H){var Q,ie=f&p,ae=f&v,ve=f&x;if(g&&(Q=M?g(l,R,M,H):g(l)),Q!==r)return Q;if(!It(l))return l;var ge=ze(l);if(ge){if(Q=R8(l),!ie)return kr(l,Q)}else{var ye=br(l),_e=ye==he||ye==ce;if(Mi(l))return pS(l,ie);if(ye==we||ye==q||_e&&!M){if(Q=ae||_e?{}:MS(l),!ie)return ae?m8(l,B7(Q,l)):g8(l,VE(Q,l))}else{if(!yt[ye])return M?l:{};Q=N8(l,ye,ie)}}H||(H=new kn);var Re=H.get(l);if(Re)return Re;H.set(l,Q),lO(l)?l.forEach(function(Te){Q.add(vn(Te,f,g,Te,l,H))}):aO(l)&&l.forEach(function(Te,Ge){Q.set(Ge,vn(Te,f,g,Ge,l,H))});var Me=ve?ae?Zf:Xf:ae?Ar:nr,He=ge?r:Me(l);return Kr(He||l,function(Te,Ge){He&&(Ge=Te,Te=l[Ge]),Qa(Q,Ge,vn(Te,f,g,Ge,l,H))}),Q}function F7(l){var f=nr(l);return function(g){return WE(g,l,f)}}function WE(l,f,g){var R=g.length;if(l==null)return!R;for(l=vt(l);R--;){var M=g[R],H=f[M],Q=l[M];if(Q===r&&!(M in l)||!H(Q))return!1}return!0}function UE(l,f,g){if(typeof l!="function")throw new hn(a);return as(function(){l.apply(r,g)},f)}function es(l,f,g,R){var M=-1,H=jl,Q=!0,ie=l.length,ae=[],ve=f.length;if(!ie)return ae;g&&(f=Ot(f,Yr(g))),R?(H=mf,Q=!1):f.length>=i&&(H=Ga,Q=!1,f=new oo(f));e:for(;++M<ie;){var ge=l[M],ye=g==null?ge:g(ge);if(ge=R||ge!==0?ge:0,Q&&ye===ye){for(var _e=ve;_e--;)if(f[_e]===ye)continue e;ae.push(ge)}else H(f,ye,R)||ae.push(ge)}return ae}var Ni=yS(Gn),GE=yS(Mf,!0);function $7(l,f){var g=!0;return Ni(l,function(R,M,H){return g=!!f(R,M,H),g}),g}function ec(l,f,g){for(var R=-1,M=l.length;++R<M;){var H=l[R],Q=f(H);if(Q!=null&&(ie===r?Q===Q&&!Zr(Q):g(Q,ie)))var ie=Q,ae=H}return ae}function H7(l,f,g,R){var M=l.length;for(g=$e(g),g<0&&(g=-g>M?0:M+g),R=R===r||R>M?M:$e(R),R<0&&(R+=M),R=g>R?0:uO(R);g<R;)l[g++]=f;return l}function KE(l,f){var g=[];return Ni(l,function(R,M,H){f(R,M,H)&&g.push(R)}),g}function dr(l,f,g,R,M){var H=-1,Q=l.length;for(g||(g=P8),M||(M=[]);++H<Q;){var ie=l[H];f>0&&g(ie)?f>1?dr(ie,f-1,g,R,M):Ci(M,ie):R||(M[M.length]=ie)}return M}var kf=xS(),YE=xS(!0);function Gn(l,f){return l&&kf(l,f,nr)}function Mf(l,f){return l&&YE(l,f,nr)}function tc(l,f){return Oi(f,function(g){return hi(l[g])})}function so(l,f){f=Pi(f,l);for(var g=0,R=f.length;l!=null&&g<R;)l=l[Mn(f[g++])];return g&&g==R?l:r}function XE(l,f,g){var R=f(l);return ze(l)?R:Ci(R,g(l))}function _r(l){return l==null?l===r?Et:ue:no&&no in vt(l)?O8(l):L8(l)}function Af(l,f){return l>f}function V7(l,f){return l!=null&&ot.call(l,f)}function W7(l,f){return l!=null&&f in vt(l)}function U7(l,f,g){return l>=mr(f,g)&&l<Xt(f,g)}function Df(l,f,g){for(var R=g?mf:jl,M=l[0].length,H=l.length,Q=H,ie=de(H),ae=1/0,ve=[];Q--;){var ge=l[Q];Q&&f&&(ge=Ot(ge,Yr(f))),ae=mr(ge.length,ae),ie[Q]=!g&&(f||M>=120&&ge.length>=120)?new oo(Q&&ge):r}ge=l[0];var ye=-1,_e=ie[0];e:for(;++ye<M&&ve.length<ae;){var Re=ge[ye],Me=f?f(Re):Re;if(Re=g||Re!==0?Re:0,!(_e?Ga(_e,Me):R(ve,Me,g))){for(Q=H;--Q;){var He=ie[Q];if(!(He?Ga(He,Me):R(l[Q],Me,g)))continue e}_e&&_e.push(Me),ve.push(Re)}}return ve}function G7(l,f,g,R){return Gn(l,function(M,H,Q){f(R,g(M),H,Q)}),R}function ts(l,f,g){f=Pi(f,l),l=qS(l,f);var R=l==null?l:l[Mn(mn(f))];return R==null?r:Gr(R,l,g)}function ZE(l){return Tt(l)&&_r(l)==q}function K7(l){return Tt(l)&&_r(l)==je}function Y7(l){return Tt(l)&&_r(l)==Y}function rs(l,f,g,R,M){return l===f?!0:l==null||f==null||!Tt(l)&&!Tt(f)?l!==l&&f!==f:X7(l,f,g,R,rs,M)}function X7(l,f,g,R,M,H){var Q=ze(l),ie=ze(f),ae=Q?j:br(l),ve=ie?j:br(f);ae=ae==q?we:ae,ve=ve==q?we:ve;var ge=ae==we,ye=ve==we,_e=ae==ve;if(_e&&Mi(l)){if(!Mi(f))return!1;Q=!0,ge=!1}if(_e&&!ge)return H||(H=new kn),Q||Xo(l)?TS(l,f,g,R,M,H):E8(l,f,ae,g,R,M,H);if(!(g&m)){var Re=ge&&ot.call(l,"__wrapped__"),Me=ye&&ot.call(f,"__wrapped__");if(Re||Me){var He=Re?l.value():l,Te=Me?f.value():f;return H||(H=new kn),M(He,Te,g,R,H)}}return _e?(H||(H=new kn),S8(l,f,g,R,M,H)):!1}function Z7(l){return Tt(l)&&br(l)==be}function jf(l,f,g,R){var M=g.length,H=M,Q=!R;if(l==null)return!H;for(l=vt(l);M--;){var ie=g[M];if(Q&&ie[2]?ie[1]!==l[ie[0]]:!(ie[0]in l))return!1}for(;++M<H;){ie=g[M];var ae=ie[0],ve=l[ae],ge=ie[1];if(Q&&ie[2]){if(ve===r&&!(ae in l))return!1}else{var ye=new kn;if(R)var _e=R(ve,ge,ae,l,f,ye);if(!(_e===r?rs(ge,ve,m|b,R,ye):_e))return!1}}return!0}function JE(l){if(!It(l)||M8(l))return!1;var f=hi(l)?Zz:Qi;return f.test(co(l))}function J7(l){return Tt(l)&&_r(l)==De}function Q7(l){return Tt(l)&&br(l)==Le}function e8(l){return Tt(l)&&bc(l.length)&&!!_t[_r(l)]}function QE(l){return typeof l=="function"?l:l==null?Dr:typeof l=="object"?ze(l)?rS(l[0],l[1]):tS(l):_O(l)}function qf(l){if(!os(l))return n7(l);var f=[];for(var g in vt(l))ot.call(l,g)&&g!="constructor"&&f.push(g);return f}function t8(l){if(!It(l))return q8(l);var f=os(l),g=[];for(var R in l)R=="constructor"&&(f||!ot.call(l,R))||g.push(R);return g}function Lf(l,f){return l<f}function eS(l,f){var g=-1,R=Mr(l)?de(l.length):[];return Ni(l,function(M,H,Q){R[++g]=f(M,H,Q)}),R}function tS(l){var f=Qf(l);return f.length==1&&f[0][2]?DS(f[0][0],f[0][1]):function(g){return g===l||jf(g,l,f)}}function rS(l,f){return th(l)&&AS(f)?DS(Mn(l),f):function(g){var R=fh(g,l);return R===r&&R===f?hh(g,l):rs(f,R,m|b)}}function rc(l,f,g,R,M){l!==f&&kf(f,function(H,Q){if(M||(M=new kn),It(H))r8(l,f,Q,g,rc,R,M);else{var ie=R?R(nh(l,Q),H,Q+"",l,f,M):r;ie===r&&(ie=H),Tf(l,Q,ie)}},Ar)}function r8(l,f,g,R,M,H,Q){var ie=nh(l,g),ae=nh(f,g),ve=Q.get(ae);if(ve){Tf(l,g,ve);return}var ge=H?H(ie,ae,g+"",l,f,Q):r,ye=ge===r;if(ye){var _e=ze(ae),Re=!_e&&Mi(ae),Me=!_e&&!Re&&Xo(ae);ge=ae,_e||Re||Me?ze(ie)?ge=ie:Dt(ie)?ge=kr(ie):Re?(ye=!1,ge=pS(ae,!0)):Me?(ye=!1,ge=vS(ae,!0)):ge=[]:ss(ae)||uo(ae)?(ge=ie,uo(ie)?ge=dO(ie):(!It(ie)||hi(ie))&&(ge=MS(ae))):ye=!1}ye&&(Q.set(ae,ge),M(ge,ae,R,H,Q),Q.delete(ae)),Tf(l,g,ge)}function nS(l,f){var g=l.length;if(g)return f+=f<0?g:0,fi(f,g)?l[f]:r}function iS(l,f,g){f.length?f=Ot(f,function(H){return ze(H)?function(Q){return so(Q,H.length===1?H[0]:H)}:H}):f=[Dr];var R=-1;f=Ot(f,Yr(Pe()));var M=eS(l,function(H,Q,ie){var ae=Ot(f,function(ve){return ve(H)});return{criteria:ae,index:++R,value:H}});return Nz(M,function(H,Q){return v8(H,Q,g)})}function n8(l,f){return oS(l,f,function(g,R){return hh(l,R)})}function oS(l,f,g){for(var R=-1,M=f.length,H={};++R<M;){var Q=f[R],ie=so(l,Q);g(ie,Q)&&ns(H,Pi(Q,l),ie)}return H}function i8(l){return function(f){return so(f,l)}}function zf(l,f,g,R){var M=R?Rz:zo,H=-1,Q=f.length,ie=l;for(l===f&&(f=kr(f)),g&&(ie=Ot(l,Yr(g)));++H<Q;)for(var ae=0,ve=f[H],ge=g?g(ve):ve;(ae=M(ie,ge,ae,R))>-1;)ie!==l&&Ul.call(ie,ae,1),Ul.call(l,ae,1);return l}function aS(l,f){for(var g=l?f.length:0,R=g-1;g--;){var M=f[g];if(g==R||M!==H){var H=M;fi(M)?Ul.call(l,M,1):Hf(l,M)}}return l}function Bf(l,f){return l+Yl(BE()*(f-l+1))}function o8(l,f,g,R){for(var M=-1,H=Xt(Kl((f-l)/(g||1)),0),Q=de(H);H--;)Q[R?H:++M]=l,l+=g;return Q}function Ff(l,f){var g="";if(!l||f<1||f>ne)return g;do f%2&&(g+=l),f=Yl(f/2),f&&(l+=l);while(f);return g}function Ve(l,f){return ih(jS(l,f,Dr),l+"")}function a8(l){return HE(Zo(l))}function s8(l,f){var g=Zo(l);return fc(g,ao(f,0,g.length))}function ns(l,f,g,R){if(!It(l))return l;f=Pi(f,l);for(var M=-1,H=f.length,Q=H-1,ie=l;ie!=null&&++M<H;){var ae=Mn(f[M]),ve=g;if(ae==="__proto__"||ae==="constructor"||ae==="prototype")return l;if(M!=Q){var ge=ie[ae];ve=R?R(ge,ae,ie):r,ve===r&&(ve=It(ge)?ge:fi(f[M+1])?[]:{})}Qa(ie,ae,ve),ie=ie[ae]}return l}var sS=Xl?function(l,f){return Xl.set(l,f),l}:Dr,l8=Gl?function(l,f){return Gl(l,"toString",{configurable:!0,enumerable:!1,value:vh(f),writable:!0})}:Dr;function c8(l){return fc(Zo(l))}function gn(l,f,g){var R=-1,M=l.length;f<0&&(f=-f>M?0:M+f),g=g>M?M:g,g<0&&(g+=M),M=f>g?0:g-f>>>0,f>>>=0;for(var H=de(M);++R<M;)H[R]=l[R+f];return H}function u8(l,f){var g;return Ni(l,function(R,M,H){return g=f(R,M,H),!g}),!!g}function nc(l,f,g){var R=0,M=l==null?R:l.length;if(typeof f=="number"&&f===f&&M<=A){for(;R<M;){var H=R+M>>>1,Q=l[H];Q!==null&&!Zr(Q)&&(g?Q<=f:Q<f)?R=H+1:M=H}return M}return $f(l,f,Dr,g)}function $f(l,f,g,R){var M=0,H=l==null?0:l.length;if(H===0)return 0;f=g(f);for(var Q=f!==f,ie=f===null,ae=Zr(f),ve=f===r;M<H;){var ge=Yl((M+H)/2),ye=g(l[ge]),_e=ye!==r,Re=ye===null,Me=ye===ye,He=Zr(ye);if(Q)var Te=R||Me;else ve?Te=Me&&(R||_e):ie?Te=Me&&_e&&(R||!Re):ae?Te=Me&&_e&&!Re&&(R||!He):Re||He?Te=!1:Te=R?ye<=f:ye<f;Te?M=ge+1:H=ge}return mr(H,ee)}function lS(l,f){for(var g=-1,R=l.length,M=0,H=[];++g<R;){var Q=l[g],ie=f?f(Q):Q;if(!g||!An(ie,ae)){var ae=ie;H[M++]=Q===0?0:Q}}return H}function cS(l){return typeof l=="number"?l:Zr(l)?$:+l}function Xr(l){if(typeof l=="string")return l;if(ze(l))return Ot(l,Xr)+"";if(Zr(l))return FE?FE.call(l):"";var f=l+"";return f=="0"&&1/l==-X?"-0":f}function Ti(l,f,g){var R=-1,M=jl,H=l.length,Q=!0,ie=[],ae=ie;if(g)Q=!1,M=mf;else if(H>=i){var ve=f?null:w8(l);if(ve)return Ll(ve);Q=!1,M=Ga,ae=new oo}else ae=f?[]:ie;e:for(;++R<H;){var ge=l[R],ye=f?f(ge):ge;if(ge=g||ge!==0?ge:0,Q&&ye===ye){for(var _e=ae.length;_e--;)if(ae[_e]===ye)continue e;f&&ae.push(ye),ie.push(ge)}else M(ae,ye,g)||(ae!==ie&&ae.push(ye),ie.push(ge))}return ie}function Hf(l,f){f=Pi(f,l);var g=-1,R=f.length;if(!R)return!0;for(;++g<R;){var M=Mn(f[g]);if(M==="__proto__"&&!ot.call(l,"__proto__")||(M==="constructor"||M==="prototype")&&g<R-1)return!1}var H=qS(l,f);return H==null||delete H[Mn(mn(f))]}function uS(l,f,g,R){return ns(l,f,g(so(l,f)),R)}function ic(l,f,g,R){for(var M=l.length,H=R?M:-1;(R?H--:++H<M)&&f(l[H],H,l););return g?gn(l,R?0:H,R?H+1:M):gn(l,R?H+1:0,R?M:H)}function dS(l,f){var g=l;return g instanceof Ye&&(g=g.value()),bf(f,function(R,M){return M.func.apply(M.thisArg,Ci([R],M.args))},g)}function Vf(l,f,g){var R=l.length;if(R<2)return R?Ti(l[0]):[];for(var M=-1,H=de(R);++M<R;)for(var Q=l[M],ie=-1;++ie<R;)ie!=M&&(H[M]=es(H[M]||Q,l[ie],f,g));return Ti(dr(H,1),f,g)}function fS(l,f,g){for(var R=-1,M=l.length,H=f.length,Q={};++R<M;){var ie=R<H?f[R]:r;g(Q,l[R],ie)}return Q}function Wf(l){return Dt(l)?l:[]}function Uf(l){return typeof l=="function"?l:Dr}function Pi(l,f){return ze(l)?l:th(l,f)?[l]:FS(at(l))}var d8=Ve;function ki(l,f,g){var R=l.length;return g=g===r?R:g,!f&&g>=R?l:gn(l,f,g)}var hS=Jz||function(l){return ur.clearTimeout(l)};function pS(l,f){if(f)return l.slice();var g=l.length,R=DE?DE(g):new l.constructor(g);return l.copy(R),R}function Gf(l){var f=new l.constructor(l.byteLength);return new Vl(f).set(new Vl(l)),f}function f8(l,f){var g=f?Gf(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.byteLength)}function h8(l){var f=new l.constructor(l.source,un.exec(l));return f.lastIndex=l.lastIndex,f}function p8(l){return Ja?vt(Ja.call(l)):{}}function vS(l,f){var g=f?Gf(l.buffer):l.buffer;return new l.constructor(g,l.byteOffset,l.length)}function gS(l,f){if(l!==f){var g=l!==r,R=l===null,M=l===l,H=Zr(l),Q=f!==r,ie=f===null,ae=f===f,ve=Zr(f);if(!ie&&!ve&&!H&&l>f||H&&Q&&ae&&!ie&&!ve||R&&Q&&ae||!g&&ae||!M)return 1;if(!R&&!H&&!ve&&l<f||ve&&g&&M&&!R&&!H||ie&&g&&M||!Q&&M||!ae)return-1}return 0}function v8(l,f,g){for(var R=-1,M=l.criteria,H=f.criteria,Q=M.length,ie=g.length;++R<Q;){var ae=gS(M[R],H[R]);if(ae){if(R>=ie)return ae;var ve=g[R];return ae*(ve=="desc"?-1:1)}}return l.index-f.index}function mS(l,f,g,R){for(var M=-1,H=l.length,Q=g.length,ie=-1,ae=f.length,ve=Xt(H-Q,0),ge=de(ae+ve),ye=!R;++ie<ae;)ge[ie]=f[ie];for(;++M<Q;)(ye||M<H)&&(ge[g[M]]=l[M]);for(;ve--;)ge[ie++]=l[M++];return ge}function bS(l,f,g,R){for(var M=-1,H=l.length,Q=-1,ie=g.length,ae=-1,ve=f.length,ge=Xt(H-ie,0),ye=de(ge+ve),_e=!R;++M<ge;)ye[M]=l[M];for(var Re=M;++ae<ve;)ye[Re+ae]=f[ae];for(;++Q<ie;)(_e||M<H)&&(ye[Re+g[Q]]=l[M++]);return ye}function kr(l,f){var g=-1,R=l.length;for(f||(f=de(R));++g<R;)f[g]=l[g];return f}function Kn(l,f,g,R){var M=!g;g||(g={});for(var H=-1,Q=f.length;++H<Q;){var ie=f[H],ae=R?R(g[ie],l[ie],ie,g,l):r;ae===r&&(ae=l[ie]),M?Un(g,ie,ae):Qa(g,ie,ae)}return g}function g8(l,f){return Kn(l,eh(l),f)}function m8(l,f){return Kn(l,PS(l),f)}function oc(l,f){return function(g,R){var M=ze(g)?_z:z7,H=f?f():{};return M(g,l,Pe(R,2),H)}}function Go(l){return Ve(function(f,g){var R=-1,M=g.length,H=M>1?g[M-1]:r,Q=M>2?g[2]:r;for(H=l.length>3&&typeof H=="function"?(M--,H):r,Q&&Er(g[0],g[1],Q)&&(H=M<3?r:H,M=1),f=vt(f);++R<M;){var ie=g[R];ie&&l(f,ie,R,H)}return f})}function yS(l,f){return function(g,R){if(g==null)return g;if(!Mr(g))return l(g,R);for(var M=g.length,H=f?M:-1,Q=vt(g);(f?H--:++H<M)&&R(Q[H],H,Q)!==!1;);return g}}function xS(l){return function(f,g,R){for(var M=-1,H=vt(f),Q=R(f),ie=Q.length;ie--;){var ae=Q[l?ie:++M];if(g(H[ae],ae,H)===!1)break}return f}}function b8(l,f,g){var R=f&w,M=is(l);function H(){var Q=this&&this!==ur&&this instanceof H?M:l;return Q.apply(R?g:this,arguments)}return H}function wS(l){return function(f){f=at(f);var g=Bo(f)?Pn(f):r,R=g?g[0]:f.charAt(0),M=g?ki(g,1).join(""):f.slice(1);return R[l]()+M}}function Ko(l){return function(f){return bf(xO(yO(f).replace(lz,"")),l,"")}}function is(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 g=Uo(l.prototype),R=l.apply(g,f);return It(R)?R:g}}function y8(l,f,g){var R=is(l);function M(){for(var H=arguments.length,Q=de(H),ie=H,ae=Yo(M);ie--;)Q[ie]=arguments[ie];var ve=H<3&&Q[0]!==ae&&Q[H-1]!==ae?[]:Ii(Q,ae);if(H-=ve.length,H<g)return CS(l,f,ac,M.placeholder,r,Q,ve,r,r,g-H);var ge=this&&this!==ur&&this instanceof M?R:l;return Gr(ge,this,Q)}return M}function _S(l){return function(f,g,R){var M=vt(f);if(!Mr(f)){var H=Pe(g,3);f=nr(f),g=function(ie){return H(M[ie],ie,M)}}var Q=l(f,g,R);return Q>-1?M[H?f[Q]:Q]:r}}function ES(l){return di(function(f){var g=f.length,R=g,M=pn.prototype.thru;for(l&&f.reverse();R--;){var H=f[R];if(typeof H!="function")throw new hn(a);if(M&&!Q&&uc(H)=="wrapper")var Q=new pn([],!0)}for(R=Q?R:g;++R<g;){H=f[R];var ie=uc(H),ae=ie=="wrapper"?Jf(H):r;ae&&rh(ae[0])&&ae[1]==(T|S|I|k)&&!ae[4].length&&ae[9]==1?Q=Q[uc(ae[0])].apply(Q,ae[3]):Q=H.length==1&&rh(H)?Q[ie]():Q.thru(H)}return function(){var ve=arguments,ge=ve[0];if(Q&&ve.length==1&&ze(ge))return Q.plant(ge).value();for(var ye=0,_e=g?f[ye].apply(this,ve):ge;++ye<g;)_e=f[ye].call(this,_e);return _e}})}function ac(l,f,g,R,M,H,Q,ie,ae,ve){var ge=f&T,ye=f&w,_e=f&y,Re=f&(S|E),Me=f&L,He=_e?r:is(l);function Te(){for(var Ge=arguments.length,Xe=de(Ge),Jr=Ge;Jr--;)Xe[Jr]=arguments[Jr];if(Re)var Sr=Yo(Te),Qr=Pz(Xe,Sr);if(R&&(Xe=mS(Xe,R,M,Re)),H&&(Xe=bS(Xe,H,Q,Re)),Ge-=Qr,Re&&Ge<ve){var jt=Ii(Xe,Sr);return CS(l,f,ac,Te.placeholder,g,Xe,jt,ie,ae,ve-Ge)}var Dn=ye?g:this,vi=_e?Dn[l]:l;return Ge=Xe.length,ie?Xe=z8(Xe,ie):Me&&Ge>1&&Xe.reverse(),ge&&ae<Ge&&(Xe.length=ae),this&&this!==ur&&this instanceof Te&&(vi=He||is(vi)),vi.apply(Dn,Xe)}return Te}function SS(l,f){return function(g,R){return G7(g,l,f(R),{})}}function sc(l,f){return function(g,R){var M;if(g===r&&R===r)return f;if(g!==r&&(M=g),R!==r){if(M===r)return R;typeof g=="string"||typeof R=="string"?(g=Xr(g),R=Xr(R)):(g=cS(g),R=cS(R)),M=l(g,R)}return M}}function Kf(l){return di(function(f){return f=Ot(f,Yr(Pe())),Ve(function(g){var R=this;return l(f,function(M){return Gr(M,R,g)})})})}function lc(l,f){f=f===r?" ":Xr(f);var g=f.length;if(g<2)return g?Ff(f,l):f;var R=Ff(f,Kl(l/Fo(f)));return Bo(f)?ki(Pn(R),0,l).join(""):R.slice(0,l)}function x8(l,f,g,R){var M=f&w,H=is(l);function Q(){for(var ie=-1,ae=arguments.length,ve=-1,ge=R.length,ye=de(ge+ae),_e=this&&this!==ur&&this instanceof Q?H:l;++ve<ge;)ye[ve]=R[ve];for(;ae--;)ye[ve++]=arguments[++ie];return Gr(_e,M?g:this,ye)}return Q}function OS(l){return function(f,g,R){return R&&typeof R!="number"&&Er(f,g,R)&&(g=R=r),f=pi(f),g===r?(g=f,f=0):g=pi(g),R=R===r?f<g?1:-1:pi(R),o8(f,g,R,l)}}function cc(l){return function(f,g){return typeof f=="string"&&typeof g=="string"||(f=bn(f),g=bn(g)),l(f,g)}}function CS(l,f,g,R,M,H,Q,ie,ae,ve){var ge=f&S,ye=ge?Q:r,_e=ge?r:Q,Re=ge?H:r,Me=ge?r:H;f|=ge?I:N,f&=~(ge?N:I),f&_||(f&=-4);var He=[l,f,M,Re,ye,Me,_e,ie,ae,ve],Te=g.apply(r,He);return rh(l)&&LS(Te,He),Te.placeholder=R,zS(Te,l,f)}function Yf(l){var f=Yt[l];return function(g,R){if(g=bn(g),R=R==null?0:mr($e(R),292),R&&zE(g)){var M=(at(g)+"e").split("e"),H=f(M[0]+"e"+(+M[1]+R));return M=(at(H)+"e").split("e"),+(M[0]+"e"+(+M[1]-R))}return f(g)}}var w8=Vo&&1/Ll(new Vo([,-0]))[1]==X?function(l){return new Vo(l)}:bh;function IS(l){return function(f){var g=br(f);return g==be?Of(f):g==Le?Lz(f):Tz(f,l(f))}}function ui(l,f,g,R,M,H,Q,ie){var ae=f&y;if(!ae&&typeof l!="function")throw new hn(a);var ve=R?R.length:0;if(ve||(f&=-97,R=M=r),Q=Q===r?Q:Xt($e(Q),0),ie=ie===r?ie:$e(ie),ve-=M?M.length:0,f&N){var ge=R,ye=M;R=M=r}var _e=ae?r:Jf(l),Re=[l,f,g,R,M,ge,ye,H,Q,ie];if(_e&&j8(Re,_e),l=Re[0],f=Re[1],g=Re[2],R=Re[3],M=Re[4],ie=Re[9]=Re[9]===r?ae?0:l.length:Xt(Re[9]-ve,0),!ie&&f&(S|E)&&(f&=-25),!f||f==w)var Me=b8(l,f,g);else f==S||f==E?Me=y8(l,f,ie):(f==I||f==(w|I))&&!M.length?Me=x8(l,f,g,R):Me=ac.apply(r,Re);var He=_e?sS:LS;return zS(He(Me,Re),l,f)}function RS(l,f,g,R){return l===r||An(l,Ho[g])&&!ot.call(R,g)?f:l}function NS(l,f,g,R,M,H){return It(l)&&It(f)&&(H.set(f,l),rc(l,f,r,NS,H),H.delete(f)),l}function _8(l){return ss(l)?r:l}function TS(l,f,g,R,M,H){var Q=g&m,ie=l.length,ae=f.length;if(ie!=ae&&!(Q&&ae>ie))return!1;var ve=H.get(l),ge=H.get(f);if(ve&&ge)return ve==f&&ge==l;var ye=-1,_e=!0,Re=g&b?new oo:r;for(H.set(l,f),H.set(f,l);++ye<ie;){var Me=l[ye],He=f[ye];if(R)var Te=Q?R(He,Me,ye,f,l,H):R(Me,He,ye,l,f,H);if(Te!==r){if(Te)continue;_e=!1;break}if(Re){if(!yf(f,function(Ge,Xe){if(!Ga(Re,Xe)&&(Me===Ge||M(Me,Ge,g,R,H)))return Re.push(Xe)})){_e=!1;break}}else if(!(Me===He||M(Me,He,g,R,H))){_e=!1;break}}return H.delete(l),H.delete(f),_e}function E8(l,f,g,R,M,H,Q){switch(g){case Qe:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case je:return!(l.byteLength!=f.byteLength||!H(new Vl(l),new Vl(f)));case J:case Y:case le:return An(+l,+f);case te:return l.name==f.name&&l.message==f.message;case De:case Ae:return l==f+"";case be:var ie=Of;case Le:var ae=R&m;if(ie||(ie=Ll),l.size!=f.size&&!ae)return!1;var ve=Q.get(l);if(ve)return ve==f;R|=b,Q.set(l,f);var ge=TS(ie(l),ie(f),R,M,H,Q);return Q.delete(l),ge;case Je:if(Ja)return Ja.call(l)==Ja.call(f)}return!1}function S8(l,f,g,R,M,H){var Q=g&m,ie=Xf(l),ae=ie.length,ve=Xf(f),ge=ve.length;if(ae!=ge&&!Q)return!1;for(var ye=ae;ye--;){var _e=ie[ye];if(!(Q?_e in f:ot.call(f,_e)))return!1}var Re=H.get(l),Me=H.get(f);if(Re&&Me)return Re==f&&Me==l;var He=!0;H.set(l,f),H.set(f,l);for(var Te=Q;++ye<ae;){_e=ie[ye];var Ge=l[_e],Xe=f[_e];if(R)var Jr=Q?R(Xe,Ge,_e,f,l,H):R(Ge,Xe,_e,l,f,H);if(!(Jr===r?Ge===Xe||M(Ge,Xe,g,R,H):Jr)){He=!1;break}Te||(Te=_e=="constructor")}if(He&&!Te){var Sr=l.constructor,Qr=f.constructor;Sr!=Qr&&"constructor"in l&&"constructor"in f&&!(typeof Sr=="function"&&Sr instanceof Sr&&typeof Qr=="function"&&Qr instanceof Qr)&&(He=!1)}return H.delete(l),H.delete(f),He}function di(l){return ih(jS(l,r,WS),l+"")}function Xf(l){return XE(l,nr,eh)}function Zf(l){return XE(l,Ar,PS)}var Jf=Xl?function(l){return Xl.get(l)}:bh;function uc(l){for(var f=l.name+"",g=Wo[f],R=ot.call(Wo,f)?g.length:0;R--;){var M=g[R],H=M.func;if(H==null||H==l)return M.name}return f}function Yo(l){var f=ot.call(F,"placeholder")?F:l;return f.placeholder}function Pe(){var l=F.iteratee||gh;return l=l===gh?QE:l,arguments.length?l(arguments[0],arguments[1]):l}function dc(l,f){var g=l.__data__;return k8(f)?g[typeof f=="string"?"string":"hash"]:g.map}function Qf(l){for(var f=nr(l),g=f.length;g--;){var R=f[g],M=l[R];f[g]=[R,M,AS(M)]}return f}function lo(l,f){var g=Dz(l,f);return JE(g)?g:r}function O8(l){var f=ot.call(l,no),g=l[no];try{l[no]=r;var R=!0}catch{}var M=$l.call(l);return R&&(f?l[no]=g:delete l[no]),M}var eh=If?function(l){return l==null?[]:(l=vt(l),Oi(If(l),function(f){return qE.call(l,f)}))}:yh,PS=If?function(l){for(var f=[];l;)Ci(f,eh(l)),l=Wl(l);return f}:yh,br=_r;(Rf&&br(new Rf(new ArrayBuffer(1)))!=Qe||Ya&&br(new Ya)!=be||Nf&&br(Nf.resolve())!=Se||Vo&&br(new Vo)!=Le||Xa&&br(new Xa)!=tt)&&(br=function(l){var f=_r(l),g=f==we?l.constructor:r,R=g?co(g):"";if(R)switch(R){case s7:return Qe;case l7:return be;case c7:return Se;case u7:return Le;case d7:return tt}return f});function C8(l,f,g){for(var R=-1,M=g.length;++R<M;){var H=g[R],Q=H.size;switch(H.type){case"drop":l+=Q;break;case"dropRight":f-=Q;break;case"take":f=mr(f,l+Q);break;case"takeRight":l=Xt(l,f-Q);break}}return{start:l,end:f}}function I8(l){var f=l.match(Bt);return f?f[1].split(Ft):[]}function kS(l,f,g){f=Pi(f,l);for(var R=-1,M=f.length,H=!1;++R<M;){var Q=Mn(f[R]);if(!(H=l!=null&&g(l,Q)))break;l=l[Q]}return H||++R!=M?H:(M=l==null?0:l.length,!!M&&bc(M)&&fi(Q,M)&&(ze(l)||uo(l)))}function R8(l){var f=l.length,g=new l.constructor(f);return f&&typeof l[0]=="string"&&ot.call(l,"index")&&(g.index=l.index,g.input=l.input),g}function MS(l){return typeof l.constructor=="function"&&!os(l)?Uo(Wl(l)):{}}function N8(l,f,g){var R=l.constructor;switch(f){case je:return Gf(l);case J:case Y:return new R(+l);case Qe:return f8(l,g);case Ue:case Wt:case Ut:case St:case Nt:case wr:case sn:case Tr:case ar:return vS(l,g);case be:return new R;case le:case Ae:return new R(l);case De:return h8(l);case Le:return new R;case Je:return p8(l)}}function T8(l,f){var g=f.length;if(!g)return l;var R=g-1;return f[R]=(g>1?"& ":"")+f[R],f=f.join(g>2?", ":" "),l.replace(bt,`{
71
- /* [wrapped with `+f+`] */
72
- `)}function P8(l){return ze(l)||uo(l)||!!(LE&&l&&l[LE])}function fi(l,f){var g=typeof l;return f=f??ne,!!f&&(g=="number"||g!="symbol"&&ef.test(l))&&l>-1&&l%1==0&&l<f}function Er(l,f,g){if(!It(g))return!1;var R=typeof f;return(R=="number"?Mr(g)&&fi(f,g.length):R=="string"&&f in g)?An(g[f],l):!1}function th(l,f){if(ze(l))return!1;var g=typeof l;return g=="number"||g=="symbol"||g=="boolean"||l==null||Zr(l)?!0:Gt.test(l)||!pt.test(l)||f!=null&&l in vt(f)}function k8(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function rh(l){var f=uc(l),g=F[f];if(typeof g!="function"||!(f in Ye.prototype))return!1;if(l===g)return!0;var R=Jf(g);return!!R&&l===R[0]}function M8(l){return!!AE&&AE in l}var A8=Bl?hi:xh;function os(l){var f=l&&l.constructor,g=typeof f=="function"&&f.prototype||Ho;return l===g}function AS(l){return l===l&&!It(l)}function DS(l,f){return function(g){return g==null?!1:g[l]===f&&(f!==r||l in vt(g))}}function D8(l){var f=gc(l,function(R){return g.size===d&&g.clear(),R}),g=f.cache;return f}function j8(l,f){var g=l[1],R=f[1],M=g|R,H=M<(w|y|T),Q=R==T&&g==S||R==T&&g==k&&l[7].length<=f[8]||R==(T|k)&&f[7].length<=f[8]&&g==S;if(!(H||Q))return l;R&w&&(l[2]=f[2],M|=g&w?0:_);var ie=f[3];if(ie){var ae=l[3];l[3]=ae?mS(ae,ie,f[4]):ie,l[4]=ae?Ii(l[3],h):f[4]}return ie=f[5],ie&&(ae=l[5],l[5]=ae?bS(ae,ie,f[6]):ie,l[6]=ae?Ii(l[5],h):f[6]),ie=f[7],ie&&(l[7]=ie),R&T&&(l[8]=l[8]==null?f[8]:mr(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=M,l}function q8(l){var f=[];if(l!=null)for(var g in vt(l))f.push(g);return f}function L8(l){return $l.call(l)}function jS(l,f,g){return f=Xt(f===r?l.length-1:f,0),function(){for(var R=arguments,M=-1,H=Xt(R.length-f,0),Q=de(H);++M<H;)Q[M]=R[f+M];M=-1;for(var ie=de(f+1);++M<f;)ie[M]=R[M];return ie[f]=g(Q),Gr(l,this,ie)}}function qS(l,f){return f.length<2?l:so(l,gn(f,0,-1))}function z8(l,f){for(var g=l.length,R=mr(f.length,g),M=kr(l);R--;){var H=f[R];l[R]=fi(H,g)?M[H]:r}return l}function nh(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var LS=BS(sS),as=e7||function(l,f){return ur.setTimeout(l,f)},ih=BS(l8);function zS(l,f,g){var R=f+"";return ih(l,T8(R,B8(I8(R),g)))}function BS(l){var f=0,g=0;return function(){var R=i7(),M=P-(R-g);if(g=R,M>0){if(++f>=z)return arguments[0]}else f=0;return l.apply(r,arguments)}}function fc(l,f){var g=-1,R=l.length,M=R-1;for(f=f===r?R:f;++g<f;){var H=Bf(g,M),Q=l[H];l[H]=l[g],l[g]=Q}return l.length=f,l}var FS=D8(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(Kt,function(g,R,M,H){f.push(M?H.replace(ln,"$1"):R||g)}),f});function Mn(l){if(typeof l=="string"||Zr(l))return l;var f=l+"";return f=="0"&&1/l==-X?"-0":f}function co(l){if(l!=null){try{return Fl.call(l)}catch{}try{return l+""}catch{}}return""}function B8(l,f){return Kr(W,function(g){var R="_."+g[0];f&g[1]&&!jl(l,R)&&l.push(R)}),l.sort()}function $S(l){if(l instanceof Ye)return l.clone();var f=new pn(l.__wrapped__,l.__chain__);return f.__actions__=kr(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function F8(l,f,g){(g?Er(l,f,g):f===r)?f=1:f=Xt($e(f),0);var R=l==null?0:l.length;if(!R||f<1)return[];for(var M=0,H=0,Q=de(Kl(R/f));M<R;)Q[H++]=gn(l,M,M+=f);return Q}function $8(l){for(var f=-1,g=l==null?0:l.length,R=0,M=[];++f<g;){var H=l[f];H&&(M[R++]=H)}return M}function H8(){var l=arguments.length;if(!l)return[];for(var f=de(l-1),g=arguments[0],R=l;R--;)f[R-1]=arguments[R];return Ci(ze(g)?kr(g):[g],dr(f,1))}var V8=Ve(function(l,f){return Dt(l)?es(l,dr(f,1,Dt,!0)):[]}),W8=Ve(function(l,f){var g=mn(f);return Dt(g)&&(g=r),Dt(l)?es(l,dr(f,1,Dt,!0),Pe(g,2)):[]}),U8=Ve(function(l,f){var g=mn(f);return Dt(g)&&(g=r),Dt(l)?es(l,dr(f,1,Dt,!0),r,g):[]});function G8(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:$e(f),gn(l,f<0?0:f,R)):[]}function K8(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:$e(f),f=R-f,gn(l,0,f<0?0:f)):[]}function Y8(l,f){return l&&l.length?ic(l,Pe(f,3),!0,!0):[]}function X8(l,f){return l&&l.length?ic(l,Pe(f,3),!0):[]}function Z8(l,f,g,R){var M=l==null?0:l.length;return M?(g&&typeof g!="number"&&Er(l,f,g)&&(g=0,R=M),H7(l,f,g,R)):[]}function HS(l,f,g){var R=l==null?0:l.length;if(!R)return-1;var M=g==null?0:$e(g);return M<0&&(M=Xt(R+M,0)),ql(l,Pe(f,3),M)}function VS(l,f,g){var R=l==null?0:l.length;if(!R)return-1;var M=R-1;return g!==r&&(M=$e(g),M=g<0?Xt(R+M,0):mr(M,R-1)),ql(l,Pe(f,3),M,!0)}function WS(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,X):[]}function Q8(l,f){var g=l==null?0:l.length;return g?(f=f===r?1:$e(f),dr(l,f)):[]}function eB(l){for(var f=-1,g=l==null?0:l.length,R={};++f<g;){var M=l[f];Un(R,M[0],M[1])}return R}function US(l){return l&&l.length?l[0]:r}function tB(l,f,g){var R=l==null?0:l.length;if(!R)return-1;var M=g==null?0:$e(g);return M<0&&(M=Xt(R+M,0)),zo(l,f,M)}function rB(l){var f=l==null?0:l.length;return f?gn(l,0,-1):[]}var nB=Ve(function(l){var f=Ot(l,Wf);return f.length&&f[0]===l[0]?Df(f):[]}),iB=Ve(function(l){var f=mn(l),g=Ot(l,Wf);return f===mn(g)?f=r:g.pop(),g.length&&g[0]===l[0]?Df(g,Pe(f,2)):[]}),oB=Ve(function(l){var f=mn(l),g=Ot(l,Wf);return f=typeof f=="function"?f:r,f&&g.pop(),g.length&&g[0]===l[0]?Df(g,r,f):[]});function aB(l,f){return l==null?"":r7.call(l,f)}function mn(l){var f=l==null?0:l.length;return f?l[f-1]:r}function sB(l,f,g){var R=l==null?0:l.length;if(!R)return-1;var M=R;return g!==r&&(M=$e(g),M=M<0?Xt(R+M,0):mr(M,R-1)),f===f?Bz(l,f,M):ql(l,CE,M,!0)}function lB(l,f){return l&&l.length?nS(l,$e(f)):r}var cB=Ve(GS);function GS(l,f){return l&&l.length&&f&&f.length?zf(l,f):l}function uB(l,f,g){return l&&l.length&&f&&f.length?zf(l,f,Pe(g,2)):l}function dB(l,f,g){return l&&l.length&&f&&f.length?zf(l,f,r,g):l}var fB=di(function(l,f){var g=l==null?0:l.length,R=Pf(l,f);return aS(l,Ot(f,function(M){return fi(M,g)?+M:M}).sort(gS)),R});function hB(l,f){var g=[];if(!(l&&l.length))return g;var R=-1,M=[],H=l.length;for(f=Pe(f,3);++R<H;){var Q=l[R];f(Q,R,l)&&(g.push(Q),M.push(R))}return aS(l,M),g}function oh(l){return l==null?l:a7.call(l)}function pB(l,f,g){var R=l==null?0:l.length;return R?(g&&typeof g!="number"&&Er(l,f,g)?(f=0,g=R):(f=f==null?0:$e(f),g=g===r?R:$e(g)),gn(l,f,g)):[]}function vB(l,f){return nc(l,f)}function gB(l,f,g){return $f(l,f,Pe(g,2))}function mB(l,f){var g=l==null?0:l.length;if(g){var R=nc(l,f);if(R<g&&An(l[R],f))return R}return-1}function bB(l,f){return nc(l,f,!0)}function yB(l,f,g){return $f(l,f,Pe(g,2),!0)}function xB(l,f){var g=l==null?0:l.length;if(g){var R=nc(l,f,!0)-1;if(An(l[R],f))return R}return-1}function wB(l){return l&&l.length?lS(l):[]}function _B(l,f){return l&&l.length?lS(l,Pe(f,2)):[]}function EB(l){var f=l==null?0:l.length;return f?gn(l,1,f):[]}function SB(l,f,g){return l&&l.length?(f=g||f===r?1:$e(f),gn(l,0,f<0?0:f)):[]}function OB(l,f,g){var R=l==null?0:l.length;return R?(f=g||f===r?1:$e(f),f=R-f,gn(l,f<0?0:f,R)):[]}function CB(l,f){return l&&l.length?ic(l,Pe(f,3),!1,!0):[]}function IB(l,f){return l&&l.length?ic(l,Pe(f,3)):[]}var RB=Ve(function(l){return Ti(dr(l,1,Dt,!0))}),NB=Ve(function(l){var f=mn(l);return Dt(f)&&(f=r),Ti(dr(l,1,Dt,!0),Pe(f,2))}),TB=Ve(function(l){var f=mn(l);return f=typeof f=="function"?f:r,Ti(dr(l,1,Dt,!0),r,f)});function PB(l){return l&&l.length?Ti(l):[]}function kB(l,f){return l&&l.length?Ti(l,Pe(f,2)):[]}function MB(l,f){return f=typeof f=="function"?f:r,l&&l.length?Ti(l,r,f):[]}function ah(l){if(!(l&&l.length))return[];var f=0;return l=Oi(l,function(g){if(Dt(g))return f=Xt(g.length,f),!0}),Ef(f,function(g){return Ot(l,xf(g))})}function KS(l,f){if(!(l&&l.length))return[];var g=ah(l);return f==null?g:Ot(g,function(R){return Gr(f,r,R)})}var AB=Ve(function(l,f){return Dt(l)?es(l,f):[]}),DB=Ve(function(l){return Vf(Oi(l,Dt))}),jB=Ve(function(l){var f=mn(l);return Dt(f)&&(f=r),Vf(Oi(l,Dt),Pe(f,2))}),qB=Ve(function(l){var f=mn(l);return f=typeof f=="function"?f:r,Vf(Oi(l,Dt),r,f)}),LB=Ve(ah);function zB(l,f){return fS(l||[],f||[],Qa)}function BB(l,f){return fS(l||[],f||[],ns)}var FB=Ve(function(l){var f=l.length,g=f>1?l[f-1]:r;return g=typeof g=="function"?(l.pop(),g):r,KS(l,g)});function YS(l){var f=F(l);return f.__chain__=!0,f}function $B(l,f){return f(l),l}function hc(l,f){return f(l)}var HB=di(function(l){var f=l.length,g=f?l[0]:0,R=this.__wrapped__,M=function(H){return Pf(H,l)};return f>1||this.__actions__.length||!(R instanceof Ye)||!fi(g)?this.thru(M):(R=R.slice(g,+g+(f?1:0)),R.__actions__.push({func:hc,args:[M],thisArg:r}),new pn(R,this.__chain__).thru(function(H){return f&&!H.length&&H.push(r),H}))});function VB(){return YS(this)}function WB(){return new pn(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,g=this;g instanceof Jl;){var R=$S(g);R.__index__=0,R.__values__=r,f?M.__wrapped__=R:f=R;var M=R;g=g.__wrapped__}return M.__wrapped__=l,f}function YB(){var l=this.__wrapped__;if(l instanceof Ye){var f=l;return this.__actions__.length&&(f=new Ye(this)),f=f.reverse(),f.__actions__.push({func:hc,args:[oh],thisArg:r}),new pn(f,this.__chain__)}return this.thru(oh)}function XB(){return dS(this.__wrapped__,this.__actions__)}var ZB=oc(function(l,f,g){ot.call(l,g)?++l[g]:Un(l,g,1)});function JB(l,f,g){var R=ze(l)?SE:$7;return g&&Er(l,f,g)&&(f=r),R(l,Pe(f,3))}function QB(l,f){var g=ze(l)?Oi:KE;return g(l,Pe(f,3))}var e9=_S(HS),t9=_S(VS);function r9(l,f){return dr(pc(l,f),1)}function n9(l,f){return dr(pc(l,f),X)}function i9(l,f,g){return g=g===r?1:$e(g),dr(pc(l,f),g)}function XS(l,f){var g=ze(l)?Kr:Ni;return g(l,Pe(f,3))}function ZS(l,f){var g=ze(l)?Ez:GE;return g(l,Pe(f,3))}var o9=oc(function(l,f,g){ot.call(l,g)?l[g].push(f):Un(l,g,[f])});function a9(l,f,g,R){l=Mr(l)?l:Zo(l),g=g&&!R?$e(g):0;var M=l.length;return g<0&&(g=Xt(M+g,0)),yc(l)?g<=M&&l.indexOf(f,g)>-1:!!M&&zo(l,f,g)>-1}var s9=Ve(function(l,f,g){var R=-1,M=typeof f=="function",H=Mr(l)?de(l.length):[];return Ni(l,function(Q){H[++R]=M?Gr(f,Q,g):ts(Q,f,g)}),H}),l9=oc(function(l,f,g){Un(l,g,f)});function pc(l,f){var g=ze(l)?Ot:eS;return g(l,Pe(f,3))}function c9(l,f,g,R){return l==null?[]:(ze(f)||(f=f==null?[]:[f]),g=R?r:g,ze(g)||(g=g==null?[]:[g]),iS(l,f,g))}var u9=oc(function(l,f,g){l[g?0:1].push(f)},function(){return[[],[]]});function d9(l,f,g){var R=ze(l)?bf:RE,M=arguments.length<3;return R(l,Pe(f,4),g,M,Ni)}function f9(l,f,g){var R=ze(l)?Sz:RE,M=arguments.length<3;return R(l,Pe(f,4),g,M,GE)}function h9(l,f){var g=ze(l)?Oi:KE;return g(l,mc(Pe(f,3)))}function p9(l){var f=ze(l)?HE:a8;return f(l)}function v9(l,f,g){(g?Er(l,f,g):f===r)?f=1:f=$e(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(Mr(l))return yc(l)?Fo(l):l.length;var f=br(l);return f==be||f==Le?l.size:qf(l).length}function b9(l,f,g){var R=ze(l)?yf:u8;return g&&Er(l,f,g)&&(f=r),R(l,Pe(f,3))}var y9=Ve(function(l,f){if(l==null)return[];var g=f.length;return g>1&&Er(l,f[0],f[1])?f=[]:g>2&&Er(f[0],f[1],f[2])&&(f=[f[0]]),iS(l,dr(f,1),[])}),vc=Qz||function(){return ur.Date.now()};function x9(l,f){if(typeof f!="function")throw new hn(a);return l=$e(l),function(){if(--l<1)return f.apply(this,arguments)}}function JS(l,f,g){return f=g?r:f,f=l&&f==null?l.length:f,ui(l,T,r,r,r,r,f)}function QS(l,f){var g;if(typeof f!="function")throw new hn(a);return l=$e(l),function(){return--l>0&&(g=f.apply(this,arguments)),l<=1&&(f=r),g}}var sh=Ve(function(l,f,g){var R=w;if(g.length){var M=Ii(g,Yo(sh));R|=I}return ui(l,R,f,g,M)}),eO=Ve(function(l,f,g){var R=w|y;if(g.length){var M=Ii(g,Yo(eO));R|=I}return ui(f,R,l,g,M)});function tO(l,f,g){f=g?r:f;var R=ui(l,S,r,r,r,r,r,f);return R.placeholder=tO.placeholder,R}function rO(l,f,g){f=g?r:f;var R=ui(l,E,r,r,r,r,r,f);return R.placeholder=rO.placeholder,R}function nO(l,f,g){var R,M,H,Q,ie,ae,ve=0,ge=!1,ye=!1,_e=!0;if(typeof l!="function")throw new hn(a);f=bn(f)||0,It(g)&&(ge=!!g.leading,ye="maxWait"in g,H=ye?Xt(bn(g.maxWait)||0,f):H,_e="trailing"in g?!!g.trailing:_e);function Re(jt){var Dn=R,vi=M;return R=M=r,ve=jt,Q=l.apply(vi,Dn),Q}function Me(jt){return ve=jt,ie=as(Ge,f),ge?Re(jt):Q}function He(jt){var Dn=jt-ae,vi=jt-ve,EO=f-Dn;return ye?mr(EO,H-vi):EO}function Te(jt){var Dn=jt-ae,vi=jt-ve;return ae===r||Dn>=f||Dn<0||ye&&vi>=H}function Ge(){var jt=vc();if(Te(jt))return Xe(jt);ie=as(Ge,He(jt))}function Xe(jt){return ie=r,_e&&R?Re(jt):(R=M=r,Q)}function Jr(){ie!==r&&hS(ie),ve=0,R=ae=M=ie=r}function Sr(){return ie===r?Q:Xe(vc())}function Qr(){var jt=vc(),Dn=Te(jt);if(R=arguments,M=this,ae=jt,Dn){if(ie===r)return Me(ae);if(ye)return hS(ie),ie=as(Ge,f),Re(ae)}return ie===r&&(ie=as(Ge,f)),Q}return Qr.cancel=Jr,Qr.flush=Sr,Qr}var w9=Ve(function(l,f){return UE(l,1,f)}),_9=Ve(function(l,f,g){return UE(l,bn(f)||0,g)});function E9(l){return ui(l,L)}function gc(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new hn(a);var g=function(){var R=arguments,M=f?f.apply(this,R):R[0],H=g.cache;if(H.has(M))return H.get(M);var Q=l.apply(this,R);return g.cache=H.set(M,Q)||H,Q};return g.cache=new(gc.Cache||ci),g}gc.Cache=ci;function mc(l){if(typeof l!="function")throw new hn(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 S9(l){return QS(2,l)}var O9=d8(function(l,f){f=f.length==1&&ze(f[0])?Ot(f[0],Yr(Pe())):Ot(dr(f,1),Yr(Pe()));var g=f.length;return Ve(function(R){for(var M=-1,H=mr(R.length,g);++M<H;)R[M]=f[M].call(this,R[M]);return Gr(l,this,R)})}),lh=Ve(function(l,f){var g=Ii(f,Yo(lh));return ui(l,I,r,f,g)}),iO=Ve(function(l,f){var g=Ii(f,Yo(iO));return ui(l,N,r,f,g)}),C9=di(function(l,f){return ui(l,k,r,r,r,f)});function I9(l,f){if(typeof l!="function")throw new hn(a);return f=f===r?f:$e(f),Ve(l,f)}function R9(l,f){if(typeof l!="function")throw new hn(a);return f=f==null?0:Xt($e(f),0),Ve(function(g){var R=g[f],M=ki(g,0,f);return R&&Ci(M,R),Gr(l,this,M)})}function N9(l,f,g){var R=!0,M=!0;if(typeof l!="function")throw new hn(a);return It(g)&&(R="leading"in g?!!g.leading:R,M="trailing"in g?!!g.trailing:M),nO(l,f,{leading:R,maxWait:f,trailing:M})}function T9(l){return JS(l,1)}function P9(l,f){return lh(Uf(f),l)}function k9(){if(!arguments.length)return[];var l=arguments[0];return ze(l)?l:[l]}function M9(l){return vn(l,x)}function A9(l,f){return f=typeof f=="function"?f:r,vn(l,x,f)}function D9(l){return vn(l,p|x)}function j9(l,f){return f=typeof f=="function"?f:r,vn(l,p|x,f)}function q9(l,f){return f==null||WE(l,f,nr(f))}function An(l,f){return l===f||l!==l&&f!==f}var L9=cc(Af),z9=cc(function(l,f){return l>=f}),uo=ZE((function(){return arguments})())?ZE:function(l){return Tt(l)&&ot.call(l,"callee")&&!qE.call(l,"callee")},ze=de.isArray,B9=bE?Yr(bE):K7;function Mr(l){return l!=null&&bc(l.length)&&!hi(l)}function Dt(l){return Tt(l)&&Mr(l)}function F9(l){return l===!0||l===!1||Tt(l)&&_r(l)==J}var Mi=t7||xh,$9=yE?Yr(yE):Y7;function H9(l){return Tt(l)&&l.nodeType===1&&!ss(l)}function V9(l){if(l==null)return!0;if(Mr(l)&&(ze(l)||typeof l=="string"||typeof l.splice=="function"||Mi(l)||Xo(l)||uo(l)))return!l.length;var f=br(l);if(f==be||f==Le)return!l.size;if(os(l))return!qf(l).length;for(var g in l)if(ot.call(l,g))return!1;return!0}function W9(l,f){return rs(l,f)}function U9(l,f,g){g=typeof g=="function"?g:r;var R=g?g(l,f):r;return R===r?rs(l,f,r,g):!!R}function ch(l){if(!Tt(l))return!1;var f=_r(l);return f==te||f==se||typeof l.message=="string"&&typeof l.name=="string"&&!ss(l)}function G9(l){return typeof l=="number"&&zE(l)}function hi(l){if(!It(l))return!1;var f=_r(l);return f==he||f==ce||f==V||f==Ne}function oO(l){return typeof l=="number"&&l==$e(l)}function bc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=ne}function It(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Tt(l){return l!=null&&typeof l=="object"}var aO=xE?Yr(xE):Z7;function K9(l,f){return l===f||jf(l,f,Qf(f))}function Y9(l,f,g){return g=typeof g=="function"?g:r,jf(l,f,Qf(f),g)}function X9(l){return sO(l)&&l!=+l}function Z9(l){if(A8(l))throw new qe(o);return JE(l)}function J9(l){return l===null}function Q9(l){return l==null}function sO(l){return typeof l=="number"||Tt(l)&&_r(l)==le}function ss(l){if(!Tt(l)||_r(l)!=we)return!1;var f=Wl(l);if(f===null)return!0;var g=ot.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&Fl.call(g)==Yz}var uh=wE?Yr(wE):J7;function eF(l){return oO(l)&&l>=-ne&&l<=ne}var lO=_E?Yr(_E):Q7;function yc(l){return typeof l=="string"||!ze(l)&&Tt(l)&&_r(l)==Ae}function Zr(l){return typeof l=="symbol"||Tt(l)&&_r(l)==Je}var Xo=EE?Yr(EE):e8;function tF(l){return l===r}function rF(l){return Tt(l)&&br(l)==tt}function nF(l){return Tt(l)&&_r(l)==Be}var iF=cc(Lf),oF=cc(function(l,f){return l<=f});function cO(l){if(!l)return[];if(Mr(l))return yc(l)?Pn(l):kr(l);if(Ka&&l[Ka])return qz(l[Ka]());var f=br(l),g=f==be?Of:f==Le?Ll:Zo;return g(l)}function pi(l){if(!l)return l===0?l:0;if(l=bn(l),l===X||l===-X){var f=l<0?-1:1;return f*D}return l===l?l:0}function $e(l){var f=pi(l),g=f%1;return f===f?g?f-g:f:0}function uO(l){return l?ao($e(l),0,Z):0}function bn(l){if(typeof l=="number")return l;if(Zr(l))return $;if(It(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=It(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=NE(l);var g=si.test(l);return g||Qd.test(l)?xz(l.slice(2),g?2:8):dn.test(l)?$:+l}function dO(l){return Kn(l,Ar(l))}function aF(l){return l?ao($e(l),-ne,ne):l===0?l:0}function at(l){return l==null?"":Xr(l)}var sF=Go(function(l,f){if(os(f)||Mr(f)){Kn(f,nr(f),l);return}for(var g in f)ot.call(f,g)&&Qa(l,g,f[g])}),fO=Go(function(l,f){Kn(f,Ar(f),l)}),hO=Go(function(l,f,g,R){Kn(f,Ar(f),l,R)}),dh=Go(function(l,f,g,R){Kn(f,nr(f),l,R)}),lF=di(Pf);function cF(l,f){var g=Uo(l);return f==null?g:VE(g,f)}var uF=Ve(function(l,f){l=vt(l);var g=-1,R=f.length,M=R>2?f[2]:r;for(M&&Er(f[0],f[1],M)&&(R=1);++g<R;)for(var H=f[g],Q=Ar(H),ie=-1,ae=Q.length;++ie<ae;){var ve=Q[ie],ge=l[ve];(ge===r||An(ge,Ho[ve])&&!ot.call(l,ve))&&(l[ve]=H[ve])}return l}),dF=Ve(function(l){return l.push(r,NS),Gr(pO,r,l)});function fF(l,f){return OE(l,Pe(f,3),Gn)}function hF(l,f){return OE(l,Pe(f,3),Mf)}function pF(l,f){return l==null?l:kf(l,Pe(f,3),Ar)}function vF(l,f){return l==null?l:YE(l,Pe(f,3),Ar)}function gF(l,f){return l&&Gn(l,Pe(f,3))}function mF(l,f){return l&&Mf(l,Pe(f,3))}function bF(l){return l==null?[]:tc(l,nr(l))}function yF(l){return l==null?[]:tc(l,Ar(l))}function fh(l,f,g){var R=l==null?r:so(l,f);return R===r?g:R}function xF(l,f){return l!=null&&kS(l,f,V7)}function hh(l,f){return l!=null&&kS(l,f,W7)}var wF=SS(function(l,f,g){f!=null&&typeof f.toString!="function"&&(f=$l.call(f)),l[f]=g},vh(Dr)),_F=SS(function(l,f,g){f!=null&&typeof f.toString!="function"&&(f=$l.call(f)),ot.call(l,f)?l[f].push(g):l[f]=[g]},Pe),EF=Ve(ts);function nr(l){return Mr(l)?$E(l):qf(l)}function Ar(l){return Mr(l)?$E(l,!0):t8(l)}function SF(l,f){var g={};return f=Pe(f,3),Gn(l,function(R,M,H){Un(g,f(R,M,H),R)}),g}function OF(l,f){var g={};return f=Pe(f,3),Gn(l,function(R,M,H){Un(g,M,f(R,M,H))}),g}var CF=Go(function(l,f,g){rc(l,f,g)}),pO=Go(function(l,f,g,R){rc(l,f,g,R)}),IF=di(function(l,f){var g={};if(l==null)return g;var R=!1;f=Ot(f,function(H){return H=Pi(H,l),R||(R=H.length>1),H}),Kn(l,Zf(l),g),R&&(g=vn(g,p|v|x,_8));for(var M=f.length;M--;)Hf(g,f[M]);return g});function RF(l,f){return vO(l,mc(Pe(f)))}var NF=di(function(l,f){return l==null?{}:n8(l,f)});function vO(l,f){if(l==null)return{};var g=Ot(Zf(l),function(R){return[R]});return f=Pe(f),oS(l,g,function(R,M){return f(R,M[0])})}function TF(l,f,g){f=Pi(f,l);var R=-1,M=f.length;for(M||(M=1,l=r);++R<M;){var H=l==null?r:l[Mn(f[R])];H===r&&(R=M,H=g),l=hi(H)?H.call(l):H}return l}function PF(l,f,g){return l==null?l:ns(l,f,g)}function kF(l,f,g,R){return R=typeof R=="function"?R:r,l==null?l:ns(l,f,g,R)}var gO=IS(nr),mO=IS(Ar);function MF(l,f,g){var R=ze(l),M=R||Mi(l)||Xo(l);if(f=Pe(f,4),g==null){var H=l&&l.constructor;M?g=R?new H:[]:It(l)?g=hi(H)?Uo(Wl(l)):{}:g={}}return(M?Kr:Gn)(l,function(Q,ie,ae){return f(g,Q,ie,ae)}),g}function AF(l,f){return l==null?!0:Hf(l,f)}function DF(l,f,g){return l==null?l:uS(l,f,Uf(g))}function jF(l,f,g,R){return R=typeof R=="function"?R:r,l==null?l:uS(l,f,Uf(g),R)}function Zo(l){return l==null?[]:Sf(l,nr(l))}function qF(l){return l==null?[]:Sf(l,Ar(l))}function LF(l,f,g){return g===r&&(g=f,f=r),g!==r&&(g=bn(g),g=g===g?g:0),f!==r&&(f=bn(f),f=f===f?f:0),ao(bn(l),f,g)}function zF(l,f,g){return f=pi(f),g===r?(g=f,f=0):g=pi(g),l=bn(l),U7(l,f,g)}function BF(l,f,g){if(g&&typeof g!="boolean"&&Er(l,f,g)&&(f=g=r),g===r&&(typeof f=="boolean"?(g=f,f=r):typeof l=="boolean"&&(g=l,l=r)),l===r&&f===r?(l=0,f=1):(l=pi(l),f===r?(f=l,l=0):f=pi(f)),l>f){var R=l;l=f,f=R}if(g||l%1||f%1){var M=BE();return mr(l+M*(f-l+yz("1e-"+((M+"").length-1))),f)}return Bf(l,f)}var FF=Ko(function(l,f,g){return f=f.toLowerCase(),l+(g?bO(f):f)});function bO(l){return ph(at(l).toLowerCase())}function yO(l){return l=at(l),l&&l.replace(tf,kz).replace(cz,"")}function $F(l,f,g){l=at(l),f=Xr(f);var R=l.length;g=g===r?R:ao($e(g),0,R);var M=g;return g-=f.length,g>=0&&l.slice(g,M)==f}function HF(l){return l=at(l),l&&Lt.test(l)?l.replace(At,Mz):l}function VF(l){return l=at(l),l&&vr.test(l)?l.replace(rr,"\\$&"):l}var WF=Ko(function(l,f,g){return l+(g?"-":"")+f.toLowerCase()}),UF=Ko(function(l,f,g){return l+(g?" ":"")+f.toLowerCase()}),GF=wS("toLowerCase");function KF(l,f,g){l=at(l),f=$e(f);var R=f?Fo(l):0;if(!f||R>=f)return l;var M=(f-R)/2;return lc(Yl(M),g)+l+lc(Kl(M),g)}function YF(l,f,g){l=at(l),f=$e(f);var R=f?Fo(l):0;return f&&R<f?l+lc(f-R,g):l}function XF(l,f,g){l=at(l),f=$e(f);var R=f?Fo(l):0;return f&&R<f?lc(f-R,g)+l:l}function ZF(l,f,g){return g||f==null?f=0:f&&(f=+f),o7(at(l).replace(cr,""),f||0)}function JF(l,f,g){return(g?Er(l,f,g):f===r)?f=1:f=$e(f),Ff(at(l),f)}function QF(){var l=arguments,f=at(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var e$=Ko(function(l,f,g){return l+(g?"_":"")+f.toLowerCase()});function t$(l,f,g){return g&&typeof g!="number"&&Er(l,f,g)&&(f=g=r),g=g===r?Z:g>>>0,g?(l=at(l),l&&(typeof f=="string"||f!=null&&!uh(f))&&(f=Xr(f),!f&&Bo(l))?ki(Pn(l),0,g):l.split(f,g)):[]}var r$=Ko(function(l,f,g){return l+(g?" ":"")+ph(f)});function n$(l,f,g){return l=at(l),g=g==null?0:ao($e(g),0,l.length),f=Xr(f),l.slice(g,g+f.length)==f}function i$(l,f,g){var R=F.templateSettings;g&&Er(l,f,g)&&(f=r),l=at(l),f=dh({},f,R,RS);var M=dh({},f.imports,R.imports,RS),H=nr(M),Q=Sf(M,H);Kr(H,function(Te){if(Pr.test(Te))throw new qe(c)});var ie,ae,ve=0,ge=f.interpolate||eo,ye="__p += '",_e=Cf((f.escape||eo).source+"|"+ge.source+"|"+(ge===Ur?cn:eo).source+"|"+(f.evaluate||eo).source+"|$","g"),Re="//# sourceURL="+(ot.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pz+"]")+`
73
- `;l.replace(_e,function(Te,Ge,Xe,Jr,Sr,Qr){return Xe||(Xe=Jr),ye+=l.slice(ve,Qr).replace(rf,Az),Ge&&(ie=!0,ye+=`' +
74
- __e(`+Ge+`) +
75
- '`),Sr&&(ae=!0,ye+=`';
76
- `+Sr+`;
77
- __p += '`),Xe&&(ye+=`' +
78
- ((__t = (`+Xe+`)) == null ? '' : __t) +
79
- '`),ve=Qr+Te.length,Te}),ye+=`';
80
- `;var Me=ot.call(f,"variable")&&f.variable;if(!Me)ye=`with (obj) {
50
+ */var TZ=Aa.exports,DN;function AZ(){return DN||(DN=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,P=128,A=256,k=512,L=30,$="...",j=800,D=16,G=1,B=2,Y=3,Z=1/0,te=9007199254740991,U=17976931348623157e292,re=NaN,ae=4294967295,le=ae-1,F=ae>>>1,W=[["ary",P],["bind",b],["bindKey",w],["curry",_],["curryRight",S],["flip",k],["partial",R],["partialRight",I],["rearg",A]],J="[object Arguments]",H="[object Array]",K="[object AsyncFunction]",se="[object Boolean]",oe="[object Date]",fe="[object DOMException]",V="[object Error]",ee="[object Function]",we="[object GeneratorFunction]",be="[object Map]",de="[object Number]",ue="[object Null]",Ee="[object Object]",Pe="[object Promise]",Ze="[object Proxy]",ze="[object RegExp]",Fe="[object Set]",Ve="[object String]",lt="[object Symbol]",ct="[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]",Ur="[object Uint8Array]",Yn="[object Uint8ClampedArray]",Cn="[object Uint16Array]",dr="[object Uint32Array]",Mi=/\b__p \+= '';/g,vc=/\b(__p \+=) '' \+/g,gc=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ko=/&(?:amp|lt|gt|quot|#39);/g,ls=/[&<>"']/g,cs=RegExp(ko.source),mc=RegExp(ls.source),fs=/<%-([\s\S]+?)%>/g,yc=/<%([\s\S]+?)%>/g,Lo=/<%=([\s\S]+?)%>/g,bc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ds=/^\w*$/,xc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Di=/[\\^$.*+?()[\]{}|]/g,wc=RegExp(Di.source),ji=/^\s+/,_c=/\s/,hs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ec=/\{\n\/\* \[wrapped with (.+)\] \*/,Sc=/,? & /,Oc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ps=/[()=,{}\[\]\/\s]/,Cc=/\\(\\)?/g,Rc=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vs=/\w*$/,Ic=/^[-+]0x[0-9a-f]+$/i,Pc=/^0b[01]+$/i,Nc=/^\[object .+?Constructor\]$/,Tc=/^0o[0-7]+$/i,Ac=/^(?:0|[1-9]\d*)$/,Mc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xn=/($^)/,Dc=/['\n\r\u2028\u2029\\]/g,qi="\\ud800-\\udfff",jc="\\u0300-\\u036f",gs="\\ufe20-\\ufe2f",qc="\\u20d0-\\u20ff",Bo=jc+gs+qc,ms="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",kc="\\xac\\xb1\\xd7\\xf7",ys="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Lc="\\u2000-\\u206f",Bc=" \\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",$o="A-Z\\xc0-\\xd6\\xd8-\\xde",bs="\\ufe0e\\ufe0f",xs=kc+ys+Lc+Bc,zo="['’]",Fc="["+qi+"]",Ho="["+xs+"]",ki="["+Bo+"]",Zn="\\d+",$c="["+ms+"]",ws="["+Fo+"]",Tw="[^"+qi+xs+Zn+ms+Fo+$o+"]",zc="\\ud83c[\\udffb-\\udfff]",mL="(?:"+ki+"|"+zc+")",Aw="[^"+qi+"]",Hc="(?:\\ud83c[\\udde6-\\uddff]){2}",Vc="[\\ud800-\\udbff][\\udc00-\\udfff]",Li="["+$o+"]",Mw="\\u200d",Dw="(?:"+ws+"|"+Tw+")",yL="(?:"+Li+"|"+Tw+")",jw="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",qw="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",kw=mL+"?",Lw="["+bs+"]?",bL="(?:"+Mw+"(?:"+[Aw,Hc,Vc].join("|")+")"+Lw+kw+")*",xL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Bw=Lw+kw+bL,_L="(?:"+[$c,Hc,Vc].join("|")+")"+Bw,EL="(?:"+[Aw+ki+"?",ki,Hc,Vc,Fc].join("|")+")",SL=RegExp(zo,"g"),OL=RegExp(ki,"g"),Uc=RegExp(zc+"(?="+zc+")|"+EL+Bw,"g"),CL=RegExp([Li+"?"+ws+"+"+jw+"(?="+[Ho,Li,"$"].join("|")+")",yL+"+"+qw+"(?="+[Ho,Li+Dw,"$"].join("|")+")",Li+"?"+Dw+"+"+jw,Li+"+"+qw,wL,xL,Zn,_L].join("|"),"g"),RL=RegExp("["+Mw+qi+Bo+bs+"]"),IL=/[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"],NL=-1,at={};at[Jt]=at[fr]=at[Dt]=at[_t]=at[jt]=at[Ur]=at[Yn]=at[Cn]=at[dr]=!0,at[J]=at[H]=at[rt]=at[se]=at[bt]=at[oe]=at[V]=at[ee]=at[be]=at[de]=at[Ee]=at[ze]=at[Fe]=at[Ve]=at[mt]=!1;var nt={};nt[J]=nt[H]=nt[rt]=nt[bt]=nt[se]=nt[oe]=nt[Jt]=nt[fr]=nt[Dt]=nt[_t]=nt[jt]=nt[be]=nt[de]=nt[Ee]=nt[ze]=nt[Fe]=nt[Ve]=nt[lt]=nt[Ur]=nt[Yn]=nt[Cn]=nt[dr]=!0,nt[V]=nt[ee]=nt[mt]=!1;var TL={À:"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"},AL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ML={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},DL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jL=parseFloat,qL=parseInt,Fw=typeof ht=="object"&&ht&&ht.Object===Object&&ht,kL=typeof self=="object"&&self&&self.Object===Object&&self,It=Fw||kL||Function("return this")(),Wc=t&&!t.nodeType&&t,Jn=Wc&&!0&&e&&!e.nodeType&&e,$w=Jn&&Jn.exports===Wc,Gc=$w&&Fw.process,hr=(function(){try{var ne=Jn&&Jn.require&&Jn.require("util").types;return ne||Gc&&Gc.binding&&Gc.binding("util")}catch{}})(),zw=hr&&hr.isArrayBuffer,Hw=hr&&hr.isDate,Vw=hr&&hr.isMap,Uw=hr&&hr.isRegExp,Ww=hr&&hr.isSet,Gw=hr&&hr.isTypedArray;function Qt(ne,pe,ce){switch(ce.length){case 0:return ne.call(pe);case 1:return ne.call(pe,ce[0]);case 2:return ne.call(pe,ce[0],ce[1]);case 3:return ne.call(pe,ce[0],ce[1],ce[2])}return ne.apply(pe,ce)}function LL(ne,pe,ce,Oe){for(var Ae=-1,Ue=ne==null?0:ne.length;++Ae<Ue;){var Et=ne[Ae];pe(Oe,Et,ce(Et),ne)}return Oe}function er(ne,pe){for(var ce=-1,Oe=ne==null?0:ne.length;++ce<Oe&&pe(ne[ce],ce,ne)!==!1;);return ne}function BL(ne,pe){for(var ce=ne==null?0:ne.length;ce--&&pe(ne[ce],ce,ne)!==!1;);return ne}function Kw(ne,pe){for(var ce=-1,Oe=ne==null?0:ne.length;++ce<Oe;)if(!pe(ne[ce],ce,ne))return!1;return!0}function Rn(ne,pe){for(var ce=-1,Oe=ne==null?0:ne.length,Ae=0,Ue=[];++ce<Oe;){var Et=ne[ce];pe(Et,ce,ne)&&(Ue[Ae++]=Et)}return Ue}function _s(ne,pe){var ce=ne==null?0:ne.length;return!!ce&&Bi(ne,pe,0)>-1}function Kc(ne,pe,ce){for(var Oe=-1,Ae=ne==null?0:ne.length;++Oe<Ae;)if(ce(pe,ne[Oe]))return!0;return!1}function st(ne,pe){for(var ce=-1,Oe=ne==null?0:ne.length,Ae=Array(Oe);++ce<Oe;)Ae[ce]=pe(ne[ce],ce,ne);return Ae}function In(ne,pe){for(var ce=-1,Oe=pe.length,Ae=ne.length;++ce<Oe;)ne[Ae+ce]=pe[ce];return ne}function Yc(ne,pe,ce,Oe){var Ae=-1,Ue=ne==null?0:ne.length;for(Oe&&Ue&&(ce=ne[++Ae]);++Ae<Ue;)ce=pe(ce,ne[Ae],Ae,ne);return ce}function FL(ne,pe,ce,Oe){var Ae=ne==null?0:ne.length;for(Oe&&Ae&&(ce=ne[--Ae]);Ae--;)ce=pe(ce,ne[Ae],Ae,ne);return ce}function Xc(ne,pe){for(var ce=-1,Oe=ne==null?0:ne.length;++ce<Oe;)if(pe(ne[ce],ce,ne))return!0;return!1}var $L=Zc("length");function zL(ne){return ne.split("")}function HL(ne){return ne.match(Oc)||[]}function Yw(ne,pe,ce){var Oe;return ce(ne,function(Ae,Ue,Et){if(pe(Ae,Ue,Et))return Oe=Ue,!1}),Oe}function Es(ne,pe,ce,Oe){for(var Ae=ne.length,Ue=ce+(Oe?1:-1);Oe?Ue--:++Ue<Ae;)if(pe(ne[Ue],Ue,ne))return Ue;return-1}function Bi(ne,pe,ce){return pe===pe?tB(ne,pe,ce):Es(ne,Xw,ce)}function VL(ne,pe,ce,Oe){for(var Ae=ce-1,Ue=ne.length;++Ae<Ue;)if(Oe(ne[Ae],pe))return Ae;return-1}function Xw(ne){return ne!==ne}function Zw(ne,pe){var ce=ne==null?0:ne.length;return ce?Qc(ne,pe)/ce:re}function Zc(ne){return function(pe){return pe==null?r:pe[ne]}}function Jc(ne){return function(pe){return ne==null?r:ne[pe]}}function Jw(ne,pe,ce,Oe,Ae){return Ae(ne,function(Ue,Et,et){ce=Oe?(Oe=!1,Ue):pe(ce,Ue,Et,et)}),ce}function UL(ne,pe){var ce=ne.length;for(ne.sort(pe);ce--;)ne[ce]=ne[ce].value;return ne}function Qc(ne,pe){for(var ce,Oe=-1,Ae=ne.length;++Oe<Ae;){var Ue=pe(ne[Oe]);Ue!==r&&(ce=ce===r?Ue:ce+Ue)}return ce}function ef(ne,pe){for(var ce=-1,Oe=Array(ne);++ce<ne;)Oe[ce]=pe(ce);return Oe}function WL(ne,pe){return st(pe,function(ce){return[ce,ne[ce]]})}function Qw(ne){return ne&&ne.slice(0,n_(ne)+1).replace(ji,"")}function tr(ne){return function(pe){return ne(pe)}}function tf(ne,pe){return st(pe,function(ce){return ne[ce]})}function Vo(ne,pe){return ne.has(pe)}function e_(ne,pe){for(var ce=-1,Oe=ne.length;++ce<Oe&&Bi(pe,ne[ce],0)>-1;);return ce}function t_(ne,pe){for(var ce=ne.length;ce--&&Bi(pe,ne[ce],0)>-1;);return ce}function GL(ne,pe){for(var ce=ne.length,Oe=0;ce--;)ne[ce]===pe&&++Oe;return Oe}var KL=Jc(TL),YL=Jc(AL);function XL(ne){return"\\"+DL[ne]}function ZL(ne,pe){return ne==null?r:ne[pe]}function Fi(ne){return RL.test(ne)}function JL(ne){return IL.test(ne)}function QL(ne){for(var pe,ce=[];!(pe=ne.next()).done;)ce.push(pe.value);return ce}function rf(ne){var pe=-1,ce=Array(ne.size);return ne.forEach(function(Oe,Ae){ce[++pe]=[Ae,Oe]}),ce}function r_(ne,pe){return function(ce){return ne(pe(ce))}}function Pn(ne,pe){for(var ce=-1,Oe=ne.length,Ae=0,Ue=[];++ce<Oe;){var Et=ne[ce];(Et===pe||Et===h)&&(ne[ce]=h,Ue[Ae++]=ce)}return Ue}function Ss(ne){var pe=-1,ce=Array(ne.size);return ne.forEach(function(Oe){ce[++pe]=Oe}),ce}function eB(ne){var pe=-1,ce=Array(ne.size);return ne.forEach(function(Oe){ce[++pe]=[Oe,Oe]}),ce}function tB(ne,pe,ce){for(var Oe=ce-1,Ae=ne.length;++Oe<Ae;)if(ne[Oe]===pe)return Oe;return-1}function rB(ne,pe,ce){for(var Oe=ce+1;Oe--;)if(ne[Oe]===pe)return Oe;return Oe}function $i(ne){return Fi(ne)?iB(ne):$L(ne)}function Tr(ne){return Fi(ne)?oB(ne):zL(ne)}function n_(ne){for(var pe=ne.length;pe--&&_c.test(ne.charAt(pe)););return pe}var nB=Jc(ML);function iB(ne){for(var pe=Uc.lastIndex=0;Uc.test(ne);)++pe;return pe}function oB(ne){return ne.match(Uc)||[]}function aB(ne){return ne.match(CL)||[]}var sB=(function ne(pe){pe=pe==null?It:zi.defaults(It.Object(),pe,zi.pick(It,PL));var ce=pe.Array,Oe=pe.Date,Ae=pe.Error,Ue=pe.Function,Et=pe.Math,et=pe.Object,nf=pe.RegExp,uB=pe.String,pr=pe.TypeError,Os=ce.prototype,lB=Ue.prototype,Hi=et.prototype,Cs=pe["__core-js_shared__"],Rs=lB.toString,Ge=Hi.hasOwnProperty,cB=0,i_=(function(){var s=/[^.]+$/.exec(Cs&&Cs.keys&&Cs.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),Is=Hi.toString,fB=Rs.call(et),dB=It._,hB=nf("^"+Rs.call(Ge).replace(Di,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ps=$w?pe.Buffer:r,Nn=pe.Symbol,Ns=pe.Uint8Array,o_=Ps?Ps.allocUnsafe:r,Ts=r_(et.getPrototypeOf,et),a_=et.create,s_=Hi.propertyIsEnumerable,As=Os.splice,u_=Nn?Nn.isConcatSpreadable:r,Uo=Nn?Nn.iterator:r,Qn=Nn?Nn.toStringTag:r,Ms=(function(){try{var s=ii(et,"defineProperty");return s({},"",{}),s}catch{}})(),pB=pe.clearTimeout!==It.clearTimeout&&pe.clearTimeout,vB=Oe&&Oe.now!==It.Date.now&&Oe.now,gB=pe.setTimeout!==It.setTimeout&&pe.setTimeout,Ds=Et.ceil,js=Et.floor,of=et.getOwnPropertySymbols,mB=Ps?Ps.isBuffer:r,l_=pe.isFinite,yB=Os.join,bB=r_(et.keys,et),St=Et.max,At=Et.min,xB=Oe.now,wB=pe.parseInt,c_=Et.random,_B=Os.reverse,af=ii(pe,"DataView"),Wo=ii(pe,"Map"),sf=ii(pe,"Promise"),Vi=ii(pe,"Set"),Go=ii(pe,"WeakMap"),Ko=ii(et,"create"),qs=Go&&new Go,Ui={},EB=oi(af),SB=oi(Wo),OB=oi(sf),CB=oi(Vi),RB=oi(Go),ks=Nn?Nn.prototype:r,Yo=ks?ks.valueOf:r,f_=ks?ks.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 d1(s)}return new vr(s)}var Wi=(function(){function s(){}return function(c){if(!ft(c))return{};if(a_)return a_(c);s.prototype=c;var g=new s;return s.prototype=r,g}})();function Ls(){}function vr(s,c){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=r}M.templateSettings={escape:fs,evaluate:yc,interpolate:Lo,variable:"",imports:{_:M}},M.prototype=Ls.prototype,M.prototype.constructor=M,vr.prototype=Wi(Ls.prototype),vr.prototype.constructor=vr;function Be(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ae,this.__views__=[]}function IB(){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 NB(){var s=this.__wrapped__.value(),c=this.__dir__,g=Me(s),O=c<0,N=g?s.length:0,q=zF(0,N,this.__views__),z=q.start,X=q.end,ie=X-z,ge=O?X:z-1,me=this.__iteratees__,ye=me.length,_e=0,Ce=At(ie,this.__takeCount__);if(!g||!O&&N==ie&&Ce==ie)return j_(s,this.__actions__);var Ne=[];e:for(;ie--&&_e<Ce;){ge+=c;for(var je=-1,Re=s[ge];++je<ye;){var ke=me[je],$e=ke.iteratee,ir=ke.type,Lt=$e(Re);if(ir==B)Re=Lt;else if(!Lt){if(ir==G)continue e;break e}}Ne[_e++]=Re}return Ne}Be.prototype=Wi(Ls.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 TB(){this.__data__=Ko?Ko(null):{},this.size=0}function AB(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}function MB(s){var c=this.__data__;if(Ko){var g=c[s];return g===d?r:g}return Ge.call(c,s)?c[s]:r}function DB(s){var c=this.__data__;return Ko?c[s]!==r:Ge.call(c,s)}function jB(s,c){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Ko&&c===r?d:c,this}ei.prototype.clear=TB,ei.prototype.delete=AB,ei.prototype.get=MB,ei.prototype.has=DB,ei.prototype.set=jB;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 qB(){this.__data__=[],this.size=0}function kB(s){var c=this.__data__,g=Bs(c,s);if(g<0)return!1;var O=c.length-1;return g==O?c.pop():As.call(c,g,1),--this.size,!0}function LB(s){var c=this.__data__,g=Bs(c,s);return g<0?r:c[g][1]}function BB(s){return Bs(this.__data__,s)>-1}function FB(s,c){var g=this.__data__,O=Bs(g,s);return O<0?(++this.size,g.push([s,c])):g[O][1]=c,this}ln.prototype.clear=qB,ln.prototype.delete=kB,ln.prototype.get=LB,ln.prototype.has=BB,ln.prototype.set=FB;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 $B(){this.size=0,this.__data__={hash:new ei,map:new(Wo||ln),string:new ei}}function zB(s){var c=Zs(this,s).delete(s);return this.size-=c?1:0,c}function HB(s){return Zs(this,s).get(s)}function VB(s){return Zs(this,s).has(s)}function UB(s,c){var g=Zs(this,s),O=g.size;return g.set(s,c),this.size+=g.size==O?0:1,this}cn.prototype.clear=$B,cn.prototype.delete=zB,cn.prototype.get=HB,cn.prototype.has=VB,cn.prototype.set=UB;function ti(s){var c=-1,g=s==null?0:s.length;for(this.__data__=new cn;++c<g;)this.add(s[c])}function WB(s){return this.__data__.set(s,d),this}function GB(s){return this.__data__.has(s)}ti.prototype.add=ti.prototype.push=WB,ti.prototype.has=GB;function Ar(s){var c=this.__data__=new ln(s);this.size=c.size}function KB(){this.__data__=new ln,this.size=0}function YB(s){var c=this.__data__,g=c.delete(s);return this.size=c.size,g}function XB(s){return this.__data__.get(s)}function ZB(s){return this.__data__.has(s)}function JB(s,c){var g=this.__data__;if(g instanceof ln){var O=g.__data__;if(!Wo||O.length<i-1)return O.push([s,c]),this.size=++g.size,this;g=this.__data__=new cn(O)}return g.set(s,c),this.size=g.size,this}Ar.prototype.clear=KB,Ar.prototype.delete=YB,Ar.prototype.get=XB,Ar.prototype.has=ZB,Ar.prototype.set=JB;function d_(s,c){var g=Me(s),O=!g&&ai(s),N=!g&&!O&&jn(s),q=!g&&!O&&!N&&Xi(s),z=g||O||N||q,X=z?ef(s.length,uB):[],ie=X.length;for(var ge in s)(c||Ge.call(s,ge))&&!(z&&(ge=="length"||N&&(ge=="offset"||ge=="parent")||q&&(ge=="buffer"||ge=="byteLength"||ge=="byteOffset")||hn(ge,ie)))&&X.push(ge);return X}function h_(s){var c=s.length;return c?s[yf(0,c-1)]:r}function QB(s,c){return Js(zt(s),ri(c,0,s.length))}function eF(s){return Js(zt(s))}function uf(s,c,g){(g!==r&&!Dr(s[c],g)||g===r&&!(c in s))&&Wr(s,c,g)}function Xo(s,c,g){var O=s[c];(!(Ge.call(s,c)&&Dr(O,g))||g===r&&!(c in s))&&Wr(s,c,g)}function Bs(s,c){for(var g=s.length;g--;)if(Dr(s[g][0],c))return g;return-1}function tF(s,c,g,O){return Tn(s,function(N,q,z){c(O,N,g(N),z)}),O}function p_(s,c){return s&&Kr(c,Ct(c),s)}function rF(s,c){return s&&Kr(c,Vt(c),s)}function Wr(s,c,g){c=="__proto__"&&Ms?Ms(s,c,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[c]=g}function lf(s,c){for(var g=-1,O=c.length,N=ce(O),q=s==null;++g<O;)N[g]=q?r:Vf(s,c[g]);return N}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,N,q){var z,X=c&p,ie=c&v,ge=c&m;if(g&&(z=N?g(s,O,N,q):g(s)),z!==r)return z;if(!ft(s))return s;var me=Me(s);if(me){if(z=VF(s),!X)return zt(s,z)}else{var ye=Mt(s),_e=ye==ee||ye==we;if(jn(s))return L_(s,X);if(ye==Ee||ye==J||_e&&!N){if(z=ie||_e?{}:n1(s),!X)return ie?MF(s,rF(z,s)):AF(s,p_(z,s))}else{if(!nt[ye])return N?s:{};z=UF(s,ye,X)}}q||(q=new Ar);var Ce=q.get(s);if(Ce)return Ce;q.set(s,z),A1(s)?s.forEach(function(Re){z.add(gr(Re,c,g,Re,s,q))}):N1(s)&&s.forEach(function(Re,ke){z.set(ke,gr(Re,c,g,ke,s,q))});var Ne=ge?ie?Pf:If:ie?Vt:Ct,je=me?r:Ne(s);return er(je||s,function(Re,ke){je&&(ke=Re,Re=s[ke]),Xo(z,ke,gr(Re,c,g,ke,s,q))}),z}function nF(s){var c=Ct(s);return function(g){return v_(g,s,c)}}function v_(s,c,g){var O=g.length;if(s==null)return!O;for(s=et(s);O--;){var N=g[O],q=c[N],z=s[N];if(z===r&&!(N in s)||!q(z))return!1}return!0}function g_(s,c,g){if(typeof s!="function")throw new pr(a);return na(function(){s.apply(r,g)},c)}function Zo(s,c,g,O){var N=-1,q=_s,z=!0,X=s.length,ie=[],ge=c.length;if(!X)return ie;g&&(c=st(c,tr(g))),O?(q=Kc,z=!1):c.length>=i&&(q=Vo,z=!1,c=new ti(c));e:for(;++N<X;){var me=s[N],ye=g==null?me:g(me);if(me=O||me!==0?me:0,z&&ye===ye){for(var _e=ge;_e--;)if(c[_e]===ye)continue e;ie.push(me)}else q(c,ye,O)||ie.push(me)}return ie}var Tn=H_(Gr),m_=H_(ff,!0);function iF(s,c){var g=!0;return Tn(s,function(O,N,q){return g=!!c(O,N,q),g}),g}function Fs(s,c,g){for(var O=-1,N=s.length;++O<N;){var q=s[O],z=c(q);if(z!=null&&(X===r?z===z&&!nr(z):g(z,X)))var X=z,ie=q}return ie}function oF(s,c,g,O){var N=s.length;for(g=De(g),g<0&&(g=-g>N?0:N+g),O=O===r||O>N?N:De(O),O<0&&(O+=N),O=g>O?0:D1(O);g<O;)s[g++]=c;return s}function y_(s,c){var g=[];return Tn(s,function(O,N,q){c(O,N,q)&&g.push(O)}),g}function Pt(s,c,g,O,N){var q=-1,z=s.length;for(g||(g=GF),N||(N=[]);++q<z;){var X=s[q];c>0&&g(X)?c>1?Pt(X,c-1,g,O,N):In(N,X):O||(N[N.length]=X)}return N}var cf=V_(),b_=V_(!0);function Gr(s,c){return s&&cf(s,c,Ct)}function ff(s,c){return s&&b_(s,c,Ct)}function $s(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 x_(s,c,g){var O=c(s);return Me(s)?O:In(O,g(s))}function qt(s){return s==null?s===r?ct:ue:Qn&&Qn in et(s)?$F(s):e$(s)}function df(s,c){return s>c}function aF(s,c){return s!=null&&Ge.call(s,c)}function sF(s,c){return s!=null&&c in et(s)}function uF(s,c,g){return s>=At(c,g)&&s<St(c,g)}function hf(s,c,g){for(var O=g?Kc:_s,N=s[0].length,q=s.length,z=q,X=ce(q),ie=1/0,ge=[];z--;){var me=s[z];z&&c&&(me=st(me,tr(c))),ie=At(me.length,ie),X[z]=!g&&(c||N>=120&&me.length>=120)?new ti(z&&me):r}me=s[0];var ye=-1,_e=X[0];e:for(;++ye<N&&ge.length<ie;){var Ce=me[ye],Ne=c?c(Ce):Ce;if(Ce=g||Ce!==0?Ce:0,!(_e?Vo(_e,Ne):O(ge,Ne,g))){for(z=q;--z;){var je=X[z];if(!(je?Vo(je,Ne):O(s[z],Ne,g)))continue e}_e&&_e.push(Ne),ge.push(Ce)}}return ge}function lF(s,c,g,O){return Gr(s,function(N,q,z){c(O,g(N),q,z)}),O}function Jo(s,c,g){c=Mn(c,s),s=s1(s,c);var O=s==null?s:s[Mr(yr(c))];return O==null?r:Qt(O,s,g)}function w_(s){return dt(s)&&qt(s)==J}function cF(s){return dt(s)&&qt(s)==rt}function fF(s){return dt(s)&&qt(s)==oe}function Qo(s,c,g,O,N){return s===c?!0:s==null||c==null||!dt(s)&&!dt(c)?s!==s&&c!==c:dF(s,c,g,O,Qo,N)}function dF(s,c,g,O,N,q){var z=Me(s),X=Me(c),ie=z?H:Mt(s),ge=X?H:Mt(c);ie=ie==J?Ee:ie,ge=ge==J?Ee:ge;var me=ie==Ee,ye=ge==Ee,_e=ie==ge;if(_e&&jn(s)){if(!jn(c))return!1;z=!0,me=!1}if(_e&&!me)return q||(q=new Ar),z||Xi(s)?e1(s,c,g,O,N,q):BF(s,c,ie,g,O,N,q);if(!(g&y)){var Ce=me&&Ge.call(s,"__wrapped__"),Ne=ye&&Ge.call(c,"__wrapped__");if(Ce||Ne){var je=Ce?s.value():s,Re=Ne?c.value():c;return q||(q=new Ar),N(je,Re,g,O,q)}}return _e?(q||(q=new Ar),FF(s,c,g,O,N,q)):!1}function hF(s){return dt(s)&&Mt(s)==be}function pf(s,c,g,O){var N=g.length,q=N,z=!O;if(s==null)return!q;for(s=et(s);N--;){var X=g[N];if(z&&X[2]?X[1]!==s[X[0]]:!(X[0]in s))return!1}for(;++N<q;){X=g[N];var ie=X[0],ge=s[ie],me=X[1];if(z&&X[2]){if(ge===r&&!(ie in s))return!1}else{var ye=new Ar;if(O)var _e=O(ge,me,ie,s,c,ye);if(!(_e===r?Qo(me,ge,y|x,O,ye):_e))return!1}}return!0}function __(s){if(!ft(s)||YF(s))return!1;var c=pn(s)?hB:Nc;return c.test(oi(s))}function pF(s){return dt(s)&&qt(s)==ze}function vF(s){return dt(s)&&Mt(s)==Fe}function gF(s){return dt(s)&&iu(s.length)&&!!at[qt(s)]}function E_(s){return typeof s=="function"?s:s==null?Ut:typeof s=="object"?Me(s)?C_(s[0],s[1]):O_(s):W1(s)}function vf(s){if(!ra(s))return bB(s);var c=[];for(var g in et(s))Ge.call(s,g)&&g!="constructor"&&c.push(g);return c}function mF(s){if(!ft(s))return QF(s);var c=ra(s),g=[];for(var O in s)O=="constructor"&&(c||!Ge.call(s,O))||g.push(O);return g}function gf(s,c){return s<c}function S_(s,c){var g=-1,O=Ht(s)?ce(s.length):[];return Tn(s,function(N,q,z){O[++g]=c(N,q,z)}),O}function O_(s){var c=Tf(s);return c.length==1&&c[0][2]?o1(c[0][0],c[0][1]):function(g){return g===s||pf(g,s,c)}}function C_(s,c){return Mf(s)&&i1(c)?o1(Mr(s),c):function(g){var O=Vf(g,s);return O===r&&O===c?Uf(g,s):Qo(c,O,y|x)}}function zs(s,c,g,O,N){s!==c&&cf(c,function(q,z){if(N||(N=new Ar),ft(q))yF(s,c,z,g,zs,O,N);else{var X=O?O(jf(s,z),q,z+"",s,c,N):r;X===r&&(X=q),uf(s,z,X)}},Vt)}function yF(s,c,g,O,N,q,z){var X=jf(s,g),ie=jf(c,g),ge=z.get(ie);if(ge){uf(s,g,ge);return}var me=q?q(X,ie,g+"",s,c,z):r,ye=me===r;if(ye){var _e=Me(ie),Ce=!_e&&jn(ie),Ne=!_e&&!Ce&&Xi(ie);me=ie,_e||Ce||Ne?Me(X)?me=X:pt(X)?me=zt(X):Ce?(ye=!1,me=L_(ie,!0)):Ne?(ye=!1,me=B_(ie,!0)):me=[]:ia(ie)||ai(ie)?(me=X,ai(X)?me=j1(X):(!ft(X)||pn(X))&&(me=n1(ie))):ye=!1}ye&&(z.set(ie,me),N(me,ie,O,q,z),z.delete(ie)),uf(s,g,me)}function R_(s,c){var g=s.length;if(g)return c+=c<0?g:0,hn(c,g)?s[c]:r}function I_(s,c,g){c.length?c=st(c,function(q){return Me(q)?function(z){return ni(z,q.length===1?q[0]:q)}:q}):c=[Ut];var O=-1;c=st(c,tr(Ie()));var N=S_(s,function(q,z,X){var ie=st(c,function(ge){return ge(q)});return{criteria:ie,index:++O,value:q}});return UL(N,function(q,z){return TF(q,z,g)})}function bF(s,c){return P_(s,c,function(g,O){return Uf(s,O)})}function P_(s,c,g){for(var O=-1,N=c.length,q={};++O<N;){var z=c[O],X=ni(s,z);g(X,z)&&ea(q,Mn(z,s),X)}return q}function xF(s){return function(c){return ni(c,s)}}function mf(s,c,g,O){var N=O?VL:Bi,q=-1,z=c.length,X=s;for(s===c&&(c=zt(c)),g&&(X=st(s,tr(g)));++q<z;)for(var ie=0,ge=c[q],me=g?g(ge):ge;(ie=N(X,me,ie,O))>-1;)X!==s&&As.call(X,ie,1),As.call(s,ie,1);return s}function N_(s,c){for(var g=s?c.length:0,O=g-1;g--;){var N=c[g];if(g==O||N!==q){var q=N;hn(N)?As.call(s,N,1):wf(s,N)}}return s}function yf(s,c){return s+js(c_()*(c-s+1))}function wF(s,c,g,O){for(var N=-1,q=St(Ds((c-s)/(g||1)),0),z=ce(q);q--;)z[O?q:++N]=s,s+=g;return z}function bf(s,c){var g="";if(!s||c<1||c>te)return g;do c%2&&(g+=s),c=js(c/2),c&&(s+=s);while(c);return g}function qe(s,c){return qf(a1(s,c,Ut),s+"")}function _F(s){return h_(Zi(s))}function EF(s,c){var g=Zi(s);return Js(g,ri(c,0,g.length))}function ea(s,c,g,O){if(!ft(s))return s;c=Mn(c,s);for(var N=-1,q=c.length,z=q-1,X=s;X!=null&&++N<q;){var ie=Mr(c[N]),ge=g;if(ie==="__proto__"||ie==="constructor"||ie==="prototype")return s;if(N!=z){var me=X[ie];ge=O?O(me,ie,X):r,ge===r&&(ge=ft(me)?me:hn(c[N+1])?[]:{})}Xo(X,ie,ge),X=X[ie]}return s}var T_=qs?function(s,c){return qs.set(s,c),s}:Ut,SF=Ms?function(s,c){return Ms(s,"toString",{configurable:!0,enumerable:!1,value:Gf(c),writable:!0})}:Ut;function OF(s){return Js(Zi(s))}function mr(s,c,g){var O=-1,N=s.length;c<0&&(c=-c>N?0:N+c),g=g>N?N:g,g<0&&(g+=N),N=c>g?0:g-c>>>0,c>>>=0;for(var q=ce(N);++O<N;)q[O]=s[O+c];return q}function CF(s,c){var g;return Tn(s,function(O,N,q){return g=c(O,N,q),!g}),!!g}function Hs(s,c,g){var O=0,N=s==null?O:s.length;if(typeof c=="number"&&c===c&&N<=F){for(;O<N;){var q=O+N>>>1,z=s[q];z!==null&&!nr(z)&&(g?z<=c:z<c)?O=q+1:N=q}return N}return xf(s,c,Ut,g)}function xf(s,c,g,O){var N=0,q=s==null?0:s.length;if(q===0)return 0;c=g(c);for(var z=c!==c,X=c===null,ie=nr(c),ge=c===r;N<q;){var me=js((N+q)/2),ye=g(s[me]),_e=ye!==r,Ce=ye===null,Ne=ye===ye,je=nr(ye);if(z)var Re=O||Ne;else ge?Re=Ne&&(O||_e):X?Re=Ne&&_e&&(O||!Ce):ie?Re=Ne&&_e&&!Ce&&(O||!je):Ce||je?Re=!1:Re=O?ye<=c:ye<c;Re?N=me+1:q=me}return At(q,le)}function A_(s,c){for(var g=-1,O=s.length,N=0,q=[];++g<O;){var z=s[g],X=c?c(z):z;if(!g||!Dr(X,ie)){var ie=X;q[N++]=z===0?0:z}}return q}function M_(s){return typeof s=="number"?s:nr(s)?re:+s}function rr(s){if(typeof s=="string")return s;if(Me(s))return st(s,rr)+"";if(nr(s))return f_?f_.call(s):"";var c=s+"";return c=="0"&&1/s==-Z?"-0":c}function An(s,c,g){var O=-1,N=_s,q=s.length,z=!0,X=[],ie=X;if(g)z=!1,N=Kc;else if(q>=i){var ge=c?null:kF(s);if(ge)return Ss(ge);z=!1,N=Vo,ie=new ti}else ie=c?[]:X;e:for(;++O<q;){var me=s[O],ye=c?c(me):me;if(me=g||me!==0?me:0,z&&ye===ye){for(var _e=ie.length;_e--;)if(ie[_e]===ye)continue e;c&&ie.push(ye),X.push(me)}else N(ie,ye,g)||(ie!==X&&ie.push(ye),X.push(me))}return X}function wf(s,c){c=Mn(c,s);var g=-1,O=c.length;if(!O)return!0;for(;++g<O;){var N=Mr(c[g]);if(N==="__proto__"&&!Ge.call(s,"__proto__")||(N==="constructor"||N==="prototype")&&g<O-1)return!1}var q=s1(s,c);return q==null||delete q[Mr(yr(c))]}function D_(s,c,g,O){return ea(s,c,g(ni(s,c)),O)}function Vs(s,c,g,O){for(var N=s.length,q=O?N:-1;(O?q--:++q<N)&&c(s[q],q,s););return g?mr(s,O?0:q,O?q+1:N):mr(s,O?q+1:0,O?N:q)}function j_(s,c){var g=s;return g instanceof Be&&(g=g.value()),Yc(c,function(O,N){return N.func.apply(N.thisArg,In([O],N.args))},g)}function _f(s,c,g){var O=s.length;if(O<2)return O?An(s[0]):[];for(var N=-1,q=ce(O);++N<O;)for(var z=s[N],X=-1;++X<O;)X!=N&&(q[N]=Zo(q[N]||z,s[X],c,g));return An(Pt(q,1),c,g)}function q_(s,c,g){for(var O=-1,N=s.length,q=c.length,z={};++O<N;){var X=O<q?c[O]:r;g(z,s[O],X)}return z}function Ef(s){return pt(s)?s:[]}function Sf(s){return typeof s=="function"?s:Ut}function Mn(s,c){return Me(s)?s:Mf(s,c)?[s]:f1(Ke(s))}var RF=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 k_=pB||function(s){return It.clearTimeout(s)};function L_(s,c){if(c)return s.slice();var g=s.length,O=o_?o_(g):new s.constructor(g);return s.copy(O),O}function Of(s){var c=new s.constructor(s.byteLength);return new Ns(c).set(new Ns(s)),c}function IF(s,c){var g=c?Of(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function PF(s){var c=new s.constructor(s.source,vs.exec(s));return c.lastIndex=s.lastIndex,c}function NF(s){return Yo?et(Yo.call(s)):{}}function B_(s,c){var g=c?Of(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function F_(s,c){if(s!==c){var g=s!==r,O=s===null,N=s===s,q=nr(s),z=c!==r,X=c===null,ie=c===c,ge=nr(c);if(!X&&!ge&&!q&&s>c||q&&z&&ie&&!X&&!ge||O&&z&&ie||!g&&ie||!N)return 1;if(!O&&!q&&!ge&&s<c||ge&&g&&N&&!O&&!q||X&&g&&N||!z&&N||!ie)return-1}return 0}function TF(s,c,g){for(var O=-1,N=s.criteria,q=c.criteria,z=N.length,X=g.length;++O<z;){var ie=F_(N[O],q[O]);if(ie){if(O>=X)return ie;var ge=g[O];return ie*(ge=="desc"?-1:1)}}return s.index-c.index}function $_(s,c,g,O){for(var N=-1,q=s.length,z=g.length,X=-1,ie=c.length,ge=St(q-z,0),me=ce(ie+ge),ye=!O;++X<ie;)me[X]=c[X];for(;++N<z;)(ye||N<q)&&(me[g[N]]=s[N]);for(;ge--;)me[X++]=s[N++];return me}function z_(s,c,g,O){for(var N=-1,q=s.length,z=-1,X=g.length,ie=-1,ge=c.length,me=St(q-X,0),ye=ce(me+ge),_e=!O;++N<me;)ye[N]=s[N];for(var Ce=N;++ie<ge;)ye[Ce+ie]=c[ie];for(;++z<X;)(_e||N<q)&&(ye[Ce+g[z]]=s[N++]);return ye}function zt(s,c){var g=-1,O=s.length;for(c||(c=ce(O));++g<O;)c[g]=s[g];return c}function Kr(s,c,g,O){var N=!g;g||(g={});for(var q=-1,z=c.length;++q<z;){var X=c[q],ie=O?O(g[X],s[X],X,g,s):r;ie===r&&(ie=s[X]),N?Wr(g,X,ie):Xo(g,X,ie)}return g}function AF(s,c){return Kr(s,Af(s),c)}function MF(s,c){return Kr(s,t1(s),c)}function Us(s,c){return function(g,O){var N=Me(g)?LL:tF,q=c?c():{};return N(g,s,Ie(O,2),q)}}function Gi(s){return qe(function(c,g){var O=-1,N=g.length,q=N>1?g[N-1]:r,z=N>2?g[2]:r;for(q=s.length>3&&typeof q=="function"?(N--,q):r,z&&kt(g[0],g[1],z)&&(q=N<3?r:q,N=1),c=et(c);++O<N;){var X=g[O];X&&s(c,X,O,q)}return c})}function H_(s,c){return function(g,O){if(g==null)return g;if(!Ht(g))return s(g,O);for(var N=g.length,q=c?N:-1,z=et(g);(c?q--:++q<N)&&O(z[q],q,z)!==!1;);return g}}function V_(s){return function(c,g,O){for(var N=-1,q=et(c),z=O(c),X=z.length;X--;){var ie=z[s?X:++N];if(g(q[ie],ie,q)===!1)break}return c}}function DF(s,c,g){var O=c&b,N=ta(s);function q(){var z=this&&this!==It&&this instanceof q?N:s;return z.apply(O?g:this,arguments)}return q}function U_(s){return function(c){c=Ke(c);var g=Fi(c)?Tr(c):r,O=g?g[0]:c.charAt(0),N=g?Dn(g,1).join(""):c.slice(1);return O[s]()+N}}function Ki(s){return function(c){return Yc(V1(H1(c).replace(SL,"")),s,"")}}function ta(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=Wi(s.prototype),O=s.apply(g,c);return ft(O)?O:g}}function jF(s,c,g){var O=ta(s);function N(){for(var q=arguments.length,z=ce(q),X=q,ie=Yi(N);X--;)z[X]=arguments[X];var ge=q<3&&z[0]!==ie&&z[q-1]!==ie?[]:Pn(z,ie);if(q-=ge.length,q<g)return X_(s,c,Ws,N.placeholder,r,z,ge,r,r,g-q);var me=this&&this!==It&&this instanceof N?O:s;return Qt(me,this,z)}return N}function W_(s){return function(c,g,O){var N=et(c);if(!Ht(c)){var q=Ie(g,3);c=Ct(c),g=function(X){return q(N[X],X,N)}}var z=s(c,g,O);return z>-1?N[q?c[z]:z]:r}}function G_(s){return dn(function(c){var g=c.length,O=g,N=vr.prototype.thru;for(s&&c.reverse();O--;){var q=c[O];if(typeof q!="function")throw new pr(a);if(N&&!z&&Xs(q)=="wrapper")var z=new vr([],!0)}for(O=z?O:g;++O<g;){q=c[O];var X=Xs(q),ie=X=="wrapper"?Nf(q):r;ie&&Df(ie[0])&&ie[1]==(P|_|R|A)&&!ie[4].length&&ie[9]==1?z=z[Xs(ie[0])].apply(z,ie[3]):z=q.length==1&&Df(q)?z[X]():z.thru(q)}return function(){var ge=arguments,me=ge[0];if(z&&ge.length==1&&Me(me))return z.plant(me).value();for(var ye=0,_e=g?c[ye].apply(this,ge):me;++ye<g;)_e=c[ye].call(this,_e);return _e}})}function Ws(s,c,g,O,N,q,z,X,ie,ge){var me=c&P,ye=c&b,_e=c&w,Ce=c&(_|S),Ne=c&k,je=_e?r:ta(s);function Re(){for(var ke=arguments.length,$e=ce(ke),ir=ke;ir--;)$e[ir]=arguments[ir];if(Ce)var Lt=Yi(Re),or=GL($e,Lt);if(O&&($e=$_($e,O,N,Ce)),q&&($e=z_($e,q,z,Ce)),ke-=or,Ce&&ke<ge){var vt=Pn($e,Lt);return X_(s,c,Ws,Re.placeholder,g,$e,vt,X,ie,ge-ke)}var jr=ye?g:this,gn=_e?jr[s]:s;return ke=$e.length,X?$e=t$($e,X):Ne&&ke>1&&$e.reverse(),me&&ie<ke&&($e.length=ie),this&&this!==It&&this instanceof Re&&(gn=je||ta(gn)),gn.apply(jr,$e)}return Re}function K_(s,c){return function(g,O){return lF(g,s,c(O),{})}}function Gs(s,c){return function(g,O){var N;if(g===r&&O===r)return c;if(g!==r&&(N=g),O!==r){if(N===r)return O;typeof g=="string"||typeof O=="string"?(g=rr(g),O=rr(O)):(g=M_(g),O=M_(O)),N=s(g,O)}return N}}function Cf(s){return dn(function(c){return c=st(c,tr(Ie())),qe(function(g){var O=this;return s(c,function(N){return Qt(N,O,g)})})})}function Ks(s,c){c=c===r?" ":rr(c);var g=c.length;if(g<2)return g?bf(c,s):c;var O=bf(c,Ds(s/$i(c)));return Fi(c)?Dn(Tr(O),0,s).join(""):O.slice(0,s)}function qF(s,c,g,O){var N=c&b,q=ta(s);function z(){for(var X=-1,ie=arguments.length,ge=-1,me=O.length,ye=ce(me+ie),_e=this&&this!==It&&this instanceof z?q:s;++ge<me;)ye[ge]=O[ge];for(;ie--;)ye[ge++]=arguments[++X];return Qt(_e,N?g:this,ye)}return z}function Y_(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),wF(c,g,O,s)}}function Ys(s){return function(c,g){return typeof c=="string"&&typeof g=="string"||(c=br(c),g=br(g)),s(c,g)}}function X_(s,c,g,O,N,q,z,X,ie,ge){var me=c&_,ye=me?z:r,_e=me?r:z,Ce=me?q:r,Ne=me?r:q;c|=me?R:I,c&=~(me?I:R),c&E||(c&=-4);var je=[s,c,N,Ce,ye,Ne,_e,X,ie,ge],Re=g.apply(r,je);return Df(s)&&u1(Re,je),Re.placeholder=O,l1(Re,s,c)}function Rf(s){var c=Et[s];return function(g,O){if(g=br(g),O=O==null?0:At(De(O),292),O&&l_(g)){var N=(Ke(g)+"e").split("e"),q=c(N[0]+"e"+(+N[1]+O));return N=(Ke(q)+"e").split("e"),+(N[0]+"e"+(+N[1]-O))}return c(g)}}var kF=Vi&&1/Ss(new Vi([,-0]))[1]==Z?function(s){return new Vi(s)}:Xf;function Z_(s){return function(c){var g=Mt(c);return g==be?rf(c):g==Fe?eB(c):WL(c,s(c))}}function fn(s,c,g,O,N,q,z,X){var ie=c&w;if(!ie&&typeof s!="function")throw new pr(a);var ge=O?O.length:0;if(ge||(c&=-97,O=N=r),z=z===r?z:St(De(z),0),X=X===r?X:De(X),ge-=N?N.length:0,c&I){var me=O,ye=N;O=N=r}var _e=ie?r:Nf(s),Ce=[s,c,g,O,N,me,ye,q,z,X];if(_e&&JF(Ce,_e),s=Ce[0],c=Ce[1],g=Ce[2],O=Ce[3],N=Ce[4],X=Ce[9]=Ce[9]===r?ie?0:s.length:St(Ce[9]-ge,0),!X&&c&(_|S)&&(c&=-25),!c||c==b)var Ne=DF(s,c,g);else c==_||c==S?Ne=jF(s,c,X):(c==R||c==(b|R))&&!N.length?Ne=qF(s,c,g,O):Ne=Ws.apply(r,Ce);var je=_e?T_:u1;return l1(je(Ne,Ce),s,c)}function J_(s,c,g,O){return s===r||Dr(s,Hi[g])&&!Ge.call(O,g)?c:s}function Q_(s,c,g,O,N,q){return ft(s)&&ft(c)&&(q.set(c,s),zs(s,c,r,Q_,q),q.delete(c)),s}function LF(s){return ia(s)?r:s}function e1(s,c,g,O,N,q){var z=g&y,X=s.length,ie=c.length;if(X!=ie&&!(z&&ie>X))return!1;var ge=q.get(s),me=q.get(c);if(ge&&me)return ge==c&&me==s;var ye=-1,_e=!0,Ce=g&x?new ti:r;for(q.set(s,c),q.set(c,s);++ye<X;){var Ne=s[ye],je=c[ye];if(O)var Re=z?O(je,Ne,ye,c,s,q):O(Ne,je,ye,s,c,q);if(Re!==r){if(Re)continue;_e=!1;break}if(Ce){if(!Xc(c,function(ke,$e){if(!Vo(Ce,$e)&&(Ne===ke||N(Ne,ke,g,O,q)))return Ce.push($e)})){_e=!1;break}}else if(!(Ne===je||N(Ne,je,g,O,q))){_e=!1;break}}return q.delete(s),q.delete(c),_e}function BF(s,c,g,O,N,q,z){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 Ns(s),new Ns(c)));case se:case oe:case de:return Dr(+s,+c);case V:return s.name==c.name&&s.message==c.message;case ze:case Ve:return s==c+"";case be:var X=rf;case Fe:var ie=O&y;if(X||(X=Ss),s.size!=c.size&&!ie)return!1;var ge=z.get(s);if(ge)return ge==c;O|=x,z.set(s,c);var me=e1(X(s),X(c),O,N,q,z);return z.delete(s),me;case lt:if(Yo)return Yo.call(s)==Yo.call(c)}return!1}function FF(s,c,g,O,N,q){var z=g&y,X=If(s),ie=X.length,ge=If(c),me=ge.length;if(ie!=me&&!z)return!1;for(var ye=ie;ye--;){var _e=X[ye];if(!(z?_e in c:Ge.call(c,_e)))return!1}var Ce=q.get(s),Ne=q.get(c);if(Ce&&Ne)return Ce==c&&Ne==s;var je=!0;q.set(s,c),q.set(c,s);for(var Re=z;++ye<ie;){_e=X[ye];var ke=s[_e],$e=c[_e];if(O)var ir=z?O($e,ke,_e,c,s,q):O(ke,$e,_e,s,c,q);if(!(ir===r?ke===$e||N(ke,$e,g,O,q):ir)){je=!1;break}Re||(Re=_e=="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 qf(a1(s,r,v1),s+"")}function If(s){return x_(s,Ct,Af)}function Pf(s){return x_(s,Vt,t1)}var Nf=qs?function(s){return qs.get(s)}:Xf;function Xs(s){for(var c=s.name+"",g=Ui[c],O=Ge.call(Ui,c)?g.length:0;O--;){var N=g[O],q=N.func;if(q==null||q==s)return N.name}return c}function Yi(s){var c=Ge.call(M,"placeholder")?M:s;return c.placeholder}function Ie(){var s=M.iteratee||Kf;return s=s===Kf?E_:s,arguments.length?s(arguments[0],arguments[1]):s}function Zs(s,c){var g=s.__data__;return KF(c)?g[typeof c=="string"?"string":"hash"]:g.map}function Tf(s){for(var c=Ct(s),g=c.length;g--;){var O=c[g],N=s[O];c[g]=[O,N,i1(N)]}return c}function ii(s,c){var g=ZL(s,c);return __(g)?g:r}function $F(s){var c=Ge.call(s,Qn),g=s[Qn];try{s[Qn]=r;var O=!0}catch{}var N=Is.call(s);return O&&(c?s[Qn]=g:delete s[Qn]),N}var Af=of?function(s){return s==null?[]:(s=et(s),Rn(of(s),function(c){return s_.call(s,c)}))}:Zf,t1=of?function(s){for(var c=[];s;)In(c,Af(s)),s=Ts(s);return c}:Zf,Mt=qt;(af&&Mt(new af(new ArrayBuffer(1)))!=bt||Wo&&Mt(new Wo)!=be||sf&&Mt(sf.resolve())!=Pe||Vi&&Mt(new Vi)!=Fe||Go&&Mt(new Go)!=mt)&&(Mt=function(s){var c=qt(s),g=c==Ee?s.constructor:r,O=g?oi(g):"";if(O)switch(O){case EB:return bt;case SB:return be;case OB:return Pe;case CB:return Fe;case RB:return mt}return c});function zF(s,c,g){for(var O=-1,N=g.length;++O<N;){var q=g[O],z=q.size;switch(q.type){case"drop":s+=z;break;case"dropRight":c-=z;break;case"take":c=At(c,s+z);break;case"takeRight":s=St(s,c-z);break}}return{start:s,end:c}}function HF(s){var c=s.match(Ec);return c?c[1].split(Sc):[]}function r1(s,c,g){c=Mn(c,s);for(var O=-1,N=c.length,q=!1;++O<N;){var z=Mr(c[O]);if(!(q=s!=null&&g(s,z)))break;s=s[z]}return q||++O!=N?q:(N=s==null?0:s.length,!!N&&iu(N)&&hn(z,N)&&(Me(s)||ai(s)))}function VF(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 n1(s){return typeof s.constructor=="function"&&!ra(s)?Wi(Ts(s)):{}}function UF(s,c,g){var O=s.constructor;switch(c){case rt:return Of(s);case se:case oe:return new O(+s);case bt:return IF(s,g);case Jt:case fr:case Dt:case _t:case jt:case Ur:case Yn:case Cn:case dr:return B_(s,g);case be:return new O;case de:case Ve:return new O(s);case ze:return PF(s);case Fe:return new O;case lt:return NF(s)}}function WF(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(hs,`{
51
+ /* [wrapped with `+c+`] */
52
+ `)}function GF(s){return Me(s)||ai(s)||!!(u_&&s&&s[u_])}function hn(s,c){var g=typeof s;return c=c??te,!!c&&(g=="number"||g!="symbol"&&Ac.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 Mf(s,c){if(Me(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||nr(s)?!0:ds.test(s)||!bc.test(s)||c!=null&&s in et(c)}function KF(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}function Df(s){var c=Xs(s),g=M[c];if(typeof g!="function"||!(c in Be.prototype))return!1;if(s===g)return!0;var O=Nf(g);return!!O&&s===O[0]}function YF(s){return!!i_&&i_ in s}var XF=Cs?pn:Jf;function ra(s){var c=s&&s.constructor,g=typeof c=="function"&&c.prototype||Hi;return s===g}function i1(s){return s===s&&!ft(s)}function o1(s,c){return function(g){return g==null?!1:g[s]===c&&(c!==r||s in et(g))}}function ZF(s){var c=ru(s,function(O){return g.size===f&&g.clear(),O}),g=c.cache;return c}function JF(s,c){var g=s[1],O=c[1],N=g|O,q=N<(b|w|P),z=O==P&&g==_||O==P&&g==A&&s[7].length<=c[8]||O==(P|A)&&c[7].length<=c[8]&&g==_;if(!(q||z))return s;O&b&&(s[2]=c[2],N|=g&b?0:E);var X=c[3];if(X){var ie=s[3];s[3]=ie?$_(ie,X,c[4]):X,s[4]=ie?Pn(s[3],h):c[4]}return X=c[5],X&&(ie=s[5],s[5]=ie?z_(ie,X,c[6]):X,s[6]=ie?Pn(s[5],h):c[6]),X=c[7],X&&(s[7]=X),O&P&&(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]=N,s}function QF(s){var c=[];if(s!=null)for(var g in et(s))c.push(g);return c}function e$(s){return Is.call(s)}function a1(s,c,g){return c=St(c===r?s.length-1:c,0),function(){for(var O=arguments,N=-1,q=St(O.length-c,0),z=ce(q);++N<q;)z[N]=O[c+N];N=-1;for(var X=ce(c+1);++N<c;)X[N]=O[N];return X[c]=g(z),Qt(s,this,X)}}function s1(s,c){return c.length<2?s:ni(s,mr(c,0,-1))}function t$(s,c){for(var g=s.length,O=At(c.length,g),N=zt(s);O--;){var q=c[O];s[O]=hn(q,g)?N[q]:r}return s}function jf(s,c){if(!(c==="constructor"&&typeof s[c]=="function")&&c!="__proto__")return s[c]}var u1=c1(T_),na=gB||function(s,c){return It.setTimeout(s,c)},qf=c1(SF);function l1(s,c,g){var O=c+"";return qf(s,WF(O,r$(HF(O),g)))}function c1(s){var c=0,g=0;return function(){var O=xB(),N=D-(O-g);if(g=O,N>0){if(++c>=j)return arguments[0]}else c=0;return s.apply(r,arguments)}}function Js(s,c){var g=-1,O=s.length,N=O-1;for(c=c===r?O:c;++g<c;){var q=yf(g,N),z=s[q];s[q]=s[g],s[g]=z}return s.length=c,s}var f1=ZF(function(s){var c=[];return s.charCodeAt(0)===46&&c.push(""),s.replace(xc,function(g,O,N,q){c.push(N?q.replace(Cc,"$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 Rs.call(s)}catch{}try{return s+""}catch{}}return""}function r$(s,c){return er(W,function(g){var O="_."+g[0];c&g[1]&&!_s(s,O)&&s.push(O)}),s.sort()}function d1(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 n$(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 N=0,q=0,z=ce(Ds(O/c));N<O;)z[q++]=mr(s,N,N+=c);return z}function i$(s){for(var c=-1,g=s==null?0:s.length,O=0,N=[];++c<g;){var q=s[c];q&&(N[O++]=q)}return N}function o$(){var s=arguments.length;if(!s)return[];for(var c=ce(s-1),g=arguments[0],O=s;O--;)c[O-1]=arguments[O];return In(Me(g)?zt(g):[g],Pt(c,1))}var a$=qe(function(s,c){return pt(s)?Zo(s,Pt(c,1,pt,!0)):[]}),s$=qe(function(s,c){var g=yr(c);return pt(g)&&(g=r),pt(s)?Zo(s,Pt(c,1,pt,!0),Ie(g,2)):[]}),u$=qe(function(s,c){var g=yr(c);return pt(g)&&(g=r),pt(s)?Zo(s,Pt(c,1,pt,!0),r,g):[]});function l$(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 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,0,c<0?0:c)):[]}function f$(s,c){return s&&s.length?Vs(s,Ie(c,3),!0,!0):[]}function d$(s,c){return s&&s.length?Vs(s,Ie(c,3),!0):[]}function h$(s,c,g,O){var N=s==null?0:s.length;return N?(g&&typeof g!="number"&&kt(s,c,g)&&(g=0,O=N),oF(s,c,g,O)):[]}function h1(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var N=g==null?0:De(g);return N<0&&(N=St(O+N,0)),Es(s,Ie(c,3),N)}function p1(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var N=O-1;return g!==r&&(N=De(g),N=g<0?St(O+N,0):At(N,O-1)),Es(s,Ie(c,3),N,!0)}function v1(s){var c=s==null?0:s.length;return c?Pt(s,1):[]}function p$(s){var c=s==null?0:s.length;return c?Pt(s,Z):[]}function v$(s,c){var g=s==null?0:s.length;return g?(c=c===r?1:De(c),Pt(s,c)):[]}function g$(s){for(var c=-1,g=s==null?0:s.length,O={};++c<g;){var N=s[c];Wr(O,N[0],N[1])}return O}function g1(s){return s&&s.length?s[0]:r}function m$(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var N=g==null?0:De(g);return N<0&&(N=St(O+N,0)),Bi(s,c,N)}function y$(s){var c=s==null?0:s.length;return c?mr(s,0,-1):[]}var b$=qe(function(s){var c=st(s,Ef);return c.length&&c[0]===s[0]?hf(c):[]}),x$=qe(function(s){var c=yr(s),g=st(s,Ef);return c===yr(g)?c=r:g.pop(),g.length&&g[0]===s[0]?hf(g,Ie(c,2)):[]}),w$=qe(function(s){var c=yr(s),g=st(s,Ef);return c=typeof c=="function"?c:r,c&&g.pop(),g.length&&g[0]===s[0]?hf(g,r,c):[]});function _$(s,c){return s==null?"":yB.call(s,c)}function yr(s){var c=s==null?0:s.length;return c?s[c-1]:r}function E$(s,c,g){var O=s==null?0:s.length;if(!O)return-1;var N=O;return g!==r&&(N=De(g),N=N<0?St(O+N,0):At(N,O-1)),c===c?rB(s,c,N):Es(s,Xw,N,!0)}function S$(s,c){return s&&s.length?R_(s,De(c)):r}var O$=qe(m1);function m1(s,c){return s&&s.length&&c&&c.length?mf(s,c):s}function C$(s,c,g){return s&&s.length&&c&&c.length?mf(s,c,Ie(g,2)):s}function R$(s,c,g){return s&&s.length&&c&&c.length?mf(s,c,r,g):s}var I$=dn(function(s,c){var g=s==null?0:s.length,O=lf(s,c);return N_(s,st(c,function(N){return hn(N,g)?+N:N}).sort(F_)),O});function P$(s,c){var g=[];if(!(s&&s.length))return g;var O=-1,N=[],q=s.length;for(c=Ie(c,3);++O<q;){var z=s[O];c(z,O,s)&&(g.push(z),N.push(O))}return N_(s,N),g}function kf(s){return s==null?s:_B.call(s)}function N$(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 T$(s,c){return Hs(s,c)}function A$(s,c,g){return xf(s,c,Ie(g,2))}function M$(s,c){var g=s==null?0:s.length;if(g){var O=Hs(s,c);if(O<g&&Dr(s[O],c))return O}return-1}function D$(s,c){return Hs(s,c,!0)}function j$(s,c,g){return xf(s,c,Ie(g,2),!0)}function q$(s,c){var g=s==null?0:s.length;if(g){var O=Hs(s,c,!0)-1;if(Dr(s[O],c))return O}return-1}function k$(s){return s&&s.length?A_(s):[]}function L$(s,c){return s&&s.length?A_(s,Ie(c,2)):[]}function B$(s){var c=s==null?0:s.length;return c?mr(s,1,c):[]}function F$(s,c,g){return s&&s.length?(c=g||c===r?1:De(c),mr(s,0,c<0?0:c)):[]}function $$(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 z$(s,c){return s&&s.length?Vs(s,Ie(c,3),!1,!0):[]}function H$(s,c){return s&&s.length?Vs(s,Ie(c,3)):[]}var V$=qe(function(s){return An(Pt(s,1,pt,!0))}),U$=qe(function(s){var c=yr(s);return pt(c)&&(c=r),An(Pt(s,1,pt,!0),Ie(c,2))}),W$=qe(function(s){var c=yr(s);return c=typeof c=="function"?c:r,An(Pt(s,1,pt,!0),r,c)});function G$(s){return s&&s.length?An(s):[]}function K$(s,c){return s&&s.length?An(s,Ie(c,2)):[]}function Y$(s,c){return c=typeof c=="function"?c:r,s&&s.length?An(s,r,c):[]}function Lf(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}),ef(c,function(g){return st(s,Zc(g))})}function y1(s,c){if(!(s&&s.length))return[];var g=Lf(s);return c==null?g:st(g,function(O){return Qt(c,r,O)})}var X$=qe(function(s,c){return pt(s)?Zo(s,c):[]}),Z$=qe(function(s){return _f(Rn(s,pt))}),J$=qe(function(s){var c=yr(s);return pt(c)&&(c=r),_f(Rn(s,pt),Ie(c,2))}),Q$=qe(function(s){var c=yr(s);return c=typeof c=="function"?c:r,_f(Rn(s,pt),r,c)}),ez=qe(Lf);function tz(s,c){return q_(s||[],c||[],Xo)}function rz(s,c){return q_(s||[],c||[],ea)}var nz=qe(function(s){var c=s.length,g=c>1?s[c-1]:r;return g=typeof g=="function"?(s.pop(),g):r,y1(s,g)});function b1(s){var c=M(s);return c.__chain__=!0,c}function iz(s,c){return c(s),s}function Qs(s,c){return c(s)}var oz=dn(function(s){var c=s.length,g=c?s[0]:0,O=this.__wrapped__,N=function(q){return lf(q,s)};return c>1||this.__actions__.length||!(O instanceof Be)||!hn(g)?this.thru(N):(O=O.slice(g,+g+(c?1:0)),O.__actions__.push({func:Qs,args:[N],thisArg:r}),new vr(O,this.__chain__).thru(function(q){return c&&!q.length&&q.push(r),q}))});function az(){return b1(this)}function sz(){return new vr(this.value(),this.__chain__)}function uz(){this.__values__===r&&(this.__values__=M1(this.value()));var s=this.__index__>=this.__values__.length,c=s?r:this.__values__[this.__index__++];return{done:s,value:c}}function lz(){return this}function cz(s){for(var c,g=this;g instanceof Ls;){var O=d1(g);O.__index__=0,O.__values__=r,c?N.__wrapped__=O:c=O;var N=O;g=g.__wrapped__}return N.__wrapped__=s,c}function fz(){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:Qs,args:[kf],thisArg:r}),new vr(c,this.__chain__)}return this.thru(kf)}function dz(){return j_(this.__wrapped__,this.__actions__)}var hz=Us(function(s,c,g){Ge.call(s,g)?++s[g]:Wr(s,g,1)});function pz(s,c,g){var O=Me(s)?Kw:iF;return g&&kt(s,c,g)&&(c=r),O(s,Ie(c,3))}function vz(s,c){var g=Me(s)?Rn:y_;return g(s,Ie(c,3))}var gz=W_(h1),mz=W_(p1);function yz(s,c){return Pt(eu(s,c),1)}function bz(s,c){return Pt(eu(s,c),Z)}function xz(s,c,g){return g=g===r?1:De(g),Pt(eu(s,c),g)}function x1(s,c){var g=Me(s)?er:Tn;return g(s,Ie(c,3))}function w1(s,c){var g=Me(s)?BL:m_;return g(s,Ie(c,3))}var wz=Us(function(s,c,g){Ge.call(s,g)?s[g].push(c):Wr(s,g,[c])});function _z(s,c,g,O){s=Ht(s)?s:Zi(s),g=g&&!O?De(g):0;var N=s.length;return g<0&&(g=St(N+g,0)),ou(s)?g<=N&&s.indexOf(c,g)>-1:!!N&&Bi(s,c,g)>-1}var Ez=qe(function(s,c,g){var O=-1,N=typeof c=="function",q=Ht(s)?ce(s.length):[];return Tn(s,function(z){q[++O]=N?Qt(c,z,g):Jo(z,c,g)}),q}),Sz=Us(function(s,c,g){Wr(s,g,c)});function eu(s,c){var g=Me(s)?st:S_;return g(s,Ie(c,3))}function Oz(s,c,g,O){return s==null?[]:(Me(c)||(c=c==null?[]:[c]),g=O?r:g,Me(g)||(g=g==null?[]:[g]),I_(s,c,g))}var Cz=Us(function(s,c,g){s[g?0:1].push(c)},function(){return[[],[]]});function Rz(s,c,g){var O=Me(s)?Yc:Jw,N=arguments.length<3;return O(s,Ie(c,4),g,N,Tn)}function Iz(s,c,g){var O=Me(s)?FL:Jw,N=arguments.length<3;return O(s,Ie(c,4),g,N,m_)}function Pz(s,c){var g=Me(s)?Rn:y_;return g(s,nu(Ie(c,3)))}function Nz(s){var c=Me(s)?h_:_F;return c(s)}function Tz(s,c,g){(g?kt(s,c,g):c===r)?c=1:c=De(c);var O=Me(s)?QB:EF;return O(s,c)}function Az(s){var c=Me(s)?eF:OF;return c(s)}function Mz(s){if(s==null)return 0;if(Ht(s))return ou(s)?$i(s):s.length;var c=Mt(s);return c==be||c==Fe?s.size:vf(s).length}function Dz(s,c,g){var O=Me(s)?Xc:CF;return g&&kt(s,c,g)&&(c=r),O(s,Ie(c,3))}var jz=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]]),I_(s,Pt(c,1),[])}),tu=vB||function(){return It.Date.now()};function qz(s,c){if(typeof c!="function")throw new pr(a);return s=De(s),function(){if(--s<1)return c.apply(this,arguments)}}function _1(s,c,g){return c=g?r:c,c=s&&c==null?s.length:c,fn(s,P,r,r,r,r,c)}function E1(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 Bf=qe(function(s,c,g){var O=b;if(g.length){var N=Pn(g,Yi(Bf));O|=R}return fn(s,O,c,g,N)}),S1=qe(function(s,c,g){var O=b|w;if(g.length){var N=Pn(g,Yi(S1));O|=R}return fn(c,O,s,g,N)});function O1(s,c,g){c=g?r:c;var O=fn(s,_,r,r,r,r,r,c);return O.placeholder=O1.placeholder,O}function C1(s,c,g){c=g?r:c;var O=fn(s,S,r,r,r,r,r,c);return O.placeholder=C1.placeholder,O}function R1(s,c,g){var O,N,q,z,X,ie,ge=0,me=!1,ye=!1,_e=!0;if(typeof s!="function")throw new pr(a);c=br(c)||0,ft(g)&&(me=!!g.leading,ye="maxWait"in g,q=ye?St(br(g.maxWait)||0,c):q,_e="trailing"in g?!!g.trailing:_e);function Ce(vt){var jr=O,gn=N;return O=N=r,ge=vt,z=s.apply(gn,jr),z}function Ne(vt){return ge=vt,X=na(ke,c),me?Ce(vt):z}function je(vt){var jr=vt-ie,gn=vt-ge,G1=c-jr;return ye?At(G1,q-gn):G1}function Re(vt){var jr=vt-ie,gn=vt-ge;return ie===r||jr>=c||jr<0||ye&&gn>=q}function ke(){var vt=tu();if(Re(vt))return $e(vt);X=na(ke,je(vt))}function $e(vt){return X=r,_e&&O?Ce(vt):(O=N=r,z)}function ir(){X!==r&&k_(X),ge=0,O=ie=N=X=r}function Lt(){return X===r?z:$e(tu())}function or(){var vt=tu(),jr=Re(vt);if(O=arguments,N=this,ie=vt,jr){if(X===r)return Ne(ie);if(ye)return k_(X),X=na(ke,c),Ce(ie)}return X===r&&(X=na(ke,c)),z}return or.cancel=ir,or.flush=Lt,or}var kz=qe(function(s,c){return g_(s,1,c)}),Lz=qe(function(s,c,g){return g_(s,br(c)||0,g)});function Bz(s){return fn(s,k)}function ru(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new pr(a);var g=function(){var O=arguments,N=c?c.apply(this,O):O[0],q=g.cache;if(q.has(N))return q.get(N);var z=s.apply(this,O);return g.cache=q.set(N,z)||q,z};return g.cache=new(ru.Cache||cn),g}ru.Cache=cn;function nu(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 Fz(s){return E1(2,s)}var $z=RF(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 N=-1,q=At(O.length,g);++N<q;)O[N]=c[N].call(this,O[N]);return Qt(s,this,O)})}),Ff=qe(function(s,c){var g=Pn(c,Yi(Ff));return fn(s,R,r,c,g)}),I1=qe(function(s,c){var g=Pn(c,Yi(I1));return fn(s,I,r,c,g)}),zz=dn(function(s,c){return fn(s,A,r,r,r,c)});function Hz(s,c){if(typeof s!="function")throw new pr(a);return c=c===r?c:De(c),qe(s,c)}function Vz(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],N=Dn(g,0,c);return O&&In(N,O),Qt(s,this,N)})}function Uz(s,c,g){var O=!0,N=!0;if(typeof s!="function")throw new pr(a);return ft(g)&&(O="leading"in g?!!g.leading:O,N="trailing"in g?!!g.trailing:N),R1(s,c,{leading:O,maxWait:c,trailing:N})}function Wz(s){return _1(s,1)}function Gz(s,c){return Ff(Sf(c),s)}function Kz(){if(!arguments.length)return[];var s=arguments[0];return Me(s)?s:[s]}function Yz(s){return gr(s,m)}function Xz(s,c){return c=typeof c=="function"?c:r,gr(s,m,c)}function Zz(s){return gr(s,p|m)}function Jz(s,c){return c=typeof c=="function"?c:r,gr(s,p|m,c)}function Qz(s,c){return c==null||v_(s,c,Ct(c))}function Dr(s,c){return s===c||s!==s&&c!==c}var e3=Ys(df),t3=Ys(function(s,c){return s>=c}),ai=w_((function(){return arguments})())?w_:function(s){return dt(s)&&Ge.call(s,"callee")&&!s_.call(s,"callee")},Me=ce.isArray,r3=zw?tr(zw):cF;function Ht(s){return s!=null&&iu(s.length)&&!pn(s)}function pt(s){return dt(s)&&Ht(s)}function n3(s){return s===!0||s===!1||dt(s)&&qt(s)==se}var jn=mB||Jf,i3=Hw?tr(Hw):fF;function o3(s){return dt(s)&&s.nodeType===1&&!ia(s)}function a3(s){if(s==null)return!0;if(Ht(s)&&(Me(s)||typeof s=="string"||typeof s.splice=="function"||jn(s)||Xi(s)||ai(s)))return!s.length;var c=Mt(s);if(c==be||c==Fe)return!s.size;if(ra(s))return!vf(s).length;for(var g in s)if(Ge.call(s,g))return!1;return!0}function s3(s,c){return Qo(s,c)}function u3(s,c,g){g=typeof g=="function"?g:r;var O=g?g(s,c):r;return O===r?Qo(s,c,r,g):!!O}function $f(s){if(!dt(s))return!1;var c=qt(s);return c==V||c==fe||typeof s.message=="string"&&typeof s.name=="string"&&!ia(s)}function l3(s){return typeof s=="number"&&l_(s)}function pn(s){if(!ft(s))return!1;var c=qt(s);return c==ee||c==we||c==K||c==Ze}function P1(s){return typeof s=="number"&&s==De(s)}function iu(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=te}function ft(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function dt(s){return s!=null&&typeof s=="object"}var N1=Vw?tr(Vw):hF;function c3(s,c){return s===c||pf(s,c,Tf(c))}function f3(s,c,g){return g=typeof g=="function"?g:r,pf(s,c,Tf(c),g)}function d3(s){return T1(s)&&s!=+s}function h3(s){if(XF(s))throw new Ae(o);return __(s)}function p3(s){return s===null}function v3(s){return s==null}function T1(s){return typeof s=="number"||dt(s)&&qt(s)==de}function ia(s){if(!dt(s)||qt(s)!=Ee)return!1;var c=Ts(s);if(c===null)return!0;var g=Ge.call(c,"constructor")&&c.constructor;return typeof g=="function"&&g instanceof g&&Rs.call(g)==fB}var zf=Uw?tr(Uw):pF;function g3(s){return P1(s)&&s>=-te&&s<=te}var A1=Ww?tr(Ww):vF;function ou(s){return typeof s=="string"||!Me(s)&&dt(s)&&qt(s)==Ve}function nr(s){return typeof s=="symbol"||dt(s)&&qt(s)==lt}var Xi=Gw?tr(Gw):gF;function m3(s){return s===r}function y3(s){return dt(s)&&Mt(s)==mt}function b3(s){return dt(s)&&qt(s)==yt}var x3=Ys(gf),w3=Ys(function(s,c){return s<=c});function M1(s){if(!s)return[];if(Ht(s))return ou(s)?Tr(s):zt(s);if(Uo&&s[Uo])return QL(s[Uo]());var c=Mt(s),g=c==be?rf:c==Fe?Ss:Zi;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*U}return s===s?s:0}function De(s){var c=vn(s),g=c%1;return c===c?g?c-g:c:0}function D1(s){return s?ri(De(s),0,ae):0}function br(s){if(typeof s=="number")return s;if(nr(s))return re;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=Qw(s);var g=Pc.test(s);return g||Tc.test(s)?qL(s.slice(2),g?2:8):Ic.test(s)?re:+s}function j1(s){return Kr(s,Vt(s))}function _3(s){return s?ri(De(s),-te,te):s===0?s:0}function Ke(s){return s==null?"":rr(s)}var E3=Gi(function(s,c){if(ra(c)||Ht(c)){Kr(c,Ct(c),s);return}for(var g in c)Ge.call(c,g)&&Xo(s,g,c[g])}),q1=Gi(function(s,c){Kr(c,Vt(c),s)}),k1=Gi(function(s,c,g,O){Kr(c,Vt(c),s,O)}),Hf=Gi(function(s,c,g,O){Kr(c,Ct(c),s,O)}),S3=dn(lf);function O3(s,c){var g=Wi(s);return c==null?g:p_(g,c)}var C3=qe(function(s,c){s=et(s);var g=-1,O=c.length,N=O>2?c[2]:r;for(N&&kt(c[0],c[1],N)&&(O=1);++g<O;)for(var q=c[g],z=Vt(q),X=-1,ie=z.length;++X<ie;){var ge=z[X],me=s[ge];(me===r||Dr(me,Hi[ge])&&!Ge.call(s,ge))&&(s[ge]=q[ge])}return s}),R3=qe(function(s){return s.push(r,Q_),Qt(L1,r,s)});function I3(s,c){return Yw(s,Ie(c,3),Gr)}function P3(s,c){return Yw(s,Ie(c,3),ff)}function N3(s,c){return s==null?s:cf(s,Ie(c,3),Vt)}function T3(s,c){return s==null?s:b_(s,Ie(c,3),Vt)}function A3(s,c){return s&&Gr(s,Ie(c,3))}function M3(s,c){return s&&ff(s,Ie(c,3))}function D3(s){return s==null?[]:$s(s,Ct(s))}function j3(s){return s==null?[]:$s(s,Vt(s))}function Vf(s,c,g){var O=s==null?r:ni(s,c);return O===r?g:O}function q3(s,c){return s!=null&&r1(s,c,aF)}function Uf(s,c){return s!=null&&r1(s,c,sF)}var k3=K_(function(s,c,g){c!=null&&typeof c.toString!="function"&&(c=Is.call(c)),s[c]=g},Gf(Ut)),L3=K_(function(s,c,g){c!=null&&typeof c.toString!="function"&&(c=Is.call(c)),Ge.call(s,c)?s[c].push(g):s[c]=[g]},Ie),B3=qe(Jo);function Ct(s){return Ht(s)?d_(s):vf(s)}function Vt(s){return Ht(s)?d_(s,!0):mF(s)}function F3(s,c){var g={};return c=Ie(c,3),Gr(s,function(O,N,q){Wr(g,c(O,N,q),O)}),g}function $3(s,c){var g={};return c=Ie(c,3),Gr(s,function(O,N,q){Wr(g,N,c(O,N,q))}),g}var z3=Gi(function(s,c,g){zs(s,c,g)}),L1=Gi(function(s,c,g,O){zs(s,c,g,O)}),H3=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,Pf(s),g),O&&(g=gr(g,p|v|m,LF));for(var N=c.length;N--;)wf(g,c[N]);return g});function V3(s,c){return B1(s,nu(Ie(c)))}var U3=dn(function(s,c){return s==null?{}:bF(s,c)});function B1(s,c){if(s==null)return{};var g=st(Pf(s),function(O){return[O]});return c=Ie(c),P_(s,g,function(O,N){return c(O,N[0])})}function W3(s,c,g){c=Mn(c,s);var O=-1,N=c.length;for(N||(N=1,s=r);++O<N;){var q=s==null?r:s[Mr(c[O])];q===r&&(O=N,q=g),s=pn(q)?q.call(s):q}return s}function G3(s,c,g){return s==null?s:ea(s,c,g)}function K3(s,c,g,O){return O=typeof O=="function"?O:r,s==null?s:ea(s,c,g,O)}var F1=Z_(Ct),$1=Z_(Vt);function Y3(s,c,g){var O=Me(s),N=O||jn(s)||Xi(s);if(c=Ie(c,4),g==null){var q=s&&s.constructor;N?g=O?new q:[]:ft(s)?g=pn(q)?Wi(Ts(s)):{}:g={}}return(N?er:Gr)(s,function(z,X,ie){return c(g,z,X,ie)}),g}function X3(s,c){return s==null?!0:wf(s,c)}function Z3(s,c,g){return s==null?s:D_(s,c,Sf(g))}function J3(s,c,g,O){return O=typeof O=="function"?O:r,s==null?s:D_(s,c,Sf(g),O)}function Zi(s){return s==null?[]:tf(s,Ct(s))}function Q3(s){return s==null?[]:tf(s,Vt(s))}function e5(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 t5(s,c,g){return c=vn(c),g===r?(g=c,c=0):g=vn(g),s=br(s),uF(s,c,g)}function r5(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 N=c_();return At(s+N*(c-s+jL("1e-"+((N+"").length-1))),c)}return yf(s,c)}var n5=Ki(function(s,c,g){return c=c.toLowerCase(),s+(g?z1(c):c)});function z1(s){return Wf(Ke(s).toLowerCase())}function H1(s){return s=Ke(s),s&&s.replace(Mc,KL).replace(OL,"")}function i5(s,c,g){s=Ke(s),c=rr(c);var O=s.length;g=g===r?O:ri(De(g),0,O);var N=g;return g-=c.length,g>=0&&s.slice(g,N)==c}function o5(s){return s=Ke(s),s&&mc.test(s)?s.replace(ls,YL):s}function a5(s){return s=Ke(s),s&&wc.test(s)?s.replace(Di,"\\$&"):s}var s5=Ki(function(s,c,g){return s+(g?"-":"")+c.toLowerCase()}),u5=Ki(function(s,c,g){return s+(g?" ":"")+c.toLowerCase()}),l5=U_("toLowerCase");function c5(s,c,g){s=Ke(s),c=De(c);var O=c?$i(s):0;if(!c||O>=c)return s;var N=(c-O)/2;return Ks(js(N),g)+s+Ks(Ds(N),g)}function f5(s,c,g){s=Ke(s),c=De(c);var O=c?$i(s):0;return c&&O<c?s+Ks(c-O,g):s}function d5(s,c,g){s=Ke(s),c=De(c);var O=c?$i(s):0;return c&&O<c?Ks(c-O,g)+s:s}function h5(s,c,g){return g||c==null?c=0:c&&(c=+c),wB(Ke(s).replace(ji,""),c||0)}function p5(s,c,g){return(g?kt(s,c,g):c===r)?c=1:c=De(c),bf(Ke(s),c)}function v5(){var s=arguments,c=Ke(s[0]);return s.length<3?c:c.replace(s[1],s[2])}var g5=Ki(function(s,c,g){return s+(g?"_":"")+c.toLowerCase()});function m5(s,c,g){return g&&typeof g!="number"&&kt(s,c,g)&&(c=g=r),g=g===r?ae:g>>>0,g?(s=Ke(s),s&&(typeof c=="string"||c!=null&&!zf(c))&&(c=rr(c),!c&&Fi(s))?Dn(Tr(s),0,g):s.split(c,g)):[]}var y5=Ki(function(s,c,g){return s+(g?" ":"")+Wf(c)});function b5(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 x5(s,c,g){var O=M.templateSettings;g&&kt(s,c,g)&&(c=r),s=Ke(s),c=Hf({},c,O,J_);var N=Hf({},c.imports,O.imports,J_),q=Ct(N),z=tf(N,q);er(q,function(Re){if(ps.test(Re))throw new Ae(l)});var X,ie,ge=0,me=c.interpolate||Xn,ye="__p += '",_e=nf((c.escape||Xn).source+"|"+me.source+"|"+(me===Lo?Rc:Xn).source+"|"+(c.evaluate||Xn).source+"|$","g"),Ce="//# sourceURL="+(Ge.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++NL+"]")+`
53
+ `;s.replace(_e,function(Re,ke,$e,ir,Lt,or){return $e||($e=ir),ye+=s.slice(ge,or).replace(Dc,XL),ke&&(X=!0,ye+=`' +
54
+ __e(`+ke+`) +
55
+ '`),Lt&&(ie=!0,ye+=`';
56
+ `+Lt+`;
57
+ __p += '`),$e&&(ye+=`' +
58
+ ((__t = (`+$e+`)) == null ? '' : __t) +
59
+ '`),ge=or+Re.length,Re}),ye+=`';
60
+ `;var Ne=Ge.call(c,"variable")&&c.variable;if(!Ne)ye=`with (obj) {
81
61
  `+ye+`
82
62
  }
83
- `;else if(Pr.test(Me))throw new qe(s);ye=(ae?ye.replace(Nn,""):ye).replace(Tn,"$1").replace(kt,"$1;"),ye="function("+(Me||"obj")+`) {
84
- `+(Me?"":`obj || (obj = {});
85
- `)+"var __t, __p = ''"+(ie?", __e = _.escape":"")+(ae?`, __j = Array.prototype.join;
63
+ `;else if(ps.test(Ne))throw new Ae(u);ye=(ie?ye.replace(Mi,""):ye).replace(vc,"$1").replace(gc,"$1;"),ye="function("+(Ne||"obj")+`) {
64
+ `+(Ne?"":`obj || (obj = {});
65
+ `)+"var __t, __p = ''"+(X?", __e = _.escape":"")+(ie?`, __j = Array.prototype.join;
86
66
  function print() { __p += __j.call(arguments, '') }
87
67
  `:`;
88
68
  `)+ye+`return __p
89
- }`;var He=wO(function(){return rt(H,Re+"return "+ye).apply(r,Q)});if(He.source=ye,ch(He))throw He;return He}function o$(l){return at(l).toLowerCase()}function a$(l){return at(l).toUpperCase()}function s$(l,f,g){if(l=at(l),l&&(g||f===r))return NE(l);if(!l||!(f=Xr(f)))return l;var R=Pn(l),M=Pn(f),H=TE(R,M),Q=PE(R,M)+1;return ki(R,H,Q).join("")}function l$(l,f,g){if(l=at(l),l&&(g||f===r))return l.slice(0,ME(l)+1);if(!l||!(f=Xr(f)))return l;var R=Pn(l),M=PE(R,Pn(f))+1;return ki(R,0,M).join("")}function c$(l,f,g){if(l=at(l),l&&(g||f===r))return l.replace(cr,"");if(!l||!(f=Xr(f)))return l;var R=Pn(l),M=TE(R,Pn(f));return ki(R,M).join("")}function u$(l,f){var g=B,R=G;if(It(f)){var M="separator"in f?f.separator:M;g="length"in f?$e(f.length):g,R="omission"in f?Xr(f.omission):R}l=at(l);var H=l.length;if(Bo(l)){var Q=Pn(l);H=Q.length}if(g>=H)return l;var ie=g-Fo(R);if(ie<1)return R;var ae=Q?ki(Q,0,ie).join(""):l.slice(0,ie);if(M===r)return ae+R;if(Q&&(ie+=ae.length-ie),uh(M)){if(l.slice(ie).search(M)){var ve,ge=ae;for(M.global||(M=Cf(M.source,at(un.exec(M))+"g")),M.lastIndex=0;ve=M.exec(ge);)var ye=ve.index;ae=ae.slice(0,ye===r?ie:ye)}}else if(l.indexOf(Xr(M),ie)!=ie){var _e=ae.lastIndexOf(M);_e>-1&&(ae=ae.slice(0,_e))}return ae+R}function d$(l){return l=at(l),l&&sr.test(l)?l.replace(Mt,Fz):l}var f$=Ko(function(l,f,g){return l+(g?" ":"")+f.toUpperCase()}),ph=wS("toUpperCase");function xO(l,f,g){return l=at(l),f=g?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(g){return ch(g)?g:new qe(g)}}),h$=di(function(l,f){return Kr(f,function(g){g=Mn(g),Un(l,g,sh(l[g],l))}),l});function p$(l){var f=l==null?0:l.length,g=Pe();return l=f?Ot(l,function(R){if(typeof R[1]!="function")throw new hn(a);return[g(R[0]),R[1]]}):[],Ve(function(R){for(var M=-1;++M<f;){var H=l[M];if(Gr(H[0],this,R))return Gr(H[1],this,R)}})}function v$(l){return F7(vn(l,p))}function vh(l){return function(){return l}}function g$(l,f){return l==null||l!==l?f:l}var m$=ES(),b$=ES(!0);function Dr(l){return l}function gh(l){return QE(typeof l=="function"?l:vn(l,p))}function y$(l){return tS(vn(l,p))}function x$(l,f){return rS(l,vn(f,p))}var w$=Ve(function(l,f){return function(g){return ts(g,l,f)}}),_$=Ve(function(l,f){return function(g){return ts(l,g,f)}});function mh(l,f,g){var R=nr(f),M=tc(f,R);g==null&&!(It(f)&&(M.length||!R.length))&&(g=f,f=l,l=this,M=tc(f,nr(f)));var H=!(It(g)&&"chain"in g)||!!g.chain,Q=hi(l);return Kr(M,function(ie){var ae=f[ie];l[ie]=ae,Q&&(l.prototype[ie]=function(){var ve=this.__chain__;if(H||ve){var ge=l(this.__wrapped__),ye=ge.__actions__=kr(this.__actions__);return ye.push({func:ae,args:arguments,thisArg:l}),ge.__chain__=ve,ge}return ae.apply(l,Ci([this.value()],arguments))})}),l}function E$(){return ur._===this&&(ur._=Xz),this}function bh(){}function S$(l){return l=$e(l),Ve(function(f){return nS(f,l)})}var O$=Kf(Ot),C$=Kf(SE),I$=Kf(yf);function _O(l){return th(l)?xf(Mn(l)):i8(l)}function R$(l){return function(f){return l==null?r:so(l,f)}}var N$=OS(),T$=OS(!0);function yh(){return[]}function xh(){return!1}function P$(){return{}}function k$(){return""}function M$(){return!0}function A$(l,f){if(l=$e(l),l<1||l>ne)return[];var g=Z,R=mr(l,Z);f=Pe(f),l-=Z;for(var M=Ef(R,f);++g<l;)f(g);return M}function D$(l){return ze(l)?Ot(l,Mn):Zr(l)?[l]:kr(FS(at(l)))}function j$(l){var f=++Kz;return at(l)+f}var q$=sc(function(l,f){return l+f},0),L$=Yf("ceil"),z$=sc(function(l,f){return l/f},1),B$=Yf("floor");function F$(l){return l&&l.length?ec(l,Dr,Af):r}function $$(l,f){return l&&l.length?ec(l,Pe(f,2),Af):r}function H$(l){return IE(l,Dr)}function V$(l,f){return IE(l,Pe(f,2))}function W$(l){return l&&l.length?ec(l,Dr,Lf):r}function U$(l,f){return l&&l.length?ec(l,Pe(f,2),Lf):r}var G$=sc(function(l,f){return l*f},1),K$=Yf("round"),Y$=sc(function(l,f){return l-f},0);function X$(l){return l&&l.length?_f(l,Dr):0}function Z$(l,f){return l&&l.length?_f(l,Pe(f,2)):0}return F.after=x9,F.ary=JS,F.assign=sF,F.assignIn=fO,F.assignInWith=hO,F.assignWith=dh,F.at=lF,F.before=QS,F.bind=sh,F.bindAll=h$,F.bindKey=eO,F.castArray=k9,F.chain=YS,F.chunk=F8,F.compact=$8,F.concat=H8,F.cond=p$,F.conforms=v$,F.constant=vh,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=WS,F.flattenDeep=J8,F.flattenDepth=Q8,F.flip=E9,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=gh,F.keyBy=l9,F.keys=nr,F.keysIn=Ar,F.map=pc,F.mapKeys=SF,F.mapValues=OF,F.matches=y$,F.matchesProperty=x$,F.memoize=gc,F.merge=CF,F.mergeWith=pO,F.method=w$,F.methodOf=_$,F.mixin=mh,F.negate=mc,F.nthArg=S$,F.omit=IF,F.omitBy=RF,F.once=S9,F.orderBy=c9,F.over=O$,F.overArgs=O9,F.overEvery=C$,F.overSome=I$,F.partial=lh,F.partialRight=iO,F.partition=u9,F.pick=NF,F.pickBy=vO,F.property=_O,F.propertyOf=R$,F.pull=cB,F.pullAll=GS,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=oh,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=EB,F.take=SB,F.takeRight=OB,F.takeRightWhile=CB,F.takeWhile=IB,F.tap=$B,F.throttle=N9,F.thru=hc,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=ah,F.unzipWith=KS,F.update=DF,F.updateWith=jF,F.values=Zo,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,mh(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=An,F.escape=HF,F.escapeRegExp=VF,F.every=JB,F.find=e9,F.findIndex=HS,F.findKey=fF,F.findLast=t9,F.findLastIndex=VS,F.findLastKey=hF,F.floor=B$,F.forEach=XS,F.forEachRight=ZS,F.forIn=pF,F.forInRight=vF,F.forOwn=gF,F.forOwnRight=mF,F.get=fh,F.gt=L9,F.gte=z9,F.has=xF,F.hasIn=hh,F.head=US,F.identity=Dr,F.includes=a9,F.indexOf=tB,F.inRange=zF,F.invoke=EF,F.isArguments=uo,F.isArray=ze,F.isArrayBuffer=B9,F.isArrayLike=Mr,F.isArrayLikeObject=Dt,F.isBoolean=F9,F.isBuffer=Mi,F.isDate=$9,F.isElement=H9,F.isEmpty=V9,F.isEqual=W9,F.isEqualWith=U9,F.isError=ch,F.isFinite=G9,F.isFunction=hi,F.isInteger=oO,F.isLength=bc,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=It,F.isObjectLike=Tt,F.isPlainObject=ss,F.isRegExp=uh,F.isSafeInteger=eF,F.isSet=lO,F.isString=yc,F.isSymbol=Zr,F.isTypedArray=Xo,F.isUndefined=tF,F.isWeakMap=rF,F.isWeakSet=nF,F.join=aB,F.kebabCase=WF,F.last=mn,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=yh,F.stubFalse=xh,F.stubObject=P$,F.stubString=k$,F.stubTrue=M$,F.multiply=G$,F.nth=lB,F.noConflict=E$,F.noop=bh,F.now=vc,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=oe,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=pi,F.toInteger=$e,F.toLength=uO,F.toLower=o$,F.toNumber=bn,F.toSafeInteger=aF,F.toString=at,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=ph,F.each=XS,F.eachRight=ZS,F.first=US,mh(F,(function(){var l={};return Gn(F,function(f,g){ot.call(F.prototype,g)||(l[g]=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){Ye.prototype[l]=function(g){g=g===r?1:Xt($e(g),0);var R=this.__filtered__&&!f?new Ye(this):this.clone();return R.__filtered__?R.__takeCount__=mr(g,R.__takeCount__):R.__views__.push({size:mr(g,Z),type:l+(R.__dir__<0?"Right":"")}),R},Ye.prototype[l+"Right"]=function(g){return this.reverse()[l](g).reverse()}}),Kr(["filter","map","takeWhile"],function(l,f){var g=f+1,R=g==K||g==re;Ye.prototype[l]=function(M){var H=this.clone();return H.__iteratees__.push({iteratee:Pe(M,3),type:g}),H.__filtered__=H.__filtered__||R,H}}),Kr(["head","last"],function(l,f){var g="take"+(f?"Right":"");Ye.prototype[l]=function(){return this[g](1).value()[0]}}),Kr(["initial","tail"],function(l,f){var g="drop"+(f?"":"Right");Ye.prototype[l]=function(){return this.__filtered__?new Ye(this):this[g](1)}}),Ye.prototype.compact=function(){return this.filter(Dr)},Ye.prototype.find=function(l){return this.filter(l).head()},Ye.prototype.findLast=function(l){return this.reverse().find(l)},Ye.prototype.invokeMap=Ve(function(l,f){return typeof l=="function"?new Ye(this):this.map(function(g){return ts(g,l,f)})}),Ye.prototype.reject=function(l){return this.filter(mc(Pe(l)))},Ye.prototype.slice=function(l,f){l=$e(l);var g=this;return g.__filtered__&&(l>0||f<0)?new Ye(g):(l<0?g=g.takeRight(-l):l&&(g=g.drop(l)),f!==r&&(f=$e(f),g=f<0?g.dropRight(-f):g.take(f-l)),g)},Ye.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Ye.prototype.toArray=function(){return this.take(Z)},Gn(Ye.prototype,function(l,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),R=/^(?:head|last)$/.test(f),M=F[R?"take"+(f=="last"?"Right":""):f],H=R||/^find/.test(f);M&&(F.prototype[f]=function(){var Q=this.__wrapped__,ie=R?[1]:arguments,ae=Q instanceof Ye,ve=ie[0],ge=ae||ze(Q),ye=function(Ge){var Xe=M.apply(F,Ci([Ge],ie));return R&&_e?Xe[0]:Xe};ge&&g&&typeof ve=="function"&&ve.length!=1&&(ae=ge=!1);var _e=this.__chain__,Re=!!this.__actions__.length,Me=H&&!_e,He=ae&&!Re;if(!H&&ge){Q=He?Q:new Ye(this);var Te=l.apply(Q,ie);return Te.__actions__.push({func:hc,args:[ye],thisArg:r}),new pn(Te,_e)}return Me&&He?l.apply(this,ie):(Te=this.thru(ye),Me?R?Te.value()[0]:Te.value():Te)})}),Kr(["pop","push","shift","sort","splice","unshift"],function(l){var f=zl[l],g=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",R=/^(?:pop|shift)$/.test(l);F.prototype[l]=function(){var M=arguments;if(R&&!this.__chain__){var H=this.value();return f.apply(ze(H)?H:[],M)}return this[g](function(Q){return f.apply(ze(Q)?Q:[],M)})}}),Gn(Ye.prototype,function(l,f){var g=F[f];if(g){var R=g.name+"";ot.call(Wo,R)||(Wo[R]=[]),Wo[R].push({name:f,func:g})}}),Wo[ac(r,y).name]=[{name:"wrapper",func:r}],Ye.prototype.clone=f7,Ye.prototype.reverse=h7,Ye.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,Ka&&(F.prototype[Ka]=GB),F}),$o=Wz();ro?((ro.exports=$o)._=$o,vf._=$o):ur._=$o}).call(Hoe)})(Ls,Ls.exports)),Ls.exports}var Eo=Voe();function Woe(){const e=Ze.useAppDispatch(),t=Ze.useAppSelector(Ze.selectRoles),r=Ze.useAppSelector(Ze.selectPrivileges),n=Ze.useAppSelector(Ze.selectRolesFlags),i=Ze.useAppSelector(Ze.selectRolesAndPrivileges,(x,m)=>Eo.isEqual(x,m)),o=Ze.useAppSelector(Ze.selectCatalog),a=Ze.useAppSelector(Ze.selectQodly),s=Ze.useAppSelector(Ze.selectSelectedTab),c=Ze.useAppSelector(Ze.selectForceLogin),u=Ze.useAppSelector(Ze.selectRestrictedByDefault),d=Ze.useAppSelector(Ze.selectGuestPrivilege),h=Ze.useAppSelector(Ze.selectCatalogMethods),p=Ze.useAppSelector(Ze.selectDataclasses),v=Ze.useAppSelector(Ze.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(Ze.updateRoles(x))},updatePrivileges:x=>{e(Ze.updatePrivileges(x))},setRolesContent:x=>{e(Ze.setRolesContent(x))},toggleTab:x=>{e(Ze.toggleTab(x))},toggleForceLogin:x=>{e(Ze.toggleForceLogin(x))},toggleRestrictedByDefault:x=>{e(Ze.toggleRestrictedByDefault(x))},setTabFlags:(x,m)=>{e(Ze.setTabFlags({path:x,flags:m}))},openModal:async x=>await e(Ze.openModal(x)).unwrap()}}}const Gq=C.createContext(null),Kq=({children:e,adapter:t})=>O.jsx(Gq.Provider,{value:t,children:e}),xr=()=>{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 Sl(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 ni(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 qd=(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(m){t={error:m}}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(ni(d))try{d()}catch(m){o=m instanceof O0?m.errors:[m]}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(m){o=o??[],m instanceof O0?o=Gw(Gw([],Uw(o)),Uw(m.errors)):o.push(m)}}}catch(m){n={error:m}}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=qd.EMPTY;function Zq(e){return e instanceof qd||e&&"closed"in e&&ni(e.remove)&&ni(e.add)&&ni(e.unsubscribe)}function MP(e){ni(e)?e():e.unsubscribe()}var Uoe={Promise:void 0},Goe={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 Koe(e){Goe.setTimeout(function(){throw e})}function AP(){}function gu(e){e()}var F_=(function(e){Sl(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=Zoe,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})(qd),Yoe=(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){Gc(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){Gc(n)}else Gc(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){Gc(r)}},e})(),Yw=(function(e){Sl(t,e);function t(r,n,i){var o=e.call(this)||this,a;return ni(r)||!r?a={next:r??void 0,error:n??void 0,complete:i??void 0}:a=r,o.destination=new Yoe(a),o}return t})(F_);function Gc(e){Koe(e)}function Xoe(e){throw e}var Zoe={closed:!0,next:AP,error:Xoe,complete:AP},Joe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Qoe(e){return e}function eae(e){return e.length===0?Qoe: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=rae(t)?t:new Yw(t,r,n);return gu(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[Joe]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return eae(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??Uoe.Promise)!==null&&t!==void 0?t:Promise}function tae(e){return e&&ni(e.next)&&ni(e.error)&&ni(e.complete)}function rae(e){return e&&e instanceof F_||tae(e)&&Zq(e)}function nae(e){return ni(e==null?void 0:e.lift)}function iae(e){return function(t){if(nae(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 oae(e,t,r,n,i){return new aae(e,t,r,n,i)}var aae=(function(e){Sl(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_),sae=Yq(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Jq=(function(e){Sl(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 sae},t.prototype.next=function(r){var n=this;gu(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;gu(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;gu(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 qd(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){Sl(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 lae(e,t){return iae(function(r,n){var i=0;r.subscribe(oae(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}var C0={},ms={},Kc={},LP;function Qq(){if(LP)return Kc;LP=1,Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.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 Kc}var oa={},bs={},ys={},zP;function cae(){if(zP)return ys;zP=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.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 ys.default=e,ys}var BP;function Ld(){if(BP)return bs;BP=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.default=void 0;var e=t(cae());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 bs.default=n,bs}var FP;function zd(){if(FP)return oa;FP=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.default=void 0,oa.unsafeStringify=n;var e=t(Ld());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 oa.default=o,oa}var $P;function uae(){if($P)return ms;$P=1,Object.defineProperty(ms,"__esModule",{value:!0}),ms.default=void 0;var e=r(Qq()),t=zd();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,m=u.clockseq!==void 0?u.clockseq:i;if(x==null||m==null){const E=u.random||(u.rng||e.default)();x==null&&(x=n=[E[0]|1,E[1],E[2],E[3],E[4],E[5]]),m==null&&(m=i=(E[6]<<8|E[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&&(m=m+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=m,b+=122192928e5;const _=((b&268435455)*1e4+w)%4294967296;v[p++]=_>>>24&255,v[p++]=_>>>16&255,v[p++]=_>>>8&255,v[p++]=_&255;const S=b/4294967296*1e4&268435455;v[p++]=S>>>8&255,v[p++]=S&255,v[p++]=S>>>24&15|16,v[p++]=S>>>16&255,v[p++]=m>>>8|128,v[p++]=m&255;for(let E=0;E<6;++E)v[p+E]=x[E];return d||(0,t.unsafeStringify)(v)}var c=s;return ms.default=c,ms}var xs={},zi={},ws={},HP;function eL(){if(HP)return ws;HP=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.default=void 0;var e=t(Ld());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 ws.default=n,ws}var VP;function tL(){if(VP)return zi;VP=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.URL=zi.DNS=void 0,zi.default=a;var e=zd(),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";zi.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";zi.URL=o;function a(s,c,u){function d(h,p,v,x){var m;if(typeof h=="string"&&(h=n(h)),typeof p=="string"&&(p=(0,t.default)(p)),((m=p)===null||m===void 0?void 0:m.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 zi}var _s={},WP;function dae(){if(WP)return _s;WP=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.default=void 0;function e(v){if(typeof v=="string"){const x=unescape(encodeURIComponent(v));v=new Uint8Array(x.length);for(let m=0;m<x.length;++m)v[m]=x.charCodeAt(m)}return t(n(i(v),v.length*8))}function t(v){const x=[],m=v.length*32,b="0123456789abcdef";for(let w=0;w<m;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 m=1732584193,b=-271733879,w=-1732584194,y=271733878;for(let _=0;_<v.length;_+=16){const S=m,E=b,I=w,N=y;m=c(m,b,w,y,v[_],7,-680876936),y=c(y,m,b,w,v[_+1],12,-389564586),w=c(w,y,m,b,v[_+2],17,606105819),b=c(b,w,y,m,v[_+3],22,-1044525330),m=c(m,b,w,y,v[_+4],7,-176418897),y=c(y,m,b,w,v[_+5],12,1200080426),w=c(w,y,m,b,v[_+6],17,-1473231341),b=c(b,w,y,m,v[_+7],22,-45705983),m=c(m,b,w,y,v[_+8],7,1770035416),y=c(y,m,b,w,v[_+9],12,-1958414417),w=c(w,y,m,b,v[_+10],17,-42063),b=c(b,w,y,m,v[_+11],22,-1990404162),m=c(m,b,w,y,v[_+12],7,1804603682),y=c(y,m,b,w,v[_+13],12,-40341101),w=c(w,y,m,b,v[_+14],17,-1502002290),b=c(b,w,y,m,v[_+15],22,1236535329),m=u(m,b,w,y,v[_+1],5,-165796510),y=u(y,m,b,w,v[_+6],9,-1069501632),w=u(w,y,m,b,v[_+11],14,643717713),b=u(b,w,y,m,v[_],20,-373897302),m=u(m,b,w,y,v[_+5],5,-701558691),y=u(y,m,b,w,v[_+10],9,38016083),w=u(w,y,m,b,v[_+15],14,-660478335),b=u(b,w,y,m,v[_+4],20,-405537848),m=u(m,b,w,y,v[_+9],5,568446438),y=u(y,m,b,w,v[_+14],9,-1019803690),w=u(w,y,m,b,v[_+3],14,-187363961),b=u(b,w,y,m,v[_+8],20,1163531501),m=u(m,b,w,y,v[_+13],5,-1444681467),y=u(y,m,b,w,v[_+2],9,-51403784),w=u(w,y,m,b,v[_+7],14,1735328473),b=u(b,w,y,m,v[_+12],20,-1926607734),m=d(m,b,w,y,v[_+5],4,-378558),y=d(y,m,b,w,v[_+8],11,-2022574463),w=d(w,y,m,b,v[_+11],16,1839030562),b=d(b,w,y,m,v[_+14],23,-35309556),m=d(m,b,w,y,v[_+1],4,-1530992060),y=d(y,m,b,w,v[_+4],11,1272893353),w=d(w,y,m,b,v[_+7],16,-155497632),b=d(b,w,y,m,v[_+10],23,-1094730640),m=d(m,b,w,y,v[_+13],4,681279174),y=d(y,m,b,w,v[_],11,-358537222),w=d(w,y,m,b,v[_+3],16,-722521979),b=d(b,w,y,m,v[_+6],23,76029189),m=d(m,b,w,y,v[_+9],4,-640364487),y=d(y,m,b,w,v[_+12],11,-421815835),w=d(w,y,m,b,v[_+15],16,530742520),b=d(b,w,y,m,v[_+2],23,-995338651),m=h(m,b,w,y,v[_],6,-198630844),y=h(y,m,b,w,v[_+7],10,1126891415),w=h(w,y,m,b,v[_+14],15,-1416354905),b=h(b,w,y,m,v[_+5],21,-57434055),m=h(m,b,w,y,v[_+12],6,1700485571),y=h(y,m,b,w,v[_+3],10,-1894986606),w=h(w,y,m,b,v[_+10],15,-1051523),b=h(b,w,y,m,v[_+1],21,-2054922799),m=h(m,b,w,y,v[_+8],6,1873313359),y=h(y,m,b,w,v[_+15],10,-30611744),w=h(w,y,m,b,v[_+6],15,-1560198380),b=h(b,w,y,m,v[_+13],21,1309151649),m=h(m,b,w,y,v[_+4],6,-145523070),y=h(y,m,b,w,v[_+11],10,-1120210379),w=h(w,y,m,b,v[_+2],15,718787259),b=h(b,w,y,m,v[_+9],21,-343485551),m=o(m,S),b=o(b,E),w=o(w,I),y=o(y,N)}return[m,b,w,y]}function i(v){if(v.length===0)return[];const x=v.length*8,m=new Uint32Array(r(x));for(let b=0;b<x;b+=8)m[b>>5]|=(v[b/8]&255)<<b%32;return m}function o(v,x){const m=(v&65535)+(x&65535);return(v>>16)+(x>>16)+(m>>16)<<16|m&65535}function a(v,x){return v<<x|v>>>32-x}function s(v,x,m,b,w,y){return o(a(o(o(x,v),o(b,y)),w),m)}function c(v,x,m,b,w,y,_){return s(x&m|~x&b,v,x,w,y,_)}function u(v,x,m,b,w,y,_){return s(x&b|m&~b,v,x,w,y,_)}function d(v,x,m,b,w,y,_){return s(x^m^b,v,x,w,y,_)}function h(v,x,m,b,w,y,_){return s(m^(x|~b),v,x,w,y,_)}var p=e;return _s.default=p,_s}var UP;function fae(){if(UP)return xs;UP=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.default=void 0;var e=r(tL()),t=r(dae());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return xs.default=i,xs}var Es={},Ss={},GP;function hae(){if(GP)return Ss;GP=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return Ss.default=t,Ss}var KP;function pae(){if(KP)return Es;KP=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.default=void 0;var e=n(hae()),t=n(Qq()),r=zd();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 Es.default=o,Es}var Os={},Cs={},YP;function vae(){if(YP)return Cs;YP=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.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],m=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,m)+b+o[y]+h[w]>>>0;b=m,m=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]+m>>>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 Cs.default=n,Cs}var XP;function gae(){if(XP)return Os;XP=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.default=void 0;var e=r(tL()),t=r(vae());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return Os.default=i,Os}var Is={},ZP;function mae(){if(ZP)return Is;ZP=1,Object.defineProperty(Is,"__esModule",{value:!0}),Is.default=void 0;var e="00000000-0000-0000-0000-000000000000";return Is.default=e,Is}var Rs={},JP;function bae(){if(JP)return Rs;JP=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.default=void 0;var e=t(Ld());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 Rs.default=n,Rs}var QP;function yae(){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(uae()),r=d(fae()),n=d(pae()),i=d(gae()),o=d(mae()),a=d(bae()),s=d(Ld()),c=d(zd()),u=d(eL());function d(h){return h&&h.__esModule?h:{default:h}}})(C0)),C0}var I0,ek;function xae(){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 wae(){if(tk)return R0;tk=1;var e=xae();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 _ae(){if(rk)return N0;rk=1;const{v4:e,validate:t}=yae(),r=wae(),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),m={shortIdLength:x,consistentLength:v.consistentLength,paddingChar:p[0]},b=r(r.HEX,p),w=r(p,r.HEX),y=()=>a(e(),b,m),S={alphabet:p,fromUUID:E=>a(E,b,m),maxLength:x,generate:y,new:y,toUUID:E=>s(E,w),uuid:e,validate:(E,I=!1)=>{if(!E||typeof E!="string")return!1;const N=v.consistentLength?E.length===x:E.length<=x,T=E.split("").every(k=>p.includes(k));return I===!1?N&&T:N&&T&&t(s(E,w))}};return Object.freeze(S),S};return u.constants=n,u.uuid=e,u.generate=()=>(o||(o=u(n.flickrBase58).generate),o()),u})(),N0}var rL=_ae();const nL=new Jq;function Eae(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),Sae=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),Oae=({children:e,catalog:t=null,qodly:r=!1,onSetTabFlags:n,initialState:i})=>{const[o,a]=C.useReducer(Eae,{...Sae(),...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 Cae(){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(lae(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((m,b)=>({...m,[b[0]]:b[1].value}),{});r({type:"REMOVE_MODAL",payload:s}),u.unsubscribe(),c({confirmed:v,options:x})}})}):{confirmed:!1}},[r])}}}function Iae(){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=xr(),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(iu,{color:r==="included"?"primary":"dark",onClick:r==="included"?c:s,disabled:r==="disabled",children:[e.privilege,O.jsx(Wi,{className:rn("transform transition-transform",{"rotate-45":r==="included"})})]})},Rae=({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(yr,{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(Nu,{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))]})]})},Nae=({item:e,depth:t})=>{const r=xr(),[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(Nae,{item:r,depth:t},r.id):O.jsx("div",{className:rn("py-1 text-xs",{}),children:r.privilege},r.id)),zr=()=>document.querySelector(`.${DD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Bd=({container:e,...t})=>O.jsx(fe.Portal,{...t,container:e||zr()}),nk=({privilege:e,selectedPrivilege:t,onSelect:r,isGuest:n=!1})=>{const i=xr(),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 m(){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:S}=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(S){const E=fe.removePrivilege(e.id,o);if((t==null?void 0:t.id)!==e.id){i.actions.updatePrivileges(E);return}const I=Object.keys(E).filter(N=>E[N].privilege!=="guest");if(I.length===0)r(null);else{const N=Object.keys(o).filter(B=>o[B].privilege!=="guest"),T=N.indexOf(e.id),k=Math.max(0,T-1),L=N[k];T===0?r(E[I[0]]):E[L]?r(E[L]):r(E[I[0]])}i.actions.updatePrivileges(E)}},y=C.useMemo(()=>e.resources.some(_=>_.exists===!1),[e]);return O.jsxs(Lr,{container:zr(),color:"negative",icon:O.jsx(bi,{}),label:"This privilege uses non-existing resources",isHidden:!y,children:[O.jsxs(yr,{depth:4,borderType:(t==null?void 0:t.id)===e.id?"primary":(t==null?void 0:t.id)!==e.id?"light":"default",className:rn("w-full rounded border p-2",{"border-red-400":y&&(t==null?void 0:t.id)!==e.id}),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(ed,{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"&&m()},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(Lr,{icon:O.jsx(bi,{}),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 space-x-2",children:s?O.jsxs(O.Fragment,{children:[O.jsx(Qt,{variant:"ghost",color:"white",onClick:m,children:O.jsx("span",{children:O.jsx(zD,{className:"h-4 w-4"})})}),O.jsx(Qt,{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(Qt,{variant:"ghost",color:"white",onClick:x,children:O.jsx(KD,{className:"h-4 w-4"})}),O.jsx(Qt,{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]})," "]})},Tae=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=xr(),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 space-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(Wi,{className:"ml-2 inline h-4 w-4"})]})]})})})]})};var Yc={exports:{}},Xc={exports:{}},ct={};/** @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 Pae(){if(ik)return ct;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,m=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 _(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case c:case u:case n:case o:case i:case h:return E;default:switch(E=E&&E.$$typeof,E){case s:case d:case x:case v:case a:return E;default:return I}}case r:return I}}}function S(E){return _(E)===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(E){return S(E)||_(E)===c},ct.isConcurrentMode=S,ct.isContextConsumer=function(E){return _(E)===s},ct.isContextProvider=function(E){return _(E)===a},ct.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ct.isForwardRef=function(E){return _(E)===d},ct.isFragment=function(E){return _(E)===n},ct.isLazy=function(E){return _(E)===x},ct.isMemo=function(E){return _(E)===v},ct.isPortal=function(E){return _(E)===r},ct.isProfiler=function(E){return _(E)===o},ct.isStrictMode=function(E){return _(E)===i},ct.isSuspense=function(E){return _(E)===h},ct.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===u||E===o||E===i||E===h||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===x||E.$$typeof===v||E.$$typeof===a||E.$$typeof===s||E.$$typeof===d||E.$$typeof===b||E.$$typeof===w||E.$$typeof===y||E.$$typeof===m)},ct.typeOf=_,ct}var ut={};/** @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 kae(){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,m=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 _(te){return typeof te=="string"||typeof te=="function"||te===n||te===u||te===o||te===i||te===h||te===p||typeof te=="object"&&te!==null&&(te.$$typeof===x||te.$$typeof===v||te.$$typeof===a||te.$$typeof===s||te.$$typeof===d||te.$$typeof===b||te.$$typeof===w||te.$$typeof===y||te.$$typeof===m)}function S(te){if(typeof te=="object"&&te!==null){var he=te.$$typeof;switch(he){case t:var ce=te.type;switch(ce){case c:case u:case n:case o:case i:case h:return ce;default:var be=ce&&ce.$$typeof;switch(be){case s:case d:case x:case v:case a:return be;default:return he}}case r:return he}}}var E=c,I=u,N=s,T=a,k=t,L=d,B=n,G=x,z=v,P=r,K=o,U=i,re=h,X=!1;function ne(te){return X||(X=!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.")),D(te)||S(te)===c}function D(te){return S(te)===u}function $(te){return S(te)===s}function Z(te){return S(te)===a}function ee(te){return typeof te=="object"&&te!==null&&te.$$typeof===t}function A(te){return S(te)===d}function W(te){return S(te)===n}function q(te){return S(te)===x}function j(te){return S(te)===v}function V(te){return S(te)===r}function J(te){return S(te)===o}function Y(te){return S(te)===i}function se(te){return S(te)===h}ut.AsyncMode=E,ut.ConcurrentMode=I,ut.ContextConsumer=N,ut.ContextProvider=T,ut.Element=k,ut.ForwardRef=L,ut.Fragment=B,ut.Lazy=G,ut.Memo=z,ut.Portal=P,ut.Profiler=K,ut.StrictMode=U,ut.Suspense=re,ut.isAsyncMode=ne,ut.isConcurrentMode=D,ut.isContextConsumer=$,ut.isContextProvider=Z,ut.isElement=ee,ut.isForwardRef=A,ut.isFragment=W,ut.isLazy=q,ut.isMemo=j,ut.isPortal=V,ut.isProfiler=J,ut.isStrictMode=Y,ut.isSuspense=se,ut.isValidElementType=_,ut.typeOf=S})()),ut}var ak;function oL(){return ak||(ak=1,process.env.NODE_ENV==="production"?Xc.exports=Pae():Xc.exports=kae()),Xc.exports}/*
106
- object-assign
107
- (c) Sindre Sorhus
108
- @license MIT
109
- */var P0,sk;function Mae(){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 Aae(){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 Dae(){if(dk)return D0;dk=1;var e=oL(),t=Mae(),r=H_(),n=aL(),i=Aae(),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(D){var $=D&&(u&&D[u]||D[d]);if(typeof $=="function")return $}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:S(),elementType:E(),instanceOf:I,node:L(),objectOf:T,oneOf:N,oneOfType:k,shape:G,exact:z};function x(D,$){return D===$?D!==0||1/D===1/$:D!==D&&$!==$}function m(D,$){this.message=D,this.data=$&&typeof $=="object"?$:{},this.stack=""}m.prototype=Error.prototype;function b(D){if(process.env.NODE_ENV!=="production")var $={},Z=0;function ee(W,q,j,V,J,Y,se){if(V=V||p,Y=Y||j,se!==r){if(c){var te=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 te.name="Invariant Violation",te}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var he=V+":"+j;!$[he]&&Z<3&&(o("You are manually calling a React.PropTypes validation function for the `"+Y+"` 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."),$[he]=!0,Z++)}}return q[j]==null?W?q[j]===null?new m("The "+J+" `"+Y+"` is marked as required "+("in `"+V+"`, but its value is `null`.")):new m("The "+J+" `"+Y+"` is marked as required in "+("`"+V+"`, but its value is `undefined`.")):null:D(q,j,V,J,Y)}var A=ee.bind(null,!1);return A.isRequired=ee.bind(null,!0),A}function w(D){function $(Z,ee,A,W,q,j){var V=Z[ee],J=U(V);if(J!==D){var Y=re(V);return new m("Invalid "+W+" `"+q+"` of type "+("`"+Y+"` supplied to `"+A+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return b($)}function y(){return b(a)}function _(D){function $(Z,ee,A,W,q){if(typeof D!="function")return new m("Property `"+q+"` of component `"+A+"` has invalid PropType notation inside arrayOf.");var j=Z[ee];if(!Array.isArray(j)){var V=U(j);return new m("Invalid "+W+" `"+q+"` of type "+("`"+V+"` supplied to `"+A+"`, expected an array."))}for(var J=0;J<j.length;J++){var Y=D(j,J,A,W,q+"["+J+"]",r);if(Y instanceof Error)return Y}return null}return b($)}function S(){function D($,Z,ee,A,W){var q=$[Z];if(!s(q)){var j=U(q);return new m("Invalid "+A+" `"+W+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected a single ReactElement."))}return null}return b(D)}function E(){function D($,Z,ee,A,W){var q=$[Z];if(!e.isValidElementType(q)){var j=U(q);return new m("Invalid "+A+" `"+W+"` of type "+("`"+j+"` supplied to `"+ee+"`, expected a single ReactElement type."))}return null}return b(D)}function I(D){function $(Z,ee,A,W,q){if(!(Z[ee]instanceof D)){var j=D.name||p,V=ne(Z[ee]);return new m("Invalid "+W+" `"+q+"` of type "+("`"+V+"` supplied to `"+A+"`, expected ")+("instance of `"+j+"`."))}return null}return b($)}function N(D){if(!Array.isArray(D))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 $(Z,ee,A,W,q){for(var j=Z[ee],V=0;V<D.length;V++)if(x(j,D[V]))return null;var J=JSON.stringify(D,function(se,te){var he=re(te);return he==="symbol"?String(te):te});return new m("Invalid "+W+" `"+q+"` of value `"+String(j)+"` "+("supplied to `"+A+"`, expected one of "+J+"."))}return b($)}function T(D){function $(Z,ee,A,W,q){if(typeof D!="function")return new m("Property `"+q+"` of component `"+A+"` has invalid PropType notation inside objectOf.");var j=Z[ee],V=U(j);if(V!=="object")return new m("Invalid "+W+" `"+q+"` of type "+("`"+V+"` supplied to `"+A+"`, expected an object."));for(var J in j)if(n(j,J)){var Y=D(j,J,A,W,q+"."+J,r);if(Y instanceof Error)return Y}return null}return b($)}function k(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var $=0;$<D.length;$++){var Z=D[$];if(typeof Z!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+X(Z)+" at index "+$+"."),a}function ee(A,W,q,j,V){for(var J=[],Y=0;Y<D.length;Y++){var se=D[Y],te=se(A,W,q,j,V,r);if(te==null)return null;te.data&&n(te.data,"expectedType")&&J.push(te.data.expectedType)}var he=J.length>0?", expected one of type ["+J.join(", ")+"]":"";return new m("Invalid "+j+" `"+V+"` supplied to "+("`"+q+"`"+he+"."))}return b(ee)}function L(){function D($,Z,ee,A,W){return P($[Z])?null:new m("Invalid "+A+" `"+W+"` supplied to "+("`"+ee+"`, expected a ReactNode."))}return b(D)}function B(D,$,Z,ee,A){return new m((D||"React class")+": "+$+" type `"+Z+"."+ee+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+A+"`.")}function G(D){function $(Z,ee,A,W,q){var j=Z[ee],V=U(j);if(V!=="object")return new m("Invalid "+W+" `"+q+"` of type `"+V+"` "+("supplied to `"+A+"`, expected `object`."));for(var J in D){var Y=D[J];if(typeof Y!="function")return B(A,W,q,J,re(Y));var se=Y(j,J,A,W,q+"."+J,r);if(se)return se}return null}return b($)}function z(D){function $(Z,ee,A,W,q){var j=Z[ee],V=U(j);if(V!=="object")return new m("Invalid "+W+" `"+q+"` of type `"+V+"` "+("supplied to `"+A+"`, expected `object`."));var J=t({},Z[ee],D);for(var Y in J){var se=D[Y];if(n(D,Y)&&typeof se!="function")return B(A,W,q,Y,re(se));if(!se)return new m("Invalid "+W+" `"+q+"` key `"+Y+"` supplied to `"+A+"`.\nBad object: "+JSON.stringify(Z[ee],null," ")+`
110
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var te=se(j,Y,A,W,q+"."+Y,r);if(te)return te}return null}return b($)}function P(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(P);if(D===null||s(D))return!0;var $=h(D);if($){var Z=$.call(D),ee;if($!==D.entries){for(;!(ee=Z.next()).done;)if(!P(ee.value))return!1}else for(;!(ee=Z.next()).done;){var A=ee.value;if(A&&!P(A[1]))return!1}}else return!1;return!0;default:return!1}}function K(D,$){return D==="symbol"?!0:$?$["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&$ instanceof Symbol:!1}function U(D){var $=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":K($,D)?"symbol":$}function re(D){if(typeof D>"u"||D===null)return""+D;var $=U(D);if($==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return $}function X(D){var $=re(D);switch($){case"array":case"object":return"an "+$;case"boolean":case"date":case"regexp":return"a "+$;default:return $}}function ne(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},D0}var j0,fk;function jae(){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 qae(){if(hk)return Yc.exports;if(hk=1,process.env.NODE_ENV!=="production"){var e=oL(),t=!0;Yc.exports=Dae()(e.isElement,t)}else Yc.exports=jae()();return Yc.exports}var Lae=qae();const Ns=Yi(Lae);var pk={},Ts,vk;function Vt(){if(vk)return Ts;vk=1;var e=function(t){return t&&t.Math===Math&&t};return Ts=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof Pt=="object"&&Pt)||e(typeof Ts=="object"&&Ts)||(function(){return this})()||Function("return this")(),Ts}var q0={},L0,gk;function wt(){return gk||(gk=1,L0=function(e){try{return!!e()}catch{return!0}}),L0}var z0,mk;function Wn(){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 Fd(){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 Wr(){if(yk)return F0;yk=1;var e=Fd(),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 mt(){if(_k)return V0;_k=1;var e=Fd(),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,Ek;function Zi(){if(Ek)return W0;Ek=1;var e=mt(),t=e({}.toString),r=e("".slice);return W0=function(n){return r(t(n),8,-1)},W0}var U0,Sk;function $d(){if(Sk)return U0;Sk=1;var e=mt(),t=wt(),r=Zi(),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 Ol(){return Ok||(Ok=1,G0=function(e){return e==null}),G0}var K0,Ck;function Mo(){if(Ck)return K0;Ck=1;var e=Ol(),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 za(){if(Ik)return Y0;Ik=1;var e=$d(),t=Mo();return Y0=function(r){return e(t(r))},Y0}var X0,Rk;function tr(){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 pr(){if(Nk)return Z0;Nk=1;var e=tr();return Z0=function(t){return typeof t=="object"?t!==null:e(t)},Z0}var J0,Tk;function Hd(){if(Tk)return J0;Tk=1;var e=Vt(),t=tr(),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 Vd(){if(Pk)return Q0;Pk=1;var e=mt();return Q0=e({}.isPrototypeOf),Q0}var ey,kk;function lL(){if(kk)return ey;kk=1;var e=Vt(),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=Vt(),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=Vt(),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=Hd(),t=tr(),r=Vd(),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 Cl(){if(Lk)return ay;Lk=1;var e=tr(),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 Il(){if(zk)return sy;zk=1;var e=Cl(),t=Ol();return sy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},sy}var ly,Bk;function zae(){if(Bk)return ly;Bk=1;var e=Wr(),t=tr(),r=pr(),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 Wd(){return Fk||(Fk=1,uy=!1),uy}var dy,$k;function G_(){if($k)return dy;$k=1;var e=Vt(),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=Wd(),t=Vt(),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 Ba(){if(Wk)return hy;Wk=1;var e=Mo(),t=Object;return hy=function(r){return t(e(r))},hy}var py,Uk;function In(){if(Uk)return py;Uk=1;var e=mt(),t=Ba(),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=mt(),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=Vt(),t=Y_(),r=In(),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 Bae(){if(Yk)return my;Yk=1;var e=Wr(),t=pr(),r=dL(),n=Il(),i=zae(),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=Bae(),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=Vt(),t=pr(),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=Wn(),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=Wn(),t=Wr(),r=sL(),n=V_(),i=za(),o=fL(),a=In(),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=Wn(),t=wt();return _y=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),_y}var Ey,tM;function Rn(){if(tM)return Ey;tM=1;var e=pr(),t=String,r=TypeError;return Ey=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Ey}var rM;function Si(){if(rM)return wy;rM=1;var e=Wn(),t=hL(),r=vL(),n=Rn(),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 m=s(p,v);m&&m[d]&&(p[v]=x.value,x={configurable:u in x?x[u]:m[u],enumerable:c in x?x[c]:m[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 Sy,nM;function Rl(){if(nM)return Sy;nM=1;var e=Wn(),t=Si(),r=V_();return Sy=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Sy}var Oy={exports:{}},Cy,iM;function J_(){if(iM)return Cy;iM=1;var e=Wn(),t=In(),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=mt(),t=tr(),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=Vt(),t=tr(),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 Ud(){return lM||(lM=1,Ty={}),Ty}var Py,cM;function Fa(){if(cM)return Py;cM=1;var e=mL(),t=Vt(),r=pr(),n=Rl(),i=In(),o=K_(),a=Q_(),s=Ud(),c="Object already initialized",u=t.TypeError,d=t.WeakMap,h,p,v,x=function(y){return v(y)?p(y):h(y,{})},m=function(y){return function(_){var S;if(!r(_)||(S=p(_)).type!==y)throw new u("Incompatible receiver, "+y+" required");return S}};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:m},Py}var uM;function bL(){if(uM)return Oy.exports;uM=1;var e=mt(),t=wt(),r=tr(),n=In(),i=Wn(),o=J_().CONFIGURABLE,a=gL(),s=Fa(),c=s.enforce,u=s.get,d=String,h=Object.defineProperty,p=e("".slice),v=e("".replace),x=e([].join),m=i&&!t(function(){return h(function(){},"length",{value:8}).length!==8}),b=String(String).split("String"),w=Oy.exports=function(y,_,S){p(d(_),0,7)==="Symbol("&&(_="["+v(d(_),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),S&&S.getter&&(_="get "+_),S&&S.setter&&(_="set "+_),(!n(y,"name")||o&&y.name!==_)&&(i?h(y,"name",{value:_,configurable:!0}):y.name=_),m&&S&&n(S,"arity")&&y.length!==S.arity&&h(y,"length",{value:S.arity});try{S&&n(S,"constructor")&&S.constructor?i&&h(y,"prototype",{writable:!1}):y.prototype&&(y.prototype=void 0)}catch{}var E=c(y);return n(E,"source")||(E.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 Ao(){if(dM)return ky;dM=1;var e=tr(),t=Si(),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 Fae(){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 Gd(){if(hM)return Dy;hM=1;var e=Fae();return Dy=function(t){var r=+t;return r!==r||r===0?0:e(r)},Dy}var jy,pM;function $ae(){if(pM)return jy;pM=1;var e=Gd(),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 eE(){if(vM)return qy;vM=1;var e=Gd(),t=Math.min;return qy=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},qy}var Ly,gM;function Kd(){if(gM)return Ly;gM=1;var e=eE();return Ly=function(t){return e(t.length)},Ly}var zy,mM;function Hae(){if(mM)return zy;mM=1;var e=za(),t=$ae(),r=Kd(),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=mt(),t=In(),r=za(),n=Hae().indexOf,i=Ud(),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 tE(){return yM||(yM=1,Fy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Fy}var xM;function rE(){if(xM)return My;xM=1;var e=yL(),t=tE(),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 Vae(){if(_M)return Hy;_M=1;var e=Hd(),t=mt(),r=rE(),n=xL(),i=Rn(),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,EM;function Wae(){if(EM)return Vy;EM=1;var e=In(),t=Vae(),r=pL(),n=Si();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,SM;function wL(){if(SM)return Wy;SM=1;var e=wt(),t=tr(),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 Ji(){if(OM)return Uy;OM=1;var e=Vt(),t=pL().f,r=Rl(),n=Ao(),i=G_(),o=Wae(),a=wL();return Uy=function(s,c){var u=s.target,d=s.global,h=s.stat,p,v,x,m,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),m=w&&w.value):m=v[x],p=a(d?x:u+(h?".":"#")+x,s.forced),!p&&m!==void 0){if(typeof b==typeof m)continue;o(b,m)}(s.sham||m&&m.sham)&&r(b,"sham",!0),n(v,x,b,s)}},Uy}var Gy,CM;function nE(){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 Yd(){if(IM)return Ky;IM=1;var e=nE(),t=tr(),r=Zi(),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 Do(){if(RM)return Yy;RM=1;var e=Yd(),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 Uae(){if(TM)return Zy;TM=1;var e=mt(),t=Mo(),r=Do(),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 Gae(){if(PM)return Jy;PM=1;var e=Vt(),t=wt(),r=mt(),n=Do(),i=Uae().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 m=i(n(v));return a(m,x>>>0||(d(u,m)?16:10))}:a,Jy}var kM;function Kae(){if(kM)return pk;kM=1;var e=Ji(),t=Gae();return e({global:!0,forced:parseInt!==t},{parseInt:t}),pk}Kae();var MM={},Qy,AM;function EL(){if(AM)return Qy;AM=1;var e=yL(),t=tE();return Qy=Object.keys||function(n){return e(n,t)},Qy}var ex,DM;function Yae(){if(DM)return ex;DM=1;var e=Wn(),t=mt(),r=Wr(),n=wt(),i=EL(),o=xL(),a=sL(),s=Ba(),c=$d(),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"),m="abcdefghijklmnopqrst";return p[x]=7,m.split("").forEach(function(b){v[b]=b}),u({},p)[x]!==7||i(u({},v)).join("")!==m})?function(v,x){for(var m=s(v),b=arguments.length,w=1,y=o.f,_=a.f;b>w;)for(var S=c(arguments[w++]),E=y?h(i(S),y(S)):i(S),I=E.length,N=0,T;I>N;)T=E[N++],(!e||r(_,S,T))&&(m[T]=S[T]);return m}:u,ex}var jM;function Xae(){if(jM)return MM;jM=1;var e=Ji(),t=Yae();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),MM}Xae();var qM={},tx,LM;function Zae(){if(LM)return tx;LM=1;var e=Zi(),t=mt();return tx=function(r){if(e(r)==="Function")return t(r)},tx}var rx,zM;function SL(){if(zM)return rx;zM=1;var e=Zae(),t=Cl(),r=Fd(),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 Jae(){if(BM)return nx;BM=1;var e=Zi();return nx=Array.isArray||function(r){return e(r)==="Array"},nx}var ix,FM;function Qae(){if(FM)return ix;FM=1;var e=mt(),t=wt(),r=tr(),n=Yd(),i=Hd(),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 ese(){if($M)return ox;$M=1;var e=Jae(),t=Qae(),r=pr(),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 tse(){if(HM)return ax;HM=1;var e=ese();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=SL(),t=mt(),r=$d(),n=Ba(),i=Kd(),o=tse(),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,m=c===5||v;return function(b,w,y,_){for(var S=n(b),E=r(S),I=i(E),N=e(w,y),T=0,k=_||o,L=u?k(b,I):d||x?k(b,0):void 0,B,G;I>T;T++)if((m||T in E)&&(B=E[T],G=N(B,T,S),c))if(u)L[T]=G;else if(G)switch(c){case 3:return!0;case 5:return B;case 6:return T;case 2:a(L,B)}else switch(c){case 4:return!1;case 7:a(L,B)}return v?-1:h||p?p:L}};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 rse(){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 nse(){if(UM)return qM;UM=1;var e=Ji(),t=OL().filter,r=rse(),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}nse();var GM={},cx,KM;function ise(){if(KM)return cx;KM=1;var e=nE(),t=Yd();return cx=e?{}.toString:function(){return"[object "+t(this)+"]"},cx}var YM;function ose(){if(YM)return GM;YM=1;var e=nE(),t=Ao(),r=ise();return e||t(Object.prototype,"toString",r,{unsafe:!0}),GM}ose();var ux={},XM;function ase(){if(XM)return ux;XM=1;var e=Wn(),t=vL(),r=Si(),n=Rn(),i=za(),o=EL();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 sse(){if(ZM)return dx;ZM=1;var e=Hd();return dx=e("document","documentElement"),dx}var fx,JM;function Xd(){if(JM)return fx;JM=1;var e=Rn(),t=ase(),r=tE(),n=Ud(),i=sse(),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,_},m=function(){var y=o("iframe"),_="java"+d+":",S;return y.style.display="none",i.appendChild(y),y.src=String(_),S=y.contentWindow.document,S.open(),S.write(v("document.F=Object")),S.close(),S.F},b,w=function(){try{b=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&b?x(b):m():x(b);for(var y=r.length;y--;)delete w[u][r[y]];return w()};return n[h]=!0,fx=Object.create||function(_,S){var E;return _!==null?(p[u]=e(_),E=new p,p[u]=null,E[h]=_):E=w(),S===void 0?E:t.f(E,S)},fx}var hx,QM;function lse(){if(QM)return hx;QM=1;var e=Nr(),t=Xd(),r=Si().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 Nl(){return eA||(eA=1,px={}),px}var vx,tA;function cse(){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=In(),t=tr(),r=Ba(),n=Q_(),i=cse(),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=tr(),r=pr(),n=Xd(),i=CL(),o=Ao(),a=Nr(),s=Wd(),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 Zd(){if(iA)return bx;iA=1;var e=Si().f,t=In(),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 use(){if(oA)return yx;oA=1;var e=IL().IteratorPrototype,t=Xd(),r=V_(),n=Zd(),i=Nl(),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 dse(){if(aA)return xx;aA=1;var e=mt(),t=Cl();return xx=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},xx}var wx,sA;function fse(){if(sA)return wx;sA=1;var e=pr();return wx=function(t){return e(t)||t===null},wx}var _x,lA;function hse(){if(lA)return _x;lA=1;var e=fse(),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 Ex,cA;function RL(){if(cA)return Ex;cA=1;var e=dse(),t=pr(),r=Mo(),n=hse();return Ex=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),Ex}var Sx,uA;function NL(){if(uA)return Sx;uA=1;var e=Ji(),t=Wr(),r=Wd(),n=J_(),i=tr(),o=use(),a=CL(),s=RL(),c=Zd(),u=Rl(),d=Ao(),h=Nr(),p=Nl(),v=IL(),x=n.PROPER,m=n.CONFIGURABLE,b=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,y=h("iterator"),_="keys",S="values",E="entries",I=function(){return this};return Sx=function(N,T,k,L,B,G,z){o(k,T,L);var P=function(A){if(A===B&&ne)return ne;if(!w&&A&&A in re)return re[A];switch(A){case _:return function(){return new k(this,A)};case S:return function(){return new k(this,A)};case E:return function(){return new k(this,A)}}return function(){return new k(this)}},K=T+" Iterator",U=!1,re=N.prototype,X=re[y]||re["@@iterator"]||B&&re[B],ne=!w&&X||P(B),D=T==="Array"&&re.entries||X,$,Z,ee;if(D&&($=a(D.call(new N)),$!==Object.prototype&&$.next&&(!r&&a($)!==b&&(s?s($,b):i($[y])||d($,y,I)),c($,K,!0,!0),r&&(p[K]=I))),x&&B===S&&X&&X.name!==S&&(!r&&m?u(re,"name",S):(U=!0,ne=function(){return t(X,this)})),B)if(Z={values:P(S),keys:G?ne:P(_),entries:P(E)},z)for(ee in Z)(w||U||!(ee in re))&&d(re,ee,Z[ee]);else e({target:T,proto:!0,forced:w||U},Z);return(!r||z)&&re[y]!==ne&&d(re,y,ne,{name:B}),p[T]=ne,Z},Sx}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=za(),t=lse(),r=Nl(),n=Fa(),i=Si().f,o=NL(),a=TL(),s=Wd(),c=Wn(),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,m=v.index++;if(!x||m>=x.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(m,!1);case"values":return a(x[m],!1)}return a([m,x[m]],!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=mt(),t=Gd(),r=Do(),n=Mo(),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,m;return p<0||p>=v?c?"":void 0:(x=o(h,p),x<55296||x>56319||p+1===v||(m=o(h,p+1))<56320||m>57343?c?i(h,p):x:c?a(h,p,p+2):(x-55296<<10)+(m-56320)+65536)}};return Ix={codeAt:s(!1),charAt:s(!0)},Ix}var vA;function pse(){if(vA)return hA;vA=1;var e=kL().charAt,t=Do(),r=Fa(),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}pse();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=Ao();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 vse(){if(xA)return kx;xA=1;var e=mt();return kx=e([].slice),kx}var wA;function gse(){if(wA)return Px;wA=1;var e=Zi(),t=za(),r=rE().f,n=vse(),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 mse(){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,EA;function bse(){if(EA)return Ax;EA=1;var e=wt(),t=pr(),r=Zi(),n=mse(),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 SA;function iE(){if(SA)return Tx.exports;SA=1;var e=Ji(),t=mt(),r=Ud(),n=pr(),i=In(),o=Si().f,a=rE(),s=gse(),c=bse(),u=X_(),d=ML(),h=!1,p=u("meta"),v=0,x=function(S){o(S,p,{value:{objectID:"O"+v++,weakData:{}}})},m=function(S,E){if(!n(S))return typeof S=="symbol"?S:(typeof S=="string"?"S":"P")+S;if(!i(S,p)){if(!c(S))return"F";if(!E)return"E";x(S)}return S[p].objectID},b=function(S,E){if(!i(S,p)){if(!c(S))return!0;if(!E)return!1;x(S)}return S[p].weakData},w=function(S){return d&&h&&c(S)&&!i(S,p)&&x(S),S},y=function(){_.enable=function(){},h=!0;var S=a.f,E=t([].splice),I={};I[p]=1,S(I).length&&(a.f=function(N){for(var T=S(N),k=0,L=T.length;k<L;k++)if(T[k]===p){E(T,k,1);break}return T},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},_=Tx.exports={enable:y,fastKey:m,getWeakData:b,onFreeze:w};return r[p]=!0,Tx.exports}var Dx,OA;function yse(){if(OA)return Dx;OA=1;var e=Nr(),t=Nl(),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=Yd(),t=Il(),r=Ol(),n=Nl(),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 xse(){if(IA)return qx;IA=1;var e=Wr(),t=Cl(),r=Rn(),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 wse(){if(RA)return Lx;RA=1;var e=Wr(),t=Rn(),r=Il();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=SL(),t=Wr(),r=Rn(),n=U_(),i=yse(),o=Kd(),a=Vd(),s=xse(),c=DL(),u=wse(),d=TypeError,h=function(v,x){this.stopped=v,this.result=x},p=h.prototype;return zx=function(v,x,m){var b=m&&m.that,w=!!(m&&m.AS_ENTRIES),y=!!(m&&m.IS_RECORD),_=!!(m&&m.IS_ITERATOR),S=!!(m&&m.INTERRUPTED),E=e(x,b),I,N,T,k,L,B,G,z=function(K){return I&&u(I,"normal"),new h(!0,K)},P=function(K){return w?(r(K),S?E(K[0],K[1],z):E(K[0],K[1])):S?E(K,z):E(K)};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(L=P(v[T]),L&&a(p,L))return L;return new h(!1)}I=s(v,N)}for(B=y?v.next:I.next;!(G=t(B,I)).done;){try{L=P(G.value)}catch(K){u(I,"throw",K)}if(typeof L=="object"&&L&&a(p,L))return L}return new h(!1)},zx}var Bx,TA;function qL(){if(TA)return Bx;TA=1;var e=Vd(),t=TypeError;return Bx=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},Bx}var Fx,PA;function _se(){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 Ese(){if(kA)return $x;kA=1;var e=tr(),t=pr(),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 Sse(){if(MA)return Hx;MA=1;var e=Ji(),t=Vt(),r=mt(),n=wL(),i=Ao(),o=iE(),a=jL(),s=qL(),c=tr(),u=Ol(),d=pr(),h=wt(),p=_se(),v=Zd(),x=Ese();return Hx=function(m,b,w){var y=m.indexOf("Map")!==-1,_=m.indexOf("Weak")!==-1,S=y?"set":"add",E=t[m],I=E&&E.prototype,N=E,T={},k=function(U){var re=r(I[U]);i(I,U,U==="add"?function(ne){return re(this,ne===0?0:ne),this}:U==="delete"?function(X){return _&&!d(X)?!1:re(this,X===0?0:X)}:U==="get"?function(ne){return _&&!d(ne)?void 0:re(this,ne===0?0:ne)}:U==="has"?function(ne){return _&&!d(ne)?!1:re(this,ne===0?0:ne)}:function(ne,D){return re(this,ne===0?0:ne,D),this})},L=n(m,!c(E)||!(_||I.forEach&&!h(function(){new E().entries().next()})));if(L)N=w.getConstructor(b,m,y,S),o.enable();else if(n(m,!0)){var B=new N,G=B[S](_?{}:-0,1)!==B,z=h(function(){B.has(1)}),P=p(function(U){new E(U)}),K=!_&&h(function(){for(var U=new E,re=5;re--;)U[S](re,re);return!U.has(-0)});P||(N=b(function(U,re){s(U,I);var X=x(new E,U,N);return u(re)||a(re,X[S],{that:X,AS_ENTRIES:y}),X}),N.prototype=I,I.constructor=N),(z||K)&&(k("delete"),k("has"),y&&k("get")),(K||G)&&k(S),_&&I.clear&&delete I.clear}return T[m]=N,e({global:!0,constructor:!0,forced:N!==E},T),v(N,m),_||w.setStrong(N,m,y),N},Hx}var Vx,AA;function Ose(){if(AA)return Vx;AA=1;var e=mt(),t=AL(),r=iE().getWeakData,n=qL(),i=Rn(),o=Ol(),a=pr(),s=jL(),c=OL(),u=In(),d=Fa(),h=d.set,p=d.getterFor,v=c.find,x=c.findIndex,m=e([].splice),b=0,w=function(S){return S.frozen||(S.frozen=new y)},y=function(){this.entries=[]},_=function(S,E){return v(S.entries,function(I){return I[0]===E})};return y.prototype={get:function(S){var E=_(this,S);if(E)return E[1]},has:function(S){return!!_(this,S)},set:function(S,E){var I=_(this,S);I?I[1]=E:this.entries.push([S,E])},delete:function(S){var E=x(this.entries,function(I){return I[0]===S});return~E&&m(this.entries,E,1),!!~E}},Vx={getConstructor:function(S,E,I,N){var T=S(function(G,z){n(G,k),h(G,{type:E,id:b++,frozen:null}),o(z)||s(z,G[N],{that:G,AS_ENTRIES:I})}),k=T.prototype,L=p(E),B=function(G,z,P){var K=L(G),U=r(i(z),!0);return U===!0?w(K).set(z,P):U[K.id]=P,G};return t(k,{delete:function(G){var z=L(this);if(!a(G))return!1;var P=r(G);return P===!0?w(z).delete(G):P&&u(P,z.id)&&delete P[z.id]},has:function(z){var P=L(this);if(!a(z))return!1;var K=r(z);return K===!0?w(P).has(z):K&&u(K,P.id)}}),t(k,I?{get:function(z){var P=L(this);if(a(z)){var K=r(z);if(K===!0)return w(P).get(z);if(K)return K[P.id]}},set:function(z,P){return B(this,z,P)}}:{add:function(z){return B(this,z,!0)}}),T}},Vx}var DA;function Cse(){if(DA)return mA;DA=1;var e=ML(),t=Vt(),r=mt(),n=AL(),i=iE(),o=Sse(),a=Ose(),s=pr(),c=Fa().enforce,u=wt(),d=mL(),h=Object,p=Array.isArray,v=h.isExtensible,x=h.isFrozen,m=h.isSealed,b=h.freeze,w=h.seal,y=!t.ActiveXObject&&"ActiveXObject"in t,_,S=function(G){return function(){return G(this,arguments.length?arguments[0]:void 0)}},E=o("WeakMap",S,a),I=E.prototype,N=r(I.set),T=function(){return e&&u(function(){var G=b([]);return N(new E,G,1),!x(G)})};if(d)if(y){_=a.getConstructor(S,"WeakMap",!0),i.enable();var k=r(I.delete),L=r(I.has),B=r(I.get);n(I,{delete:function(G){if(s(G)&&!v(G)){var z=c(this);return z.frozen||(z.frozen=new _),k(this,G)||z.frozen.delete(G)}return k(this,G)},has:function(z){if(s(z)&&!v(z)){var P=c(this);return P.frozen||(P.frozen=new _),L(this,z)||P.frozen.has(z)}return L(this,z)},get:function(z){if(s(z)&&!v(z)){var P=c(this);return P.frozen||(P.frozen=new _),L(this,z)?B(this,z):P.frozen.get(z)}return B(this,z)},set:function(z,P){if(s(z)&&!v(z)){var K=c(this);K.frozen||(K.frozen=new _),L(this,z)?N(this,z,P):K.frozen.set(z,P)}else N(this,z,P);return this}})}else T()&&n(I,{set:function(z,P){var K;return p(z)&&(x(z)?K=b:m(z)&&(K=w)),N(this,z,P),K&&K(z),this}});return mA}var jA;function Ise(){return jA||(jA=1,Cse()),gA}Ise();var qA={},Wx,LA;function Rse(){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 Nse(){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 Tse(){if(BA)return qA;BA=1;var e=Vt(),t=Rse(),r=Nse(),n=PL(),i=Rl(),o=Zd(),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}Tse();var Gx,FA;function Pse(){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 Pt=="object"&&Pt&&Pt.Object===Object&&Pt,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,m=function(){return d.Date.now()};function b(I,N,T){var k,L,B,G,z,P,K=0,U=!1,re=!1,X=!0;if(typeof I!="function")throw new TypeError(e);N=E(N)||0,y(T)&&(U=!!T.leading,re="maxWait"in T,B=re?v(E(T.maxWait)||0,N):B,X="trailing"in T?!!T.trailing:X);function ne(V){var J=k,Y=L;return k=L=void 0,K=V,G=I.apply(Y,J),G}function D(V){return K=V,z=setTimeout(ee,N),U?ne(V):G}function $(V){var J=V-P,Y=V-K,se=N-J;return re?x(se,B-Y):se}function Z(V){var J=V-P,Y=V-K;return P===void 0||J>=N||J<0||re&&Y>=B}function ee(){var V=m();if(Z(V))return A(V);z=setTimeout(ee,$(V))}function A(V){return z=void 0,X&&k?ne(V):(k=L=void 0,G)}function W(){z!==void 0&&clearTimeout(z),K=0,k=P=L=z=void 0}function q(){return z===void 0?G:A(m())}function j(){var V=m(),J=Z(V);if(k=arguments,L=this,P=V,J){if(z===void 0)return D(P);if(re)return z=setTimeout(ee,N),ne(P)}return z===void 0&&(z=setTimeout(ee,N)),G}return j.cancel=W,j.flush=q,j}function w(I,N,T){var k=!0,L=!0;if(typeof I!="function")throw new TypeError(e);return y(T)&&(k="leading"in T?!!T.leading:k,L="trailing"in T?!!T.trailing:L),b(I,N,{leading:k,maxWait:N,trailing:L})}function y(I){var N=typeof I;return!!I&&(N=="object"||N=="function")}function _(I){return!!I&&typeof I=="object"}function S(I){return typeof I=="symbol"||_(I)&&p.call(I)==r}function E(I){if(typeof I=="number")return I;if(S(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 kse=Pse();const $A=Yi(kse);var Kx,HA;function Mse(){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 Pt=="object"&&Pt&&Pt.Object===Object&&Pt,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,m=function(){return d.Date.now()};function b(E,I,N){var T,k,L,B,G,z,P=0,K=!1,U=!1,re=!0;if(typeof E!="function")throw new TypeError(e);I=S(I)||0,w(N)&&(K=!!N.leading,U="maxWait"in N,L=U?v(S(N.maxWait)||0,I):L,re="trailing"in N?!!N.trailing:re);function X(j){var V=T,J=k;return T=k=void 0,P=j,B=E.apply(J,V),B}function ne(j){return P=j,G=setTimeout(Z,I),K?X(j):B}function D(j){var V=j-z,J=j-P,Y=I-V;return U?x(Y,L-J):Y}function $(j){var V=j-z,J=j-P;return z===void 0||V>=I||V<0||U&&J>=L}function Z(){var j=m();if($(j))return ee(j);G=setTimeout(Z,D(j))}function ee(j){return G=void 0,re&&T?X(j):(T=k=void 0,B)}function A(){G!==void 0&&clearTimeout(G),P=0,T=z=k=G=void 0}function W(){return G===void 0?B:ee(m())}function q(){var j=m(),V=$(j);if(T=arguments,k=this,z=j,V){if(G===void 0)return ne(z);if(U)return G=setTimeout(Z,I),X(z)}return G===void 0&&(G=setTimeout(Z,I)),B}return q.cancel=A,q.flush=W,q}function w(E){var I=typeof E;return!!E&&(I=="object"||I=="function")}function y(E){return!!E&&typeof E=="object"}function _(E){return typeof E=="symbol"||y(E)&&p.call(E)==r}function S(E){if(typeof E=="number")return E;if(_(E))return t;if(w(E)){var I=typeof E.valueOf=="function"?E.valueOf():E;E=w(I)?I+"":I}if(typeof E!="string")return E===0?E:+E;E=E.replace(n,"");var N=o.test(E);return N||a.test(E)?s(E.slice(2),N?2:8):i.test(E)?t:+E}return Kx=b,Kx}var Ase=Mse();const VA=Yi(Ase);var Yx,WA;function Dse(){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 Pt=="object"&&Pt&&Pt.Object===Object&&Pt,s=typeof self=="object"&&self&&self.Object===Object&&self,c=a||s||Function("return this")();function u(le,ue){return le==null?void 0:le[ue]}function d(le){var ue=!1;if(le!=null&&typeof le.toString!="function")try{ue=!!(le+"")}catch{}return ue}var h=Array.prototype,p=Function.prototype,v=Object.prototype,x=c["__core-js_shared__"],m=(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.*?")+"$"),S=h.splice,E=V(c,"Map"),I=V(Object,"create");function N(le){var ue=-1,we=le?le.length:0;for(this.clear();++ue<we;){var Se=le[ue];this.set(Se[0],Se[1])}}function T(){this.__data__=I?I(null):{}}function k(le){return this.has(le)&&delete this.__data__[le]}function L(le){var ue=this.__data__;if(I){var we=ue[le];return we===t?void 0:we}return w.call(ue,le)?ue[le]:void 0}function B(le){var ue=this.__data__;return I?ue[le]!==void 0:w.call(ue,le)}function G(le,ue){var we=this.__data__;return we[le]=I&&ue===void 0?t:ue,this}N.prototype.clear=T,N.prototype.delete=k,N.prototype.get=L,N.prototype.has=B,N.prototype.set=G;function z(le){var ue=-1,we=le?le.length:0;for(this.clear();++ue<we;){var Se=le[ue];this.set(Se[0],Se[1])}}function P(){this.__data__=[]}function K(le){var ue=this.__data__,we=W(ue,le);if(we<0)return!1;var Se=ue.length-1;return we==Se?ue.pop():S.call(ue,we,1),!0}function U(le){var ue=this.__data__,we=W(ue,le);return we<0?void 0:ue[we][1]}function re(le){return W(this.__data__,le)>-1}function X(le,ue){var we=this.__data__,Se=W(we,le);return Se<0?we.push([le,ue]):we[Se][1]=ue,this}z.prototype.clear=P,z.prototype.delete=K,z.prototype.get=U,z.prototype.has=re,z.prototype.set=X;function ne(le){var ue=-1,we=le?le.length:0;for(this.clear();++ue<we;){var Se=le[ue];this.set(Se[0],Se[1])}}function D(){this.__data__={hash:new N,map:new(E||z),string:new N}}function $(le){return j(this,le).delete(le)}function Z(le){return j(this,le).get(le)}function ee(le){return j(this,le).has(le)}function A(le,ue){return j(this,le).set(le,ue),this}ne.prototype.clear=D,ne.prototype.delete=$,ne.prototype.get=Z,ne.prototype.has=ee,ne.prototype.set=A;function W(le,ue){for(var we=le.length;we--;)if(he(le[we][0],ue))return we;return-1}function q(le){if(!be(le)||Y(le))return!1;var ue=ce(le)||d(le)?_:o;return ue.test(se(le))}function j(le,ue){var we=le.__data__;return J(ue)?we[typeof ue=="string"?"string":"hash"]:we.map}function V(le,ue){var we=u(le,ue);return q(we)?we:void 0}function J(le){var ue=typeof le;return ue=="string"||ue=="number"||ue=="symbol"||ue=="boolean"?le!=="__proto__":le===null}function Y(le){return!!m&&m in le}function se(le){if(le!=null){try{return b.call(le)}catch{}try{return le+""}catch{}}return""}function te(le,ue){if(typeof le!="function"||ue&&typeof ue!="function")throw new TypeError(e);var we=function(){var Se=arguments,Ne=ue?ue.apply(this,Se):Se[0],De=we.cache;if(De.has(Ne))return De.get(Ne);var Le=le.apply(this,Se);return we.cache=De.set(Ne,Le),Le};return we.cache=new(te.Cache||ne),we}te.Cache=ne;function he(le,ue){return le===ue||le!==le&&ue!==ue}function ce(le){var ue=be(le)?y.call(le):"";return ue==r||ue==n}function be(le){var ue=typeof le;return!!le&&(ue=="object"||ue=="function")}return Yx=te,Yx}var jse=Dse();const qse=Yi(jse);var So=[],Lse=function(){return So.some(function(e){return e.activeTargets.length>0})},zse=function(){return So.some(function(e){return e.skippedTargets.length>0})},UA="ResizeObserver loop completed with undelivered notifications.",Bse=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)},al;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(al||(al={}));var Oo=function(e){return Object.freeze(e)},Fse=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Oo(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,Oo(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})(),oE=function(e){return e instanceof SVGElement&&"getBBox"in e},zL=function(e){if(oE(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)},$se=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},Us=typeof window<"u"?window:{},Zc=new WeakMap,KA=/auto|scroll/,Hse=/^tb|vertical/,Vse=/msie|trident/i.test(Us.navigator&&Us.navigator.userAgent),Xn=function(e){return parseFloat(e||"0")},ma=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new Fse((r?t:e)||0,(r?e:t)||0)},YA=Oo({devicePixelContentBoxSize:ma(),borderBoxSize:ma(),contentBoxSize:ma(),contentRect:new LL(0,0,0,0)}),BL=function(e,t){if(t===void 0&&(t=!1),Zc.has(e)&&!t)return Zc.get(e);if(zL(e))return Zc.set(e,YA),YA;var r=getComputedStyle(e),n=oE(e)&&e.ownerSVGElement&&e.getBBox(),i=!Vse&&r.boxSizing==="border-box",o=Hse.test(r.writingMode||""),a=!n&&KA.test(r.overflowY||""),s=!n&&KA.test(r.overflowX||""),c=n?0:Xn(r.paddingTop),u=n?0:Xn(r.paddingRight),d=n?0:Xn(r.paddingBottom),h=n?0:Xn(r.paddingLeft),p=n?0:Xn(r.borderTopWidth),v=n?0:Xn(r.borderRightWidth),x=n?0:Xn(r.borderBottomWidth),m=n?0:Xn(r.borderLeftWidth),b=h+u,w=c+d,y=m+v,_=p+x,S=s?e.offsetHeight-_-e.clientHeight:0,E=a?e.offsetWidth-y-e.clientWidth:0,I=i?b+y:0,N=i?w+_:0,T=n?n.width:Xn(r.width)-I-E,k=n?n.height:Xn(r.height)-N-S,L=T+b+E+y,B=k+w+S+_,G=Oo({devicePixelContentBoxSize:ma(Math.round(T*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:ma(L,B,o),contentBoxSize:ma(T,k,o),contentRect:new LL(h,c,T,k)});return Zc.set(e,G),G},FL=function(e,t,r){var n=BL(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case al.DEVICE_PIXEL_CONTENT_BOX:return a;case al.BORDER_BOX:return i;default:return o}},Wse=(function(){function e(t){var r=BL(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Oo([r.borderBoxSize]),this.contentBoxSize=Oo([r.contentBoxSize]),this.devicePixelContentBoxSize=Oo([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},Use=function(){var e=1/0,t=[];So.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new Wse(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){So.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))})})},Gse=function(){var e=0;for(XA(e);Lse();)e=Use(),XA(e);return zse()&&Bse(),e>0},Xx,HL=[],Kse=function(){return HL.splice(0).forEach(function(e){return e()})},Yse=function(e){if(!Xx){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Kse()}).observe(r,n),Xx=function(){r.textContent="".concat(t?t--:t++)}}HL.push(e),Xx()},Xse=function(e){Yse(function(){requestAnimationFrame(e)})},mu=0,Zse=function(){return!!mu},Jse=250,Qse={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,ele=(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=Jse),!Zx){Zx=!0;var n=JA(t);Xse(function(){var i=!1;try{i=Gse()}finally{if(Zx=!1,t=n-JA(),!Zse())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,Qse)};document.body?r():Us.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 Us.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),ZA.forEach(function(r){return Us.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Xw=new ele,QA=function(e){!mu&&e>0&&Xw.start(),mu+=e,!mu&&Xw.stop()},tle=function(e){return!oE(e)&&!$se(e)&&getComputedStyle(e).display==="inline"},rle=(function(){function e(t,r){this.target=t,this.observedBox=r||al.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=FL(this.target,this.observedBox,!0);return tle(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),nle=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Jc=new WeakMap,eD=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Qc=(function(){function e(){}return e.connect=function(t,r){var n=new nle(t,r);Jc.set(t,n)},e.observe=function(t,r,n){var i=Jc.get(t),o=i.observationTargets.length===0;eD(i.observationTargets,r)<0&&(o&&So.push(i),i.observationTargets.push(new rle(r,n&&n.box)),QA(1),Xw.schedule())},e.unobserve=function(t,r){var n=Jc.get(t),i=eD(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&So.splice(So.indexOf(n),1),n.observationTargets.splice(i,1),QA(-1))},e.disconnect=function(t){var r=this,n=Jc.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),ile=(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.");Qc.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");Qc.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");Qc.unobserve(this,t)},e.prototype.disconnect=function(){Qc.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Jx,tD;function ole(){if(tD)return Jx;tD=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return Jx=e,Jx}var ale=ole();const VL=Yi(ale);var rD={},Qx,nD;function sle(){if(nD)return Qx;nD=1;var e=Cl(),t=Ba(),r=$d(),n=Kd(),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 m=s?x-1:0,b=s?-1:1;if(d<2)for(;;){if(m in v){h=v[m],m+=b;break}if(m+=b,s?m<0:x<=m)throw new i(o)}for(;s?m>=0:x>m;m+=b)m in v&&(h=u(h,v[m],m,p));return h}};return Qx={left:a(!1),right:a(!0)},Qx}var ew,iD;function lle(){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 cle(){if(oD)return tw;oD=1;var e=Vt(),t=lL(),r=Zi(),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 ule(){if(aD)return rw;aD=1;var e=cle();return rw=e==="NODE",rw}var sD;function dle(){if(sD)return rD;sD=1;var e=Ji(),t=sle().left,r=lle(),n=W_(),i=ule(),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}dle();var lD={},nw,cD;function WL(){if(cD)return nw;cD=1;var e=Rn();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 fle(){if(uD)return iw;uD=1;var e=wt(),t=Vt(),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 hle(){if(dD)return ow;dD=1;var e=wt(),t=Vt(),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 ple(){if(fD)return aw;fD=1;var e=wt(),t=Vt(),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 aE(){if(hD)return sw;hD=1;var e=Wr(),t=mt(),r=Do(),n=WL(),i=fle(),o=Y_(),a=Xd(),s=Fa().get,c=hle(),u=ple(),d=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,v=t("".charAt),x=t("".indexOf),m=t("".replace),b=t("".slice),w=(function(){var E=/a/,I=/b*/g;return e(h,E,"a"),e(h,I,"a"),E.lastIndex!==0||I.lastIndex!==0})(),y=i.BROKEN_CARET,_=/()??/.exec("")[1]!==void 0,S=w||_||y||c||u;return S&&(p=function(I){var N=this,T=s(N),k=r(I),L=T.raw,B,G,z,P,K,U,re;if(L)return L.lastIndex=N.lastIndex,B=e(p,L,k),N.lastIndex=L.lastIndex,B;var X=T.groups,ne=y&&N.sticky,D=e(n,N),$=N.source,Z=0,ee=k;if(ne&&(D=m(D,"y",""),x(D,"g")===-1&&(D+="g"),ee=b(k,N.lastIndex),N.lastIndex>0&&(!N.multiline||N.multiline&&v(k,N.lastIndex-1)!==`
113
- `)&&($="(?: "+$+")",ee=" "+ee,Z++),G=new RegExp("^(?:"+$+")",D)),_&&(G=new RegExp("^"+$+"$(?!\\s)",D)),w&&(z=N.lastIndex),P=e(h,ne?G:N,ee),ne?P?(P.input=b(P.input,Z),P[0]=b(P[0],Z),P.index=N.lastIndex,N.lastIndex+=P[0].length):N.lastIndex=0:w&&P&&(N.lastIndex=N.global?P.index+P[0].length:z),_&&P&&P.length>1&&e(d,P[0],G,function(){for(K=1;K<arguments.length-2;K++)arguments[K]===void 0&&(P[K]=void 0)}),P&&X)for(P.groups=U=a(null),K=0;K<X.length;K++)re=X[K],U[re[0]]=P[re[1]];return P}),sw=p,sw}var pD;function UL(){if(pD)return lD;pD=1;var e=Ji(),t=aE();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=Wr(),t=Ao(),r=aE(),n=wt(),i=Nr(),o=Rl(),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 m=/./[p],b=u(p,""[c],function(w,y,_,S,E){var I=y.exec;return I===r||I===s.exec?v&&!E?{done:!0,value:e(m,y,_,S)}:{done:!0,value:e(w,_,y,S)}:{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 vle(){if(bD)return uw;bD=1;var e=Vt(),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=Wr(),t=In(),r=Vd(),n=vle(),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=Wr(),t=Rn(),r=tr(),n=Zi(),i=aE(),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 gle(){if(wD)return vD;wD=1;var e=Wr(),t=mt(),r=GL(),n=Rn(),i=pr(),o=eE(),a=Do(),s=Mo(),c=Il(),u=KL(),d=YL(),h=XL(),p=t("".indexOf);return r("match",function(v,x,m){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),_=m(x,w,y);if(_.done)return _.value;var S=a(d(w));if(p(S,"g")===-1)return h(w,y);var E=p(S,"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),E)),N++}return N===0?null:I}]}),vD}gle();var _D={},hw,ED;function mle(){if(ED)return hw;ED=1;var e=bL(),t=Si();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 SD;function ble(){if(SD)return _D;SD=1;var e=Wn(),t=J_().EXISTS,r=mt(),n=mle(),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}ble();var OD={},pw,CD;function yle(){if(CD)return pw;CD=1;var e=Fd(),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 xle(){if(ID)return vw;ID=1;var e=mt(),t=Ba(),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,m=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 S=+y;if(S===0)return w;if(S>m){var E=r(S/10);return E===0?w:E<=m?h[E-1]===void 0?n(y,1):h[E-1]+n(y,1):w}_=h[S-1]}return _===void 0?"":_})},vw}var RD;function wle(){if(RD)return OD;RD=1;var e=yle(),t=Wr(),r=mt(),n=GL(),i=wt(),o=Rn(),a=tr(),s=pr(),c=Gd(),u=eE(),d=Do(),h=Mo(),p=KL(),v=Il(),x=xle(),m=YL(),b=XL(),w=Nr(),y=w("replace"),_=Math.max,S=Math.min,E=r([].concat),I=r([].push),N=r("".indexOf),T=r("".slice),k=function(z){return z===void 0?z:String(z)},L=(function(){return"a".replace(/./,"$0")==="$0"})(),B=(function(){return/./[y]?/./[y]("a","$0")==="":!1})(),G=!i(function(){var z=/./;return z.exec=function(){var P=[];return P.groups={a:"7"},P},"".replace(z,"$<a>")!=="7"});return n("replace",function(z,P,K){var U=B?"$":"$0";return[function(X,ne){var D=h(this),$=s(X)?v(X,y):void 0;return $?t($,X,D,ne):t(P,d(D),X,ne)},function(re,X){var ne=o(this),D=d(re);if(typeof X=="string"&&N(X,U)===-1&&N(X,"$<")===-1){var $=K(P,ne,D,X);if($.done)return $.value}var Z=a(X);Z||(X=d(X));var ee=d(m(ne)),A=N(ee,"g")!==-1,W;A&&(W=N(ee,"u")!==-1,ne.lastIndex=0);for(var q=[],j;j=b(ne,D),!(j===null||(I(q,j),!A));){var V=d(j[0]);V===""&&(ne.lastIndex=p(D,u(ne.lastIndex),W))}for(var J="",Y=0,se=0;se<q.length;se++){j=q[se];for(var te=d(j[0]),he=_(S(c(j.index),D.length),0),ce=[],be,le=1;le<j.length;le++)I(ce,k(j[le]));var ue=j.groups;if(Z){var we=E([te],ce,he,D);ue!==void 0&&I(we,ue),be=d(e(X,void 0,we))}else be=x(te,D,he,ce,ue,X);he>=Y&&(J+=T(D,Y,he)+be,Y=he+te.length)}return J+T(D,Y)}]},!G||!L||B),OD}wle();function Bi(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function bu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var la=null,ND=null;VL&&window.addEventListener("resize",function(){ND!==window.devicePixelRatio&&(ND=window.devicePixelRatio,la=null)});function TD(e){if(la===null){var t=bu(e);if(typeof t>"u")return la=0,la;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),la=i}return la}var Zu=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=Bi(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=bu(i.el),s=Bi(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=qse(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=bu(n),a=Bi(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=Bi(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||ile;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=Bi(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=bu(this.el),a=Bi(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=Bi(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 m(){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(m)}}else if(d<v){var w;d+=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((w={},w[o.axis[i].offsetAttr]=d,w)),a.requestAnimationFrame(m)}};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=Bi(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})();Zu.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};Zu.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 eu(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){_le(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 _le(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ju(){return Ju=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},Ju.apply(this,arguments)}function Ele(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 Sle(e,t){if(e==null)return{};var r=Ele(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 Ole=["children","scrollableNodeProps","tag"],Cle=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},Jd=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=Sle(e,Ole),c=a,u,d=C.useRef(),h=C.useRef(),p=C.useRef(),v={},x={},m=[];return Object.keys(s).forEach(function(b){Object.prototype.hasOwnProperty.call(Zu.defaultOptions,b)?v[b]=s[b]:b.match(/data-simplebar-(.+)/)&&b!=="data-simplebar-direction"?m.push({name:b,value:s[b]}):x[b]=s[b]}),m.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
69
+ }`;var je=U1(function(){return Ue(q,Ce+"return "+ye).apply(r,z)});if(je.source=ye,$f(je))throw je;return je}function w5(s){return Ke(s).toLowerCase()}function _5(s){return Ke(s).toUpperCase()}function E5(s,c,g){if(s=Ke(s),s&&(g||c===r))return Qw(s);if(!s||!(c=rr(c)))return s;var O=Tr(s),N=Tr(c),q=e_(O,N),z=t_(O,N)+1;return Dn(O,q,z).join("")}function S5(s,c,g){if(s=Ke(s),s&&(g||c===r))return s.slice(0,n_(s)+1);if(!s||!(c=rr(c)))return s;var O=Tr(s),N=t_(O,Tr(c))+1;return Dn(O,0,N).join("")}function O5(s,c,g){if(s=Ke(s),s&&(g||c===r))return s.replace(ji,"");if(!s||!(c=rr(c)))return s;var O=Tr(s),N=e_(O,Tr(c));return Dn(O,N).join("")}function C5(s,c){var g=L,O=$;if(ft(c)){var N="separator"in c?c.separator:N;g="length"in c?De(c.length):g,O="omission"in c?rr(c.omission):O}s=Ke(s);var q=s.length;if(Fi(s)){var z=Tr(s);q=z.length}if(g>=q)return s;var X=g-$i(O);if(X<1)return O;var ie=z?Dn(z,0,X).join(""):s.slice(0,X);if(N===r)return ie+O;if(z&&(X+=ie.length-X),zf(N)){if(s.slice(X).search(N)){var ge,me=ie;for(N.global||(N=nf(N.source,Ke(vs.exec(N))+"g")),N.lastIndex=0;ge=N.exec(me);)var ye=ge.index;ie=ie.slice(0,ye===r?X:ye)}}else if(s.indexOf(rr(N),X)!=X){var _e=ie.lastIndexOf(N);_e>-1&&(ie=ie.slice(0,_e))}return ie+O}function R5(s){return s=Ke(s),s&&cs.test(s)?s.replace(ko,nB):s}var I5=Ki(function(s,c,g){return s+(g?" ":"")+c.toUpperCase()}),Wf=U_("toUpperCase");function V1(s,c,g){return s=Ke(s),c=g?r:c,c===r?JL(s)?aB(s):HL(s):s.match(c)||[]}var U1=qe(function(s,c){try{return Qt(s,r,c)}catch(g){return $f(g)?g:new Ae(g)}}),P5=dn(function(s,c){return er(c,function(g){g=Mr(g),Wr(s,g,Bf(s[g],s))}),s});function N5(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 N=-1;++N<c;){var q=s[N];if(Qt(q[0],this,O))return Qt(q[1],this,O)}})}function T5(s){return nF(gr(s,p))}function Gf(s){return function(){return s}}function A5(s,c){return s==null||s!==s?c:s}var M5=G_(),D5=G_(!0);function Ut(s){return s}function Kf(s){return E_(typeof s=="function"?s:gr(s,p))}function j5(s){return O_(gr(s,p))}function q5(s,c){return C_(s,gr(c,p))}var k5=qe(function(s,c){return function(g){return Jo(g,s,c)}}),L5=qe(function(s,c){return function(g){return Jo(s,g,c)}});function Yf(s,c,g){var O=Ct(c),N=$s(c,O);g==null&&!(ft(c)&&(N.length||!O.length))&&(g=c,c=s,s=this,N=$s(c,Ct(c)));var q=!(ft(g)&&"chain"in g)||!!g.chain,z=pn(s);return er(N,function(X){var ie=c[X];s[X]=ie,z&&(s.prototype[X]=function(){var ge=this.__chain__;if(q||ge){var me=s(this.__wrapped__),ye=me.__actions__=zt(this.__actions__);return ye.push({func:ie,args:arguments,thisArg:s}),me.__chain__=ge,me}return ie.apply(s,In([this.value()],arguments))})}),s}function B5(){return It._===this&&(It._=dB),this}function Xf(){}function F5(s){return s=De(s),qe(function(c){return R_(c,s)})}var $5=Cf(st),z5=Cf(Kw),H5=Cf(Xc);function W1(s){return Mf(s)?Zc(Mr(s)):xF(s)}function V5(s){return function(c){return s==null?r:ni(s,c)}}var U5=Y_(),W5=Y_(!0);function Zf(){return[]}function Jf(){return!1}function G5(){return{}}function K5(){return""}function Y5(){return!0}function X5(s,c){if(s=De(s),s<1||s>te)return[];var g=ae,O=At(s,ae);c=Ie(c),s-=ae;for(var N=ef(O,c);++g<s;)c(g);return N}function Z5(s){return Me(s)?st(s,Mr):nr(s)?[s]:zt(f1(Ke(s)))}function J5(s){var c=++cB;return Ke(s)+c}var Q5=Gs(function(s,c){return s+c},0),eH=Rf("ceil"),tH=Gs(function(s,c){return s/c},1),rH=Rf("floor");function nH(s){return s&&s.length?Fs(s,Ut,df):r}function iH(s,c){return s&&s.length?Fs(s,Ie(c,2),df):r}function oH(s){return Zw(s,Ut)}function aH(s,c){return Zw(s,Ie(c,2))}function sH(s){return s&&s.length?Fs(s,Ut,gf):r}function uH(s,c){return s&&s.length?Fs(s,Ie(c,2),gf):r}var lH=Gs(function(s,c){return s*c},1),cH=Rf("round"),fH=Gs(function(s,c){return s-c},0);function dH(s){return s&&s.length?Qc(s,Ut):0}function hH(s,c){return s&&s.length?Qc(s,Ie(c,2)):0}return M.after=qz,M.ary=_1,M.assign=E3,M.assignIn=q1,M.assignInWith=k1,M.assignWith=Hf,M.at=S3,M.before=E1,M.bind=Bf,M.bindAll=P5,M.bindKey=S1,M.castArray=Kz,M.chain=b1,M.chunk=n$,M.compact=i$,M.concat=o$,M.cond=N5,M.conforms=T5,M.constant=Gf,M.countBy=hz,M.create=O3,M.curry=O1,M.curryRight=C1,M.debounce=R1,M.defaults=C3,M.defaultsDeep=R3,M.defer=kz,M.delay=Lz,M.difference=a$,M.differenceBy=s$,M.differenceWith=u$,M.drop=l$,M.dropRight=c$,M.dropRightWhile=f$,M.dropWhile=d$,M.fill=h$,M.filter=vz,M.flatMap=yz,M.flatMapDeep=bz,M.flatMapDepth=xz,M.flatten=v1,M.flattenDeep=p$,M.flattenDepth=v$,M.flip=Bz,M.flow=M5,M.flowRight=D5,M.fromPairs=g$,M.functions=D3,M.functionsIn=j3,M.groupBy=wz,M.initial=y$,M.intersection=b$,M.intersectionBy=x$,M.intersectionWith=w$,M.invert=k3,M.invertBy=L3,M.invokeMap=Ez,M.iteratee=Kf,M.keyBy=Sz,M.keys=Ct,M.keysIn=Vt,M.map=eu,M.mapKeys=F3,M.mapValues=$3,M.matches=j5,M.matchesProperty=q5,M.memoize=ru,M.merge=z3,M.mergeWith=L1,M.method=k5,M.methodOf=L5,M.mixin=Yf,M.negate=nu,M.nthArg=F5,M.omit=H3,M.omitBy=V3,M.once=Fz,M.orderBy=Oz,M.over=$5,M.overArgs=$z,M.overEvery=z5,M.overSome=H5,M.partial=Ff,M.partialRight=I1,M.partition=Cz,M.pick=U3,M.pickBy=B1,M.property=W1,M.propertyOf=V5,M.pull=O$,M.pullAll=m1,M.pullAllBy=C$,M.pullAllWith=R$,M.pullAt=I$,M.range=U5,M.rangeRight=W5,M.rearg=zz,M.reject=Pz,M.remove=P$,M.rest=Hz,M.reverse=kf,M.sampleSize=Tz,M.set=G3,M.setWith=K3,M.shuffle=Az,M.slice=N$,M.sortBy=jz,M.sortedUniq=k$,M.sortedUniqBy=L$,M.split=m5,M.spread=Vz,M.tail=B$,M.take=F$,M.takeRight=$$,M.takeRightWhile=z$,M.takeWhile=H$,M.tap=iz,M.throttle=Uz,M.thru=Qs,M.toArray=M1,M.toPairs=F1,M.toPairsIn=$1,M.toPath=Z5,M.toPlainObject=j1,M.transform=Y3,M.unary=Wz,M.union=V$,M.unionBy=U$,M.unionWith=W$,M.uniq=G$,M.uniqBy=K$,M.uniqWith=Y$,M.unset=X3,M.unzip=Lf,M.unzipWith=y1,M.update=Z3,M.updateWith=J3,M.values=Zi,M.valuesIn=Q3,M.without=X$,M.words=V1,M.wrap=Gz,M.xor=Z$,M.xorBy=J$,M.xorWith=Q$,M.zip=ez,M.zipObject=tz,M.zipObjectDeep=rz,M.zipWith=nz,M.entries=F1,M.entriesIn=$1,M.extend=q1,M.extendWith=k1,Yf(M,M),M.add=Q5,M.attempt=U1,M.camelCase=n5,M.capitalize=z1,M.ceil=eH,M.clamp=e5,M.clone=Yz,M.cloneDeep=Zz,M.cloneDeepWith=Jz,M.cloneWith=Xz,M.conformsTo=Qz,M.deburr=H1,M.defaultTo=A5,M.divide=tH,M.endsWith=i5,M.eq=Dr,M.escape=o5,M.escapeRegExp=a5,M.every=pz,M.find=gz,M.findIndex=h1,M.findKey=I3,M.findLast=mz,M.findLastIndex=p1,M.findLastKey=P3,M.floor=rH,M.forEach=x1,M.forEachRight=w1,M.forIn=N3,M.forInRight=T3,M.forOwn=A3,M.forOwnRight=M3,M.get=Vf,M.gt=e3,M.gte=t3,M.has=q3,M.hasIn=Uf,M.head=g1,M.identity=Ut,M.includes=_z,M.indexOf=m$,M.inRange=t5,M.invoke=B3,M.isArguments=ai,M.isArray=Me,M.isArrayBuffer=r3,M.isArrayLike=Ht,M.isArrayLikeObject=pt,M.isBoolean=n3,M.isBuffer=jn,M.isDate=i3,M.isElement=o3,M.isEmpty=a3,M.isEqual=s3,M.isEqualWith=u3,M.isError=$f,M.isFinite=l3,M.isFunction=pn,M.isInteger=P1,M.isLength=iu,M.isMap=N1,M.isMatch=c3,M.isMatchWith=f3,M.isNaN=d3,M.isNative=h3,M.isNil=v3,M.isNull=p3,M.isNumber=T1,M.isObject=ft,M.isObjectLike=dt,M.isPlainObject=ia,M.isRegExp=zf,M.isSafeInteger=g3,M.isSet=A1,M.isString=ou,M.isSymbol=nr,M.isTypedArray=Xi,M.isUndefined=m3,M.isWeakMap=y3,M.isWeakSet=b3,M.join=_$,M.kebabCase=s5,M.last=yr,M.lastIndexOf=E$,M.lowerCase=u5,M.lowerFirst=l5,M.lt=x3,M.lte=w3,M.max=nH,M.maxBy=iH,M.mean=oH,M.meanBy=aH,M.min=sH,M.minBy=uH,M.stubArray=Zf,M.stubFalse=Jf,M.stubObject=G5,M.stubString=K5,M.stubTrue=Y5,M.multiply=lH,M.nth=S$,M.noConflict=B5,M.noop=Xf,M.now=tu,M.pad=c5,M.padEnd=f5,M.padStart=d5,M.parseInt=h5,M.random=r5,M.reduce=Rz,M.reduceRight=Iz,M.repeat=p5,M.replace=v5,M.result=W3,M.round=cH,M.runInContext=ne,M.sample=Nz,M.size=Mz,M.snakeCase=g5,M.some=Dz,M.sortedIndex=T$,M.sortedIndexBy=A$,M.sortedIndexOf=M$,M.sortedLastIndex=D$,M.sortedLastIndexBy=j$,M.sortedLastIndexOf=q$,M.startCase=y5,M.startsWith=b5,M.subtract=fH,M.sum=dH,M.sumBy=hH,M.template=x5,M.times=X5,M.toFinite=vn,M.toInteger=De,M.toLength=D1,M.toLower=w5,M.toNumber=br,M.toSafeInteger=_3,M.toString=Ke,M.toUpper=_5,M.trim=E5,M.trimEnd=S5,M.trimStart=O5,M.truncate=C5,M.unescape=R5,M.uniqueId=J5,M.upperCase=I5,M.upperFirst=Wf,M.each=x1,M.eachRight=w1,M.first=g1,Yf(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,ae),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==Y;Be.prototype[s]=function(N){var q=this.clone();return q.__iteratees__.push({iteratee:Ie(N,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(Ut)},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 Jo(g,s,c)})}),Be.prototype.reject=function(s){return this.filter(nu(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(ae)},Gr(Be.prototype,function(s,c){var g=/^(?:filter|find|map|reject)|While$/.test(c),O=/^(?:head|last)$/.test(c),N=M[O?"take"+(c=="last"?"Right":""):c],q=O||/^find/.test(c);N&&(M.prototype[c]=function(){var z=this.__wrapped__,X=O?[1]:arguments,ie=z instanceof Be,ge=X[0],me=ie||Me(z),ye=function(ke){var $e=N.apply(M,In([ke],X));return O&&_e?$e[0]:$e};me&&g&&typeof ge=="function"&&ge.length!=1&&(ie=me=!1);var _e=this.__chain__,Ce=!!this.__actions__.length,Ne=q&&!_e,je=ie&&!Ce;if(!q&&me){z=je?z:new Be(this);var Re=s.apply(z,X);return Re.__actions__.push({func:Qs,args:[ye],thisArg:r}),new vr(Re,_e)}return Ne&&je?s.apply(this,X):(Re=this.thru(ye),Ne?O?Re.value()[0]:Re.value():Re)})}),er(["pop","push","shift","sort","splice","unshift"],function(s){var c=Os[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",O=/^(?:pop|shift)$/.test(s);M.prototype[s]=function(){var N=arguments;if(O&&!this.__chain__){var q=this.value();return c.apply(Me(q)?q:[],N)}return this[g](function(z){return c.apply(Me(z)?z:[],N)})}}),Gr(Be.prototype,function(s,c){var g=M[c];if(g){var O=g.name+"";Ge.call(Ui,O)||(Ui[O]=[]),Ui[O].push({name:c,func:g})}}),Ui[Ws(r,w).name]=[{name:"wrapper",func:r}],Be.prototype.clone=IB,Be.prototype.reverse=PB,Be.prototype.value=NB,M.prototype.at=oz,M.prototype.chain=az,M.prototype.commit=sz,M.prototype.next=uz,M.prototype.plant=cz,M.prototype.reverse=fz,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=dz,M.prototype.first=M.prototype.head,Uo&&(M.prototype[Uo]=lz),M}),zi=sB();Jn?((Jn.exports=zi)._=zi,Wc._=zi):It._=zi}).call(TZ)})(Aa,Aa.exports)),Aa.exports}var hl=AZ(),jN={},fa,qN;function wt(){if(qN)return fa;qN=1;var e=function(t){return t&&t.Math===Math&&t};return fa=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ht=="object"&&ht)||e(typeof fa=="object"&&fa)||(function(){return this})()||Function("return this")(),fa}var Km={},Ym,kN;function it(){return kN||(kN=1,Ym=function(e){try{return!!e()}catch{return!0}}),Ym}var Xm,LN;function Ir(){if(LN)return Xm;LN=1;var e=it();return Xm=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Xm}var Zm,BN;function ec(){if(BN)return Zm;BN=1;var e=it();return Zm=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Zm}var Jm,FN;function Zt(){if(FN)return Jm;FN=1;var e=ec(),t=Function.prototype.call;return Jm=e?t.bind(t):function(){return t.apply(t,arguments)},Jm}var Qm={},$N;function wk(){if($N)return Qm;$N=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Qm.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,Qm}var ey,zN;function tc(){return zN||(zN=1,ey=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),ey}var ty,HN;function ot(){if(HN)return ty;HN=1;var e=ec(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return ty=e?n:function(i){return function(){return r.apply(i,arguments)}},ty}var ry,VN;function Gn(){if(VN)return ry;VN=1;var e=ot(),t=e({}.toString),r=e("".slice);return ry=function(n){return r(t(n),8,-1)},ry}var ny,UN;function rc(){if(UN)return ny;UN=1;var e=ot(),t=it(),r=Gn(),n=Object,i=e("".split);return ny=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,ny}var iy,WN;function is(){return WN||(WN=1,iy=function(e){return e==null}),iy}var oy,GN;function Ni(){if(GN)return oy;GN=1;var e=is(),t=TypeError;return oy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},oy}var ay,KN;function Do(){if(KN)return ay;KN=1;var e=rc(),t=Ni();return ay=function(r){return e(t(r))},ay}var sy,YN;function Ot(){if(YN)return sy;YN=1;var e=typeof document=="object"&&document.all;return sy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},sy}var uy,XN;function Tt(){if(XN)return uy;XN=1;var e=Ot();return uy=function(t){return typeof t=="object"?t!==null:e(t)},uy}var ly,ZN;function nc(){if(ZN)return ly;ZN=1;var e=wt(),t=Ot(),r=function(n){return t(n)?n:void 0};return ly=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},ly}var cy,JN;function ic(){if(JN)return cy;JN=1;var e=ot();return cy=e({}.isPrototypeOf),cy}var fy,QN;function _k(){if(QN)return fy;QN=1;var e=wt(),t=e.navigator,r=t&&t.userAgent;return fy=r?String(r):"",fy}var dy,eT;function vw(){if(eT)return dy;eT=1;var e=wt(),t=_k(),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]))),dy=u,dy}var hy,tT;function Ek(){if(tT)return hy;tT=1;var e=vw(),t=it(),r=wt(),n=r.String;return hy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),hy}var py,rT;function Sk(){if(rT)return py;rT=1;var e=Ek();return py=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",py}var vy,nT;function Ok(){if(nT)return vy;nT=1;var e=nc(),t=Ot(),r=ic(),n=Sk(),i=Object;return vy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},vy}var gy,iT;function gw(){if(iT)return gy;iT=1;var e=String;return gy=function(t){try{return e(t)}catch{return"Object"}},gy}var my,oT;function os(){if(oT)return my;oT=1;var e=Ot(),t=gw(),r=TypeError;return my=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},my}var yy,aT;function as(){if(aT)return yy;aT=1;var e=os(),t=is();return yy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},yy}var by,sT;function MZ(){if(sT)return by;sT=1;var e=Zt(),t=Ot(),r=Tt(),n=TypeError;return by=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")},by}var xy={exports:{}},wy,uT;function oc(){return uT||(uT=1,wy=!1),wy}var _y,lT;function mw(){if(lT)return _y;lT=1;var e=wt(),t=Object.defineProperty;return _y=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},_y}var cT;function yw(){if(cT)return xy.exports;cT=1;var e=oc(),t=wt(),r=mw(),n="__core-js_shared__",i=xy.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"}),xy.exports}var Ey,fT;function bw(){if(fT)return Ey;fT=1;var e=yw();return Ey=function(t,r){return e[t]||(e[t]=r||{})},Ey}var Sy,dT;function jo(){if(dT)return Sy;dT=1;var e=Ni(),t=Object;return Sy=function(r){return t(e(r))},Sy}var Oy,hT;function Pr(){if(hT)return Oy;hT=1;var e=ot(),t=jo(),r=e({}.hasOwnProperty);return Oy=Object.hasOwn||function(i,o){return r(t(i),o)},Oy}var Cy,pT;function xw(){if(pT)return Cy;pT=1;var e=ot(),t=0,r=Math.random(),n=e(1.1.toString);return Cy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},Cy}var Ry,vT;function $t(){if(vT)return Ry;vT=1;var e=wt(),t=bw(),r=Pr(),n=xw(),i=Ek(),o=Sk(),a=e.Symbol,u=t("wks"),l=o?a.for||a:a&&a.withoutSetter||n;return Ry=function(d){return r(u,d)||(u[d]=i&&r(a,d)?a[d]:l("Symbol."+d)),u[d]},Ry}var Iy,gT;function DZ(){if(gT)return Iy;gT=1;var e=Zt(),t=Tt(),r=Ok(),n=as(),i=MZ(),o=$t(),a=TypeError,u=o("toPrimitive");return Iy=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)},Iy}var Py,mT;function Ck(){if(mT)return Py;mT=1;var e=DZ(),t=Ok();return Py=function(r){var n=e(r,"string");return t(n)?n:n+""},Py}var Ny,yT;function ww(){if(yT)return Ny;yT=1;var e=wt(),t=Tt(),r=e.document,n=t(r)&&t(r.createElement);return Ny=function(i){return n?r.createElement(i):{}},Ny}var Ty,bT;function Rk(){if(bT)return Ty;bT=1;var e=Ir(),t=it(),r=ww();return Ty=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Ty}var xT;function Ik(){if(xT)return Km;xT=1;var e=Ir(),t=Zt(),r=wk(),n=tc(),i=Do(),o=Ck(),a=Pr(),u=Rk(),l=Object.getOwnPropertyDescriptor;return Km.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])},Km}var Ay={},My,wT;function Pk(){if(wT)return My;wT=1;var e=Ir(),t=it();return My=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),My}var Dy,_T;function Nr(){if(_T)return Dy;_T=1;var e=Tt(),t=String,r=TypeError;return Dy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Dy}var ET;function un(){if(ET)return Ay;ET=1;var e=Ir(),t=Rk(),r=Pk(),n=Nr(),i=Ck(),o=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,l="enumerable",d="configurable",f="writable";return Ay.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},Ay}var jy,ST;function ss(){if(ST)return jy;ST=1;var e=Ir(),t=un(),r=tc();return jy=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},jy}var qy={exports:{}},ky,OT;function _w(){if(OT)return ky;OT=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 ky={EXISTS:i,PROPER:o,CONFIGURABLE:a},ky}var Ly,CT;function Nk(){if(CT)return Ly;CT=1;var e=ot(),t=Ot(),r=yw(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),Ly=r.inspectSource,Ly}var By,RT;function Tk(){if(RT)return By;RT=1;var e=wt(),t=Ot(),r=e.WeakMap;return By=t(r)&&/native code/.test(String(r)),By}var Fy,IT;function Ew(){if(IT)return Fy;IT=1;var e=bw(),t=xw(),r=e("keys");return Fy=function(n){return r[n]||(r[n]=t(n))},Fy}var $y,PT;function ac(){return PT||(PT=1,$y={}),$y}var zy,NT;function qo(){if(NT)return zy;NT=1;var e=Tk(),t=wt(),r=Tt(),n=ss(),i=Pr(),o=yw(),a=Ew(),u=ac(),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 zy={set:h,get:p,has:v,enforce:m,getterFor:y},zy}var TT;function Ak(){if(TT)return qy.exports;TT=1;var e=ot(),t=it(),r=Ot(),n=Pr(),i=Ir(),o=_w().CONFIGURABLE,a=Nk(),u=qo(),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=qy.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"),qy.exports}var Hy,AT;function Ti(){if(AT)return Hy;AT=1;var e=Ot(),t=un(),r=Ak(),n=mw();return Hy=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},Hy}var Vy={},Uy,MT;function jZ(){if(MT)return Uy;MT=1;var e=Math.ceil,t=Math.floor;return Uy=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},Uy}var Wy,DT;function sc(){if(DT)return Wy;DT=1;var e=jZ();return Wy=function(t){var r=+t;return r!==r||r===0?0:e(r)},Wy}var Gy,jT;function qZ(){if(jT)return Gy;jT=1;var e=sc(),t=Math.max,r=Math.min;return Gy=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},Gy}var Ky,qT;function Sw(){if(qT)return Ky;qT=1;var e=sc(),t=Math.min;return Ky=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},Ky}var Yy,kT;function uc(){if(kT)return Yy;kT=1;var e=Sw();return Yy=function(t){return e(t.length)},Yy}var Xy,LT;function kZ(){if(LT)return Xy;LT=1;var e=Do(),t=qZ(),r=uc(),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 Xy={includes:n(!0),indexOf:n(!1)},Xy}var Zy,BT;function Mk(){if(BT)return Zy;BT=1;var e=ot(),t=Pr(),r=Do(),n=kZ().indexOf,i=ac(),o=e([].push);return Zy=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},Zy}var Jy,FT;function Ow(){return FT||(FT=1,Jy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Jy}var $T;function Cw(){if($T)return Vy;$T=1;var e=Mk(),t=Ow(),r=t.concat("length","prototype");return Vy.f=Object.getOwnPropertyNames||function(i){return e(i,r)},Vy}var Qy={},zT;function Dk(){return zT||(zT=1,Qy.f=Object.getOwnPropertySymbols),Qy}var e0,HT;function LZ(){if(HT)return e0;HT=1;var e=nc(),t=ot(),r=Cw(),n=Dk(),i=Nr(),o=t([].concat);return e0=e("Reflect","ownKeys")||function(u){var l=r.f(i(u)),d=n.f;return d?o(l,d(u)):l},e0}var t0,VT;function BZ(){if(VT)return t0;VT=1;var e=Pr(),t=LZ(),r=Ik(),n=un();return t0=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))}},t0}var r0,UT;function jk(){if(UT)return r0;UT=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 r0=n,r0}var n0,WT;function Kn(){if(WT)return n0;WT=1;var e=wt(),t=Ik().f,r=ss(),n=Ti(),i=mw(),o=BZ(),a=jk();return n0=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)}},n0}var i0,GT;function Rw(){if(GT)return i0;GT=1;var e=$t(),t=e("toStringTag"),r={};return r[t]="z",i0=String(r)==="[object z]",i0}var o0,KT;function lc(){if(KT)return o0;KT=1;var e=Rw(),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 o0=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},o0}var a0,YT;function Ai(){if(YT)return a0;YT=1;var e=lc(),t=String;return a0=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},a0}var s0,XT;function qk(){return XT||(XT=1,s0=`
70
+ \v\f\r                 \u2028\u2029\uFEFF`),s0}var u0,ZT;function FZ(){if(ZT)return u0;ZT=1;var e=ot(),t=Ni(),r=Ai(),n=qk(),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 u0={start:u(1),end:u(2),trim:u(3)},u0}var l0,JT;function $Z(){if(JT)return l0;JT=1;var e=wt(),t=it(),r=ot(),n=Ai(),i=FZ().trim,o=qk(),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 l0=h?function(v,m){var y=i(n(v));return a(y,m>>>0||(f(d,y)?16:10))}:a,l0}var QT;function zZ(){if(QT)return jN;QT=1;var e=Kn(),t=$Z();return e({global:!0,forced:parseInt!==t},{parseInt:t}),jN}zZ();var eA={},c0,tA;function kk(){if(tA)return c0;tA=1;var e=Mk(),t=Ow();return c0=Object.keys||function(n){return e(n,t)},c0}var f0,rA;function HZ(){if(rA)return f0;rA=1;var e=Ir(),t=ot(),r=Zt(),n=it(),i=kk(),o=Dk(),a=wk(),u=jo(),l=rc(),d=Object.assign,f=Object.defineProperty,h=t([].concat);return f0=!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,P;R>I;)P=S[I++],(!e||r(E,_,P))&&(y[P]=_[P]);return y}:d,f0}var nA;function VZ(){if(nA)return eA;nA=1;var e=Kn(),t=HZ();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),eA}VZ();var iA={},d0,oA;function UZ(){if(oA)return d0;oA=1;var e=Gn(),t=ot();return d0=function(r){if(e(r)==="Function")return t(r)},d0}var h0,aA;function Lk(){if(aA)return h0;aA=1;var e=UZ(),t=os(),r=ec(),n=e(e.bind);return h0=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},h0}var p0,sA;function WZ(){if(sA)return p0;sA=1;var e=Gn();return p0=Array.isArray||function(r){return e(r)==="Array"},p0}var v0,uA;function GZ(){if(uA)return v0;uA=1;var e=ot(),t=it(),r=Ot(),n=lc(),i=nc(),o=Nk(),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,v0=!u||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,v0}var g0,lA;function KZ(){if(lA)return g0;lA=1;var e=WZ(),t=GZ(),r=Tt(),n=$t(),i=n("species"),o=Array;return g0=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},g0}var m0,cA;function YZ(){if(cA)return m0;cA=1;var e=KZ();return m0=function(t,r){return new(e(t))(r===0?0:r)},m0}var y0,fA;function XZ(){if(fA)return y0;fA=1;var e=Ir(),t=un(),r=tc();return y0=function(n,i,o){e?t.f(n,i,r(0,o)):n[i]=o},y0}var b0,dA;function Bk(){if(dA)return b0;dA=1;var e=Lk(),t=rc(),r=jo(),n=uc(),i=YZ(),o=XZ(),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,P=l?i(y,_):d||v?i(y,0):void 0,A,k;_>R;R++)if((m||R in E)&&(A=E[R],k=S(A,R,w),u))if(l)o(P,R,k);else if(k)switch(u){case 3:return!0;case 5:return A;case 6:return R;case 2:o(P,I++,A)}else switch(u){case 4:return!1;case 7:o(P,I++,A)}return p?-1:f||h?h:P}};return b0={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},b0}var x0,hA;function ZZ(){if(hA)return x0;hA=1;var e=it(),t=$t(),r=vw(),n=t("species");return x0=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},x0}var pA;function JZ(){if(pA)return iA;pA=1;var e=Kn(),t=Bk().filter,r=ZZ(),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)}}),iA}JZ();var vA={},w0,gA;function QZ(){if(gA)return w0;gA=1;var e=Rw(),t=lc();return w0=e?{}.toString:function(){return"[object "+t(this)+"]"},w0}var mA;function eJ(){if(mA)return vA;mA=1;var e=Rw(),t=Ti(),r=QZ();return e||t(Object.prototype,"toString",r,{unsafe:!0}),vA}eJ();var _0={},yA;function tJ(){if(yA)return _0;yA=1;var e=Ir(),t=Pk(),r=un(),n=Nr(),i=Do(),o=kk();return _0.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},_0}var E0,bA;function rJ(){if(bA)return E0;bA=1;var e=nc();return E0=e("document","documentElement"),E0}var S0,xA;function cc(){if(xA)return S0;xA=1;var e=Nr(),t=tJ(),r=Ow(),n=ac(),i=rJ(),o=ww(),a=Ew(),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,S0=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,_)},S0}var O0,wA;function nJ(){if(wA)return O0;wA=1;var e=$t(),t=cc(),r=un().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),O0=function(o){i[n][o]=!0},O0}var C0,_A;function us(){return _A||(_A=1,C0={}),C0}var R0,EA;function iJ(){if(EA)return R0;EA=1;var e=it();return R0=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),R0}var I0,SA;function Fk(){if(SA)return I0;SA=1;var e=Pr(),t=Ot(),r=jo(),n=Ew(),i=iJ(),o=n("IE_PROTO"),a=Object,u=a.prototype;return I0=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},I0}var P0,OA;function $k(){if(OA)return P0;OA=1;var e=it(),t=Ot(),r=Tt(),n=cc(),i=Fk(),o=Ti(),a=$t(),u=oc(),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}),P0={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d},P0}var N0,CA;function fc(){if(CA)return N0;CA=1;var e=un().f,t=Pr(),r=$t(),n=r("toStringTag");return N0=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},N0}var T0,RA;function oJ(){if(RA)return T0;RA=1;var e=$k().IteratorPrototype,t=cc(),r=tc(),n=fc(),i=us(),o=function(){return this};return T0=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},T0}var A0,IA;function aJ(){if(IA)return A0;IA=1;var e=ot(),t=os();return A0=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},A0}var M0,PA;function sJ(){if(PA)return M0;PA=1;var e=Tt();return M0=function(t){return e(t)||t===null},M0}var D0,NA;function uJ(){if(NA)return D0;NA=1;var e=sJ(),t=String,r=TypeError;return D0=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},D0}var j0,TA;function zk(){if(TA)return j0;TA=1;var e=aJ(),t=Tt(),r=Ni(),n=uJ();return j0=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),j0}var q0,AA;function Hk(){if(AA)return q0;AA=1;var e=Kn(),t=Zt(),r=oc(),n=_w(),i=Ot(),o=oJ(),a=Fk(),u=zk(),l=fc(),d=ss(),f=Ti(),h=$t(),p=us(),v=$k(),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 q0=function(I,P,A,k,L,$,j){o(A,P,k);var D=function(F){if(F===L&&te)return te;if(!b&&F&&F in Y)return Y[F];switch(F){case E:return function(){return new A(this,F)};case _:return function(){return new A(this,F)};case S:return function(){return new A(this,F)}}return function(){return new A(this)}},G=P+" Iterator",B=!1,Y=I.prototype,Z=Y[w]||Y["@@iterator"]||L&&Y[L],te=!b&&Z||D(L),U=P==="Array"&&Y.entries||Z,re,ae,le;if(U&&(re=a(U.call(new I)),re!==Object.prototype&&re.next&&(!r&&a(re)!==x&&(u?u(re,x):i(re[w])||f(re,w,R)),l(re,G,!0,!0),r&&(p[G]=R))),m&&L===_&&Z&&Z.name!==_&&(!r&&y?d(Y,"name",_):(B=!0,te=function(){return t(Z,this)})),L)if(ae={values:D(_),keys:$?te:D(E),entries:D(S)},j)for(le in ae)(b||B||!(le in Y))&&f(Y,le,ae[le]);else e({target:P,proto:!0,forced:b||B},ae);return(!r||j)&&Y[w]!==te&&f(Y,w,te,{name:L}),p[P]=te,ae},q0}var k0,MA;function Vk(){return MA||(MA=1,k0=function(e,t){return{value:e,done:t}}),k0}var L0,DA;function Uk(){if(DA)return L0;DA=1;var e=Do(),t=nJ(),r=us(),n=qo(),i=un().f,o=Hk(),a=Vk(),u=oc(),l=Ir(),d="Array Iterator",f=n.set,h=n.getterFor(d);L0=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 L0}Uk();var jA={},B0,qA;function Wk(){if(qA)return B0;qA=1;var e=ot(),t=sc(),r=Ai(),n=Ni(),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 B0={codeAt:u(!1),charAt:u(!0)},B0}var kA;function lJ(){if(kA)return jA;kA=1;var e=Wk().charAt,t=Ai(),r=qo(),n=Hk(),i=Vk(),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))}),jA}lJ();var LA={},BA={},F0,FA;function Gk(){if(FA)return F0;FA=1;var e=it();return F0=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),F0}var $0,$A;function Kk(){if($A)return $0;$A=1;var e=Ti();return $0=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},$0}var z0={exports:{}},H0={},V0,zA;function cJ(){if(zA)return V0;zA=1;var e=ot();return V0=e([].slice),V0}var HA;function fJ(){if(HA)return H0;HA=1;var e=Gn(),t=Do(),r=Cw().f,n=cJ(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return H0.f=function(u){return i&&e(u)==="Window"?o(u):r(t(u))},H0}var U0,VA;function dJ(){if(VA)return U0;VA=1;var e=it();return U0=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),U0}var W0,UA;function hJ(){if(UA)return W0;UA=1;var e=it(),t=Tt(),r=Gn(),n=dJ(),i=Object.isExtensible,o=e(function(){});return W0=o||n?function(u){return!t(u)||n&&r(u)==="ArrayBuffer"?!1:i?i(u):!0}:i,W0}var WA;function Iw(){if(WA)return z0.exports;WA=1;var e=Kn(),t=ot(),r=ac(),n=Tt(),i=Pr(),o=un().f,a=Cw(),u=fJ(),l=hJ(),d=xw(),f=Gk(),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 P=_(I),A=0,k=P.length;A<k;A++)if(P[A]===p){S(P,A,1);break}return P},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},E=z0.exports={enable:w,fastKey:y,getWeakData:x,onFreeze:b};return r[p]=!0,z0.exports}var G0,GA;function pJ(){if(GA)return G0;GA=1;var e=$t(),t=us(),r=e("iterator"),n=Array.prototype;return G0=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},G0}var K0,KA;function Yk(){if(KA)return K0;KA=1;var e=lc(),t=as(),r=is(),n=us(),i=$t(),o=i("iterator");return K0=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},K0}var Y0,YA;function vJ(){if(YA)return Y0;YA=1;var e=Zt(),t=os(),r=Nr(),n=gw(),i=Yk(),o=TypeError;return Y0=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")},Y0}var X0,XA;function gJ(){if(XA)return X0;XA=1;var e=Zt(),t=Nr(),r=as();return X0=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},X0}var Z0,ZA;function Xk(){if(ZA)return Z0;ZA=1;var e=Lk(),t=Zt(),r=Nr(),n=gw(),i=pJ(),o=uc(),a=ic(),u=vJ(),l=Yk(),d=gJ(),f=TypeError,h=function(v,m){this.stopped=v,this.result=m},p=h.prototype;return Z0=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,P,A,k,L,$,j=function(B){var Y=R;return R=void 0,Y&&d(Y,"normal"),new h(!0,B)},D=function(B){return b?(r(B),_?S(B[0],B[1],j):S(B[0],B[1])):_?S(B,j):S(B)};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(P=0,A=o(v);A>P;P++)if(k=D(v[P]),k&&a(p,k))return k;return new h(!1)}R=u(v,I)}for(L=w?v.next:R.next;!($=t(L,R)).done;){var G=$.value;try{k=D(G)}catch(B){if(R)d(R,"throw",B);else throw B}if(typeof k=="object"&&k&&a(p,k))return k}return new h(!1)},Z0}var J0,JA;function Zk(){if(JA)return J0;JA=1;var e=ic(),t=TypeError;return J0=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},J0}var Q0,QA;function mJ(){if(QA)return Q0;QA=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 Q0=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},Q0}var eb,eM;function yJ(){if(eM)return eb;eM=1;var e=Ot(),t=Tt(),r=zk();return eb=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},eb}var tb,tM;function bJ(){if(tM)return tb;tM=1;var e=Kn(),t=wt(),r=ot(),n=jk(),i=Ti(),o=Iw(),a=Xk(),u=Zk(),l=Ot(),d=is(),f=Tt(),h=it(),p=mJ(),v=fc(),m=yJ();return tb=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,P={},A=function(B){var Y=r(R[B]);i(R,B,B==="add"?function(te){return Y(this,te===0?0:te),this}:B==="delete"?function(Z){return E&&!f(Z)?!1:Y(this,Z===0?0:Z)}:B==="get"?function(te){return E&&!f(te)?void 0:Y(this,te===0?0:te)}:B==="has"?function(te){return E&&!f(te)?!1:Y(this,te===0?0:te)}:function(te,U){return Y(this,te===0?0:te,U),this})},k=n(y,!l(S)||!(E||R.forEach&&!h(function(){new S().entries().next()})));if(k)I=b.getConstructor(x,y,w,_),o.enable();else if(n(y,!0)){var L=new I,$=L[_](E?{}:-0,1)!==L,j=h(function(){L.has(1)}),D=p(function(B){new S(B)}),G=!E&&h(function(){for(var B=new S,Y=5;Y--;)B[_](Y,Y);return!B.has(-0)});D||(I=x(function(B,Y){u(B,R);var Z=m(new S,B,I);return d(Y)||a(Y,Z[_],{that:Z,AS_ENTRIES:w}),Z}),I.prototype=R,R.constructor=I),(j||G)&&(A("delete"),A("has"),w&&A("get")),(G||$)&&A(_),E&&R.clear&&delete R.clear}return P[y]=I,e({global:!0,constructor:!0,forced:I!==S},P),v(I,y),E||b.setStrong(I,y,w),I},tb}var rb,rM;function xJ(){if(rM)return rb;rM=1;var e=ot(),t=Kk(),r=Iw().getWeakData,n=Zk(),i=Nr(),o=is(),a=Tt(),u=Xk(),l=Bk(),d=Pr(),f=qo(),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}},rb={getConstructor:function(_,S,R,I){var P=_(function($,j){n($,A),h($,{type:S,id:x++,frozen:null}),o(j)||u(j,$[I],{that:$,AS_ENTRIES:R})}),A=P.prototype,k=p(S),L=function($,j,D){var G=k($),B=r(i(j),!0);return B===!0?b(G).set(j,D):B[G.id]=D,$};return t(A,{delete:function($){var j=k(this);if(!a($))return!1;var D=r($);return D===!0?b(j).delete($):D&&d(D,j.id)&&delete D[j.id]},has:function(j){var D=k(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=k(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 L(this,j,D)}}:{add:function(j){return L(this,j,!0)}}),P}},rb}var nM;function wJ(){if(nM)return BA;nM=1;var e=Gk(),t=wt(),r=ot(),n=Kk(),i=Iw(),o=bJ(),a=xJ(),u=Tt(),l=qo().enforce,d=it(),f=Tk(),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($){return function(){return $(this,arguments.length?arguments[0]:void 0)}},S=o("WeakMap",_,a),R=S.prototype,I=r(R.set),P=function(){return e&&d(function(){var $=x([]);return I(new S,$,1),!m($)})};if(f)if(w){E=a.getConstructor(_,"WeakMap",!0),i.enable();var A=r(R.delete),k=r(R.has),L=r(R.get);n(R,{delete:function($){if(u($)&&!v($)){var j=l(this);return j.frozen||(j.frozen=new E),A(this,$)||j.frozen.delete($)}return A(this,$)},has:function(j){if(u(j)&&!v(j)){var D=l(this);return D.frozen||(D.frozen=new E),k(this,j)||D.frozen.has(j)}return k(this,j)},get:function(j){if(u(j)&&!v(j)){var D=l(this);return D.frozen||(D.frozen=new E),k(this,j)?L(this,j):D.frozen.get(j)}return L(this,j)},set:function(j,D){if(u(j)&&!v(j)){var G=l(this);G.frozen||(G.frozen=new E),k(this,j)?I(this,j,D):G.frozen.set(j,D)}else I(this,j,D);return this}})}else P()&&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 BA}var iM;function _J(){return iM||(iM=1,wJ()),LA}_J();var oM={},nb,aM;function EJ(){return aM||(aM=1,nb={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}),nb}var ib,sM;function SJ(){if(sM)return ib;sM=1;var e=ww(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return ib=r===Object.prototype?void 0:r,ib}var uM;function OJ(){if(uM)return oM;uM=1;var e=wt(),t=EJ(),r=SJ(),n=Uk(),i=ss(),o=fc(),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"),oM}OJ();var ob,lM;function CJ(){if(lM)return ob;lM=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,P){var A,k,L,$,j,D,G=0,B=!1,Y=!1,Z=!0;if(typeof R!="function")throw new TypeError(e);I=S(I)||0,w(P)&&(B=!!P.leading,Y="maxWait"in P,L=Y?v(S(P.maxWait)||0,I):L,Z="trailing"in P?!!P.trailing:Z);function te(K){var se=A,oe=k;return A=k=void 0,G=K,$=R.apply(oe,se),$}function U(K){return G=K,j=setTimeout(le,I),B?te(K):$}function re(K){var se=K-D,oe=K-G,fe=I-se;return Y?m(fe,L-oe):fe}function ae(K){var se=K-D,oe=K-G;return D===void 0||se>=I||se<0||Y&&oe>=L}function le(){var K=y();if(ae(K))return F(K);j=setTimeout(le,re(K))}function F(K){return j=void 0,Z&&A?te(K):(A=k=void 0,$)}function W(){j!==void 0&&clearTimeout(j),G=0,A=D=k=j=void 0}function J(){return j===void 0?$:F(y())}function H(){var K=y(),se=ae(K);if(A=arguments,k=this,D=K,se){if(j===void 0)return U(D);if(Y)return j=setTimeout(le,I),te(D)}return j===void 0&&(j=setTimeout(le,I)),$}return H.cancel=W,H.flush=J,H}function b(R,I,P){var A=!0,k=!0;if(typeof R!="function")throw new TypeError(e);return w(P)&&(A="leading"in P?!!P.leading:A,k="trailing"in P?!!P.trailing:k),x(R,I,{leading:A,maxWait:I,trailing:k})}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 P=o.test(R);return P||a.test(R)?u(R.slice(2),P?2:8):i.test(R)?t:+R}return ob=b,ob}var RJ=CJ();const cM=Vn(RJ);var ab,fM;function IJ(){if(fM)return ab;fM=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 P,A,k,L,$,j,D=0,G=!1,B=!1,Y=!0;if(typeof S!="function")throw new TypeError(e);R=_(R)||0,b(I)&&(G=!!I.leading,B="maxWait"in I,k=B?v(_(I.maxWait)||0,R):k,Y="trailing"in I?!!I.trailing:Y);function Z(H){var K=P,se=A;return P=A=void 0,D=H,L=S.apply(se,K),L}function te(H){return D=H,$=setTimeout(ae,R),G?Z(H):L}function U(H){var K=H-j,se=H-D,oe=R-K;return B?m(oe,k-se):oe}function re(H){var K=H-j,se=H-D;return j===void 0||K>=R||K<0||B&&se>=k}function ae(){var H=y();if(re(H))return le(H);$=setTimeout(ae,U(H))}function le(H){return $=void 0,Y&&P?Z(H):(P=A=void 0,L)}function F(){$!==void 0&&clearTimeout($),D=0,P=j=A=$=void 0}function W(){return $===void 0?L:le(y())}function J(){var H=y(),K=re(H);if(P=arguments,A=this,j=H,K){if($===void 0)return te(j);if(B)return $=setTimeout(ae,R),Z(j)}return $===void 0&&($=setTimeout(ae,R)),L}return J.cancel=F,J.flush=W,J}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 ab=x,ab}var PJ=IJ();const dM=Vn(PJ);var sb,hM;function NJ(){if(hM)return sb;hM=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(de,ue){return de==null?void 0:de[ue]}function f(de){var ue=!1;if(de!=null&&typeof de.toString!="function")try{ue=!!(de+"")}catch{}return ue}var h=Array.prototype,p=Function.prototype,v=Object.prototype,m=l["__core-js_shared__"],y=(function(){var de=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return de?"Symbol(src)_1."+de:""})(),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=K(l,"Map"),R=K(Object,"create");function I(de){var ue=-1,Ee=de?de.length:0;for(this.clear();++ue<Ee;){var Pe=de[ue];this.set(Pe[0],Pe[1])}}function P(){this.__data__=R?R(null):{}}function A(de){return this.has(de)&&delete this.__data__[de]}function k(de){var ue=this.__data__;if(R){var Ee=ue[de];return Ee===t?void 0:Ee}return b.call(ue,de)?ue[de]:void 0}function L(de){var ue=this.__data__;return R?ue[de]!==void 0:b.call(ue,de)}function $(de,ue){var Ee=this.__data__;return Ee[de]=R&&ue===void 0?t:ue,this}I.prototype.clear=P,I.prototype.delete=A,I.prototype.get=k,I.prototype.has=L,I.prototype.set=$;function j(de){var ue=-1,Ee=de?de.length:0;for(this.clear();++ue<Ee;){var Pe=de[ue];this.set(Pe[0],Pe[1])}}function D(){this.__data__=[]}function G(de){var ue=this.__data__,Ee=W(ue,de);if(Ee<0)return!1;var Pe=ue.length-1;return Ee==Pe?ue.pop():_.call(ue,Ee,1),!0}function B(de){var ue=this.__data__,Ee=W(ue,de);return Ee<0?void 0:ue[Ee][1]}function Y(de){return W(this.__data__,de)>-1}function Z(de,ue){var Ee=this.__data__,Pe=W(Ee,de);return Pe<0?Ee.push([de,ue]):Ee[Pe][1]=ue,this}j.prototype.clear=D,j.prototype.delete=G,j.prototype.get=B,j.prototype.has=Y,j.prototype.set=Z;function te(de){var ue=-1,Ee=de?de.length:0;for(this.clear();++ue<Ee;){var Pe=de[ue];this.set(Pe[0],Pe[1])}}function U(){this.__data__={hash:new I,map:new(S||j),string:new I}}function re(de){return H(this,de).delete(de)}function ae(de){return H(this,de).get(de)}function le(de){return H(this,de).has(de)}function F(de,ue){return H(this,de).set(de,ue),this}te.prototype.clear=U,te.prototype.delete=re,te.prototype.get=ae,te.prototype.has=le,te.prototype.set=F;function W(de,ue){for(var Ee=de.length;Ee--;)if(ee(de[Ee][0],ue))return Ee;return-1}function J(de){if(!be(de)||oe(de))return!1;var ue=we(de)||f(de)?E:o;return ue.test(fe(de))}function H(de,ue){var Ee=de.__data__;return se(ue)?Ee[typeof ue=="string"?"string":"hash"]:Ee.map}function K(de,ue){var Ee=d(de,ue);return J(Ee)?Ee:void 0}function se(de){var ue=typeof de;return ue=="string"||ue=="number"||ue=="symbol"||ue=="boolean"?de!=="__proto__":de===null}function oe(de){return!!y&&y in de}function fe(de){if(de!=null){try{return x.call(de)}catch{}try{return de+""}catch{}}return""}function V(de,ue){if(typeof de!="function"||ue&&typeof ue!="function")throw new TypeError(e);var Ee=function(){var Pe=arguments,Ze=ue?ue.apply(this,Pe):Pe[0],ze=Ee.cache;if(ze.has(Ze))return ze.get(Ze);var Fe=de.apply(this,Pe);return Ee.cache=ze.set(Ze,Fe),Fe};return Ee.cache=new(V.Cache||te),Ee}V.Cache=te;function ee(de,ue){return de===ue||de!==de&&ue!==ue}function we(de){var ue=be(de)?w.call(de):"";return ue==r||ue==n}function be(de){var ue=typeof de;return!!de&&(ue=="object"||ue=="function")}return sb=V,sb}var TJ=NJ();const AJ=Vn(TJ);var mi=[],MJ=function(){return mi.some(function(e){return e.activeTargets.length>0})},DJ=function(){return mi.some(function(e){return e.skippedTargets.length>0})},pM="ResizeObserver loop completed with undelivered notifications.",jJ=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:pM}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=pM),window.dispatchEvent(e)},Ga;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ga||(Ga={}));var yi=function(e){return Object.freeze(e)},qJ=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,yi(this)}return e})(),Jk=(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,yi(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})(),Pw=function(e){return e instanceof SVGElement&&"getBBox"in e},Qk=function(e){if(Pw(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)},vM=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)},kJ=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},ka=typeof window<"u"?window:{},Cu=new WeakMap,gM=/auto|scroll/,LJ=/^tb|vertical/,BJ=/msie|trident/i.test(ka.navigator&&ka.navigator.userAgent),Xr=function(e){return parseFloat(e||"0")},mo=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new qJ((r?t:e)||0,(r?e:t)||0)},mM=yi({devicePixelContentBoxSize:mo(),borderBoxSize:mo(),contentBoxSize:mo(),contentRect:new Jk(0,0,0,0)}),eL=function(e,t){if(t===void 0&&(t=!1),Cu.has(e)&&!t)return Cu.get(e);if(Qk(e))return Cu.set(e,mM),mM;var r=getComputedStyle(e),n=Pw(e)&&e.ownerSVGElement&&e.getBBox(),i=!BJ&&r.boxSizing==="border-box",o=LJ.test(r.writingMode||""),a=!n&&gM.test(r.overflowY||""),u=!n&&gM.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,P=n?n.width:Xr(r.width)-R-S,A=n?n.height:Xr(r.height)-I-_,k=P+x+S+w,L=A+b+_+E,$=yi({devicePixelContentBoxSize:mo(Math.round(P*devicePixelRatio),Math.round(A*devicePixelRatio),o),borderBoxSize:mo(k,L,o),contentBoxSize:mo(P,A,o),contentRect:new Jk(h,l,P,A)});return Cu.set(e,$),$},tL=function(e,t,r){var n=eL(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case Ga.DEVICE_PIXEL_CONTENT_BOX:return a;case Ga.BORDER_BOX:return i;default:return o}},FJ=(function(){function e(t){var r=eL(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=yi([r.borderBoxSize]),this.contentBoxSize=yi([r.contentBoxSize]),this.devicePixelContentBoxSize=yi([r.devicePixelContentBoxSize])}return e})(),rL=function(e){if(Qk(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},$J=function(){var e=1/0,t=[];mi.forEach(function(a){if(a.activeTargets.length!==0){var u=[];a.activeTargets.forEach(function(d){var f=new FJ(d.target),h=rL(d.target);u.push(f),d.lastReportedSize=tL(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},yM=function(e){mi.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(rL(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},zJ=function(){var e=0;for(yM(e);MJ();)e=$J(),yM(e);return DJ()&&jJ(),e>0},ub,nL=[],HJ=function(){return nL.splice(0).forEach(function(e){return e()})},VJ=function(e){if(!ub){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return HJ()}).observe(r,n),ub=function(){r.textContent="".concat(t?t--:t++)}}nL.push(e),ub()},UJ=function(e){VJ(function(){requestAnimationFrame(e)})},Bu=0,WJ=function(){return!!Bu},GJ=250,KJ={attributes:!0,characterData:!0,childList:!0,subtree:!0},bM=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],xM=function(e){return e===void 0&&(e=0),Date.now()+e},lb=!1,YJ=(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=GJ),!lb){lb=!0;var n=xM(t);UJ(function(){var i=!1;try{i=zJ()}finally{if(lb=!1,t=n-xM(),!WJ())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,KJ)};document.body?r():ka.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),bM.forEach(function(r){return ka.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),bM.forEach(function(r){return ka.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),rx=new YJ,wM=function(e){!Bu&&e>0&&rx.start(),Bu+=e,!Bu&&rx.stop()},XJ=function(e){return!Pw(e)&&!kJ(e)&&getComputedStyle(e).display==="inline"},ZJ=(function(){function e(t,r){this.target=t,this.observedBox=r||Ga.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=tL(this.target,this.observedBox,!0);return XJ(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),JJ=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Ru=new WeakMap,_M=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 JJ(t,r);Ru.set(t,n)},e.observe=function(t,r,n){var i=Ru.get(t),o=i.observationTargets.length===0;_M(i.observationTargets,r)<0&&(o&&mi.push(i),i.observationTargets.push(new ZJ(r,n&&n.box)),wM(1),rx.schedule())},e.unobserve=function(t,r){var n=Ru.get(t),i=_M(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&mi.splice(mi.indexOf(n),1),n.observationTargets.splice(i,1),wM(-1))},e.disconnect=function(t){var r=this,n=Ru.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),QJ=(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(!vM(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(!vM(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})(),cb,EM;function eQ(){if(EM)return cb;EM=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return cb=e,cb}var tQ=eQ();const iL=Vn(tQ);var SM={},fb,OM;function rQ(){if(OM)return fb;OM=1;var e=os(),t=jo(),r=rc(),n=uc(),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 fb={left:a(!1),right:a(!0)},fb}var db,CM;function nQ(){if(CM)return db;CM=1;var e=it();return db=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},db}var hb,RM;function iQ(){if(RM)return hb;RM=1;var e=wt(),t=_k(),r=Gn(),n=function(i){return t.slice(0,i.length)===i};return hb=(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"})(),hb}var pb,IM;function oQ(){if(IM)return pb;IM=1;var e=iQ();return pb=e==="NODE",pb}var PM;function aQ(){if(PM)return SM;PM=1;var e=Kn(),t=rQ().left,r=nQ(),n=vw(),i=oQ(),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)}}),SM}aQ();var NM={},vb,TM;function oL(){if(TM)return vb;TM=1;var e=Nr();return vb=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},vb}var gb,AM;function sQ(){if(AM)return gb;AM=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 gb={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},gb}var mb,MM;function uQ(){if(MM)return mb;MM=1;var e=it(),t=wt(),r=t.RegExp;return mb=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
71
+ `)&&n.flags==="s")}),mb}var yb,DM;function lQ(){if(DM)return yb;DM=1;var e=it(),t=wt(),r=t.RegExp;return yb=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),yb}var bb,jM;function Nw(){if(jM)return bb;jM=1;var e=Zt(),t=ot(),r=Ai(),n=oL(),i=sQ(),o=bw(),a=cc(),u=qo().get,l=uQ(),d=lQ(),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 P=R.groups=a(null),A=0;A<I.length;A++){var k=I[A];P[k[0]]=R[k[1]]}};return _&&(p=function(I){var P=this,A=u(P),k=r(I),L=A.raw,$,j,D;if(L)return L.lastIndex=P.lastIndex,$=e(p,L,k),P.lastIndex=L.lastIndex,$&&A.groups&&S($,A.groups),$;var G=A.groups,B=w&&P.sticky,Y=e(n,P),Z=P.source,te=0,U=k;if(B){Y=y(Y,"y",""),m(Y,"g")===-1&&(Y+="g"),U=x(k,P.lastIndex);var re=P.lastIndex>0&&v(k,P.lastIndex-1);P.lastIndex>0&&(!P.multiline||P.multiline&&re!==`
72
+ `&&re!=="\r"&&re!=="\u2028"&&re!=="\u2029")&&(Z="(?: (?:"+Z+"))",U=" "+U,te++),j=new RegExp("^(?:"+Z+")",Y)}E&&(j=new RegExp("^"+Z+"$(?!\\s)",Y)),b&&(D=P.lastIndex);var ae=e(h,B?j:P,U);return B?ae?(ae.input=k,ae[0]=x(ae[0],te),ae.index=P.lastIndex,P.lastIndex+=ae[0].length):P.lastIndex=0:b&&ae&&(P.lastIndex=P.global?ae.index+ae[0].length:D),E&&ae&&ae.length>1&&e(f,ae[0],j,function(){for(var le=1;le<arguments.length-2;le++)arguments[le]===void 0&&(ae[le]=void 0)}),ae&&G&&S(ae,G),ae}),bb=p,bb}var qM;function aL(){if(qM)return NM;qM=1;var e=Kn(),t=Nw();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),NM}aL();var kM={},xb,LM;function sL(){if(LM)return xb;LM=1,aL();var e=Zt(),t=Ti(),r=Nw(),n=it(),i=$t(),o=ss(),a=i("species"),u=RegExp.prototype;return xb=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)},xb}var wb,BM;function uL(){if(BM)return wb;BM=1;var e=Wk().charAt;return wb=function(t,r,n){return r+(n&&e(t,r).length||1)},wb}var _b,FM;function cQ(){if(FM)return _b;FM=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 _b={correct:n},_b}var Eb,$M;function lL(){if($M)return Eb;$M=1;var e=Zt(),t=Pr(),r=ic(),n=cQ(),i=oL(),o=RegExp.prototype;return Eb=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},Eb}var Sb,zM;function cL(){if(zM)return Sb;zM=1;var e=Zt(),t=Nr(),r=Ot(),n=Gn(),i=Nw(),o=TypeError;return Sb=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")},Sb}var HM;function fQ(){if(HM)return kM;HM=1;var e=Zt(),t=ot(),r=sL(),n=Nr(),i=Tt(),o=Sw(),a=Ai(),u=Ni(),l=as(),d=uL(),f=lL(),h=cL(),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,P;(P=h(b,w))!==null;){var A=a(P[0]);R[I]=A,A===""&&(b.lastIndex=d(w,o(b.lastIndex),S)),I++}return I===0?null:R}]}),kM}fQ();var VM={},Ob,UM;function dQ(){if(UM)return Ob;UM=1;var e=Ak(),t=un();return Ob=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)},Ob}var WM;function hQ(){if(WM)return VM;WM=1;var e=Ir(),t=_w().EXISTS,r=ot(),n=dQ(),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""}}}),VM}hQ();var GM={},Cb,KM;function pQ(){if(KM)return Cb;KM=1;var e=ec(),t=Function.prototype,r=t.apply,n=t.call;return Cb=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),Cb}var Rb,YM;function vQ(){if(YM)return Rb;YM=1;var e=ot(),t=jo(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;return Rb=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})},Rb}var XM;function gQ(){if(XM)return GM;XM=1;var e=pQ(),t=Zt(),r=ot(),n=sL(),i=it(),o=Nr(),a=Ot(),u=Tt(),l=sc(),d=Sw(),f=Ai(),h=Ni(),p=uL(),v=as(),m=vQ(),y=lL(),x=cL(),b=$t(),w=b("replace"),E=Math.max,_=Math.min,S=r([].concat),R=r([].push),I=r("".indexOf),P=r("".slice),A=function(j){return j===void 0?j:String(j)},k=(function(){return"a".replace(/./,"$0")==="$0"})(),L=(function(){return/./[w]?/./[w]("a","$0")==="":!1})(),$=!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 B=L?"$":"$0";return[function(Z,te){var U=h(this),re=u(Z)?v(Z,w):void 0;return re?t(re,Z,U,te):t(D,f(U),Z,te)},function(Y,Z){var te=o(this),U=f(Y),re=a(Z);re||(Z=f(Z));var ae=f(y(te));if(typeof Z=="string"&&!~I(Z,B)&&!~I(Z,"$<")&&!~I(ae,"y")){var le=G(D,te,U,Z);if(le.done)return le.value}var F=!!~I(ae,"g"),W;F&&(W=!!~I(ae,"u")||!!~I(ae,"v"),te.lastIndex=0);for(var J=[],H;H=x(te,U),!(H===null||(R(J,H),!F));){var K=f(H[0]);K===""&&(te.lastIndex=p(U,d(te.lastIndex),W))}for(var se="",oe=0,fe=0;fe<J.length;fe++){H=J[fe];for(var V=f(H[0]),ee=E(_(l(H.index),U.length),0),we=[],be,de=1;de<H.length;de++)R(we,A(H[de]));var ue=H.groups;if(re){var Ee=S([V],we,ee,U);ue!==void 0&&R(Ee,ue),be=f(e(Z,void 0,Ee))}else be=m(V,U,ee,we,ue,Z);ee>=oe&&(se+=P(U,oe,ee)+be,oe=ee+V.length)}return se+P(U,oe)}]},!$||!k||L),GM}gQ();function kn(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Fu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var ao=null,ZM=null;iL&&window.addEventListener("resize",function(){ZM!==window.devicePixelRatio&&(ZM=window.devicePixelRatio,ao=null)});function JM(e){if(ao===null){var t=Fu(e);if(typeof t>"u")return ao=0,ao;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),ao=i}return ao}var pl=(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=Fu(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=cM(this.recalculate.bind(this),64),this.onMouseMove=cM(this.onMouseMove.bind(this),64),this.hideScrollbars=dM(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=dM(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=Fu(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),iL&&(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||QJ;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=Fu(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:JM(this.el)}catch{return JM(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})();pl.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};pl.instances=new WeakMap;function QM(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 Pu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QM(Object(r),!0).forEach(function(n){mQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mQ(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vl(){return vl=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},vl.apply(this,arguments)}function yQ(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 bQ(e,t){if(e==null)return{};var r=yQ(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 xQ=["children","scrollableNodeProps","tag"],wQ=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},dc=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=bQ(e,xQ),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(pl.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:
114
73
  'data-simplebar-auto-hide="false"' —> 'autoHide="false"'
115
- `),C.useEffect(function(){return d=i.ref||d,h.current&&(u=new Zu(h.current,eu(eu(eu(eu({},Cle(m)),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,Ju({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",Ju({},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"})))});Jd.displayName="SimpleBar";Jd.propTypes={children:Ns.oneOfType([Ns.node,Ns.func]),scrollableNodeProps:Ns.object,tag:Ns.string};const ZL=e=>{switch(e){case fe.EPermissionType.DATACLASS:return O.jsx(yu,{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(yu,{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 space-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})]})})}),aa=({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 top-1/2 -translate-y-1/2 flex cursor-pointer items-center space-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(Lr,{container:zr(),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(bi,{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: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 flex-shrink-0"})," ",O.jsx("span",{className:"flex-1 min-w-0 break-words 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(Lr,{container:zr(),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},Ile=({privilegeId:e,privileges:t})=>{const r=xr(),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:m,subType:b})=>({applyTo:x,type:m,subType:b})),v=B_(c.toLowerCase(),n,Object.values(i),Object.values(o));s(v.filter(({applyTo:x,type:m,subType:b})=>!Eo.find(p,{applyTo:x,type:m,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 space-x-2",children:[ZL(p.type),O.jsx("span",{children:p.applyTo})]}),placeholder:"Create a permission",hideNoOptions:!0})})})};function Rle(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 Nle=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n})=>{const[i,o]=C.useState(null),[a,s]=C.useState(null),{styles:c,attributes:u}=fd(i,a,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),d=xr(),[h,p]=C.useState([]),[v,x]=C.useState(""),{id:m}=e,b=C.useMemo(()=>fe.getInheritedResources(m,n),[m,n[m].includes,n[m].resources]),w=C.useMemo(()=>fe.getPromotions(m,n),[n[m]]),y={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},_=Object.values(y).flat(),S=(q,j)=>j.length>0&&j.every(V=>q.includes(V)),E=(q,j)=>j.some(V=>q.includes(V)),I=(q,j)=>Array.from(new Set([...q,...j])),N=(q,j)=>q.filter(V=>!j.includes(V)),T=q=>{p([...q])},k=q=>{p(j=>S(j,q)?N(j,q):I(j,q))},L=q=>{k(y[q])},B=S(h,_),G=h.length>0&&!B,z=S(h,y.functions),P=!z&&E(h,y.functions),K=()=>T(_),U=()=>T([]),re=async q=>{const{confirmed:j}=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(j){const V=fe.removePermission(e.id,q,n);d.actions.updatePrivileges(V)}},X=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 j=fe.resetResources(e.id,n);d.actions.updatePrivileges(j)}},D=(h.length>0?b.filter(q=>h.includes(q.type)):b).filter(({resource:q})=>v?new RegExp(Eo.escapeRegExp(v),"i").test(q):!0),$=Rle(D),Z=$.filter(q=>{const j=q.permissions.every(V=>!V.checked)&&q.permissions.some(V=>V.from.length>0);return r||!j}),ee=(q,j)=>{const V=fe.togglePermission(e.id,q,j,n);d.actions.updatePrivileges(V)},A=C.useMemo(()=>Z.some(q=>q.exists===!1),[Z]),W=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"}),j=Object.entries(n).map(([V,J])=>{const Y=J.resources.filter(se=>!se.exists);return{[V]:Y.map(se=>({applyTo:se.resource,type:se.type}))}}).reduce((V,J)=>({...V,...J}),{});if(q){const V=fe.removeMultiplePermissions(j,n);d.actions.updatePrivileges(V)}};return O.jsxs(Jd,{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 space-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(wn.Popover,{className:"flex items-center",children:({open:q})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{ref:o,children:O.jsx(xt.Icon,{isAction:!0,children:O.jsx(qD,{})})}),q&&O.jsx(Bd,{children:O.jsx(wn.Popover.Panel,{ref:s,style:c.popper,...u.popper,className:"z-50",static:!0,children:O.jsxs(yr,{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",children:[O.jsx(or,{size:"sm",value:G?null:B,onChange:()=>B?U():K()}),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:S(h,y.dataclass),onChange:()=>L("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:S(h,y.singleton),onChange:()=>L("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:P?null:z,onChange:()=>L("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:S(h,y.attribute),onChange:()=>L("attribute"),label:"Attribute"})})]})]})})})]})})]})})}),O.jsx(Ile,{privilegeId:m,privileges:n}),O.jsx("div",{children:O.jsx(Lr,{label:`Resetting the privilege will remove all configured\r
116
- ressources`,container:zr(),children:O.jsx(Qt,{color:"white",variant:"ghost",onClick:X,children:O.jsx(iH,{})})})}),O.jsx(Lr,{icon:O.jsx(bi,{}),label:"Delete all the non existing resources from privileges",container:zr(),children:O.jsx(Qt,{color:"white",variant:"ghost",onClick:W,disabled:!A,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,j)=>{const V=q.permissions.some(J=>J.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(Lr,{label:"Remove Permission",container:zr(),children:O.jsx(Qt,{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}):re({applyTo:q.resource,type:q.type})},className:"opacity-0 group-hover:opacity-100",children:O.jsx(Wi,{className:"h-4 w-4 rotate-45 transform"})})})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(aa,{permissions:q.permissions,showIncluded:r,label:"read",onToggle:J=>ee(q,J),onSelect:t,privileges:n,exists:q.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(aa,{permissions:q.permissions,showIncluded:r,label:"create",onToggle:J=>ee(q,J),onSelect:t,privileges:n,exists:q.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(aa,{permissions:q.permissions,showIncluded:r,label:"update",onToggle:J=>ee(q,J),onSelect:t,privileges:n,exists:q.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(aa,{permissions:q.permissions,showIncluded:r,label:"drop",onToggle:J=>ee(q,J),onSelect:t,privileges:n,exists:q.exists})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(aa,{promoted:w[q.resource],permissions:q.permissions,showIncluded:r,label:"execute",onToggle:J=>ee(q,J),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(aa,{permissions:q.permissions,showIncluded:r,label:"promote",onToggle:J=>ee(q,J),onSelect:t,privileges:n,exists:q.exists})})]},`${q.resource}-${j}`)})}):null]}),!$.length&&v?O.jsx(kD,{children:"The Permission you're looking for can't be found "}):null,!$.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]})},Tle=({onCreate:e})=>{const t=xr(),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}=fd(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 m=fe.createPrivilege(s,r),b=Object.values(m).find(w=>w.privilege===s);t.actions.updatePrivileges(m),b&&e(b),setTimeout(()=>{x()},0)}catch(m){d(m.message)}};return O.jsx(wn.Popover,{children:({open:x,close:m})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",ref:i,children:O.jsx(Qt,{variant:"ghost",color:"white",children:O.jsx(Wi,{className:"h-4 w-4"})})}),x&&O.jsx(Bd,{children:O.jsx(wn.Popover.Panel,{ref:a,style:h.popper,...p.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:O.jsxs(yr,{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 space-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(m)},type:"text"})}),u&&O.jsx(xt.Message,{children:u})]})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[O.jsx(Qt,{onClick:()=>v(m),children:"Create"}),O.jsx(Qt,{color:"white",variant:"outline",onClick:()=>m(),children:"Cancel"})]})]})})})]})})},Ple=()=>{const e=xr(),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(yr,{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 space-x-1",children:[O.jsx("span",{children:O.jsx(ed,{className:"h-3.5 w-3.5"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),O.jsx(Tle,{onCreate:u=>{o(u)}})]}),O.jsx(Tae,{privileges:n,selectedPrivilege:i,selectPrivilege:u=>{o(u)}})]}),i&&n[i.id]?O.jsxs(yr,{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(Rae,{privileges:n,selectedPrivilege:i,onSelect:u=>o(r[u]),setShowIncluded:c,showIncluded:s}):null,O.jsx(Nle,{privileges:n,selectedPrivilege:i,onSelect:u=>o(r[u]),showIncluded:s})]}),O.jsx(kle,{privileges:n,selectedPrivilege:i,setSelectedPrivilege:o})]}):O.jsx(T4,{tab:"Privilege"})]})},kle=({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(yr,{depth:2,className:"h-full w-full rounded",children:O.jsx(Loe,{dict:e,data:fe.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})},Mle=({role:e})=>{var E;const t=xr(),[r,n]=C.useState(e),[i,o]=C.useState(e.role),[a,s]=C.useState(null),c=t.getPrivileges(),u=((E=r.privileges)==null?void 0:E.filter(I=>c[I]&&c[I].privilege!=="guest").length)||0,d=t.getRoles(),{selectedRole:h,selectRole:p}=n_(),[v,x]=C.useState(!1),m=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),L=Math.max(0,k-1),B=T[L];k===0?p(N[0]):I[B]?p(B):p(N[0])}t.actions.updateRoles(I)},S=(I=null)=>{if(I&&I.stopPropagation(),!e.role){_();return}x(!1),o(e.role)};return O.jsx(O.Fragment,{children:O.jsxs(yr,{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:m,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(ed,{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"&&S()},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(Qt,{color:"white",variant:"ghost",onClick:w,children:O.jsx(aH,{className:"h-4 w-4"})}),O.jsx(Qt,{color:"white",variant:"ghost",onClick:S,children:O.jsx(zD,{className:"h-4 w-4"})})]}):O.jsxs(O.Fragment,{children:[O.jsx(Qt,{color:"white",variant:"ghost",onClick:b,children:O.jsx(KD,{className:"h-4 w-4"})}),O.jsx(Qt,{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},Ale=()=>{const e=xr(),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(yr,{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(iu,{"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(iu,{"data-cy":"item=>Permisions",color:"primary",onClick:()=>{const c=MD(i.id,a.id,r);e.actions.updateRoles(c)},children:[a.privilege,O.jsx(Wi,{className:"rotate-45 transform"})]},s)),Object.values(t).filter(a=>!o(a,i)&&a.privilege!=="guest").map((a,s)=>O.jsxs(iu,{"data-cy":"item=>Permisions",color:"dark",onClick:()=>{const c=MD(i.id,a.id,r);e.actions.updateRoles(c)},children:[a.privilege,O.jsx(Wi,{})]},s))]})]})},Dle=({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 space-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(m=>{c[m.name].explicitly||(!c[m.name].from.includes(a[p].privilege)&&m.checked&&c[m.name].from.push(a[p].privilege),c[m.name].inherited=c[m.name].inherited||x[m.name].value||x[m.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 m=c[x].value;return n?!c[x].value&&!c[x].explicitly&&(m=p[x].value):c[x].value&&!c[x].explicitly&&(m=p[x].value),{value:m,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}},jle=e=>{switch(e){case"dataclass":return O.jsx(yu,{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(yu,{className:"h-6 w-6"})}},ba=({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,m)=>O.jsx("div",{className:rn("ml-1.5 mr-1 w-[2px] bg-muted",{"mr-0.5":i})},m)),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"})}),jle(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(Lr,{container:zr(),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(bi,{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,m)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):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(Lr,{container:zr(),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(bi,{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,m)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):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(Lr,{container:zr(),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(bi,{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,m)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):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(Lr,{container:zr(),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(bi,{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,m)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):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(Lr,{container:zr(),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(bi,{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,m)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:x},m))})]})]}):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=xr(),u=c.getRestrictedByDefault(),d=c.getPrivileges();return C.useEffect(()=>{n===!0&&s(!0)},[n]),O.jsxs(O.Fragment,{children:[O.jsx(ba,{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(ba,{privileges:r,permission:h,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:o},`${h.type}-${p}`)),t.methods.map((h,p)=>O.jsx(ba,{privileges:r,permission:h,depth:e+1,isRestrictedByDefault:u,allPrivileges:d,toastMessageCallback:o},`${h.type}-${p}`))]})]})},qle=({selectedRole:e})=>{const[t,r]=C.useState(null),[n,i]=C.useState(null),{styles:o,attributes:a}=fd(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),s=xr(),c=s.getRestrictedByDefault(),u=s.getPrivileges(),[d,h]=C.useState([]),[p,v]=C.useState(""),x=s.getCatalogMethods(),m=s.getDataclasses(),b=s.getSingletons(),[w,y]=C.useState({}),[_,S]=C.useState([]);C.useEffect(()=>{const V=Boe(x,Object.values(m),Object.values(b));y(V)},[e,x,m,b]);function E(V){const J=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"];return V.sort((Y,se)=>{const te=J.indexOf(Y.type),he=J.indexOf(se.type);return te!==he?te-he:Y.applyTo.toLowerCase()>se.applyTo.toLowerCase()?1:-1})}C.useEffect(()=>{S(E(B_(p,x,Object.values(m),Object.values(b)).filter(V=>d.length?d.includes(V.type):!0)))},[d,p,x,m,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(),L=(V,J)=>J.length>0&&J.every(Y=>V.includes(Y)),B=(V,J)=>Array.from(new Set([...V,...J])),G=(V,J)=>V.filter(Y=>!J.includes(Y)),z=V=>h([...V]),P=V=>{h(J=>L(J,V)?G(J,V):B(J,V))},K=V=>P(T[V]),U=k.every(V=>d.includes(V)),re=d.length>0&&!U,X=L(d,T.functions),ne=()=>z(k),D=()=>z([]),$=s.getRoles(),Z={toggleAllCollapsed:V=>{V.allCollapsed=!V.allCollapsed},toggleChildCollapsed:V=>{V.childCollapsed=!V.childCollapsed},setAllCollapsed:(V,J)=>{V.allCollapsed=J},setChildCollapsed:(V,J)=>{V.childCollapsed=J}},ee=C.useMemo(()=>{const V=Object.values(u).find(he=>he.privilege==="guest"),J=$[e],Y=J?Object.fromEntries(J.privileges.map(he=>[he,u[he]]).filter(([,he])=>!!he)):{};if(c)return{rolePrivs:Y,otherPrivs:V?{[V.id]:V}:{}};const se=V?{[V.id]:{...V,active:!0}}:{},te=Object.fromEntries(Object.entries(u).filter(([he])=>he!==(V==null?void 0:V.id)&&!(J!=null&&J.privileges.includes(he))).map(([he,ce])=>[he,{...ce,active:!1}]));return{rolePrivs:Y,otherPrivs:{...se,...te}}},[u,$,e,c]),{state:{allCollapsed:A,childCollapsed:W},dispatch:q}=fe.useEnhancedState({allCollapsed:!1,childCollapsed:!1},Z,"Table Collapse Store"),j=()=>{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(Jd,{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 space-x-2",children:[O.jsx(Lr,{label:"Collapse All",position:"up",container:zr(),children:O.jsx(Qt,{color:"white",variant:"ghost",disabled:A,onClick:()=>{W?(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(wn.Popover,{className:"flex items-center",children:({open:V})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{ref:r,children:O.jsx(xt.Icon,{isAction:!0,children:O.jsx(qD,{})})}),V&&O.jsx(Bd,{children:O.jsx(wn.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50",static:!0,children:O.jsxs(yr,{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",children:[O.jsx(or,{size:"sm",value:re?null:U,onChange:()=>U?D():ne()}),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:L(d,T.datastore),onChange:()=>K("datastore"),label:"Datastore"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:L(d,T.dataclass),onChange:()=>K("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:L(d,T.singleton),onChange:()=>K("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:X,onChange:()=>K("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(or,{size:"sm",value:L(d,T.attribute),onChange:()=>K("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,J)=>O.jsx(ba,{privileges:ee,permission:V,depth:0,inSearch:!0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:j},`${V.type}-${J}`)):Object.values(w).map((V,J)=>O.jsxs(C.Fragment,{children:[O.jsx(ba,{privileges:ee,permission:V,isRestrictedByDefault:c,allPrivileges:u,hasChild:!0,depth:0,toggleCollapse:()=>{const Y=!I;N(Y),q.setAllCollapsed(!Y&&A?!1:A)},collapsed:I,toastMessageCallback:j}),V.type==="datastore"&&!I?O.jsxs(O.Fragment,{children:[V.methods.map((Y,se)=>O.jsx(ba,{privileges:ee,isRestrictedByDefault:c,allPrivileges:u,permission:Y,depth:1,collapsed:A||!1,toastMessageCallback:j},`${Y.type}-${se}`)),V.dataClasses.map((Y,se)=>O.jsx(AD,{depth:1,privileges:ee,permission:Y,childCollapsed:W,didChildCollapsed:te=>{q.setChildCollapsed(te?W:!1)},toastMessageCallback:j},`${Y.type}-${se}`))]}):null,V.singletons.map((Y,se)=>O.jsx(AD,{depth:0,privileges:ee,permission:Y,childCollapsed:A,didChildCollapsed:te=>{q.setAllCollapsed(te?A:!1)},toastMessageCallback:j},`${Y.type}-${se}`))]},`${V.type}-${J}`))})]}),(p||d.length)&&!_.length?O.jsx(Dle,{children:"The Permission you're looking for can't be found "}):null]})},Lle=()=>{const e=xr(),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}=fd(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(),m=fe.createRole(x,a,t);e.actions.updateRoles(m)};return O.jsx(wn.Popover,{children:({open:v,close:x})=>{const m=()=>{u(null);try{fe.validateName(a),p(),x()}catch(b){u(b.message)}};return O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",ref:n,children:O.jsx(Qt,{variant:"ghost",color:"white",children:O.jsx(Wi,{className:"h-4 w-4"})})}),v&&O.jsx(Bd,{children:O.jsx(wn.Popover.Panel,{ref:o,style:d.popper,...h.popper,"data-cy":"New-priv-pop-up",className:"z-50",static:!0,children:O.jsxs(yr,{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 space-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"&&m()},type:"text"})}),c&&O.jsx(xt.Message,{children:c})]})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[O.jsx(Qt,{onClick:()=>{m()},children:"Create"}),O.jsx(Qt,{color:"white",variant:"outline",onClick:()=>x(),children:"Cancel"})]})]})})})]})}})},zle=()=>{const t=xr().getRoles(),{selectedRole:r}=n_();return O.jsxs("div",{className:"flex flex-1 h-full",children:[O.jsxs(yr,{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 space-x-1",children:[O.jsx("span",{children:O.jsx(ed,{className:"h-3.5 w-3.5"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),O.jsx(Lle,{})]}),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(Mle,{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 space-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(Wi,{className:"ml-2 inline h-4 w-4"})]})]})})})})]}),O.jsx(yr,{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(Ale,{}),O.jsx(qle,{selectedRole:r})]}):O.jsx(T4,{tab:"Role"})})})]})},QL=()=>{const e=xr(),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(wY,{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(_Y,{children:O.jsx(zle,{})}):O.jsx(Ple,{})]})})})},Ble="object",Fle={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"}}}}},$le={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"]}},Hle={type:Ble,properties:Fle,definitions:$le},Vle=()=>{const{modals:e,closeModal:t,editModal:r}=Iae();return O.jsx(O.Fragment,{children:e.map((n,i)=>O.jsx(fe.Modal,{hasOverlay:i===0,...n,onClose:t,onEdit:r,container:zr()},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({}))}},Wle=({initialValue:e,onChange:t,...r})=>{const n=xr(),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(Vle,{})]})},Ule=e=>{const t=Cae();return O.jsx(Kq,{adapter:t,children:O.jsx(fe.TipsProvider,{children:O.jsx(Wle,{...e})})})},Gle=({initialValue:e,catalog:t,...r})=>{const n=C.useMemo(()=>({...fe.sanitizeRoles(ez(e)),flags:{touched:!1}}),[e]);return O.jsx(Oae,{initialState:n,catalog:t,children:O.jsx(Ule,{initialValue:e,...r})})};exports.ROLES_EDITOR_SCOPE_CLASS=DD.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=Kq;exports.Roles=QL;exports.Standalone=Gle;exports.jsonSchema=Hle;exports.useReduxAdapter=Woe;
74
+ `),T.useEffect(function(){return f=i.ref||f,h.current&&(d=new pl(h.current,Pu(Pu(Pu(Pu({},wQ(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,vl({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",vl({},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"})))});dc.displayName="SimpleBar";dc.propTypes={children:he.oneOfType([he.node,he.func]),scrollableNodeProps:he.object,tag:he.string};const gl=Qx,ml=ew,fL=e=>{switch(e){case Q.EPermissionType.DATACLASS:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"});case Q.EPermissionType.SINGLETON:return C.jsx(xe.FdSingleton,{className:"h-6 w-6"});case Q.EPermissionType.DATASTORE:return C.jsx(xe.FdModel3,{className:"h-6 w-6"});case Q.EPermissionType.ATTRIBUTE:return C.jsx(xe.FdTableColumn,{className:"h-6 w-6"});case Q.EPermissionType.METHOD:return C.jsx(xe.FdCode,{className:"h-6 w-6"});case Q.EPermissionType.SINGLETON_METHOD:return C.jsx(xe.FdFunctionSingleton,{className:"h-6 w-6"});case Q.ESubPermissionType.ENTITY_SEL_METHOD:return C.jsx(xe.FdFunctionSelection,{className:"h-6 w-6"});case Q.ESubPermissionType.ENTITY_METHOD:return C.jsx(xe.FdFunctionEntity,{className:"h-6 w-6"});case Q.ESubPermissionType.DS_METHOD:return C.jsx(xe.FdFunctionDatastore,{className:"h-6 w-6"});case Q.ESubPermissionType.DATACLASS_METHOD:return C.jsx(xe.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"})}},eD=({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(xe.FdInfoBold,{className:"h-10 w-10"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})});function _Q(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 EQ(e){return C.jsx(Te.Checkbox,{icon:C.jsx(_Q,{}),...e})}const ro=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:i,showIncluded:o,privileges:a,exists:u,optimisticChecked:l})=>{const d=e.find(h=>h.name===t);if(!d)return null;const f=l!==void 0?l:d.checked;return C.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[f||d.from.length===0||t==="promote"?C.jsx(Te.Checkbox,{isChecked:f,onChange:()=>r&&r(d),isInvalid:u===!1}):C.jsx(EQ,{isIndeterminate:o&&d.from.length>0,onChange:()=>r&&r(d),isInvalid:u===!1}),C.jsxs("div",{className:"absolute left-5 top-0 flex cursor-pointer items-center space-x-1",children:[t!=="promote"&&(d.checked&&(d.info||d.from.length>0)||!d.checked&&d.from.length>0)&&C.jsx(C.Fragment,{children:C.jsxs(gl,{openDelay:0,closeDelay:0,children:[C.jsx(ml,{children:C.jsx(xe.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:[d.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:d.from.map(h=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[h].id),children:a[h].privilege},h))})]})]}):null,d.info&&C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"})," ",d.info]})]})})})]})}),(d.checked||d.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&C.jsxs(gl,{openDelay:0,closeDelay:0,children:[C.jsx(ml,{children:C.jsx(xe.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(xe.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(h=>C.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[h].id),children:a[h].privilege},h))]})]})})})})]})]})]})},SQ=({privilegeId:e,privileges:t})=>{const r=Q.useAppSelector(Q.selectCatalogMethods),n=Q.useAppSelector(Q.selectDataclasses),i=Q.useAppSelector(Q.selectSingletons),o=Q.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}=lo({onInputValueChange(){u([])},items:[],itemToString(R){return R?R.applyTo:""},defaultHighlightedIndex:0,stateReducer:(R,I)=>{const{changes:P,type:A}=I;switch(A){case lo.stateChangeTypes.InputKeyDownArrowDown:return{...P,isOpen:!0,highlightedIndex:R.highlightedIndex<=a.length?R.highlightedIndex+1:0};case lo.stateChangeTypes.InputKeyDownArrowUp:return{...P,isOpen:!0,highlightedIndex:R.highlightedIndex>=0?R.highlightedIndex-1:a.length};case lo.stateChangeTypes.InputKeyDownEnter:{const k=a[R.highlightedIndex];if(!k)return P;const L=Q.addPermission(e,k,t);return o(Q.updatePrivileges(L)),{...P,isOpen:!0,highlightedIndex:0}}}return P}});T.useEffect(()=>{const R=Q.getInheritedResources(e,t).map(({resource:P,type:A,subType:k})=>({applyTo:P,type:A,subType:k})),I=zx(l.toLowerCase(),r,Object.values(n),Object.values(i));u(I.filter(({applyTo:P,type:A,subType:k})=>!hl.find(R,{applyTo:P,type:A,subType:k})))},[l,e,t,r,n,i]);const w=h({},{suppressRefError:!0}),E=T.useRef(null),_=T.useRef(null),S=Wa({count:a.length,getScrollElement:()=>_.current,estimateSize:()=>32,overscan:5});return T.useEffect(()=>{m!==-1&&S.scrollToIndex(m)},[m,S]),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:R}})=>d(R),onFocus:()=>{b()}})}),C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1",children:C.jsx(xe.FdDown,{className:"h-4 w-4 cursor-pointer",onMouseDown:R=>R.preventDefault(),onClick:()=>b()})}),f&&C.jsx("ul",{...w,ref:_,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:C.jsx("li",{style:{height:`${S.getTotalSize()}px`,width:"100%",position:"relative"},children:S.getVirtualItems().map(R=>{const I=a[R.index];return C.jsxs("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${R.size}px`,transform:`translateY(${R.start}px)`},className:We(x===I&&"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===R.index,"font-bold":x===I}),...y({item:I,index:R.index}),onClick:()=>{const P=Q.addPermission(e,I,t);o(Q.updatePrivileges(P))},children:[fL(I.type),C.jsx("span",{children:I.applyTo})]},R.key)})})})]})};function OQ(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 li={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},tD=Object.values(li).flat();function no(e,t){return t.length>0&&t.every(r=>e.includes(r))}function CQ(e,t){return t.some(r=>e.includes(r))}function RQ(e,t){return Array.from(new Set([...e,...t]))}function IQ(e,t){return e.filter(r=>!t.includes(r))}const PQ=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n,rawPrivileges:i})=>{var oe,fe;const[o,a]=T.useState(null),[u,l]=T.useState(null),{styles:d,attributes:f}=xl(o,u,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),[h,p]=T.useState([]),[v,m]=T.useState([]),[y,x]=T.useState(""),[b,w]=T.useState(""),[E,_]=T.useState({}),S=Q.useAppDispatch(),R=i??n;T.useEffect(()=>{const V=setTimeout(()=>m(h),0);return()=>clearTimeout(V)},[h]),T.useEffect(()=>{_({})},[R]);const{id:I}=e,P=T.useMemo(()=>Q.getInheritedResources(I,R),[I,(oe=R[I])==null?void 0:oe.includes,(fe=R[I])==null?void 0:fe.resources]),A=T.useMemo(()=>Q.getPromotions(I,R),[R[I]]),k=V=>{p([...V])},L=V=>{p(ee=>no(ee,V)?IQ(ee,V):RQ(ee,V))},$=V=>{L(li[V])},j=no(h,tD),D=h.length>0&&!j,G=no(h,li.functions),B=!G&&CQ(h,li.functions),Y=()=>k(tD),Z=()=>k([]),te=T.useCallback(async V=>{const{confirmed:ee}=await S(Q.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(ee){const we=Q.removePermission(e.id,V,R);S(Q.updatePrivileges(we))}},[S,e.id,R]),U=T.useCallback(async()=>{const{confirmed:V}=await S(Q.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(V){const ee=Q.resetResources(e.id,R);S(Q.updatePrivileges(ee))}},[S,e.id,R]),re=T.useMemo(()=>v.length>0?P.filter(V=>v.includes(V.type)):P,[P,v]),ae=T.useMemo(()=>re.filter(({resource:V})=>b?new RegExp(hl.escapeRegExp(b),"i").test(V):!0),[re,b]),le=T.useMemo(()=>OQ(ae),[ae]),F=T.useMemo(()=>le.filter(V=>{const ee=V.permissions.every(we=>!we.checked)&&V.permissions.some(we=>we.from.length>0);return r||!ee}),[le,r]),W=T.useCallback((V,ee)=>{const we=`${V.resource}|${V.type}|${ee.name}`;_(de=>({...de,[we]:!ee.checked}));const be=R;setTimeout(()=>{const de=Q.togglePermission(e.id,V,ee,be);S(Q.updatePrivileges(de))},0)},[S,e.id,R]),J=T.useMemo(()=>F.some(V=>V.exists===!1),[F]),H=T.useCallback(async()=>{const{confirmed:V}=await S(Q.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(),ee=Object.entries(R).map(([we,be])=>{const de=be.resources.filter(ue=>!ue.exists);return{[we]:de.map(ue=>({applyTo:ue.resource,type:ue.type}))}}).reduce((we,be)=>({...we,...be}),{});if(V){const we=Q.removeMultiplePermissions(ee,R);S(Q.updatePrivileges(we))}},[S,R]),K=T.useRef(null),se=Wa({count:F.length,getScrollElement:()=>{var V;return((V=K.current)==null?void 0:V.getScrollElement())??null},estimateSize:()=>36,overscan:5});return T.useEffect(()=>{var V,ee;(ee=(V=K.current)==null?void 0:V.getScrollElement())==null||ee.scrollTo({top:0})},[I]),C.jsxs(dc,{ref:K,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(xe.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:V})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{ref:a,children:C.jsx(xe.FdAdjust,{className:"h-4 w-4"})}),V&&C.jsx(Ql,{children:C.jsxs(_r.Popover.Panel,{ref:l,style:d.popper,...f.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:j,isIndeterminate:D,onChange:()=>j?Z():Y()}),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:no(h,li.dataclass),onChange:()=>$("dataclass"),label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:no(h,li.singleton),onChange:()=>$("singleton"),label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:G,isIndeterminate:B,onChange:()=>$("functions"),label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:no(h,li.attribute),onChange:()=>$("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:y,onChange:V=>{const ee=V.target.value;x(ee),setTimeout(()=>w(ee),0)}})]}),C.jsx(SQ,{privilegeId:I,privileges:R}),C.jsx("div",{children:C.jsxs(gl,{openDelay:0,closeDelay:0,children:[C.jsx(ml,{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:U,children:C.jsx(xe.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(xe.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(gl,{openDelay:0,closeDelay:0,children:[C.jsx(ml,{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:H,disabled:!J,children:C.jsx(xe.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(xe.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"})]})}),F.length?C.jsxs("tbody",{children:[se.getVirtualItems().length>0?C.jsx("tr",{style:{height:`${se.getVirtualItems()[0].start}px`},children:C.jsx("td",{colSpan:7})}):null,se.getVirtualItems().map(V=>{const ee=F[V.index],we=ee.permissions.some(be=>be.from.length>0);return C.jsxs("tr",{className:We("group hover:bg-grey-300",{"bg-grey-600":V.index%2!==0,"opacity-60":ee.exists===!1}),children:[C.jsxs("td",{className:We("group flex items-center gap-3 py-2 text-xs",ee.exists===!1?"text-negative-400":"text-white",{"border-b-[0.5px] border-grey-300":!1}),children:[fL(ee.type),ee.resource,C.jsx(Te.Tooltip,{placement:"top",label:"Remove Permission",isDisabled:we,container:Bt(),children:C.jsx("button",{onClick:()=>{we?Te.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** Inherited permissions can't be removed",customIcon:xe.FdInfoBold}):te({applyTo:ee.resource,type:ee.type})},className:We("flex flex-shrink-0 items-center justify-center rounded p-1 opacity-0 group-hover:opacity-100",we?"hover:bg-grey-300 group-hover:opacity-70":"hover:bg-primary-hover"),children:C.jsx(xe.FdPlus,{className:"h-4 w-4 rotate-45 transform text-white"})})})]}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(ro,{permissions:ee.permissions,showIncluded:r,label:"read",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|read`]})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(ro,{permissions:ee.permissions,showIncluded:r,label:"create",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|create`]})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(ro,{permissions:ee.permissions,showIncluded:r,label:"update",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|update`]})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(ro,{permissions:ee.permissions,showIncluded:r,label:"drop",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|drop`]})}),C.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:C.jsx(ro,{promoted:A[ee.resource],permissions:ee.permissions,showIncluded:r,label:"execute",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|execute`]})}),C.jsx("td",{className:"py-2 text-center",children:C.jsx(ro,{permissions:ee.permissions,showIncluded:r,label:"promote",onToggle:be=>W(ee,be),onSelect:t,privileges:n,exists:ee.exists,optimisticChecked:E[`${ee.resource}|${ee.type}|promote`]})})]},`${ee.resource}-${V.index}`)}),(()=>{const V=se.getVirtualItems();if(!V.length)return null;const ee=se.getTotalSize()-V[V.length-1].end;return ee>0?C.jsx("tr",{style:{height:`${ee}px`},children:C.jsx("td",{colSpan:7})}):null})()]}):null]}),!le.length&&b?C.jsx(eD,{children:"The Permission you're looking for can't be found "}):null,!le.length&&!b?C.jsxs(eD,{children:["This Privilege has no Permissions configured yet ",C.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},NQ=({onCreate:e})=>{const t=Q.useAppSelector(Q.selectPrivileges),r=Q.useAppDispatch(),[n,i]=T.useState(null),[o,a]=T.useState(null),[u,l]=T.useState(""),[d,f]=T.useState(null),{styles:h,attributes:p}=xl(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(xe.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(Ql,{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=Q.create(u,t),b=r(Q.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=Q.create(u,t),x=r(Q.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"})]})]})})]})})},TQ=()=>{const e=Q.useAppSelector(Q.selectCatalog),t=Q.useAppSelector(Q.selectPrivileges),[r,n]=T.useState(t);T.useEffect(()=>{const v=setTimeout(()=>n(t),0);return()=>clearTimeout(v)},[t]);const i=T.useMemo(()=>{if(e===null)return r;const v=Q2(r,Object.values((e==null?void 0:e.dataClasses)??{}));return eq(v,e)},[r,e]),[o,a]=T.useState(null),[u,l]=T.useState(null),d=v=>{a(v),setTimeout(()=>l(v),0)},f=T.useMemo(()=>Object.keys(i),[i]);T.useEffect(()=>{if(o&&i[o.id]||!f.length)return;const v=i[f[0]];a(v),l(v)},[i]),T.useEffect(()=>{f.length<2&&p(!0)},[f.length]);const[h,p]=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(xe.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),C.jsx(NQ,{onCreate:v=>{a(v),l(v)}})]}),C.jsx(VX,{privileges:i,selectedPrivilege:o,selectPrivilege:d})]}),o&&i[o.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:[(u??o).privilege!=="guest"?C.jsx(q9,{privileges:i,selectedPrivilege:u??o,onSelect:v=>a(t[v]),setShowIncluded:p,showIncluded:h}):null,C.jsx(PQ,{privileges:i,rawPrivileges:t,selectedPrivilege:u??o,onSelect:v=>a(t[v]),showIncluded:h})]}),C.jsx(AQ,{privileges:i,selectedPrivilege:u??o,setSelectedPrivilege:a})]}):C.jsx(LD,{tab:"Privilege"})]})},AQ=({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(M9,{dict:e,data:Q.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})};var Ib={},da={},Nu={},rD;function dL(){if(rD)return Nu;rD=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.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 Nu}var io={},ha={},pa={},nD;function MQ(){if(nD)return pa;nD=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.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 pa.default=e,pa}var iD;function hc(){if(iD)return ha;iD=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.default=void 0;var e=t(MQ());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 ha.default=n,ha}var oD;function pc(){if(oD)return io;oD=1,Object.defineProperty(io,"__esModule",{value:!0}),io.default=void 0,io.unsafeStringify=n;var e=t(hc());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 io.default=o,io}var aD;function DQ(){if(aD)return da;aD=1,Object.defineProperty(da,"__esModule",{value:!0}),da.default=void 0;var e=r(dL()),t=pc();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 da.default=l,da}var va={},Ln={},ga={},sD;function hL(){if(sD)return ga;sD=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.default=void 0;var e=t(hc());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 ga.default=n,ga}var uD;function pL(){if(uD)return Ln;uD=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.URL=Ln.DNS=void 0,Ln.default=a;var e=pc(),t=r(hL());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 ma={},lD;function jQ(){if(lD)return ma;lD=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.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 ma.default=p,ma}var cD;function qQ(){if(cD)return va;cD=1,Object.defineProperty(va,"__esModule",{value:!0}),va.default=void 0;var e=r(pL()),t=r(jQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return va.default=i,va}var ya={},ba={},fD;function kQ(){if(fD)return ba;fD=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return ba.default=t,ba}var dD;function LQ(){if(dD)return ya;dD=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.default=void 0;var e=n(kQ()),t=n(dL()),r=pc();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 ya.default=o,ya}var xa={},wa={},hD;function BQ(){if(hD)return wa;hD=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.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 wa.default=n,wa}var pD;function FQ(){if(pD)return xa;pD=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.default=void 0;var e=r(pL()),t=r(BQ());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return xa.default=i,xa}var _a={},vD;function $Q(){if(vD)return _a;vD=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.default=void 0;var e="00000000-0000-0000-0000-000000000000";return _a.default=e,_a}var Ea={},gD;function zQ(){if(gD)return Ea;gD=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.default=void 0;var e=t(hc());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 Ea.default=n,Ea}var mD;function HQ(){return mD||(mD=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(DQ()),r=f(qQ()),n=f(LQ()),i=f(FQ()),o=f($Q()),a=f(zQ()),u=f(hc()),l=f(pc()),d=f(hL());function f(h){return h&&h.__esModule?h:{default:h}}})(Ib)),Ib}var Pb,yD;function VQ(){if(yD)return Pb;yD=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},Pb=e,Pb}var Nb,bD;function UQ(){if(bD)return Nb;bD=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",Nb=t,Nb}var Tb,xD;function WQ(){if(xD)return Tb;xD=1;const{v4:e,validate:t}=HQ(),r=UQ(),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 Tb=(()=>{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,P=S.split("").every(A=>p.includes(A));return R===!1?I&&P:I&&P&&t(u(S,b))}};return Object.freeze(_),_};return d.constants=n,d.uuid=e,d.generate=()=>(o||(o=d(n.flickrBase58).generate),o()),d})(),Tb}var GQ=WQ();const KQ=T.memo(function({role:t,privileges:r}){var I;const[n,i]=T.useState(t),[o,a]=T.useState(t.role),[u,l]=T.useState(null),d=((I=n.privileges)==null?void 0:I.filter(P=>r[P]&&r[P].privilege!=="guest").length)||0,f=Q.useAppSelector(Q.selectRoles),h=Q.useAppDispatch(),{selectedRole:p,selectRole:v}=ox(),[m,y]=T.useState(!1),x=Te.useOutsideClick(()=>{m&&w()});Te.useDidMountEffect(()=>{o!==t.role&&a(t.role)},[t.role]),T.useEffect(()=>{t.role||y(!0)},[]),T.useEffect(()=>{i(t)},[t]);const b=()=>{l(null),y(!0)},w=()=>{l(null),t.role&&t.role===o&&y(!1);try{const P=Q.saveRole({...n,role:o},f);h(Q.updateRoles(P)),y(!1)}catch(P){l(P.message)}},E=Q.useAppDispatch(),_=async P=>{P.stopPropagation();const{confirmed:A}=await E(Q.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();A&&S()},S=()=>{const P=Q.removeRole(n.id,f),A=Object.keys(P);if(p!==n.id){h(Q.updateRoles(P));return}if(A.length===0)v(null);else{const k=Object.keys(f),L=k.indexOf(n.id),$=Math.max(0,L-1),j=k[$];L===0?v(A[0]):P[j]?v(j):v(A[0])}h(Q.updateRoles(P))},R=(P=null)=>{if(P&&P.stopPropagation(),!t.role){S();return}y(!1),a(t.role)};return C.jsx(C.Fragment,{children:C.jsxs("div",{className:We("rounded border bg-grey-300 p-2",{"border-grey-100":p!==n.id,"border-primary-dark":p===n.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{v(n.id)},ref:x,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(xe.FdGroup,{className:"h-6 w-6"})}),m?C.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[C.jsx("input",{type:"text",value:o,onChange:({target:{value:P}})=>{a(P)},onKeyDown:P=>{P.key==="Enter"&&w(),P.key==="Escape"&&R()},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":u,"focus:border-primary-dark":!u}),placeholder:"role",autoComplete:"off",autoFocus:!0}),u&&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:u})]}):C.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",title:o,children:n.role}),C.jsx("div",{className:We("justify-betwee ml-auto flex w-fit items-center gap-x-2"),children:m?C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:w,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdSave,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:R,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdClose,{className:"h-4 w-4 text-grey-50"})})]}):C.jsxs(C.Fragment,{children:[C.jsx("button",{onClick:b,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdPen,{className:"h-4 w-4 text-grey-50"})}),C.jsx("button",{onClick:P=>_(P),className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:C.jsx(xe.FdTrash,{className:"h-4 w-4 text-grey-50"})})]})})]})}),C.jsxs("span",{className:We("ml-[43px] py-1 text-xs text-white"),children:[d," Privilege",d>1?"s":""]})]})})}),vL=(e,t)=>e?t[e]:null,wD=(e,t,r)=>{const n=vL(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},YQ=()=>{const e=Q.useAppSelector(Q.selectPrivileges),t=Q.useAppSelector(Q.selectRoles),r=Q.useAppDispatch(),{selectedRole:n}=ox(),i=vL(n,t),o=(l,d)=>d&&d.privileges.includes(l.id),a=T.useMemo(()=>Object.values(e).filter(l=>o(l,i)&&l.privilege!=="guest"),[e,i]),u=T.useMemo(()=>Object.values(e).filter(l=>!o(l,i)&&l.privilege!=="guest"),[e,i]);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"}),a.map((l,d)=>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(l,i),"bg-grey-300 text-grey-100":!o(l,i)}),onClick:()=>{const f=wD(i.id,l.id,t);r(Q.updateRoles(f))},children:[C.jsx("span",{className:"text-xs",children:l.privilege}),C.jsx("button",{className:"focus:outline-none",children:o(l,i)?C.jsx(xe.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(xe.FdPlus,{className:"h-[14px] w-[14px]"})})]},d)),u.map((l,d)=>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(l,i),"bg-grey-300 text-grey-100":!o(l,i)}),onClick:()=>{const f=wD(i.id,l.id,t);r(Q.updateRoles(f))},children:[C.jsx("span",{className:"text-xs",children:l.privilege}),C.jsx("button",{className:"text-white focus:outline-none",children:o(l,i)?C.jsx(xe.FdMinus,{className:"h-[14px] w-[14px]"}):C.jsx(xe.FdPlus,{className:"h-[14px] w-[14px]"})})]},d))]})]})},yl=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===Q.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=yl(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))&&![Q.EPermissionType.DATASTORE,Q.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===Q.EPermissionType.DATACLASS?Q.EPermissionType.DATASTORE:e.type===Q.EPermissionType.SINGLETON_METHOD?Q.EPermissionType.SINGLETON:Q.EPermissionType.DATACLASS},p=yl(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}},XQ=({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(xe.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),C.jsx("div",{className:"text-center text-sm",children:e})]})})}),ZQ=e=>{switch(e){case"dataclass":return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"});case"singleton":return C.jsx(xe.FdSingleton,{className:"h-6 w-6"});case"datastore":return C.jsx(xe.FdModel3,{className:"h-6 w-6"});case"attribute":return C.jsx(xe.FdTableColumn,{className:"h-6 w-6"});case"method":return C.jsx(xe.FdCode,{className:"h-6 w-6"});case"singletonMethod":return C.jsx(xe.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return C.jsx(xe.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return C.jsx(xe.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return C.jsx(xe.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return C.jsx(xe.FdFunctionDataclass,{className:"h-6 w-6"});default:return C.jsx(xe.FdTableHeader,{className:"h-6 w-6"})}},Sa=Qx,Oa=ew,_D=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:u,collapsed:l,isRestrictedByDefault:d,toastMessageCallback:f,computedInherited:h})=>{const[p,v]=t.applyTo.split("."),m=T.useMemo(()=>h||yl(t,e.otherPrivs,e.rolePrivs,d),[h,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((y,x)=>C.jsx("div",{className:We("ml-1.5 mr-1 w-[2px] bg-grey-100",{"mr-0.5":i})},x)),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(xe.FdRight,{className:"inline h-4 w-4"}):C.jsx(xe.FdDown,{className:"inline h-4 w-4"})}),ZQ(t.type),a?t.applyTo:v||p]})]}),C.jsx("td",{className:"py-2 text-center",children:[Q.EPermissionType.ATTRIBUTE,Q.EPermissionType.DATASTORE,Q.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":m.read.value||m.read.inherited}),onClick:f,children:(m.read.value||m.read.inherited)&&C.jsx(xe.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:!m.read.value&&m.read.inherited?C.jsxs(Sa,{openDelay:0,closeDelay:0,children:[C.jsx(Oa,{children:C.jsx(xe.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:m.read.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:m.read.from.map((y,x)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",children:[Q.EPermissionType.ATTRIBUTE,Q.EPermissionType.DATASTORE,Q.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":m.create.value||m.create.inherited}),onClick:f,children:(m.create.value||m.create.inherited)&&C.jsx(xe.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:!m.create.value&&m.create.inherited?C.jsxs(Sa,{openDelay:0,closeDelay:0,children:[C.jsx(Oa,{children:C.jsx(xe.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:m.create.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:m.create.from.map((y,x)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",children:[Q.EPermissionType.ATTRIBUTE,Q.EPermissionType.DATASTORE,Q.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":m.update.value||m.update.inherited}),onClick:f,children:(m.update.value||m.update.inherited)&&C.jsx(xe.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:!m.update.value&&m.update.inherited?C.jsxs(Sa,{openDelay:0,closeDelay:0,children:[C.jsx(Oa,{children:C.jsx(xe.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:m.update.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:m.update.from.map((y,x)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),C.jsx("td",{className:"py-2 text-center",children:[Q.EPermissionType.ATTRIBUTE,Q.EPermissionType.DATASTORE,Q.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":m.drop.value||m.drop.inherited}),onClick:f,children:(m.drop.value||m.drop.inherited)&&C.jsx(xe.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:!m.drop.value&&m.drop.inherited?C.jsxs(Sa,{openDelay:0,closeDelay:0,children:[C.jsx(Oa,{children:C.jsx(xe.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:m.drop.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:m.drop.from.map((y,x)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):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":m.execute.value||m.execute.inherited}),onClick:f,children:(m.execute.value||m.execute.inherited)&&C.jsx(xe.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:!m.execute.value&&m.execute.inherited?C.jsxs(Sa,{openDelay:0,closeDelay:0,children:[C.jsx(Oa,{children:C.jsx(xe.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:m.execute.from.length?C.jsxs("div",{className:"flex items-start text-s",children:[C.jsx(xe.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:m.execute.from.map((y,x)=>C.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})})]})};function ED(e,t,r){const n=[],i=(a,u,l)=>n.push({id:a,permission:u,depth:l,hasChild:!1,isChild:!1}),o=(a,u,l,d,f,h)=>{n.push({id:a,permission:u,depth:l,hasChild:!0,isChild:d,toggleId:a,isCollapsed:f}),f||h()};for(const a of Object.values(e)){o("ds-group",{applyTo:a.applyTo,type:a.type},0,!1,t,()=>{for(const u of a.methods)i(`dsm-${u.applyTo}`,u,1);for(const u of a.dataClasses){const l=`dc-${u.applyTo}`;o(l,{applyTo:u.applyTo,type:u.type},1,!0,r[l]??!1,()=>{for(const d of u.attributes)i(`dca-${d.applyTo}`,d,2);for(const d of u.methods)i(`dcm-${d.applyTo}`,d,2)})}});for(const u of a.singletons){const l=`sing-${u.applyTo}`;o(l,{applyTo:u.applyTo,type:u.type},0,!0,r[l]??!1,()=>{for(const d of u.attributes)i(`singa-${d.applyTo}`,d,1);for(const d of u.methods)i(`singm-${d.applyTo}`,d,1)})}}return n}const SD=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],ci={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},OD=Object.values(ci).flat();function oo(e,t){return t.length>0&&t.every(r=>e.includes(r))}function JQ(e,t){return Array.from(new Set([...e,...t]))}function QQ(e,t){return e.filter(r=>!t.includes(r))}const eee=({selectedRole:e})=>{const[t,r]=T.useState(null),[n,i]=T.useState(null),{styles:o,attributes:a}=xl(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),u=Q.useAppSelector(Q.selectRestrictedByDefault),l=Q.useAppSelector(Q.selectPrivileges),[d,f]=T.useState([]),[h,p]=T.useState([]),[v,m]=T.useState(""),[y,x]=T.useState("");T.useEffect(()=>{const V=setTimeout(()=>p(d),0);return()=>clearTimeout(V)},[d]);const b=Q.useAppSelector(Q.selectCatalogMethods),w=Q.useAppSelector(Q.selectDataclasses),E=Q.useAppSelector(Q.selectSingletons),_=T.useMemo(()=>j9(b,Object.values(w),Object.values(E)),[b,w,E]),S=T.useMemo(()=>!h.length&&!y?[]:[...zx(y,b,Object.values(w),Object.values(E))].filter(V=>h.length?h.includes(V.type):!0).sort((V,ee)=>{const we=SD.indexOf(V.type),be=SD.indexOf(ee.type);return we!==be?we-be:V.applyTo.toLowerCase()>ee.applyTo.toLowerCase()?1:-1}),[y,h,b,w,E]),R=V=>f([...V]),I=V=>{f(ee=>oo(ee,V)?QQ(ee,V):JQ(ee,V))},P=V=>I(ci[V]),A=OD.every(V=>d.includes(V)),k=d.length>0&&!A,L=oo(d,ci.functions),$=()=>R(OD),j=()=>R([]),D=Q.useAppSelector(Q.selectRoles),[G,B]=T.useState(D);T.useEffect(()=>{const V=setTimeout(()=>B(D),0);return()=>clearTimeout(V)},[D]);const Y=T.useRef(null);T.useEffect(()=>{var V,ee;(ee=(V=Y.current)==null?void 0:V.getScrollElement())==null||ee.scrollTo({top:0})},[e]);const Z=Wa({count:S.length,getScrollElement:()=>{var V;return((V=Y.current)==null?void 0:V.getScrollElement())??null},estimateSize:()=>36,overscan:5}),te=T.useMemo(()=>{const V=Object.values(l).find(ue=>ue.privilege==="guest"),ee=G[e],we=ee?Object.fromEntries(ee.privileges.map(ue=>[ue,l[ue]]).filter(([,ue])=>!!ue)):{};if(u)return{rolePrivs:we,otherPrivs:V?{[V.id]:V}:{}};const be=V?{[V.id]:{...V,active:!0}}:{},de=Object.fromEntries(Object.entries(l).filter(([ue])=>ue!==(V==null?void 0:V.id)&&!(ee!=null&&ee.privileges.includes(ue))).map(([ue,Ee])=>[ue,{...Ee,active:!1}]));return{rolePrivs:we,otherPrivs:{...be,...de}}},[l,G,e,u]),[U,re]=T.useState(!1),[ae,le]=T.useState({}),F=T.useMemo(()=>{const V=[];for(const ee of Object.values(_)){for(const we of ee.dataClasses)V.push(`dc-${we.applyTo}`);for(const we of ee.singletons)V.push(`sing-${we.applyTo}`)}return V},[_]),W=F.length>0&&F.every(V=>ae[V]===!0),J=T.useCallback(()=>{const V={};for(const ee of F)V[ee]=!0;le(V)},[F]),H=T.useCallback(V=>{V==="ds-group"?re(ee=>!ee):le(ee=>({...ee,[V]:!ee[V]}))},[]),K=T.useMemo(()=>{const V=new Map;for(const{permission:ee}of ED(_,!1,{}))V.set(`${ee.applyTo}|${ee.type}`,yl(ee,te.otherPrivs,te.rolePrivs,u));return V},[te,u,_]),se=T.useMemo(()=>ED(_,U,ae),[_,U,ae]),oe=Wa({count:se.length,getScrollElement:()=>{var V;return((V=Y.current)==null?void 0:V.getScrollElement())??null},estimateSize:()=>36,overscan:8}),fe=T.useCallback(()=>{Te.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** You can add or modify permissions only in the Privilege section.",customIcon:xe.FdInfoCircle})},[]);return C.jsxs(dc,{ref:Y,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:()=>{W?(J(),re(!0)):J()},className:We("cursor-pointer rounded-md p-1 hover:bg-primary-hover focus:outline-none",{"pointer-events-none text-grey-200":U&&W,"text-white":!(U&&W)}),children:C.jsx(xe.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(xe.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:V})=>C.jsxs(C.Fragment,{children:[C.jsx(_r.Popover.Button,{ref:r,children:C.jsx(xe.FdAdjust,{className:"h-4 w-4"})}),V&&C.jsx(Ql,{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:A,isIndeterminate:k,onChange:()=>A?j():$()}),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:oo(d,ci.datastore),onChange:()=>P("datastore"),label:"Datastore"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:oo(d,ci.dataclass),onChange:()=>P("dataclass"),label:"Dataclass"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:oo(d,ci.singleton),onChange:()=>P("singleton"),label:"Singleton"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:L,onChange:()=>P("functions"),label:"Functions"})}),C.jsx("div",{className:"flex items-center",children:C.jsx(Te.Checkbox,{isChecked:oo(d,ci.attribute),onChange:()=>P("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:v,onChange:V=>{const ee=V.target.value;m(ee),setTimeout(()=>x(ee),0)}})]})]})}),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:h.length||y?C.jsxs(C.Fragment,{children:[Z.getVirtualItems().length>0?C.jsx("tr",{style:{height:`${Z.getVirtualItems()[0].start}px`},children:C.jsx("td",{colSpan:6})}):null,Z.getVirtualItems().map(V=>{const ee=S[V.index];return C.jsx(_D,{privileges:te,permission:ee,depth:0,inSearch:!0,isRestrictedByDefault:u,allPrivileges:l,toastMessageCallback:fe,computedInherited:K.get(`${ee.applyTo}|${ee.type}`)},`${ee.type}-${V.index}`)}),(()=>{const V=Z.getVirtualItems();if(!V.length)return null;const ee=Z.getTotalSize()-V[V.length-1].end;return ee>0?C.jsx("tr",{style:{height:`${ee}px`},children:C.jsx("td",{colSpan:6})}):null})()]}):C.jsxs(C.Fragment,{children:[oe.getVirtualItems().length>0?C.jsx("tr",{style:{height:`${oe.getVirtualItems()[0].start}px`},children:C.jsx("td",{colSpan:6})}):null,oe.getVirtualItems().map(V=>{const ee=se[V.index];return C.jsx(_D,{privileges:te,permission:ee.permission,depth:ee.depth,hasChild:ee.hasChild,isChild:ee.isChild,collapsed:ee.isCollapsed,toggleCollapse:ee.toggleId?()=>H(ee.toggleId):void 0,isRestrictedByDefault:u,allPrivileges:l,toastMessageCallback:fe,computedInherited:K.get(`${ee.permission.applyTo}|${ee.permission.type}`)},ee.id)}),(()=>{const V=oe.getVirtualItems();if(!V.length)return null;const ee=oe.getTotalSize()-V[V.length-1].end;return ee>0?C.jsx("tr",{style:{height:`${ee}px`},children:C.jsx("td",{colSpan:6})}):null})()]})})]}),(y||h.length)&&!S.length?C.jsx(XQ,{children:"The Permission you're looking for can't be found "}):null]})},tee=()=>C.jsx("div",{className:"flex flex-1 items-center justify-center",children:C.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-grey-200 border-t-primary-dark"})}),ree=()=>{const e=Q.useAppSelector(Q.selectRoles),t=Q.useAppDispatch(),[r,n]=T.useState(null),[i,o]=T.useState(null),[a,u]=T.useState(""),[l,d]=T.useState(null),{styles:f,attributes:h}=xl(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=GQ.generate(),y=Q.createRole(m,a,e);t(Q.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(xe.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&C.jsx(Ql,{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"})]})]})})]})}})},nee=()=>{const e=Q.useAppSelector(Q.selectRoles),t=Q.useAppSelector(Q.selectPrivileges),{selectedRole:r,deferredSelectedRole:n}=ox(),i=T.useMemo(()=>Object.values(e).sort((o,a)=>Te.localeCompare(o.role,a.role)),[e]);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(xe.FdGroup,{className:"h-[14px] w-[14px]"})}),C.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),C.jsx(ree,{})]}),C.jsx("div",{className:"flex-1 overflow-auto p-4 pb-10 pt-1",children:i.length>0?C.jsx("div",{className:"flex flex-col gap-4",children:i.map(o=>C.jsx(KQ,{role:o,privileges:t},o.id))}):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(xe.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(xe.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":r}),children:C.jsx("div",{className:"flex h-full w-full select-none flex-col bg-grey-800",children:r?C.jsxs(C.Fragment,{children:[C.jsx(YQ,{}),n?C.jsx(eee,{selectedRole:n}):C.jsx(tee,{})]}):C.jsx(LD,{tab:"Role"})})})]})},gL=()=>{const e=Q.useAppSelector(Q.selectQodly),t=Q.useAppSelector(Q.selectSelectedTab),r=Q.useAppSelector(Q.selectForceLogin),n=Q.useAppSelector(Q.selectRestrictedByDefault),i=T.useRef(),o=Q.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(gH,{activeTab:t,forceLogin:r,restrictedByDefault:n,onTabChange:a=>{o(Q.toggleTab(a))},onForceLoginChange:a=>{o(Q.toggleForceLogin(a))},onRestrictedByDefaultChange:a=>{o(Q.toggleRestrictedByDefault(a))},qodly:e}),C.jsx("div",{className:t==="roles"?"flex flex-1 overflow-hidden":"hidden",children:C.jsx(mH,{children:C.jsx(nee,{})})}),C.jsx("div",{className:t==="privileges"?"flex flex-1 overflow-hidden":"hidden",children:C.jsx(TQ,{})})]})})})},iee=()=>{const e=Q.useAppSelector(Q.selectModals),t=Q.useAppDispatch();return C.jsx(C.Fragment,{children:e.map((r,n)=>C.jsx(Te.Modal,{hasOverlay:n===0,...r,onClose:i=>t(Q.closeModal(i)),onEdit:i=>t(Q.editModal(i)),container:Bt()},r.id))})},oee=({initialValue:e,onChange:t,...r})=>{const n=Q.useAppSelector(Q.selectRolesFlags),i=Q.useAppSelector(Q.selectRolesAndPrivileges,(a,u)=>hl.isEqual(a,u)),o=Q.useAppDispatch();return T.useEffect(()=>{if(e)try{const a=JSON.parse(e);if(hl.isEqual(a,i))return;o(Q.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(gL,{...r})}),C.jsx(iee,{})]})},aee=e=>C.jsx(Q.ReduxProvider,{store:Q.getStore(),children:C.jsx(Te.TipsProvider,{children:C.jsx(oee,{...e})})});exports.ROLES_EDITOR_SCOPE_CLASS=CD.ROLES_EDITOR_SCOPE_CLASS;exports.Roles=gL;exports.Standalone=aee;
117
75
  //# sourceMappingURL=index.cjs.js.map