@ws-ui/roles-editor 1.14.0 → 1.14.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,77 +1,120 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),P=require("react"),ae=require("@ws-ui/shared"),_r=require("@headlessui/react"),gx=require("react-dom"),we=require("@ws-ui/icons"),$e=require("@ws-ui/store"),KD=require("./common.cjs.js");function YD(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 ce=YD(P),mx=YD(gx);var ht=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var id={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),C=require("react"),ve=require("@ws-ui/shared"),xn=require("react-dom"),wn=require("@headlessui/react"),et=require("@ws-ui/store"),XD=require("./common.cjs.js"),NO=require("@ws-ui/icons");function ZD(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 nt=ZD(C),vV=ZD(xn);(function(){try{const e=document.createElement("style");e.setAttribute("data-vite-dev-id","ui-components.css"),e.textContent=`/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}:root:not(#\\#),:host:not(#\\#){--color-green-500:oklch(72.3% .219 149.579);--color-blue-500:oklch(62.3% .214 259.815);--color-pink-500:oklch(65.6% .241 354.308);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--container-md:28rem;--text-xs:.65rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-xs:.125rem;--radius-md:.375rem;--radius-lg:.5rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-bounce:bounce 1s infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--color-grey-50:var(--ws-grey-50);--color-grey-100:var(--ws-grey-100);--color-grey-200:var(--ws-grey-200);--color-grey-300:var(--ws-grey-300);--color-grey-400:var(--ws-grey-400);--color-grey-500:var(--ws-grey-500);--color-grey-600:var(--ws-grey-600);--color-grey-700:var(--ws-grey-700);--color-grey-800:var(--ws-grey-800);--color-primary-500:var(--ws-primary-500);--color-primary-600:var(--ws-primary-600);--color-primary-700:var(--ws-primary-700);--color-positive-200:var(--ws-positive-200);--color-positive-400:var(--ws-positive-400);--color-positive-500:var(--ws-positive-500);--color-positive-600:var(--ws-positive-600);--color-warning-500:var(--ws-warning-500);--color-negative-400:var(--ws-negative-400);--color-negative-500:var(--ws-negative-500);--text-xxs:.55rem;--text-s:.75rem;--min-height-6:1.5rem;--color-canvas-default:var(--ws-bg-default);--color-canvas-subtle:var(--ws-grey-100);--color-panel:var(--ws-grey-300);--color-panel-subtle:var(--ws-grey-200);--color-card:var(--ws-card-bg);--color-card-border:var(--ws-card-border);--color-body:var(--ws-bg-foreground);--color-body-bg:var(--ws-bg-default);--color-body-light:var(--ws-grey-100);--color-muted:var(--ws-text-muted);--color-neutral:var(--ws-grey-200);--color-button-text:var(--ws-button-fg);--color-primary:var(--ws-primary-default);--color-primary-hover:var(--ws-primary-hover);--color-primary-light:var(--ws-primary-light);--color-primary-dark:var(--ws-primary-dark);--color-positive:var(--ws-positive-500);--color-positive-hover:var(--ws-positive-hover);--color-positive-text:var(--ws-positive-text);--color-positive-bg:var(--ws-positive-bg);--color-positive-light:var(--ws-positive-light);--color-positive-dark:var(--ws-positive-dark);--color-negative:var(--ws-negative-500);--color-negative-hover:var(--ws-negative-hover);--color-negative-text:var(--ws-negative-text);--color-negative-bg:var(--ws-negative-bg);--color-negative-light:var(--ws-negative-light);--color-negative-dark:var(--ws-negative-dark);--color-warning:var(--ws-warning-500);--color-warning-hover:var(--ws-warning-hover);--color-warning-text:var(--ws-warning-text);--color-warning-bg:var(--ws-warning-bg);--color-warning-light:var(--ws-warning-light);--color-warning-dark:var(--ws-warning-dark);--color-input-bg:var(--ws-input-bg);--color-input-border:var(--ws-input-border);--color-input-text:var(--ws-input-text);--color-input-placeholder:var(--ws-input-placeholder);--color-input-focus-border:var(--ws-input-focus-border);--color-select-border:var(--ws-select-border);--color-select-text:var(--ws-select-text);--color-select-list-bg:var(--ws-select-list-bg);--color-input-option-hover-bg:var(--ws-input-option-hover-bg);--color-input-option-active-bg:var(--ws-input-option-active-bg);--color-input-option-active-text:var(--ws-input-option-active-text);--color-input-error-border:var(--ws-input-error-border);--color-input-error-bg:var(--ws-input-error-bg);--color-input-warning-border:var(--ws-input-warning-border);--color-input-warning-bg:var(--ws-input-warning-bg);--color-input-message-bg:var(--ws-input-message-bg);--color-input-message-text:var(--ws-input-message-text);--color-input-disable:var(--ws-disable-input);--color-inactive-text:var(--ws-inactive-text);--color-panel-0:var(--ws-panel-0);--color-panel-1:var(--ws-panel-1);--color-panel-2:var(--ws-panel-2);--color-panel-3:var(--ws-panel-3);--color-panel-4:var(--ws-panel-4);--color-panel-5:var(--ws-panel-5);--color-panel-border-subtle:var(--ws-panel-border-subtle);--color-tab-bg-default:var(--ws-tab-bg-default);--color-tab-border:var(--ws-tab-border);--color-tab-active-bg:var(--ws-tab-active-bg);--color-tab-active-fg:var(--ws-tab-active-fg);--color-tab-inactive-bg:var(--ws-tab-inactive-bg);--color-tab-inactive-fg:var(--ws-tab-inactive-fg);--color-panel-border:var(--ws-panel-border)}.pointer-events-auto:not(#\\#){pointer-events:auto}.pointer-events-none:not(#\\#){pointer-events:none}.collapse:not(#\\#){visibility:collapse}.visible:not(#\\#){visibility:visible}.sr-only:not(#\\#){clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute:not(#\\#){position:absolute}.fixed:not(#\\#){position:fixed}.relative:not(#\\#){position:relative}.static:not(#\\#){position:static}.inset-0:not(#\\#){inset:calc(var(--spacing)*0)}.-top-1\\/5:not(#\\#){top:-20%}.top-0:not(#\\#){top:calc(var(--spacing)*0)}.top-1:not(#\\#){top:calc(var(--spacing)*1)}.top-full:not(#\\#){top:100%}.-right-12:not(#\\#){right:calc(var(--spacing)*-12)}.-right-px:not(#\\#){right:-1px}.right-0:not(#\\#){right:calc(var(--spacing)*0)}.right-1:not(#\\#){right:calc(var(--spacing)*1)}.bottom-0:not(#\\#){bottom:calc(var(--spacing)*0)}.bottom-full:not(#\\#){bottom:100%}.-left-px:not(#\\#){left:-1px}.left-0:not(#\\#){left:calc(var(--spacing)*0)}.left-0\\.5:not(#\\#){left:calc(var(--spacing)*.5)}.left-1\\/2:not(#\\#){left:50%}.left-3\\.5:not(#\\#){left:calc(var(--spacing)*3.5)}.left-4:not(#\\#){left:calc(var(--spacing)*4)}.left-4\\.5:not(#\\#){left:calc(var(--spacing)*4.5)}.left-5\\.5:not(#\\#){left:calc(var(--spacing)*5.5)}.left-full:not(#\\#){left:100%}.z-1:not(#\\#){z-index:1}.z-2:not(#\\#){z-index:2}.z-10:not(#\\#){z-index:10}.z-40:not(#\\#){z-index:40}.z-50:not(#\\#){z-index:50}.z-60:not(#\\#){z-index:60}.z-9999:not(#\\#){z-index:9999}.container:not(#\\#){width:100%}@media(min-width:40rem){.container:not(#\\#){max-width:40rem}}@media(min-width:48rem){.container:not(#\\#){max-width:48rem}}@media(min-width:64rem){.container:not(#\\#){max-width:64rem}}@media(min-width:80rem){.container:not(#\\#){max-width:80rem}}@media(min-width:96rem){.container:not(#\\#){max-width:96rem}}.m-0:not(#\\#){margin:calc(var(--spacing)*0)}.m-0\\.5:not(#\\#){margin:calc(var(--spacing)*.5)}.m-px:not(#\\#){margin:1px}.mx-1:not(#\\#){margin-inline:calc(var(--spacing)*1)}.-my-1:not(#\\#){margin-block:calc(var(--spacing)*-1)}.mt-1:not(#\\#){margin-top:calc(var(--spacing)*1)}.mt-2:not(#\\#){margin-top:calc(var(--spacing)*2)}.mt-4:not(#\\#){margin-top:calc(var(--spacing)*4)}.mt-8:not(#\\#){margin-top:calc(var(--spacing)*8)}.mr-1:not(#\\#){margin-right:calc(var(--spacing)*1)}.mr-2:not(#\\#){margin-right:calc(var(--spacing)*2)}.mb-1:not(#\\#){margin-bottom:calc(var(--spacing)*1)}.mb-2:not(#\\#){margin-bottom:calc(var(--spacing)*2)}.mb-4:not(#\\#){margin-bottom:calc(var(--spacing)*4)}.ml-1:not(#\\#){margin-left:calc(var(--spacing)*1)}.ml-1\\.5:not(#\\#){margin-left:calc(var(--spacing)*1.5)}.ml-2:not(#\\#){margin-left:calc(var(--spacing)*2)}.box-border:not(#\\#){box-sizing:border-box}.block:not(#\\#){display:block}.flex:not(#\\#){display:flex}.grid:not(#\\#){display:grid}.hidden:not(#\\#){display:none}.inline:not(#\\#){display:inline}.inline-block:not(#\\#){display:inline-block}.inline-flex:not(#\\#){display:inline-flex}.table:not(#\\#){display:table}.size-1\\.5:not(#\\#){width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-1\\.75:not(#\\#){width:calc(var(--spacing)*1.75);height:calc(var(--spacing)*1.75)}.size-2:not(#\\#){width:calc(var(--spacing)*2);height:calc(var(--spacing)*2)}.size-2\\.5:not(#\\#){width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-3:not(#\\#){width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}.size-3\\.5:not(#\\#){width:calc(var(--spacing)*3.5);height:calc(var(--spacing)*3.5)}.size-3\\.25:not(#\\#){width:calc(var(--spacing)*3.25);height:calc(var(--spacing)*3.25)}.size-4:not(#\\#){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-5:not(#\\#){width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6:not(#\\#){width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-fit:not(#\\#){width:fit-content;height:fit-content}.h-2:not(#\\#){height:calc(var(--spacing)*2)}.h-3:not(#\\#){height:calc(var(--spacing)*3)}.h-3\\.5:not(#\\#){height:calc(var(--spacing)*3.5)}.h-4:not(#\\#){height:calc(var(--spacing)*4)}.h-4\\.5:not(#\\#){height:calc(var(--spacing)*4.5)}.h-5:not(#\\#){height:calc(var(--spacing)*5)}.h-5\\.5:not(#\\#){height:calc(var(--spacing)*5.5)}.h-6:not(#\\#){height:calc(var(--spacing)*6)}.h-7:not(#\\#){height:calc(var(--spacing)*7)}.h-7\\.5:not(#\\#){height:calc(var(--spacing)*7.5)}.h-8:not(#\\#){height:calc(var(--spacing)*8)}.h-10:not(#\\#){height:calc(var(--spacing)*10)}.h-14:not(#\\#){height:calc(var(--spacing)*14)}.h-20:not(#\\#){height:calc(var(--spacing)*20)}.h-30:not(#\\#){height:calc(var(--spacing)*30)}.h-100:not(#\\#){height:calc(var(--spacing)*100)}.h-fit:not(#\\#){height:fit-content}.h-full:not(#\\#){height:100%}.h-screen:not(#\\#){height:100vh}.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-72:not(#\\#){width:calc(var(--spacing)*72)}.w-80:not(#\\#){width:calc(var(--spacing)*80)}.w-96:not(#\\#){width:calc(var(--spacing)*96)}.w-fit:not(#\\#){width:fit-content}.w-full:not(#\\#){width:100%}.w-px:not(#\\#){width:1px}.max-w-100:not(#\\#){max-width:calc(var(--spacing)*100)}.max-w-\\[300px\\]:not(#\\#){max-width:300px}.max-w-md:not(#\\#){max-width:var(--container-md)}.min-w-0:not(#\\#){min-width:calc(var(--spacing)*0)}.min-w-3\\.5:not(#\\#){min-width:calc(var(--spacing)*3.5)}.min-w-4\\.5:not(#\\#){min-width:calc(var(--spacing)*4.5)}.min-w-5:not(#\\#){min-width:calc(var(--spacing)*5)}.min-w-7\\.5:not(#\\#){min-width:calc(var(--spacing)*7.5)}.min-w-50:not(#\\#){min-width:calc(var(--spacing)*50)}.min-w-\\[150px\\]:not(#\\#){min-width:150px}.min-w-fit:not(#\\#){min-width:fit-content}.min-w-full:not(#\\#){min-width:100%}.flex-1:not(#\\#){flex:1}.flex-3:not(#\\#){flex:3}.flex-none:not(#\\#){flex:none}.shrink-0:not(#\\#){flex-shrink:0}.grow:not(#\\#){flex-grow:1}.origin-top-right:not(#\\#){transform-origin:100% 0}.-translate-x-1\\/2:not(#\\#){--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full:not(#\\#){--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0:not(#\\#){--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full:not(#\\#){--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-full:not(#\\#){--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-0:not(#\\#){--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1\\/2:not(#\\#){--tw-translate-y: 50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-full:not(#\\#){--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-0:not(#\\#){--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95:not(#\\#){--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100:not(#\\#){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-110:not(#\\#){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-45:not(#\\#){rotate:-45deg}.rotate-45:not(#\\#){rotate:45deg}.rotate-90:not(#\\#){rotate:90deg}.rotate-180:not(#\\#){rotate:180deg}.transform:not(#\\#){transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-bounce:not(#\\#){animation:var(--animate-bounce)}.cursor-auto:not(#\\#){cursor:auto}.cursor-not-allowed:not(#\\#){cursor:not-allowed}.cursor-pointer:not(#\\#){cursor:pointer}.cursor-se-resize:not(#\\#){cursor:se-resize}.resize:not(#\\#){resize:both}.resize-none:not(#\\#){resize:none}.list-disc:not(#\\#){list-style-type:disc}.appearance-none:not(#\\#){-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-2:not(#\\#){grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3:not(#\\#){grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col:not(#\\#){flex-direction:column}.flex-row:not(#\\#){flex-direction:row}.flex-wrap:not(#\\#){flex-wrap:wrap}.place-content-center:not(#\\#){place-content:center}.place-items-center:not(#\\#){place-items:center}.items-center:not(#\\#){align-items:center}.items-end:not(#\\#){align-items:flex-end}.items-start:not(#\\#){align-items:flex-start}.justify-around:not(#\\#){justify-content:space-around}.justify-between:not(#\\#){justify-content:space-between}.justify-center:not(#\\#){justify-content:center}.gap-0\\.5:not(#\\#){gap:calc(var(--spacing)*.5)}.gap-1:not(#\\#){gap:calc(var(--spacing)*1)}.gap-1\\.5:not(#\\#){gap:calc(var(--spacing)*1.5)}.gap-2:not(#\\#){gap:calc(var(--spacing)*2)}.gap-2\\.5:not(#\\#){gap:calc(var(--spacing)*2.5)}.gap-3:not(#\\#){gap:calc(var(--spacing)*3)}.gap-4:not(#\\#){gap:calc(var(--spacing)*4)}.gap-6:not(#\\#){gap:calc(var(--spacing)*6)}.gap-8:not(#\\#){gap:calc(var(--spacing)*8)}.gap-10:not(#\\#){gap:calc(var(--spacing)*10)}.gap-14:not(#\\#){gap:calc(var(--spacing)*14)}:where(.space-y-1>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)):not(#\\#){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-1:not(#\\#){column-gap:calc(var(--spacing)*1)}.gap-x-2:not(#\\#){column-gap:calc(var(--spacing)*2)}.gap-x-3:not(#\\#){column-gap:calc(var(--spacing)*3)}.gap-x-4:not(#\\#){column-gap:calc(var(--spacing)*4)}.gap-x-12:not(#\\#){column-gap:calc(var(--spacing)*12)}.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}.scroll-auto:not(#\\#){scroll-behavior:auto}.rounded:not(#\\#){border-radius:.25rem}.rounded-full:not(#\\#){border-radius:3.40282e38px}.rounded-lg:not(#\\#){border-radius:var(--radius-lg)}.rounded-md:not(#\\#){border-radius:var(--radius-md)}.rounded-xs:not(#\\#){border-radius:var(--radius-xs)}.rounded-t:not(#\\#){border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-b:not(#\\#){border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-none:not(#\\#){border-bottom-right-radius:0;border-bottom-left-radius:0}.border:not(#\\#){border-style:var(--tw-border-style);border-width:1px}.border-0:not(#\\#){border-style:var(--tw-border-style);border-width:0}.border-2:not(#\\#){border-style:var(--tw-border-style);border-width:2px}.border-px:not(#\\#){border-width:1px}.divide:not(#\\#){border-width:.5px}.border-t:not(#\\#){border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0:not(#\\#){border-top-style:var(--tw-border-style);border-top-width:0}.border-r:not(#\\#){border-right-style:var(--tw-border-style);border-right-width:1px}.border-b:not(#\\#){border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0:not(#\\#){border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed:not(#\\#){--tw-border-style:dashed;border-style:dashed}.border-body:not(#\\#){border-color:var(--color-body)}.border-body-light:not(#\\#){border-color:var(--color-body-light)}.border-canvas-default:not(#\\#){border-color:var(--color-canvas-default)}.border-card-border:not(#\\#){border-color:var(--color-card-border)}.border-grey-100:not(#\\#){border-color:var(--color-grey-100)}.border-grey-200:not(#\\#){border-color:var(--color-grey-200)}.border-input-border:not(#\\#){border-color:var(--color-input-border)}.border-input-disable:not(#\\#){border-color:var(--color-input-disable)}.border-input-error-border:not(#\\#){border-color:var(--color-input-error-border)}.border-input-focus-border:not(#\\#){border-color:var(--color-input-focus-border)}.border-input-warning-border:not(#\\#){border-color:var(--color-input-warning-border)}.border-negative:not(#\\#){border-color:var(--color-negative)}.border-negative-500:not(#\\#){border-color:var(--color-negative-500)}.border-neutral:not(#\\#){border-color:var(--color-neutral)}.border-panel:not(#\\#){border-color:var(--color-panel)}.border-panel-border:not(#\\#){border-color:var(--color-panel-border)}.border-panel-border-subtle:not(#\\#){border-color:var(--color-panel-border-subtle)}.border-panel-subtle:not(#\\#){border-color:var(--color-panel-subtle)}.border-positive:not(#\\#){border-color:var(--color-positive)}.border-positive-text:not(#\\#){border-color:var(--color-positive-text)}.border-primary:not(#\\#){border-color:var(--color-primary)}.border-primary-700:not(#\\#){border-color:var(--color-primary-700)}.border-primary-hover:not(#\\#){border-color:var(--color-primary-hover)}.border-select-border:not(#\\#){border-color:var(--color-select-border)}.border-tab-border:not(#\\#){border-color:var(--color-tab-border)}.border-transparent:not(#\\#){border-color:#0000}.border-warning:not(#\\#){border-color:var(--color-warning)}.border-warning-bg:not(#\\#){border-color:var(--color-warning-bg)}.border-white:not(#\\#){border-color:var(--color-white)}.bg-blue-500:not(#\\#){background-color:var(--color-blue-500)}.bg-body:not(#\\#){background-color:var(--color-body)}.bg-body-bg:not(#\\#){background-color:var(--color-body-bg)}.bg-canvas-default:not(#\\#){background-color:var(--color-canvas-default)}.bg-canvas-subtle:not(#\\#){background-color:var(--color-canvas-subtle)}.bg-card:not(#\\#){background-color:var(--color-card)}.bg-gray-100:not(#\\#){background-color:var(--color-gray-100)}.bg-grey-50:not(#\\#){background-color:var(--color-grey-50)}.bg-grey-200:not(#\\#){background-color:var(--color-grey-200)}.bg-grey-300:not(#\\#){background-color:var(--color-grey-300)}.bg-grey-400:not(#\\#){background-color:var(--color-grey-400)}.bg-grey-500:not(#\\#){background-color:var(--color-grey-500)}.bg-grey-600:not(#\\#){background-color:var(--color-grey-600)}.bg-grey-700:not(#\\#){background-color:var(--color-grey-700)}.bg-grey-800:not(#\\#){background-color:var(--color-grey-800)}.bg-input-bg:not(#\\#){background-color:var(--color-input-bg)}.bg-input-border:not(#\\#){background-color:var(--color-input-border)}.bg-input-disable:not(#\\#){background-color:var(--color-input-disable)}.bg-input-error-bg:not(#\\#){background-color:var(--color-input-error-bg)}.bg-input-message-bg:not(#\\#){background-color:var(--color-input-message-bg)}.bg-input-option-active-bg:not(#\\#){background-color:var(--color-input-option-active-bg)}.bg-input-option-hover-bg:not(#\\#){background-color:var(--color-input-option-hover-bg)}.bg-input-text:not(#\\#){background-color:var(--color-input-text)}.bg-input-warning-bg:not(#\\#){background-color:var(--color-input-warning-bg)}.bg-negative:not(#\\#){background-color:var(--color-negative)}.bg-negative-400:not(#\\#){background-color:var(--color-negative-400)}.bg-negative-500:not(#\\#){background-color:var(--color-negative-500)}.bg-negative-bg:not(#\\#){background-color:var(--color-negative-bg)}.bg-negative-hover:not(#\\#){background-color:var(--color-negative-hover)}.bg-negative-light:not(#\\#){background-color:var(--color-negative-light)}.bg-panel:not(#\\#){background-color:var(--color-panel)}.bg-panel-0:not(#\\#){background-color:var(--color-panel-0)}.bg-panel-1:not(#\\#){background-color:var(--color-panel-1)}.bg-panel-2:not(#\\#){background-color:var(--color-panel-2)}.bg-panel-3:not(#\\#){background-color:var(--color-panel-3)}.bg-panel-4:not(#\\#){background-color:var(--color-panel-4)}.bg-panel-5:not(#\\#){background-color:var(--color-panel-5)}.bg-panel-subtle:not(#\\#){background-color:var(--color-panel-subtle)}.bg-positive:not(#\\#){background-color:var(--color-positive)}.bg-positive-200:not(#\\#){background-color:var(--color-positive-200)}.bg-positive-500:not(#\\#){background-color:var(--color-positive-500)}.bg-positive-bg:not(#\\#){background-color:var(--color-positive-bg)}.bg-positive-hover:not(#\\#){background-color:var(--color-positive-hover)}.bg-positive-light:not(#\\#){background-color:var(--color-positive-light)}.bg-primary:not(#\\#){background-color:var(--color-primary)}.bg-primary-500:not(#\\#){background-color:var(--color-primary-500)}.bg-primary-600:not(#\\#){background-color:var(--color-primary-600)}.bg-primary-hover:not(#\\#){background-color:var(--color-primary-hover)}.bg-primary-light:not(#\\#){background-color:var(--color-primary-light)}.bg-primary\\/30:not(#\\#){background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/30:not(#\\#){background-color:color-mix(in oklab,var(--color-primary)30%,transparent)}}.bg-select-list-bg:not(#\\#){background-color:var(--color-select-list-bg)}.bg-tab-active-bg:not(#\\#){background-color:var(--color-tab-active-bg)}.bg-tab-bg-default:not(#\\#){background-color:var(--color-tab-bg-default)}.bg-tab-inactive-bg:not(#\\#){background-color:var(--color-tab-inactive-bg)}.bg-transparent:not(#\\#){background-color:#0000}.bg-warning:not(#\\#){background-color:var(--color-warning)}.bg-warning-500:not(#\\#){background-color:var(--color-warning-500)}.bg-warning-bg:not(#\\#){background-color:var(--color-warning-bg)}.bg-warning-hover:not(#\\#){background-color:var(--color-warning-hover)}.bg-warning-light:not(#\\#){background-color:var(--color-warning-light)}.bg-white:not(#\\#){background-color:var(--color-white)}.bg-linear-to-r:not(#\\#){--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r:not(#\\#){--tw-gradient-position:to right in oklab}}.bg-linear-to-r:not(#\\#){background-image:linear-gradient(var(--tw-gradient-stops))}.from-green-500:not(#\\#){--tw-gradient-from:var(--color-green-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-primary:not(#\\#){--tw-gradient-from:var(--color-primary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-500:not(#\\#){--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-500:not(#\\#){--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.stroke-current:not(#\\#){stroke:currentColor}.p-0:not(#\\#){padding:calc(var(--spacing)*0)}.p-0\\.5:not(#\\#){padding:calc(var(--spacing)*.5)}.p-1:not(#\\#){padding:calc(var(--spacing)*1)}.p-1\\!{padding:calc(var(--spacing)*1)!important}.p-1\\.5:not(#\\#){padding:calc(var(--spacing)*1.5)}.p-2:not(#\\#){padding:calc(var(--spacing)*2)}.p-2\\.5:not(#\\#){padding:calc(var(--spacing)*2.5)}.p-3:not(#\\#){padding:calc(var(--spacing)*3)}.p-4:not(#\\#){padding:calc(var(--spacing)*4)}.p-6:not(#\\#){padding:calc(var(--spacing)*6)}.p-8:not(#\\#){padding:calc(var(--spacing)*8)}.p-10:not(#\\#){padding:calc(var(--spacing)*10)}.p-50:not(#\\#){padding:calc(var(--spacing)*50)}.p-px:not(#\\#){padding:1px}.px-0\\.5:not(#\\#){padding-inline:calc(var(--spacing)*.5)}.px-1:not(#\\#){padding-inline:calc(var(--spacing)*1)}.px-1\\.5:not(#\\#){padding-inline:calc(var(--spacing)*1.5)}.px-2:not(#\\#){padding-inline:calc(var(--spacing)*2)}.px-3:not(#\\#){padding-inline:calc(var(--spacing)*3)}.px-4:not(#\\#){padding-inline:calc(var(--spacing)*4)}.px-6:not(#\\#){padding-inline:calc(var(--spacing)*6)}.px-7:not(#\\#){padding-inline:calc(var(--spacing)*7)}.px-8:not(#\\#){padding-inline:calc(var(--spacing)*8)}.py-0\\.5:not(#\\#){padding-block:calc(var(--spacing)*.5)}.py-1:not(#\\#){padding-block:calc(var(--spacing)*1)}.py-1\\.5:not(#\\#){padding-block:calc(var(--spacing)*1.5)}.py-2:not(#\\#){padding-block:calc(var(--spacing)*2)}.py-3:not(#\\#){padding-block:calc(var(--spacing)*3)}.pt-0\\.5:not(#\\#){padding-top:calc(var(--spacing)*.5)}.pt-1:not(#\\#){padding-top:calc(var(--spacing)*1)}.pt-1\\.5:not(#\\#){padding-top:calc(var(--spacing)*1.5)}.pt-2:not(#\\#){padding-top:calc(var(--spacing)*2)}.pl-1:not(#\\#){padding-left:calc(var(--spacing)*1)}.pl-4:not(#\\#){padding-left:calc(var(--spacing)*4)}.text-center:not(#\\#){text-align:center}.text-left:not(#\\#){text-align:left}.text-2xl:not(#\\#){font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl:not(#\\#){font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl:not(#\\#){font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl:not(#\\#){font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-6xl:not(#\\#){font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-7xl:not(#\\#){font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.text-8xl:not(#\\#){font-size:var(--text-8xl);line-height:var(--tw-leading,var(--text-8xl--line-height))}.text-9xl:not(#\\#){font-size:var(--text-9xl);line-height:var(--tw-leading,var(--text-9xl--line-height))}.text-base:not(#\\#){font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg:not(#\\#){font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm:not(#\\#){font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl:not(#\\#){font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs:not(#\\#){font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-s:not(#\\#){font-size:var(--text-s)}.text-xxs:not(#\\#){font-size:var(--text-xxs)}.leading-3:not(#\\#){--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-4:not(#\\#){--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5:not(#\\#){--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-none:not(#\\#){--tw-leading:1;line-height:1}.font-bold:not(#\\#){--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium:not(#\\#){--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold:not(#\\#){--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin:not(#\\#){--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.whitespace-nowrap:not(#\\#){white-space:nowrap}.text-body:not(#\\#){color:var(--color-body)}.text-button-text:not(#\\#){color:var(--color-button-text)}.text-gray-50:not(#\\#){color:var(--color-gray-50)}.text-gray-400:not(#\\#){color:var(--color-gray-400)}.text-gray-500:not(#\\#){color:var(--color-gray-500)}.text-gray-800:not(#\\#){color:var(--color-gray-800)}.text-grey-100:not(#\\#){color:var(--color-grey-100)}.text-grey-200:not(#\\#){color:var(--color-grey-200)}.text-grey-300:not(#\\#){color:var(--color-grey-300)}.text-grey-700:not(#\\#){color:var(--color-grey-700)}.text-inactive-text:not(#\\#){color:var(--color-inactive-text)}.text-inherit:not(#\\#){color:inherit}.text-input-disable:not(#\\#){color:var(--color-input-disable)}.text-input-message-text:not(#\\#){color:var(--color-input-message-text)}.text-input-option-active-text:not(#\\#){color:var(--color-input-option-active-text)}.text-input-placeholder:not(#\\#){color:var(--color-input-placeholder)}.text-input-text:not(#\\#){color:var(--color-input-text)}.text-muted:not(#\\#){color:var(--color-muted)}.text-negative:not(#\\#){color:var(--color-negative)}.text-negative-500:not(#\\#){color:var(--color-negative-500)}.text-negative-dark:not(#\\#){color:var(--color-negative-dark)}.text-negative-text:not(#\\#){color:var(--color-negative-text)}.text-panel-subtle:not(#\\#){color:var(--color-panel-subtle)}.text-positive:not(#\\#){color:var(--color-positive)}.text-positive-500:not(#\\#){color:var(--color-positive-500)}.text-positive-600:not(#\\#){color:var(--color-positive-600)}.text-positive-dark:not(#\\#){color:var(--color-positive-dark)}.text-positive-text:not(#\\#),.text-positive-text\\/70:not(#\\#){color:var(--color-positive-text)}@supports (color:color-mix(in lab,red,red)){.text-positive-text\\/70:not(#\\#){color:color-mix(in oklab,var(--color-positive-text)70%,transparent)}}.text-primary:not(#\\#){color:var(--color-primary)}.text-primary-dark:not(#\\#){color:var(--color-primary-dark)}.text-primary-hover:not(#\\#){color:var(--color-primary-hover)}.text-select-text:not(#\\#){color:var(--color-select-text)}.text-tab-active-fg:not(#\\#){color:var(--color-tab-active-fg)}.text-tab-inactive-fg:not(#\\#){color:var(--color-tab-inactive-fg)}.text-warning:not(#\\#){color:var(--color-warning)}.text-warning-dark:not(#\\#){color:var(--color-warning-dark)}.text-warning-text:not(#\\#){color:var(--color-warning-text)}.capitalize:not(#\\#){text-transform:capitalize}.lowercase:not(#\\#){text-transform:lowercase}.uppercase:not(#\\#){text-transform:uppercase}.italic:not(#\\#){font-style:italic}.underline:not(#\\#){text-decoration-line:underline}.decoration-transparent:not(#\\#){text-decoration-color:#0000}.opacity-0:not(#\\#){opacity:0}.opacity-50:not(#\\#){opacity:.5}.opacity-60:not(#\\#){opacity:.6}.opacity-80:not(#\\#){opacity:.8}.opacity-100:not(#\\#){opacity:1}.shadow:not(#\\#){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner:not(#\\#){--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg:not(#\\#){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md:not(#\\#){--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs:not(#\\#){--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-input-error-border:not(#\\#){--tw-ring-color:var(--color-input-error-border)}.ring-input-focus-border:not(#\\#){--tw-ring-color:var(--color-input-focus-border)}.ring-input-warning-border:not(#\\#){--tw-ring-color:var(--color-input-warning-border)}.ring-positive:not(#\\#){--tw-ring-color:var(--color-positive)}.outline-hidden:not(#\\#){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden:not(#\\#){outline-offset:2px;outline:2px solid #0000}}.outline:not(#\\#),.outline-1:not(#\\#){outline-style:var(--tw-outline-style);outline-width:1px}.outline-s:not(#\\#){outline-width:.5px}.outline-xs:not(#\\#){outline-width:.3px}.outline-xxs:not(#\\#){outline-width:.1px}.outline-canvas-default:not(#\\#){outline-color:var(--color-canvas-default)}.outline-primary:not(#\\#){outline-color:var(--color-primary)}.blur:not(#\\#){--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter:not(#\\#){filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition:not(#\\#){transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all:not(#\\#){transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors:not(#\\#){transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity:not(#\\#){transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform:not(#\\#){transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150:not(#\\#){--tw-duration:.15s;transition-duration:.15s}.duration-200:not(#\\#){--tw-duration:.2s;transition-duration:.2s}.duration-300:not(#\\#){--tw-duration:.3s;transition-duration:.3s}.ease-in-out:not(#\\#){--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out:not(#\\#){--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-solid:not(#\\#){--tw-outline-style:solid;outline-style:solid}.select-none:not(#\\#){-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:flex:is(:where(.group):hover *):not(#\\#){display:flex}.group-hover\\:grid:is(:where(.group):hover *):not(#\\#){display:grid}.group-hover\\:border-body:is(:where(.group):hover *):not(#\\#){border-color:var(--color-body)}.group-hover\\:border-negative-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-negative-text)}.group-hover\\:border-positive-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-positive-text)}.group-hover\\:border-warning-text:is(:where(.group):hover *):not(#\\#){border-color:var(--color-warning-text)}.group-hover\\:bg-grey-400:is(:where(.group):hover *):not(#\\#){background-color:var(--color-grey-400)}.group-hover\\:bg-negative-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-negative-hover)}.group-hover\\:bg-negative-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-negative-light)}.group-hover\\:bg-positive-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-positive-hover)}.group-hover\\:bg-positive-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-positive-light)}.group-hover\\:bg-primary-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-primary-hover)}.group-hover\\:bg-primary-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-primary-light)}.group-hover\\:bg-warning-hover:is(:where(.group):hover *):not(#\\#){background-color:var(--color-warning-hover)}.group-hover\\:bg-warning-light:is(:where(.group):hover *):not(#\\#){background-color:var(--color-warning-light)}.group-hover\\:opacity-100:is(:where(.group):hover *):not(#\\#){opacity:1}}.placeholder\\:text-sm:not(#\\#)::placeholder{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.placeholder\\:text-xs:not(#\\#)::placeholder{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.placeholder\\:text-s:not(#\\#)::placeholder{font-size:var(--text-s)}.placeholder\\:text-input-placeholder:not(#\\#)::placeholder{color:var(--color-input-placeholder)}.placeholder\\:opacity-60:not(#\\#)::placeholder{opacity:.6}.first\\:bottom-full:first-child:not(#\\#){bottom:100%}.first\\:-ml-1\\.5:first-child:not(#\\#){margin-left:calc(var(--spacing)*-1.5)}.first\\:rounded-t:first-child:not(#\\#){border-top-left-radius:.25rem;border-top-right-radius:.25rem}.first\\:rounded-l:first-child:not(#\\#){border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.last\\:top-full:last-child:not(#\\#){top:100%}.last\\:-mr-1\\.5:last-child:not(#\\#){margin-right:calc(var(--spacing)*-1.5)}.last\\:rounded-r:last-child:not(#\\#){border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.last\\:rounded-b:last-child:not(#\\#){border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.only\\:top-full:only-child:not(#\\#){top:100%}.only\\:-mx-0\\.5:only-child:not(#\\#){margin-inline:calc(var(--spacing)*-.5)}.only\\:rounded:only-child:not(#\\#){border-radius:.25rem}.only\\:ring-1:only-child:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\\:border-input-error-border:focus-within:not(#\\#){border-color:var(--color-input-error-border)}.focus-within\\:border-input-focus-border:focus-within:not(#\\#){border-color:var(--color-input-focus-border)}.focus-within\\:border-input-warning-border:focus-within:not(#\\#){border-color:var(--color-input-warning-border)}.focus-within\\:border-positive:focus-within:not(#\\#){border-color:var(--color-positive)}@media(hover:hover){.hover\\:border-canvas-default:hover:not(#\\#){border-color:var(--color-canvas-default)}.hover\\:border-canvas-subtle:hover:not(#\\#){border-color:var(--color-canvas-subtle)}.hover\\:border-negative-hover:hover:not(#\\#){border-color:var(--color-negative-hover)}.hover\\:border-positive-hover:hover:not(#\\#){border-color:var(--color-positive-hover)}.hover\\:border-primary-hover:hover:not(#\\#){border-color:var(--color-primary-hover)}.hover\\:border-warning-hover:hover:not(#\\#){border-color:var(--color-warning-hover)}.hover\\:bg-canvas-default:hover:not(#\\#){background-color:var(--color-canvas-default)}.hover\\:bg-canvas-subtle:hover:not(#\\#){background-color:var(--color-canvas-subtle)}.hover\\:bg-grey-500:hover:not(#\\#){background-color:var(--color-grey-500)}.hover\\:bg-grey-700:hover:not(#\\#){background-color:var(--color-grey-700)}.hover\\:bg-input-option-hover-bg:hover:not(#\\#){background-color:var(--color-input-option-hover-bg)}.hover\\:bg-negative:hover:not(#\\#){background-color:var(--color-negative)}.hover\\:bg-negative-hover:hover:not(#\\#){background-color:var(--color-negative-hover)}.hover\\:bg-positive:hover:not(#\\#){background-color:var(--color-positive)}.hover\\:bg-positive-hover:hover:not(#\\#){background-color:var(--color-positive-hover)}.hover\\:bg-primary:hover:not(#\\#){background-color:var(--color-primary)}.hover\\:bg-primary-600:hover:not(#\\#){background-color:var(--color-primary-600)}.hover\\:bg-primary-hover:hover:not(#\\#){background-color:var(--color-primary-hover)}.hover\\:bg-primary\\/20:hover:not(#\\#){background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/20:hover:not(#\\#){background-color:color-mix(in oklab,var(--color-primary)20%,transparent)}}.hover\\:bg-transparent:hover:not(#\\#){background-color:#0000}.hover\\:bg-warning:hover:not(#\\#){background-color:var(--color-warning)}.hover\\:bg-warning-hover:hover:not(#\\#){background-color:var(--color-warning-hover)}.hover\\:text-body:hover:not(#\\#){color:var(--color-body)}.hover\\:text-button-text:hover:not(#\\#){color:var(--color-button-text)}.hover\\:text-grey-200:hover:not(#\\#){color:var(--color-grey-200)}.hover\\:text-negative-400:hover:not(#\\#){color:var(--color-negative-400)}.hover\\:text-positive-400:hover:not(#\\#){color:var(--color-positive-400)}.hover\\:text-positive-text:hover:not(#\\#){color:var(--color-positive-text)}.hover\\:text-primary:hover:not(#\\#){color:var(--color-primary)}.hover\\:text-primary-hover:hover:not(#\\#){color:var(--color-primary-hover)}.hover\\:text-tab-active-fg:hover:not(#\\#){color:var(--color-tab-active-fg)}.hover\\:decoration-current:hover:not(#\\#){text-decoration-color:currentColor}}.focus\\:bg-transparent:focus:not(#\\#){background-color:#0000}.focus\\:ring-2:focus:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-negative:focus:not(#\\#){--tw-ring-color:var(--color-negative)}.focus\\:ring-positive:focus:not(#\\#){--tw-ring-color:var(--color-positive)}.focus\\:ring-primary:focus:not(#\\#){--tw-ring-color:var(--color-primary)}.focus\\:ring-warning:focus:not(#\\#){--tw-ring-color:var(--color-warning)}.focus\\:ring-offset-0:focus:not(#\\#){--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-2:focus:not(#\\#){--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:outline-hidden:focus:not(#\\#){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\\:outline-hidden:focus:not(#\\#){outline-offset:2px;outline:2px solid #0000}}.focus-visible\\:ring-2:focus-visible:not(#\\#){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-primary:focus-visible:not(#\\#){--tw-ring-color:var(--color-primary)}.focus-visible\\:ring-offset-2:focus-visible:not(#\\#){--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}:root:not(#\\#){--ws-primary-50:#f2ddff;--ws-primary-100:#edd0ff;--ws-primary-300:#d0acef;--ws-primary-400:#c190ea;--ws-primary-600:#935ebf;--ws-primary-800:#563374;--ws-primary-900:#381e4f;--ws-primary-950:#29133c;--ws-positive-50:#ecf9f2;--ws-positive-100:#d9f2e6;--ws-positive-300:#8ed9b3;--ws-positive-400:#68cd99;--ws-positive-700:#28734d;--ws-positive-800:#28734d;--ws-positive-900:#0d261a;--ws-positive-950:#07130d;--ws-warning-50:#fff7e6;--ws-warning-100:#ffefcc;--ws-warning-300:#fed066;--ws-warning-400:#fdc133;--ws-warning-700:#986a00;--ws-warning-800:#654700;--ws-warning-900:#332300;--ws-warning-950:#191200;--ws-negative-50:#feeeee;--ws-negative-100:#fcdcdc;--ws-negative-300:#f69797;--ws-negative-400:#f37575;--ws-negative-700:#9a3232;--ws-negative-800:#6e2222;--ws-negative-900:#431212;--ws-negative-950:#2e0a0a;--ws-grey-300:#535353;--ws-grey-400:#484848;--ws-grey-600:#3f3f3f;--ws-palette-primary-200:#e0c7f5;--ws-palette-primary-500:#b174e5;--ws-palette-primary-700:#75499a;--ws-button-bg:var(--vscode-button-background,var(--theia-button-background,var(--ws-palette-primary-500)));--ws-button-fg:var(--vscode-button-foreground,var(--theia-button-foreground,var(--ws-palette-white)));--ws-primary-default:var(--ws-button-bg);--ws-button-text:var(--ws-button-fg);--ws-primary-hover:var(--vscode-button-hoverBackground,var(--theia-button-hoverBackground,var(--ws-palette-primary-700)));--ws-primary-light:var(--vscode-editorInfo-foreground,var(--vscode-button-background,var(--theia-button-secondaryForeground,var(--theia-button-background,var(--ws-palette-primary-200)))));--ws-primary-dark:var(--vscode-editor-lineHighlightBackground,var(--vscode-button-foreground,var(--theia-button-secondaryBackground,var(--theia-button-foreground,var(--ws-palette-primary-700)))));--ws-primary-200:var(--ws-primary-light);--ws-primary-500:var(--ws-primary-default);--ws-primary-700:var(--ws-primary-hover);--ws-palette-positive-200:#b3e6cc;--ws-palette-positive-500:#42c080;--ws-palette-positive-600:#359a66;--ws-positive-dark:var(--vscode-gitDecoration-addedResourceForeground,var(--ws-palette-positive-600));--ws-positive-hover:var(--ws-positive-dark);--ws-positive-bg:var(--ws-palette-positive-100);--ws-positive-light:var(--ws-palette-positive-200);--ws-positive-border:var(--ws-positive-500);--ws-positive-text:var(--ws-positive-500);--ws-positive-500:var(--vscode-testing-iconPassed,var(--ws-palette-positive-500));--ws-positive-200:var(--ws-positive-light);--ws-positive-600:var(--ws-positive-dark);--ws-palette-warning-200:#fee099;--ws-palette-warning-500:#fdb100;--ws-palette-warning-600:#ca8e00;--ws-warning-hover:var(--ws-warning-600);--ws-warning-text:var(--ws-warning-500);--ws-warning-border:var(--ws-warning-500);--ws-warning-500:var(--vscode-list-warningForeground,var(--ws-palette-warning-500));--ws-warning-bg:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-500));--ws-warning-light:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-200));--ws-warning-dark:var(--vscode-inputValidation-warningBackground,var(--ws-palette-warning-600));--ws-warning-200:var(--ws-warning-light);--ws-warning-600:var(--ws-warning-dark);--ws-palette-negative-200:#f9baba;--ws-palette-negative-500:#f05252;--ws-palette-negative-600:#c54242;--ws-negative-hover:var(--ws-negative-600);--ws-negative-text:var(--ws-negative-500);--ws-negative-500:var(--vscode-errorForeground,var(--ws-palette-negative-500));--ws-negative-light:var(--ws-palette-negative-200);--ws-negative-dark:var(--ws-palette-negative-600);--ws-negative-200:var(--ws-negative-light);--ws-negative-600:var(--ws-negative-dark);--ws-palette-white:#fff;--ws-palette-grey-50:#f1f5f9;--ws-palette-grey-100:#ccc;--ws-palette-grey-200:#888;--ws-palette-grey-300:#535353;--ws-palette-grey-400:#484848;--ws-palette-grey-500:#444;--ws-palette-grey-600:#3f3f3f;--ws-palette-grey-700:#393939;--ws-palette-grey-800:#383838;--ws-palette-grey-900:#262626;--ws-palette-grey-950:#151515;--ws-bg-default:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-white)));--ws-bg-foreground:var(--vscode-editor-foreground,var(--theia-editor-foreground,var(--ws-palette-grey-50)));--ws-grey-50:var(--ws-bg-foreground);--ws-grey-100:var(--vscode-panel-background,var(--theia-panel-background,var(--ws-palette-grey-100)));--ws-grey-200:var(--vscode-editor-background,var(--theia-editor-background,var(--ws-palette-grey-200)));--ws-grey-950:var(--vscode-panel-border,var(--theia-border-color,var(--ws-palette-grey-950)));--ws-grey-500:var(--vscode-descriptionForeground,var(--ws-palette-grey-500));--ws-grey-800:var(--vscode-descriptionForeground,var(--ws-palette-grey-800));--ws-card-bg:var(--vscode-editorGroupHeader-tabsBackground,var(--theia-editorGroupHeader-tabsBackground,var(--ws-palette-grey-900)));--ws-card-border:var(--vscode-editorGroupHeader-tabsBorder,var(--theia-editorGroupHeader-tabsBorder,var(--ws-palette-grey-50)));--ws-palette-input-bg:var(--ws-palette-grey-300);--ws-palette-input-border:var(--ws-palette-grey-300);--ws-palette-input-text:var(--ws-palette-grey-50);--ws-palette-input-placeholder:var(--ws-palette-grey-200);--ws-palette-input-focus-border:var(--ws-palette-grey-50);--ws-input-bg:var(--vscode-input-background,var(--vscode-editorWidget-background,var(--theia-input-background,var(--ws-palette-input-bg))));--ws-input-border:var(--vscode-input-border,var(--vscode-panel-border,var(--theia-input-border,var(--ws-palette-input-border))));--ws-input-text:var(--vscode-input-foreground,var(--vscode-editor-foreground,var(--theia-input-foreground,var(--ws-palette-input-text))));--ws-input-placeholder:var(--vscode-input-placeholderForeground,var(--vscode-editor-foreground,var(--theia-input-placeholderForeground,var(--ws-palette-input-placeholder))));--ws-input-focus-border:var(--vscode-focusBorder,var(--vscode-button-background,var(--theia-focusBorder,var(--ws-palette-primary-500))));--ws-select-bg:var(--vscode-dropdown-background,var(--vscode-editorWidget-background,var(--theia-dropdown-background,var(--ws-input-bg))));--ws-select-border:var(--vscode-dropdown-border,var(--vscode-panel-border,var(--theia-dropdown-border,var(--ws-input-border))));--ws-select-text:var(--vscode-dropdown-foreground,var(--vscode-editor-foreground,var(--theia-dropdown-foreground,var(--ws-input-text))));--ws-select-list-bg:var(--vscode-dropdown-listBackground,var(--vscode-editorWidget-background,var(--theia-editorWidget-background,var(--ws-palette-grey-900))));--ws-input-option-hover-bg:var(--vscode-list-hoverBackground,var(--vscode-button-hoverBackground,var(--theia-list-hoverBackground,var(--ws-palette-primary-700))));--ws-input-option-active-bg:var(--vscode-list-activeSelectionBackground,var(--theia-list-activeSelectionBackground,var(--ws-palette-primary-500)));--ws-input-option-active-text:var(--vscode-list-activeSelectionForeground,var(--theia-list-activeSelectionForeground,var(--ws-palette-white)));--ws-input-error-border:var(--vscode-inputValidation-errorBorder,var(--theia-inputValidation-errorBorder,var(--ws-palette-negative-500)));--ws-input-error-bg:var(--vscode-inputValidation-errorBackground,var(--theia-inputValidation-errorBackground,var(--ws-palette-negative-200)));--ws-input-warning-border:var(--vscode-inputValidation-warningBorder,var(--theia-inputValidation-warningBorder,var(--ws-palette-warning-500)));--ws-input-warning-bg:var(--vscode-inputValidation-warningBackground,var(--theia-inputValidation-warningBackground,var(--ws-palette-warning-200)));--ws-input-info-bg:var(--vscode-panel-background,var(--theia-inputValidation-infoBackground,var(--ws-palette-primary-200)));--ws-input-message-bg:var(--vscode-editor-lineHighlightBackground,var(--vscode-editorWidget-background,var(--theia-inputValidation-infoBackground,var(--ws-palette-primary-200))));--ws-input-message-text:var(--vscode-editorInfo-foreground,var(--vscode-editor-foreground,var(--theia-inputValidation-infoForeground,var(--ws-palette-primary-500))));--ws-inactive-text:var(--vscode-disabledForeground,var(--theia-disabled-foreground,var(--ws-palette-grey-200)));--ws-text-muted:var(--vscode-descriptionForeground,var(--vscode-editor-foreground,var(--theia-descriptionForeground,var(--ws-palette-grey-100))));--ws-disable-bg:var(--vscode-button-disabledBackground,var(--theia-button-disabledBackground,var(--ws-palette-grey-300)));--ws-disable-input:var(--vscode-button-disabledBackground,var(--theia-button-disabledBackground,var(--ws-palette-grey-200)));--ws-panel-base-ide:var(--vscode-editor-background,var(--theia-editor-background));--ws-panel-shift-ide:var(--vscode-editor-foreground,var(--theia-panel-foreground));--ws-panel-0-mix:var(--ws-panel-base-ide);--ws-panel-1-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-1-mix:color-mix(in srgb,var(--ws-panel-base-ide)96%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-2-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-2-mix:color-mix(in srgb,var(--ws-panel-base-ide)92%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-3-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-3-mix:color-mix(in srgb,var(--ws-panel-base-ide)88%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-4-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-4-mix:color-mix(in srgb,var(--ws-panel-base-ide)84%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-5-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-5-mix:color-mix(in srgb,var(--ws-panel-base-ide)80%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-light-mix:var(--ws-panel-base-ide)}@supports (color:color-mix(in lab,red,red)){:root:not(#\\#){--ws-panel-light-mix:color-mix(in srgb,var(--ws-panel-base-ide)70%,var(--ws-panel-shift-ide))}}:root:not(#\\#){--ws-panel-0:var(--ws-panel-0-mix,var(--ws-palette-grey-900));--ws-panel-1:var(--ws-panel-1-mix,var(--ws-palette-grey-700));--ws-panel-2:var(--ws-panel-2-mix,var(--ws-palette-grey-900));--ws-panel-3:var(--ws-panel-3-mix,var(--ws-palette-grey-900));--ws-panel-4:var(--ws-panel-4-mix,var(--ws-palette-grey-300));--ws-panel-5:var(--ws-panel-5-mix,var(--ws-palette-grey-950));--ws-panel-light:var(--ws-panel-light-mix,var(--ws-palette-grey-200));--ws-panel-border-subtle:var(--vscode-panel-border,var(--vscode-tab-border,var(--theia-border-color,var(--ws-palette-grey-100))));--ws-panel-border-strong:var(--vscode-contrastBorder,var(--vscode-focusBorder,var(--theia-contrastBorder,var(--ws-palette-grey-300))));--ws-tab-bg-default:var(--vscode-editorGroupHeader-tabsBackground,var(--vscode-editorWidget-background,var(--ws-palette-grey-900)));--ws-tab-border:var(--vscode-tab-border,var(--vscode-editorGroupHeader-tabsBorder,var(--ws-palette-grey-950)));--ws-tab-active-bg:var(--vscode-tab-activeBackground,var(--ws-palette-grey-800));--ws-tab-active-fg:var(--vscode-tab-activeForeground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-tab-inactive-bg:var(--vscode-tab-inactiveBackground,var(--ws-palette-grey-900));--ws-tab-inactive-fg:var(--vscode-tab-inactiveForeground,var(--vscode-descriptionForeground,var(--ws-palette-grey-200)));--ws-tab-hover-bg:var(--vscode-tab-hoverBackground,var(--vscode-toolbar-hoverBackground,var(--ws-palette-grey-700)));--ws-panel-header-bg:var(--vscode-sideBarSectionHeader-background,var(--vscode-editorGroupHeader-tabsBackground,var(--ws-palette-grey-800)));--ws-panel-header-fg:var(--vscode-sideBarSectionHeader-foreground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-panel-bg:var(--vscode-panel-background,var(--vscode-editor-background,var(--ws-bg-default)));--ws-panel-border:var(--vscode-panel-border,var(--vscode-tab-border,var(--ws-palette-grey-950)));--ws-panel-title-active-border:var(--vscode-panelTitle-activeBorder,var(--vscode-focusBorder,var(--ws-palette-primary-500)));--ws-panel-title-active-fg:var(--vscode-panelTitle-activeForeground,var(--vscode-editor-foreground,var(--ws-bg-foreground)));--ws-panel-title-inactive-fg:var(--vscode-panelTitle-inactiveForeground,var(--vscode-descriptionForeground,var(--ws-palette-grey-100)))}.center-absolute:not(#\\#){--tw-translate-x: -50% ;--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y);transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,);position:absolute;top:50%;left:50%}.ws-group:hover .ws-checkbox-hover-target{opacity:1!important}.simplebar-scrollbar:not(#\\#):before{background-color:#ccc}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}[data-simplebar]{position:relative;flex-direction:column;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:" ";display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging,[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:"";background:#000;border-radius:7px;left:2px;right:2px;opacity:0;transition:opacity .2s .5s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-scrollbar:before{top:2px;bottom:2px;left:2px;right:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:0;bottom:0;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.simplebar-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:scrollbar!important}.simplebar-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}
2
+ `,document.head.prepend(e)}catch(e){console.error("vite-plugin-inject-css: failed to inject css",e)}})();const JD=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"})}),wi=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"})}),gV=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"})}),mV=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"})}),QD=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"})}),fd=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"})}),ej=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"})}),tj=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"})]}),bV=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"})]}),yV=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"})}),rj=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"})}),nj=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"})]}),ij=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"})]}),oj=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"})]}),aj=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"})]}),sj=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"})]}),hd=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"})}),xV=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"})]}),on=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"})}),Sw=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"})]}),lj=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"})}),cj=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"})}),ja=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"})}),wV=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"})}),SV=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"})}),uj=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"})}),EV=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"})}),dj=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"})}),fj=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"})}),hj=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"})}),Tu=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"})}),pj=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"})}),_V=(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},OV=(e,t)=>({classGroupId:e,validator:t}),vj=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Pu="-",TO=[],CV="arbitrary..",IV=e=>{const t=NV(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return RV(i);const o=i.split(Pu),a=o[0]===""&&o.length>1?1:0;return gj(o,a,t)},getConflictingClassGroupIds:(i,o)=>{if(o){const a=n[i],s=r[i];return a?s?_V(s,a):a:s||TO}return r[i]||TO}}},gj=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],i=r.nextPart.get(n);if(i){const c=gj(e,t+1,i);if(c)return c}const o=r.validators;if(o===null)return;const a=t===0?e.join(Pu):e.slice(t).join(Pu),s=o.length;for(let c=0;c<s;c++){const u=o[c];if(u.validator(a))return u.classGroupId}},RV=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?CV+n:void 0})(),NV=e=>{const{theme:t,classGroups:r}=e;return TV(r,t)},TV=(e,t)=>{const r=vj();for(const n in e){const i=e[n];n1(i,r,n,t)}return r},n1=(e,t,r,n)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];PV(a,t,r,n)}},PV=(e,t,r,n)=>{if(typeof e=="string"){MV(e,t,r);return}if(typeof e=="function"){kV(e,t,r,n);return}AV(e,t,r,n)},MV=(e,t,r)=>{const n=e===""?t:mj(t,e);n.classGroupId=r},kV=(e,t,r,n)=>{if(DV(e)){n1(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(OV(r,e))},AV=(e,t,r,n)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[s,c]=i[a];n1(c,mj(t,s),r,n)}},mj=(e,t)=>{let r=e;const n=t.split(Pu),i=n.length;for(let o=0;o<i;o++){const a=n[o];let s=r.nextPart.get(a);s||(s=vj(),r.nextPart.set(a,s)),r=s}return r},DV=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jV=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)}}},Ew="!",PO=":",qV=[],MO=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),zV=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 g=i[m];if(a===0&&s===0){if(g===PO){o.push(i.slice(c,m)),c=m+1;continue}if(g==="/"){u=m;continue}}g==="["?a++:g==="]"?a--:g==="("?s++:g===")"&&s--}const h=o.length===0?i:i.slice(c);let p=h,v=!1;h.endsWith(Ew)?(p=h.slice(0,-1),v=!0):h.startsWith(Ew)&&(p=h.slice(1),v=!0);const y=u&&u>c?u-c:void 0;return MO(o,v,p,y)};if(t){const i=t+PO,o=n;n=a=>a.startsWith(i)?o(a.slice(i.length)):MO(qV,!1,a,void 0,!0)}if(r){const i=n;n=o=>r({className:o,parseClassName:i})}return n},LV=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}},BV=e=>({cache:jV(e.cacheSize),parseClassName:zV(e),sortModifiers:LV(e),...IV(e)}),FV=/\s+/,$V=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],s=e.trim().split(FV);let c="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:h,modifiers:p,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:m}=r(d);if(h){c=d+(c.length>0?" "+c:c);continue}let g=!!m,w=n(g?y.substring(0,m):y);if(!w){if(!g){c=d+(c.length>0?" "+c:c);continue}if(w=n(y),!w){c=d+(c.length>0?" "+c:c);continue}g=!1}const x=p.length===0?"":p.length===1?p[0]:o(p).join(":"),_=v?x+Ew:x,S=_+w;if(a.indexOf(S)>-1)continue;a.push(S);const E=i(w,g);for(let I=0;I<E.length;++I){const N=E[I];a.push(_+N)}c=d+(c.length>0?" "+c:c)}return c},VV=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=bj(r))&&(i&&(i+=" "),i+=n);return i},bj=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=bj(e[n]))&&(r&&(r+=" "),r+=t);return r},kO=(e,...t)=>{let r,n,i,o;const a=c=>{const u=t.reduce((d,h)=>h(d),e());return r=BV(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=$V(c,r);return i(c,d),d};return o=a,(...c)=>o(VV(...c))},HV=[],Xt=e=>{const t=r=>r[e]||HV;return t.isThemeGetter=!0,t},yj=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xj=/^\((?:(\w[\w-]*):)?(.+)\)$/i,WV=/^\d+\/\d+$/,UV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,GV=/\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$/,KV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,YV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,na=e=>WV.test(e),Ge=e=>!!e&&!Number.isNaN(Number(e)),Li=e=>!!e&&Number.isInteger(Number(e)),Rh=e=>e.endsWith("%")&&Ge(e.slice(0,-1)),bi=e=>UV.test(e),ZV=()=>!0,JV=e=>GV.test(e)&&!KV.test(e),wj=()=>!1,QV=e=>YV.test(e),eH=e=>XV.test(e),tH=e=>!Re(e)&&!Ne(e),rH=e=>qa(e,_j,wj),Re=e=>yj.test(e),vo=e=>qa(e,Oj,JV),Nh=e=>qa(e,sH,Ge),AO=e=>qa(e,Sj,wj),nH=e=>qa(e,Ej,eH),Pc=e=>qa(e,Cj,QV),Ne=e=>xj.test(e),xs=e=>za(e,Oj),iH=e=>za(e,lH),DO=e=>za(e,Sj),oH=e=>za(e,_j),aH=e=>za(e,Ej),Mc=e=>za(e,Cj,!0),qa=(e,t,r)=>{const n=yj.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},za=(e,t,r=!1)=>{const n=xj.exec(e);return n?n[1]?t(n[1]):r:!1},Sj=e=>e==="position"||e==="percentage",Ej=e=>e==="image"||e==="url",_j=e=>e==="length"||e==="size"||e==="bg-size",Oj=e=>e==="length",sH=e=>e==="number",lH=e=>e==="family-name",Cj=e=>e==="shadow",jO=()=>{const e=Xt("color"),t=Xt("font"),r=Xt("text"),n=Xt("font-weight"),i=Xt("tracking"),o=Xt("leading"),a=Xt("breakpoint"),s=Xt("container"),c=Xt("spacing"),u=Xt("radius"),d=Xt("shadow"),h=Xt("inset-shadow"),p=Xt("text-shadow"),v=Xt("drop-shadow"),y=Xt("blur"),m=Xt("perspective"),g=Xt("aspect"),w=Xt("ease"),x=Xt("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(),Ne,Re],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],T=()=>[Ne,Re,c],M=()=>[na,"full","auto",...T()],z=()=>[Li,"none","subgrid",Ne,Re],j=()=>["auto",{span:["full",Li,Ne,Re]},Li,Ne,Re],W=()=>[Li,"auto",Ne,Re],U=()=>["auto","min","max","fr",Ne,Re],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...T()],te=()=>[na,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],G=()=>[e,Ne,Re],re=()=>[...S(),DO,AO,{position:[Ne,Re]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",oH,rH,{size:[Ne,Re]}],X=()=>[Rh,xs,vo],Q=()=>["","none","full",u,Ne,Re],D=()=>["",Ge,xs,vo],$=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[Ge,Rh,DO,AO],Y=()=>["","none",y,Ne,Re],ie=()=>["none",Ge,Ne,Re],ne=()=>["none",Ge,Ne,Re],pe=()=>[Ge,Ne,Re],Z=()=>[na,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bi],breakpoint:[bi],color:[ZV],container:[bi],"drop-shadow":[bi],ease:["in","out","in-out"],font:[tH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bi],shadow:[bi],spacing:["px",Ge],text:[bi],"text-shadow":[bi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",na,Re,Ne,g]}],container:["container"],columns:[{columns:[Ge,Re,Ne,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:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[Li,"auto",Ne,Re]}],basis:[{basis:[na,"full","auto",s,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ge,na,"auto","initial","none",Re]}],grow:[{grow:["",Ge,Ne,Re]}],shrink:[{shrink:["",Ge,Ne,Re]}],order:[{order:[Li,"first","last","none",Ne,Re]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"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:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:te()}],w:[{w:[s,"screen",...te()]}],"min-w":[{"min-w":[s,"screen","none",...te()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...te()]}],h:[{h:["screen","lh",...te()]}],"min-h":[{"min-h":["screen","lh","none",...te()]}],"max-h":[{"max-h":["screen","lh",...te()]}],"font-size":[{text:["base",r,xs,vo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ne,Nh]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rh,Re]}],"font-family":[{font:[iH,Re,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,Ne,Re]}],"line-clamp":[{"line-clamp":[Ge,"none",Ne,Nh]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Ne,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ne,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ge,"from-font","auto",Ne,vo]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Ge,"auto",Ne,Re]}],"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",Ne,Re]}],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",Ne,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Li,Ne,Re],radial:["",Ne,Re],conic:[Li,Ne,Re]},aH,nH]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:X()}],"gradient-via-pos":[{via:X()}],"gradient-to-pos":[{to:X()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...$(),"hidden","none"]}],"divide-style":[{divide:[...$(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...$(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ge,Ne,Re]}],"outline-w":[{outline:["",Ge,xs,vo]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",d,Mc,Pc]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",h,Mc,Pc]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Ge,vo]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",p,Mc,Pc]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Ge,Ne,Re]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"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":[Ge]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[Ne,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"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":[Ge]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ne,Re]}],filter:[{filter:["","none",Ne,Re]}],blur:[{blur:Y()}],brightness:[{brightness:[Ge,Ne,Re]}],contrast:[{contrast:[Ge,Ne,Re]}],"drop-shadow":[{"drop-shadow":["","none",v,Mc,Pc]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Ge,Ne,Re]}],"hue-rotate":[{"hue-rotate":[Ge,Ne,Re]}],invert:[{invert:["",Ge,Ne,Re]}],saturate:[{saturate:[Ge,Ne,Re]}],sepia:[{sepia:["",Ge,Ne,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",Ne,Re]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[Ge,Ne,Re]}],"backdrop-contrast":[{"backdrop-contrast":[Ge,Ne,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ge,Ne,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ge,Ne,Re]}],"backdrop-invert":[{"backdrop-invert":["",Ge,Ne,Re]}],"backdrop-opacity":[{"backdrop-opacity":[Ge,Ne,Re]}],"backdrop-saturate":[{"backdrop-saturate":[Ge,Ne,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ge,Ne,Re]}],"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",Ne,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ge,"initial",Ne,Re]}],ease:[{ease:["linear","initial",w,Ne,Re]}],delay:[{delay:[Ge,Ne,Re]}],animate:[{animate:["none",x,Ne,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Ne,Re]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[Ne,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"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",Ne,Re]}],"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",Ne,Re]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[Ge,xs,vo,Nh]}],stroke:[{stroke:["none",...G()]}],"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"]}},cH=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:i={},override:o={}})=>(Vs(e,"cacheSize",t),Vs(e,"prefix",r),Vs(e,"experimentalParseClassName",n),kc(e.theme,o.theme),kc(e.classGroups,o.classGroups),kc(e.conflictingClassGroups,o.conflictingClassGroups),kc(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Vs(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Ac(e.theme,i.theme),Ac(e.classGroups,i.classGroups),Ac(e.conflictingClassGroups,i.conflictingClassGroups),Ac(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Ij(e,i,"orderSensitiveModifiers"),e),Vs=(e,t,r)=>{r!==void 0&&(e[t]=r)},kc=(e,t)=>{if(t)for(const r in t)Vs(e,r,t[r])},Ac=(e,t)=>{if(t)for(const r in t)Ij(e,t,r)},Ij=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},uH=(e,...t)=>typeof e=="function"?kO(jO,e,...t):kO(()=>cH(jO(),e),...t);function Rj(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qO={exports:{}};/*!
2
3
  Copyright (c) 2018 Jed Watson.
3
4
  Licensed under the MIT License (MIT), see
4
5
  http://jedwatson.github.io/classnames
5
- */var c1;function KH(){return c1||(c1=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})()})(id)),id.exports}var YH=KH();const We=Gn(YH);function XH({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return O.jsx(O.Fragment,{children:O.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: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.jsx("span",{className:"inline-block whitespace-nowrap text-sm leading-relaxed text-white",children:O.jsxs("div",{className:"flex items-center justify-center",children:[O.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"}),O.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"})]})}),O.jsxs("div",{className:"flex gap-2 justify-between",children:[O.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap",children:[O.jsx(ae.ControlledSwitch,{size:"sm",value:i||!1,onChange:u=>{o(u)}}),O.jsx("span",{className:"px-1 text-xs text-white",children:"Restrict Access By Default"}),O.jsx(ae.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(ae.ControlledSwitch,{size:"sm",value:r||!1,onChange:u=>{a(u)}}),O.jsx("span",{className:"px-1 text-xs text-white",children:"Force login"}),O.jsx(ae.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const XD=P.createContext(void 0),ZH=({children:e})=>{const[t,r]=P.useState(null),[n,i]=P.useState(null);function o(u){r(u),setTimeout(()=>i(u),0)}const a={selectedRole:t,deferredSelectedRole:n,selectRole:o};return O.jsx(XD.Provider,{value:a,children:e})};function yx(){const e=P.useContext(XD);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var f1=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},d1=typeof window<"u"&&window.document&&window.document.createElement?ce.useLayoutEffect:ce.useEffect,Kt="top",Sr="bottom",Or="right",Yt="left",bx="auto",Ya=[Kt,Sr,Or,Yt],xo="start",Fa="end",JH="clippingParents",ZD="viewport",aa="popper",QH="reference",h1=Ya.reduce(function(e,t){return e.concat([t+"-"+xo,t+"-"+Fa])},[]),JD=[].concat(Ya,[bx]).reduce(function(e,t){return e.concat([t,t+"-"+xo,t+"-"+Fa])},[]),e4="beforeRead",t4="read",r4="afterRead",n4="beforeMain",i4="main",o4="afterMain",a4="beforeWrite",s4="write",u4="afterWrite",l4=[e4,t4,r4,n4,i4,o4,a4,s4,u4];function on(e){return e?(e.nodeName||"").toLowerCase():null}function lr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ei(e){var t=lr(e).Element;return e instanceof t||e instanceof Element}function Er(e){var t=lr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xx(e){if(typeof ShadowRoot>"u")return!1;var t=lr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function c4(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)||!on(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 f4(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)||!on(i)||(Object.assign(i.style,u),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const d4={name:"applyStyles",enabled:!0,phase:"write",fn:c4,effect:f4,requires:["computeStyles"]};function en(e){return e.split("-")[0]}var gi=Math.max,Wu=Math.min,wo=Math.round;function F0(){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 QD(){return!/^((?!chrome|android).)*safari/i.test(F0())}function _o(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&&wo(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&wo(n.height)/e.offsetHeight||1);var a=Ei(e)?lr(e):window,u=a.visualViewport,l=!QD()&&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 wx(e){var t=_o(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 ej(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&xx(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function wn(e){return lr(e).getComputedStyle(e)}function h4(e){return["table","td","th"].indexOf(on(e))>=0}function Kn(e){return((Ei(e)?e.ownerDocument:e.document)||window.document).documentElement}function El(e){return on(e)==="html"?e:e.assignedSlot||e.parentNode||(xx(e)?e.host:null)||Kn(e)}function p1(e){return!Er(e)||wn(e).position==="fixed"?null:e.offsetParent}function p4(e){var t=/firefox/i.test(F0()),r=/Trident/i.test(F0());if(r&&Er(e)){var n=wn(e);if(n.position==="fixed")return null}var i=El(e);for(xx(i)&&(i=i.host);Er(i)&&["html","body"].indexOf(on(i))<0;){var o=wn(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 Xa(e){for(var t=lr(e),r=p1(e);r&&h4(r)&&wn(r).position==="static";)r=p1(r);return r&&(on(r)==="html"||on(r)==="body"&&wn(r).position==="static")?t:r||p4(e)||t}function _x(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Da(e,t,r){return gi(e,Wu(t,r))}function v4(e,t,r){var n=Da(e,t,r);return n>r?r:n}function tj(){return{top:0,right:0,bottom:0,left:0}}function rj(e){return Object.assign({},tj(),e)}function nj(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var g4=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,rj(typeof t!="number"?t:nj(t,Ya))};function m4(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=_x(u),d=[Yt,Or].indexOf(u)>=0,f=d?"height":"width";if(!(!o||!a)){var h=g4(i.padding,r),p=wx(o),v=l==="y"?Kt:Yt,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=Xa(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=Da(_,R,S),N=l;r.modifiersData[n]=(t={},t[N]=I,t.centerOffset=I-R,t)}}function y4(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)||ej(t.elements.popper,i)&&(t.elements.arrow=i))}const b4={name:"arrow",enabled:!0,phase:"main",fn:m4,effect:y4,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Eo(e){return e.split("-")[1]}var x4={top:"auto",right:"auto",bottom:"auto",left:"auto"};function w4(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:wo(r*i)/i||0,y:wo(n*i)/i||0}}function v1(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=Yt,_=Kt,S=window;if(d){var R=Xa(r),I="clientHeight",N="clientWidth";if(R===lr(r)&&(R=Kn(r),wn(R).position!=="static"&&u==="absolute"&&(I="scrollHeight",N="scrollWidth")),R=R,i===Kt||(i===Yt||i===Or)&&o===Fa){_=Sr;var A=h&&R===S&&S.visualViewport?S.visualViewport.height:R[I];y-=A-n.height,y*=l?1:-1}if(i===Yt||(i===Kt||i===Sr)&&o===Fa){E=Or;var k=h&&R===S&&S.visualViewport?S.visualViewport.width:R[N];v-=k-n.width,v*=l?1:-1}}var L=Object.assign({position:u},d&&x4),$=f===!0?w4({x:v,y},lr(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 _4(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:Eo(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,v1(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,v1(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 E4={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_4,data:{}};var lu={passive:!0};function S4(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=lr(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(f){f.addEventListener("scroll",r.update,lu)}),u&&l.addEventListener("resize",r.update,lu),function(){o&&d.forEach(function(f){f.removeEventListener("scroll",r.update,lu)}),u&&l.removeEventListener("resize",r.update,lu)}}const O4={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:S4,data:{}};var C4={left:"right",right:"left",bottom:"top",top:"bottom"};function ju(e){return e.replace(/left|right|bottom|top/g,function(t){return C4[t]})}var R4={start:"end",end:"start"};function g1(e){return e.replace(/start|end/g,function(t){return R4[t]})}function Ex(e){var t=lr(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Sx(e){return _o(Kn(e)).left+Ex(e).scrollLeft}function I4(e,t){var r=lr(e),n=Kn(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,u=0,l=0;if(i){o=i.width,a=i.height;var d=QD();(d||!d&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:u+Sx(e),y:l}}function P4(e){var t,r=Kn(e),n=Ex(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=gi(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=gi(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-n.scrollLeft+Sx(e),l=-n.scrollTop;return wn(i||r).direction==="rtl"&&(u+=gi(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:u,y:l}}function Ox(e){var t=wn(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function ij(e){return["html","body","#document"].indexOf(on(e))>=0?e.ownerDocument.body:Er(e)&&Ox(e)?e:ij(El(e))}function ja(e,t){var r;t===void 0&&(t=[]);var n=ij(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=lr(n),a=i?[o].concat(o.visualViewport||[],Ox(n)?n:[]):n,u=t.concat(a);return i?u:u.concat(ja(El(a)))}function B0(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function T4(e,t){var r=_o(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 m1(e,t,r){return t===ZD?B0(I4(e,r)):Ei(t)?T4(t,r):B0(P4(Kn(e)))}function N4(e){var t=ja(El(e)),r=["absolute","fixed"].indexOf(wn(e).position)>=0,n=r&&Er(e)?Xa(e):e;return Ei(n)?t.filter(function(i){return Ei(i)&&ej(i,n)&&on(i)!=="body"}):[]}function A4(e,t,r,n){var i=t==="clippingParents"?N4(e):[].concat(t),o=[].concat(i,[r]),a=o[0],u=o.reduce(function(l,d){var f=m1(e,d,n);return l.top=gi(f.top,l.top),l.right=Wu(f.right,l.right),l.bottom=Wu(f.bottom,l.bottom),l.left=gi(f.left,l.left),l},m1(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 oj(e){var t=e.reference,r=e.element,n=e.placement,i=n?en(n):null,o=n?Eo(n):null,a=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,l;switch(i){case Kt: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 Yt:l={x:t.x-r.width,y:u};break;default:l={x:t.x,y:t.y}}var d=i?_x(i):null;if(d!=null){var f=d==="y"?"height":"width";switch(o){case xo:l[d]=l[d]-(t[f]/2-r[f]/2);break;case Fa: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?JH:u,d=r.rootBoundary,f=d===void 0?ZD:d,h=r.elementContext,p=h===void 0?aa:h,v=r.altBoundary,m=v===void 0?!1:v,y=r.padding,x=y===void 0?0:y,b=rj(typeof x!="number"?x:nj(x,Ya)),w=p===aa?QH:aa,E=e.rects.popper,_=e.elements[m?w:p],S=A4(Ei(_)?_:_.contextElement||Kn(e.elements.popper),l,f,a),R=_o(e.elements.reference),I=oj({reference:R,element:E,placement:i}),N=B0(Object.assign({},E,I)),A=p===aa?N: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===aa&&L){var $=L[i];Object.keys(k).forEach(function(j){var D=[Or,Sr].indexOf(j)>=0?1:-1,W=[Kt,Sr].indexOf(j)>=0?"y":"x";k[j]+=$[W]*D})}return k}function M4(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?JD:l,f=Eo(n),h=f?u?h1:h1.filter(function(m){return Eo(m)===f}):Ya,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 D4(e){if(en(e)===bx)return[];var t=ju(e);return[g1(e),t,g1(t)]}function j4(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?[ju(x)]:D4(x)),_=[x].concat(E).reduce(function(B,V){return B.concat(en(V)===bx?M4(t,{placement:V,boundary:f,rootBoundary:h,padding:d,flipVariations:m,allowedAutoPlacements:y}):V)},[]),S=t.rects.reference,R=t.rects.popper,I=new Map,N=!0,A=_[0],k=0;k<_.length;k++){var L=_[k],$=en(L),j=Eo(L)===xo,D=[Kt,Sr].indexOf($)>=0,W=D?"width":"height",F=Ba(t,{placement:L,boundary:f,rootBoundary:h,altBoundary:p,padding:d}),X=D?j?Or:Yt:j?Sr:Kt;S[W]>R[W]&&(X=ju(X));var Z=ju(X),Q=[];if(o&&Q.push(F[$]<=0),u&&Q.push(F[X]<=0,F[Z]<=0),Q.every(function(B){return B})){A=L,N=!1;break}I.set(L,Q)}if(N)for(var U=m?3:1,ee=function(V){var J=_.find(function(H){var G=I.get(H);if(G)return G.slice(0,V).every(function(se){return se})});if(J)return A=J,"break"},ie=U;ie>0;ie--){var ue=ee(ie);if(ue==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const q4={name:"flip",enabled:!0,phase:"main",fn:j4,requiresIfExists:["offset"],data:{_skip:!1}};function y1(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 b1(e){return[Kt,Or,Sr,Yt].some(function(t){return e[t]>=0})}function k4(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=y1(a,n),d=y1(u,i,o),f=b1(l),h=b1(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 L4={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:k4};function F4(e,t,r){var n=en(e),i=[Yt,Kt].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,[Yt,Or].indexOf(n)>=0?{x:u,y:a}:{x:a,y:u}}function B4(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=JD.reduce(function(f,h){return f[h]=F4(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 $4={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:B4};function z4(e){var t=e.state,r=e.name;t.modifiersData[r]=oj({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const H4={name:"popperOffsets",enabled:!0,phase:"read",fn:z4,data:{}};function U4(e){return e==="x"?"y":"x"}function V4(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=Eo(t.placement),E=!w,_=_x(b),S=U4(_),R=t.modifiersData.popperOffsets,I=t.rects.reference,N=t.rects.popper,A=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,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"?Kt:Yt,W=_==="y"?Sr:Or,F=_==="y"?"height":"width",X=R[_],Z=X+x[D],Q=X-x[W],U=v?-N[F]/2:0,ee=w===xo?I[F]:N[F],ie=w===xo?-N[F]:-I[F],ue=t.elements.arrow,B=v&&ue?wx(ue):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:tj(),J=V[D],H=V[W],G=Da(0,I[F],B[F]),se=E?I[F]/2-U-G-J-k.mainAxis:ee-G-J-k.mainAxis,oe=E?-I[F]/2+U+G+H+k.mainAxis:ie+G+H+k.mainAxis,fe=t.elements.arrow&&Xa(t.elements.arrow),ne=fe?_==="y"?fe.clientTop||0:fe.clientLeft||0:0,K=(j=L==null?void 0:L[_])!=null?j:0,he=X+se-K-ne,be=X+oe-K,pe=Da(v?Wu(Z,he):Z,X,v?gi(Q,be):Q);R[_]=pe,$[_]=pe-X}if(u){var de,_e=_==="x"?Kt:Yt,Re=_==="x"?Sr:Or,Ze=R[S],ze=S==="y"?"height":"width",Fe=Ze+x[_e],Ue=Ze-x[Re],lt=[Kt,Yt].indexOf(b)!==-1,ct=(de=L==null?void 0:L[S])!=null?de:0,mt=lt?Fe:Ze-I[ze]-N[ze]-ct+k.altAxis,yt=lt?Ze+I[ze]+N[ze]-ct-k.altAxis:Ue,rt=v&&lt?v4(mt,Ze,yt):Da(v?mt:Fe,Ze,v?yt:Ue);R[S]=rt,$[S]=rt-Ze}t.modifiersData[n]=$}}const W4={name:"preventOverflow",enabled:!0,phase:"main",fn:V4,requiresIfExists:["offset"]};function G4(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function K4(e){return e===lr(e)||!Er(e)?Ex(e):G4(e)}function Y4(e){var t=e.getBoundingClientRect(),r=wo(t.width)/e.offsetWidth||1,n=wo(t.height)/e.offsetHeight||1;return r!==1||n!==1}function X4(e,t,r){r===void 0&&(r=!1);var n=Er(t),i=Er(t)&&Y4(t),o=Kn(t),a=_o(e,i,r),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((on(t)!=="body"||Ox(o))&&(u=K4(t)),Er(t)?(l=_o(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Sx(o))),{x:a.left+u.scrollLeft-l.x,y:a.top+u.scrollTop-l.y,width:a.width,height:a.height}}function Z4(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 J4(e){var t=Z4(e);return l4.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function Q4(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function eU(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 x1={placement:"bottom",modifiers:[],strategy:"absolute"};function w1(){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 tU(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?x1:i;return function(u,l,d){d===void 0&&(d=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},x1,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:Ei(u)?ja(u):u.contextElement?ja(u.contextElement):[],popper:ja(l)};var E=J4(eU([].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(w1(w,E)){f.rects={reference:X4(w,Xa(E),f.options.strategy==="fixed"),popper:wx(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,N=I===void 0?{}:I,A=S.name;typeof R=="function"&&(f=R({state:f,options:N,name:A,instance:v})||f)}}}},update:Q4(function(){return new Promise(function(x){v.forceUpdate(),x(f)})}),destroy:function(){y(),p=!0}};if(!w1(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 rU=[O4,H4,E4,d4,$4,q4,W4,b4,L4],nU=tU({defaultModifiers:rU}),od,_1;function iU(){if(_1)return od;_1=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 od=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}},od}var oU=iU();const aU=Gn(oU);var sU=[],Sl=function(t,r,n){n===void 0&&(n={});var i=ce.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||sU},a=ce.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),u=a[0],l=a[1],d=ce.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var m=v.state,y=Object.keys(m.elements);mx.flushSync(function(){l({styles:f1(y.map(function(x){return[x,m.styles[x]||{}]})),attributes:f1(y.map(function(x){return[x,m.attributes[x]]}))})})},requires:["computeStyles"]}},[]),f=ce.useMemo(function(){var p={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[d,{name:"applyStyles",enabled:!1}])};return aU(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,d]),h=ce.useRef();return d1(function(){h.current&&h.current.setOptions(f)},[f]),d1(function(){if(!(t==null||r==null)){var p=n.createPopper||nU,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 aj=({tab:e})=>O.jsx("div",{className:"flex flex-1 items-center justify-center border-l-[0.5px] border-grey-900 bg-grey-800",children:O.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[O.jsx(we.FdInfoBold,{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 Cx(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 ad,E1;function uU(){if(E1)return ad;E1=1;function e(){this.__data__=[],this.size=0}return ad=e,ad}var sd,S1;function Io(){if(S1)return sd;S1=1;function e(t,r){return t===r||t!==t&&r!==r}return sd=e,sd}var ud,O1;function Ol(){if(O1)return ud;O1=1;var e=Io();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return ud=t,ud}var ld,C1;function lU(){if(C1)return ld;C1=1;var e=Ol(),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 ld=n,ld}var cd,R1;function cU(){if(R1)return cd;R1=1;var e=Ol();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return cd=t,cd}var fd,I1;function fU(){if(I1)return fd;I1=1;var e=Ol();function t(r){return e(this.__data__,r)>-1}return fd=t,fd}var dd,P1;function dU(){if(P1)return dd;P1=1;var e=Ol();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 dd=t,dd}var hd,T1;function Cl(){if(T1)return hd;T1=1;var e=uU(),t=lU(),r=cU(),n=fU(),i=dU();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,hd=o,hd}var pd,N1;function hU(){if(N1)return pd;N1=1;var e=Cl();function t(){this.__data__=new e,this.size=0}return pd=t,pd}var vd,A1;function pU(){if(A1)return vd;A1=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return vd=e,vd}var gd,M1;function vU(){if(M1)return gd;M1=1;function e(t){return this.__data__.get(t)}return gd=e,gd}var md,D1;function gU(){if(D1)return md;D1=1;function e(t){return this.__data__.has(t)}return md=e,md}var yd,j1;function sj(){if(j1)return yd;j1=1;var e=typeof ht=="object"&&ht&&ht.Object===Object&&ht;return yd=e,yd}var bd,q1;function Hr(){if(q1)return bd;q1=1;var e=sj(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return bd=r,bd}var xd,k1;function Po(){if(k1)return xd;k1=1;var e=Hr(),t=e.Symbol;return xd=t,xd}var wd,L1;function mU(){if(L1)return wd;L1=1;var e=Po(),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 wd=o,wd}var _d,F1;function yU(){if(F1)return _d;F1=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return _d=r,_d}var Ed,B1;function Pi(){if(B1)return Ed;B1=1;var e=Po(),t=mU(),r=yU(),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 Ed=a,Ed}var Sd,$1;function Cr(){if($1)return Sd;$1=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Sd=e,Sd}var Od,z1;function Za(){if(z1)return Od;z1=1;var e=Pi(),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 Od=a,Od}var Cd,H1;function bU(){if(H1)return Cd;H1=1;var e=Hr(),t=e["__core-js_shared__"];return Cd=t,Cd}var Rd,U1;function xU(){if(U1)return Rd;U1=1;var e=bU(),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 Rd=r,Rd}var Id,V1;function uj(){if(V1)return Id;V1=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 Id=r,Id}var Pd,W1;function wU(){if(W1)return Pd;W1=1;var e=Za(),t=xU(),r=Cr(),n=uj(),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 Pd=h,Pd}var Td,G1;function _U(){if(G1)return Td;G1=1;function e(t,r){return t==null?void 0:t[r]}return Td=e,Td}var Nd,K1;function Ti(){if(K1)return Nd;K1=1;var e=wU(),t=_U();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return Nd=r,Nd}var Ad,Y1;function Rx(){if(Y1)return Ad;Y1=1;var e=Ti(),t=Hr(),r=e(t,"Map");return Ad=r,Ad}var Md,X1;function Rl(){if(X1)return Md;X1=1;var e=Ti(),t=e(Object,"create");return Md=t,Md}var Dd,Z1;function EU(){if(Z1)return Dd;Z1=1;var e=Rl();function t(){this.__data__=e?e(null):{},this.size=0}return Dd=t,Dd}var jd,J1;function SU(){if(J1)return jd;J1=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return jd=e,jd}var qd,Q1;function OU(){if(Q1)return qd;Q1=1;var e=Rl(),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 qd=i,qd}var kd,eS;function CU(){if(eS)return kd;eS=1;var e=Rl(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return kd=n,kd}var Ld,tS;function RU(){if(tS)return Ld;tS=1;var e=Rl(),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 Ld=r,Ld}var Fd,rS;function IU(){if(rS)return Fd;rS=1;var e=EU(),t=SU(),r=OU(),n=CU(),i=RU();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,Fd=o,Fd}var Bd,nS;function PU(){if(nS)return Bd;nS=1;var e=IU(),t=Cl(),r=Rx();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Bd=n,Bd}var $d,iS;function TU(){if(iS)return $d;iS=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return $d=e,$d}var zd,oS;function Il(){if(oS)return zd;oS=1;var e=TU();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return zd=t,zd}var Hd,aS;function NU(){if(aS)return Hd;aS=1;var e=Il();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Hd=t,Hd}var Ud,sS;function AU(){if(sS)return Ud;sS=1;var e=Il();function t(r){return e(this,r).get(r)}return Ud=t,Ud}var Vd,uS;function MU(){if(uS)return Vd;uS=1;var e=Il();function t(r){return e(this,r).has(r)}return Vd=t,Vd}var Wd,lS;function DU(){if(lS)return Wd;lS=1;var e=Il();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 Wd=t,Wd}var Gd,cS;function Ix(){if(cS)return Gd;cS=1;var e=PU(),t=NU(),r=AU(),n=MU(),i=DU();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,Gd=o,Gd}var Kd,fS;function jU(){if(fS)return Kd;fS=1;var e=Cl(),t=Rx(),r=Ix(),n=200;function i(o,a){var u=this.__data__;if(u instanceof e){var l=u.__data__;if(!t||l.length<n-1)return l.push([o,a]),this.size=++u.size,this;u=this.__data__=new r(l)}return u.set(o,a),this.size=u.size,this}return Kd=i,Kd}var Yd,dS;function Pl(){if(dS)return Yd;dS=1;var e=Cl(),t=hU(),r=pU(),n=vU(),i=gU(),o=jU();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,Yd=a,Yd}var Xd,hS;function Px(){if(hS)return Xd;hS=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 Xd=e,Xd}var Zd,pS;function lj(){if(pS)return Zd;pS=1;var e=Ti(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Zd=t,Zd}var Jd,vS;function Tl(){if(vS)return Jd;vS=1;var e=lj();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Jd=t,Jd}var Qd,gS;function Nl(){if(gS)return Qd;gS=1;var e=Tl(),t=Io(),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 Qd=i,Qd}var eh,mS;function Ja(){if(mS)return eh;mS=1;var e=Nl(),t=Tl();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 eh=r,eh}var th,yS;function qU(){if(yS)return th;yS=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return th=e,th}var rh,bS;function an(){if(bS)return rh;bS=1;function e(t){return t!=null&&typeof t=="object"}return rh=e,rh}var nh,xS;function kU(){if(xS)return nh;xS=1;var e=Pi(),t=an(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return nh=n,nh}var ih,wS;function Qa(){if(wS)return ih;wS=1;var e=kU(),t=an(),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 ih=o,ih}var oh,_S;function xt(){if(_S)return oh;_S=1;var e=Array.isArray;return oh=e,oh}var Ra={exports:{}},ah,ES;function LU(){if(ES)return ah;ES=1;function e(){return!1}return ah=e,ah}Ra.exports;var SS;function To(){return SS||(SS=1,(function(e,t){var r=Hr(),n=LU(),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})(Ra,Ra.exports)),Ra.exports}var sh,OS;function Al(){if(OS)return sh;OS=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 sh=r,sh}var uh,CS;function Tx(){if(CS)return uh;CS=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return uh=t,uh}var lh,RS;function FU(){if(RS)return lh;RS=1;var e=Pi(),t=Tx(),r=an(),n="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",u="[object Error]",l="[object Function]",d="[object Map]",f="[object Number]",h="[object Object]",p="[object RegExp]",v="[object Set]",m="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",E="[object Float64Array]",_="[object Int8Array]",S="[object Int16Array]",R="[object Int32Array]",I="[object Uint8Array]",N="[object Uint8ClampedArray]",A="[object Uint16Array]",k="[object Uint32Array]",L={};L[w]=L[E]=L[_]=L[S]=L[R]=L[I]=L[N]=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 lh=$,lh}var ch,IS;function Ml(){if(IS)return ch;IS=1;function e(t){return function(r){return t(r)}}return ch=e,ch}var Ia={exports:{}};Ia.exports;var PS;function Nx(){return PS||(PS=1,(function(e,t){var r=sj(),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})(Ia,Ia.exports)),Ia.exports}var fh,TS;function es(){if(TS)return fh;TS=1;var e=FU(),t=Ml(),r=Nx(),n=r&&r.isTypedArray,i=n?t(n):e;return fh=i,fh}var dh,NS;function cj(){if(NS)return dh;NS=1;var e=qU(),t=Qa(),r=xt(),n=To(),i=Al(),o=es(),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 dh=l,dh}var hh,AS;function Dl(){if(AS)return hh;AS=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return hh=t,hh}var ph,MS;function fj(){if(MS)return ph;MS=1;function e(t,r){return function(n){return t(r(n))}}return ph=e,ph}var vh,DS;function BU(){if(DS)return vh;DS=1;var e=fj(),t=e(Object.keys,Object);return vh=t,vh}var gh,jS;function Ax(){if(jS)return gh;jS=1;var e=Dl(),t=BU(),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 gh=i,gh}var mh,qS;function On(){if(qS)return mh;qS=1;var e=Za(),t=Tx();function r(n){return n!=null&&t(n.length)&&!e(n)}return mh=r,mh}var yh,kS;function Yn(){if(kS)return yh;kS=1;var e=cj(),t=Ax(),r=On();function n(i){return r(i)?e(i):t(i)}return yh=n,yh}var bh,LS;function $U(){if(LS)return bh;LS=1;var e=Ja(),t=Yn();function r(n,i){return n&&e(i,t(i),n)}return bh=r,bh}var xh,FS;function zU(){if(FS)return xh;FS=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return xh=e,xh}var wh,BS;function HU(){if(BS)return wh;BS=1;var e=Cr(),t=Dl(),r=zU(),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 wh=o,wh}var _h,$S;function Ni(){if($S)return _h;$S=1;var e=cj(),t=HU(),r=On();function n(i){return r(i)?e(i,!0):t(i)}return _h=n,_h}var Eh,zS;function UU(){if(zS)return Eh;zS=1;var e=Ja(),t=Ni();function r(n,i){return n&&e(i,t(i),n)}return Eh=r,Eh}var Pa={exports:{}};Pa.exports;var HS;function dj(){return HS||(HS=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})(Pa,Pa.exports)),Pa.exports}var Sh,US;function hj(){if(US)return Sh;US=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 Sh=e,Sh}var Oh,VS;function pj(){if(VS)return Oh;VS=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 Oh=e,Oh}var Ch,WS;function vj(){if(WS)return Ch;WS=1;function e(){return[]}return Ch=e,Ch}var Rh,GS;function Mx(){if(GS)return Rh;GS=1;var e=pj(),t=vj(),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 Rh=o,Rh}var Ih,KS;function VU(){if(KS)return Ih;KS=1;var e=Ja(),t=Mx();function r(n,i){return e(n,t(n),i)}return Ih=r,Ih}var Ph,YS;function Dx(){if(YS)return Ph;YS=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 Ph=e,Ph}var Th,XS;function jl(){if(XS)return Th;XS=1;var e=fj(),t=e(Object.getPrototypeOf,Object);return Th=t,Th}var Nh,ZS;function gj(){if(ZS)return Nh;ZS=1;var e=Dx(),t=jl(),r=Mx(),n=vj(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var u=[];a;)e(u,r(a)),a=t(a);return u}:n;return Nh=o,Nh}var Ah,JS;function WU(){if(JS)return Ah;JS=1;var e=Ja(),t=gj();function r(n,i){return e(n,t(n),i)}return Ah=r,Ah}var Mh,QS;function mj(){if(QS)return Mh;QS=1;var e=Dx(),t=xt();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return Mh=r,Mh}var Dh,eO;function yj(){if(eO)return Dh;eO=1;var e=mj(),t=Mx(),r=Yn();function n(i){return e(i,r,t)}return Dh=n,Dh}var jh,tO;function GU(){if(tO)return jh;tO=1;var e=mj(),t=gj(),r=Ni();function n(i){return e(i,r,t)}return jh=n,jh}var qh,rO;function KU(){if(rO)return qh;rO=1;var e=Ti(),t=Hr(),r=e(t,"DataView");return qh=r,qh}var kh,nO;function YU(){if(nO)return kh;nO=1;var e=Ti(),t=Hr(),r=e(t,"Promise");return kh=r,kh}var Lh,iO;function bj(){if(iO)return Lh;iO=1;var e=Ti(),t=Hr(),r=e(t,"Set");return Lh=r,Lh}var Fh,oO;function XU(){if(oO)return Fh;oO=1;var e=Ti(),t=Hr(),r=e(t,"WeakMap");return Fh=r,Fh}var Bh,aO;function No(){if(aO)return Bh;aO=1;var e=KU(),t=Rx(),r=YU(),n=bj(),i=XU(),o=Pi(),a=uj(),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 _}),Bh=w,Bh}var $h,sO;function ZU(){if(sO)return $h;sO=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 $h=r,$h}var zh,uO;function xj(){if(uO)return zh;uO=1;var e=Hr(),t=e.Uint8Array;return zh=t,zh}var Hh,lO;function jx(){if(lO)return Hh;lO=1;var e=xj();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return Hh=t,Hh}var Uh,cO;function JU(){if(cO)return Uh;cO=1;var e=jx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Uh=t,Uh}var Vh,fO;function QU(){if(fO)return Vh;fO=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Vh=t,Vh}var Wh,dO;function eV(){if(dO)return Wh;dO=1;var e=Po(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return Wh=n,Wh}var Gh,hO;function wj(){if(hO)return Gh;hO=1;var e=jx();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return Gh=t,Gh}var Kh,pO;function tV(){if(pO)return Kh;pO=1;var e=jx(),t=JU(),r=QU(),n=eV(),i=wj(),o="[object Boolean]",a="[object Date]",u="[object Map]",l="[object Number]",d="[object RegExp]",f="[object Set]",h="[object String]",p="[object Symbol]",v="[object ArrayBuffer]",m="[object DataView]",y="[object Float32Array]",x="[object Float64Array]",b="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",_="[object Uint8Array]",S="[object Uint8ClampedArray]",R="[object Uint16Array]",I="[object Uint32Array]";function N(A,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 Kh=N,Kh}var Yh,vO;function _j(){if(vO)return Yh;vO=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 Yh=r,Yh}var Xh,gO;function Ej(){if(gO)return Xh;gO=1;var e=_j(),t=jl(),r=Dl();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Xh=n,Xh}var Zh,mO;function rV(){if(mO)return Zh;mO=1;var e=No(),t=an(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Zh=n,Zh}var Jh,yO;function nV(){if(yO)return Jh;yO=1;var e=rV(),t=Ml(),r=Nx(),n=r&&r.isMap,i=n?t(n):e;return Jh=i,Jh}var Qh,bO;function iV(){if(bO)return Qh;bO=1;var e=No(),t=an(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return Qh=n,Qh}var ep,xO;function oV(){if(xO)return ep;xO=1;var e=iV(),t=Ml(),r=Nx(),n=r&&r.isSet,i=n?t(n):e;return ep=i,ep}var tp,wO;function Sj(){if(wO)return tp;wO=1;var e=Pl(),t=Px(),r=Nl(),n=$U(),i=UU(),o=dj(),a=hj(),u=VU(),l=WU(),d=yj(),f=GU(),h=No(),p=ZU(),v=tV(),m=Ej(),y=xt(),x=To(),b=nV(),w=Cr(),E=oV(),_=Yn(),S=Ni(),R=1,I=2,N=4,A="[object Arguments]",k="[object Array]",L="[object Boolean]",$="[object Date]",j="[object Error]",D="[object Function]",W="[object GeneratorFunction]",F="[object Map]",X="[object Number]",Z="[object Object]",Q="[object RegExp]",U="[object Set]",ee="[object String]",ie="[object Symbol]",ue="[object WeakMap]",B="[object ArrayBuffer]",V="[object DataView]",J="[object Float32Array]",H="[object Float64Array]",G="[object Int8Array]",se="[object Int16Array]",oe="[object Int32Array]",fe="[object Uint8Array]",ne="[object Uint8ClampedArray]",K="[object Uint16Array]",he="[object Uint32Array]",be={};be[A]=be[k]=be[B]=be[V]=be[L]=be[$]=be[J]=be[H]=be[G]=be[se]=be[oe]=be[F]=be[X]=be[Z]=be[Q]=be[U]=be[ee]=be[ie]=be[fe]=be[ne]=be[K]=be[he]=!0,be[j]=be[D]=be[ue]=!1;function pe(de,_e,Re,Ze,ze,Fe){var Ue,lt=_e&R,ct=_e&I,mt=_e&N;if(Re&&(Ue=ze?Re(de,Ze,ze,Fe):Re(de)),Ue!==void 0)return Ue;if(!w(de))return de;var yt=y(de);if(yt){if(Ue=p(de),!lt)return a(de,Ue)}else{var rt=h(de),bt=rt==D||rt==W;if(x(de))return o(de,lt);if(rt==Z||rt==A||bt&&!ze){if(Ue=ct||bt?{}:m(de),!lt)return ct?l(de,i(Ue,de)):u(de,n(Ue,de))}else{if(!be[rt])return ze?de:{};Ue=v(de,rt,lt)}}Fe||(Fe=new e);var Qt=Fe.get(de);if(Qt)return Qt;Fe.set(de,Ue),E(de)?de.forEach(function(_t){Ue.add(pe(_t,_e,Re,_t,de,Fe))}):b(de)&&de.forEach(function(_t,jt){Ue.set(jt,pe(_t,_e,Re,jt,de,Fe))});var dr=mt?ct?f:d:ct?S:_,Dt=yt?void 0:dr(de);return t(Dt||de,function(_t,jt){Dt&&(jt=_t,_t=de[jt]),r(Ue,jt,pe(_t,_e,Re,jt,de,Fe))}),Ue}return tp=pe,tp}var rp,_O;function aV(){if(_O)return rp;_O=1;var e=Sj(),t=4;function r(n){return e(n,t)}return rp=r,rp}var np,EO;function qx(){if(EO)return np;EO=1;function e(t){return function(){return t}}return np=e,np}var ip,SO;function sV(){if(SO)return ip;SO=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 ip=e,ip}var op,OO;function kx(){if(OO)return op;OO=1;var e=sV(),t=e();return op=t,op}var ap,CO;function Lx(){if(CO)return ap;CO=1;var e=kx(),t=Yn();function r(n,i){return n&&e(n,i,t)}return ap=r,ap}var sp,RO;function uV(){if(RO)return sp;RO=1;var e=On();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 sp=t,sp}var up,IO;function ql(){if(IO)return up;IO=1;var e=Lx(),t=uV(),r=t(e);return up=r,up}var lp,PO;function Ai(){if(PO)return lp;PO=1;function e(t){return t}return lp=e,lp}var cp,TO;function Oj(){if(TO)return cp;TO=1;var e=Ai();function t(r){return typeof r=="function"?r:e}return cp=t,cp}var fp,NO;function Cj(){if(NO)return fp;NO=1;var e=Px(),t=ql(),r=Oj(),n=xt();function i(o,a){var u=n(o)?e:t;return u(o,r(a))}return fp=i,fp}var dp,AO;function Rj(){return AO||(AO=1,dp=Cj()),dp}var hp,MO;function lV(){if(MO)return hp;MO=1;var e=ql();function t(r,n){var i=[];return e(r,function(o,a,u){n(o,a,u)&&i.push(o)}),i}return hp=t,hp}var pp,DO;function cV(){if(DO)return pp;DO=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return pp=t,pp}var vp,jO;function fV(){if(jO)return vp;jO=1;function e(t){return this.__data__.has(t)}return vp=e,vp}var gp,qO;function Ij(){if(qO)return gp;qO=1;var e=Ix(),t=cV(),r=fV();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,gp=n,gp}var mp,kO;function dV(){if(kO)return mp;kO=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 mp=e,mp}var yp,LO;function Pj(){if(LO)return yp;LO=1;function e(t,r){return t.has(r)}return yp=e,yp}var bp,FO;function Tj(){if(FO)return bp;FO=1;var e=Ij(),t=dV(),r=Pj(),n=1,i=2;function o(a,u,l,d,f,h){var p=l&n,v=a.length,m=u.length;if(v!=m&&!(p&&m>v))return!1;var y=h.get(a),x=h.get(u);if(y&&x)return y==u&&x==a;var b=-1,w=!0,E=l&i?new e:void 0;for(h.set(a,u),h.set(u,a);++b<v;){var _=a[b],S=u[b];if(d)var R=p?d(S,_,b,u,a,h):d(_,S,b,a,u,h);if(R!==void 0){if(R)continue;w=!1;break}if(E){if(!t(u,function(I,N){if(!r(E,N)&&(_===I||f(_,I,l,d,h)))return E.push(N)})){w=!1;break}}else if(!(_===S||f(_,S,l,d,h))){w=!1;break}}return h.delete(a),h.delete(u),w}return bp=o,bp}var xp,BO;function hV(){if(BO)return xp;BO=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return xp=e,xp}var wp,$O;function Fx(){if($O)return wp;$O=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return wp=e,wp}var _p,zO;function pV(){if(zO)return _p;zO=1;var e=Po(),t=xj(),r=Io(),n=Tj(),i=hV(),o=Fx(),a=1,u=2,l="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Map]",p="[object Number]",v="[object RegExp]",m="[object Set]",y="[object String]",x="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",E=e?e.prototype:void 0,_=E?E.valueOf:void 0;function S(R,I,N,A,k,L,$){switch(N){case w:if(R.byteLength!=I.byteLength||R.byteOffset!=I.byteOffset)return!1;R=R.buffer,I=I.buffer;case b:return!(R.byteLength!=I.byteLength||!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 W=$.get(R);if(W)return W==I;A|=u,$.set(R,I);var F=n(j(R),j(I),A,k,L,$);return $.delete(R),F;case x:if(_)return _.call(R)==_.call(I)}return!1}return _p=S,_p}var Ep,HO;function vV(){if(HO)return Ep;HO=1;var e=yj(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(o,a,u,l,d,f){var h=u&t,p=e(o),v=p.length,m=e(a),y=m.length;if(v!=y&&!h)return!1;for(var x=v;x--;){var b=p[x];if(!(h?b in a:n.call(a,b)))return!1}var w=f.get(o),E=f.get(a);if(w&&E)return w==a&&E==o;var _=!0;f.set(o,a),f.set(a,o);for(var S=h;++x<v;){b=p[x];var R=o[b],I=a[b];if(l)var N=h?l(I,R,b,a,o,f):l(R,I,b,o,a,f);if(!(N===void 0?R===I||d(R,I,u,l,f):N)){_=!1;break}S||(S=b=="constructor")}if(_&&!S){var A=o.constructor,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 Ep=i,Ep}var Sp,UO;function gV(){if(UO)return Sp;UO=1;var e=Pl(),t=Tj(),r=pV(),n=vV(),i=No(),o=xt(),a=To(),u=es(),l=1,d="[object Arguments]",f="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function m(y,x,b,w,E,_){var S=o(y),R=o(x),I=S?f:i(y),N=R?f:i(x);I=I==d?h:I,N=N==d?h:N;var A=I==h,k=N==h,L=I==N;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,W=j?x.value():x;return _||(_=new e),E(D,W,b,w,_)}}return L?(_||(_=new e),n(y,x,b,w,E,_)):!1}return Sp=m,Sp}var Op,VO;function Nj(){if(VO)return Op;VO=1;var e=gV(),t=an();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 Op=r,Op}var Cp,WO;function mV(){if(WO)return Cp;WO=1;var e=Pl(),t=Nj(),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 Cp=i,Cp}var Rp,GO;function Aj(){if(GO)return Rp;GO=1;var e=Cr();function t(r){return r===r&&!e(r)}return Rp=t,Rp}var Ip,KO;function yV(){if(KO)return Ip;KO=1;var e=Aj(),t=Yn();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 Ip=r,Ip}var Pp,YO;function Mj(){if(YO)return Pp;YO=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return Pp=e,Pp}var Tp,XO;function bV(){if(XO)return Tp;XO=1;var e=mV(),t=yV(),r=Mj();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 Tp=n,Tp}var Np,ZO;function Ao(){if(ZO)return Np;ZO=1;var e=Pi(),t=an(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return Np=n,Np}var Ap,JO;function Bx(){if(JO)return Ap;JO=1;var e=xt(),t=Ao(),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 Ap=i,Ap}var Mp,QO;function xV(){if(QO)return Mp;QO=1;var e=Ix(),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,Mp=r,Mp}var Dp,eC;function wV(){if(eC)return Dp;eC=1;var e=xV(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return Dp=r,Dp}var jp,tC;function _V(){if(tC)return jp;tC=1;var e=wV(),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 jp=n,jp}var qp,rC;function kl(){if(rC)return qp;rC=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 qp=e,qp}var kp,nC;function EV(){if(nC)return kp;nC=1;var e=Po(),t=kl(),r=xt(),n=Ao(),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 kp=a,kp}var Lp,iC;function Dj(){if(iC)return Lp;iC=1;var e=EV();function t(r){return r==null?"":e(r)}return Lp=t,Lp}var Fp,oC;function Ll(){if(oC)return Fp;oC=1;var e=xt(),t=Bx(),r=_V(),n=Dj();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Fp=i,Fp}var Bp,aC;function ts(){if(aC)return Bp;aC=1;var e=Ao();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Bp=t,Bp}var $p,sC;function Fl(){if(sC)return $p;sC=1;var e=Ll(),t=ts();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 $p=r,$p}var zp,uC;function SV(){if(uC)return zp;uC=1;var e=Fl();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return zp=t,zp}var Hp,lC;function OV(){if(lC)return Hp;lC=1;function e(t,r){return t!=null&&r in Object(t)}return Hp=e,Hp}var Up,cC;function jj(){if(cC)return Up;cC=1;var e=Ll(),t=Qa(),r=xt(),n=Al(),i=Tx(),o=ts();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 Up=a,Up}var Vp,fC;function qj(){if(fC)return Vp;fC=1;var e=OV(),t=jj();function r(n,i){return n!=null&&t(n,i,e)}return Vp=r,Vp}var Wp,dC;function CV(){if(dC)return Wp;dC=1;var e=Nj(),t=SV(),r=qj(),n=Bx(),i=Aj(),o=Mj(),a=ts(),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 Wp=d,Wp}var Gp,hC;function kj(){if(hC)return Gp;hC=1;function e(t){return function(r){return r==null?void 0:r[t]}}return Gp=e,Gp}var Kp,pC;function RV(){if(pC)return Kp;pC=1;var e=Fl();function t(r){return function(n){return e(n,r)}}return Kp=t,Kp}var Yp,vC;function IV(){if(vC)return Yp;vC=1;var e=kj(),t=RV(),r=Bx(),n=ts();function i(o){return r(o)?e(n(o)):t(o)}return Yp=i,Yp}var Xp,gC;function Cn(){if(gC)return Xp;gC=1;var e=bV(),t=CV(),r=Ai(),n=xt(),i=IV();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 Xp=o,Xp}var Zp,mC;function Lj(){if(mC)return Zp;mC=1;var e=pj(),t=lV(),r=Cn(),n=xt();function i(o,a){var u=n(o)?e:t;return u(o,r(a,3))}return Zp=i,Zp}var Jp,yC;function PV(){if(yC)return Jp;yC=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Jp=r,Jp}var Qp,bC;function Fj(){if(bC)return Qp;bC=1;var e=PV(),t=jj();function r(n,i){return n!=null&&t(n,i,e)}return Qp=r,Qp}var ev,xC;function TV(){if(xC)return ev;xC=1;var e=Ax(),t=No(),r=Qa(),n=xt(),i=On(),o=To(),a=Dl(),u=es(),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 ev=p,ev}var tv,wC;function Bj(){if(wC)return tv;wC=1;function e(t){return t===void 0}return tv=e,tv}var rv,_C;function $j(){if(_C)return rv;_C=1;var e=ql(),t=On();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 rv=r,rv}var nv,EC;function zj(){if(EC)return nv;EC=1;var e=kl(),t=Cn(),r=$j(),n=xt();function i(o,a){var u=n(o)?e:r;return u(o,t(a,3))}return nv=i,nv}var iv,SC;function NV(){if(SC)return iv;SC=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 iv=e,iv}var ov,OC;function AV(){if(OC)return ov;OC=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 ov=e,ov}var av,CC;function Hj(){if(CC)return av;CC=1;var e=NV(),t=ql(),r=Cn(),n=AV(),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 av=o,av}var sv,RC;function MV(){if(RC)return sv;RC=1;var e=Pi(),t=xt(),r=an(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return sv=i,sv}var uv,IC;function DV(){if(IC)return uv;IC=1;var e=kj(),t=e("length");return uv=t,uv}var lv,PC;function jV(){if(PC)return lv;PC=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 lv=l,lv}var cv,TC;function qV(){if(TC)return cv;TC=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 cv=_,cv}var fv,NC;function kV(){if(NC)return fv;NC=1;var e=DV(),t=jV(),r=qV();function n(i){return t(i)?r(i):e(i)}return fv=n,fv}var dv,AC;function LV(){if(AC)return dv;AC=1;var e=Ax(),t=No(),r=On(),n=MV(),i=kV(),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 dv=u,dv}var hv,MC;function FV(){if(MC)return hv;MC=1;var e=Px(),t=_j(),r=Lx(),n=Cn(),i=jl(),o=xt(),a=To(),u=Za(),l=Cr(),d=es();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 hv=f,hv}var pv,DC;function BV(){if(DC)return pv;DC=1;var e=Po(),t=Qa(),r=xt(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return pv=i,pv}var vv,jC;function $x(){if(jC)return vv;jC=1;var e=Dx(),t=BV();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 vv=r,vv}var gv,qC;function $V(){if(qC)return gv;qC=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 gv=e,gv}var mv,kC;function Uj(){if(kC)return mv;kC=1;var e=$V(),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 mv=r,mv}var yv,LC;function zV(){if(LC)return yv;LC=1;var e=qx(),t=lj(),r=Ai(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return yv=n,yv}var bv,FC;function HV(){if(FC)return bv;FC=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 bv=n,bv}var xv,BC;function Vj(){if(BC)return xv;BC=1;var e=zV(),t=HV(),r=t(e);return xv=r,xv}var wv,$C;function Bl(){if($C)return wv;$C=1;var e=Ai(),t=Uj(),r=Vj();function n(i,o){return r(t(i,o,e),i+"")}return wv=n,wv}var _v,zC;function Wj(){if(zC)return _v;zC=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 _v=e,_v}var Ev,HC;function UV(){if(HC)return Ev;HC=1;function e(t){return t!==t}return Ev=e,Ev}var Sv,UC;function VV(){if(UC)return Sv;UC=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 Sv=e,Sv}var Ov,VC;function WV(){if(VC)return Ov;VC=1;var e=Wj(),t=UV(),r=VV();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return Ov=n,Ov}var Cv,WC;function GV(){if(WC)return Cv;WC=1;var e=WV();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return Cv=t,Cv}var Rv,GC;function KV(){if(GC)return Rv;GC=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 Rv=e,Rv}var Iv,KC;function YV(){if(KC)return Iv;KC=1;function e(){}return Iv=e,Iv}var Pv,YC;function XV(){if(YC)return Pv;YC=1;var e=bj(),t=YV(),r=Fx(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return Pv=i,Pv}var Tv,XC;function ZV(){if(XC)return Tv;XC=1;var e=Ij(),t=GV(),r=KV(),n=Pj(),i=XV(),o=Fx(),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 Tv=u,Tv}var Nv,ZC;function Gj(){if(ZC)return Nv;ZC=1;var e=On(),t=an();function r(n){return t(n)&&e(n)}return Nv=r,Nv}var Av,JC;function JV(){if(JC)return Av;JC=1;var e=$x(),t=Bl(),r=ZV(),n=Gj(),i=t(function(o){return r(e(o,1,n,!0))});return Av=i,Av}var Mv,QC;function QV(){if(QC)return Mv;QC=1;var e=kl();function t(r,n){return e(n,function(i){return r[i]})}return Mv=t,Mv}var Dv,eR;function Kj(){if(eR)return Dv;eR=1;var e=QV(),t=Yn();function r(n){return n==null?[]:e(n,t(n))}return Dv=r,Dv}var jv,tR;function Rr(){if(tR)return jv;tR=1;var e;if(typeof Cx=="function")try{e={clone:aV(),constant:qx(),each:Rj(),filter:Lj(),has:Fj(),isArray:xt(),isEmpty:TV(),isFunction:Za(),isUndefined:Bj(),keys:Yn(),map:zj(),reduce:Hj(),size:LV(),transform:FV(),union:JV(),values:Kj()}}catch{}return e||(e=window._),jv=e,jv}var qv,rR;function zx(){if(rR)return qv;rR=1;var e=Rr();qv=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 qv}var kv,nR;function eW(){return nR||(nR=1,kv="2.1.8"),kv}var Lv,iR;function tW(){return iR||(iR=1,Lv={Graph:zx(),version:eW()}),Lv}var Fv,oR;function rW(){if(oR)return Fv;oR=1;var e=Rr(),t=zx();Fv={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 Fv}var Bv,aR;function nW(){if(aR)return Bv;aR=1;var e=Rr();Bv=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 Bv}var $v,sR;function Yj(){if(sR)return $v;sR=1;var e=Rr();$v=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},$v}var zv,uR;function Xj(){if(uR)return zv;uR=1;var e=Rr(),t=Yj();zv=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 zv}var Hv,lR;function iW(){if(lR)return Hv;lR=1;var e=Xj(),t=Rr();Hv=r;function r(n,i,o){return t.transform(n.nodes(),function(a,u){a[u]=e(n,u,i,o)},{})}return Hv}var Uv,cR;function Zj(){if(cR)return Uv;cR=1;var e=Rr();Uv=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 Uv}var Vv,fR;function oW(){if(fR)return Vv;fR=1;var e=Rr(),t=Zj();Vv=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 Vv}var Wv,dR;function aW(){if(dR)return Wv;dR=1;var e=Rr();Wv=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 Wv}var Gv,hR;function Jj(){if(hR)return Gv;hR=1;var e=Rr();Gv=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,Gv}var Kv,pR;function sW(){if(pR)return Kv;pR=1;var e=Jj();Kv=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return Kv}var Yv,vR;function Qj(){if(vR)return Yv;vR=1;var e=Rr();Yv=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 Yv}var Xv,gR;function uW(){if(gR)return Xv;gR=1;var e=Qj();Xv=t;function t(r,n){return e(r,n,"post")}return Xv}var Zv,mR;function lW(){if(mR)return Zv;mR=1;var e=Qj();Zv=t;function t(r,n){return e(r,n,"pre")}return Zv}var Jv,yR;function cW(){if(yR)return Jv;yR=1;var e=Rr(),t=zx(),r=Yj();Jv=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 Jv}var Qv,bR;function fW(){return bR||(bR=1,Qv={components:nW(),dijkstra:Xj(),dijkstraAll:iW(),findCycles:oW(),floydWarshall:aW(),isAcyclic:sW(),postorder:uW(),preorder:lW(),prim:cW(),tarjan:Zj(),topsort:Jj()}),Qv}var eg,xR;function dW(){if(xR)return eg;xR=1;var e=tW();return eg={Graph:e.Graph,json:rW(),alg:fW(),version:e.version},eg}var tg,wR;function Br(){if(wR)return tg;wR=1;var e;if(typeof Cx=="function")try{e=dW()}catch{}return e||(e=window.graphlib),tg=e,tg}var rg,_R;function hW(){if(_R)return rg;_R=1;var e=Sj(),t=1,r=4;function n(i){return e(i,t|r)}return rg=n,rg}var ng,ER;function $l(){if(ER)return ng;ER=1;var e=Io(),t=On(),r=Al(),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 ng=i,ng}var ig,SR;function pW(){if(SR)return ig;SR=1;var e=Bl(),t=Io(),r=$l(),n=Ni(),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 ig=a,ig}var og,OR;function vW(){if(OR)return og;OR=1;var e=Cn(),t=On(),r=Yn();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 og=n,og}var ag,CR;function gW(){if(CR)return ag;CR=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return ag=t,ag}var sg,RR;function mW(){if(RR)return sg;RR=1;var e=gW(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return sg=r,sg}var ug,IR;function yW(){if(IR)return ug;IR=1;var e=mW(),t=Cr(),r=Ao(),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 ug=l,ug}var lg,PR;function e2(){if(PR)return lg;PR=1;var e=yW(),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 lg=n,lg}var cg,TR;function bW(){if(TR)return cg;TR=1;var e=e2();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return cg=t,cg}var fg,NR;function xW(){if(NR)return fg;NR=1;var e=Wj(),t=Cn(),r=bW(),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 fg=i,fg}var dg,AR;function wW(){if(AR)return dg;AR=1;var e=vW(),t=xW(),r=e(t);return dg=r,dg}var hg,MR;function t2(){if(MR)return hg;MR=1;var e=$x();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return hg=t,hg}var pg,DR;function _W(){if(DR)return pg;DR=1;var e=kx(),t=Oj(),r=Ni();function n(i,o){return i==null?i:e(i,t(o),r)}return pg=n,pg}var vg,jR;function EW(){if(jR)return vg;jR=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return vg=e,vg}var gg,qR;function SW(){if(qR)return gg;qR=1;var e=Tl(),t=Lx(),r=Cn();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 gg=n,gg}var mg,kR;function Hx(){if(kR)return mg;kR=1;var e=Ao();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 mg=t,mg}var yg,LR;function OW(){if(LR)return yg;LR=1;function e(t,r){return t>r}return yg=e,yg}var bg,FR;function CW(){if(FR)return bg;FR=1;var e=Hx(),t=OW(),r=Ai();function n(i){return i&&i.length?e(i,r,t):void 0}return bg=n,bg}var xg,BR;function r2(){if(BR)return xg;BR=1;var e=Tl(),t=Io();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return xg=r,xg}var wg,$R;function RW(){if($R)return wg;$R=1;var e=Pi(),t=jl(),r=an(),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 wg=d,wg}var _g,zR;function n2(){if(zR)return _g;zR=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return _g=e,_g}var Eg,HR;function IW(){if(HR)return Eg;HR=1;var e=Ja(),t=Ni();function r(n){return e(n,t(n))}return Eg=r,Eg}var Sg,UR;function PW(){if(UR)return Sg;UR=1;var e=r2(),t=dj(),r=wj(),n=hj(),i=Ej(),o=Qa(),a=xt(),u=Gj(),l=To(),d=Za(),f=Cr(),h=RW(),p=es(),v=n2(),m=IW();function y(x,b,w,E,_,S,R){var I=v(x,w),N=v(b,w),A=R.get(N);if(A){e(x,w,A);return}var k=S?S(I,N,w+"",x,b,R):void 0,L=k===void 0;if(L){var $=a(N),j=!$&&l(N),D=!$&&!j&&p(N);k=N,$||j||D?a(I)?k=I:u(I)?k=n(I):j?(L=!1,k=t(N,!0)):D?(L=!1,k=r(N,!0)):k=[]:h(N)||o(N)?(k=I,o(I)?k=m(I):(!f(I)||d(I))&&(k=i(N))):L=!1}L&&(R.set(N,k),_(k,N,E,S,R),R.delete(N)),e(x,w,k)}return Sg=y,Sg}var Og,VR;function TW(){if(VR)return Og;VR=1;var e=Pl(),t=r2(),r=kx(),n=PW(),i=Cr(),o=Ni(),a=n2();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 Og=u,Og}var Cg,WR;function NW(){if(WR)return Cg;WR=1;var e=Bl(),t=$l();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 Cg=r,Cg}var Rg,GR;function AW(){if(GR)return Rg;GR=1;var e=TW(),t=NW(),r=t(function(n,i,o){e(n,i,o)});return Rg=r,Rg}var Ig,KR;function i2(){if(KR)return Ig;KR=1;function e(t,r){return t<r}return Ig=e,Ig}var Pg,YR;function MW(){if(YR)return Pg;YR=1;var e=Hx(),t=i2(),r=Ai();function n(i){return i&&i.length?e(i,r,t):void 0}return Pg=n,Pg}var Tg,XR;function DW(){if(XR)return Tg;XR=1;var e=Hx(),t=Cn(),r=i2();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return Tg=n,Tg}var Ng,ZR;function jW(){if(ZR)return Ng;ZR=1;var e=Hr(),t=function(){return e.Date.now()};return Ng=t,Ng}var Ag,JR;function qW(){if(JR)return Ag;JR=1;var e=Nl(),t=Ll(),r=Al(),n=Cr(),i=ts();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 Ag=o,Ag}var Mg,QR;function kW(){if(QR)return Mg;QR=1;var e=Fl(),t=qW(),r=Ll();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 Mg=n,Mg}var Dg,eI;function LW(){if(eI)return Dg;eI=1;var e=kW(),t=qj();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return Dg=r,Dg}var jg,tI;function FW(){if(tI)return jg;tI=1;var e=t2(),t=Uj(),r=Vj();function n(i){return r(t(i,void 0,e),i+"")}return jg=n,jg}var qg,rI;function BW(){if(rI)return qg;rI=1;var e=LW(),t=FW(),r=t(function(n,i){return n==null?{}:e(n,i)});return qg=r,qg}var kg,nI;function $W(){if(nI)return kg;nI=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 kg=r,kg}var Lg,iI;function zW(){if(iI)return Lg;iI=1;var e=$W(),t=$l(),r=e2();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 Lg=n,Lg}var Fg,oI;function HW(){if(oI)return Fg;oI=1;var e=zW(),t=e();return Fg=t,Fg}var Bg,aI;function UW(){if(aI)return Bg;aI=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Bg=e,Bg}var $g,sI;function VW(){if(sI)return $g;sI=1;var e=Ao();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 $g=t,$g}var zg,uI;function WW(){if(uI)return zg;uI=1;var e=VW();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 zg=t,zg}var Hg,lI;function GW(){if(lI)return Hg;lI=1;var e=kl(),t=Fl(),r=Cn(),n=$j(),i=UW(),o=Ml(),a=WW(),u=Ai(),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 Hg=d,Hg}var Ug,cI;function KW(){if(cI)return Ug;cI=1;var e=$x(),t=GW(),r=Bl(),n=$l(),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 Ug=i,Ug}var Vg,fI;function YW(){if(fI)return Vg;fI=1;var e=Dj(),t=0;function r(n){var i=++t;return e(n)+i}return Vg=r,Vg}var Wg,dI;function XW(){if(dI)return Wg;dI=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 Wg=e,Wg}var Gg,hI;function ZW(){if(hI)return Gg;hI=1;var e=Nl(),t=XW();function r(n,i){return t(n||[],i||[],e)}return Gg=r,Gg}var Kg,pI;function ut(){if(pI)return Kg;pI=1;var e;if(typeof Cx=="function")try{e={cloneDeep:hW(),constant:qx(),defaults:pW(),each:Rj(),filter:Lj(),find:wW(),flatten:t2(),forEach:Cj(),forIn:_W(),has:Fj(),isUndefined:Bj(),last:EW(),map:zj(),mapValues:SW(),max:CW(),merge:AW(),min:MW(),minBy:DW(),now:jW(),pick:BW(),range:HW(),reduce:Hj(),sortBy:KW(),uniqueId:YW(),values:Kj(),zipObject:ZW()}}catch{}return e||(e=window._),Kg=e,Kg}var Yg,vI;function JW(){if(vI)return Yg;vI=1,Yg=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 Yg}var Xg,gI;function QW(){if(gI)return Xg;gI=1;var e=ut(),t=Br().Graph,r=JW();Xg=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 Xg}var Zg,mI;function e6(){if(mI)return Zg;mI=1;var e=ut(),t=QW();Zg={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 Zg}var Jg,yI;function Xt(){if(yI)return Jg;yI=1;var e=ut(),t=Br().Graph;Jg={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:u,buildLayerMatrix:l,normalizeRanks:d,removeEmptyRanks:f,addBorderNode:h,maxRank:p,partition:v,time:m,notime:y};function r(x,b,w,E){var _;do _=e.uniqueId(E);while(x.hasNode(_));return w.dummy=b,x.setNode(_,w),_}function n(x){var b=new t().setGraph(x.graph());return e.forEach(x.nodes(),function(w){b.setNode(w,x.node(w))}),e.forEach(x.edges(),function(w){var E=b.edge(w.v,w.w)||{weight:0,minlen:1},_=x.edge(w);b.setEdge(w.v,w.w,{weight:E.weight+_.weight,minlen:Math.max(E.minlen,_.minlen)})}),b}function i(x){var b=new t({multigraph:x.isMultigraph()}).setGraph(x.graph());return e.forEach(x.nodes(),function(w){x.children(w).length||b.setNode(w,x.node(w))}),e.forEach(x.edges(),function(w){b.setEdge(w,x.edge(w))}),b}function o(x){var b=e.map(x.nodes(),function(w){var E={};return e.forEach(x.outEdges(w),function(_){E[_.w]=(E[_.w]||0)+x.edge(_).weight}),E});return e.zipObject(x.nodes(),b)}function a(x){var b=e.map(x.nodes(),function(w){var E={};return e.forEach(x.inEdges(w),function(_){E[_.v]=(E[_.v]||0)+x.edge(_).weight}),E});return e.zipObject(x.nodes(),b)}function u(x,b){var w=x.x,E=x.y,_=b.x-w,S=b.y-E,R=x.width/2,I=x.height/2;if(!_&&!S)throw new Error("Not possible to find intersection inside of the rectangle");var N,A;return Math.abs(S)*R>Math.abs(_)*I?(S<0&&(I=-I),N=I*_/S,A=I):(_<0&&(R=-R),N=R,A=R*S/_),{x:w+N,y:E+A}}function l(x){var b=e.map(e.range(p(x)+1),function(){return[]});return e.forEach(x.nodes(),function(w){var E=x.node(w),_=E.rank;e.isUndefined(_)||(b[_][E.order]=w)}),b}function d(x){var b=e.min(e.map(x.nodes(),function(w){return x.node(w).rank}));e.forEach(x.nodes(),function(w){var E=x.node(w);e.has(E,"rank")&&(E.rank-=b)})}function f(x){var b=e.min(e.map(x.nodes(),function(S){return x.node(S).rank})),w=[];e.forEach(x.nodes(),function(S){var R=x.node(S).rank-b;w[R]||(w[R]=[]),w[R].push(S)});var E=0,_=x.graph().nodeRankFactor;e.forEach(w,function(S,R){e.isUndefined(S)&&R%_!==0?--E:E&&e.forEach(S,function(I){x.node(I).rank+=E})})}function h(x,b,w,E){var _={width:0,height:0};return arguments.length>=4&&(_.rank=w,_.order=E),r(x,"border",_,b)}function p(x){return e.max(e.map(x.nodes(),function(b){var w=x.node(b).rank;if(!e.isUndefined(w))return w}))}function v(x,b){var w={lhs:[],rhs:[]};return e.forEach(x,function(E){b(E)?w.lhs.push(E):w.rhs.push(E)}),w}function m(x,b){var w=e.now();try{return b()}finally{console.log(x+" time: "+(e.now()-w)+"ms")}}function y(x,b){return b()}return Jg}var Qg,bI;function t6(){if(bI)return Qg;bI=1;var e=ut(),t=Xt();Qg={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 Qg}var em,xI;function Gu(){if(xI)return em;xI=1;var e=ut();em={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 em}var tm,wI;function o2(){if(wI)return tm;wI=1;var e=ut(),t=Br().Graph,r=Gu().slack;tm=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 tm}var rm,_I;function r6(){if(_I)return rm;_I=1;var e=ut(),t=o2(),r=Gu().slack,n=Gu().longestPath,i=Br().alg.preorder,o=Br().alg.postorder,a=Xt().simplify;rm=u,u.initLowLimValues=h,u.initCutValues=l,u.calcCutValue=f,u.leaveEdge=v,u.enterEdge=m,u.exchangeEdges=y;function u(E){E=a(E),n(E);var _=t(E);h(_),l(_,E);for(var S,R;S=v(_);)R=m(_,E,S),y(_,E,S,R)}function l(E,_){var S=o(E,E.nodes());S=S.slice(0,S.length-1),e.forEach(S,function(R){d(E,_,R)})}function d(E,_,S){var R=E.node(S),I=R.parent;E.edge(S,I).cutvalue=f(E,_,S)}function f(E,_,S){var R=E.node(S),I=R.parent,N=!0,A=_.edge(S,I),k=0;return A||(N=!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=$===N,W=_.edge(L).weight;if(k+=D?W:-W,b(E,S,j)){var F=E.edge(S,j).cutvalue;k+=D?-F:F}}}),k}function h(E,_){arguments.length<2&&(_=E.nodes()[0]),p(E,{},1,_)}function p(E,_,S,R,I){var N=S,A=E.node(R);return _[R]=!0,e.forEach(E.neighbors(R),function(k){e.has(_,k)||(S=p(E,_,S,k,R))}),A.low=N,A.lim=S++,I?A.parent=I:delete A.parent,S}function v(E){return e.find(E.edges(),function(_){return E.edge(_).cutvalue<0})}function m(E,_,S){var R=S.v,I=S.w;_.hasEdge(R,I)||(R=S.w,I=S.v);var N=E.node(R),A=E.node(I),k=N,L=!1;N.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,N=S.w;E.removeEdge(I,N),E.setEdge(R.v,R.w,{}),h(E),l(E,_),x(E,_)}function x(E,_){var S=e.find(E.nodes(),function(I){return!_.node(I).parent}),R=i(E,S);R=R.slice(1),e.forEach(R,function(I){var N=E.node(I).parent,A=_.edge(I,N),k=!1;A||(A=_.edge(N,I),k=!0),_.node(I).rank=_.node(N).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 rm}var nm,EI;function n6(){if(EI)return nm;EI=1;var e=Gu(),t=e.longestPath,r=o2(),n=r6();nm=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 nm}var im,SI;function i6(){if(SI)return im;SI=1;var e=ut();im=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 im}var om,OI;function o6(){if(OI)return om;OI=1;var e=ut(),t=Xt();om={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 om}var am,CI;function a6(){if(CI)return am;CI=1;var e=ut(),t=Xt();am=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 am}var sm,RI;function s6(){if(RI)return sm;RI=1;var e=ut();sm={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 sm}var um,II;function u6(){if(II)return um;II=1;var e=ut();um=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 um}var lm,PI;function l6(){if(PI)return lm;PI=1;var e=ut();lm=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 lm}var cm,TI;function c6(){if(TI)return cm;TI=1;var e=ut();cm=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 cm}var fm,NI;function f6(){if(NI)return fm;NI=1;var e=ut();fm=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 fm}var dm,AI;function d6(){if(AI)return dm;AI=1;var e=ut(),t=Xt();dm=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 dm}var hm,MI;function h6(){if(MI)return hm;MI=1;var e=ut(),t=c6(),r=f6(),n=d6();hm=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 hm}var pm,DI;function p6(){if(DI)return pm;DI=1;var e=ut(),t=Br().Graph;pm=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 pm}var vm,jI;function v6(){if(jI)return vm;jI=1;var e=ut();vm=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 vm}var gm,qI;function g6(){if(qI)return gm;qI=1;var e=ut(),t=u6(),r=l6(),n=h6(),i=p6(),o=v6(),a=Br().Graph,u=Xt();gm=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 gm}var mm,kI;function m6(){if(kI)return mm;kI=1;var e=ut(),t=Br().Graph,r=Xt();mm={positionX:m,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:u,verticalAlignment:l,horizontalCompaction:d,alignCoordinates:p,findSmallestWidthAlignment:h,balance:v};function n(b,w){var E={};function _(S,R){var I=0,N=0,A=S.length,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(N,$+1),function(W){e.forEach(b.predecessors(W),function(F){var X=b.node(F),Z=X.order;(Z<I||D<Z)&&!(X.dummy&&b.node(W).dummy)&&a(E,F,W)})}),N=$+1,I=D)}),R}return e.reduce(w,_),E}function i(b,w){var E={};function _(R,I,N,A,k){var L;e.forEach(e.range(I,N),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 N=-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,$,N,A),k=$,N=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(N){e.forEach(N,function(A,k){S[A]=A,R[A]=A,I[A]=k})}),e.forEach(w,function(N){var A=-1;e.forEach(N,function(k){var L=_(k);if(L.length){L=e.sortBy(L,function(F){return I[F]});for(var $=(L.length-1)/2,j=Math.floor($),D=Math.ceil($);j<=D;++j){var W=L[j];R[k]===k&&A<I[W]&&!u(E,k,W)&&(R[W]=k,R[k]=S[k]=S[W],A=I[W])}}})}),{root:S,align:R}}function d(b,w,E,_,S){var R={},I=f(b,w,E,S),N=S?"borderLeft":"borderRight";function A($,j){for(var D=I.nodes(),W=D.pop(),F={};W;)F[W]?$(W):(F[W]=!0,D.push(W),D=D.concat(j(W))),W=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(W,F){return Math.min(W,R[F.w]-I.edge(F))},Number.POSITIVE_INFINITY),D=b.node($);j!==Number.POSITIVE_INFINITY&&D.borderType!==N&&(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(N){var A;e.forEach(N,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 N=x(b,I)/2;_=Math.max(R+N,_),S=Math.min(R-N,S)}),_-S})}function p(b,w){var E=e.values(w),_=e.min(E),S=e.max(E);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(I){var N=R+I,A=b[N],k;if(A!==w){var L=e.values(A);k=I==="l"?_-e.min(L):S-e.max(L),k&&(b[N]=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(N){N==="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,N==="r");N==="r"&&(L=e.mapValues(L,function($){return-$})),_[I+N]=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),N=_.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+=(N.dummy?w:b)/2,A+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":k=N.width/2;break;case"r":k=-N.width/2;break}return k&&(A+=E?k:-k),k=0,A}}function x(b,w){return b.node(w).width}return mm}var ym,LI;function y6(){if(LI)return ym;LI=1;var e=ut(),t=Xt(),r=m6().positionX;ym=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 ym}var bm,FI;function b6(){if(FI)return bm;FI=1;var e=ut(),t=e6(),r=t6(),n=n6(),i=Xt().normalizeRanks,o=i6(),a=Xt().removeEmptyRanks,u=o6(),l=a6(),d=s6(),f=g6(),h=y6(),p=Xt(),v=Br().Graph;bm=m;function m(B,V){var J=V&&V.debugTiming?p.time:p.notime;J("layout",function(){var H=J(" buildLayoutGraph",function(){return A(B)});J(" runLayout",function(){y(H,J)}),J(" updateInputGraph",function(){x(B,H)})})}function y(B,V){V(" makeSpaceForEdgeLabels",function(){k(B)}),V(" removeSelfEdges",function(){Q(B)}),V(" acyclic",function(){t.run(B)}),V(" nestingGraph.run",function(){u.run(B)}),V(" rank",function(){n(p.asNonCompoundGraph(B))}),V(" injectEdgeLabelProxies",function(){L(B)}),V(" removeEmptyRanks",function(){a(B)}),V(" nestingGraph.cleanup",function(){u.cleanup(B)}),V(" normalizeRanks",function(){i(B)}),V(" assignRankMinMax",function(){$(B)}),V(" removeEdgeLabelProxies",function(){j(B)}),V(" normalize.run",function(){r.run(B)}),V(" parentDummyChains",function(){o(B)}),V(" addBorderSegments",function(){l(B)}),V(" order",function(){f(B)}),V(" insertSelfEdges",function(){U(B)}),V(" adjustCoordinateSystem",function(){d.adjust(B)}),V(" position",function(){h(B)}),V(" positionSelfEdges",function(){ee(B)}),V(" removeBorderNodes",function(){Z(B)}),V(" normalize.undo",function(){r.undo(B)}),V(" fixupEdgeLabelCoords",function(){F(B)}),V(" undoCoordinateSystem",function(){d.undo(B)}),V(" translateGraph",function(){D(B)}),V(" assignNodeIntersects",function(){W(B)}),V(" reversePoints",function(){X(B)}),V(" acyclic.undo",function(){t.undo(B)})}function x(B,V){e.forEach(B.nodes(),function(J){var H=B.node(J),G=V.node(J);H&&(H.x=G.x,H.y=G.y,V.children(J).length&&(H.width=G.width,H.height=G.height))}),e.forEach(B.edges(),function(J){var H=B.edge(J),G=V.edge(J);H.points=G.points,e.has(G,"x")&&(H.x=G.x,H.y=G.y)}),B.graph().width=V.graph().width,B.graph().height=V.graph().height}var b=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},E=["acyclicer","ranker","rankdir","align"],_=["width","height"],S={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],I={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},N=["labelpos"];function A(B){var V=new v({multigraph:!0,compound:!0}),J=ue(B.graph());return V.setGraph(e.merge({},w,ie(J,b),e.pick(J,E))),e.forEach(B.nodes(),function(H){var G=ue(B.node(H));V.setNode(H,e.defaults(ie(G,_),S)),V.setParent(H,B.parent(H))}),e.forEach(B.edges(),function(H){var G=ue(B.edge(H));V.setEdge(H,e.merge({},I,ie(G,R),e.pick(G,N)))}),V}function k(B){var V=B.graph();V.ranksep/=2,e.forEach(B.edges(),function(J){var H=B.edge(J);H.minlen*=2,H.labelpos.toLowerCase()!=="c"&&(V.rankdir==="TB"||V.rankdir==="BT"?H.width+=H.labeloffset:H.height+=H.labeloffset)})}function L(B){e.forEach(B.edges(),function(V){var J=B.edge(V);if(J.width&&J.height){var H=B.node(V.v),G=B.node(V.w),se={rank:(G.rank-H.rank)/2+H.rank,e:V};p.addDummyNode(B,"edge-proxy",se,"_ep")}})}function $(B){var V=0;e.forEach(B.nodes(),function(J){var H=B.node(J);H.borderTop&&(H.minRank=B.node(H.borderTop).rank,H.maxRank=B.node(H.borderBottom).rank,V=e.max(V,H.maxRank))}),B.graph().maxRank=V}function j(B){e.forEach(B.nodes(),function(V){var J=B.node(V);J.dummy==="edge-proxy"&&(B.edge(J.e).labelRank=J.rank,B.removeNode(V))})}function D(B){var V=Number.POSITIVE_INFINITY,J=0,H=Number.POSITIVE_INFINITY,G=0,se=B.graph(),oe=se.marginx||0,fe=se.marginy||0;function ne(K){var he=K.x,be=K.y,pe=K.width,de=K.height;V=Math.min(V,he-pe/2),J=Math.max(J,he+pe/2),H=Math.min(H,be-de/2),G=Math.max(G,be+de/2)}e.forEach(B.nodes(),function(K){ne(B.node(K))}),e.forEach(B.edges(),function(K){var he=B.edge(K);e.has(he,"x")&&ne(he)}),V-=oe,H-=fe,e.forEach(B.nodes(),function(K){var he=B.node(K);he.x-=V,he.y-=H}),e.forEach(B.edges(),function(K){var he=B.edge(K);e.forEach(he.points,function(be){be.x-=V,be.y-=H}),e.has(he,"x")&&(he.x-=V),e.has(he,"y")&&(he.y-=H)}),se.width=J-V+oe,se.height=G-H+fe}function W(B){e.forEach(B.edges(),function(V){var J=B.edge(V),H=B.node(V.v),G=B.node(V.w),se,oe;J.points?(se=J.points[0],oe=J.points[J.points.length-1]):(J.points=[],se=G,oe=H),J.points.unshift(p.intersectRect(H,se)),J.points.push(p.intersectRect(G,oe))})}function F(B){e.forEach(B.edges(),function(V){var J=B.edge(V);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 X(B){e.forEach(B.edges(),function(V){var J=B.edge(V);J.reversed&&J.points.reverse()})}function Z(B){e.forEach(B.nodes(),function(V){if(B.children(V).length){var J=B.node(V),H=B.node(J.borderTop),G=B.node(J.borderBottom),se=B.node(e.last(J.borderLeft)),oe=B.node(e.last(J.borderRight));J.width=Math.abs(oe.x-se.x),J.height=Math.abs(G.y-H.y),J.x=se.x+J.width/2,J.y=H.y+J.height/2}}),e.forEach(B.nodes(),function(V){B.node(V).dummy==="border"&&B.removeNode(V)})}function Q(B){e.forEach(B.edges(),function(V){if(V.v===V.w){var J=B.node(V.v);J.selfEdges||(J.selfEdges=[]),J.selfEdges.push({e:V,label:B.edge(V)}),B.removeEdge(V)}})}function U(B){var V=p.buildLayerMatrix(B);e.forEach(V,function(J){var H=0;e.forEach(J,function(G,se){var oe=B.node(G);oe.order=se+H,e.forEach(oe.selfEdges,function(fe){p.addDummyNode(B,"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 ee(B){e.forEach(B.nodes(),function(V){var J=B.node(V);if(J.dummy==="selfedge"){var H=B.node(J.e.v),G=H.x+H.width/2,se=H.y,oe=J.x-G,fe=H.height/2;B.setEdge(J.e,J.label),B.removeNode(V),J.label.points=[{x:G+2*oe/3,y:se-fe},{x:G+5*oe/6,y:se-fe},{x:G+oe,y:se},{x:G+5*oe/6,y:se+fe},{x:G+2*oe/3,y:se+fe}],J.label.x=J.x,J.label.y=J.y}})}function ie(B,V){return e.mapValues(e.pick(B,V),Number)}function ue(B){var V={};return e.forEach(B,function(J,H){V[H.toLowerCase()]=J}),V}return bm}var xm,BI;function x6(){if(BI)return xm;BI=1;var e=ut(),t=Xt(),r=Br().Graph;xm={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 xm}var wm,$I;function w6(){return $I||($I=1,wm="0.8.5"),wm}var _m,zI;function _6(){return zI||(zI=1,_m={graphlib:Br(),layout:b6(),debug:x6(),util:{time:Xt().time,notime:Xt().notime},version:w6()}),_m}var E6=_6();const HI=Gn(E6);function S6(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 O6=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),UI=O6?P.useEffect:P.useLayoutEffect;function C6(e){const t=typeof e=="function"?S6(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=P.useReducer(x=>x+1,0),a=t.getState(),u=P.useRef(a),l=P.useRef(n),d=P.useRef(i),f=P.useRef(!1),h=P.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)),UI(()=>{v&&(h.current=p),u.current=a,l.current=n,d.current=i,f.current=!1});const m=P.useRef(a);UI(()=>{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 P.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 R6(){const e=P.createContext(void 0);return{Provider:({initialStore:i,createStore:o,children:a})=>{const u=P.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()),P.createElement(e.Provider,{value:u.current},a)},useStore:(i,o=Object.is)=>{const a=P.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=P.useContext(e);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return P.useMemo(()=>({getState:i.getState,setState:i.setState,subscribe:i.subscribe,destroy:i.destroy}),[i])}}}var I6={value:()=>{}};function zl(){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 qu(r)}function qu(e){this._=e}function P6(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}})}qu.prototype=zl.prototype={constructor:qu,on:function(e,t){var r=this._,n=P6(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=T6(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]=VI(r[i],e.name,t);else if(t==null)for(i in r)r[i]=VI(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 qu(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 T6(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function VI(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=I6,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var $0="http://www.w3.org/1999/xhtml";const WI={svg:"http://www.w3.org/2000/svg",xhtml:$0,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Hl(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),WI.hasOwnProperty(t)?{space:WI[t],local:e}:e}function N6(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===$0&&t.documentElement.namespaceURI===$0?t.createElement(e):t.createElementNS(r,e)}}function A6(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function a2(e){var t=Hl(e);return(t.local?A6:N6)(t)}function M6(){}function Ux(e){return e==null?M6:function(){return this.querySelector(e)}}function D6(e){typeof e!="function"&&(e=Ux(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=new Array(a),l,d,f=0;f<a;++f)(l=o[f])&&(d=e.call(l,l.__data__,f,o))&&("__data__"in l&&(d.__data__=l.__data__),u[f]=d);return new cr(n,this._parents)}function j6(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function q6(){return[]}function s2(e){return e==null?q6:function(){return this.querySelectorAll(e)}}function k6(e){return function(){return j6(e.apply(this,arguments))}}function L6(e){typeof e=="function"?e=k6(e):e=s2(e);for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],u=a.length,l,d=0;d<u;++d)(l=a[d])&&(n.push(e.call(l,l.__data__,d,a)),i.push(l));return new cr(n,i)}function u2(e){return function(){return this.matches(e)}}function l2(e){return function(t){return t.matches(e)}}var F6=Array.prototype.find;function B6(e){return function(){return F6.call(this.children,e)}}function $6(){return this.firstElementChild}function z6(e){return this.select(e==null?$6:B6(typeof e=="function"?e:l2(e)))}var H6=Array.prototype.filter;function U6(){return Array.from(this.children)}function V6(e){return function(){return H6.call(this.children,e)}}function W6(e){return this.selectAll(e==null?U6:V6(typeof e=="function"?e:l2(e)))}function G6(e){typeof e!="function"&&(e=u2(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,u=n[i]=[],l,d=0;d<a;++d)(l=o[d])&&e.call(l,l.__data__,d,o)&&u.push(l);return new cr(n,this._parents)}function c2(e){return new Array(e.length)}function K6(){return new cr(this._enter||this._groups.map(c2),this._parents)}function Ku(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ku.prototype={constructor:Ku,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 Y6(e){return function(){return e}}function X6(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 Ku(e,o[a]);for(;a<l;++a)(u=t[a])&&(i[a]=u)}function Z6(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 Ku(e,o[u]);for(u=0;u<f;++u)(l=t[u])&&d.get(p[u])===l&&(i[u]=l)}function J6(e){return e.__data__}function Q6(e,t){if(!arguments.length)return Array.from(this,J6);var r=t?Z6:X6,n=this._parents,i=this._groups;typeof e!="function"&&(e=Y6(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=e8(e.call(f,f&&f.__data__,d,n)),m=v.length,y=u[d]=new Array(m),x=a[d]=new Array(m),b=l[d]=new Array(p);r(f,h,y,x,b,v,t);for(var w=0,E=0,_,S;w<m;++w)if(_=y[w]){for(w>=E&&(E=w+1);!(S=x[E])&&++E<m;);_._next=S||null}}return a=new cr(a,n),a._enter=u,a._exit=l,a}function e8(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function t8(){return new cr(this._exit||this._groups.map(c2),this._parents)}function r8(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 n8(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,o=n.length,a=Math.min(i,o),u=new Array(i),l=0;l<a;++l)for(var d=r[l],f=n[l],h=d.length,p=u[l]=new Array(h),v,m=0;m<h;++m)(v=d[m]||f[m])&&(p[m]=v);for(;l<i;++l)u[l]=r[l];return new cr(u,this._parents)}function i8(){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 o8(e){e||(e=a8);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],u=a.length,l=i[o]=new Array(u),d,f=0;f<u;++f)(d=a[f])&&(l[f]=d);l.sort(t)}return new cr(i,this._parents).order()}function a8(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function s8(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function u8(){return Array.from(this)}function l8(){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 c8(){let e=0;for(const t of this)++e;return e}function f8(){return!this.node()}function d8(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 h8(e){return function(){this.removeAttribute(e)}}function p8(e){return function(){this.removeAttributeNS(e.space,e.local)}}function v8(e,t){return function(){this.setAttribute(e,t)}}function g8(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function m8(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function y8(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 b8(e,t){var r=Hl(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?p8:h8:typeof t=="function"?r.local?y8:m8:r.local?g8:v8)(r,t))}function f2(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function x8(e){return function(){this.style.removeProperty(e)}}function w8(e,t,r){return function(){this.style.setProperty(e,t,r)}}function _8(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function E8(e,t,r){return arguments.length>1?this.each((t==null?x8:typeof t=="function"?_8:w8)(e,t,r??"")):So(this.node(),e)}function So(e,t){return e.style.getPropertyValue(t)||f2(e).getComputedStyle(e,null).getPropertyValue(t)}function S8(e){return function(){delete this[e]}}function O8(e,t){return function(){this[e]=t}}function C8(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function R8(e,t){return arguments.length>1?this.each((t==null?S8:typeof t=="function"?C8:O8)(e,t)):this.node()[e]}function d2(e){return e.trim().split(/^|\s+/)}function Vx(e){return e.classList||new h2(e)}function h2(e){this._node=e,this._names=d2(e.getAttribute("class")||"")}h2.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 p2(e,t){for(var r=Vx(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function v2(e,t){for(var r=Vx(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function I8(e){return function(){p2(this,e)}}function P8(e){return function(){v2(this,e)}}function T8(e,t){return function(){(t.apply(this,arguments)?p2:v2)(this,e)}}function N8(e,t){var r=d2(e+"");if(arguments.length<2){for(var n=Vx(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?T8:t?I8:P8)(r,t))}function A8(){this.textContent=""}function M8(e){return function(){this.textContent=e}}function D8(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function j8(e){return arguments.length?this.each(e==null?A8:(typeof e=="function"?D8:M8)(e)):this.node().textContent}function q8(){this.innerHTML=""}function k8(e){return function(){this.innerHTML=e}}function L8(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function F8(e){return arguments.length?this.each(e==null?q8:(typeof e=="function"?L8:k8)(e)):this.node().innerHTML}function B8(){this.nextSibling&&this.parentNode.appendChild(this)}function $8(){return this.each(B8)}function z8(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function H8(){return this.each(z8)}function U8(e){var t=typeof e=="function"?e:a2(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function V8(){return null}function W8(e,t){var r=typeof e=="function"?e:a2(e),n=t==null?V8:typeof t=="function"?t:Ux(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function G8(){var e=this.parentNode;e&&e.removeChild(this)}function K8(){return this.each(G8)}function Y8(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function X8(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z8(e){return this.select(e?X8:Y8)}function J8(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Q8(e){return function(t){e.call(this,t,this.__data__)}}function eG(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 tG(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 rG(e,t,r){return function(){var n=this.__on,i,o=Q8(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 nG(e,t,r){var n=eG(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?rG:tG,i=0;i<o;++i)this.each(u(n[i],t,r));return this}function g2(e,t,r){var n=f2(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 iG(e,t){return function(){return g2(this,e,t)}}function oG(e,t){return function(){return g2(this,e,t.apply(this,arguments))}}function aG(e,t){return this.each((typeof t=="function"?oG:iG)(e,t))}function*sG(){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 m2=[null];function cr(e,t){this._groups=e,this._parents=t}function rs(){return new cr([[document.documentElement]],m2)}function uG(){return this}cr.prototype=rs.prototype={constructor:cr,select:D6,selectAll:L6,selectChild:z6,selectChildren:W6,filter:G6,data:Q6,enter:K6,exit:t8,join:r8,merge:n8,selection:uG,order:i8,sort:o8,call:s8,nodes:u8,node:l8,size:c8,empty:f8,each:d8,attr:b8,style:E8,property:R8,classed:N8,text:j8,html:F8,raise:$8,lower:H8,append:U8,insert:W8,remove:K8,clone:Z8,datum:J8,on:nG,dispatch:aG,[Symbol.iterator]:sG};function qr(e){return typeof e=="string"?new cr([[document.querySelector(e)]],[document.documentElement]):new cr([[e]],m2)}function lG(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Zr(e,t){if(e=lG(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 cG={passive:!1},$a={capture:!0,passive:!1};function Em(e){e.stopImmediatePropagation()}function ho(e){e.preventDefault(),e.stopImmediatePropagation()}function y2(e){var t=e.document.documentElement,r=qr(e).on("dragstart.drag",ho,$a);"onselectstart"in t?r.on("selectstart.drag",ho,$a):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function b2(e,t){var r=e.document.documentElement,n=qr(e).on("dragstart.drag",null);t&&(n.on("click.drag",ho,$a),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 cu=e=>()=>e;function z0(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}})}z0.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function fG(e){return!e.ctrlKey&&!e.button}function dG(){return this.parentNode}function hG(e,t){return t??{x:e.x,y:e.y}}function pG(){return navigator.maxTouchPoints||"ontouchstart"in this}function vG(){var e=fG,t=dG,r=hG,n=pG,i={},o=zl("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,cG).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,$a).on("mouseup.drag",y,$a),y2(_.view),Em(_),d=!1,u=_.clientX,l=_.clientY,R("start",_))}}function m(_){if(ho(_),!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),b2(_.view,d),ho(_),i.mouse("end",_)}function x(_,S){if(e.call(this,_,S)){var R=_.changedTouches,I=t.call(this,_,S),N=R.length,A,k;for(A=0;A<N;++A)(k=E(this,I,_,S,R[A].identifier,R[A]))&&(Em(_),k("start",_,R[A]))}}function b(_){var S=_.changedTouches,R=S.length,I,N;for(I=0;I<R;++I)(N=i[S[I].identifier])&&(ho(_),N("drag",_,S[I]))}function w(_){var S=_.changedTouches,R=S.length,I,N;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),I=0;I<R;++I)(N=i[S[I].identifier])&&(Em(_),N("end",_,S[I]))}function E(_,S,R,I,N,A){var k=o.copy(),L=Zr(A||R,S),$,j,D;if((D=r.call(_,new z0("beforestart",{sourceEvent:R,target:p,identifier:N,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 W(F,X,Z){var Q=L,U;switch(F){case"start":i[N]=W,U=a++;break;case"end":delete i[N],--a;case"drag":L=Zr(Z||X,S),U=a;break}k.call(F,_,new z0(F,{sourceEvent:X,subject:D,target:p,identifier:N,active:U,x:L[0]+$,y:L[1]+j,dx:L[0]-Q[0],dy:L[1]-Q[1],dispatch:k}),I)}}return p.filter=function(_){return arguments.length?(e=typeof _=="function"?_:cu(!!_),p):e},p.container=function(_){return arguments.length?(t=typeof _=="function"?_:cu(_),p):t},p.subject=function(_){return arguments.length?(r=typeof _=="function"?_:cu(_),p):r},p.touchable=function(_){return arguments.length?(n=typeof _=="function"?_:cu(!!_),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 Wx(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function x2(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function ns(){}var za=.7,Yu=1/za,po="\\s*([+-]?\\d+)\\s*",Ha="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gG=/^#([0-9a-f]{3,8})$/,mG=new RegExp(`^rgb\\(${po},${po},${po}\\)$`),yG=new RegExp(`^rgb\\(${tn},${tn},${tn}\\)$`),bG=new RegExp(`^rgba\\(${po},${po},${po},${Ha}\\)$`),xG=new RegExp(`^rgba\\(${tn},${tn},${tn},${Ha}\\)$`),wG=new RegExp(`^hsl\\(${Ha},${tn},${tn}\\)$`),_G=new RegExp(`^hsla\\(${Ha},${tn},${tn},${Ha}\\)$`),GI={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};Wx(ns,Ua,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:KI,formatHex:KI,formatHex8:EG,formatHsl:SG,formatRgb:YI,toString:YI});function KI(){return this.rgb().formatHex()}function EG(){return this.rgb().formatHex8()}function SG(){return w2(this).formatHsl()}function YI(){return this.rgb().formatRgb()}function Ua(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=gG.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?XI(t):r===3?new Gt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?fu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?fu(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=mG.exec(e))?new Gt(t[1],t[2],t[3],1):(t=yG.exec(e))?new Gt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=bG.exec(e))?fu(t[1],t[2],t[3],t[4]):(t=xG.exec(e))?fu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wG.exec(e))?QI(t[1],t[2]/100,t[3]/100,1):(t=_G.exec(e))?QI(t[1],t[2]/100,t[3]/100,t[4]):GI.hasOwnProperty(e)?XI(GI[e]):e==="transparent"?new Gt(NaN,NaN,NaN,0):null}function XI(e){return new Gt(e>>16&255,e>>8&255,e&255,1)}function fu(e,t,r,n){return n<=0&&(e=t=r=NaN),new Gt(e,t,r,n)}function OG(e){return e instanceof ns||(e=Ua(e)),e?(e=e.rgb(),new Gt(e.r,e.g,e.b,e.opacity)):new Gt}function H0(e,t,r,n){return arguments.length===1?OG(e):new Gt(e,t,r,n??1)}function Gt(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Wx(Gt,H0,x2(ns,{brighter(e){return e=e==null?Yu:Math.pow(Yu,e),new Gt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?za:Math.pow(za,e),new Gt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Gt(mi(this.r),mi(this.g),mi(this.b),Xu(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:ZI,formatHex:ZI,formatHex8:CG,formatRgb:JI,toString:JI}));function ZI(){return`#${vi(this.r)}${vi(this.g)}${vi(this.b)}`}function CG(){return`#${vi(this.r)}${vi(this.g)}${vi(this.b)}${vi((isNaN(this.opacity)?1:this.opacity)*255)}`}function JI(){const e=Xu(this.opacity);return`${e===1?"rgb(":"rgba("}${mi(this.r)}, ${mi(this.g)}, ${mi(this.b)}${e===1?")":`, ${e})`}`}function Xu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vi(e){return e=mi(e),(e<16?"0":"")+e.toString(16)}function QI(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 w2(e){if(e instanceof kr)return new kr(e.h,e.s,e.l,e.opacity);if(e instanceof ns||(e=Ua(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 RG(e,t,r,n){return arguments.length===1?w2(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}Wx(kr,RG,x2(ns,{brighter(e){return e=e==null?Yu:Math.pow(Yu,e),new kr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?za:Math.pow(za,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 Gt(Sm(e>=240?e-240:e+120,i,n),Sm(e,i,n),Sm(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new kr(eP(this.h),du(this.s),du(this.l),Xu(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=Xu(this.opacity);return`${e===1?"hsl(":"hsla("}${eP(this.h)}, ${du(this.s)*100}%, ${du(this.l)*100}%${e===1?")":`, ${e})`}`}}));function eP(e){return e=(e||0)%360,e<0?e+360:e}function du(e){return Math.max(0,Math.min(1,e||0))}function Sm(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 _2=e=>()=>e;function IG(e,t){return function(r){return e+r*t}}function PG(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 TG(e){return(e=+e)==1?E2:function(t,r){return r-t?PG(t,r,e):_2(isNaN(t)?r:t)}}function E2(e,t){var r=t-e;return r?IG(e,r):_2(isNaN(e)?t:e)}const tP=(function e(t){var r=TG(t);function n(i,o){var a=r((i=H0(i)).r,(o=H0(o)).r),u=r(i.g,o.g),l=r(i.b,o.b),d=E2(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 zn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var U0=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Om=new RegExp(U0.source,"g");function NG(e){return function(){return e}}function AG(e){return function(t){return e(t)+""}}function MG(e,t){var r=U0.lastIndex=Om.lastIndex=0,n,i,o,a=-1,u=[],l=[];for(e=e+"",t=t+"";(n=U0.exec(e))&&(i=Om.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:zn(n,i)})),r=Om.lastIndex;return r<t.length&&(o=t.slice(r),u[a]?u[a]+=o:u[++a]=o),u.length<2?l[0]?AG(l[0].x):NG(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 rP=180/Math.PI,V0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function S2(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)*rP,skewX:Math.atan(l)*rP,scaleX:a,scaleY:u}}var hu;function DG(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?V0:S2(t.a,t.b,t.c,t.d,t.e,t.f)}function jG(e){return e==null||(hu||(hu=document.createElementNS("http://www.w3.org/2000/svg","g")),hu.setAttribute("transform",e),!(e=hu.transform.baseVal.consolidate()))?V0:(e=e.matrix,S2(e.a,e.b,e.c,e.d,e.e,e.f))}function O2(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:zn(d,h)},{i:y-2,x:zn(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:zn(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:zn(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:zn(d,h)},{i:y-2,x:zn(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 qG=O2(DG,"px, ","px)","deg)"),kG=O2(jG,", ",")",")"),LG=1e-12;function nP(e){return((e=Math.exp(e))+1/e)/2}function FG(e){return((e=Math.exp(e))-1/e)/2}function BG(e){return((e=Math.exp(2*e))-1)/(e+1)}const $G=(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<LG)b=Math.log(p/d)/t,x=function(I){return[u+I*v,l+I*m,d*Math.exp(t*I*b)]};else{var w=Math.sqrt(y),E=(p*p-d*d+n*y)/(2*d*r*w),_=(p*p-d*d-n*y)/(2*p*r*w),S=Math.log(Math.sqrt(E*E+1)-E),R=Math.log(Math.sqrt(_*_+1)-_);b=(R-S)/t,x=function(I){var N=I*b,A=nP(S),k=d/(r*w)*(A*BG(t*N+S)-FG(S));return[u+k*v,l+k*m,d*A/nP(t*N+S)]}}return x.duration=b*1e3*t/Math.SQRT2,x}return i.rho=function(o){var a=Math.max(.001,+o),u=a*a,l=u*u;return e(a,u,l)},i})(Math.SQRT2,2,4);var Oo=0,Ta=0,sa=0,C2=1e3,Zu,Na,Ju=0,Si=0,Ul=0,Va=typeof performance=="object"&&performance.now?performance:Date,R2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Gx(){return Si||(R2(zG),Si=Va.now()+Ul)}function zG(){Si=0}function Qu(){this._call=this._time=this._next=null}Qu.prototype=I2.prototype={constructor:Qu,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Gx():+r)+(t==null?0:+t),!this._next&&Na!==this&&(Na?Na._next=this:Zu=this,Na=this),this._call=e,this._time=r,W0()},stop:function(){this._call&&(this._call=null,this._time=1/0,W0())}};function I2(e,t,r){var n=new Qu;return n.restart(e,t,r),n}function HG(){Gx(),++Oo;for(var e=Zu,t;e;)(t=Si-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Oo}function iP(){Si=(Ju=Va.now())+Ul,Oo=Ta=0;try{HG()}finally{Oo=0,VG(),Si=0}}function UG(){var e=Va.now(),t=e-Ju;t>C2&&(Ul-=t,Ju=e)}function VG(){for(var e,t=Zu,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:Zu=r);Na=e,W0(n)}function W0(e){if(!Oo){Ta&&(Ta=clearTimeout(Ta));var t=e-Si;t>24?(e<1/0&&(Ta=setTimeout(iP,e-Va.now()-Ul)),sa&&(sa=clearInterval(sa))):(sa||(Ju=Va.now(),sa=setInterval(UG,C2)),Oo=1,R2(iP))}}function oP(e,t,r){var n=new Qu;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var WG=zl("start","end","cancel","interrupt"),GG=[],P2=0,aP=1,G0=2,ku=3,sP=4,K0=5,Lu=6;function Vl(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;KG(e,r,{name:t,index:n,group:i,on:WG,tween:GG,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:P2})}function Kx(e,t){var r=Ur(e,t);if(r.state>P2)throw new Error("too late; already scheduled");return r}function sn(e,t){var r=Ur(e,t);if(r.state>ku)throw new Error("too late; already running");return r}function Ur(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function KG(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=I2(o,0,r.time);function o(d){r.state=aP,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!==aP)return l();for(f in n)if(v=n[f],v.name===r.name){if(v.state===ku)return oP(a);v.state===sP?(v.state=Lu,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[f]):+f<t&&(v.state=Lu,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[f])}if(oP(function(){r.state===ku&&(r.state=sP,r.timer.restart(u,r.delay,r.time),u(d))}),r.state=G0,r.on.call("start",e,e.__data__,r.index,r.group),r.state===G0){for(r.state=ku,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=K0,1),h=-1,p=i.length;++h<p;)i[h].call(e,f);r.state===K0&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Lu,r.timer.stop(),delete n[t];for(var d in n)return;delete e.__transition}}function Fu(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>G0&&n.state<K0,n.state=Lu,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function YG(e){return this.each(function(){Fu(this,e)})}function XG(e,t){var r,n;return function(){var i=sn(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 ZG(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=sn(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 JG(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Ur(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?XG:ZG)(r,e,t))}function Yx(e,t,r){var n=e._id;return e.each(function(){var i=sn(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Ur(i,n).value[t]}}function T2(e,t){var r;return(typeof t=="number"?zn:t instanceof Ua?tP:(r=Ua(t))?(t=r,tP):MG)(e,t)}function QG(e){return function(){this.removeAttribute(e)}}function eK(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tK(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 rK(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 nK(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 iK(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 oK(e,t){var r=Hl(e),n=r==="transform"?kG:T2;return this.attrTween(e,typeof t=="function"?(r.local?iK:nK)(r,n,Yx(this,"attr."+e,t)):t==null?(r.local?eK:QG)(r):(r.local?rK:tK)(r,n,t))}function aK(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function sK(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function uK(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&sK(e,o)),r}return i._value=t,i}function lK(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&aK(e,o)),r}return i._value=t,i}function cK(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=Hl(e);return this.tween(r,(n.local?uK:lK)(n,t))}function fK(e,t){return function(){Kx(this,e).delay=+t.apply(this,arguments)}}function dK(e,t){return t=+t,function(){Kx(this,e).delay=t}}function hK(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?fK:dK)(t,e)):Ur(this.node(),t).delay}function pK(e,t){return function(){sn(this,e).duration=+t.apply(this,arguments)}}function vK(e,t){return t=+t,function(){sn(this,e).duration=t}}function gK(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?pK:vK)(t,e)):Ur(this.node(),t).duration}function mK(e,t){if(typeof t!="function")throw new Error;return function(){sn(this,e).ease=t}}function yK(e){var t=this._id;return arguments.length?this.each(mK(t,e)):Ur(this.node(),t).ease}function bK(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;sn(this,e).ease=r}}function xK(e){if(typeof e!="function")throw new Error;return this.each(bK(this._id,e))}function wK(e){typeof e!="function"&&(e=u2(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 _n(n,this._parents,this._name,this._id)}function _K(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 _n(a,this._parents,this._name,this._id)}function EK(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 SK(e,t,r){var n,i,o=EK(t)?Kx:sn;return function(){var a=o(this,e),u=a.on;u!==n&&(i=(n=u).copy()).on(t,r),a.on=i}}function OK(e,t){var r=this._id;return arguments.length<2?Ur(this.node(),r).on.on(e):this.each(SK(r,e,t))}function CK(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function RK(){return this.on("end.remove",CK(this._id))}function IK(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ux(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,Vl(d[p],t,r,p,d,Ur(f,r)));return new _n(o,this._parents,t,r)}function PK(e){var t=this._name,r=this._id;typeof e!="function"&&(e=s2(e));for(var n=this._groups,i=n.length,o=[],a=[],u=0;u<i;++u)for(var l=n[u],d=l.length,f,h=0;h<d;++h)if(f=l[h]){for(var p=e.call(f,f.__data__,h,l),v,m=Ur(f,r),y=0,x=p.length;y<x;++y)(v=p[y])&&Vl(v,t,r,y,p,m);o.push(p),a.push(f)}return new _n(o,a,t,r)}var TK=rs.prototype.constructor;function NK(){return new TK(this._groups,this._parents)}function AK(e,t){var r,n,i;return function(){var o=So(this,e),a=(this.style.removeProperty(e),So(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function N2(e){return function(){this.style.removeProperty(e)}}function MK(e,t,r){var n,i=r+"",o;return function(){var a=So(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function DK(e,t,r){var n,i,o;return function(){var a=So(this,e),u=r(this),l=u+"";return u==null&&(l=u=(this.style.removeProperty(e),So(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,u))}}function jK(e,t){var r,n,i,o="style."+t,a="end."+o,u;return function(){var l=sn(this,e),d=l.on,f=l.value[o]==null?u||(u=N2(t)):void 0;(d!==r||i!==f)&&(n=(r=d).copy()).on(a,i=f),l.on=n}}function qK(e,t,r){var n=(e+="")=="transform"?qG:T2;return t==null?this.styleTween(e,AK(e,n)).on("end.style."+e,N2(e)):typeof t=="function"?this.styleTween(e,DK(e,n,Yx(this,"style."+e,t))).each(jK(this._id,e)):this.styleTween(e,MK(e,n,t),r).on("end.style."+e,null)}function kK(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function LK(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&kK(e,a,r)),n}return o._value=t,o}function FK(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,LK(e,t,r??""))}function BK(e){return function(){this.textContent=e}}function $K(e){return function(){var t=e(this);this.textContent=t??""}}function zK(e){return this.tween("text",typeof e=="function"?$K(Yx(this,"text",e)):BK(e==null?"":e+""))}function HK(e){return function(t){this.textContent=e.call(this,t)}}function UK(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&HK(i)),t}return n._value=e,n}function VK(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,UK(e))}function WK(){for(var e=this._name,t=this._id,r=A2(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],u=a.length,l,d=0;d<u;++d)if(l=a[d]){var f=Ur(l,t);Vl(l,e,r,d,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new _n(n,this._parents,e,r)}function GK(){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=sn(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 KK=0;function _n(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function A2(){return++KK}var yn=rs.prototype;_n.prototype={constructor:_n,select:IK,selectAll:PK,selectChild:yn.selectChild,selectChildren:yn.selectChildren,filter:wK,merge:_K,selection:NK,transition:WK,call:yn.call,nodes:yn.nodes,node:yn.node,size:yn.size,empty:yn.empty,each:yn.each,on:OK,attr:oK,attrTween:cK,style:qK,styleTween:FK,text:zK,textTween:VK,remove:RK,tween:JG,delay:hK,duration:gK,ease:yK,easeVarying:xK,end:GK,[Symbol.iterator]:yn[Symbol.iterator]};function YK(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var XK={time:null,delay:0,duration:250,ease:YK};function ZK(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 JK(e){var t,r;e instanceof _n?(t=e._id,e=e._name):(t=A2(),(r=XK).time=Gx(),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])&&Vl(l,e,t,d,a,r||ZK(l,t));return new _n(n,this._parents,e,t)}rs.prototype.interrupt=YG;rs.prototype.transition=JK;const pu=e=>()=>e;function QK(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 xn(e,t,r){this.k=e,this.x=t,this.y=r}xn.prototype={constructor:xn,scale:function(e){return e===1?this:new xn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new xn(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 yi=new xn(1,0,0);xn.prototype;function Cm(e){e.stopImmediatePropagation()}function ua(e){e.preventDefault(),e.stopImmediatePropagation()}function eY(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function tY(){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 uP(){return this.__zoom||yi}function rY(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function nY(){return navigator.maxTouchPoints||"ontouchstart"in this}function iY(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 oY(){var e=eY,t=tY,r=iY,n=rY,i=nY,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],u=250,l=$G,d=zl("start","zoom","end"),f,h,p,v=500,m=150,y=0,x=10;function b(D){D.property("__zoom",uP).on("wheel.zoom",N,{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,W,F,X){var Z=D.selection?D.selection():D;Z.property("__zoom",uP),D!==Z?S(D,W,F,X):Z.interrupt().each(function(){R(this,arguments).event(X).start().zoom(null,typeof W=="function"?W.apply(this,arguments):W).end()})},b.scaleBy=function(D,W,F,X){b.scaleTo(D,function(){var Z=this.__zoom.k,Q=typeof W=="function"?W.apply(this,arguments):W;return Z*Q},F,X)},b.scaleTo=function(D,W,F,X){b.transform(D,function(){var Z=t.apply(this,arguments),Q=this.__zoom,U=F==null?_(Z):typeof F=="function"?F.apply(this,arguments):F,ee=Q.invert(U),ie=typeof W=="function"?W.apply(this,arguments):W;return r(E(w(Q,ie),U,ee),Z,a)},F,X)},b.translateBy=function(D,W,F,X){b.transform(D,function(){return r(this.__zoom.translate(typeof W=="function"?W.apply(this,arguments):W,typeof F=="function"?F.apply(this,arguments):F),t.apply(this,arguments),a)},null,X)},b.translateTo=function(D,W,F,X,Z){b.transform(D,function(){var Q=t.apply(this,arguments),U=this.__zoom,ee=X==null?_(Q):typeof X=="function"?X.apply(this,arguments):X;return r(yi.translate(ee[0],ee[1]).scale(U.k).translate(typeof W=="function"?-W.apply(this,arguments):-W,typeof F=="function"?-F.apply(this,arguments):-F),Q,a)},X,Z)};function w(D,W){return W=Math.max(o[0],Math.min(o[1],W)),W===D.k?D:new xn(W,D.x,D.y)}function E(D,W,F){var X=W[0]-F[0]*D.k,Z=W[1]-F[1]*D.k;return X===D.x&&Z===D.y?D:new xn(D.k,X,Z)}function _(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function S(D,W,F,X){D.on("start.zoom",function(){R(this,arguments).event(X).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(X).end()}).tween("zoom",function(){var Z=this,Q=arguments,U=R(Z,Q).event(X),ee=t.apply(Z,Q),ie=F==null?_(ee):typeof F=="function"?F.apply(Z,Q):F,ue=Math.max(ee[1][0]-ee[0][0],ee[1][1]-ee[0][1]),B=Z.__zoom,V=typeof W=="function"?W.apply(Z,Q):W,J=l(B.invert(ie).concat(ue/B.k),V.invert(ie).concat(ue/V.k));return function(H){if(H===1)H=V;else{var G=J(H),se=ue/G[2];H=new xn(se,ie[0]-G[0]*se,ie[1]-G[1]*se)}U.zoom(null,H)}})}function R(D,W,F){return!F&&D.__zooming||new I(D,W)}function I(D,W){this.that=D,this.args=W,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,W),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,W){return this.mouse&&D!=="mouse"&&(this.mouse[1]=W.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=W.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=W.invert(this.touch1[0])),this.that.__zoom=W,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var W=qr(this.that).datum();d.call(D,this.that,new QK(D,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:d}),W)}};function N(D,...W){if(!e.apply(this,arguments))return;var F=R(this,W).event(D),X=this.__zoom,Z=Math.max(o[0],Math.min(o[1],X.k*Math.pow(2,n.apply(this,arguments)))),Q=Zr(D);if(F.wheel)(F.mouse[0][0]!==Q[0]||F.mouse[0][1]!==Q[1])&&(F.mouse[1]=X.invert(F.mouse[0]=Q)),clearTimeout(F.wheel);else{if(X.k===Z)return;F.mouse=[Q,X.invert(Q)],Fu(this),F.start()}ua(D),F.wheel=setTimeout(U,m),F.zoom("mouse",r(E(w(X,Z),F.mouse[0],F.mouse[1]),F.extent,a));function U(){F.wheel=null,F.end()}}function A(D,...W){if(p||!e.apply(this,arguments))return;var F=D.currentTarget,X=R(this,W,!0).event(D),Z=qr(D.view).on("mousemove.zoom",ie,!0).on("mouseup.zoom",ue,!0),Q=Zr(D,F),U=D.clientX,ee=D.clientY;y2(D.view),Cm(D),X.mouse=[Q,this.__zoom.invert(Q)],Fu(this),X.start();function ie(B){if(ua(B),!X.moved){var V=B.clientX-U,J=B.clientY-ee;X.moved=V*V+J*J>y}X.event(B).zoom("mouse",r(E(X.that.__zoom,X.mouse[0]=Zr(B,F),X.mouse[1]),X.extent,a))}function ue(B){Z.on("mousemove.zoom mouseup.zoom",null),b2(B.view,X.moved),ua(B),X.event(B).end()}}function k(D,...W){if(e.apply(this,arguments)){var F=this.__zoom,X=Zr(D.changedTouches?D.changedTouches[0]:D,this),Z=F.invert(X),Q=F.k*(D.shiftKey?.5:2),U=r(E(w(F,Q),X,Z),t.apply(this,W),a);ua(D),u>0?qr(this).transition().duration(u).call(S,U,X,D):qr(this).call(b.transform,U,X,D)}}function L(D,...W){if(e.apply(this,arguments)){var F=D.touches,X=F.length,Z=R(this,W,D.changedTouches.length===X).event(D),Q,U,ee,ie;for(Cm(D),U=0;U<X;++U)ee=F[U],ie=Zr(ee,this),ie=[ie,this.__zoom.invert(ie),ee.identifier],Z.touch0?!Z.touch1&&Z.touch0[2]!==ie[2]&&(Z.touch1=ie,Z.taps=0):(Z.touch0=ie,Q=!0,Z.taps=1+!!f);f&&(f=clearTimeout(f)),Q&&(Z.taps<2&&(h=ie[0],f=setTimeout(function(){f=null},v)),Fu(this),Z.start())}}function $(D,...W){if(this.__zooming){var F=R(this,W).event(D),X=D.changedTouches,Z=X.length,Q,U,ee,ie;for(ua(D),Q=0;Q<Z;++Q)U=X[Q],ee=Zr(U,this),F.touch0&&F.touch0[2]===U.identifier?F.touch0[0]=ee:F.touch1&&F.touch1[2]===U.identifier&&(F.touch1[0]=ee);if(U=F.that.__zoom,F.touch1){var ue=F.touch0[0],B=F.touch0[1],V=F.touch1[0],J=F.touch1[1],H=(H=V[0]-ue[0])*H+(H=V[1]-ue[1])*H,G=(G=J[0]-B[0])*G+(G=J[1]-B[1])*G;U=w(U,Math.sqrt(H/G)),ee=[(ue[0]+V[0])/2,(ue[1]+V[1])/2],ie=[(B[0]+J[0])/2,(B[1]+J[1])/2]}else if(F.touch0)ee=F.touch0[0],ie=F.touch0[1];else return;F.zoom("touch",r(E(U,ee,ie),F.extent,a))}}function j(D,...W){if(this.__zooming){var F=R(this,W).event(D),X=D.changedTouches,Z=X.length,Q,U;for(Cm(D),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),Q=0;Q<Z;++Q)U=X[Q],F.touch0&&F.touch0[2]===U.identifier?delete F.touch0:F.touch1&&F.touch1[2]===U.identifier&&delete F.touch1;if(F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0)F.touch0[1]=this.__zoom.invert(F.touch0[0]);else if(F.end(),F.taps===2&&(U=Zr(U,this),Math.hypot(h[0]-U[0],h[1]-U[1])<x)){var ee=qr(this).on("dblclick.zoom");ee&&ee.apply(this,arguments)}}}return b.wheelDelta=function(D){return arguments.length?(n=typeof D=="function"?D:pu(+D),b):n},b.filter=function(D){return arguments.length?(e=typeof D=="function"?D:pu(!!D),b):e},b.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:pu(!!D),b):i},b.extent=function(D){return arguments.length?(t=typeof D=="function"?D:pu([[+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 Y0(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 M2(e,t){if(e){if(typeof e=="string")return Y0(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 Y0(e,t)}}function aY(e){if(Array.isArray(e))return e}function sY(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 uY(){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 ke(e,t){return aY(e)||sY(e,t)||M2(e,t)||uY()}var Co;(function(e){e.Strict="strict",e.Loose="loose"})(Co||(Co={}));var Oi;(function(e){e.Lines="lines",e.Dots="dots"})(Oi||(Oi={}));var vo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(vo||(vo={}));var Un;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Un||(Un={}));var el;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(el||(el={}));var Se;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Se||(Se={}));var Xx=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},go=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:go(t.x,r[0][0],r[1][0]),y:go(t.y,r[0][1],r[1][1])}},j2=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)},lY=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)}},tl=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}},cY=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}},q2=function(t){return!isNaN(t)&&isFinite(t)},Tt=Symbol("internals");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 Aa(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}function cP(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=Aa({},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 k2(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(Aa(Aa({},i),{},{selected:o.selected})),n;case"position":{var a=Aa({},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&&cP(n,a),n.push(a),n}case"dimensions":{var u=Aa({},i);return typeof o.dimensions<"u"&&(u.width=o.dimensions.width,u.height=o.dimensions.height),u.expandParent&&cP(n,u),n.push(u),n}case"remove":return n}return n.push(i),n},r)}function L2(e,t){return k2(e,t)}function fY(e,t){return k2(e,t)}var Hn=function(t,r){return{id:t,type:"select",selected:r}};function lo(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Hn(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Hn(n.id,!1))),r},[])}function fP(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 F2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var dP=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 F2({id:u.getAttribute("data-handleid"),position:u.getAttribute("data-handlepos"),x:(l.left-a.left)/n,y:(l.top-a.top)/n},Xx(u))})};function la(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,F2({},i))}}function B2(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 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 qa(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){He(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 dY=function(t){return"id"in t&&"source"in t&&"target"in t},hY=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||"")},X0=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("&"))},pY=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)})},vY=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 dY(t)?n=qa({},t):n=qa(qa({},t),{},{id:hY(t)}),pY(n,r)?r:r.concat(n)},$2=function(t,r,n,i){var o=t.x,a=t.y,u=ke(r,3),l=u[0],d=u[1],f=u[2],h=ke(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},Zx=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 lY(n,tl({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 cY(r)},z2=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],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=tl({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=tl(qa(qa({},v),{},{width:m||0,height:y||0})),E=Math.max(0,Math.min(f.x2,w.x2)-Math.max(f.x,w.x)),_=Math.max(0,Math.min(f.y2,w.y2)-Math.max(f.y,w.y)),S=Math.ceil(E*_),R=typeof m>"u"||typeof y>"u"||m===null||y===null,I=l&&S>0,N=(m||0)*(y||0),A=R||I||S>=N;A&&h.push(p)}),h},H2=function(t,r){var n=t.map(function(i){return i.id});return r.filter(function(i){return n.includes(i.source)||n.includes(i.target)})},U2=function(t,r,n,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:.1,u=r/(t.width*(1+a)),l=n/(t.height*(1+a)),d=Math.min(u,l),f=go(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]},di=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};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 co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function V2(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 V2(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[Tt])===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[Tt])===null||m===void 0?void 0:m.z)!==null&&v!==void 0?v:0:(y=n.z)!==null&&y!==void 0?y:0})}function Rm(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=q2(i.zIndex)?i.zIndex:i.selected?1e3:0,u=t.get(i.id),l=co(co({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,Tt,{enumerable:!1,value:{handleBounds:u==null||(o=u[Tt])===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=V2(i,r,n,co(co({},i.position),{},{z:(o=(a=i[Tt])===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[Tt].z=f,n[i.id]&&(i[Tt].isParent=!0)}}),r}function W2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e(),n=r.nodeInternals,i=r.width,o=r.height,a=r.minZoom,u=r.maxZoom,l=r.d3Zoom,d=r.d3Selection,f=r.fitViewOnInitDone,h=r.fitViewOnInit;if((t.initial&&!f&&h||!t.initial)&&l&&d){var p=Array.from(n.values()).filter(function(N){return t.includeHiddenNodes?N.width&&N.height:!N.hidden}),v=p.every(function(N){return N.width&&N.height});if(p.length>0&&v){var m,y,x,b=Zx(p),w=U2(b,i,o,(m=t.minZoom)!==null&&m!==void 0?m:a,(y=t.maxZoom)!==null&&y!==void 0?y:u,(x=t.padding)!==null&&x!==void 0?x:.1),E=ke(w,3),_=E[0],S=E[1],R=E[2],I=yi.translate(_,S).scale(R);return typeof t.duration=="number"&&t.duration>0?l.transform(di(d,t.duration),I):l.transform(d,I),!0}}return!1}function gY(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,co(co({},n),{},(i={},He(i,Tt,n[Tt]),He(i,"selected",r.selected),i)))}}),new Map(t)}function mY(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 vu(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:gY(t,a)}),l==null||l(t)),r!=null&&r.length&&(h&&i({edges:mY(r,u)}),d==null||d(r))}var Z0=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],vP={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:Z0,nodeExtent:Z0,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:Co.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 gP(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?gP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Jx=R6(),yY=Jx.Provider,gt=Jx.useStore,Bt=Jx.useStoreApi,bY=function(){return C6(function(t,r){return Yr(Yr({},vP),{},{setNodes:function(i){t({nodeInternals:Rm(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?Rm(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=Xx(E.nodeElement),R=!!(S.width&&S.height&&(_.width!==S.width||_.height!==S.height||E.forceUpdate));R&&(u.set(_.id,Yr(Yr({},_),{},He({},Tt,Yr(Yr({},_[Tt]),{},{handleBounds:{source:dP(".source",E.nodeElement,y),target:dP(".target",E.nodeElement,y)}})),S)),w.push({id:_.id,type:"dimensions",dimensions:S}))}return w},[]),b=d||l&&!d&&W2(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=L2(h,Array.from(d.values())),v=Rm(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 Hn(h,!0)}):(d=lo(Array.from(u.values()),i),f=lo(l,[])),vu({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 Hn(h,!0)}):(d=lo(u,i),f=lo(Array.from(l.values()),[])),vu({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,Hn(m.id,!1)}),v=h.map(function(m){return Hn(m.id,!1)});vu({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 Hn(f.id,!1)}),d=a.filter(function(f){return f.selected}).map(function(f){return Hn(f.id,!1)});vu({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({},vP))}})})};function fr(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=fr(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Zt(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 xY(e){if(Array.isArray(e))return Y0(e)}function wY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _Y(){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 bi(e){return xY(e)||wY(e)||M2(e)||_Y()}var EY={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},SY=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},OY=function(){var t=Bt(),r=gt(SY,Zt),n=r.d3Zoom,i=r.d3Selection,o=P.useMemo(function(){return i&&n?{zoomIn:function(u){return n.scaleBy(di(i,u==null?void 0:u.duration),1.2)},zoomOut:function(u){return n.scaleBy(di(i,u==null?void 0:u.duration),1/1.2)},zoomTo:function(u,l){return n.scaleTo(di(i,l==null?void 0:l.duration),u)},getZoom:function(){return t.getState().transform[2]},setViewport:function(u,l){var d,f,h,p=ke(t.getState().transform,3),v=p[0],m=p[1],y=p[2],x=yi.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(di(i,l==null?void 0:l.duration),x)},getViewport:function(){var u=ke(t.getState().transform,3),l=u[0],d=u[1],f=u[2];return{x:l,y:d,zoom:f}},fitView:function(u){return W2(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=yi.translate(y,x).scale(m);n.transform(di(i,d==null?void 0:d.duration),b)},fitBounds:function(u,l){var d,f=t.getState(),h=f.width,p=f.height,v=f.minZoom,m=f.maxZoom,y=U2(u,h,p,v,m,(d=l==null?void 0:l.padding)!==null&&d!==void 0?d:.1),x=ke(y,3),b=x[0],w=x[1],E=x[2],_=yi.translate(b,w).scale(E);n.transform(di(i,l==null?void 0:l.duration),_)},project:function(u){var l=t.getState(),d=l.transform,f=l.snapToGrid,h=l.snapGrid;return $2(u,d,f,h)},viewportInitialized:!0}:EY},[n,i]);return o};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 to(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){He(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}function G2(){var e=OY(),t=Bt(),r=P.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(m){return to({},m)})},[]),n=P.useCallback(function(h){var p=t.getState(),v=p.nodeInternals;return v.get(h)},[]),i=P.useCallback(function(){var h=t.getState(),p=h.edges,v=p===void 0?[]:p;return v.map(function(m){return to({},m)})},[]),o=P.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=P.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=P.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=P.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,bi(p));y(E)}else if(b){var _=p.map(function(S){return{item:S,type:"add"}});b(_)}},[]),d=P.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(bi(y),bi(p)));else if(w){var E=p.map(function(_){return{item:_,type:"add"}});w(E)}},[]),f=P.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=ke(y,3),w=b[0],E=b[1],_=b[2];return{nodes:x.map(function(S){return to({},S)}),edges:m.map(function(S){return to({},S)}),viewport:{x:w,y:E,zoom:_}}},[]);return P.useMemo(function(){return to(to({},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 CY(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 Wl(e,t){if(e==null)return{};var r=CY(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 RY(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},P.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function IY(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},P.createElement("path",{d:"M0 0h32v4.2H0z"}))}function PY(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},P.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 TY(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},P.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 NY(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},P.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 AY=["children","className"];function yP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function MY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gu=function(t){var r=t.children,n=t.className,i=Wl(t,AY);return P.createElement("button",MY({type:"button",className:fr(["react-flow__controls-button",n])},i),r)},DY=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},jY=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=Bt(),b=P.useState(!1),w=ke(b,2),E=w[0],_=w[1],S=gt(DY),R=G2(),I=R.zoomIn,N=R.zoomOut,A=R.fitView;if(P.useEffect(function(){_(!0)},[]),!E)return null;var k=function(){I==null||I(),f==null||f()},L=function(){N==null||N(),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 P.createElement("div",{className:fr(["react-flow__controls",m]),style:r},i&&P.createElement(P.Fragment,null,P.createElement(gu,{onClick:k,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},P.createElement(RY,null)),P.createElement(gu,{onClick:L,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},P.createElement(IY,null))),a&&P.createElement(gu,{className:"react-flow__controls-fitview",onClick:$,title:"fit view","aria-label":"fit view"},P.createElement(PY,null)),l&&P.createElement(gu,{className:"react-flow__controls-interactive",onClick:j,title:"toggle interactivity","aria-label":"toggle interactivity"},S?P.createElement(NY,null):P.createElement(TY,null)),y)};jY.displayName="Controls";var qY=function(t,r,n){return P.createElement("path",{stroke:n,strokeWidth:r,d:"M".concat(t/2," 0 V").concat(t," M0 ").concat(t/2," H").concat(t)})},kY=function(t,r){return P.createElement("circle",{cx:t,cy:t,r:t,fill:r})},mu;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 xP(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){He(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 LY=(mu={},He(mu,Oi.Dots,"#81818a"),He(mu,Oi.Lines,"#eee"),mu),FY=function(t){return t.transform},K2=function(t){var r=t.variant,n=r===void 0?Oi.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=P.useRef(null),p=P.useState(null),v=ke(p,2),m=v[0],y=v[1],x=gt(FY),b=ke(x,3),w=b[0],E=b[1],_=b[2];P.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,N=n===Oi.Lines,A=l||LY[n],k=N?qY(S,u,A):kY(u*_,A);return P.createElement("svg",{className:fr(["react-flow__background","react-flow__container",f]),style:xP(xP({},d),{},{width:"100%",height:"100%"}),ref:h},m&&P.createElement(P.Fragment,null,P.createElement("pattern",{id:m,x:R,y:I,width:S,height:S,patternUnits:"userSpaceOnUse"},k),P.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(m,")")})))};K2.displayName="Background";var BY=P.memo(K2),$Y=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function zY(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&$Y.includes(t==null?void 0:t.account)&&t!==null&&t!==void 0&&t.hideAttribution)return null;var i="".concat(n).split("-");return P.createElement("div",{className:fr(["react-flow__attribution"].concat(bi(i))),"data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev/pricing"},P.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer"},"React Flow"))}var HY=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function wP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function UY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var VY=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=Wl(t,HY),w=P.useRef(null),E=P.useState({x:0,y:0,width:0,height:0}),_=ke(E,2),S=_[0],R=_[1],I=fr(["react-flow__edge-textwrapper",x]);return P.useEffect(function(){if(w.current){var N=w.current.getBBox();R({x:N.x,y:N.y,width:N.width,height:N.height})}},[i]),typeof i>"u"||!i?null:P.createElement("g",UY({transform:"translate(".concat(r-S.width/2," ").concat(n-S.height/2,")"),className:I},b),l&&P.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}),P.createElement("text",{className:"react-flow__edge-text",y:S.height/2,dy:"0.3em",ref:w,style:a},i),y)},WY=P.memo(VY),Gl=(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?P.createElement(WY,{x:r,y:n,label:i,labelStyle:o,labelShowBg:a,labelBgStyle:u,labelBgPadding:l,labelBgBorderRadius:d}):null;return P.createElement(P.Fragment,null,P.createElement("path",{style:f,d:t,className:"react-flow__edge-path",markerEnd:h,markerStart:p}),v)});function rl(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 Y2(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=rl({pos:i,x1:t,y1:r,x2:o,y2:a}),f=ke(d,2),h=f[0],p=f[1],v=rl({pos:l,x1:o,y1:a,x2:t,y2:r}),m=ke(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 GY(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=rl({pos:i,x1:t,y1:r,x2:o,y2:a}),f=ke(d,2),h=f[0],p=f[1],v=rl({pos:l,x1:o,y1:a,x2:t,y2:r}),m=ke(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 X2=P.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=Y2(w),_=GY(w),S=ke(_,2),R=S[0],I=S[1];return P.createElement(Gl,{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 _P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function KY(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_P(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_P(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var EP=[Se.Left,Se.Right],Z2=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=EP.includes(u),h=EP.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 ca(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,KY({},i))}}var 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+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},Tm=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)},Am=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},Mm=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},Dm=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},jm=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function J0(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=Z2({sourceX:t,sourceY:r,targetX:o,targetY:a}),m=ke(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,N=typeof p<"u"?p:x,A=null,k=null;return t<=o?(A=r<=a?Im(t,N,S):Mm(t,N,S),k=r<=a?jm(o,N,S):Nm(o,N,S)):(A=r<a?Tm(t,N,S):Dm(t,N,S),k=r<a?Am(o,N,S):Pm(o,N,S)),R.includes(i)&&R.includes(l)?t<=o?(A=r<=a?jm(I,r,S):Nm(I,r,S),k=r<=a?Im(I,a,S):Mm(I,a,S)):(i===Se.Right&&l===Se.Left||i===Se.Left&&l===Se.Right||i===Se.Left&&l===Se.Left)&&(A=r<=a?Am(I,r,S):Pm(I,r,S),k=r<=a?Tm(I,a,S):Dm(I,a,S)):R.includes(i)&&!R.includes(l)?(t<=o?A=r<=a?jm(o,r,S):Nm(o,r,S):A=r<=a?Am(o,r,S):Pm(o,r,S),k=""):!R.includes(i)&&R.includes(l)&&(t<=o?A=r<=a?Im(t,a,S):Mm(t,a,S):A=r<=a?Tm(t,a,S):Dm(t,a,S),k=""),"M ".concat(t,",").concat(r).concat(A).concat(k,"L ").concat(o,",").concat(a)}var Qx=P.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,_=Z2({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:y}),S=ke(_,2),R=S[0],I=S[1],N=J0({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:y,borderRadius:E});return P.createElement(Gl,{path:N,centerX:R,centerY:I,label:o,labelStyle:a,labelShowBg:u,labelBgStyle:l,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:x,markerStart:b})});function 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}var J2=P.memo(function(e){return P.createElement(Qx,OP(OP({},e),{},{borderRadius:0}))}),Q2=P.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 P.createElement(Gl,{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 yu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function nl(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-yu(r-i,a),l=n;break;case Se.Right:u=r+yu(i-r,a),l=n;break;case Se.Top:u=r,l=n-yu(n-o,a);break;case Se.Bottom:u=r,l=n+yu(o-n,a);break}return[u,l]}function Kl(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=nl({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=ke(h,2),v=p[0],m=p[1],y=nl({pos:l,x1:o,y1:a,x2:t,y2:r,c:f}),x=ke(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 YY(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=nl({pos:i,x1:t,y1:r,x2:o,y2:a,c:f}),p=ke(h,2),v=p[0],m=p[1],y=nl({pos:l,x1:o,y1:a,x2:t,y2:r,c:f}),x=ke(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 Q0=P.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},_=Kl(E),S=YY(E),R=ke(S,2),I=R[0],N=R[1];return P.createElement(Gl,{path:_,centerX:I,centerY:N,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:m,style:y,markerEnd:x,markerStart:b})}),ew=P.createContext(null),XY=ew.Provider;ew.Consumer;function ex(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===Co.Strict?r&&d||!r&&l:!0;m&&(f.isValid=o(v))}return f}function qm(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function eq(e){var t=e.event,r=e.handleId,n=e.nodeId,i=e.onConnect,o=e.isTarget,a=e.getState,u=e.setState,l=e.isValidConnection,d=e.elementEdgeUpdaterType,f=e.onEdgeUpdateEnd,h=t.target.closest(".react-flow"),p=j2(t.target);if(!p)return;var v=p.elementFromPoint(t.clientX,t.clientY),m=v==null?void 0:v.classList.contains("target"),y=v==null?void 0:v.classList.contains("source");if(!h||!m&&!y&&!d)return;var x=a(),b=x.onConnectStart,w=x.connectionMode,E=d||(m?"target":"source"),_=h.getBoundingClientRect(),S;u({connectionPosition:{x:t.clientX-_.left,y:t.clientY-_.top},connectionNodeId:n,connectionHandleId:r,connectionHandleType:E}),b==null||b(t,{nodeId:n,handleId:r,handleType:E});function R(N){u({connectionPosition:{x:N.clientX-_.left,y:N.clientY-_.top}});var A=ex(N,w,o,n,r,l,p),k=A.connection,L=A.elementBelow,$=A.isValid,j=A.isHoveringHandle;if(!j)return qm(S);k.source!==k.target&&L&&(qm(S),S=L,L.classList.add("react-flow__handle-connecting"),L.classList.toggle("react-flow__handle-valid",$))}function I(N){var A=a(),k=A.onConnectStop,L=A.onConnectEnd,$=ex(N,w,o,n,r,l,p),j=$.connection,D=$.isValid;k==null||k(N),D&&(i==null||i(j)),L==null||L(N),d&&f&&f(N),qm(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 ZY=["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 km(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 JY=function(){return!0},QY=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},tq=P.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?JY: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=Wl(e,ZY),x=Bt(),b=P.useContext(ew),w=gt(QY,Zt),E=w.connectionStartHandle,_=w.connectOnClick,S=f||null,R=n==="target",I=function(L){var $=x.getState(),j=$.defaultEdgeOptions,D=$.onConnect,W=$.hasDefaultEdges,F=km(km({},j),L);if(W){var X=x.getState(),Z=X.edges;x.setState({edges:vY(F,Z)})}D==null||D(F),h==null||h(F)},N=function(L){L.button===0&&eq({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,W=$.onClickConnectEnd,F=$.connectionMode;if(!E){j==null||j(L,{nodeId:b,handleId:S,handleType:n}),x.setState({connectionStartHandle:{nodeId:b,type:n,handleId:S}});return}var X=j2(L.target),Z=ex(L,F,E.type==="target",E.nodeId,E.handleId||null,u,X),Q=Z.connection,U=Z.isValid;D==null||D(L),U&&I(Q),W==null||W(L),x.setState({connectionStartHandle:null})};return P.createElement("div",km({"data-handleid":S,"data-nodeid":b,"data-handlepos":o,className:fr(["react-flow__handle","react-flow__handle-".concat(o),"nodrag",v,{source:!R,target:R,connectable:d,connecting:(E==null?void 0:E.nodeId)===b&&(E==null?void 0:E.handleId)===S&&(E==null?void 0:E.type)===n}]),onMouseDown:N,onClick:_?A:void 0,ref:t},y),p)});tq.displayName="Handle";var il=P.memo(tq),rq=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 P.createElement(P.Fragment,null,P.createElement(il,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,P.createElement(il,{type:"source",position:u,isConnectable:n}))};rq.displayName="DefaultNode";var tx=P.memo(rq),nq=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?Se.Bottom:i;return P.createElement(P.Fragment,null,r==null?void 0:r.label,P.createElement(il,{type:"source",position:o,isConnectable:n}))};nq.displayName="InputNode";var iq=P.memo(nq),oq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Se.Top:i;return P.createElement(P.Fragment,null,P.createElement(il,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};oq.displayName="OutputNode";var aq=P.memo(oq),e9=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},t9=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 Zt(n,i)&&Zt(o,a)};function r9(e){var t=e.onSelectionChange,r=gt(e9,t9),n=r.selectedNodes,i=r.selectedEdges;return P.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var n9=P.memo(r9),i9=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 Ln(e,t){P.useEffect(function(){typeof e<"u"&&t(e)},[e])}function tt(e,t,r){P.useEffect(function(){typeof t<"u"&&r(He({},e,t))},[t])}var o9=function(t){var r=t.nodes,n=t.edges,i=t.defaultNodes,o=t.defaultEdges,a=t.onConnect,u=t.onConnectStart,l=t.onConnectStop,d=t.onConnectEnd,f=t.onClickConnectStart,h=t.onClickConnectStop,p=t.onClickConnectEnd,v=t.nodesDraggable,m=t.nodesConnectable,y=t.minZoom,x=t.maxZoom,b=t.nodeExtent,w=t.onNodesChange,E=t.onEdgesChange,_=t.elementsSelectable,S=t.connectionMode,R=t.snapGrid,I=t.snapToGrid,N=t.translateExtent,A=t.connectOnClick,k=t.defaultEdgeOptions,L=t.fitView,$=t.fitViewOptions,j=t.onNodesDelete,D=t.onEdgesDelete,W=t.onNodeDrag,F=t.onNodeDragStart,X=t.onNodeDragStop,Z=t.onSelectionDrag,Q=t.onSelectionDragStart,U=t.onSelectionDragStop,ee=gt(i9,Zt),ie=ee.setNodes,ue=ee.setEdges,B=ee.setDefaultNodesAndEdges,V=ee.setMinZoom,J=ee.setMaxZoom,H=ee.setTranslateExtent,G=ee.setNodeExtent,se=ee.reset,oe=Bt();return P.useEffect(function(){return B(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",W,oe.setState),tt("onNodeDragStart",F,oe.setState),tt("onNodeDragStop",X,oe.setState),tt("onSelectionDrag",Z,oe.setState),tt("onSelectionDragStart",Q,oe.setState),tt("onSelectionDragStop",U,oe.setState),Ln(r,ie),Ln(n,ue),Ln(i,ie),Ln(o,ue),Ln(y,V),Ln(x,J),Ln(N,H),Ln(b,G),null},a9=".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%)}",s9=a9,u9=".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}",l9=u9,c9=function(t,r,n){return n===Se.Left?t-r:n===Se.Right?t+r:t},f9=function(t,r,n){return n===Se.Top?t-r:n===Se.Bottom?t+r:t},RP=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 P.createElement("circle",{className:fr(["react-flow__edgeupdater",r]),cx:c9(i,u,n),cy:f9(o,u,n),r:u,stroke:"transparent",fill:"transparent"})},ro=(function(e){var t=function(n){var i=n.id,o=n.className,a=n.type,u=n.data,l=n.onClick,d=n.onEdgeDoubleClick,f=n.selected,h=n.animated,p=n.label,v=n.labelStyle,m=n.labelShowBg,y=n.labelBgStyle,x=n.labelBgPadding,b=n.labelBgBorderRadius,w=n.style,E=n.source,_=n.target,S=n.sourceX,R=n.sourceY,I=n.targetX,N=n.targetY,A=n.sourcePosition,k=n.targetPosition,L=n.elementsSelectable,$=n.hidden,j=n.sourceHandleId,D=n.targetHandleId,W=n.onContextMenu,F=n.onMouseEnter,X=n.onMouseMove,Z=n.onMouseLeave,Q=n.edgeUpdaterRadius,U=n.onEdgeUpdate,ee=n.onEdgeUpdateStart,ie=n.onEdgeUpdateEnd,ue=n.markerEnd,B=n.markerStart,V=n.rfId,J=P.useState(!1),H=ke(J,2),G=H[0],se=H[1],oe=Bt(),fe=function(rt){var bt=oe.getState(),Qt=bt.edges,dr=bt.addSelectedEdges,Dt=Qt.find(function(_t){return _t.id===i});L&&(oe.setState({nodesSelectionActive:!1}),dr([i])),l==null||l(rt,Dt)},ne=ca(i,oe.getState,d),K=ca(i,oe.getState,W),he=ca(i,oe.getState,F),be=ca(i,oe.getState,X),pe=ca(i,oe.getState,Z),de=function(rt,bt){var Qt=bt?_:E,dr=(bt?D:j)||null,Dt=bt?"target":"source",_t=function(){return!0},jt=bt,Vr=oe.getState().edges.find(function(hr){return hr.id===i});ee==null||ee(rt,Vr,Dt);var Jn=ie?function(hr){return ie(hr,Vr,Dt)}:void 0,In=function(qi){return U==null?void 0:U(Vr,qi)};eq({event:rt,handleId:dr,nodeId:Qt,onConnect:In,isTarget:jt,getState:oe.getState,setState:oe.setState,isValidConnection:_t,elementEdgeUpdaterType:Dt,onEdgeUpdateEnd:Jn})},_e=function(rt){return de(rt,!0)},Re=function(rt){return de(rt,!1)},Ze=function(){return se(!0)},ze=function(){return se(!1)},Fe=P.useMemo(function(){return"url(#".concat(X0(B,V),")")},[B,V]),Ue=P.useMemo(function(){return"url(#".concat(X0(ue,V),")")},[ue,V]);if($)return null;var lt=!L&&!l,ct=typeof U<"u",mt=fr(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:f,animated:h,inactive:lt,updating:G}]);return P.createElement("g",{className:mt,onClick:fe,onDoubleClick:ne,onContextMenu:K,onMouseEnter:he,onMouseMove:be,onMouseLeave:pe},P.createElement(e,{id:i,source:E,target:_,selected:f,animated:h,label:p,labelStyle:v,labelShowBg:m,labelBgStyle:y,labelBgPadding:x,labelBgBorderRadius:b,data:u,style:w,sourceX:S,sourceY:R,targetX:I,targetY:N,sourcePosition:A,targetPosition:k,sourceHandleId:j,targetHandleId:D,markerStart:Fe,markerEnd:Ue,"data-testid":"rf__edge-".concat(i)}),ct&&P.createElement("g",{onMouseDown:_e,onMouseEnter:Ze,onMouseOut:ze},P.createElement(RP,{position:A,centerX:S,centerY:R,radius:Q})),ct&&P.createElement("g",{onMouseDown:Re,onMouseEnter:Ze,onMouseOut:ze},P.createElement(RP,{position:k,centerX:I,centerY:N,radius:Q})))};return t.displayName="EdgeWrapper",P.memo(t)});function IP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function PP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d9(e){var t={default:ro(e.default||Q0),straight:ro(e.bezier||Q2),step:ro(e.step||J2),smoothstep:ro(e.step||Qx),simplebezier:ro(e.simplebezier||X2)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=ro(e[o]||Q0),i},r);return PP(PP({},t),n)}function TP(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 NP(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 h9=function(t,r,n,i,o,a){var u=TP(n,t,r),l=TP(a,i,o);return{sourceX:u.x,sourceY:u.y,targetX:l.x,targetY:l.y}};function p9(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=tl({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 AP(e,t){var r,n,i,o,a,u=e.get(t),l=(u==null||(r=u[Tt])===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 v9=typeof document<"u"?document:null,ol=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:v9},r=P.useState(!1),n=ke(r,2),i=n[0],o=n[1],a=P.useRef(new Set([])),u=P.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,bi(y))},[]);return[p,v]}return[[],[]]},[e]),l=ke(u,2),d=l[0],f=l[1];return P.useEffect(function(){if(e!==null){var h,p,v=function(b){if(jP(b))return!1;var w=DP(b.code,f);a.current.add(b[w]),MP(d,a.current,!1)&&(b.preventDefault(),o(!0))},m=function(b){if(jP(b))return!1;var w=DP(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 DP(e,t){return t.includes(e)?"code":"key"}function jP(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 g9=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},m9=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Bt(),i=gt(g9,Zt),o=i.onNodesChange,a=i.onEdgesChange,u=ol(t),l=ol(r);P.useEffect(function(){var d=n.getState(),f=d.nodeInternals,h=d.edges,p=d.hasDefaultNodes,v=d.hasDefaultEdges,m=d.onNodesDelete,y=d.onEdgesDelete,x=Array.from(f.values()),b=x.reduce(function(N,A){return(!A.selected&&A.parentNode&&N.find(function(k){return k.id===A.parentNode})||A.selected)&&N.push(A),N},[]),w=h.filter(function(N){return N.selected});if(u&&(b||w)){var E=H2(b,h),_=[].concat(bi(w),bi(E)),S=_.reduce(function(N,A){return N.includes(A.id)||N.push(A.id),N},[]);if((v||p)&&(v&&n.setState({edges:h.filter(function(N){return!S.includes(N.id)})}),p&&(b.forEach(function(N){f.delete(N.id)}),n.setState({nodeInternals:new Map(f)}))),S.length>0&&(y==null||y(_),a)){var R=S.map(function(N){return{id:N,type:"remove"}});a(R)}if(b.length>0&&(m==null||m(b),o)){var I=b.map(function(N){return{id:N.id,type:"remove"}});o(I)}n.setState({nodesSelectionActive:!1})}},[u,o,a]),P.useEffect(function(){n.setState({multiSelectionActive:l})},[l])});function y9(e){var t=Bt();P.useEffect(function(){var r,n=function(){if(e.current){var o=Xx(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 b9=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},Lm=function(t){return{x:t.x,y:t.y,zoom:t.k}},bu=function(t,r){return t.target.closest(".".concat(r))},x9=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},w9=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?vo.Free:v,y=t.zoomOnDoubleClick,x=y===void 0?!0:y,b=t.selectionKeyPressed,w=t.elementsSelectable,E=t.panOnDrag,_=E===void 0?!0:E,S=t.translateExtent,R=t.minZoom,I=t.maxZoom,N=t.defaultZoom,A=N===void 0?1:N,k=t.defaultPosition,L=k===void 0?[0,0]:k,$=t.zoomActivationKeyCode,j=t.preventScrolling,D=j===void 0?!0:j,W=t.children,F=t.noWheelClassName,X=t.noPanClassName,Z=Bt(),Q=P.useRef(!1),U=P.useRef(null),ee=P.useRef({x:0,y:0,zoom:0}),ie=gt(x9,Zt),ue=ie.d3Zoom,B=ie.d3Selection,V=ie.d3ZoomHandler,J=ol($);return y9(U),P.useEffect(function(){if(U.current){var H,G=oY().scaleExtent([R,I]).translateExtent(S),se=qr(U.current).call(G),oe=go(L[0],S[0][0],S[1][0]),fe=go(L[1],S[0][1],S[1][1]),ne=go(A,R,I),K=yi.translate(oe,fe).scale(ne);G.transform(se,K),Z.setState({d3Zoom:G,d3Selection:se,d3ZoomHandler:se.on("wheel.zoom"),transform:[oe,fe,ne],domNode:(H=se.node())===null||H===void 0?void 0:H.closest(".react-flow")})}},[]),P.useEffect(function(){B&&ue&&(f&&!J?B.on("wheel",function(H){if(bu(H,F))return!1;H.preventDefault(),H.stopImmediatePropagation();var G=B.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=G*Math.pow(2,oe);ue.scaleTo(B,fe,se);return}var ne=H.deltaMode===1?20:1,K=m===vo.Vertical?0:H.deltaX*ne,he=m===vo.Horizontal?0:H.deltaY*ne;ue.translateBy(B,-(K/G)*p,-(he/G)*p)}).on("wheel.zoom",null):typeof V<"u"&&B.on("wheel",function(H){if(!D||bu(H,F))return null;H.preventDefault()}).on("wheel.zoom",V))},[f,m,B,ue,V,J,l,D,F]),P.useEffect(function(){ue&&(b&&!Q.current?ue.on("zoom",null):b||ue.on("zoom",function(H){if(Z.setState({transform:[H.transform.x,H.transform.y,H.transform.k]}),r){var G=Lm(H.transform);r(H.sourceEvent,G)}}))},[b,ue,r]),P.useEffect(function(){ue&&ue.on("start",function(H){if(Q.current=!0,n){var G=Lm(H.transform);ee.current=G,n(H.sourceEvent,G)}})},[ue,n]),P.useEffect(function(){ue&&ue.on("end",function(H){if(Q.current=!1,i&&b9(ee.current,H.transform)){var G=Lm(H.transform);ee.current=G,i(H.sourceEvent,G)}})},[ue,i]),P.useEffect(function(){ue&&ue.filter(function(H){var G=J||a,se=l&&H.ctrlKey;return!_&&!G&&!f&&!x&&!l||b||!x&&H.type==="dblclick"||bu(H,F)&&H.type==="wheel"||bu(H,X)&&H.type!=="wheel"||!l&&H.ctrlKey&&H.type==="wheel"||!G&&!f&&!se&&H.type==="wheel"||!_&&(H.type==="mousedown"||H.type==="touchstart")?!1:(!H.ctrlKey||H.type==="wheel")&&!H.button})},[ue,a,l,f,x,_,b,w,J]),P.createElement("div",{className:"react-flow__renderer react-flow__container",ref:U},W)};function qP(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 kP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qP(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 _9=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},FP={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},E9=P.memo(function(e){var t=e.selectionKeyPressed,r=Bt(),n=P.useRef(0),i=P.useRef(0),o=P.useRef(),a=P.useState(FP),u=ke(a,2),l=u[0],d=u[1],f=gt(_9,Zt),h=f.userSelectionActive,p=f.elementsSelectable,v=h||t;if(!p||!v)return null;var m=function(){d(FP),r.setState({userSelectionActive:!1}),n.current=0,i.current=0},y=function(_){var S=_.target.closest(".react-flow");o.current=S.getBoundingClientRect();var R=LP(_,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=LP(_,o.current),N=(S=l.startX)!==null&&S!==void 0?S:0,A=(R=l.startY)!==null&&R!==void 0?R:0,k=kP(kP({},l),{},{x:I.x<N?I.x:N,y:I.y<A?I.y:A,width:Math.abs(I.x-N),height:Math.abs(I.y-A)}),L=r.getState(),$=L.nodeInternals,j=L.edges,D=L.transform,W=L.onNodesChange,F=L.onEdgesChange,X=Array.from($.values()),Z=z2($,k,D,!1,!0),Q=H2(Z,j).map(function(ue){return ue.id}),U=Z.map(function(ue){return ue.id});if(n.current!==U.length){n.current=U.length;var ee=lo(X,U);ee.length&&(W==null||W(ee))}if(i.current!==Q.length){i.current=Q.length;var ie=lo(j,Q);ie.length&&(F==null||F(ie))}d(k)}},b=function(){r.setState({nodesSelectionActive:n.current>0}),m()},w=function(){r.setState({nodesSelectionActive:!1}),m()};return P.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:y,onMouseMove:x,onMouseUp:b,onMouseLeave:w},l.draw&&P.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 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 $P(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){He(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}function sq(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:sq(r,t):!1}function zP(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 S9(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!sq(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 O9(e,t,r,n,i,o){var a=ke(n,2),u=a[0],l=a[1],d=e.extent||o,f={x:t.x-e.distance.x,y:t.y-e.distance.y};if(r&&(f.x=u*Math.round(f.x/u),f.y=l*Math.round(f.y/l)),e.extent==="parent")if(e.parentNode&&e.width&&e.height){var h=i.get(e.parentNode);d=h!=null&&h.positionAbsolute&&h!==null&&h!==void 0&&h.width&&h!==null&&h!==void 0&&h.height?[[h.positionAbsolute.x,h.positionAbsolute.y],[h.positionAbsolute.x+h.width-e.width,h.positionAbsolute.y+h.height-e.height]]:d}else process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Only child nodes can use a parent extent. Help: https://reactflow.dev/error#500"),d=o;else if(e.extent&&e.parentNode){var p,v,m,y,x=i.get(e.parentNode),b=(p=x==null||(v=x.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,w=(m=x==null||(y=x.positionAbsolute)===null||y===void 0?void 0:y.y)!==null&&m!==void 0?m:0;d=[[e.extent[0][0]+b,e.extent[0][1]+w],[e.extent[1][0]+b,e.extent[1][1]+w]]}var E={x:0,y:0};if(e.parentNode){var _,S,R,I,N=i.get(e.parentNode);E={x:(_=N==null||(S=N.positionAbsolute)===null||S===void 0?void 0:S.x)!==null&&_!==void 0?_:0,y:(R=N==null||(I=N.positionAbsolute)===null||I===void 0?void 0:I.y)!==null&&R!==void 0?R:0}}return e.positionAbsolute=d?D2(f,d):f,e.position={x:e.positionAbsolute.x-E.x,y:e.positionAbsolute.y-E.y},e}function Fm(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return $P($P({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function Bm(e){return function(t,r,n){return e==null?void 0:e(t,n)}}function uq(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=P.useState(!1),f=ke(d,2),h=f[0],p=f[1],v=Bt(),m=P.useRef(),y=P.useRef({x:null,y:null}),x=P.useCallback(function(b){var w=b.sourceEvent,E=v.getState(),_=E.transform,S=E.snapGrid,R=E.snapToGrid,I=w.touches?w.touches[0].clientX:w.clientX,N=w.touches?w.touches[0].clientY:w.clientY,A=$2({x:I,y:N},_,R,S);return A},[]);return P.useEffect(function(){if(t!=null&&t.current){var b=qr(t.current);if(n)b.on(".drag",null);else{var w=vG().on("start",function(E){var _=v.getState(),S=_.nodeInternals,R=_.multiSelectionActive,I=_.unselectNodesAndEdges,N=_.onNodeDragStart,A=_.onSelectionDragStart,k=a?N:Bm(A);if(!l&&!R&&a){var L;(L=S.get(a))!==null&&L!==void 0&&L.selected||I()}a&&u&&l&&B2({id:a,store:v});var $=x(E);if(y.current=$,m.current=S9(S,$,a),k&&m.current){var j=Fm({nodeId:a,dragItems:m.current,nodeInternals:S}),D=ke(j,2),W=D[0],F=D[1];k(E.sourceEvent,W,F)}}).on("drag",function(E){var _=v.getState(),S=_.updateNodePositions,R=_.snapToGrid,I=_.snapGrid,N=_.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 O9(Z,$,R,I,N,A)});var j=a?k:Bm(L);if(S(m.current,!0,!0),p(!0),j){var D=Fm({nodeId:a,dragItems:m.current,nodeInternals:N}),W=ke(D,2),F=W[0],X=W[1];j(E.sourceEvent,F,X)}}E.on("end",function(Z){if(p(!1),m.current){var Q=v.getState(),U=Q.updateNodePositions,ee=Q.nodeInternals,ie=Q.onNodeDragStop,ue=Q.onSelectionDragStop,B=a?ie:Bm(ue);if(U(m.current,!1,!1),B){var V=Fm({nodeId:a,dragItems:m.current,nodeInternals:ee}),J=ke(V,2),H=J[0],G=J[1];B(Z.sourceEvent,H,G)}}})}).filter(function(E){var _=E.target,S=!E.button&&(!i||!zP(_,".".concat(i),t))&&(!o||zP(_,o,t));return S});return b.call(w),function(){b.on(".drag",null)}}}},[t,n,i,o,u,v,a,l,x]),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 C9(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){He(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 R9=function(t){return C9({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},Zx(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},I9=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return Zx(r)};function P9(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Bt(),i=gt(R9,Zt),o=i.transformString,a=i.userSelectionActive,u=gt(I9,Zt),l=u.width,d=u.height,f=u.x,h=u.y,p=P.useRef(null);if(uq({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 P.createElement("div",{className:fr(["react-flow__nodesselection","react-flow__container",r]),style:{transform:o}},P.createElement("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:v,style:{width:l,height:d,top:h,left:f}}))}var T9=P.memo(P9),N9=function(t){return t.nodesSelectionActive},lq=function(t){var r=t.children,n=t.onPaneClick,i=t.onPaneContextMenu,o=t.onPaneScroll,a=t.deleteKeyCode,u=t.onMove,l=t.onMoveStart,d=t.onMoveEnd,f=t.selectionKeyCode,h=t.multiSelectionKeyCode,p=t.zoomActivationKeyCode,v=t.elementsSelectable,m=t.zoomOnScroll,y=t.zoomOnPinch,x=t.panOnScroll,b=t.panOnScrollSpeed,w=t.panOnScrollMode,E=t.zoomOnDoubleClick,_=t.panOnDrag,S=t.translateExtent,R=t.minZoom,I=t.maxZoom,N=t.defaultZoom,A=t.defaultPosition,k=t.preventScrolling,L=t.onSelectionContextMenu,$=t.noWheelClassName,j=t.noPanClassName,D=Bt(),W=gt(N9),F=ol(f);m9({deleteKeyCode:a,multiSelectionKeyCode:h});var X=function(ee){n==null||n(ee),D.getState().resetSelectedElements(),D.setState({nodesSelectionActive:!1})},Z=i?function(U){return i(U)}:void 0,Q=o?function(U){return o(U)}:void 0;return P.createElement(w9,{onMove:u,onMoveStart:l,onMoveEnd:d,selectionKeyPressed:F,elementsSelectable:v,zoomOnScroll:m,zoomOnPinch:y,panOnScroll:x,panOnScrollSpeed:b,panOnScrollMode:w,zoomOnDoubleClick:E,panOnDrag:_,translateExtent:S,minZoom:R,maxZoom:I,defaultZoom:N,defaultPosition:A,zoomActivationKeyCode:p,preventScrolling:k,noWheelClassName:$,noPanClassName:j},r,P.createElement(E9,{selectionKeyPressed:F}),W&&P.createElement(T9,{onSelectionContextMenu:L,noPanClassName:j}),P.createElement("div",{className:"react-flow__pane react-flow__container",onClick:X,onContextMenu:Z,onWheel:Q}))};lq.displayName="FlowRenderer";var A9=P.memo(lq);function M9(e){var t=gt(P.useCallback(function(r){return e?z2(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):Array.from(r.nodeInternals.values())},[e]));return t}var D9=function(t){return{nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions}},cq=function(t){var r=gt(D9,Zt),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,u=M9(t.onlyRenderVisibleElements),l=P.useRef(),d=P.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 P.useEffect(function(){return function(){var f;l==null||(f=l.current)===null||f===void 0||f.disconnect()}},[]),P.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 P.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[Tt])===null||x===void 0?void 0:x.z)!==null&&y!==void 0?y:0,isParent:!!((b=f[Tt])!==null&&b!==void 0&&b.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!f.width&&!!f.height})}))};cq.displayName="NodeRenderer";var j9=P.memo(cq),no;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 VP(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 q9=(no={},He(no,Se.Left,Se.Right),He(no,Se.Right,Se.Left),He(no,Se.Top,Se.Bottom),He(no,Se.Bottom,Se.Top),no),k9=(function(e){var t,r,n,i,o,a=e.connectionNodeId,u=e.connectionHandleType,l=e.connectionLineStyle,d=e.connectionLineType,f=d===void 0?Un.Bezier:d,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=gt(P.useCallback(function(Q){return{fromNode:Q.nodeInternals.get(a),handleId:Q.connectionHandleId,toX:(Q.connectionPosition.x-Q.transform[0])/Q.transform[2],toY:(Q.connectionPosition.y-Q.transform[1])/Q.transform[2]}},[a]),Zt),m=v.fromNode,y=v.handleId,x=v.toX,b=v.toY,w=m==null||(t=m[Tt])===null||t===void 0?void 0:t.handleBounds;if(!m||!h||!(w!=null&&w[u]))return null;var E=w[u],_=y?E.find(function(Q){return Q.id===y}):E[0],S=_?_.x+_.width/2:((r=m==null?void 0:m.width)!==null&&r!==void 0?r:0)/2,R=_?_.y+_.height/2:(n=m==null?void 0:m.height)!==null&&n!==void 0?n:0,I=((m==null||(i=m.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+S,N=((m==null||(o=m.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+R,A=_==null?void 0:_.position;if(!A)return null;var k=q9[A],L,$,j,D,W,F;switch(u){case"source":L=I,$=N,j=A,D=x,W=b,F=k;break;case"target":L=x,$=b,j=k,D=I,W=N,F=A;break}if(p)return P.createElement("g",{className:"react-flow__connection"},P.createElement(p,{connectionLineType:f,connectionLineStyle:l,fromNode:m,fromHandle:_,fromX:I,fromY:N,toX:x,toY:b,fromPosition:A,toPosition:k,sourcePosition:j,targetPosition:F,sourceNode:m,sourceHandle:_,targetX:D,targetY:W,sourceX:L,sourceY:$}));var X="",Z={sourceX:L,sourceY:$,sourcePosition:j,targetX:D,targetY:W,targetPosition:F};return f===Un.Bezier?X=Kl(Z):f===Un.Step?X=J0(VP(VP({},Z),{},{borderRadius:0})):f===Un.SmoothStep?X=J0(Z):f===Un.SimpleBezier?X=Y2(Z):X="M".concat(L,",").concat($," ").concat(D,",").concat(W),P.createElement("g",{className:"react-flow__connection"},P.createElement("path",{d:X,className:"react-flow__connection-path",style:l}))});function rx(e){"@babel/helpers - typeof";return rx=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},rx(e)}var xu,L9=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return P.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:"none",points:"-5,-4 0,0 -5,4"})},F9=function(t){var r=t.color,n=r===void 0?"none":r,i=t.strokeWidth,o=i===void 0?1:i;return P.createElement("polyline",{stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:o,fill:n,points:"-5,-4 0,0 -5,4 -5,-4"})},WP=(xu={},He(xu,el.Arrow,L9),He(xu,el.ArrowClosed,F9),xu);function B9(e){var t=P.useMemo(function(){var r=WP.hasOwnProperty(e);return r?WP[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 GP(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 $9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var z9=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=B9(n);return P.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"},P.createElement(m,{color:i,strokeWidth:h}))},H9=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&&rx(l)==="object"){var d=X0(l,n);o.includes(d)||(a.push($9({id:d,color:l.color||r},l)),o.push(d))}}),a},[]).sort(function(a,u){return a.id.localeCompare(u.id)})}},fq=function(t){var r=t.defaultColor,n=t.rfId,i=gt(P.useCallback(H9({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 P.createElement("defs",null,i.map(function(o){return P.createElement(z9,{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})}))};fq.displayName="MarkerDefinitions";var U9=P.memo(fq),V9=[{level:0,isMaxLevel:!0,edges:[]}];function W9(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,u){var l=q2(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[Tt])===null||h===void 0?void 0:h.z)||0,((p=t.get(u.target))===null||p===void 0||(v=p[Tt])===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=ke(a,2),l=u[0],d=u[1],f=+l;return{edges:d,level:f,isMaxLevel:f===n}});return o.length===0?V9:o}function G9(e,t,r){var n=gt(P.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)&&p9({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 W9(n,t,r)}var K9=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}},dq=function(t){var r=gt(K9,Zt),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=G9(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 P.createElement(P.Fragment,null,h.map(function(w){var E=w.level,_=w.edges,S=w.isMaxLevel;return P.createElement("svg",{key:E,style:{zIndex:E},width:u,height:l,className:"react-flow__edges react-flow__container"},S&&P.createElement(U9,{defaultColor:v,rfId:t.rfId}),P.createElement("g",null,_.map(function(R){var I=AP(f,R.source),N=ke(I,3),A=N[0],k=N[1],L=N[2],$=AP(f,R.target),j=ke($,3),D=j[0],W=j[1],F=j[2];if(!L||!F)return null;var X=R.type||"default";t.edgeTypes[X]||(console.warn('[React Flow]: Edge type "'.concat(X,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),X="default");var Z=t.edgeTypes[X]||t.edgeTypes.default,Q=d===Co.Strict?W.target:W.target||W.source,U=NP(k.source,R.sourceHandle||null),ee=NP(Q,R.targetHandle||null),ie=(U==null?void 0:U.position)||Se.Bottom,ue=(ee==null?void 0:ee.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(!ee)return process.env.NODE_ENV==="development"&&console.warn("[React Flow]: Couldn't create edge for target handle id: ".concat(R.targetHandle,"; edge id: ").concat(R.id,". Help: https://reactflow.dev/error#800")),null;var B=h9(A,U,ie,D,ee,ue),V=B.sourceX,J=B.sourceY,H=B.targetX,G=B.targetY;return P.createElement(Z,{key:R.id,id:R.id,className:fr([R.className,t.noPanClassName]),type:X,data:R.data,selected:!!R.selected,animated:!!R.animated,hidden:!!R.hidden,label:R.label,labelStyle:R.labelStyle,labelShowBg:R.labelShowBg,labelBgStyle:R.labelBgStyle,labelBgPadding:R.labelBgPadding,labelBgBorderRadius:R.labelBgBorderRadius,style:R.style,source:R.source,target:R.target,sourceHandleId:R.sourceHandle,targetHandleId:R.targetHandle,markerEnd:R.markerEnd,markerStart:R.markerStart,sourceX:V,sourceY:J,targetX:H,targetY:G,sourcePosition:ie,targetPosition:ue,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&&P.createElement("svg",{style:x,width:u,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},P.createElement(k9,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:m,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:y})))};dq.displayName="EdgeRenderer";var Y9=P.memo(dq),X9=function(t){return"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")")};function Z9(e){var t=e.children,r=gt(X9);return P.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function J9(e){var t=G2(),r=P.useRef(!1);P.useEffect(function(){!r.current&&t.viewportInitialized&&e&&(setTimeout(function(){return e(t)},1),r.current=!0)},[e,t.viewportInitialized])}var hq=function(t){var r=t.nodeTypes,n=t.edgeTypes,i=t.onMove,o=t.onMoveStart,a=t.onMoveEnd,u=t.onInit,l=t.onNodeClick,d=t.onEdgeClick,f=t.onNodeDoubleClick,h=t.onEdgeDoubleClick,p=t.onNodeMouseEnter,v=t.onNodeMouseMove,m=t.onNodeMouseLeave,y=t.onNodeContextMenu,x=t.onSelectionContextMenu,b=t.connectionLineType,w=t.connectionLineStyle,E=t.connectionLineComponent,_=t.connectionLineContainerStyle,S=t.selectionKeyCode,R=t.multiSelectionKeyCode,I=t.zoomActivationKeyCode,N=t.deleteKeyCode,A=t.onlyRenderVisibleElements,k=t.elementsSelectable,L=t.selectNodesOnDrag,$=t.translateExtent,j=t.minZoom,D=t.maxZoom,W=t.defaultZoom,F=t.defaultPosition,X=t.preventScrolling,Z=t.defaultMarkerColor,Q=t.zoomOnScroll,U=t.zoomOnPinch,ee=t.panOnScroll,ie=t.panOnScrollSpeed,ue=t.panOnScrollMode,B=t.zoomOnDoubleClick,V=t.panOnDrag,J=t.onPaneClick,H=t.onPaneScroll,G=t.onPaneContextMenu,se=t.onEdgeUpdate,oe=t.onEdgeContextMenu,fe=t.onEdgeMouseEnter,ne=t.onEdgeMouseMove,K=t.onEdgeMouseLeave,he=t.edgeUpdaterRadius,be=t.onEdgeUpdateStart,pe=t.onEdgeUpdateEnd,de=t.noDragClassName,_e=t.noWheelClassName,Re=t.noPanClassName,Ze=t.elevateEdgesOnSelect,ze=t.id;return J9(u),P.createElement(A9,{onPaneClick:J,onPaneContextMenu:G,onPaneScroll:H,deleteKeyCode:N,selectionKeyCode:S,multiSelectionKeyCode:R,zoomActivationKeyCode:I,elementsSelectable:k,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:Q,zoomOnPinch:U,zoomOnDoubleClick:B,panOnScroll:ee,panOnScrollSpeed:ie,panOnScrollMode:ue,panOnDrag:V,translateExtent:$,minZoom:j,maxZoom:D,defaultZoom:W,defaultPosition:F,onSelectionContextMenu:x,preventScrolling:X,noDragClassName:de,noWheelClassName:_e,noPanClassName:Re},P.createElement(Z9,null,P.createElement(Y9,{edgeTypes:n,onEdgeClick:d,onEdgeDoubleClick:h,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:E,connectionLineContainerStyle:_,onEdgeUpdate:se,onlyRenderVisibleElements:A,onEdgeContextMenu:oe,onEdgeMouseEnter:fe,onEdgeMouseMove:ne,onEdgeMouseLeave:K,onEdgeUpdateStart:be,onEdgeUpdateEnd:pe,edgeUpdaterRadius:he,defaultMarkerColor:Z,noPanClassName:Re,elevateEdgesOnSelect:!!Ze,rfId:ze}),P.createElement(j9,{nodeTypes:r,onNodeClick:l,onNodeDoubleClick:f,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:m,onNodeContextMenu:y,selectNodesOnDrag:L,onlyRenderVisibleElements:A,noPanClassName:Re,noDragClassName:de})))};hq.displayName="GraphView";var Q9=P.memo(hq),pq=function(){return null};pq.displayName="GroupNode";function KP(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?KP(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var fa=(function(e){var t=function(n){var i=n.id,o=n.type,a=n.data,u=n.xPos,l=n.yPos,d=n.selected,f=n.onClick,h=n.onMouseEnter,p=n.onMouseMove,v=n.onMouseLeave,m=n.onContextMenu,y=n.onDoubleClick,x=n.style,b=n.className,w=n.isDraggable,E=n.isSelectable,_=n.isConnectable,S=n.selectNodesOnDrag,R=n.sourcePosition,I=n.targetPosition,N=n.hidden,A=n.resizeObserver,k=n.dragHandle,L=n.zIndex,$=n.isParent,j=n.noPanClassName,D=n.noDragClassName,W=n.initialized,F=Bt(),X=P.useRef(null),Z=P.useRef(R),Q=P.useRef(I),U=P.useRef(o),ee=E||w||f||h||p||v,ie=la(i,F.getState,h),ue=la(i,F.getState,p),B=la(i,F.getState,v),V=la(i,F.getState,m),J=la(i,F.getState,y),H=function(oe){if(E&&(!S||!w)&&B2({id:i,store:F}),f){var fe=F.getState().nodeInternals.get(i);f(oe,YP({},fe))}};P.useEffect(function(){if(X.current&&!N){var se=X.current;return A==null||A.observe(se),function(){return A==null?void 0:A.unobserve(se)}}},[N]),P.useEffect(function(){var se=U.current!==o,oe=Z.current!==R,fe=Q.current!==I;X.current&&(se||oe||fe)&&(se&&(U.current=o),oe&&(Z.current=R),fe&&(Q.current=I),F.getState().updateNodeDimensions([{id:i,nodeElement:X.current,forceUpdate:!0}]))},[i,o,R,I]);var G=uq({nodeRef:X,disabled:N||!w,noDragClassName:D,handleSelector:k,nodeId:i,isSelectable:E,selectNodesOnDrag:S});return N?null:P.createElement("div",{className:fr(["react-flow__node","react-flow__node-".concat(o),j,b,{selected:d,selectable:E,parent:$}]),ref:X,style:YP({zIndex:L,transform:"translate(".concat(u,"px,").concat(l,"px)"),pointerEvents:ee?"all":"none",visibility:W?"visible":"hidden"},x),onMouseEnter:ie,onMouseMove:ue,onMouseLeave:B,onContextMenu:V,onClick:H,onDoubleClick:J,"data-testid":"rf__node-".concat(i),"data-id":i},P.createElement(XY,{value:i},P.createElement(e,{id:i,data:a,type:o,xPos:u,yPos:l,selected:d,isConnectable:_,sourcePosition:R,targetPosition:I,dragging:G,dragHandle:k,zIndex:L})))};return t.displayName="NodeWrapper",P.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 ZP(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 e7(e){var t={input:fa(e.input||iq),default:fa(e.default||tx),output:fa(e.output||aq),group:fa(e.group||pq)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=fa(e[o]||tx),i},r);return ZP(ZP({},t),n)}function JP(e,t){var r=P.useRef(null),n=P.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Zt(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 QP(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 vq=function(t){var r=t.children,n=!0;try{Bt()}catch{n=!1}return n?P.createElement(P.Fragment,null,r):P.createElement(yY,{createStore:bY},r)};vq.displayName="ReactFlowWrapper";var t7=["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 eT(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 tT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eT(Object(r),!0).forEach(function(n){He(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}QP(s9),QP(l9);var r7={input:iq,default:tx,output:aq},n7={default:Q0,straight:Q2,step:J2,smoothstep:Qx,simplebezier:X2},i7=[15,15],o7=[0,0],gq=P.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?r7:u,d=e.edgeTypes,f=d===void 0?n7:d,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,m=e.onMove,y=e.onMoveStart,x=e.onMoveEnd,b=e.onConnect,w=e.onConnectStart,E=e.onConnectStop,_=e.onConnectEnd,S=e.onClickConnectStart,R=e.onClickConnectStop,I=e.onClickConnectEnd,N=e.onNodeMouseEnter,A=e.onNodeMouseMove,k=e.onNodeMouseLeave,L=e.onNodeContextMenu,$=e.onNodeDoubleClick,j=e.onNodeDragStart,D=e.onNodeDrag,W=e.onNodeDragStop,F=e.onNodesDelete,X=e.onEdgesDelete,Z=e.onSelectionChange,Q=e.onSelectionDragStart,U=e.onSelectionDrag,ee=e.onSelectionDragStop,ie=e.onSelectionContextMenu,ue=e.connectionMode,B=ue===void 0?Co.Strict:ue,V=e.connectionLineType,J=V===void 0?Un.Bezier:V,H=e.connectionLineStyle,G=e.connectionLineComponent,se=e.connectionLineContainerStyle,oe=e.deleteKeyCode,fe=oe===void 0?"Backspace":oe,ne=e.selectionKeyCode,K=ne===void 0?"Shift":ne,he=e.multiSelectionKeyCode,be=he===void 0?"Meta":he,pe=e.zoomActivationKeyCode,de=pe===void 0?"Meta":pe,_e=e.snapToGrid,Re=_e===void 0?!1:_e,Ze=e.snapGrid,ze=Ze===void 0?i7:Ze,Fe=e.onlyRenderVisibleElements,Ue=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,Qt=bt===void 0?.5:bt,dr=e.maxZoom,Dt=dr===void 0?2:dr,_t=e.defaultZoom,jt=_t===void 0?1:_t,Vr=e.defaultPosition,Jn=Vr===void 0?o7:Vr,In=e.translateExtent,hr=In===void 0?Z0:In,qi=e.preventScrolling,xc=qi===void 0?!0:qi,wc=e.nodeExtent,Lo=e.defaultMarkerColor,ds=Lo===void 0?"#b1b1b7":Lo,hs=e.zoomOnScroll,_c=hs===void 0?!0:hs,ps=e.zoomOnPinch,Ec=ps===void 0?!0:ps,Fo=e.panOnScroll,Sc=Fo===void 0?!1:Fo,vs=e.panOnScrollSpeed,Oc=vs===void 0?.5:vs,ki=e.panOnScrollMode,Cc=ki===void 0?vo.Free:ki,Li=e.zoomOnDoubleClick,Rc=Li===void 0?!0:Li,gs=e.panOnDrag,Ic=gs===void 0?!0:gs,Pc=e.onPaneClick,Tc=e.onPaneScroll,ms=e.onPaneContextMenu,Nc=e.children,Ac=e.onEdgeUpdate,ys=e.onEdgeContextMenu,Mc=e.onEdgeDoubleClick,Dc=e.onEdgeMouseEnter,jc=e.onEdgeMouseMove,qc=e.onEdgeMouseLeave,kc=e.onEdgeUpdateStart,Lc=e.onEdgeUpdateEnd,Qn=e.edgeUpdaterRadius,Fc=Qn===void 0?10:Qn,Fi=e.onNodesChange,Bc=e.onEdgesChange,bs=e.noDragClassName,$c=bs===void 0?"nodrag":bs,Bo=e.noWheelClassName,xs=Bo===void 0?"nowheel":Bo,$o=e.noPanClassName,zc=$o===void 0?"nopan":$o,ws=e.fitView,Hc=ws===void 0?!1:ws,Uc=e.fitViewOptions,zo=e.connectOnClick,_s=zo===void 0?!0:zo,Es=e.attributionPosition,Ho=e.proOptions,Vc=e.defaultEdgeOptions,Uo=e.elevateEdgesOnSelect,Bi=Uo===void 0?!1:Uo,ei=Wl(e,t7),Wc=JP(l,e7),Ss=JP(f,d9);return P.createElement("div",tT(tT({},ei),{},{ref:t,className:fr(["react-flow",a])}),P.createElement(vq,null,P.createElement(Q9,{onInit:v,onMove:m,onMoveStart:y,onMoveEnd:x,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:N,onNodeMouseMove:A,onNodeMouseLeave:k,onNodeContextMenu:L,onNodeDoubleClick:$,nodeTypes:Wc,edgeTypes:Ss,connectionLineType:J,connectionLineStyle:H,connectionLineComponent:G,connectionLineContainerStyle:se,selectionKeyCode:K,deleteKeyCode:fe,multiSelectionKeyCode:be,zoomActivationKeyCode:de,onlyRenderVisibleElements:Ue,selectNodesOnDrag:ct,translateExtent:hr,minZoom:Qt,maxZoom:Dt,defaultZoom:jt,defaultPosition:Jn,preventScrolling:xc,zoomOnScroll:_c,zoomOnPinch:Ec,zoomOnDoubleClick:Rc,panOnScroll:Sc,panOnScrollSpeed:Oc,panOnScrollMode:Cc,panOnDrag:Ic,onPaneClick:Pc,onPaneScroll:Tc,onPaneContextMenu:ms,onSelectionContextMenu:ie,onEdgeUpdate:Ac,onEdgeContextMenu:ys,onEdgeDoubleClick:Mc,onEdgeMouseEnter:Dc,onEdgeMouseMove:jc,onEdgeMouseLeave:qc,onEdgeUpdateStart:kc,onEdgeUpdateEnd:Lc,edgeUpdaterRadius:Fc,defaultMarkerColor:ds,noDragClassName:$c,noWheelClassName:xs,noPanClassName:zc,elevateEdgesOnSelect:Bi,id:ei==null?void 0:ei.id}),P.createElement(o9,{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:Qt,maxZoom:Dt,nodeExtent:wc,onNodesChange:Fi,onEdgesChange:Bc,snapToGrid:Re,snapGrid:ze,connectionMode:B,translateExtent:hr,connectOnClick:_s,defaultEdgeOptions:Vc,fitView:Hc,fitViewOptions:Uc,onNodesDelete:F,onEdgesDelete:X,onNodeDragStart:j,onNodeDrag:D,onNodeDragStop:W,onSelectionDrag:U,onSelectionDragStart:Q,onSelectionDragStop:ee}),Z&&P.createElement(n9,{onSelectionChange:Z}),Nc,P.createElement(zY,{proOptions:Ho,position:Es})))});gq.displayName="ReactFlow";function mq(e){return function(t){var r=P.useState(t),n=ke(r,2),i=n[0],o=n[1],a=P.useCallback(function(u){return o(function(l){return e(u,l)})},[]);return[i,o,a]}}var a7=mq(L2),s7=mq(fY);function rT(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 nT(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 yq(e,t){const r=rT(e,t),n=rT(t,e),i=nT(e,r),o=nT(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const u7=({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}=yq(i,o),l=Kl({sourceX:a,sourceY:u,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:l}),O.jsx("circle",{cx:e,cy:t,fill:"#fff",r:3,stroke:"#222",strokeWidth:1.5})]})},l7=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=gt(P.useCallback(m=>m.nodeInternals.get(t),[t])),a=gt(P.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}=yq(o,a),v=Kl({sourceX:u,sourceY:l,sourcePosition:h,targetPosition:p,targetX:d,targetY:f});return O.jsx("path",{id:e,className:"react-flow__edge-path",d:v,markerEnd:n,style:i})},iT=172,oT=36,c7={custom:l7},f7=(e,t,r="LR")=>{const n=new HI.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:iT,height:oT})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),HI.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-iT/2,y:a.y-oT/2},o}),{nodes:e,edges:t}},d7=()=>{},h7=({data:e,dict:t,onSelect:r=d7})=>{const{nodes:n,edges:i}=f7(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]=a7(n),[l,d,f]=s7(i);return P.useEffect(()=>{a([...n]),d([...i])},[e]),O.jsx(gq,{nodes:o,edges:l,fitView:!0,onNodesChange:u,onEdgesChange:f,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:c7,connectionLineComponent:u7,children:O.jsx(BY,{variant:Oi.Dots,color:"#81818140",gap:18,size:1})})};var bq=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(bq||{});const xq=e=>{switch(e){case"entityCollection":return ae.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return ae.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return ae.ESubPermissionType.DS_METHOD;case"entity":return ae.ESubPermissionType.ENTITY_METHOD;default:return ae.EPermissionType.METHOD}},aT=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[bq[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===ae.EPermissionType.METHOD&&(l.subType=xq(a.applyTo)),n.push(l)}});return n},p7=(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:ae.EPermissionType.SINGLETON_METHOD})});return r};function tw(e,t=[],r=[],n=[]){const i=aT(r,e,ae.EPermissionType.ATTRIBUTE),o=aT(r,e,ae.EPermissionType.METHOD),a=p7(n,e),u=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:ae.ESubPermissionType.DS_METHOD})),l=[],d=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{l.push({applyTo:h.name,type:ae.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{d.push({applyTo:h.name,type:ae.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:ae.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 v7=(e=[],t=[],r=[])=>{const n=tw("",e,t,r),i={ds:{applyTo:"ds",type:ae.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===ae.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:l,type:ae.EPermissionType.DATACLASS,methods:[],attributes:[]}):u.type===ae.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:l,type:ae.EPermissionType.SINGLETON,methods:[],attributes:[]})),d){const f=(h,p,v)=>{h.forEach(m=>{m.applyTo===l&&m[p].push(v)})};[ae.ESubPermissionType.DS_METHOD,ae.ESubPermissionType.DATACLASS_METHOD,ae.ESubPermissionType.ENTITY_METHOD,ae.ESubPermissionType.ENTITY_SEL_METHOD].includes(u.type)?l==="ds"?i.ds.methods.push(u):f(i.ds.dataClasses,"methods",u):u.type===ae.EPermissionType.ATTRIBUTE?(f(i.ds.dataClasses,"attributes",u),f(i.ds.singletons,"attributes",u)):u.type===ae.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},wq=(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===ae.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:xq(h)}}return o})}}),r},_q=(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 ae.EPermissionType.DATASTORE:l=!!t;break;case ae.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 ae.ESubPermissionType.DS_METHOD:l=!!t.methods.find(b=>b.name===u&&b.applyTo==="dataStore");break;case ae.EPermissionType.DATACLASS:l=!!t.dataClasses[a];break;case ae.EPermissionType.ATTRIBUTE:l=!!((p=(h=t.dataClasses[a])==null?void 0:h.attributes)!=null&&p.find(b=>b.name===u));break;case ae.ESubPermissionType.ENTITY_SEL_METHOD:l=!!((v=t.dataClasses[a])!=null&&v.methods.find(b=>b.name===u&&b.applyTo==="entityCollection"));break;case ae.ESubPermissionType.DATACLASS_METHOD:l=!!((m=t.dataClasses[a])!=null&&m.methods.find(b=>b.name===u&&b.applyTo==="dataClass"));break;case ae.ESubPermissionType.ENTITY_METHOD:l=!!((y=t.dataClasses[a])!=null&&y.methods.find(b=>b.name===u&&b.applyTo==="entity"));break;case ae.EPermissionType.SINGLETON_METHOD:l=!!((x=t.singletons[a])!=null&&x.methods.find(b=>b.name===u));break;case ae.EPermissionType.SINGLETON:l=!!t.singletons[a];break;default:l=!0}return{...o,exists:l}});return{[r]:{...n,resources:i}}}).reduce((r,n)=>({...r,...n}),{});var Ma={exports:{}};/**
8
- * @license
9
- * Lodash <https://lodash.com/>
10
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
11
- * Released under MIT license <https://lodash.com/license>
12
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
13
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
14
- */var g7=Ma.exports,sT;function m7(){return sT||(sT=1,(function(e,t){(function(){var r,n="4.18.1",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",l="Invalid `imports` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",p=1,v=2,m=4,y=1,x=2,b=1,w=2,E=4,_=8,S=16,R=32,I=64,N=128,A=256,k=512,L=30,$="...",j=800,D=16,W=1,F=2,X=3,Z=1/0,Q=9007199254740991,U=17976931348623157e292,ee=NaN,ie=4294967295,ue=ie-1,B=ie>>>1,V=[["ary",N],["bind",b],["bindKey",w],["curry",_],["curryRight",S],["flip",k],["partial",R],["partialRight",I],["rearg",A]],J="[object Arguments]",H="[object Array]",G="[object AsyncFunction]",se="[object Boolean]",oe="[object Date]",fe="[object DOMException]",ne="[object Error]",K="[object Function]",he="[object GeneratorFunction]",be="[object Map]",pe="[object Number]",de="[object Null]",_e="[object Object]",Re="[object Promise]",Ze="[object Proxy]",ze="[object RegExp]",Fe="[object Set]",Ue="[object String]",lt="[object Symbol]",ct="[object Undefined]",mt="[object WeakMap]",yt="[object WeakSet]",rt="[object ArrayBuffer]",bt="[object DataView]",Qt="[object Float32Array]",dr="[object Float64Array]",Dt="[object Int8Array]",_t="[object Int16Array]",jt="[object Int32Array]",Vr="[object Uint8Array]",Jn="[object Uint8ClampedArray]",In="[object Uint16Array]",hr="[object Uint32Array]",qi=/\b__p \+= '';/g,xc=/\b(__p \+=) '' \+/g,wc=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Lo=/&(?:amp|lt|gt|quot|#39);/g,ds=/[&<>"']/g,hs=RegExp(Lo.source),_c=RegExp(ds.source),ps=/<%-([\s\S]+?)%>/g,Ec=/<%([\s\S]+?)%>/g,Fo=/<%=([\s\S]+?)%>/g,Sc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vs=/^\w*$/,Oc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ki=/[\\^$.*+?()[\]{}|]/g,Cc=RegExp(ki.source),Li=/^\s+/,Rc=/\s/,gs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ic=/\{\n\/\* \[wrapped with (.+)\] \*/,Pc=/,? & /,Tc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ms=/[()=,{}\[\]\/\s]/,Nc=/\\(\\)?/g,Ac=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ys=/\w*$/,Mc=/^[-+]0x[0-9a-f]+$/i,Dc=/^0b[01]+$/i,jc=/^\[object .+?Constructor\]$/,qc=/^0o[0-7]+$/i,kc=/^(?:0|[1-9]\d*)$/,Lc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qn=/($^)/,Fc=/['\n\r\u2028\u2029\\]/g,Fi="\\ud800-\\udfff",Bc="\\u0300-\\u036f",bs="\\ufe20-\\ufe2f",$c="\\u20d0-\\u20ff",Bo=Bc+bs+$c,xs="\\u2700-\\u27bf",$o="a-z\\xdf-\\xf6\\xf8-\\xff",zc="\\xac\\xb1\\xd7\\xf7",ws="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Hc="\\u2000-\\u206f",Uc=" \\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",zo="A-Z\\xc0-\\xd6\\xd8-\\xde",_s="\\ufe0e\\ufe0f",Es=zc+ws+Hc+Uc,Ho="['’]",Vc="["+Fi+"]",Uo="["+Es+"]",Bi="["+Bo+"]",ei="\\d+",Wc="["+xs+"]",Ss="["+$o+"]",Gw="[^"+Fi+Es+ei+xs+$o+zo+"]",Gc="\\ud83c[\\udffb-\\udfff]",ZL="(?:"+Bi+"|"+Gc+")",Kw="[^"+Fi+"]",Kc="(?:\\ud83c[\\udde6-\\uddff]){2}",Yc="[\\ud800-\\udbff][\\udc00-\\udfff]",$i="["+zo+"]",Yw="\\u200d",Xw="(?:"+Ss+"|"+Gw+")",JL="(?:"+$i+"|"+Gw+")",Zw="(?:"+Ho+"(?:d|ll|m|re|s|t|ve))?",Jw="(?:"+Ho+"(?:D|LL|M|RE|S|T|VE))?",Qw=ZL+"?",e_="["+_s+"]?",QL="(?:"+Yw+"(?:"+[Kw,Kc,Yc].join("|")+")"+e_+Qw+")*",eF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",tF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",t_=e_+Qw+QL,rF="(?:"+[Wc,Kc,Yc].join("|")+")"+t_,nF="(?:"+[Kw+Bi+"?",Bi,Kc,Yc,Vc].join("|")+")",iF=RegExp(Ho,"g"),oF=RegExp(Bi,"g"),Xc=RegExp(Gc+"(?="+Gc+")|"+nF+t_,"g"),aF=RegExp([$i+"?"+Ss+"+"+Zw+"(?="+[Uo,$i,"$"].join("|")+")",JL+"+"+Jw+"(?="+[Uo,$i+Xw,"$"].join("|")+")",$i+"?"+Xw+"+"+Zw,$i+"+"+Jw,tF,eF,ei,rF].join("|"),"g"),sF=RegExp("["+Yw+Fi+Bo+_s+"]"),uF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,lF=["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"],cF=-1,at={};at[Qt]=at[dr]=at[Dt]=at[_t]=at[jt]=at[Vr]=at[Jn]=at[In]=at[hr]=!0,at[J]=at[H]=at[rt]=at[se]=at[bt]=at[oe]=at[ne]=at[K]=at[be]=at[pe]=at[_e]=at[ze]=at[Fe]=at[Ue]=at[mt]=!1;var nt={};nt[J]=nt[H]=nt[rt]=nt[bt]=nt[se]=nt[oe]=nt[Qt]=nt[dr]=nt[Dt]=nt[_t]=nt[jt]=nt[be]=nt[pe]=nt[_e]=nt[ze]=nt[Fe]=nt[Ue]=nt[lt]=nt[Vr]=nt[Jn]=nt[In]=nt[hr]=!0,nt[ne]=nt[K]=nt[mt]=!1;var fF={À:"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"},dF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},hF={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},pF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},vF=parseFloat,gF=parseInt,r_=typeof ht=="object"&&ht&&ht.Object===Object&&ht,mF=typeof self=="object"&&self&&self.Object===Object&&self,It=r_||mF||Function("return this")(),Zc=t&&!t.nodeType&&t,ti=Zc&&!0&&e&&!e.nodeType&&e,n_=ti&&ti.exports===Zc,Jc=n_&&r_.process,pr=(function(){try{var te=ti&&ti.require&&ti.require("util").types;return te||Jc&&Jc.binding&&Jc.binding("util")}catch{}})(),i_=pr&&pr.isArrayBuffer,o_=pr&&pr.isDate,a_=pr&&pr.isMap,s_=pr&&pr.isRegExp,u_=pr&&pr.isSet,l_=pr&&pr.isTypedArray;function er(te,ge,le){switch(le.length){case 0:return te.call(ge);case 1:return te.call(ge,le[0]);case 2:return te.call(ge,le[0],le[1]);case 3:return te.call(ge,le[0],le[1],le[2])}return te.apply(ge,le)}function yF(te,ge,le,Oe){for(var Ne=-1,Ve=te==null?0:te.length;++Ne<Ve;){var Et=te[Ne];ge(Oe,Et,le(Et),te)}return Oe}function tr(te,ge){for(var le=-1,Oe=te==null?0:te.length;++le<Oe&&ge(te[le],le,te)!==!1;);return te}function bF(te,ge){for(var le=te==null?0:te.length;le--&&ge(te[le],le,te)!==!1;);return te}function c_(te,ge){for(var le=-1,Oe=te==null?0:te.length;++le<Oe;)if(!ge(te[le],le,te))return!1;return!0}function Pn(te,ge){for(var le=-1,Oe=te==null?0:te.length,Ne=0,Ve=[];++le<Oe;){var Et=te[le];ge(Et,le,te)&&(Ve[Ne++]=Et)}return Ve}function Os(te,ge){var le=te==null?0:te.length;return!!le&&zi(te,ge,0)>-1}function Qc(te,ge,le){for(var Oe=-1,Ne=te==null?0:te.length;++Oe<Ne;)if(le(ge,te[Oe]))return!0;return!1}function st(te,ge){for(var le=-1,Oe=te==null?0:te.length,Ne=Array(Oe);++le<Oe;)Ne[le]=ge(te[le],le,te);return Ne}function Tn(te,ge){for(var le=-1,Oe=ge.length,Ne=te.length;++le<Oe;)te[Ne+le]=ge[le];return te}function ef(te,ge,le,Oe){var Ne=-1,Ve=te==null?0:te.length;for(Oe&&Ve&&(le=te[++Ne]);++Ne<Ve;)le=ge(le,te[Ne],Ne,te);return le}function xF(te,ge,le,Oe){var Ne=te==null?0:te.length;for(Oe&&Ne&&(le=te[--Ne]);Ne--;)le=ge(le,te[Ne],Ne,te);return le}function tf(te,ge){for(var le=-1,Oe=te==null?0:te.length;++le<Oe;)if(ge(te[le],le,te))return!0;return!1}var wF=rf("length");function _F(te){return te.split("")}function EF(te){return te.match(Tc)||[]}function f_(te,ge,le){var Oe;return le(te,function(Ne,Ve,Et){if(ge(Ne,Ve,Et))return Oe=Ve,!1}),Oe}function Cs(te,ge,le,Oe){for(var Ne=te.length,Ve=le+(Oe?1:-1);Oe?Ve--:++Ve<Ne;)if(ge(te[Ve],Ve,te))return Ve;return-1}function zi(te,ge,le){return ge===ge?jF(te,ge,le):Cs(te,d_,le)}function SF(te,ge,le,Oe){for(var Ne=le-1,Ve=te.length;++Ne<Ve;)if(Oe(te[Ne],ge))return Ne;return-1}function d_(te){return te!==te}function h_(te,ge){var le=te==null?0:te.length;return le?of(te,ge)/le:ee}function rf(te){return function(ge){return ge==null?r:ge[te]}}function nf(te){return function(ge){return te==null?r:te[ge]}}function p_(te,ge,le,Oe,Ne){return Ne(te,function(Ve,Et,et){le=Oe?(Oe=!1,Ve):ge(le,Ve,Et,et)}),le}function OF(te,ge){var le=te.length;for(te.sort(ge);le--;)te[le]=te[le].value;return te}function of(te,ge){for(var le,Oe=-1,Ne=te.length;++Oe<Ne;){var Ve=ge(te[Oe]);Ve!==r&&(le=le===r?Ve:le+Ve)}return le}function af(te,ge){for(var le=-1,Oe=Array(te);++le<te;)Oe[le]=ge(le);return Oe}function CF(te,ge){return st(ge,function(le){return[le,te[le]]})}function v_(te){return te&&te.slice(0,b_(te)+1).replace(Li,"")}function rr(te){return function(ge){return te(ge)}}function sf(te,ge){return st(ge,function(le){return te[le]})}function Vo(te,ge){return te.has(ge)}function g_(te,ge){for(var le=-1,Oe=te.length;++le<Oe&&zi(ge,te[le],0)>-1;);return le}function m_(te,ge){for(var le=te.length;le--&&zi(ge,te[le],0)>-1;);return le}function RF(te,ge){for(var le=te.length,Oe=0;le--;)te[le]===ge&&++Oe;return Oe}var IF=nf(fF),PF=nf(dF);function TF(te){return"\\"+pF[te]}function NF(te,ge){return te==null?r:te[ge]}function Hi(te){return sF.test(te)}function AF(te){return uF.test(te)}function MF(te){for(var ge,le=[];!(ge=te.next()).done;)le.push(ge.value);return le}function uf(te){var ge=-1,le=Array(te.size);return te.forEach(function(Oe,Ne){le[++ge]=[Ne,Oe]}),le}function y_(te,ge){return function(le){return te(ge(le))}}function Nn(te,ge){for(var le=-1,Oe=te.length,Ne=0,Ve=[];++le<Oe;){var Et=te[le];(Et===ge||Et===h)&&(te[le]=h,Ve[Ne++]=le)}return Ve}function Rs(te){var ge=-1,le=Array(te.size);return te.forEach(function(Oe){le[++ge]=Oe}),le}function DF(te){var ge=-1,le=Array(te.size);return te.forEach(function(Oe){le[++ge]=[Oe,Oe]}),le}function jF(te,ge,le){for(var Oe=le-1,Ne=te.length;++Oe<Ne;)if(te[Oe]===ge)return Oe;return-1}function qF(te,ge,le){for(var Oe=le+1;Oe--;)if(te[Oe]===ge)return Oe;return Oe}function Ui(te){return Hi(te)?LF(te):wF(te)}function Nr(te){return Hi(te)?FF(te):_F(te)}function b_(te){for(var ge=te.length;ge--&&Rc.test(te.charAt(ge)););return ge}var kF=nf(hF);function LF(te){for(var ge=Xc.lastIndex=0;Xc.test(te);)++ge;return ge}function FF(te){return te.match(Xc)||[]}function BF(te){return te.match(aF)||[]}var $F=(function te(ge){ge=ge==null?It:Vi.defaults(It.Object(),ge,Vi.pick(It,lF));var le=ge.Array,Oe=ge.Date,Ne=ge.Error,Ve=ge.Function,Et=ge.Math,et=ge.Object,lf=ge.RegExp,zF=ge.String,vr=ge.TypeError,Is=le.prototype,HF=Ve.prototype,Wi=et.prototype,Ps=ge["__core-js_shared__"],Ts=HF.toString,Ge=Wi.hasOwnProperty,UF=0,x_=(function(){var s=/[^.]+$/.exec(Ps&&Ps.keys&&Ps.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),Ns=Wi.toString,VF=Ts.call(et),WF=It._,GF=lf("^"+Ts.call(Ge).replace(ki,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),As=n_?ge.Buffer:r,An=ge.Symbol,Ms=ge.Uint8Array,w_=As?As.allocUnsafe:r,Ds=y_(et.getPrototypeOf,et),__=et.create,E_=Wi.propertyIsEnumerable,js=Is.splice,S_=An?An.isConcatSpreadable:r,Wo=An?An.iterator:r,ri=An?An.toStringTag:r,qs=(function(){try{var s=si(et,"defineProperty");return s({},"",{}),s}catch{}})(),KF=ge.clearTimeout!==It.clearTimeout&&ge.clearTimeout,YF=Oe&&Oe.now!==It.Date.now&&Oe.now,XF=ge.setTimeout!==It.setTimeout&&ge.setTimeout,ks=Et.ceil,Ls=Et.floor,cf=et.getOwnPropertySymbols,ZF=As?As.isBuffer:r,O_=ge.isFinite,JF=Is.join,QF=y_(et.keys,et),St=Et.max,At=Et.min,eB=Oe.now,tB=ge.parseInt,C_=Et.random,rB=Is.reverse,ff=si(ge,"DataView"),Go=si(ge,"Map"),df=si(ge,"Promise"),Gi=si(ge,"Set"),Ko=si(ge,"WeakMap"),Yo=si(et,"create"),Fs=Ko&&new Ko,Ki={},nB=ui(ff),iB=ui(Go),oB=ui(df),aB=ui(Gi),sB=ui(Ko),Bs=An?An.prototype:r,Xo=Bs?Bs.valueOf:r,R_=Bs?Bs.toString:r;function M(s){if(dt(s)&&!Ae(s)&&!(s instanceof Le)){if(s instanceof gr)return s;if(Ge.call(s,"__wrapped__"))return IE(s)}return new gr(s)}var Yi=(function(){function s(){}return function(c){if(!ft(c))return{};if(__)return __(c);s.prototype=c;var g=new s;return s.prototype=r,g}})();function $s(){}function gr(s,c){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=r}M.templateSettings={escape:ps,evaluate:Ec,interpolate:Fo,variable:"",imports:{_:M}},M.prototype=$s.prototype,M.prototype.constructor=M,gr.prototype=Yi($s.prototype),gr.prototype.constructor=gr;function Le(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ie,this.__views__=[]}function uB(){var s=new Le(this.__wrapped__);return s.__actions__=Ht(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Ht(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Ht(this.__views__),s}function lB(){if(this.__filtered__){var s=new Le(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function cB(){var s=this.__wrapped__.value(),c=this.__dir__,g=Ae(s),C=c<0,T=g?s.length:0,q=_$(0,T,this.__views__),z=q.start,Y=q.end,re=Y-z,me=C?Y:z-1,ye=this.__iteratees__,xe=ye.length,Ee=0,Ce=At(re,this.__takeCount__);if(!g||!C&&T==re&&Ce==re)return Z_(s,this.__actions__);var Te=[];e:for(;re--&&Ee<Ce;){me+=c;for(var De=-1,Ie=s[me];++De<xe;){var qe=ye[De],Be=qe.iteratee,or=qe.type,Lt=Be(Ie);if(or==F)Ie=Lt;else if(!Lt){if(or==W)continue e;break e}}Te[Ee++]=Ie}return Te}Le.prototype=Yi($s.prototype),Le.prototype.constructor=Le;function ni(s){var c=-1,g=s==null?0:s.length;for(this.clear();++c<g;){var C=s[c];this.set(C[0],C[1])}}function fB(){this.__data__=Yo?Yo(null):{},this.size=0}function dB(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}function hB(s){var c=this.__data__;if(Yo){var g=c[s];return g===d?r:g}return Ge.call(c,s)?c[s]:r}function pB(s){var c=this.__data__;return Yo?c[s]!==r:Ge.call(c,s)}function vB(s,c){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Yo&&c===r?d:c,this}ni.prototype.clear=fB,ni.prototype.delete=dB,ni.prototype.get=hB,ni.prototype.has=pB,ni.prototype.set=vB;function cn(s){var c=-1,g=s==null?0:s.length;for(this.clear();++c<g;){var C=s[c];this.set(C[0],C[1])}}function gB(){this.__data__=[],this.size=0}function mB(s){var c=this.__data__,g=zs(c,s);if(g<0)return!1;var C=c.length-1;return g==C?c.pop():js.call(c,g,1),--this.size,!0}function yB(s){var c=this.__data__,g=zs(c,s);return g<0?r:c[g][1]}function bB(s){return zs(this.__data__,s)>-1}function xB(s,c){var g=this.__data__,C=zs(g,s);return C<0?(++this.size,g.push([s,c])):g[C][1]=c,this}cn.prototype.clear=gB,cn.prototype.delete=mB,cn.prototype.get=yB,cn.prototype.has=bB,cn.prototype.set=xB;function fn(s){var c=-1,g=s==null?0:s.length;for(this.clear();++c<g;){var C=s[c];this.set(C[0],C[1])}}function wB(){this.size=0,this.__data__={hash:new ni,map:new(Go||cn),string:new ni}}function _B(s){var c=eu(this,s).delete(s);return this.size-=c?1:0,c}function EB(s){return eu(this,s).get(s)}function SB(s){return eu(this,s).has(s)}function OB(s,c){var g=eu(this,s),C=g.size;return g.set(s,c),this.size+=g.size==C?0:1,this}fn.prototype.clear=wB,fn.prototype.delete=_B,fn.prototype.get=EB,fn.prototype.has=SB,fn.prototype.set=OB;function ii(s){var c=-1,g=s==null?0:s.length;for(this.__data__=new fn;++c<g;)this.add(s[c])}function CB(s){return this.__data__.set(s,d),this}function RB(s){return this.__data__.has(s)}ii.prototype.add=ii.prototype.push=CB,ii.prototype.has=RB;function Ar(s){var c=this.__data__=new cn(s);this.size=c.size}function IB(){this.__data__=new cn,this.size=0}function PB(s){var c=this.__data__,g=c.delete(s);return this.size=c.size,g}function TB(s){return this.__data__.get(s)}function NB(s){return this.__data__.has(s)}function AB(s,c){var g=this.__data__;if(g instanceof cn){var C=g.__data__;if(!Go||C.length<i-1)return C.push([s,c]),this.size=++g.size,this;g=this.__data__=new fn(C)}return g.set(s,c),this.size=g.size,this}Ar.prototype.clear=IB,Ar.prototype.delete=PB,Ar.prototype.get=TB,Ar.prototype.has=NB,Ar.prototype.set=AB;function I_(s,c){var g=Ae(s),C=!g&&li(s),T=!g&&!C&&kn(s),q=!g&&!C&&!T&&Qi(s),z=g||C||T||q,Y=z?af(s.length,zF):[],re=Y.length;for(var me in s)(c||Ge.call(s,me))&&!(z&&(me=="length"||T&&(me=="offset"||me=="parent")||q&&(me=="buffer"||me=="byteLength"||me=="byteOffset")||pn(me,re)))&&Y.push(me);return Y}function P_(s){var c=s.length;return c?s[Ef(0,c-1)]:r}function MB(s,c){return tu(Ht(s),oi(c,0,s.length))}function DB(s){return tu(Ht(s))}function hf(s,c,g){(g!==r&&!Dr(s[c],g)||g===r&&!(c in s))&&Wr(s,c,g)}function Zo(s,c,g){var C=s[c];(!(Ge.call(s,c)&&Dr(C,g))||g===r&&!(c in s))&&Wr(s,c,g)}function zs(s,c){for(var g=s.length;g--;)if(Dr(s[g][0],c))return g;return-1}function jB(s,c,g,C){return Mn(s,function(T,q,z){c(C,T,g(T),z)}),C}function T_(s,c){return s&&Kr(c,Ct(c),s)}function qB(s,c){return s&&Kr(c,Vt(c),s)}function Wr(s,c,g){c=="__proto__"&&qs?qs(s,c,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[c]=g}function pf(s,c){for(var g=-1,C=c.length,T=le(C),q=s==null;++g<C;)T[g]=q?r:Yf(s,c[g]);return T}function oi(s,c,g){return s===s&&(g!==r&&(s=s<=g?s:g),c!==r&&(s=s>=c?s:c)),s}function mr(s,c,g,C,T,q){var z,Y=c&p,re=c&v,me=c&m;if(g&&(z=T?g(s,C,T,q):g(s)),z!==r)return z;if(!ft(s))return s;var ye=Ae(s);if(ye){if(z=S$(s),!Y)return Ht(s,z)}else{var xe=Mt(s),Ee=xe==K||xe==he;if(kn(s))return eE(s,Y);if(xe==_e||xe==J||Ee&&!T){if(z=re||Ee?{}:bE(s),!Y)return re?h$(s,qB(z,s)):d$(s,T_(z,s))}else{if(!nt[xe])return T?s:{};z=O$(s,xe,Y)}}q||(q=new Ar);var Ce=q.get(s);if(Ce)return Ce;q.set(s,z),KE(s)?s.forEach(function(Ie){z.add(mr(Ie,c,g,Ie,s,q))}):WE(s)&&s.forEach(function(Ie,qe){z.set(qe,mr(Ie,c,g,qe,s,q))});var Te=me?re?Df:Mf:re?Vt:Ct,De=ye?r:Te(s);return tr(De||s,function(Ie,qe){De&&(qe=Ie,Ie=s[qe]),Zo(z,qe,mr(Ie,c,g,qe,s,q))}),z}function kB(s){var c=Ct(s);return function(g){return N_(g,s,c)}}function N_(s,c,g){var C=g.length;if(s==null)return!C;for(s=et(s);C--;){var T=g[C],q=c[T],z=s[T];if(z===r&&!(T in s)||!q(z))return!1}return!0}function A_(s,c,g){if(typeof s!="function")throw new vr(a);return ia(function(){s.apply(r,g)},c)}function Jo(s,c,g,C){var T=-1,q=Os,z=!0,Y=s.length,re=[],me=c.length;if(!Y)return re;g&&(c=st(c,rr(g))),C?(q=Qc,z=!1):c.length>=i&&(q=Vo,z=!1,c=new ii(c));e:for(;++T<Y;){var ye=s[T],xe=g==null?ye:g(ye);if(ye=C||ye!==0?ye:0,z&&xe===xe){for(var Ee=me;Ee--;)if(c[Ee]===xe)continue e;re.push(ye)}else q(c,xe,C)||re.push(ye)}return re}var Mn=oE(Gr),M_=oE(gf,!0);function LB(s,c){var g=!0;return Mn(s,function(C,T,q){return g=!!c(C,T,q),g}),g}function Hs(s,c,g){for(var C=-1,T=s.length;++C<T;){var q=s[C],z=c(q);if(z!=null&&(Y===r?z===z&&!ir(z):g(z,Y)))var Y=z,re=q}return re}function FB(s,c,g,C){var T=s.length;for(g=Me(g),g<0&&(g=-g>T?0:T+g),C=C===r||C>T?T:Me(C),C<0&&(C+=T),C=g>C?0:XE(C);g<C;)s[g++]=c;return s}function D_(s,c){var g=[];return Mn(s,function(C,T,q){c(C,T,q)&&g.push(C)}),g}function Pt(s,c,g,C,T){var q=-1,z=s.length;for(g||(g=R$),T||(T=[]);++q<z;){var Y=s[q];c>0&&g(Y)?c>1?Pt(Y,c-1,g,C,T):Tn(T,Y):C||(T[T.length]=Y)}return T}var vf=aE(),j_=aE(!0);function Gr(s,c){return s&&vf(s,c,Ct)}function gf(s,c){return s&&j_(s,c,Ct)}function Us(s,c){return Pn(c,function(g){return vn(s[g])})}function ai(s,c){c=jn(c,s);for(var g=0,C=c.length;s!=null&&g<C;)s=s[Mr(c[g++])];return g&&g==C?s:r}function q_(s,c,g){var C=c(s);return Ae(s)?C:Tn(C,g(s))}function qt(s){return s==null?s===r?ct:de:ri&&ri in et(s)?w$(s):D$(s)}function mf(s,c){return s>c}function BB(s,c){return s!=null&&Ge.call(s,c)}function $B(s,c){return s!=null&&c in et(s)}function zB(s,c,g){return s>=At(c,g)&&s<St(c,g)}function yf(s,c,g){for(var C=g?Qc:Os,T=s[0].length,q=s.length,z=q,Y=le(q),re=1/0,me=[];z--;){var ye=s[z];z&&c&&(ye=st(ye,rr(c))),re=At(ye.length,re),Y[z]=!g&&(c||T>=120&&ye.length>=120)?new ii(z&&ye):r}ye=s[0];var xe=-1,Ee=Y[0];e:for(;++xe<T&&me.length<re;){var Ce=ye[xe],Te=c?c(Ce):Ce;if(Ce=g||Ce!==0?Ce:0,!(Ee?Vo(Ee,Te):C(me,Te,g))){for(z=q;--z;){var De=Y[z];if(!(De?Vo(De,Te):C(s[z],Te,g)))continue e}Ee&&Ee.push(Te),me.push(Ce)}}return me}function HB(s,c,g,C){return Gr(s,function(T,q,z){c(C,g(T),q,z)}),C}function Qo(s,c,g){c=jn(c,s),s=EE(s,c);var C=s==null?s:s[Mr(br(c))];return C==null?r:er(C,s,g)}function k_(s){return dt(s)&&qt(s)==J}function UB(s){return dt(s)&&qt(s)==rt}function VB(s){return dt(s)&&qt(s)==oe}function ea(s,c,g,C,T){return s===c?!0:s==null||c==null||!dt(s)&&!dt(c)?s!==s&&c!==c:WB(s,c,g,C,ea,T)}function WB(s,c,g,C,T,q){var z=Ae(s),Y=Ae(c),re=z?H:Mt(s),me=Y?H:Mt(c);re=re==J?_e:re,me=me==J?_e:me;var ye=re==_e,xe=me==_e,Ee=re==me;if(Ee&&kn(s)){if(!kn(c))return!1;z=!0,ye=!1}if(Ee&&!ye)return q||(q=new Ar),z||Qi(s)?gE(s,c,g,C,T,q):b$(s,c,re,g,C,T,q);if(!(g&y)){var Ce=ye&&Ge.call(s,"__wrapped__"),Te=xe&&Ge.call(c,"__wrapped__");if(Ce||Te){var De=Ce?s.value():s,Ie=Te?c.value():c;return q||(q=new Ar),T(De,Ie,g,C,q)}}return Ee?(q||(q=new Ar),x$(s,c,g,C,T,q)):!1}function GB(s){return dt(s)&&Mt(s)==be}function bf(s,c,g,C){var T=g.length,q=T,z=!C;if(s==null)return!q;for(s=et(s);T--;){var Y=g[T];if(z&&Y[2]?Y[1]!==s[Y[0]]:!(Y[0]in s))return!1}for(;++T<q;){Y=g[T];var re=Y[0],me=s[re],ye=Y[1];if(z&&Y[2]){if(me===r&&!(re in s))return!1}else{var xe=new Ar;if(C)var Ee=C(me,ye,re,s,c,xe);if(!(Ee===r?ea(ye,me,y|x,C,xe):Ee))return!1}}return!0}function L_(s){if(!ft(s)||P$(s))return!1;var c=vn(s)?GF:jc;return c.test(ui(s))}function KB(s){return dt(s)&&qt(s)==ze}function YB(s){return dt(s)&&Mt(s)==Fe}function XB(s){return dt(s)&&su(s.length)&&!!at[qt(s)]}function F_(s){return typeof s=="function"?s:s==null?Wt:typeof s=="object"?Ae(s)?z_(s[0],s[1]):$_(s):u1(s)}function xf(s){if(!na(s))return QF(s);var c=[];for(var g in et(s))Ge.call(s,g)&&g!="constructor"&&c.push(g);return c}function ZB(s){if(!ft(s))return M$(s);var c=na(s),g=[];for(var C in s)C=="constructor"&&(c||!Ge.call(s,C))||g.push(C);return g}function wf(s,c){return s<c}function B_(s,c){var g=-1,C=Ut(s)?le(s.length):[];return Mn(s,function(T,q,z){C[++g]=c(T,q,z)}),C}function $_(s){var c=qf(s);return c.length==1&&c[0][2]?wE(c[0][0],c[0][1]):function(g){return g===s||bf(g,s,c)}}function z_(s,c){return Lf(s)&&xE(c)?wE(Mr(s),c):function(g){var C=Yf(g,s);return C===r&&C===c?Xf(g,s):ea(c,C,y|x)}}function Vs(s,c,g,C,T){s!==c&&vf(c,function(q,z){if(T||(T=new Ar),ft(q))JB(s,c,z,g,Vs,C,T);else{var Y=C?C(Bf(s,z),q,z+"",s,c,T):r;Y===r&&(Y=q),hf(s,z,Y)}},Vt)}function JB(s,c,g,C,T,q,z){var Y=Bf(s,g),re=Bf(c,g),me=z.get(re);if(me){hf(s,g,me);return}var ye=q?q(Y,re,g+"",s,c,z):r,xe=ye===r;if(xe){var Ee=Ae(re),Ce=!Ee&&kn(re),Te=!Ee&&!Ce&&Qi(re);ye=re,Ee||Ce||Te?Ae(Y)?ye=Y:pt(Y)?ye=Ht(Y):Ce?(xe=!1,ye=eE(re,!0)):Te?(xe=!1,ye=tE(re,!0)):ye=[]:oa(re)||li(re)?(ye=Y,li(Y)?ye=ZE(Y):(!ft(Y)||vn(Y))&&(ye=bE(re))):xe=!1}xe&&(z.set(re,ye),T(ye,re,C,q,z),z.delete(re)),hf(s,g,ye)}function H_(s,c){var g=s.length;if(g)return c+=c<0?g:0,pn(c,g)?s[c]:r}function U_(s,c,g){c.length?c=st(c,function(q){return Ae(q)?function(z){return ai(z,q.length===1?q[0]:q)}:q}):c=[Wt];var C=-1;c=st(c,rr(Pe()));var T=B_(s,function(q,z,Y){var re=st(c,function(me){return me(q)});return{criteria:re,index:++C,value:q}});return OF(T,function(q,z){return f$(q,z,g)})}function QB(s,c){return V_(s,c,function(g,C){return Xf(s,C)})}function V_(s,c,g){for(var C=-1,T=c.length,q={};++C<T;){var z=c[C],Y=ai(s,z);g(Y,z)&&ta(q,jn(z,s),Y)}return q}function e$(s){return function(c){return ai(c,s)}}function _f(s,c,g,C){var T=C?SF:zi,q=-1,z=c.length,Y=s;for(s===c&&(c=Ht(c)),g&&(Y=st(s,rr(g)));++q<z;)for(var re=0,me=c[q],ye=g?g(me):me;(re=T(Y,ye,re,C))>-1;)Y!==s&&js.call(Y,re,1),js.call(s,re,1);return s}function W_(s,c){for(var g=s?c.length:0,C=g-1;g--;){var T=c[g];if(g==C||T!==q){var q=T;pn(T)?js.call(s,T,1):Cf(s,T)}}return s}function Ef(s,c){return s+Ls(C_()*(c-s+1))}function t$(s,c,g,C){for(var T=-1,q=St(ks((c-s)/(g||1)),0),z=le(q);q--;)z[C?q:++T]=s,s+=g;return z}function Sf(s,c){var g="";if(!s||c<1||c>Q)return g;do c%2&&(g+=s),c=Ls(c/2),c&&(s+=s);while(c);return g}function je(s,c){return $f(_E(s,c,Wt),s+"")}function r$(s){return P_(eo(s))}function n$(s,c){var g=eo(s);return tu(g,oi(c,0,g.length))}function ta(s,c,g,C){if(!ft(s))return s;c=jn(c,s);for(var T=-1,q=c.length,z=q-1,Y=s;Y!=null&&++T<q;){var re=Mr(c[T]),me=g;if(re==="__proto__"||re==="constructor"||re==="prototype")return s;if(T!=z){var ye=Y[re];me=C?C(ye,re,Y):r,me===r&&(me=ft(ye)?ye:pn(c[T+1])?[]:{})}Zo(Y,re,me),Y=Y[re]}return s}var G_=Fs?function(s,c){return Fs.set(s,c),s}:Wt,i$=qs?function(s,c){return qs(s,"toString",{configurable:!0,enumerable:!1,value:Jf(c),writable:!0})}:Wt;function o$(s){return tu(eo(s))}function yr(s,c,g){var C=-1,T=s.length;c<0&&(c=-c>T?0:T+c),g=g>T?T:g,g<0&&(g+=T),T=c>g?0:g-c>>>0,c>>>=0;for(var q=le(T);++C<T;)q[C]=s[C+c];return q}function a$(s,c){var g;return Mn(s,function(C,T,q){return g=c(C,T,q),!g}),!!g}function Ws(s,c,g){var C=0,T=s==null?C:s.length;if(typeof c=="number"&&c===c&&T<=B){for(;C<T;){var q=C+T>>>1,z=s[q];z!==null&&!ir(z)&&(g?z<=c:z<c)?C=q+1:T=q}return T}return Of(s,c,Wt,g)}function Of(s,c,g,C){var T=0,q=s==null?0:s.length;if(q===0)return 0;c=g(c);for(var z=c!==c,Y=c===null,re=ir(c),me=c===r;T<q;){var ye=Ls((T+q)/2),xe=g(s[ye]),Ee=xe!==r,Ce=xe===null,Te=xe===xe,De=ir(xe);if(z)var Ie=C||Te;else me?Ie=Te&&(C||Ee):Y?Ie=Te&&Ee&&(C||!Ce):re?Ie=Te&&Ee&&!Ce&&(C||!De):Ce||De?Ie=!1:Ie=C?xe<=c:xe<c;Ie?T=ye+1:q=ye}return At(q,ue)}function K_(s,c){for(var g=-1,C=s.length,T=0,q=[];++g<C;){var z=s[g],Y=c?c(z):z;if(!g||!Dr(Y,re)){var re=Y;q[T++]=z===0?0:z}}return q}function Y_(s){return typeof s=="number"?s:ir(s)?ee:+s}function nr(s){if(typeof s=="string")return s;if(Ae(s))return st(s,nr)+"";if(ir(s))return R_?R_.call(s):"";var c=s+"";return c=="0"&&1/s==-Z?"-0":c}function Dn(s,c,g){var C=-1,T=Os,q=s.length,z=!0,Y=[],re=Y;if(g)z=!1,T=Qc;else if(q>=i){var me=c?null:m$(s);if(me)return Rs(me);z=!1,T=Vo,re=new ii}else re=c?[]:Y;e:for(;++C<q;){var ye=s[C],xe=c?c(ye):ye;if(ye=g||ye!==0?ye:0,z&&xe===xe){for(var Ee=re.length;Ee--;)if(re[Ee]===xe)continue e;c&&re.push(xe),Y.push(ye)}else T(re,xe,g)||(re!==Y&&re.push(xe),Y.push(ye))}return Y}function Cf(s,c){c=jn(c,s);var g=-1,C=c.length;if(!C)return!0;for(;++g<C;){var T=Mr(c[g]);if(T==="__proto__"&&!Ge.call(s,"__proto__")||(T==="constructor"||T==="prototype")&&g<C-1)return!1}var q=EE(s,c);return q==null||delete q[Mr(br(c))]}function X_(s,c,g,C){return ta(s,c,g(ai(s,c)),C)}function Gs(s,c,g,C){for(var T=s.length,q=C?T:-1;(C?q--:++q<T)&&c(s[q],q,s););return g?yr(s,C?0:q,C?q+1:T):yr(s,C?q+1:0,C?T:q)}function Z_(s,c){var g=s;return g instanceof Le&&(g=g.value()),ef(c,function(C,T){return T.func.apply(T.thisArg,Tn([C],T.args))},g)}function Rf(s,c,g){var C=s.length;if(C<2)return C?Dn(s[0]):[];for(var T=-1,q=le(C);++T<C;)for(var z=s[T],Y=-1;++Y<C;)Y!=T&&(q[T]=Jo(q[T]||z,s[Y],c,g));return Dn(Pt(q,1),c,g)}function J_(s,c,g){for(var C=-1,T=s.length,q=c.length,z={};++C<T;){var Y=C<q?c[C]:r;g(z,s[C],Y)}return z}function If(s){return pt(s)?s:[]}function Pf(s){return typeof s=="function"?s:Wt}function jn(s,c){return Ae(s)?s:Lf(s,c)?[s]:RE(Ke(s))}var s$=je;function qn(s,c,g){var C=s.length;return g=g===r?C:g,!c&&g>=C?s:yr(s,c,g)}var Q_=KF||function(s){return It.clearTimeout(s)};function eE(s,c){if(c)return s.slice();var g=s.length,C=w_?w_(g):new s.constructor(g);return s.copy(C),C}function Tf(s){var c=new s.constructor(s.byteLength);return new Ms(c).set(new Ms(s)),c}function u$(s,c){var g=c?Tf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function l$(s){var c=new s.constructor(s.source,ys.exec(s));return c.lastIndex=s.lastIndex,c}function c$(s){return Xo?et(Xo.call(s)):{}}function tE(s,c){var g=c?Tf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function rE(s,c){if(s!==c){var g=s!==r,C=s===null,T=s===s,q=ir(s),z=c!==r,Y=c===null,re=c===c,me=ir(c);if(!Y&&!me&&!q&&s>c||q&&z&&re&&!Y&&!me||C&&z&&re||!g&&re||!T)return 1;if(!C&&!q&&!me&&s<c||me&&g&&T&&!C&&!q||Y&&g&&T||!z&&T||!re)return-1}return 0}function f$(s,c,g){for(var C=-1,T=s.criteria,q=c.criteria,z=T.length,Y=g.length;++C<z;){var re=rE(T[C],q[C]);if(re){if(C>=Y)return re;var me=g[C];return re*(me=="desc"?-1:1)}}return s.index-c.index}function nE(s,c,g,C){for(var T=-1,q=s.length,z=g.length,Y=-1,re=c.length,me=St(q-z,0),ye=le(re+me),xe=!C;++Y<re;)ye[Y]=c[Y];for(;++T<z;)(xe||T<q)&&(ye[g[T]]=s[T]);for(;me--;)ye[Y++]=s[T++];return ye}function iE(s,c,g,C){for(var T=-1,q=s.length,z=-1,Y=g.length,re=-1,me=c.length,ye=St(q-Y,0),xe=le(ye+me),Ee=!C;++T<ye;)xe[T]=s[T];for(var Ce=T;++re<me;)xe[Ce+re]=c[re];for(;++z<Y;)(Ee||T<q)&&(xe[Ce+g[z]]=s[T++]);return xe}function Ht(s,c){var g=-1,C=s.length;for(c||(c=le(C));++g<C;)c[g]=s[g];return c}function Kr(s,c,g,C){var T=!g;g||(g={});for(var q=-1,z=c.length;++q<z;){var Y=c[q],re=C?C(g[Y],s[Y],Y,g,s):r;re===r&&(re=s[Y]),T?Wr(g,Y,re):Zo(g,Y,re)}return g}function d$(s,c){return Kr(s,kf(s),c)}function h$(s,c){return Kr(s,mE(s),c)}function Ks(s,c){return function(g,C){var T=Ae(g)?yF:jB,q=c?c():{};return T(g,s,Pe(C,2),q)}}function Xi(s){return je(function(c,g){var C=-1,T=g.length,q=T>1?g[T-1]:r,z=T>2?g[2]:r;for(q=s.length>3&&typeof q=="function"?(T--,q):r,z&&kt(g[0],g[1],z)&&(q=T<3?r:q,T=1),c=et(c);++C<T;){var Y=g[C];Y&&s(c,Y,C,q)}return c})}function oE(s,c){return function(g,C){if(g==null)return g;if(!Ut(g))return s(g,C);for(var T=g.length,q=c?T:-1,z=et(g);(c?q--:++q<T)&&C(z[q],q,z)!==!1;);return g}}function aE(s){return function(c,g,C){for(var T=-1,q=et(c),z=C(c),Y=z.length;Y--;){var re=z[s?Y:++T];if(g(q[re],re,q)===!1)break}return c}}function p$(s,c,g){var C=c&b,T=ra(s);function q(){var z=this&&this!==It&&this instanceof q?T:s;return z.apply(C?g:this,arguments)}return q}function sE(s){return function(c){c=Ke(c);var g=Hi(c)?Nr(c):r,C=g?g[0]:c.charAt(0),T=g?qn(g,1).join(""):c.slice(1);return C[s]()+T}}function Zi(s){return function(c){return ef(a1(o1(c).replace(iF,"")),s,"")}}function ra(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=Yi(s.prototype),C=s.apply(g,c);return ft(C)?C:g}}function v$(s,c,g){var C=ra(s);function T(){for(var q=arguments.length,z=le(q),Y=q,re=Ji(T);Y--;)z[Y]=arguments[Y];var me=q<3&&z[0]!==re&&z[q-1]!==re?[]:Nn(z,re);if(q-=me.length,q<g)return dE(s,c,Ys,T.placeholder,r,z,me,r,r,g-q);var ye=this&&this!==It&&this instanceof T?C:s;return er(ye,this,z)}return T}function uE(s){return function(c,g,C){var T=et(c);if(!Ut(c)){var q=Pe(g,3);c=Ct(c),g=function(Y){return q(T[Y],Y,T)}}var z=s(c,g,C);return z>-1?T[q?c[z]:z]:r}}function lE(s){return hn(function(c){var g=c.length,C=g,T=gr.prototype.thru;for(s&&c.reverse();C--;){var q=c[C];if(typeof q!="function")throw new vr(a);if(T&&!z&&Qs(q)=="wrapper")var z=new gr([],!0)}for(C=z?C:g;++C<g;){q=c[C];var Y=Qs(q),re=Y=="wrapper"?jf(q):r;re&&Ff(re[0])&&re[1]==(N|_|R|A)&&!re[4].length&&re[9]==1?z=z[Qs(re[0])].apply(z,re[3]):z=q.length==1&&Ff(q)?z[Y]():z.thru(q)}return function(){var me=arguments,ye=me[0];if(z&&me.length==1&&Ae(ye))return z.plant(ye).value();for(var xe=0,Ee=g?c[xe].apply(this,me):ye;++xe<g;)Ee=c[xe].call(this,Ee);return Ee}})}function Ys(s,c,g,C,T,q,z,Y,re,me){var ye=c&N,xe=c&b,Ee=c&w,Ce=c&(_|S),Te=c&k,De=Ee?r:ra(s);function Ie(){for(var qe=arguments.length,Be=le(qe),or=qe;or--;)Be[or]=arguments[or];if(Ce)var Lt=Ji(Ie),ar=RF(Be,Lt);if(C&&(Be=nE(Be,C,T,Ce)),q&&(Be=iE(Be,q,z,Ce)),qe-=ar,Ce&&qe<me){var vt=Nn(Be,Lt);return dE(s,c,Ys,Ie.placeholder,g,Be,vt,Y,re,me-qe)}var jr=xe?g:this,mn=Ee?jr[s]:s;return qe=Be.length,Y?Be=j$(Be,Y):Te&&qe>1&&Be.reverse(),ye&&re<qe&&(Be.length=re),this&&this!==It&&this instanceof Ie&&(mn=De||ra(mn)),mn.apply(jr,Be)}return Ie}function cE(s,c){return function(g,C){return HB(g,s,c(C),{})}}function Xs(s,c){return function(g,C){var T;if(g===r&&C===r)return c;if(g!==r&&(T=g),C!==r){if(T===r)return C;typeof g=="string"||typeof C=="string"?(g=nr(g),C=nr(C)):(g=Y_(g),C=Y_(C)),T=s(g,C)}return T}}function Nf(s){return hn(function(c){return c=st(c,rr(Pe())),je(function(g){var C=this;return s(c,function(T){return er(T,C,g)})})})}function Zs(s,c){c=c===r?" ":nr(c);var g=c.length;if(g<2)return g?Sf(c,s):c;var C=Sf(c,ks(s/Ui(c)));return Hi(c)?qn(Nr(C),0,s).join(""):C.slice(0,s)}function g$(s,c,g,C){var T=c&b,q=ra(s);function z(){for(var Y=-1,re=arguments.length,me=-1,ye=C.length,xe=le(ye+re),Ee=this&&this!==It&&this instanceof z?q:s;++me<ye;)xe[me]=C[me];for(;re--;)xe[me++]=arguments[++Y];return er(Ee,T?g:this,xe)}return z}function fE(s){return function(c,g,C){return C&&typeof C!="number"&&kt(c,g,C)&&(g=C=r),c=gn(c),g===r?(g=c,c=0):g=gn(g),C=C===r?c<g?1:-1:gn(C),t$(c,g,C,s)}}function Js(s){return function(c,g){return typeof c=="string"&&typeof g=="string"||(c=xr(c),g=xr(g)),s(c,g)}}function dE(s,c,g,C,T,q,z,Y,re,me){var ye=c&_,xe=ye?z:r,Ee=ye?r:z,Ce=ye?q:r,Te=ye?r:q;c|=ye?R:I,c&=~(ye?I:R),c&E||(c&=-4);var De=[s,c,T,Ce,xe,Te,Ee,Y,re,me],Ie=g.apply(r,De);return Ff(s)&&SE(Ie,De),Ie.placeholder=C,OE(Ie,s,c)}function Af(s){var c=Et[s];return function(g,C){if(g=xr(g),C=C==null?0:At(Me(C),292),C&&O_(g)){var T=(Ke(g)+"e").split("e"),q=c(T[0]+"e"+(+T[1]+C));return T=(Ke(q)+"e").split("e"),+(T[0]+"e"+(+T[1]-C))}return c(g)}}var m$=Gi&&1/Rs(new Gi([,-0]))[1]==Z?function(s){return new Gi(s)}:td;function hE(s){return function(c){var g=Mt(c);return g==be?uf(c):g==Fe?DF(c):CF(c,s(c))}}function dn(s,c,g,C,T,q,z,Y){var re=c&w;if(!re&&typeof s!="function")throw new vr(a);var me=C?C.length:0;if(me||(c&=-97,C=T=r),z=z===r?z:St(Me(z),0),Y=Y===r?Y:Me(Y),me-=T?T.length:0,c&I){var ye=C,xe=T;C=T=r}var Ee=re?r:jf(s),Ce=[s,c,g,C,T,ye,xe,q,z,Y];if(Ee&&A$(Ce,Ee),s=Ce[0],c=Ce[1],g=Ce[2],C=Ce[3],T=Ce[4],Y=Ce[9]=Ce[9]===r?re?0:s.length:St(Ce[9]-me,0),!Y&&c&(_|S)&&(c&=-25),!c||c==b)var Te=p$(s,c,g);else c==_||c==S?Te=v$(s,c,Y):(c==R||c==(b|R))&&!T.length?Te=g$(s,c,g,C):Te=Ys.apply(r,Ce);var De=Ee?G_:SE;return OE(De(Te,Ce),s,c)}function pE(s,c,g,C){return s===r||Dr(s,Wi[g])&&!Ge.call(C,g)?c:s}function vE(s,c,g,C,T,q){return ft(s)&&ft(c)&&(q.set(c,s),Vs(s,c,r,vE,q),q.delete(c)),s}function y$(s){return oa(s)?r:s}function gE(s,c,g,C,T,q){var z=g&y,Y=s.length,re=c.length;if(Y!=re&&!(z&&re>Y))return!1;var me=q.get(s),ye=q.get(c);if(me&&ye)return me==c&&ye==s;var xe=-1,Ee=!0,Ce=g&x?new ii:r;for(q.set(s,c),q.set(c,s);++xe<Y;){var Te=s[xe],De=c[xe];if(C)var Ie=z?C(De,Te,xe,c,s,q):C(Te,De,xe,s,c,q);if(Ie!==r){if(Ie)continue;Ee=!1;break}if(Ce){if(!tf(c,function(qe,Be){if(!Vo(Ce,Be)&&(Te===qe||T(Te,qe,g,C,q)))return Ce.push(Be)})){Ee=!1;break}}else if(!(Te===De||T(Te,De,g,C,q))){Ee=!1;break}}return q.delete(s),q.delete(c),Ee}function b$(s,c,g,C,T,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 Ms(s),new Ms(c)));case se:case oe:case pe:return Dr(+s,+c);case ne:return s.name==c.name&&s.message==c.message;case ze:case Ue:return s==c+"";case be:var Y=uf;case Fe:var re=C&y;if(Y||(Y=Rs),s.size!=c.size&&!re)return!1;var me=z.get(s);if(me)return me==c;C|=x,z.set(s,c);var ye=gE(Y(s),Y(c),C,T,q,z);return z.delete(s),ye;case lt:if(Xo)return Xo.call(s)==Xo.call(c)}return!1}function x$(s,c,g,C,T,q){var z=g&y,Y=Mf(s),re=Y.length,me=Mf(c),ye=me.length;if(re!=ye&&!z)return!1;for(var xe=re;xe--;){var Ee=Y[xe];if(!(z?Ee in c:Ge.call(c,Ee)))return!1}var Ce=q.get(s),Te=q.get(c);if(Ce&&Te)return Ce==c&&Te==s;var De=!0;q.set(s,c),q.set(c,s);for(var Ie=z;++xe<re;){Ee=Y[xe];var qe=s[Ee],Be=c[Ee];if(C)var or=z?C(Be,qe,Ee,c,s,q):C(qe,Be,Ee,s,c,q);if(!(or===r?qe===Be||T(qe,Be,g,C,q):or)){De=!1;break}Ie||(Ie=Ee=="constructor")}if(De&&!Ie){var Lt=s.constructor,ar=c.constructor;Lt!=ar&&"constructor"in s&&"constructor"in c&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof ar=="function"&&ar instanceof ar)&&(De=!1)}return q.delete(s),q.delete(c),De}function hn(s){return $f(_E(s,r,NE),s+"")}function Mf(s){return q_(s,Ct,kf)}function Df(s){return q_(s,Vt,mE)}var jf=Fs?function(s){return Fs.get(s)}:td;function Qs(s){for(var c=s.name+"",g=Ki[c],C=Ge.call(Ki,c)?g.length:0;C--;){var T=g[C],q=T.func;if(q==null||q==s)return T.name}return c}function Ji(s){var c=Ge.call(M,"placeholder")?M:s;return c.placeholder}function Pe(){var s=M.iteratee||Qf;return s=s===Qf?F_:s,arguments.length?s(arguments[0],arguments[1]):s}function eu(s,c){var g=s.__data__;return I$(c)?g[typeof c=="string"?"string":"hash"]:g.map}function qf(s){for(var c=Ct(s),g=c.length;g--;){var C=c[g],T=s[C];c[g]=[C,T,xE(T)]}return c}function si(s,c){var g=NF(s,c);return L_(g)?g:r}function w$(s){var c=Ge.call(s,ri),g=s[ri];try{s[ri]=r;var C=!0}catch{}var T=Ns.call(s);return C&&(c?s[ri]=g:delete s[ri]),T}var kf=cf?function(s){return s==null?[]:(s=et(s),Pn(cf(s),function(c){return E_.call(s,c)}))}:rd,mE=cf?function(s){for(var c=[];s;)Tn(c,kf(s)),s=Ds(s);return c}:rd,Mt=qt;(ff&&Mt(new ff(new ArrayBuffer(1)))!=bt||Go&&Mt(new Go)!=be||df&&Mt(df.resolve())!=Re||Gi&&Mt(new Gi)!=Fe||Ko&&Mt(new Ko)!=mt)&&(Mt=function(s){var c=qt(s),g=c==_e?s.constructor:r,C=g?ui(g):"";if(C)switch(C){case nB:return bt;case iB:return be;case oB:return Re;case aB:return Fe;case sB:return mt}return c});function _$(s,c,g){for(var C=-1,T=g.length;++C<T;){var q=g[C],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 E$(s){var c=s.match(Ic);return c?c[1].split(Pc):[]}function yE(s,c,g){c=jn(c,s);for(var C=-1,T=c.length,q=!1;++C<T;){var z=Mr(c[C]);if(!(q=s!=null&&g(s,z)))break;s=s[z]}return q||++C!=T?q:(T=s==null?0:s.length,!!T&&su(T)&&pn(z,T)&&(Ae(s)||li(s)))}function S$(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 bE(s){return typeof s.constructor=="function"&&!na(s)?Yi(Ds(s)):{}}function O$(s,c,g){var C=s.constructor;switch(c){case rt:return Tf(s);case se:case oe:return new C(+s);case bt:return u$(s,g);case Qt:case dr:case Dt:case _t:case jt:case Vr:case Jn:case In:case hr:return tE(s,g);case be:return new C;case pe:case Ue:return new C(s);case ze:return l$(s);case Fe:return new C;case lt:return c$(s)}}function C$(s,c){var g=c.length;if(!g)return s;var C=g-1;return c[C]=(g>1?"& ":"")+c[C],c=c.join(g>2?", ":" "),s.replace(gs,`{
15
- /* [wrapped with `+c+`] */
16
- `)}function R$(s){return Ae(s)||li(s)||!!(S_&&s&&s[S_])}function pn(s,c){var g=typeof s;return c=c??Q,!!c&&(g=="number"||g!="symbol"&&kc.test(s))&&s>-1&&s%1==0&&s<c}function kt(s,c,g){if(!ft(g))return!1;var C=typeof c;return(C=="number"?Ut(g)&&pn(c,g.length):C=="string"&&c in g)?Dr(g[c],s):!1}function Lf(s,c){if(Ae(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||ir(s)?!0:vs.test(s)||!Sc.test(s)||c!=null&&s in et(c)}function I$(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}function Ff(s){var c=Qs(s),g=M[c];if(typeof g!="function"||!(c in Le.prototype))return!1;if(s===g)return!0;var C=jf(g);return!!C&&s===C[0]}function P$(s){return!!x_&&x_ in s}var T$=Ps?vn:nd;function na(s){var c=s&&s.constructor,g=typeof c=="function"&&c.prototype||Wi;return s===g}function xE(s){return s===s&&!ft(s)}function wE(s,c){return function(g){return g==null?!1:g[s]===c&&(c!==r||s in et(g))}}function N$(s){var c=ou(s,function(C){return g.size===f&&g.clear(),C}),g=c.cache;return c}function A$(s,c){var g=s[1],C=c[1],T=g|C,q=T<(b|w|N),z=C==N&&g==_||C==N&&g==A&&s[7].length<=c[8]||C==(N|A)&&c[7].length<=c[8]&&g==_;if(!(q||z))return s;C&b&&(s[2]=c[2],T|=g&b?0:E);var Y=c[3];if(Y){var re=s[3];s[3]=re?nE(re,Y,c[4]):Y,s[4]=re?Nn(s[3],h):c[4]}return Y=c[5],Y&&(re=s[5],s[5]=re?iE(re,Y,c[6]):Y,s[6]=re?Nn(s[5],h):c[6]),Y=c[7],Y&&(s[7]=Y),C&N&&(s[8]=s[8]==null?c[8]:At(s[8],c[8])),s[9]==null&&(s[9]=c[9]),s[0]=c[0],s[1]=T,s}function M$(s){var c=[];if(s!=null)for(var g in et(s))c.push(g);return c}function D$(s){return Ns.call(s)}function _E(s,c,g){return c=St(c===r?s.length-1:c,0),function(){for(var C=arguments,T=-1,q=St(C.length-c,0),z=le(q);++T<q;)z[T]=C[c+T];T=-1;for(var Y=le(c+1);++T<c;)Y[T]=C[T];return Y[c]=g(z),er(s,this,Y)}}function EE(s,c){return c.length<2?s:ai(s,yr(c,0,-1))}function j$(s,c){for(var g=s.length,C=At(c.length,g),T=Ht(s);C--;){var q=c[C];s[C]=pn(q,g)?T[q]:r}return s}function Bf(s,c){if(!(c==="constructor"&&typeof s[c]=="function")&&c!="__proto__")return s[c]}var SE=CE(G_),ia=XF||function(s,c){return It.setTimeout(s,c)},$f=CE(i$);function OE(s,c,g){var C=c+"";return $f(s,C$(C,q$(E$(C),g)))}function CE(s){var c=0,g=0;return function(){var C=eB(),T=D-(C-g);if(g=C,T>0){if(++c>=j)return arguments[0]}else c=0;return s.apply(r,arguments)}}function tu(s,c){var g=-1,C=s.length,T=C-1;for(c=c===r?C:c;++g<c;){var q=Ef(g,T),z=s[q];s[q]=s[g],s[g]=z}return s.length=c,s}var RE=N$(function(s){var c=[];return s.charCodeAt(0)===46&&c.push(""),s.replace(Oc,function(g,C,T,q){c.push(T?q.replace(Nc,"$1"):C||g)}),c});function Mr(s){if(typeof s=="string"||ir(s))return s;var c=s+"";return c=="0"&&1/s==-Z?"-0":c}function ui(s){if(s!=null){try{return Ts.call(s)}catch{}try{return s+""}catch{}}return""}function q$(s,c){return tr(V,function(g){var C="_."+g[0];c&g[1]&&!Os(s,C)&&s.push(C)}),s.sort()}function IE(s){if(s instanceof Le)return s.clone();var c=new gr(s.__wrapped__,s.__chain__);return c.__actions__=Ht(s.__actions__),c.__index__=s.__index__,c.__values__=s.__values__,c}function k$(s,c,g){(g?kt(s,c,g):c===r)?c=1:c=St(Me(c),0);var C=s==null?0:s.length;if(!C||c<1)return[];for(var T=0,q=0,z=le(ks(C/c));T<C;)z[q++]=yr(s,T,T+=c);return z}function L$(s){for(var c=-1,g=s==null?0:s.length,C=0,T=[];++c<g;){var q=s[c];q&&(T[C++]=q)}return T}function F$(){var s=arguments.length;if(!s)return[];for(var c=le(s-1),g=arguments[0],C=s;C--;)c[C-1]=arguments[C];return Tn(Ae(g)?Ht(g):[g],Pt(c,1))}var B$=je(function(s,c){return pt(s)?Jo(s,Pt(c,1,pt,!0)):[]}),$$=je(function(s,c){var g=br(c);return pt(g)&&(g=r),pt(s)?Jo(s,Pt(c,1,pt,!0),Pe(g,2)):[]}),z$=je(function(s,c){var g=br(c);return pt(g)&&(g=r),pt(s)?Jo(s,Pt(c,1,pt,!0),r,g):[]});function H$(s,c,g){var C=s==null?0:s.length;return C?(c=g||c===r?1:Me(c),yr(s,c<0?0:c,C)):[]}function U$(s,c,g){var C=s==null?0:s.length;return C?(c=g||c===r?1:Me(c),c=C-c,yr(s,0,c<0?0:c)):[]}function V$(s,c){return s&&s.length?Gs(s,Pe(c,3),!0,!0):[]}function W$(s,c){return s&&s.length?Gs(s,Pe(c,3),!0):[]}function G$(s,c,g,C){var T=s==null?0:s.length;return T?(g&&typeof g!="number"&&kt(s,c,g)&&(g=0,C=T),FB(s,c,g,C)):[]}function PE(s,c,g){var C=s==null?0:s.length;if(!C)return-1;var T=g==null?0:Me(g);return T<0&&(T=St(C+T,0)),Cs(s,Pe(c,3),T)}function TE(s,c,g){var C=s==null?0:s.length;if(!C)return-1;var T=C-1;return g!==r&&(T=Me(g),T=g<0?St(C+T,0):At(T,C-1)),Cs(s,Pe(c,3),T,!0)}function NE(s){var c=s==null?0:s.length;return c?Pt(s,1):[]}function K$(s){var c=s==null?0:s.length;return c?Pt(s,Z):[]}function Y$(s,c){var g=s==null?0:s.length;return g?(c=c===r?1:Me(c),Pt(s,c)):[]}function X$(s){for(var c=-1,g=s==null?0:s.length,C={};++c<g;){var T=s[c];Wr(C,T[0],T[1])}return C}function AE(s){return s&&s.length?s[0]:r}function Z$(s,c,g){var C=s==null?0:s.length;if(!C)return-1;var T=g==null?0:Me(g);return T<0&&(T=St(C+T,0)),zi(s,c,T)}function J$(s){var c=s==null?0:s.length;return c?yr(s,0,-1):[]}var Q$=je(function(s){var c=st(s,If);return c.length&&c[0]===s[0]?yf(c):[]}),ez=je(function(s){var c=br(s),g=st(s,If);return c===br(g)?c=r:g.pop(),g.length&&g[0]===s[0]?yf(g,Pe(c,2)):[]}),tz=je(function(s){var c=br(s),g=st(s,If);return c=typeof c=="function"?c:r,c&&g.pop(),g.length&&g[0]===s[0]?yf(g,r,c):[]});function rz(s,c){return s==null?"":JF.call(s,c)}function br(s){var c=s==null?0:s.length;return c?s[c-1]:r}function nz(s,c,g){var C=s==null?0:s.length;if(!C)return-1;var T=C;return g!==r&&(T=Me(g),T=T<0?St(C+T,0):At(T,C-1)),c===c?qF(s,c,T):Cs(s,d_,T,!0)}function iz(s,c){return s&&s.length?H_(s,Me(c)):r}var oz=je(ME);function ME(s,c){return s&&s.length&&c&&c.length?_f(s,c):s}function az(s,c,g){return s&&s.length&&c&&c.length?_f(s,c,Pe(g,2)):s}function sz(s,c,g){return s&&s.length&&c&&c.length?_f(s,c,r,g):s}var uz=hn(function(s,c){var g=s==null?0:s.length,C=pf(s,c);return W_(s,st(c,function(T){return pn(T,g)?+T:T}).sort(rE)),C});function lz(s,c){var g=[];if(!(s&&s.length))return g;var C=-1,T=[],q=s.length;for(c=Pe(c,3);++C<q;){var z=s[C];c(z,C,s)&&(g.push(z),T.push(C))}return W_(s,T),g}function zf(s){return s==null?s:rB.call(s)}function cz(s,c,g){var C=s==null?0:s.length;return C?(g&&typeof g!="number"&&kt(s,c,g)?(c=0,g=C):(c=c==null?0:Me(c),g=g===r?C:Me(g)),yr(s,c,g)):[]}function fz(s,c){return Ws(s,c)}function dz(s,c,g){return Of(s,c,Pe(g,2))}function hz(s,c){var g=s==null?0:s.length;if(g){var C=Ws(s,c);if(C<g&&Dr(s[C],c))return C}return-1}function pz(s,c){return Ws(s,c,!0)}function vz(s,c,g){return Of(s,c,Pe(g,2),!0)}function gz(s,c){var g=s==null?0:s.length;if(g){var C=Ws(s,c,!0)-1;if(Dr(s[C],c))return C}return-1}function mz(s){return s&&s.length?K_(s):[]}function yz(s,c){return s&&s.length?K_(s,Pe(c,2)):[]}function bz(s){var c=s==null?0:s.length;return c?yr(s,1,c):[]}function xz(s,c,g){return s&&s.length?(c=g||c===r?1:Me(c),yr(s,0,c<0?0:c)):[]}function wz(s,c,g){var C=s==null?0:s.length;return C?(c=g||c===r?1:Me(c),c=C-c,yr(s,c<0?0:c,C)):[]}function _z(s,c){return s&&s.length?Gs(s,Pe(c,3),!1,!0):[]}function Ez(s,c){return s&&s.length?Gs(s,Pe(c,3)):[]}var Sz=je(function(s){return Dn(Pt(s,1,pt,!0))}),Oz=je(function(s){var c=br(s);return pt(c)&&(c=r),Dn(Pt(s,1,pt,!0),Pe(c,2))}),Cz=je(function(s){var c=br(s);return c=typeof c=="function"?c:r,Dn(Pt(s,1,pt,!0),r,c)});function Rz(s){return s&&s.length?Dn(s):[]}function Iz(s,c){return s&&s.length?Dn(s,Pe(c,2)):[]}function Pz(s,c){return c=typeof c=="function"?c:r,s&&s.length?Dn(s,r,c):[]}function Hf(s){if(!(s&&s.length))return[];var c=0;return s=Pn(s,function(g){if(pt(g))return c=St(g.length,c),!0}),af(c,function(g){return st(s,rf(g))})}function DE(s,c){if(!(s&&s.length))return[];var g=Hf(s);return c==null?g:st(g,function(C){return er(c,r,C)})}var Tz=je(function(s,c){return pt(s)?Jo(s,c):[]}),Nz=je(function(s){return Rf(Pn(s,pt))}),Az=je(function(s){var c=br(s);return pt(c)&&(c=r),Rf(Pn(s,pt),Pe(c,2))}),Mz=je(function(s){var c=br(s);return c=typeof c=="function"?c:r,Rf(Pn(s,pt),r,c)}),Dz=je(Hf);function jz(s,c){return J_(s||[],c||[],Zo)}function qz(s,c){return J_(s||[],c||[],ta)}var kz=je(function(s){var c=s.length,g=c>1?s[c-1]:r;return g=typeof g=="function"?(s.pop(),g):r,DE(s,g)});function jE(s){var c=M(s);return c.__chain__=!0,c}function Lz(s,c){return c(s),s}function ru(s,c){return c(s)}var Fz=hn(function(s){var c=s.length,g=c?s[0]:0,C=this.__wrapped__,T=function(q){return pf(q,s)};return c>1||this.__actions__.length||!(C instanceof Le)||!pn(g)?this.thru(T):(C=C.slice(g,+g+(c?1:0)),C.__actions__.push({func:ru,args:[T],thisArg:r}),new gr(C,this.__chain__).thru(function(q){return c&&!q.length&&q.push(r),q}))});function Bz(){return jE(this)}function $z(){return new gr(this.value(),this.__chain__)}function zz(){this.__values__===r&&(this.__values__=YE(this.value()));var s=this.__index__>=this.__values__.length,c=s?r:this.__values__[this.__index__++];return{done:s,value:c}}function Hz(){return this}function Uz(s){for(var c,g=this;g instanceof $s;){var C=IE(g);C.__index__=0,C.__values__=r,c?T.__wrapped__=C:c=C;var T=C;g=g.__wrapped__}return T.__wrapped__=s,c}function Vz(){var s=this.__wrapped__;if(s instanceof Le){var c=s;return this.__actions__.length&&(c=new Le(this)),c=c.reverse(),c.__actions__.push({func:ru,args:[zf],thisArg:r}),new gr(c,this.__chain__)}return this.thru(zf)}function Wz(){return Z_(this.__wrapped__,this.__actions__)}var Gz=Ks(function(s,c,g){Ge.call(s,g)?++s[g]:Wr(s,g,1)});function Kz(s,c,g){var C=Ae(s)?c_:LB;return g&&kt(s,c,g)&&(c=r),C(s,Pe(c,3))}function Yz(s,c){var g=Ae(s)?Pn:D_;return g(s,Pe(c,3))}var Xz=uE(PE),Zz=uE(TE);function Jz(s,c){return Pt(nu(s,c),1)}function Qz(s,c){return Pt(nu(s,c),Z)}function e3(s,c,g){return g=g===r?1:Me(g),Pt(nu(s,c),g)}function qE(s,c){var g=Ae(s)?tr:Mn;return g(s,Pe(c,3))}function kE(s,c){var g=Ae(s)?bF:M_;return g(s,Pe(c,3))}var t3=Ks(function(s,c,g){Ge.call(s,g)?s[g].push(c):Wr(s,g,[c])});function r3(s,c,g,C){s=Ut(s)?s:eo(s),g=g&&!C?Me(g):0;var T=s.length;return g<0&&(g=St(T+g,0)),uu(s)?g<=T&&s.indexOf(c,g)>-1:!!T&&zi(s,c,g)>-1}var n3=je(function(s,c,g){var C=-1,T=typeof c=="function",q=Ut(s)?le(s.length):[];return Mn(s,function(z){q[++C]=T?er(c,z,g):Qo(z,c,g)}),q}),i3=Ks(function(s,c,g){Wr(s,g,c)});function nu(s,c){var g=Ae(s)?st:B_;return g(s,Pe(c,3))}function o3(s,c,g,C){return s==null?[]:(Ae(c)||(c=c==null?[]:[c]),g=C?r:g,Ae(g)||(g=g==null?[]:[g]),U_(s,c,g))}var a3=Ks(function(s,c,g){s[g?0:1].push(c)},function(){return[[],[]]});function s3(s,c,g){var C=Ae(s)?ef:p_,T=arguments.length<3;return C(s,Pe(c,4),g,T,Mn)}function u3(s,c,g){var C=Ae(s)?xF:p_,T=arguments.length<3;return C(s,Pe(c,4),g,T,M_)}function l3(s,c){var g=Ae(s)?Pn:D_;return g(s,au(Pe(c,3)))}function c3(s){var c=Ae(s)?P_:r$;return c(s)}function f3(s,c,g){(g?kt(s,c,g):c===r)?c=1:c=Me(c);var C=Ae(s)?MB:n$;return C(s,c)}function d3(s){var c=Ae(s)?DB:o$;return c(s)}function h3(s){if(s==null)return 0;if(Ut(s))return uu(s)?Ui(s):s.length;var c=Mt(s);return c==be||c==Fe?s.size:xf(s).length}function p3(s,c,g){var C=Ae(s)?tf:a$;return g&&kt(s,c,g)&&(c=r),C(s,Pe(c,3))}var v3=je(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]]),U_(s,Pt(c,1),[])}),iu=YF||function(){return It.Date.now()};function g3(s,c){if(typeof c!="function")throw new vr(a);return s=Me(s),function(){if(--s<1)return c.apply(this,arguments)}}function LE(s,c,g){return c=g?r:c,c=s&&c==null?s.length:c,dn(s,N,r,r,r,r,c)}function FE(s,c){var g;if(typeof c!="function")throw new vr(a);return s=Me(s),function(){return--s>0&&(g=c.apply(this,arguments)),s<=1&&(c=r),g}}var Uf=je(function(s,c,g){var C=b;if(g.length){var T=Nn(g,Ji(Uf));C|=R}return dn(s,C,c,g,T)}),BE=je(function(s,c,g){var C=b|w;if(g.length){var T=Nn(g,Ji(BE));C|=R}return dn(c,C,s,g,T)});function $E(s,c,g){c=g?r:c;var C=dn(s,_,r,r,r,r,r,c);return C.placeholder=$E.placeholder,C}function zE(s,c,g){c=g?r:c;var C=dn(s,S,r,r,r,r,r,c);return C.placeholder=zE.placeholder,C}function HE(s,c,g){var C,T,q,z,Y,re,me=0,ye=!1,xe=!1,Ee=!0;if(typeof s!="function")throw new vr(a);c=xr(c)||0,ft(g)&&(ye=!!g.leading,xe="maxWait"in g,q=xe?St(xr(g.maxWait)||0,c):q,Ee="trailing"in g?!!g.trailing:Ee);function Ce(vt){var jr=C,mn=T;return C=T=r,me=vt,z=s.apply(mn,jr),z}function Te(vt){return me=vt,Y=ia(qe,c),ye?Ce(vt):z}function De(vt){var jr=vt-re,mn=vt-me,l1=c-jr;return xe?At(l1,q-mn):l1}function Ie(vt){var jr=vt-re,mn=vt-me;return re===r||jr>=c||jr<0||xe&&mn>=q}function qe(){var vt=iu();if(Ie(vt))return Be(vt);Y=ia(qe,De(vt))}function Be(vt){return Y=r,Ee&&C?Ce(vt):(C=T=r,z)}function or(){Y!==r&&Q_(Y),me=0,C=re=T=Y=r}function Lt(){return Y===r?z:Be(iu())}function ar(){var vt=iu(),jr=Ie(vt);if(C=arguments,T=this,re=vt,jr){if(Y===r)return Te(re);if(xe)return Q_(Y),Y=ia(qe,c),Ce(re)}return Y===r&&(Y=ia(qe,c)),z}return ar.cancel=or,ar.flush=Lt,ar}var m3=je(function(s,c){return A_(s,1,c)}),y3=je(function(s,c,g){return A_(s,xr(c)||0,g)});function b3(s){return dn(s,k)}function ou(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new vr(a);var g=function(){var C=arguments,T=c?c.apply(this,C):C[0],q=g.cache;if(q.has(T))return q.get(T);var z=s.apply(this,C);return g.cache=q.set(T,z)||q,z};return g.cache=new(ou.Cache||fn),g}ou.Cache=fn;function au(s){if(typeof s!="function")throw new vr(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 x3(s){return FE(2,s)}var w3=s$(function(s,c){c=c.length==1&&Ae(c[0])?st(c[0],rr(Pe())):st(Pt(c,1),rr(Pe()));var g=c.length;return je(function(C){for(var T=-1,q=At(C.length,g);++T<q;)C[T]=c[T].call(this,C[T]);return er(s,this,C)})}),Vf=je(function(s,c){var g=Nn(c,Ji(Vf));return dn(s,R,r,c,g)}),UE=je(function(s,c){var g=Nn(c,Ji(UE));return dn(s,I,r,c,g)}),_3=hn(function(s,c){return dn(s,A,r,r,r,c)});function E3(s,c){if(typeof s!="function")throw new vr(a);return c=c===r?c:Me(c),je(s,c)}function S3(s,c){if(typeof s!="function")throw new vr(a);return c=c==null?0:St(Me(c),0),je(function(g){var C=g[c],T=qn(g,0,c);return C&&Tn(T,C),er(s,this,T)})}function O3(s,c,g){var C=!0,T=!0;if(typeof s!="function")throw new vr(a);return ft(g)&&(C="leading"in g?!!g.leading:C,T="trailing"in g?!!g.trailing:T),HE(s,c,{leading:C,maxWait:c,trailing:T})}function C3(s){return LE(s,1)}function R3(s,c){return Vf(Pf(c),s)}function I3(){if(!arguments.length)return[];var s=arguments[0];return Ae(s)?s:[s]}function P3(s){return mr(s,m)}function T3(s,c){return c=typeof c=="function"?c:r,mr(s,m,c)}function N3(s){return mr(s,p|m)}function A3(s,c){return c=typeof c=="function"?c:r,mr(s,p|m,c)}function M3(s,c){return c==null||N_(s,c,Ct(c))}function Dr(s,c){return s===c||s!==s&&c!==c}var D3=Js(mf),j3=Js(function(s,c){return s>=c}),li=k_((function(){return arguments})())?k_:function(s){return dt(s)&&Ge.call(s,"callee")&&!E_.call(s,"callee")},Ae=le.isArray,q3=i_?rr(i_):UB;function Ut(s){return s!=null&&su(s.length)&&!vn(s)}function pt(s){return dt(s)&&Ut(s)}function k3(s){return s===!0||s===!1||dt(s)&&qt(s)==se}var kn=ZF||nd,L3=o_?rr(o_):VB;function F3(s){return dt(s)&&s.nodeType===1&&!oa(s)}function B3(s){if(s==null)return!0;if(Ut(s)&&(Ae(s)||typeof s=="string"||typeof s.splice=="function"||kn(s)||Qi(s)||li(s)))return!s.length;var c=Mt(s);if(c==be||c==Fe)return!s.size;if(na(s))return!xf(s).length;for(var g in s)if(Ge.call(s,g))return!1;return!0}function $3(s,c){return ea(s,c)}function z3(s,c,g){g=typeof g=="function"?g:r;var C=g?g(s,c):r;return C===r?ea(s,c,r,g):!!C}function Wf(s){if(!dt(s))return!1;var c=qt(s);return c==ne||c==fe||typeof s.message=="string"&&typeof s.name=="string"&&!oa(s)}function H3(s){return typeof s=="number"&&O_(s)}function vn(s){if(!ft(s))return!1;var c=qt(s);return c==K||c==he||c==G||c==Ze}function VE(s){return typeof s=="number"&&s==Me(s)}function su(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Q}function ft(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}function dt(s){return s!=null&&typeof s=="object"}var WE=a_?rr(a_):GB;function U3(s,c){return s===c||bf(s,c,qf(c))}function V3(s,c,g){return g=typeof g=="function"?g:r,bf(s,c,qf(c),g)}function W3(s){return GE(s)&&s!=+s}function G3(s){if(T$(s))throw new Ne(o);return L_(s)}function K3(s){return s===null}function Y3(s){return s==null}function GE(s){return typeof s=="number"||dt(s)&&qt(s)==pe}function oa(s){if(!dt(s)||qt(s)!=_e)return!1;var c=Ds(s);if(c===null)return!0;var g=Ge.call(c,"constructor")&&c.constructor;return typeof g=="function"&&g instanceof g&&Ts.call(g)==VF}var Gf=s_?rr(s_):KB;function X3(s){return VE(s)&&s>=-Q&&s<=Q}var KE=u_?rr(u_):YB;function uu(s){return typeof s=="string"||!Ae(s)&&dt(s)&&qt(s)==Ue}function ir(s){return typeof s=="symbol"||dt(s)&&qt(s)==lt}var Qi=l_?rr(l_):XB;function Z3(s){return s===r}function J3(s){return dt(s)&&Mt(s)==mt}function Q3(s){return dt(s)&&qt(s)==yt}var e5=Js(wf),t5=Js(function(s,c){return s<=c});function YE(s){if(!s)return[];if(Ut(s))return uu(s)?Nr(s):Ht(s);if(Wo&&s[Wo])return MF(s[Wo]());var c=Mt(s),g=c==be?uf:c==Fe?Rs:eo;return g(s)}function gn(s){if(!s)return s===0?s:0;if(s=xr(s),s===Z||s===-Z){var c=s<0?-1:1;return c*U}return s===s?s:0}function Me(s){var c=gn(s),g=c%1;return c===c?g?c-g:c:0}function XE(s){return s?oi(Me(s),0,ie):0}function xr(s){if(typeof s=="number")return s;if(ir(s))return ee;if(ft(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=ft(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=v_(s);var g=Dc.test(s);return g||qc.test(s)?gF(s.slice(2),g?2:8):Mc.test(s)?ee:+s}function ZE(s){return Kr(s,Vt(s))}function r5(s){return s?oi(Me(s),-Q,Q):s===0?s:0}function Ke(s){return s==null?"":nr(s)}var n5=Xi(function(s,c){if(na(c)||Ut(c)){Kr(c,Ct(c),s);return}for(var g in c)Ge.call(c,g)&&Zo(s,g,c[g])}),JE=Xi(function(s,c){Kr(c,Vt(c),s)}),QE=Xi(function(s,c,g,C){Kr(c,Vt(c),s,C)}),Kf=Xi(function(s,c,g,C){Kr(c,Ct(c),s,C)}),i5=hn(pf);function o5(s,c){var g=Yi(s);return c==null?g:T_(g,c)}var a5=je(function(s,c){s=et(s);var g=-1,C=c.length,T=C>2?c[2]:r;for(T&&kt(c[0],c[1],T)&&(C=1);++g<C;)for(var q=c[g],z=Vt(q),Y=-1,re=z.length;++Y<re;){var me=z[Y],ye=s[me];(ye===r||Dr(ye,Wi[me])&&!Ge.call(s,me))&&(s[me]=q[me])}return s}),s5=je(function(s){return s.push(r,vE),er(e1,r,s)});function u5(s,c){return f_(s,Pe(c,3),Gr)}function l5(s,c){return f_(s,Pe(c,3),gf)}function c5(s,c){return s==null?s:vf(s,Pe(c,3),Vt)}function f5(s,c){return s==null?s:j_(s,Pe(c,3),Vt)}function d5(s,c){return s&&Gr(s,Pe(c,3))}function h5(s,c){return s&&gf(s,Pe(c,3))}function p5(s){return s==null?[]:Us(s,Ct(s))}function v5(s){return s==null?[]:Us(s,Vt(s))}function Yf(s,c,g){var C=s==null?r:ai(s,c);return C===r?g:C}function g5(s,c){return s!=null&&yE(s,c,BB)}function Xf(s,c){return s!=null&&yE(s,c,$B)}var m5=cE(function(s,c,g){c!=null&&typeof c.toString!="function"&&(c=Ns.call(c)),s[c]=g},Jf(Wt)),y5=cE(function(s,c,g){c!=null&&typeof c.toString!="function"&&(c=Ns.call(c)),Ge.call(s,c)?s[c].push(g):s[c]=[g]},Pe),b5=je(Qo);function Ct(s){return Ut(s)?I_(s):xf(s)}function Vt(s){return Ut(s)?I_(s,!0):ZB(s)}function x5(s,c){var g={};return c=Pe(c,3),Gr(s,function(C,T,q){Wr(g,c(C,T,q),C)}),g}function w5(s,c){var g={};return c=Pe(c,3),Gr(s,function(C,T,q){Wr(g,T,c(C,T,q))}),g}var _5=Xi(function(s,c,g){Vs(s,c,g)}),e1=Xi(function(s,c,g,C){Vs(s,c,g,C)}),E5=hn(function(s,c){var g={};if(s==null)return g;var C=!1;c=st(c,function(q){return q=jn(q,s),C||(C=q.length>1),q}),Kr(s,Df(s),g),C&&(g=mr(g,p|v|m,y$));for(var T=c.length;T--;)Cf(g,c[T]);return g});function S5(s,c){return t1(s,au(Pe(c)))}var O5=hn(function(s,c){return s==null?{}:QB(s,c)});function t1(s,c){if(s==null)return{};var g=st(Df(s),function(C){return[C]});return c=Pe(c),V_(s,g,function(C,T){return c(C,T[0])})}function C5(s,c,g){c=jn(c,s);var C=-1,T=c.length;for(T||(T=1,s=r);++C<T;){var q=s==null?r:s[Mr(c[C])];q===r&&(C=T,q=g),s=vn(q)?q.call(s):q}return s}function R5(s,c,g){return s==null?s:ta(s,c,g)}function I5(s,c,g,C){return C=typeof C=="function"?C:r,s==null?s:ta(s,c,g,C)}var r1=hE(Ct),n1=hE(Vt);function P5(s,c,g){var C=Ae(s),T=C||kn(s)||Qi(s);if(c=Pe(c,4),g==null){var q=s&&s.constructor;T?g=C?new q:[]:ft(s)?g=vn(q)?Yi(Ds(s)):{}:g={}}return(T?tr:Gr)(s,function(z,Y,re){return c(g,z,Y,re)}),g}function T5(s,c){return s==null?!0:Cf(s,c)}function N5(s,c,g){return s==null?s:X_(s,c,Pf(g))}function A5(s,c,g,C){return C=typeof C=="function"?C:r,s==null?s:X_(s,c,Pf(g),C)}function eo(s){return s==null?[]:sf(s,Ct(s))}function M5(s){return s==null?[]:sf(s,Vt(s))}function D5(s,c,g){return g===r&&(g=c,c=r),g!==r&&(g=xr(g),g=g===g?g:0),c!==r&&(c=xr(c),c=c===c?c:0),oi(xr(s),c,g)}function j5(s,c,g){return c=gn(c),g===r?(g=c,c=0):g=gn(g),s=xr(s),zB(s,c,g)}function q5(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=gn(s),c===r?(c=s,s=0):c=gn(c)),s>c){var C=s;s=c,c=C}if(g||s%1||c%1){var T=C_();return At(s+T*(c-s+vF("1e-"+((T+"").length-1))),c)}return Ef(s,c)}var k5=Zi(function(s,c,g){return c=c.toLowerCase(),s+(g?i1(c):c)});function i1(s){return Zf(Ke(s).toLowerCase())}function o1(s){return s=Ke(s),s&&s.replace(Lc,IF).replace(oF,"")}function L5(s,c,g){s=Ke(s),c=nr(c);var C=s.length;g=g===r?C:oi(Me(g),0,C);var T=g;return g-=c.length,g>=0&&s.slice(g,T)==c}function F5(s){return s=Ke(s),s&&_c.test(s)?s.replace(ds,PF):s}function B5(s){return s=Ke(s),s&&Cc.test(s)?s.replace(ki,"\\$&"):s}var $5=Zi(function(s,c,g){return s+(g?"-":"")+c.toLowerCase()}),z5=Zi(function(s,c,g){return s+(g?" ":"")+c.toLowerCase()}),H5=sE("toLowerCase");function U5(s,c,g){s=Ke(s),c=Me(c);var C=c?Ui(s):0;if(!c||C>=c)return s;var T=(c-C)/2;return Zs(Ls(T),g)+s+Zs(ks(T),g)}function V5(s,c,g){s=Ke(s),c=Me(c);var C=c?Ui(s):0;return c&&C<c?s+Zs(c-C,g):s}function W5(s,c,g){s=Ke(s),c=Me(c);var C=c?Ui(s):0;return c&&C<c?Zs(c-C,g)+s:s}function G5(s,c,g){return g||c==null?c=0:c&&(c=+c),tB(Ke(s).replace(Li,""),c||0)}function K5(s,c,g){return(g?kt(s,c,g):c===r)?c=1:c=Me(c),Sf(Ke(s),c)}function Y5(){var s=arguments,c=Ke(s[0]);return s.length<3?c:c.replace(s[1],s[2])}var X5=Zi(function(s,c,g){return s+(g?"_":"")+c.toLowerCase()});function Z5(s,c,g){return g&&typeof g!="number"&&kt(s,c,g)&&(c=g=r),g=g===r?ie:g>>>0,g?(s=Ke(s),s&&(typeof c=="string"||c!=null&&!Gf(c))&&(c=nr(c),!c&&Hi(s))?qn(Nr(s),0,g):s.split(c,g)):[]}var J5=Zi(function(s,c,g){return s+(g?" ":"")+Zf(c)});function Q5(s,c,g){return s=Ke(s),g=g==null?0:oi(Me(g),0,s.length),c=nr(c),s.slice(g,g+c.length)==c}function eH(s,c,g){var C=M.templateSettings;g&&kt(s,c,g)&&(c=r),s=Ke(s),c=Kf({},c,C,pE);var T=Kf({},c.imports,C.imports,pE),q=Ct(T),z=sf(T,q);tr(q,function(Ie){if(ms.test(Ie))throw new Ne(l)});var Y,re,me=0,ye=c.interpolate||Qn,xe="__p += '",Ee=lf((c.escape||Qn).source+"|"+ye.source+"|"+(ye===Fo?Ac:Qn).source+"|"+(c.evaluate||Qn).source+"|$","g"),Ce="//# sourceURL="+(Ge.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++cF+"]")+`
17
- `;s.replace(Ee,function(Ie,qe,Be,or,Lt,ar){return Be||(Be=or),xe+=s.slice(me,ar).replace(Fc,TF),qe&&(Y=!0,xe+=`' +
18
- __e(`+qe+`) +
19
- '`),Lt&&(re=!0,xe+=`';
20
- `+Lt+`;
21
- __p += '`),Be&&(xe+=`' +
22
- ((__t = (`+Be+`)) == null ? '' : __t) +
23
- '`),me=ar+Ie.length,Ie}),xe+=`';
24
- `;var Te=Ge.call(c,"variable")&&c.variable;if(!Te)xe=`with (obj) {
25
- `+xe+`
26
- }
27
- `;else if(ms.test(Te))throw new Ne(u);xe=(re?xe.replace(qi,""):xe).replace(xc,"$1").replace(wc,"$1;"),xe="function("+(Te||"obj")+`) {
28
- `+(Te?"":`obj || (obj = {});
29
- `)+"var __t, __p = ''"+(Y?", __e = _.escape":"")+(re?`, __j = Array.prototype.join;
30
- function print() { __p += __j.call(arguments, '') }
31
- `:`;
32
- `)+xe+`return __p
33
- }`;var De=s1(function(){return Ve(q,Ce+"return "+xe).apply(r,z)});if(De.source=xe,Wf(De))throw De;return De}function tH(s){return Ke(s).toLowerCase()}function rH(s){return Ke(s).toUpperCase()}function nH(s,c,g){if(s=Ke(s),s&&(g||c===r))return v_(s);if(!s||!(c=nr(c)))return s;var C=Nr(s),T=Nr(c),q=g_(C,T),z=m_(C,T)+1;return qn(C,q,z).join("")}function iH(s,c,g){if(s=Ke(s),s&&(g||c===r))return s.slice(0,b_(s)+1);if(!s||!(c=nr(c)))return s;var C=Nr(s),T=m_(C,Nr(c))+1;return qn(C,0,T).join("")}function oH(s,c,g){if(s=Ke(s),s&&(g||c===r))return s.replace(Li,"");if(!s||!(c=nr(c)))return s;var C=Nr(s),T=g_(C,Nr(c));return qn(C,T).join("")}function aH(s,c){var g=L,C=$;if(ft(c)){var T="separator"in c?c.separator:T;g="length"in c?Me(c.length):g,C="omission"in c?nr(c.omission):C}s=Ke(s);var q=s.length;if(Hi(s)){var z=Nr(s);q=z.length}if(g>=q)return s;var Y=g-Ui(C);if(Y<1)return C;var re=z?qn(z,0,Y).join(""):s.slice(0,Y);if(T===r)return re+C;if(z&&(Y+=re.length-Y),Gf(T)){if(s.slice(Y).search(T)){var me,ye=re;for(T.global||(T=lf(T.source,Ke(ys.exec(T))+"g")),T.lastIndex=0;me=T.exec(ye);)var xe=me.index;re=re.slice(0,xe===r?Y:xe)}}else if(s.indexOf(nr(T),Y)!=Y){var Ee=re.lastIndexOf(T);Ee>-1&&(re=re.slice(0,Ee))}return re+C}function sH(s){return s=Ke(s),s&&hs.test(s)?s.replace(Lo,kF):s}var uH=Zi(function(s,c,g){return s+(g?" ":"")+c.toUpperCase()}),Zf=sE("toUpperCase");function a1(s,c,g){return s=Ke(s),c=g?r:c,c===r?AF(s)?BF(s):EF(s):s.match(c)||[]}var s1=je(function(s,c){try{return er(s,r,c)}catch(g){return Wf(g)?g:new Ne(g)}}),lH=hn(function(s,c){return tr(c,function(g){g=Mr(g),Wr(s,g,Uf(s[g],s))}),s});function cH(s){var c=s==null?0:s.length,g=Pe();return s=c?st(s,function(C){if(typeof C[1]!="function")throw new vr(a);return[g(C[0]),C[1]]}):[],je(function(C){for(var T=-1;++T<c;){var q=s[T];if(er(q[0],this,C))return er(q[1],this,C)}})}function fH(s){return kB(mr(s,p))}function Jf(s){return function(){return s}}function dH(s,c){return s==null||s!==s?c:s}var hH=lE(),pH=lE(!0);function Wt(s){return s}function Qf(s){return F_(typeof s=="function"?s:mr(s,p))}function vH(s){return $_(mr(s,p))}function gH(s,c){return z_(s,mr(c,p))}var mH=je(function(s,c){return function(g){return Qo(g,s,c)}}),yH=je(function(s,c){return function(g){return Qo(s,g,c)}});function ed(s,c,g){var C=Ct(c),T=Us(c,C);g==null&&!(ft(c)&&(T.length||!C.length))&&(g=c,c=s,s=this,T=Us(c,Ct(c)));var q=!(ft(g)&&"chain"in g)||!!g.chain,z=vn(s);return tr(T,function(Y){var re=c[Y];s[Y]=re,z&&(s.prototype[Y]=function(){var me=this.__chain__;if(q||me){var ye=s(this.__wrapped__),xe=ye.__actions__=Ht(this.__actions__);return xe.push({func:re,args:arguments,thisArg:s}),ye.__chain__=me,ye}return re.apply(s,Tn([this.value()],arguments))})}),s}function bH(){return It._===this&&(It._=WF),this}function td(){}function xH(s){return s=Me(s),je(function(c){return H_(c,s)})}var wH=Nf(st),_H=Nf(c_),EH=Nf(tf);function u1(s){return Lf(s)?rf(Mr(s)):e$(s)}function SH(s){return function(c){return s==null?r:ai(s,c)}}var OH=fE(),CH=fE(!0);function rd(){return[]}function nd(){return!1}function RH(){return{}}function IH(){return""}function PH(){return!0}function TH(s,c){if(s=Me(s),s<1||s>Q)return[];var g=ie,C=At(s,ie);c=Pe(c),s-=ie;for(var T=af(C,c);++g<s;)c(g);return T}function NH(s){return Ae(s)?st(s,Mr):ir(s)?[s]:Ht(RE(Ke(s)))}function AH(s){var c=++UF;return Ke(s)+c}var MH=Xs(function(s,c){return s+c},0),DH=Af("ceil"),jH=Xs(function(s,c){return s/c},1),qH=Af("floor");function kH(s){return s&&s.length?Hs(s,Wt,mf):r}function LH(s,c){return s&&s.length?Hs(s,Pe(c,2),mf):r}function FH(s){return h_(s,Wt)}function BH(s,c){return h_(s,Pe(c,2))}function $H(s){return s&&s.length?Hs(s,Wt,wf):r}function zH(s,c){return s&&s.length?Hs(s,Pe(c,2),wf):r}var HH=Xs(function(s,c){return s*c},1),UH=Af("round"),VH=Xs(function(s,c){return s-c},0);function WH(s){return s&&s.length?of(s,Wt):0}function GH(s,c){return s&&s.length?of(s,Pe(c,2)):0}return M.after=g3,M.ary=LE,M.assign=n5,M.assignIn=JE,M.assignInWith=QE,M.assignWith=Kf,M.at=i5,M.before=FE,M.bind=Uf,M.bindAll=lH,M.bindKey=BE,M.castArray=I3,M.chain=jE,M.chunk=k$,M.compact=L$,M.concat=F$,M.cond=cH,M.conforms=fH,M.constant=Jf,M.countBy=Gz,M.create=o5,M.curry=$E,M.curryRight=zE,M.debounce=HE,M.defaults=a5,M.defaultsDeep=s5,M.defer=m3,M.delay=y3,M.difference=B$,M.differenceBy=$$,M.differenceWith=z$,M.drop=H$,M.dropRight=U$,M.dropRightWhile=V$,M.dropWhile=W$,M.fill=G$,M.filter=Yz,M.flatMap=Jz,M.flatMapDeep=Qz,M.flatMapDepth=e3,M.flatten=NE,M.flattenDeep=K$,M.flattenDepth=Y$,M.flip=b3,M.flow=hH,M.flowRight=pH,M.fromPairs=X$,M.functions=p5,M.functionsIn=v5,M.groupBy=t3,M.initial=J$,M.intersection=Q$,M.intersectionBy=ez,M.intersectionWith=tz,M.invert=m5,M.invertBy=y5,M.invokeMap=n3,M.iteratee=Qf,M.keyBy=i3,M.keys=Ct,M.keysIn=Vt,M.map=nu,M.mapKeys=x5,M.mapValues=w5,M.matches=vH,M.matchesProperty=gH,M.memoize=ou,M.merge=_5,M.mergeWith=e1,M.method=mH,M.methodOf=yH,M.mixin=ed,M.negate=au,M.nthArg=xH,M.omit=E5,M.omitBy=S5,M.once=x3,M.orderBy=o3,M.over=wH,M.overArgs=w3,M.overEvery=_H,M.overSome=EH,M.partial=Vf,M.partialRight=UE,M.partition=a3,M.pick=O5,M.pickBy=t1,M.property=u1,M.propertyOf=SH,M.pull=oz,M.pullAll=ME,M.pullAllBy=az,M.pullAllWith=sz,M.pullAt=uz,M.range=OH,M.rangeRight=CH,M.rearg=_3,M.reject=l3,M.remove=lz,M.rest=E3,M.reverse=zf,M.sampleSize=f3,M.set=R5,M.setWith=I5,M.shuffle=d3,M.slice=cz,M.sortBy=v3,M.sortedUniq=mz,M.sortedUniqBy=yz,M.split=Z5,M.spread=S3,M.tail=bz,M.take=xz,M.takeRight=wz,M.takeRightWhile=_z,M.takeWhile=Ez,M.tap=Lz,M.throttle=O3,M.thru=ru,M.toArray=YE,M.toPairs=r1,M.toPairsIn=n1,M.toPath=NH,M.toPlainObject=ZE,M.transform=P5,M.unary=C3,M.union=Sz,M.unionBy=Oz,M.unionWith=Cz,M.uniq=Rz,M.uniqBy=Iz,M.uniqWith=Pz,M.unset=T5,M.unzip=Hf,M.unzipWith=DE,M.update=N5,M.updateWith=A5,M.values=eo,M.valuesIn=M5,M.without=Tz,M.words=a1,M.wrap=R3,M.xor=Nz,M.xorBy=Az,M.xorWith=Mz,M.zip=Dz,M.zipObject=jz,M.zipObjectDeep=qz,M.zipWith=kz,M.entries=r1,M.entriesIn=n1,M.extend=JE,M.extendWith=QE,ed(M,M),M.add=MH,M.attempt=s1,M.camelCase=k5,M.capitalize=i1,M.ceil=DH,M.clamp=D5,M.clone=P3,M.cloneDeep=N3,M.cloneDeepWith=A3,M.cloneWith=T3,M.conformsTo=M3,M.deburr=o1,M.defaultTo=dH,M.divide=jH,M.endsWith=L5,M.eq=Dr,M.escape=F5,M.escapeRegExp=B5,M.every=Kz,M.find=Xz,M.findIndex=PE,M.findKey=u5,M.findLast=Zz,M.findLastIndex=TE,M.findLastKey=l5,M.floor=qH,M.forEach=qE,M.forEachRight=kE,M.forIn=c5,M.forInRight=f5,M.forOwn=d5,M.forOwnRight=h5,M.get=Yf,M.gt=D3,M.gte=j3,M.has=g5,M.hasIn=Xf,M.head=AE,M.identity=Wt,M.includes=r3,M.indexOf=Z$,M.inRange=j5,M.invoke=b5,M.isArguments=li,M.isArray=Ae,M.isArrayBuffer=q3,M.isArrayLike=Ut,M.isArrayLikeObject=pt,M.isBoolean=k3,M.isBuffer=kn,M.isDate=L3,M.isElement=F3,M.isEmpty=B3,M.isEqual=$3,M.isEqualWith=z3,M.isError=Wf,M.isFinite=H3,M.isFunction=vn,M.isInteger=VE,M.isLength=su,M.isMap=WE,M.isMatch=U3,M.isMatchWith=V3,M.isNaN=W3,M.isNative=G3,M.isNil=Y3,M.isNull=K3,M.isNumber=GE,M.isObject=ft,M.isObjectLike=dt,M.isPlainObject=oa,M.isRegExp=Gf,M.isSafeInteger=X3,M.isSet=KE,M.isString=uu,M.isSymbol=ir,M.isTypedArray=Qi,M.isUndefined=Z3,M.isWeakMap=J3,M.isWeakSet=Q3,M.join=rz,M.kebabCase=$5,M.last=br,M.lastIndexOf=nz,M.lowerCase=z5,M.lowerFirst=H5,M.lt=e5,M.lte=t5,M.max=kH,M.maxBy=LH,M.mean=FH,M.meanBy=BH,M.min=$H,M.minBy=zH,M.stubArray=rd,M.stubFalse=nd,M.stubObject=RH,M.stubString=IH,M.stubTrue=PH,M.multiply=HH,M.nth=iz,M.noConflict=bH,M.noop=td,M.now=iu,M.pad=U5,M.padEnd=V5,M.padStart=W5,M.parseInt=G5,M.random=q5,M.reduce=s3,M.reduceRight=u3,M.repeat=K5,M.replace=Y5,M.result=C5,M.round=UH,M.runInContext=te,M.sample=c3,M.size=h3,M.snakeCase=X5,M.some=p3,M.sortedIndex=fz,M.sortedIndexBy=dz,M.sortedIndexOf=hz,M.sortedLastIndex=pz,M.sortedLastIndexBy=vz,M.sortedLastIndexOf=gz,M.startCase=J5,M.startsWith=Q5,M.subtract=VH,M.sum=WH,M.sumBy=GH,M.template=eH,M.times=TH,M.toFinite=gn,M.toInteger=Me,M.toLength=XE,M.toLower=tH,M.toNumber=xr,M.toSafeInteger=r5,M.toString=Ke,M.toUpper=rH,M.trim=nH,M.trimEnd=iH,M.trimStart=oH,M.truncate=aH,M.unescape=sH,M.uniqueId=AH,M.upperCase=uH,M.upperFirst=Zf,M.each=qE,M.eachRight=kE,M.first=AE,ed(M,(function(){var s={};return Gr(M,function(c,g){Ge.call(M.prototype,g)||(s[g]=c)}),s})(),{chain:!1}),M.VERSION=n,tr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){M[s].placeholder=M}),tr(["drop","take"],function(s,c){Le.prototype[s]=function(g){g=g===r?1:St(Me(g),0);var C=this.__filtered__&&!c?new Le(this):this.clone();return C.__filtered__?C.__takeCount__=At(g,C.__takeCount__):C.__views__.push({size:At(g,ie),type:s+(C.__dir__<0?"Right":"")}),C},Le.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),tr(["filter","map","takeWhile"],function(s,c){var g=c+1,C=g==W||g==X;Le.prototype[s]=function(T){var q=this.clone();return q.__iteratees__.push({iteratee:Pe(T,3),type:g}),q.__filtered__=q.__filtered__||C,q}}),tr(["head","last"],function(s,c){var g="take"+(c?"Right":"");Le.prototype[s]=function(){return this[g](1).value()[0]}}),tr(["initial","tail"],function(s,c){var g="drop"+(c?"":"Right");Le.prototype[s]=function(){return this.__filtered__?new Le(this):this[g](1)}}),Le.prototype.compact=function(){return this.filter(Wt)},Le.prototype.find=function(s){return this.filter(s).head()},Le.prototype.findLast=function(s){return this.reverse().find(s)},Le.prototype.invokeMap=je(function(s,c){return typeof s=="function"?new Le(this):this.map(function(g){return Qo(g,s,c)})}),Le.prototype.reject=function(s){return this.filter(au(Pe(s)))},Le.prototype.slice=function(s,c){s=Me(s);var g=this;return g.__filtered__&&(s>0||c<0)?new Le(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),c!==r&&(c=Me(c),g=c<0?g.dropRight(-c):g.take(c-s)),g)},Le.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Le.prototype.toArray=function(){return this.take(ie)},Gr(Le.prototype,function(s,c){var g=/^(?:filter|find|map|reject)|While$/.test(c),C=/^(?:head|last)$/.test(c),T=M[C?"take"+(c=="last"?"Right":""):c],q=C||/^find/.test(c);T&&(M.prototype[c]=function(){var z=this.__wrapped__,Y=C?[1]:arguments,re=z instanceof Le,me=Y[0],ye=re||Ae(z),xe=function(qe){var Be=T.apply(M,Tn([qe],Y));return C&&Ee?Be[0]:Be};ye&&g&&typeof me=="function"&&me.length!=1&&(re=ye=!1);var Ee=this.__chain__,Ce=!!this.__actions__.length,Te=q&&!Ee,De=re&&!Ce;if(!q&&ye){z=De?z:new Le(this);var Ie=s.apply(z,Y);return Ie.__actions__.push({func:ru,args:[xe],thisArg:r}),new gr(Ie,Ee)}return Te&&De?s.apply(this,Y):(Ie=this.thru(xe),Te?C?Ie.value()[0]:Ie.value():Ie)})}),tr(["pop","push","shift","sort","splice","unshift"],function(s){var c=Is[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",C=/^(?:pop|shift)$/.test(s);M.prototype[s]=function(){var T=arguments;if(C&&!this.__chain__){var q=this.value();return c.apply(Ae(q)?q:[],T)}return this[g](function(z){return c.apply(Ae(z)?z:[],T)})}}),Gr(Le.prototype,function(s,c){var g=M[c];if(g){var C=g.name+"";Ge.call(Ki,C)||(Ki[C]=[]),Ki[C].push({name:c,func:g})}}),Ki[Ys(r,w).name]=[{name:"wrapper",func:r}],Le.prototype.clone=uB,Le.prototype.reverse=lB,Le.prototype.value=cB,M.prototype.at=Fz,M.prototype.chain=Bz,M.prototype.commit=$z,M.prototype.next=zz,M.prototype.plant=Uz,M.prototype.reverse=Vz,M.prototype.toJSON=M.prototype.valueOf=M.prototype.value=Wz,M.prototype.first=M.prototype.head,Wo&&(M.prototype[Wo]=Hz),M}),Vi=$F();ti?((ti.exports=Vi)._=Vi,Zc._=Vi):It._=Vi}).call(g7)})(Ma,Ma.exports)),Ma.exports}var xi=m7();function y7(){const e=$e.useAppDispatch(),t=$e.useAppSelector($e.selectRoles),r=$e.useAppSelector($e.selectPrivileges),n=$e.useAppSelector($e.selectRolesFlags),i=$e.useAppSelector($e.selectRolesAndPrivileges,(m,y)=>xi.isEqual(m,y)),o=$e.useAppSelector($e.selectCatalog),a=$e.useAppSelector($e.selectQodly),u=$e.useAppSelector($e.selectSelectedTab),l=$e.useAppSelector($e.selectForceLogin),d=$e.useAppSelector($e.selectRestrictedByDefault),f=$e.useAppSelector($e.selectGuestPrivilege),h=$e.useAppSelector($e.selectCatalogMethods),p=$e.useAppSelector($e.selectDataclasses),v=$e.useAppSelector($e.selectSingletons);return{getRoles:()=>t,getPrivileges:()=>r,getRolesFlags:()=>n,getRolesAndPrivileges:()=>i,getCatalog:()=>o,getQodly:()=>a,getSelectedTab:()=>u,getForceLogin:()=>l??!1,getRestrictedByDefault:()=>d??!1,getGuestPrivilege:()=>f??null,getCatalogMethods:()=>h,getDataclasses:()=>p,getSingletons:()=>v,getHost:()=>"web",actions:{updateRoles:m=>{e($e.updateRoles(m))},updatePrivileges:m=>{e($e.updatePrivileges(m))},setRolesContent:m=>{e($e.setRolesContent(m))},toggleTab:m=>{e($e.toggleTab(m))},toggleForceLogin:m=>{e($e.toggleForceLogin(m))},toggleRestrictedByDefault:m=>{e($e.toggleRestrictedByDefault(m))},setTabFlags:(m,y)=>{e($e.setTabFlags({path:m,flags:y}))},openModal:async m=>await e($e.openModal(m)).unwrap()}}}const Eq=P.createContext(null),Sq=({children:e,adapter:t})=>O.jsx(Eq.Provider,{value:t,children:e}),$t=()=>{const e=P.useContext(Eq);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e};var nx=function(e,t){return nx=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])},nx(e,t)};function is(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");nx(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var al=function(){return al=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},al.apply(this,arguments)};function ix(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 ox(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(u){a={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function ax(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 rn(e){return typeof e=="function"}function Oq(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 $m=Oq(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
34
- `+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
35
- `):"",this.name="UnsubscriptionError",this.errors=r}});function sx(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Yl=(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 u=ix(a),l=u.next();!l.done;l=u.next()){var d=l.value;d.remove(this)}}catch(y){t={error:y}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}else a.remove(this);var f=this.initialTeardown;if(rn(f))try{f()}catch(y){o=y instanceof $m?y.errors:[y]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var p=ix(h),v=p.next();!v.done;v=p.next()){var m=v.value;try{uT(m)}catch(y){o=o??[],y instanceof $m?o=ax(ax([],ox(o)),ox(y.errors)):o.push(y)}}}catch(y){n={error:y}}finally{try{v&&!v.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}if(o)throw new $m(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)uT(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)&&sx(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&sx(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),Cq=Yl.EMPTY;function Rq(e){return e instanceof Yl||e&&"closed"in e&&rn(e.remove)&&rn(e.add)&&rn(e.unsubscribe)}function uT(e){rn(e)?e():e.unsubscribe()}var b7={Promise:void 0},x7={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,ax([e,t],ox(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function w7(e){x7.setTimeout(function(){throw e})}function lT(){}function Bu(e){e()}var rw=(function(e){is(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Rq(r)&&r.add(n)):n.destination=S7,n}return t.create=function(r,n,i){return new ux(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})(Yl),_7=(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){wu(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){wu(n)}else wu(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){wu(r)}},e})(),ux=(function(e){is(t,e);function t(r,n,i){var o=e.call(this)||this,a;return rn(r)||!r?a={next:r??void 0,error:n??void 0,complete:i??void 0}:a=r,o.destination=new _7(a),o}return t})(rw);function wu(e){w7(e)}function E7(e){throw e}var S7={closed:!0,next:lT,error:E7,complete:lT},O7=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function C7(e){return e}function R7(e){return e.length===0?C7:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var cT=(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=P7(t)?t:new ux(t,r,n);return Bu(function(){var a=i,u=a.operator,l=a.source;o.add(u?u.call(o,l):l?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=fT(r),new r(function(i,o){var a=new ux({next:function(u){try{t(u)}catch(l){o(l),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[O7]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return R7(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=fT(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 fT(e){var t;return(t=e??b7.Promise)!==null&&t!==void 0?t:Promise}function I7(e){return e&&rn(e.next)&&rn(e.error)&&rn(e.complete)}function P7(e){return e&&e instanceof rw||I7(e)&&Rq(e)}function T7(e){return rn(e==null?void 0:e.lift)}function N7(e){return function(t){if(T7(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 A7(e,t,r,n,i){return new M7(e,t,r,n,i)}var M7=(function(e){is(t,e);function t(r,n,i,o,a,u){var l=e.call(this,r)||this;return l.onFinalize=a,l.shouldUnsubscribe=u,l._next=n?function(d){try{n(d)}catch(f){r.error(f)}}:e.prototype._next,l._error=o?function(d){try{o(d)}catch(f){r.error(f)}finally{this.unsubscribe()}}:e.prototype._error,l._complete=i?function(){try{i()}catch(d){r.error(d)}finally{this.unsubscribe()}}:e.prototype._complete,l}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})(rw),D7=Oq(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Iq=(function(e){is(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 dT(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new D7},t.prototype.next=function(r){var n=this;Bu(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=ix(n.currentObservers),u=a.next();!u.done;u=a.next()){var l=u.value;l.next(r)}}catch(d){i={error:d}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},t.prototype.error=function(r){var n=this;Bu(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;Bu(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,u=i.observers;return o||a?Cq:(this.currentObservers=null,u.push(r),new Yl(function(){n.currentObservers=null,sx(u,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 cT;return r.source=this,r},t.create=function(r,n){return new dT(r,n)},t})(cT),dT=(function(e){is(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:Cq},t})(Iq);function j7(e,t){return N7(function(r,n){var i=0;r.subscribe(A7(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}var zm={},da={},_u={},hT;function Pq(){if(hT)return _u;hT=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.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 _u}var io={},ha={},pa={},pT;function q7(){if(pT)return pa;pT=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 vT;function Xl(){if(vT)return ha;vT=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.default=void 0;var e=t(q7());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 gT;function Zl(){if(gT)return io;gT=1,Object.defineProperty(io,"__esModule",{value:!0}),io.default=void 0,io.unsafeStringify=n;var e=t(Xl());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 mT;function k7(){if(mT)return da;mT=1,Object.defineProperty(da,"__esModule",{value:!0}),da.default=void 0;var e=r(Pq()),t=Zl();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={},Fn={},ga={},yT;function Tq(){if(yT)return ga;yT=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.default=void 0;var e=t(Xl());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 bT;function Nq(){if(bT)return Fn;bT=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.URL=Fn.DNS=void 0,Fn.default=a;var e=Zl(),t=r(Tq());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";Fn.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Fn.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 Fn}var ma={},xT;function L7(){if(xT)return ma;xT=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 wT;function F7(){if(wT)return va;wT=1,Object.defineProperty(va,"__esModule",{value:!0}),va.default=void 0;var e=r(Nq()),t=r(L7());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={},_T;function B7(){if(_T)return ba;_T=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 ET;function $7(){if(ET)return ya;ET=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.default=void 0;var e=n(B7()),t=n(Pq()),r=Zl();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={},ST;function z7(){if(ST)return wa;ST=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 OT;function H7(){if(OT)return xa;OT=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.default=void 0;var e=r(Nq()),t=r(z7());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={},CT;function U7(){if(CT)return _a;CT=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={},RT;function V7(){if(RT)return Ea;RT=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.default=void 0;var e=t(Xl());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 IT;function W7(){return IT||(IT=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(k7()),r=f(F7()),n=f($7()),i=f(H7()),o=f(U7()),a=f(V7()),u=f(Xl()),l=f(Zl()),d=f(Tq());function f(h){return h&&h.__esModule?h:{default:h}}})(zm)),zm}var Hm,PT;function G7(){if(PT)return Hm;PT=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},Hm=e,Hm}var Um,TT;function K7(){if(TT)return Um;TT=1;var e=G7();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",Um=t,Um}var Vm,NT;function Y7(){if(NT)return Vm;NT=1;const{v4:e,validate:t}=W7(),r=K7(),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 Vm=(()=>{const d=(f,h)=>{const p=f||n.flickrBase58,v={...i,...h};if([...new Set(Array.from(p))].length!==p.length)throw new Error("The provided Alphabet has duplicate characters resulting in unreliable results");const m=l(p.length),y={shortIdLength:m,consistentLength:v.consistentLength,paddingChar:p[0]},x=r(r.HEX,p),b=r(p,r.HEX),w=()=>a(e(),x,y),_={alphabet:p,fromUUID:S=>a(S,x,y),maxLength:m,generate:w,new:w,toUUID:S=>u(S,b),uuid:e,validate:(S,R=!1)=>{if(!S||typeof S!="string")return!1;const I=v.consistentLength?S.length===m:S.length<=m,N=S.split("").every(A=>p.includes(A));return R===!1?I&&N:I&&N&&t(u(S,b))}};return Object.freeze(_),_};return d.constants=n,d.uuid=e,d.generate=()=>(o||(o=d(n.flickrBase58).generate),o()),d})(),Vm}var Aq=Y7();const Mq=new Iq;function X7(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=ae.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 Mq.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 nw=P.createContext(null),Z7=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),J7=({children:e,catalog:t=null,qodly:r=!1,host:n,onSetTabFlags:i,initialState:o})=>{const[a,u]=P.useReducer(X7,{...Z7(),...o}),l=P.useMemo(()=>t?ae.parseCatalog(t):null,[t]),d=P.useMemo(()=>({catalog:l,qodly:r,host:n,onSetTabFlags:i}),[l,r,n,i]);return O.jsx(nw.Provider,{value:{state:a,dispatch:u,external:d},children:e})};function Q7(){const e=P.useContext(nw);if(!e)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:t,dispatch:r,external:n}=e,i=P.useMemo(()=>ae.rolesToAPI({roles:t.roles,privileges:t.privileges,forceLogin:t.forceLogin,restrictedByDefault:t.restrictedByDefault}),[t.roles,t.privileges,t.forceLogin,t.restrictedByDefault]);return{getRoles:P.useCallback(()=>t.roles,[t.roles]),getPrivileges:P.useCallback(()=>t.privileges,[t.privileges]),getRolesFlags:P.useCallback(()=>t.flags,[t.flags]),getRolesAndPrivileges:P.useCallback(()=>i,[i]),getCatalog:P.useCallback(()=>n.catalog??null,[n.catalog]),getQodly:P.useCallback(()=>n.qodly??!1,[n.qodly]),getSelectedTab:P.useCallback(()=>t.selectedTab,[t.selectedTab]),getForceLogin:P.useCallback(()=>t.forceLogin??!1,[t.forceLogin]),getRestrictedByDefault:P.useCallback(()=>t.restrictedByDefault??!1,[t.restrictedByDefault]),getGuestPrivilege:P.useCallback(()=>Object.values(t.privileges).find(({privilege:o})=>o==="guest")??null,[t.privileges]),getCatalogMethods:P.useCallback(()=>{var o;return((o=n.catalog)==null?void 0:o.methods)??[]},[n.catalog]),getDataclasses:P.useCallback(()=>{var o;return((o=n.catalog)==null?void 0:o.dataClasses)??{}},[n.catalog]),getSingletons:P.useCallback(()=>{var o;return((o=n.catalog)==null?void 0:o.singletons)??{}},[n.catalog]),getHost:P.useCallback(()=>n.host??"web",[n.host]),actions:{updateRoles:P.useCallback(o=>{r({type:"UPDATE_ROLES",payload:o})},[]),updatePrivileges:P.useCallback(o=>{r({type:"UPDATE_PRIVILEGES",payload:o})},[]),setRolesContent:P.useCallback(o=>{r({type:"SET_ROLES_CONTENT",payload:o})},[]),toggleTab:P.useCallback(o=>{r({type:"TOGGLE_TAB",payload:o})},[]),toggleForceLogin:P.useCallback(o=>{r({type:"TOGGLE_FORCE_LOGIN",payload:o})},[]),toggleRestrictedByDefault:P.useCallback(o=>{r({type:"TOGGLE_RESTRICTED_BY_DEFAULT",payload:o})},[]),setTabFlags:P.useCallback((o,a)=>{n.onSetTabFlags&&n.onSetTabFlags(o,a)},[n.onSetTabFlags]),openModal:P.useCallback(async o=>{const{type:a=ae.ModalType.ALERT}=o,u=Aq.generate();return r({type:"CREATE_MODAL",payload:{id:u,type:a,isOpen:!0,...o}}),a===ae.ModalType.CONFIRM?new Promise(l=>{const d=Mq.pipe(j7(f=>{const h=f.list.find(p=>p.id===u);return h!==void 0&&!h.isOpen})).subscribe(f=>{var p;const h=f.list.find(v=>v.id===u);if(h){const v=h.closeReason===ae.ModalCloseReason.CONFIRMED,m=xi.entries(((p=h.views)==null?void 0:p.toggles)||{}).reduce((y,x)=>({...y,[x[0]]:x[1].value}),{});r({type:"REMOVE_MODAL",payload:u}),d.unsubscribe(),l({confirmed:v,options:m})}})}):{confirmed:!1}},[r])}}}function eX(){const e=P.useContext(nw);if(!e)throw new Error("useModals must be used within a ReducerAdapterProvider");const{state:t,dispatch:r}=e;return{modals:t.modals.list,closeModal:P.useCallback(n=>{r({type:"CLOSE_MODAL",payload:n})},[r]),editModal:P.useCallback(n=>{r({type:"EDIT_MODAL",payload:n})},[r]),removeModal:P.useCallback(n=>{r({type:"REMOVE_MODAL",payload:n})},[r])}}const Wm=({child:e,parent:t,status:r,onSelect:n,currentPrivilegeId:i})=>{const o=$t(),a=o.getPrivileges();function u(){const d=ae.addPrivilegeIn(t.id,e.id,a);o.actions.updatePrivileges(d)}function l(){const d=ae.removePrivilegeFrom(t.id,e.id,a);o.actions.updatePrivileges(d)}return O.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:[O.jsx("span",{onClick:()=>n(i),className:"text-xs hover:underline",children:e.privilege}),r==="included"?O.jsx("button",{onClick:l,children:O.jsx("span",{className:"text-[13px]",children:O.jsx(we.FdPlus,{className:"rotate-45 transform text-white"})})}):O.jsx("button",{disabled:r==="disabled",onClick:u,className:"opacity-70 disabled:cursor-not-allowed",children:O.jsx("span",{className:"text-[13px]",children:O.jsx(we.FdPlus,{className:"text-white"})})})]})},tX=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=ae.getPrivilegeById(e.id,t);let u=a?ae.populateShallow(a.includes,t):[],l=a?ae.populateShallow(ae.parents(a.id,t),t):[],d=a?ae.populateShallow(ae.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:O.jsxs("div",{className:"w-full border-b border-grey-900 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 text-white",children:"Include a privilege"}):O.jsx("div",{}),O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(ae.ControlledSwitch,{onChange:()=>n(!i),value:i}),O.jsxs("label",{className:"text-xs text-[#F6F6F6]",children:[" ","Show inherited permissions"]})]})]}),O.jsxs("div",{className:"flex flex-wrap items-start justify-start gap-1",children:[u.map(f=>O.jsx(Wm,{child:f,parent:e,status:"included",onSelect:r,currentPrivilegeId:f.id},f.id)),d.map(f=>O.jsx(Wm,{child:f,parent:e,status:"available",onSelect:r,currentPrivilegeId:f.id},f.id)),l.map(f=>O.jsx(Wm,{child:f,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:f.id},f.id))]})]})};function bn(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 Dq(e,t=[]){let r=[];function n(o,a){const u=ce.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=ce.useMemo(()=>m,Object.values(m));return O.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=ce.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=>ce.createContext(a));return function(u){const l=(u==null?void 0:u[e])||o;return ce.useMemo(()=>({[`__scope${e}`]:{...u,[e]:l}}),[u,l])}};return i.scopeName=e,[n,rX(i,...t)]}function rX(...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 ce.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var Ci=globalThis!=null&&globalThis.document?ce.useLayoutEffect:()=>{},nX=ce[" useInsertionEffect ".trim().toString()]||Ci;function iX({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,o,a]=oX({defaultProp:t,onChange:r}),u=e!==void 0,l=u?e:i;{const f=ce.useRef(e!==void 0);ce.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=ce.useCallback(f=>{var h;if(u){const p=aX(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 oX({defaultProp:e,onChange:t}){const[r,n]=ce.useState(e),i=ce.useRef(r),o=ce.useRef(t);return nX(()=>{o.current=t},[t]),ce.useEffect(()=>{var a;i.current!==r&&((a=o.current)==null||a.call(o,r),i.current=r)},[r,i]),[r,n,o]}function aX(e){return typeof e=="function"}function AT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jq(...e){return t=>{let r=!1;const n=e.map(i=>{const o=AT(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():AT(e[i],null)}}}}function Jl(...e){return ce.useCallback(jq(...e),e)}const sX=["top","right","bottom","left"],Vn=Math.min,sr=Math.max,sl=Math.round,Eu=Math.floor,nn=e=>({x:e,y:e}),uX={left:"right",right:"left",bottom:"top",top:"bottom"};function lx(e,t,r){return sr(e,Vn(t,r))}function En(e,t){return typeof e=="function"?e(t):e}function Sn(e){return e.split("-")[0]}function Mo(e){return e.split("-")[1]}function iw(e){return e==="x"?"y":"x"}function ow(e){return e==="y"?"height":"width"}function Qr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function aw(e){return iw(Qr(e))}function lX(e,t,r){r===void 0&&(r=!1);const n=Mo(e),i=aw(e),o=ow(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ul(a)),[a,ul(a)]}function cX(e){const t=ul(e);return[cx(e),t,cx(t)]}function cx(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const MT=["left","right"],DT=["right","left"],fX=["top","bottom"],dX=["bottom","top"];function hX(e,t,r){switch(e){case"top":case"bottom":return r?t?DT:MT:t?MT:DT;case"left":case"right":return t?fX:dX;default:return[]}}function pX(e,t,r,n){const i=Mo(e);let o=hX(Sn(e),r==="start",n);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(cx)))),o}function ul(e){const t=Sn(e);return uX[t]+e.slice(t.length)}function vX(e){return{top:0,right:0,bottom:0,left:0,...e}}function qq(e){return typeof e!="number"?vX(e):{top:e,right:e,bottom:e,left:e}}function ll(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 jT(e,t,r){let{reference:n,floating:i}=e;const o=Qr(t),a=aw(t),u=ow(a),l=Sn(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(Mo(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 gX(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}=En(t,e),m=qq(v),x=u[p?h==="floating"?"reference":"floating":h],b=ll(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=ll(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 mX=50,yX=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,u=a.detectOverflow?a:{...a,detectOverflow:gX},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}=jT(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<mX&&(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}=jT(d,p,l)),y=-1)}return{x:f,y:h,placement:p,strategy:i,middlewareData:m}},bX=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}=En(e,t)||{};if(d==null)return{};const h=qq(f),p={x:r,y:n},v=aw(i),m=ow(v),y=await a.getDimensions(d),x=v==="y",b=x?"top":"left",w=x?"bottom":"right",E=x?"clientHeight":"clientWidth",_=o.reference[m]+o.reference[v]-p[v]-o.floating[m],S=p[v]-o.reference[v],R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let I=R?R[E]:0;(!I||!await(a.isElement==null?void 0:a.isElement(R)))&&(I=u.floating[E]||o.floating[m]);const N=_/2-S/2,A=I/2-y[m]/2-1,k=Vn(h[b],A),L=Vn(h[w],A),$=k,j=I-y[m]-L,D=I/2-y[m]/2+N,W=lx($,D,j),F=!l.arrow&&Mo(i)!=null&&D!==W&&o.reference[m]/2-(D<$?k:L)-y[m]/2<0,X=F?D<$?D-$:D-j:0;return{[v]:p[v]+X,data:{[v]:W,centerOffset:D-W-X,...F&&{alignmentOffset:X}},reset:F}}}),xX=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}=En(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const b=Sn(i),w=Qr(u),E=Sn(u)===u,_=await(l.isRTL==null?void 0:l.isRTL(d.floating)),S=p||(E||!y?[ul(u)]:cX(u)),R=m!=="none";!p&&R&&S.push(...pX(u,y,m,_));const I=[u,...S],N=await l.detectOverflow(t,x),A=[];let k=((n=o.flip)==null?void 0:n.overflows)||[];if(f&&A.push(N[b]),h){const D=lX(i,a,_);A.push(N[D[0]],N[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,W=I[D];if(W&&(!(h==="alignment"?w!==Qr(W):!1)||k.every(Z=>Qr(Z.placement)===w?Z.overflows[0]>0:!0)))return{data:{index:D,overflows:k},reset:{placement:W}};let F=($=k.filter(X=>X.overflows[0]<=0).sort((X,Z)=>X.overflows[1]-Z.overflows[1])[0])==null?void 0:$.placement;if(!F)switch(v){case"bestFit":{var j;const X=(j=k.filter(Z=>{if(R){const Q=Qr(Z.placement);return Q===w||Q==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(Q=>Q>0).reduce((Q,U)=>Q+U,0)]).sort((Z,Q)=>Z[1]-Q[1])[0])==null?void 0:j[0];X&&(F=X);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function qT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kT(e){return sX.some(t=>e[t]>=0)}const wX=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...o}=En(e,t);switch(i){case"referenceHidden":{const a=await n.detectOverflow(t,{...o,elementContext:"reference"}),u=qT(a,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:kT(u)}}}case"escaped":{const a=await n.detectOverflow(t,{...o,altBoundary:!0}),u=qT(a,r.floating);return{data:{escapedOffsets:u,escaped:kT(u)}}}default:return{}}}}},kq=new Set(["left","top"]);async function _X(e,t){const{placement:r,platform:n,elements:i}=e,o=await(n.isRTL==null?void 0:n.isRTL(i.floating)),a=Sn(r),u=Mo(r),l=Qr(r)==="y",d=kq.has(a)?-1:1,f=o&&l?-1:1,h=En(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 EX=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 _X(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}}}}},SX=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}=En(e,t),f={x:r,y:n},h=await o.detectOverflow(t,d),p=Qr(Sn(i)),v=iw(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=lx(E,m,_)}if(u){const b=p==="y"?"top":"left",w=p==="y"?"bottom":"right",E=y+h[b],_=y-h[w];y=lx(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}}}}}},OX=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}=En(e,t),f={x:r,y:n},h=Qr(i),p=iw(h);let v=f[p],m=f[h];const y=En(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",_=kq.has(Sn(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}}}},CX=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}=En(e,t),f=await a.detectOverflow(t,d),h=Sn(i),p=Mo(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,_=Vn(y-f[x],w),S=Vn(m-f[b],E),R=!t.middlewareData.shift;let I=_,N=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(I=w),R&&!p){const k=sr(f.left,0),L=sr(f.right,0),$=sr(f.top,0),j=sr(f.bottom,0);v?N=m-2*(k!==0||L!==0?k+L:sr(f.left,f.right)):I=y-2*($!==0||j!==0?$+j:sr(f.top,f.bottom))}await l({...t,availableWidth:N,availableHeight:I});const A=await a.getDimensions(u.floating);return m!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function Ql(){return typeof window<"u"}function Do(e){return Lq(e)?(e.nodeName||"").toLowerCase():"#document"}function ur(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function un(e){var t;return(t=(Lq(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Lq(e){return Ql()?e instanceof Node||e instanceof ur(e).Node:!1}function $r(e){return Ql()?e instanceof Element||e instanceof ur(e).Element:!1}function Rn(e){return Ql()?e instanceof HTMLElement||e instanceof ur(e).HTMLElement:!1}function LT(e){return!Ql()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ur(e).ShadowRoot}function os(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 RX(e){return/^(table|td|th)$/.test(Do(e))}function ec(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const IX=/transform|translate|scale|rotate|perspective|filter/,PX=/paint|layout|strict|content/,ci=e=>!!e&&e!=="none";let Gm;function sw(e){const t=$r(e)?zr(e):e;return ci(t.transform)||ci(t.translate)||ci(t.scale)||ci(t.rotate)||ci(t.perspective)||!uw()&&(ci(t.backdropFilter)||ci(t.filter))||IX.test(t.willChange||"")||PX.test(t.contain||"")}function TX(e){let t=Wn(e);for(;Rn(t)&&!Ro(t);){if(sw(t))return t;if(ec(t))return null;t=Wn(t)}return null}function uw(){return Gm==null&&(Gm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Gm}function Ro(e){return/^(html|body|#document)$/.test(Do(e))}function zr(e){return ur(e).getComputedStyle(e)}function tc(e){return $r(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wn(e){if(Do(e)==="html")return e;const t=e.assignedSlot||e.parentNode||LT(e)&&e.host||un(e);return LT(t)?t.host:t}function Fq(e){const t=Wn(e);return Ro(t)?e.ownerDocument?e.ownerDocument.body:e.body:Rn(t)&&os(t)?t:Fq(t)}function Wa(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=Fq(e),o=i===((n=e.ownerDocument)==null?void 0:n.body),a=ur(i);if(o){const u=fx(a);return t.concat(a,a.visualViewport||[],os(i)?i:[],u&&r?Wa(u):[])}else return t.concat(i,Wa(i,[],r))}function fx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Bq(e){const t=zr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=Rn(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,u=sl(r)!==o||sl(n)!==a;return u&&(r=o,n=a),{width:r,height:n,$:u}}function lw(e){return $r(e)?e:e.contextElement}function mo(e){const t=lw(e);if(!Rn(t))return nn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:o}=Bq(t);let a=(o?sl(r.width):r.width)/n,u=(o?sl(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const NX=nn(0);function $q(e){const t=ur(e);return!uw()||!t.visualViewport?NX:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function AX(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ur(e)?!1:t}function Ri(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=lw(e);let a=nn(1);t&&(n?$r(n)&&(a=mo(n)):a=mo(e));const u=AX(o,r,n)?$q(o):nn(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=ur(o),v=n&&$r(n)?ur(n):n;let m=p,y=fx(m);for(;y&&n&&v!==m;){const x=mo(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=ur(y),y=fx(m)}}return ll({width:f,height:h,x:l,y:d})}function rc(e,t){const r=tc(e).scrollLeft;return t?t.left+r:Ri(un(e)).left+r}function zq(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-rc(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function MX(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const o=i==="fixed",a=un(n),u=t?ec(t.floating):!1;if(n===a||u&&o)return r;let l={scrollLeft:0,scrollTop:0},d=nn(1);const f=nn(0),h=Rn(n);if((h||!h&&!o)&&((Do(n)!=="body"||os(a))&&(l=tc(n)),h)){const v=Ri(n);d=mo(n),f.x=v.x+n.clientLeft,f.y=v.y+n.clientTop}const p=a&&!h&&!o?zq(a,l):nn(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 DX(e){return Array.from(e.getClientRects())}function jX(e){const t=un(e),r=tc(e),n=e.ownerDocument.body,i=sr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=sr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+rc(e);const u=-r.scrollTop;return zr(n).direction==="rtl"&&(a+=sr(t.clientWidth,n.clientWidth)-i),{width:i,height:o,x:a,y:u}}const FT=25;function qX(e,t){const r=ur(e),n=un(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=uw();(!f||f&&t==="fixed")&&(u=i.offsetLeft,l=i.offsetTop)}const d=rc(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<=FT&&(o-=m)}else d<=FT&&(o+=d);return{width:o,height:a,x:u,y:l}}function kX(e,t){const r=Ri(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,o=Rn(e)?mo(e):nn(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 BT(e,t,r){let n;if(t==="viewport")n=qX(e,r);else if(t==="document")n=jX(un(e));else if($r(t))n=kX(t,r);else{const i=$q(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ll(n)}function Hq(e,t){const r=Wn(e);return r===t||!$r(r)||Ro(r)?!1:zr(r).position==="fixed"||Hq(r,t)}function LX(e,t){const r=t.get(e);if(r)return r;let n=Wa(e,[],!1).filter(u=>$r(u)&&Do(u)!=="body"),i=null;const o=zr(e).position==="fixed";let a=o?Wn(e):e;for(;$r(a)&&!Ro(a);){const u=zr(a),l=sw(a);!l&&u.position==="fixed"&&(i=null),(o?!l&&!i:!l&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||os(a)&&!l&&Hq(e,a))?n=n.filter(f=>f!==a):i=u,a=Wn(a)}return t.set(e,n),n}function FX(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const a=[...r==="clippingAncestors"?ec(t)?[]:LX(t,this._c):[].concat(r),n],u=BT(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=BT(t,a[p],i);l=sr(v.top,l),d=Vn(v.right,d),f=Vn(v.bottom,f),h=sr(v.left,h)}return{width:d-h,height:f-l,x:h,y:l}}function BX(e){const{width:t,height:r}=Bq(e);return{width:t,height:r}}function $X(e,t,r){const n=Rn(t),i=un(t),o=r==="fixed",a=Ri(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const l=nn(0);function d(){l.x=rc(i)}if(n||!n&&!o)if((Do(t)!=="body"||os(i))&&(u=tc(t)),n){const v=Ri(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?zq(i,u):nn(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 Km(e){return zr(e).position==="static"}function $T(e,t){if(!Rn(e)||zr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return un(e)===r&&(r=r.ownerDocument.body),r}function Uq(e,t){const r=ur(e);if(ec(e))return r;if(!Rn(e)){let i=Wn(e);for(;i&&!Ro(i);){if($r(i)&&!Km(i))return i;i=Wn(i)}return r}let n=$T(e,t);for(;n&&RX(n)&&Km(n);)n=$T(n,t);return n&&Ro(n)&&Km(n)&&!sw(n)?r:n||TX(e)||r}const zX=async function(e){const t=this.getOffsetParent||Uq,r=this.getDimensions,n=await r(e.floating);return{reference:$X(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function HX(e){return zr(e).direction==="rtl"}const UX={convertOffsetParentRelativeRectToViewportRelativeRect:MX,getDocumentElement:un,getClippingRect:FX,getOffsetParent:Uq,getElementRects:zX,getClientRects:DX,getDimensions:BX,getScale:mo,isElement:$r,isRTL:HX};function Vq(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function VX(e,t){let r=null,n;const i=un(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=Eu(h),y=Eu(i.clientWidth-(f+p)),x=Eu(i.clientHeight-(h+v)),b=Eu(f),E={rootMargin:-m+"px "+-y+"px "+-x+"px "+-b+"px",threshold:sr(0,Vn(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&&!Vq(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 WX(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=lw(e),f=i||o?[...d?Wa(d):[],...t?Wa(t):[]]:[];f.forEach(b=>{i&&b.addEventListener("scroll",r,{passive:!0}),o&&b.addEventListener("resize",r)});const h=d&&u?VX(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?Ri(e):null;l&&x();function x(){const b=Ri(e);y&&!Vq(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 GX=EX,KX=SX,YX=xX,XX=CX,ZX=wX,zT=bX,JX=OX,QX=(e,t,r)=>{const n=new Map,i={platform:UX,...r},o={...i.platform,_c:n};return yX(e,t,{...i,platform:o})};var eZ=typeof document<"u",tZ=function(){},$u=eZ?P.useLayoutEffect:tZ;function cl(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(!cl(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)&&!cl(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Wq(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function HT(e,t){const r=Wq(e);return Math.round(t*r)/r}function Ym(e){const t=ce.useRef(e);return $u(()=>{t.current=e}),t}function rZ(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]=ce.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=ce.useState(n);cl(p,n)||v(n);const[m,y]=ce.useState(null),[x,b]=ce.useState(null),w=ce.useCallback(Z=>{Z!==R.current&&(R.current=Z,y(Z))},[]),E=ce.useCallback(Z=>{Z!==I.current&&(I.current=Z,b(Z))},[]),_=o||m,S=a||x,R=ce.useRef(null),I=ce.useRef(null),N=ce.useRef(f),A=l!=null,k=Ym(l),L=Ym(i),$=Ym(d),j=ce.useCallback(()=>{if(!R.current||!I.current)return;const Z={placement:t,strategy:r,middleware:p};L.current&&(Z.platform=L.current),QX(R.current,I.current,Z).then(Q=>{const U={...Q,isPositioned:$.current!==!1};D.current&&!cl(N.current,U)&&(N.current=U,mx.flushSync(()=>{h(U)}))})},[p,t,r,L,$]);$u(()=>{d===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(Z=>({...Z,isPositioned:!1})))},[d]);const D=ce.useRef(!1);$u(()=>(D.current=!0,()=>{D.current=!1}),[]),$u(()=>{if(_&&(R.current=_),S&&(I.current=S),_&&S){if(k.current)return k.current(_,S,j);j()}},[_,S,j,k,A]);const W=ce.useMemo(()=>({reference:R,floating:I,setReference:w,setFloating:E}),[w,E]),F=ce.useMemo(()=>({reference:_,floating:S}),[_,S]),X=ce.useMemo(()=>{const Z={position:r,left:0,top:0};if(!F.floating)return Z;const Q=HT(F.floating,f.x),U=HT(F.floating,f.y);return u?{...Z,transform:"translate("+Q+"px, "+U+"px)",...Wq(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:U}},[r,u,F.floating,f.x,f.y]);return ce.useMemo(()=>({...f,update:j,refs:W,elements:F,floatingStyles:X}),[f,j,W,F,X])}const nZ=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?zT({element:n.current,padding:i}).fn(r):{}:n?zT({element:n,padding:i}).fn(r):{}}}},iZ=(e,t)=>{const r=GX(e);return{name:r.name,fn:r.fn,options:[e,t]}},oZ=(e,t)=>{const r=KX(e);return{name:r.name,fn:r.fn,options:[e,t]}},aZ=(e,t)=>({fn:JX(e).fn,options:[e,t]}),sZ=(e,t)=>{const r=YX(e);return{name:r.name,fn:r.fn,options:[e,t]}},uZ=(e,t)=>{const r=XX(e);return{name:r.name,fn:r.fn,options:[e,t]}},lZ=(e,t)=>{const r=ZX(e);return{name:r.name,fn:r.fn,options:[e,t]}},cZ=(e,t)=>{const r=nZ(e);return{name:r.name,fn:r.fn,options:[e,t]}};function fZ(e){const t=dZ(e),r=ce.forwardRef((n,i)=>{const{children:o,...a}=n,u=ce.Children.toArray(o),l=u.find(pZ);if(l){const d=l.props.children,f=u.map(h=>h===l?ce.Children.count(d)>1?ce.Children.only(null):ce.isValidElement(d)?d.props.children:null:h);return O.jsx(t,{...a,ref:i,children:ce.isValidElement(d)?ce.cloneElement(d,void 0,f):null})}return O.jsx(t,{...a,ref:i,children:o})});return r.displayName=`${e}.Slot`,r}function dZ(e){const t=ce.forwardRef((r,n)=>{const{children:i,...o}=r;if(ce.isValidElement(i)){const a=gZ(i),u=vZ(o,i.props);return i.type!==ce.Fragment&&(u.ref=n?jq(n,a):a),ce.cloneElement(i,u)}return ce.Children.count(i)>1?ce.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hZ=Symbol("radix.slottable");function pZ(e){return ce.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hZ}function vZ(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 gZ(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 mZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],as=mZ.reduce((e,t)=>{const r=fZ(`Primitive.${t}`),n=ce.forwardRef((i,o)=>{const{asChild:a,...u}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(l,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),yZ="Arrow",Gq=ce.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return O.jsx(as.svg,{...o,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:O.jsx("polygon",{points:"0,0 30,0 15,10"})})});Gq.displayName=yZ;var bZ=Gq;function xZ(e){const t=ce.useRef(e);return ce.useEffect(()=>{t.current=e}),ce.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function wZ(e){const[t,r]=ce.useState(void 0);return Ci(()=>{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 cw="Popper",[Kq,Yq]=Dq(cw),[_Z,Xq]=Kq(cw),Zq=e=>{const{__scopePopper:t,children:r}=e,[n,i]=ce.useState(null);return O.jsx(_Z,{scope:t,anchor:n,onAnchorChange:i,children:r})};Zq.displayName=cw;var Jq="PopperAnchor",Qq=ce.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=Xq(Jq,r),a=ce.useRef(null),u=Jl(t,a),l=ce.useRef(null);return ce.useEffect(()=>{const d=l.current;l.current=(n==null?void 0:n.current)||a.current,d!==l.current&&o.onAnchorChange(l.current)}),n?null:O.jsx(as.div,{...i,ref:u})});Qq.displayName=Jq;var fw="PopperContent",[EZ,SZ]=Kq(fw),ek=ce.forwardRef((e,t)=>{var H,G,se,oe,fe,ne;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=Xq(fw,r),[b,w]=ce.useState(null),E=Jl(t,K=>w(K)),[_,S]=ce.useState(null),R=wZ(_),I=(R==null?void 0:R.width)??0,N=(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(CZ),altBoundary:$},{refs:D,floatingStyles:W,placement:F,isPositioned:X,middlewareData:Z}=rZ({strategy:"fixed",placement:A,whileElementsMounted:(...K)=>WX(...K,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[iZ({mainAxis:i+N,alignmentAxis:a}),l&&oZ({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?aZ():void 0,...j}),l&&sZ({...j}),uZ({...j,apply:({elements:K,rects:he,availableWidth:be,availableHeight:pe})=>{const{width:de,height:_e}=he.reference,Re=K.floating.style;Re.setProperty("--radix-popper-available-width",`${be}px`),Re.setProperty("--radix-popper-available-height",`${pe}px`),Re.setProperty("--radix-popper-anchor-width",`${de}px`),Re.setProperty("--radix-popper-anchor-height",`${_e}px`)}}),_&&cZ({element:_,padding:u}),RZ({arrowWidth:I,arrowHeight:N}),p&&lZ({strategy:"referenceHidden",...j})]}),[Q,U]=nk(F),ee=xZ(m);Ci(()=>{X&&(ee==null||ee())},[X,ee]);const ie=(H=Z.arrow)==null?void 0:H.x,ue=(G=Z.arrow)==null?void 0:G.y,B=((se=Z.arrow)==null?void 0:se.centerOffset)!==0,[V,J]=ce.useState();return Ci(()=>{b&&J(window.getComputedStyle(b).zIndex)},[b]),O.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:X?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[(oe=Z.transformOrigin)==null?void 0:oe.x,(fe=Z.transformOrigin)==null?void 0:fe.y].join(" "),...((ne=Z.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:O.jsx(EZ,{scope:r,placedSide:Q,onArrowChange:S,arrowX:ie,arrowY:ue,shouldHideArrow:B,children:O.jsx(as.div,{"data-side":Q,"data-align":U,...y,ref:E,style:{...y.style,animation:X?void 0:"none"}})})})});ek.displayName=fw;var tk="PopperArrow",OZ={top:"bottom",right:"left",bottom:"top",left:"right"},rk=ce.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=SZ(tk,n),a=OZ[o.placedSide];return O.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:O.jsx(bZ,{...i,ref:r,style:{...i.style,display:"block"}})})});rk.displayName=tk;function CZ(e){return e!==null}var RZ=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]=nk(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 nk(e){const[t,r="center"]=e.split("-");return[t,r]}var IZ=Zq,PZ=Qq,TZ=ek,NZ=rk,AZ="Portal",ik=ce.forwardRef((e,t)=>{var u;const{container:r,...n}=e,[i,o]=ce.useState(!1);Ci(()=>o(!0),[]);const a=r||i&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return a?gx.createPortal(O.jsx(as.div,{...n,ref:t}),a):null});ik.displayName=AZ;function MZ(e,t){return ce.useReducer((r,n)=>t[r][n]??r,e)}var dw=e=>{const{present:t,children:r}=e,n=DZ(t),i=typeof r=="function"?r({present:n.isPresent}):ce.Children.only(r),o=Jl(n.ref,jZ(i));return typeof r=="function"||n.isPresent?ce.cloneElement(i,{ref:o}):null};dw.displayName="Presence";function DZ(e){const[t,r]=ce.useState(),n=ce.useRef(null),i=ce.useRef(e),o=ce.useRef("none"),a=e?"mounted":"unmounted",[u,l]=MZ(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ce.useEffect(()=>{const d=Su(n.current);o.current=u==="mounted"?d:"none"},[u]),Ci(()=>{const d=n.current,f=i.current;if(f!==e){const p=o.current,v=Su(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]),Ci(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,h=v=>{const y=Su(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=Su(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:ce.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function Su(e){return(e==null?void 0:e.animationName)||"none"}function jZ(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 Xm(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 UT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ok(...e){return t=>{let r=!1;const n=e.map(i=>{const o=UT(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():UT(e[i],null)}}}}function ak(...e){return ce.useCallback(ok(...e),e)}function qZ(e){const t=kZ(e),r=ce.forwardRef((n,i)=>{const{children:o,...a}=n,u=ce.Children.toArray(o),l=u.find(FZ);if(l){const d=l.props.children,f=u.map(h=>h===l?ce.Children.count(d)>1?ce.Children.only(null):ce.isValidElement(d)?d.props.children:null:h);return O.jsx(t,{...a,ref:i,children:ce.isValidElement(d)?ce.cloneElement(d,void 0,f):null})}return O.jsx(t,{...a,ref:i,children:o})});return r.displayName=`${e}.Slot`,r}function kZ(e){const t=ce.forwardRef((r,n)=>{const{children:i,...o}=r;if(ce.isValidElement(i)){const a=$Z(i),u=BZ(o,i.props);return i.type!==ce.Fragment&&(u.ref=n?ok(n,a):a),ce.cloneElement(i,u)}return ce.Children.count(i)>1?ce.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var LZ=Symbol("radix.slottable");function FZ(e){return ce.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LZ}function BZ(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 $Z(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 zZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sk=zZ.reduce((e,t)=>{const r=qZ(`Primitive.${t}`),n=ce.forwardRef((i,o)=>{const{asChild:a,...u}=i,l=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),O.jsx(l,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function HZ(e,t){e&&mx.flushSync(()=>e.dispatchEvent(t))}function hw(e){const t=ce.useRef(e);return ce.useEffect(()=>{t.current=e}),ce.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function UZ(e,t=globalThis==null?void 0:globalThis.document){const r=hw(e);ce.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 VZ="DismissableLayer",dx="dismissableLayer.update",WZ="dismissableLayer.pointerDownOutside",GZ="dismissableLayer.focusOutside",VT,uk=ce.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lk=ce.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:u,...l}=e,d=ce.useContext(uk),[f,h]=ce.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=ce.useState({}),m=ak(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=XZ(I=>{const N=I.target,A=[...d.branches].some(k=>k.contains(N));!_||A||(i==null||i(I),a==null||a(I),I.defaultPrevented||u==null||u())},p),R=ZZ(I=>{const N=I.target;[...d.branches].some(k=>k.contains(N))||(o==null||o(I),a==null||a(I),I.defaultPrevented||u==null||u())},p);return UZ(I=>{w===d.layers.size-1&&(n==null||n(I),!I.defaultPrevented&&u&&(I.preventDefault(),u()))},p),ce.useEffect(()=>{if(f)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(VT=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),WT(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=VT)}},[f,p,r,d]),ce.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),WT())},[f,d]),ce.useEffect(()=>{const I=()=>v({});return document.addEventListener(dx,I),()=>document.removeEventListener(dx,I)},[]),O.jsx(sk.div,{...l,ref:m,style:{pointerEvents:E?_?"auto":"none":void 0,...e.style},onFocusCapture:Xm(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Xm(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Xm(e.onPointerDownCapture,S.onPointerDownCapture)})});lk.displayName=VZ;var KZ="DismissableLayerBranch",YZ=ce.forwardRef((e,t)=>{const r=ce.useContext(uk),n=ce.useRef(null),i=ak(t,n);return ce.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),O.jsx(sk.div,{...e,ref:i})});YZ.displayName=KZ;function XZ(e,t=globalThis==null?void 0:globalThis.document){const r=hw(e),n=ce.useRef(!1),i=ce.useRef(()=>{});return ce.useEffect(()=>{const o=u=>{if(u.target&&!n.current){let l=function(){ck(WZ,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 ZZ(e,t=globalThis==null?void 0:globalThis.document){const r=hw(e),n=ce.useRef(!1);return ce.useEffect(()=>{const i=o=>{o.target&&!n.current&&ck(GZ,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 WT(){const e=new CustomEvent(dx);document.dispatchEvent(e)}function ck(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?HZ(i,o):i.dispatchEvent(o)}var Zm,nc="HoverCard",[fk]=Dq(nc,[Yq]),ic=Yq(),[JZ,oc]=fk(nc),dk=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:o,openDelay:a=700,closeDelay:u=300}=e,l=ic(t),d=ce.useRef(0),f=ce.useRef(0),h=ce.useRef(!1),p=ce.useRef(!1),[v,m]=iX({prop:n,defaultProp:i??!1,onChange:o,caller:nc}),y=ce.useCallback(()=>{clearTimeout(f.current),d.current=window.setTimeout(()=>m(!0),a)},[a,m]),x=ce.useCallback(()=>{clearTimeout(d.current),!h.current&&!p.current&&(f.current=window.setTimeout(()=>m(!1),u))},[u,m]),b=ce.useCallback(()=>m(!1),[m]);return ce.useEffect(()=>()=>{clearTimeout(d.current),clearTimeout(f.current)},[]),O.jsx(JZ,{scope:t,open:v,onOpenChange:m,onOpen:y,onClose:x,onDismiss:b,hasSelectionRef:h,isPointerDownOnContentRef:p,children:O.jsx(IZ,{...l,children:r})})};dk.displayName=nc;var hk="HoverCardTrigger",pk=ce.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=oc(hk,r),o=ic(r);return O.jsx(PZ,{asChild:!0,...o,children:O.jsx(as.a,{"data-state":i.open?"open":"closed",...n,ref:t,onPointerEnter:bn(e.onPointerEnter,dl(i.onOpen)),onPointerLeave:bn(e.onPointerLeave,dl(i.onClose)),onFocus:bn(e.onFocus,i.onOpen),onBlur:bn(e.onBlur,i.onClose),onTouchStart:bn(e.onTouchStart,a=>a.preventDefault())})})});pk.displayName=hk;var pw="HoverCardPortal",[QZ,eJ]=fk(pw,{forceMount:void 0}),vk=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,o=oc(pw,t);return O.jsx(QZ,{scope:t,forceMount:r,children:O.jsx(dw,{present:r||o.open,children:O.jsx(ik,{asChild:!0,container:i,children:n})})})};vk.displayName=pw;var fl="HoverCardContent",gk=ce.forwardRef((e,t)=>{const r=eJ(fl,e.__scopeHoverCard),{forceMount:n=r.forceMount,...i}=e,o=oc(fl,e.__scopeHoverCard);return O.jsx(dw,{present:n||o.open,children:O.jsx(tJ,{"data-state":o.open?"open":"closed",...i,onPointerEnter:bn(e.onPointerEnter,dl(o.onOpen)),onPointerLeave:bn(e.onPointerLeave,dl(o.onClose)),ref:t})})});gk.displayName=fl;var tJ=ce.forwardRef((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,...u}=e,l=oc(fl,r),d=ic(r),f=ce.useRef(null),h=Jl(t,f),[p,v]=ce.useState(!1);return ce.useEffect(()=>{if(p){const m=document.body;return Zm=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=Zm,m.style.webkitUserSelect=Zm}}},[p]),ce.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]),ce.useEffect(()=>{f.current&&iJ(f.current).forEach(y=>y.setAttribute("tabindex","-1"))}),O.jsx(lk,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:bn(o,m=>{m.preventDefault()}),onDismiss:l.onDismiss,children:O.jsx(TZ,{...d,...u,onPointerDown:bn(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)"}})})}),rJ="HoverCardArrow",nJ=ce.forwardRef((e,t)=>{const{__scopeHoverCard:r,...n}=e,i=ic(r);return O.jsx(NZ,{...i,...n,ref:t})});nJ.displayName=rJ;function dl(e){return t=>t.pointerType==="touch"?void 0:e()}function iJ(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 vw=dk,gw=pk,Lr=vk,Fr=gk;function oo(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`,`
6
+ */var zO;function dH(){return zO||(zO=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})()})(qO)),qO.exports}var fH=dH();const hH=Rj(fH),pH=uH({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 ye(...e){return pH(hH(e))}const yl={sm:{checkbox:"size-4",hoverSquare:"size-2.5",text:"text-xs",spacing:"gap-1",icon:"size-3.25"},md:{checkbox:"size-5",hoverSquare:"size-3.5",text:"text-sm",spacing:"gap-1.5",icon:"size-4"},lg:{checkbox:"size-6",hoverSquare:"size-4",text:"text-base",spacing:"gap-2",icon:"size-5"}},bn={primary:{checked:"bg-primary border-primary",unchecked:"border border-body bg-transparent",checkedHover:"hover:bg-primary-hover hover:border-primary-hover",hoverSquare:"bg-primary-hover",focus:"focus:ring-primary",label:"text-body"},positive:{checked:"bg-positive border-positive",unchecked:"border border-positive bg-transparent",checkedHover:"hover:bg-positive-hover hover:border-positive-hover",hoverSquare:"bg-positive-hover",focus:"focus:ring-positive",label:"text-positive"},warning:{checked:"bg-warning border-warning",unchecked:"border border-warning bg-transparent",checkedHover:"hover:bg-warning-hover hover:border-warning-hover",hoverSquare:"bg-warning-hover",focus:"focus:ring-warning",label:"text-warning"},negative:{checked:"bg-negative border-negative",unchecked:"border border-negative bg-transparent",checkedHover:"hover:bg-negative-hover hover:border-negative-hover",hoverSquare:"bg-negative-hover",focus:"focus:ring-negative",label:"text-negative"}},vH=`
7
+ appearance-none border rounded transition-all duration-200
8
+ focus:ring-2 focus:ring-offset-2 focus:outline-hidden
9
+ relative
10
+ `,gH=(e,t,r)=>{const{isChecked:n,isIndeterminate:i,isDisabled:o,isInvalid:a}=r,s=n||i;return ye(vH,yl[e].checkbox,{"cursor-pointer":!o},a?{[bn.negative.checked]:s,[bn.negative.unchecked]:!s,[bn.negative.checkedHover]:!o&&s,[bn.negative.focus]:!o,"border-input-disable":o}:{[bn[t].checked]:s&&!o,[bn[t].unchecked]:!s&&!o,[bn[t].checkedHover]:!o&&s,[bn[t].focus]:!o,"border-input-disable":o,"bg-input-disable":o&&s})},mH=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return ye(yl[e].text,i?{[bn.negative.label]:i}:{"text-input-disable":n,[bn[t].label]:!n,"cursor-pointer":!n})},bH=e=>ye("inline-flex items-center ws-group",yl[e].spacing),yH=(e,t,r)=>ye("center-absolute rounded-xs transition-all duration-200 opacity-0 ws-checkbox-hover-target",yl[e].hoverSquare,{[bn.negative.hoverSquare]:r,[bn[t].hoverSquare]:!r}),xH=e=>`${yl[e].icon}`,wH=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"})}),ir=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},y)=>{const[m,g]=C.useState(d),w=u===!0||m===!0,x=u===null,_=w||x,S={isChecked:w,isIndeterminate:x,isDisabled:t,isInvalid:r},E=gH(i,o,S),I=mH(i,o,S),N=bH(i),T=yH(i,o,r),M=xH(i);return O.jsxs("label",{"data-qui":"Checkbox",className:N,children:[O.jsxs("div",{className:E,children:[O.jsx("input",{ref:y,type:"checkbox",className:"sr-only",checked:w,disabled:t,required:n,onChange:z=>{u===void 0&&g(z.target.checked),a==null||a(z)},onFocus:s,onBlur:c,name:h,id:p,...v}),_&&O.jsx("div",{className:"center-absolute",children:x?O.jsx(wH,{className:M}):O.jsx(mV,{className:M})}),!_&&!t&&O.jsx("div",{className:T})]}),e&&O.jsxs("span",{className:I,children:[e,n&&O.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});ir.displayName="Checkbox";const xl={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"}},ol={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"}},SH=`
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
+ `,EH=(e,t,r)=>{const{isDisabled:n,isInvalid:i}=r;return ye(SH,xl[e].radio,i?ol[t].radioInvalid:{[ol[t].radio]:!n,"cursor-not-allowed opacity-60":n})},_H=(e,t,r)=>{const{checked:n,isDisabled:i,isInvalid:o}=r;return ye("center-absolute rounded-full transition-all duration-200 ease-in-out",xl[e].dot,o?"bg-negative":{[ol[t].dot]:!i,"border-neutral":i,"opacity-0 scale-0":!n,"opacity-100 scale-100":n&&!i})},OH=(e,t,r)=>ye("center-absolute rounded-full transition-all duration-200 opacity-0 group-hover:opacity-100",xl[e].hoverDot,{[ol[t].hoverDot]:!r,"bg-negative-bg":r}),CH=e=>ye("cursor-pointer select-none transition-colors duration-200",xl[e].label),IH=(e,t,r,n)=>{const{isDisabled:i,isInvalid:o}=r;return ye("inline-flex items-center group",xl[e].container,o?{"text-negative":o}:{[ol[t].label]:!i,"text-muted":i},n)},RH=C.createContext(null),NH=()=>{const e=C.useContext(RH);if(!e)throw new Error("Radio.Item must be used within Radio.Group");return e},TH=C.forwardRef(({value:e,label:t,size:r,color:n,isDisabled:i,isInvalid:o,isRequired:a,className:s,...c},u)=>{const d=NH(),h=r??d.size,p=n??d.color,v=i??d.isDisabled,y=o??d.isInvalid,m=a??d.isRequired,g=d.value===e,w={checked:g,isDisabled:v,isInvalid:y},x=EH(h,p,w),_=_H(h,p,w),S=OH(h,p,y),E=CH(h),I=IH(h,p,w,s),N=()=>{v||d.onChange(e)};return O.jsxs("label",{"data-qui":"RadioItem",className:I,children:[O.jsxs("div",{className:ye("relative",{hidden:d.hideIndicator}),children:[O.jsx("input",{ref:u,type:"radio",value:e,checked:g,disabled:v,required:m,"aria-invalid":y,"aria-label":t?void 0:c["aria-label"],name:d.name,onChange:N,className:"sr-only",...c}),O.jsxs("div",{className:x,children:[O.jsx("div",{className:_}),!g&&!v&&O.jsx("div",{className:S})]})]}),t&&O.jsxs("span",{className:E,children:[t,m&&O.jsx("span",{className:"text-negative ml-1",children:"*"})]})]})});TH.displayName="RadioItem";const Nj={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"}},PH={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-body",outline:"bg-transparent",ghost:"bg-transparent"},text:{solid:"text-primary",outline:"text-body",ghost:"text-body"},border:{solid:"border-body",outline:"border-body",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"}}},MH=(e,t,r,n)=>{const i=Nj[e],o=PH[r],a=ye("inline-flex items-center justify-center font-medium transition-colors duration-200 focus:outline-hidden border",{"cursor-pointer":!n},i.container);return n?ye(a,"text-inactive-text pointer-events-none",{"border-panel":t!=="ghost"&&t==="solid","border-panel-subtle":t==="outline","bg-panel":t==="solid","bg-transparent ":t==="outline"||t==="ghost","border-transparent":t==="ghost"}):ye(a,o.bg[t],o.text[t],o.hover[t],o.border[t])},kH=e=>ye("flex items-center justify-center gap-1",Nj[e].text),Jt=C.forwardRef(({size:e="md",variant:t="solid",color:r="primary",className:n,children:i,disabled:o,...a},s)=>O.jsx("button",{"data-qui":"Button",ref:s,type:"button",className:ye(MH(e,t,r,o),kH(e),n),disabled:o,...a,children:i}));Jt.displayName="Button";const Tj=C.createContext(null),wl=()=>{const e=C.useContext(Tj);if(!e)throw new Error("Input components must be used within Input.Root");return e},La={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"}},xo={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"}},AH=()=>ye("flex flex-col relative"),DH=({size:e,color:t,isDisabled:r,isReadOnly:n,hasMessage:i,hasArea:o,isInvalid:a})=>{const s=xo[a?"negative":t];return ye("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,La[e].group,{"ring-1":i,"opacity-60":r,"items-center":!o})},jH=({size:e,color:t})=>ye("bg-transparent ring-0 w-full","focus:outline-hidden",[La[e].input],xo[t].placeholder),LO=({size:e,color:t})=>ye("bg-transparent ring-0 w-full h-fit resize-none py-0.5","focus:outline-hidden",La[e].input,xo[t].placeholder),qH=({size:e,color:t,isDisabled:r,isAction:n})=>{const i=xo[t];return ye("transition-colors duration-200 rounded max-h-full h-fit",La[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})},zH=({size:e,color:t,isDisabled:r,usePortal:n=!1,portalPlacement:i="bottom"})=>ye("flex items-start gap-x-2 ring-1",n?i==="top"?"rounded-t ring-b-0":"rounded-b ring-t-0":["absolute left-0 right-0 z-10","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":xo[t].messageText,xo[t].borderMessage,xo[t].messageBackground,La[e].message,{"opacity-60":r}),LH=({size:e})=>ye(La[e].icon);function Mu(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var BH=typeof global=="object"&&global&&global.Object===Object&&global,FH=typeof self=="object"&&self&&self.Object===Object&&self,Pj=BH||FH||Function("return this")(),Th=function(){return Pj.Date.now()},$H=/\s/;function VH(e){for(var t=e.length;t--&&$H.test(e.charAt(t)););return t}var HH=/^\s+/;function WH(e){return e&&e.slice(0,VH(e)+1).replace(HH,"")}var ku=Pj.Symbol,Mj=Object.prototype,UH=Mj.hasOwnProperty,GH=Mj.toString,ws=ku?ku.toStringTag:void 0;function KH(e){var t=UH.call(e,ws),r=e[ws];try{e[ws]=void 0;var n=!0}catch{}var i=GH.call(e);return n&&(t?e[ws]=r:delete e[ws]),i}var YH=Object.prototype,XH=YH.toString;function ZH(e){return XH.call(e)}var JH="[object Null]",QH="[object Undefined]",BO=ku?ku.toStringTag:void 0;function eW(e){return e==null?e===void 0?QH:JH:BO&&BO in Object(e)?KH(e):ZH(e)}function tW(e){return e!=null&&typeof e=="object"}var rW="[object Symbol]";function nW(e){return typeof e=="symbol"||tW(e)&&eW(e)==rW}var FO=NaN,iW=/^[-+]0x[0-9a-f]+$/i,oW=/^0b[01]+$/i,aW=/^0o[0-7]+$/i,sW=parseInt;function $O(e){if(typeof e=="number")return e;if(nW(e))return FO;if(Mu(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Mu(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=WH(e);var r=oW.test(e);return r||aW.test(e)?sW(e.slice(2),r?2:8):iW.test(e)?FO:+e}var lW="Expected a function",cW=Math.max,uW=Math.min;function fu(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(lW);t=$O(t)||0,Mu(r)&&(d=!!r.leading,h="maxWait"in r,o=h?cW($O(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 y(I){return u=I,s=setTimeout(w,t),d?v(I):a}function m(I){var N=I-c,T=I-u,M=t-N;return h?uW(M,o-T):M}function g(I){var N=I-c,T=I-u;return c===void 0||N>=t||N<0||h&&T>=o}function w(){var I=Th();if(g(I))return x(I);s=setTimeout(w,m(I))}function x(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:x(Th())}function E(){var I=Th(),N=g(I);if(n=arguments,i=this,c=I,N){if(s===void 0)return y(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 dW="Expected a function";function fW(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(dW);return Mu(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),fu(e,t,{leading:n,maxWait:t,trailing:i})}var ba=function(){return ba=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},ba.apply(this,arguments)};function kj(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Aj(e){return!e||!e.ownerDocument?document:e.ownerDocument}var Dj=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 jj(e,t){var r;e&&(r=e.classList).add.apply(r,t.split(" "))}function qj(e,t){e&&t.split(" ").forEach(function(r){e.classList.remove(r)})}function zj(e){return".".concat(e.split(" ").join("."))}var i1=!!(typeof window<"u"&&window.document&&window.document.createElement),hW=Object.freeze({__proto__:null,addClasses:jj,canUseDOM:i1,classNamesToQuery:zj,getElementDocument:Aj,getElementWindow:kj,getOptions:Dj,removeClasses:qj}),va=null,VO=null;i1&&window.addEventListener("resize",function(){VO!==window.devicePixelRatio&&(VO=window.devicePixelRatio,va=null)});function HO(){if(va===null){if(typeof document>"u")return va=0,va;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),va=r}return va}var Bi=kj,Ph=Aj,pW=Dj,Fi=jj,$i=qj,qr=zj,Ss=(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=Bi(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,Fi(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(){$i(n.el,n.classNames.scrolling),n.options.autoHide&&(n.hideScrollbar("x"),n.hideScrollbar("y")),n.isScrolling=!1},this.onMouseEnter=function(){n.isMouseEntering||(Fi(n.el,n.classNames.mouseEntered),n.showScrollbar("x"),n.showScrollbar("y"),n.isMouseEntering=!0),n.onMouseEntered()},this._onMouseEntered=function(){$i(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,y,m;if(!(!n.draggedAxis||!n.contentWrapperEl)){var g,w=n.axis[n.draggedAxis].track,x=(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"?g=i.pageY:g=i.pageX;var I=g-((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?((y=(v=w.rect)===null||v===void 0?void 0:v[n.axis[n.draggedAxis].sizeAttr])!==null&&y!==void 0?y:0)-_.size-I:I;var N=I/(x-_.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=Ph(n.el),a=Bi(n.el);i.preventDefault(),i.stopPropagation(),$i(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=ba(ba({},e.defaultOptions),r),this.classNames=ba(ba({},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=fW(this._onMouseMove,64),this.onWindowResize=fu(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=fu(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=fu(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:HO()}catch{return HO()}},e.getOffset=function(t){var r=t.getBoundingClientRect(),n=Ph(t),i=Bi(t);return{top:r.top+(i.pageYOffset||n.documentElement.scrollTop),left:r.left+(i.pageXOffset||n.documentElement.scrollLeft)}},e.prototype.init=function(){i1&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,r;this.wrapperEl=this.el.querySelector(qr(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(qr(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(qr(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(qr(this.classNames.offset)),this.maskEl=this.el.querySelector(qr(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,qr(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(qr(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(qr(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(qr(this.classNames.track)).concat(qr(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(qr(this.classNames.track)).concat(qr(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(qr(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((r=this.axis.y.track.el)===null||r===void 0?void 0:r.querySelector(qr(this.classNames.scrollbar)))||null,this.options.autoHide||(Fi(this.axis.x.scrollbar.el,this.classNames.visible),Fi(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t=this,r,n=Bi(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=Bi(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&&(Fi(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&&($i(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),Fi(r.track.el,this.classNames.hover),this.isWithinBounds(r.scrollbar.rect)?Fi(r.scrollbar.el,this.classNames.hover):$i(r.scrollbar.el,this.classNames.hover)):($i(r.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),$i(this.axis[t].track.el,this.classNames.hover),$i(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=Ph(this.el),o=Bi(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,Fi(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=Bi(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],y=r==="y"?this.mouseY-h:this.mouseX-h,m=y<0?-1:1,g=m===-1?v-p:v+p,w=40,x=function(){n.contentWrapperEl&&(m===-1?v>g&&(v-=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,u.requestAnimationFrame(x)):v<g&&(v+=w,n.contentWrapperEl[n.axis[r].scrollOffsetAttr]=v,u.requestAnimationFrame(x)))};x()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=Bi(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=pW,e.helpers=hW,e})(),nn=function(){return nn=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},nn.apply(this,arguments)};function vW(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 o1=nt.forwardRef(function(e,t){var r=e.children,n=e.scrollableNodeProps,i=n===void 0?{}:n,o=vW(e,["children","scrollableNodeProps"]),a=nt.useRef(),s=nt.useRef(),c=nt.useRef(),u={},d={};Object.keys(o).forEach(function(v){Object.prototype.hasOwnProperty.call(Ss.defaultOptions,v)?u[v]=o[v]:d[v]=o[v]});var h=nn(nn({},Ss.defaultOptions.classNames),u.classNames),p=nn(nn({},i),{className:"".concat(h.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:u.tabIndex||Ss.defaultOptions.tabIndex,role:"region","aria-label":u.ariaLabel||Ss.defaultOptions.ariaLabel});return nt.useEffect(function(){var v;return s.current=p.ref?p.ref.current:s.current,a.current&&(v=new Ss(a.current,nn(nn(nn({},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)}},[]),nt.createElement("div",nn({"data-simplebar":"init",ref:a},d),nt.createElement("div",{className:h.wrapper},nt.createElement("div",{className:h.heightAutoObserverWrapperEl},nt.createElement("div",{className:h.heightAutoObserverEl})),nt.createElement("div",{className:h.mask},nt.createElement("div",{className:h.offset},typeof r=="function"?r({scrollableNodeRef:s,scrollableNodeProps:nn(nn({},p),{ref:s}),contentNodeRef:c,contentNodeProps:{className:h.contentEl,ref:c}}):nt.createElement("div",nn({},p),nt.createElement("div",{className:h.contentEl},r)))),nt.createElement("div",{className:h.placeholder})),nt.createElement("div",{className:"".concat(h.track," ").concat(h.horizontal)},nt.createElement("div",{className:h.scrollbar})),nt.createElement("div",{className:"".concat(h.track," ").concat(h.vertical)},nt.createElement("div",{className:h.scrollbar})))});o1.displayName="SimpleBar";const Lj=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(Tj.Provider,{value:v,children:O.jsx("div",{ref:c,"data-qui":"Input",className:ye(AH(),o),...s,children:a})})}),Bj=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}=wl();return O.jsx("div",{ref:n,"data-qui":"InputGroup",className:ye(DH({size:i,color:o,isDisabled:a,isReadOnly:s,hasMessage:c,hasArea:u,isInvalid:d}),e),...r,children:t})}),Fj=C.forwardRef(({className:e,...t},r)=>{const{size:n,color:i,isInvalid:o,isDisabled:a,isReadOnly:s}=wl(),{isDisabled:c,isReadOnly:u,...d}=t;return O.jsx("input",{...d,ref:r,disabled:a||c,readOnly:u||s||!1,"aria-invalid":o,className:ye(jH({size:n,color:i}),e)})}),gW=C.forwardRef(({className:e,wrapperClassName:t,autoHeight:r,...n},i)=>{const{size:o,color:a,isInvalid:s,isDisabled:c,isReadOnly:u,setHasArea:d}=wl(),h=C.useRef(null),p=i||h,v=C.useRef(null);C.useEffect(()=>(d(!0),()=>{d(!1)}),[d]);const y=C.useCallback(()=>{if(h.current){const E=h.current;E.style.height="auto",E.style.height=`${E.scrollHeight}px`}},[]),{isDisabled:m,isReadOnly:g,onInput:w,...x}=n,_=E=>{y(),w==null||w(E)};C.useEffect(()=>{y()},[y,n.value]),C.useEffect(()=>{r&&v.current&&v.current.style.removeProperty("height")},[r]);const S=E=>{E.preventDefault();const I=v.current;if(!I)return;const N=E.clientY,T=I.offsetHeight,M=j=>{const W=T+(j.clientY-N);W>30&&(I.style.height=W+"px")},z=()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",z)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",z)};return O.jsxs("div",{ref:v,className:ye("w-full relative",!r&&!n.rows&&"h-30",t),children:[r?O.jsx("textarea",{...x,ref:p,rows:1,className:ye(LO({size:o,color:a}),e),disabled:c||m,onInput:_,readOnly:g||u||!1,"aria-invalid":s,style:{overflow:"hidden"}}):O.jsx(o1,{style:{height:"100%"},children:O.jsx("textarea",{...x,ref:p,rows:1,className:ye(LO({size:o,color:a}),e),disabled:c||m,onInput:_,readOnly:g||u||!1,"aria-invalid":s,style:{height:"auto",overflow:"hidden",width:"100%"}})}),!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:S,children:O.jsx(SV,{})})]})}),$j=C.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:u}=wl(),d=r||u,h=qH({size:s,color:c,isDisabled:d,isAction:e});return O.jsx("div",{ref:a,"data-qui":"InputIcon",className:ye(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})}),Vj=C.forwardRef(({icon:e,usePortal:t=!1,className:r,children:n,...i},o)=>{const{size:a,color:s,setHasMessage:c,isDisabled:u}=wl(),d=C.useRef(null),h=C.useRef("bottom"),[p,v]=C.useState(null);C.useEffect(()=>(c(!0),()=>c(!1)),[c]),C.useEffect(()=>{if(!t||!d.current)return;const g=d.current,w=g.closest('[data-qui="Input"]'),x=w==null?void 0:w.querySelector('[data-qui="InputGroup"]'),_=x||w;if(!_)return;const S=!!(x&&g.compareDocumentPosition(x)&Node.DOCUMENT_POSITION_FOLLOWING);h.current=S?"top":"bottom";const E=()=>{const N=_.getBoundingClientRect();v({top:S?N.top:N.bottom,left:N.left,width:N.width})};E();const I=new ResizeObserver(E);return I.observe(_),window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{I.disconnect(),window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[t]);const y=h.current,m=O.jsxs("div",{ref:o,"data-qui":"InputMessage",role:"alert",className:ye(zH({size:a,color:s,isDisabled:u,usePortal:t,portalPlacement:y}),r),...i,children:[e!==void 0&&O.jsx("div",{className:ye(LH({size:a})),children:e}),O.jsx("p",{children:n})]});return t?O.jsxs(O.Fragment,{children:[O.jsx("span",{ref:d,style:{display:"none"}}),p&&xn.createPortal(O.jsx("div",{"data-qui":"InputMessagePortal",style:{position:"fixed",top:y==="top"?void 0:p.top,bottom:y==="top"?`calc(100vh - ${p.top}px)`:void 0,left:p.left,width:p.width,zIndex:50},children:m}),document.body)]}):m});Lj.displayName="InputRoot";Bj.displayName="InputGroup";Fj.displayName="InputField";gW.displayName="InputArea";$j.displayName="InputIcon";Vj.displayName="InputMessage";const wt={Root:Lj,Group:Bj,Field:Fj,Icon:$j,Message:Vj},al={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"}},mW=({color:e})=>ye("min-h-6 absolute py-0.5 px-1 rounded whitespace-nowrap flex items-center gap-1",al[e].container,al[e].icon),bW=({color:e})=>ye("text-xs font-medium leading-3",al[e].text),yW=({color:e})=>ye("p-0.5 rounded cursor-pointer",al[e].button,al[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,usePortal:h=!1})=>{const[p,v]=C.useState(!1),[y,m]=C.useState(!1),[g,w]=C.useState({position:r,transform:""}),x=C.useRef(null),_=C.useRef(null),S=C.useRef(null),E=h||u!=null,I=p&&!d;C.useEffect(()=>{I||m(!1)},[I]);const N=C.useCallback(()=>{if(!x.current||!_.current)return;const P=x.current.getBoundingClientRect(),B=_.current.getBoundingClientRect(),X=window.innerWidth,Q=window.innerHeight,D=window.scrollX,$=window.scrollY,H=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth,X),q=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,Q),Y=4;let ie=r,ne={position:ie,transform:""};const pe=he=>{const{top:ue,left:de,width:le,height:xe}=P,Ee=E?ue+$:0,Ie=E?de+D:0;switch(he){case"up":return{top:`${Ee-B.height-Y}px`,left:`${Ie+le/2}px`,transform:"translateX(-50%)"};case"up-start":return{top:`${Ee-B.height-Y}px`,left:`${Ie}px`,transform:"translateX(0)"};case"up-end":return{top:`${Ee-B.height-Y}px`,left:`${Ie+le-B.width}px`,transform:"translateX(0)"};case"down":return{top:`${Ee+xe+Y}px`,left:`${Ie+le/2}px`,transform:"translateX(-50%)"};case"down-start":return{top:`${Ee+xe+Y}px`,left:`${Ie}px`,transform:"translateX(0)"};case"down-end":return{top:`${Ee+xe+Y}px`,left:`${Ie+le-B.width}px`,transform:"translateX(0)"};case"left":return{top:`${Ee+xe/2}px`,left:`${Ie-B.width-Y}px`,transform:"translateY(-50%)"};case"left-start":return{top:`${Ee}px`,left:`${Ie-B.width-Y}px`,transform:"translateY(0)"};case"left-end":return{top:`${Ee+xe-B.height}px`,left:`${Ie-B.width-Y}px`,transform:"translateY(0)"};case"right":return{top:`${Ee+xe/2}px`,left:`${Ie+le+Y}px`,transform:"translateY(-50%)"};case"right-start":return{top:`${Ee}px`,left:`${Ie+le+Y}px`,transform:"translateY(0)"};case"right-end":return{top:`${Ee+xe-B.height}px`,left:`${Ie+le+Y}px`,transform:"translateY(0)"};default:return{}}},Z={up:{fits:P.top-B.height-Y>=0},"up-start":{fits:P.top-B.height-Y>=0&&P.left+B.width<=X},"up-end":{fits:P.top-B.height-Y>=0&&P.right-B.width>=0},down:{fits:P.bottom+B.height+Y<=Q&&P.bottom+B.height+Y<=q},"down-start":{fits:P.bottom+B.height+Y<=Q&&P.bottom+B.height+Y<=q&&P.left+B.width<=X},"down-end":{fits:P.bottom+B.height+Y<=Q&&P.bottom+B.height+Y<=q&&P.right-B.width>=0},left:{fits:P.left-B.width-Y>=0},"left-start":{fits:P.left-B.width-Y>=0&&P.top+B.height<=Q},"left-end":{fits:P.left-B.width-Y>=0&&P.bottom-B.height>=0},right:{fits:P.right+B.width+Y<=X&&P.right+B.width+Y<=H},"right-start":{fits:P.right+B.width+Y<=X&&P.right+B.width+Y<=H&&P.top+B.height<=Q},"right-end":{fits:P.right+B.width+Y<=X&&P.right+B.width+Y<=H&&P.bottom-B.height>=0}},J=P.left+P.width/2-B.width/2,ae=P.left+P.width/2+B.width/2;if((r==="up"||r==="down")&&(J<0||ae>X)&&(Z[r].fits=!1),Z[r].fits){const he=pe(r);ne={position:r,...he,transform:he.transform||""}}else{const he=["up","up-start","up-end","down","down-start","down-end","right","right-start","right-end","left","left-start","left-end"].find(ue=>Z[ue].fits);if(he){ie=he;const ue=pe(he);ne={position:ie,...ue,transform:ue.transform||""}}else{const ue={up:P.top,"up-start":P.top,"up-end":P.top,down:Math.min(Q-P.bottom,q-P.bottom),"down-start":Math.min(Q-P.bottom,q-P.bottom),"down-end":Math.min(Q-P.bottom,q-P.bottom),left:P.left,"left-start":P.left,"left-end":P.left,right:Math.min(X-P.right,H-P.right),"right-start":Math.min(X-P.right,H-P.right),"right-end":Math.min(X-P.right,H-P.right)},de=Object.entries(ue).reduce((xe,[Ee,Ie])=>Ie>xe.space?{position:Ee,space:Ie}:xe,{position:"up",space:0}).position;ie=de;const le=pe(de);ne={position:ie,...le,transform:le.transform||""}}}w(ne)},[r,E]),T=()=>{S.current&&(clearTimeout(S.current),S.current=null)},M=()=>{T(),v(!1)},z=()=>{T(),a===0?v(!1):S.current=setTimeout(()=>v(!1),a)},j=()=>{s==="click"&&(v(!0),T(),S.current=setTimeout(()=>{y||v(!1)},a))},W=P=>{P.stopPropagation(),M()},U=()=>{m(!0),T()},A=()=>{m(!1),p&&z()},K=()=>{s==="hover"&&(T(),v(!0))},V=()=>{s==="hover"&&z()};C.useEffect(()=>{if(!p||d||!x.current)return;const P=x.current;let B=!1,X=!1;const Q=new IntersectionObserver(([D])=>{if(!B){X=D.isIntersecting,B=!0;return}X&&!D.isIntersecting&&M(),X=D.isIntersecting},{threshold:0});return Q.observe(P),()=>Q.disconnect()},[p,d]),C.useEffect(()=>{if(p){const P=requestAnimationFrame(()=>N());return()=>cancelAnimationFrame(P)}},[p,e,N]),C.useEffect(()=>{if(p){const P=setTimeout(()=>N(),0);return()=>clearTimeout(P)}},[p,N]),C.useEffect(()=>{const P=()=>{p&&N()},B=()=>{p&&N()};return window.addEventListener("resize",P),window.addEventListener("scroll",B,!0),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",B,!0),T()}},[p,N]);const te=u||(typeof document<"u"?document.body:null),G=p&&!d&&!!e,re=O.jsxs("div",{ref:_,role:"tooltip",className:mW({color:t}),style:{position:"absolute",left:g.left??0,top:g.top??0,transform:g.transform,zIndex:1e3,opacity:g.left?1:0,pointerEvents:n?"auto":"none"},onMouseEnter:n?U:void 0,onMouseLeave:n?A:void 0,children:[i&&O.jsx("span",{"data-testid":"tooltip-icon",children:i}),O.jsx("div",{className:bW({color:t}),children:e}),n&&O.jsx("div",{onClick:W,className:yW({color:t}),role:"button",children:O.jsx(fd,{})})]});return O.jsxs(O.Fragment,{children:[O.jsxs("div",{"data-qui":"Tooltip",ref:x,onClick:j,onMouseEnter:K,onMouseLeave:V,className:ye("relative inline-flex items-center",c),children:[o,G&&!E&&re]}),G&&E&&te&&xn.createPortal(re,te)]})};function xW(){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 pd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ba(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function a1(e){return"nodeType"in e}function Rr(e){var t,r;return e?Ba(e)?e:a1(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function s1(e){const{Document:t}=Rr(e);return e instanceof t}function Sl(e){return Ba(e)?!1:e instanceof Rr(e).HTMLElement}function Hj(e){return e instanceof Rr(e).SVGElement}function Fa(e){return e?Ba(e)?e.document:a1(e)?s1(e)?e:Sl(e)||Hj(e)?e.ownerDocument:document:document:document}const Bn=pd?C.useLayoutEffect:C.useEffect;function vd(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 wW(){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 sl(e,t){t===void 0&&(t=[e]);const r=C.useRef(e);return Bn(()=>{r.current!==e&&(r.current=e)},t),r}function El(e,t){const r=C.useRef();return C.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function Au(e){const t=vd(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 Du(e){const t=C.useRef();return C.useEffect(()=>{t.current=e},[e]),t.current}let Mh={};function _l(e,t){return C.useMemo(()=>{if(t)return t;const r=Mh[e]==null?0:Mh[e]+1;return Mh[e]=r,e+"-"+r},[e,t])}function Wj(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 wa=Wj(1),ju=Wj(-1);function SW(e){return"clientX"in e&&"clientY"in e}function gd(e){if(!e)return!1;const{KeyboardEvent:t}=Rr(e.target);return t&&e instanceof t}function EW(e){if(!e)return!1;const{TouchEvent:t}=Rr(e.target);return t&&e instanceof t}function qu(e){if(EW(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 SW(e)?{x:e.clientX,y:e.clientY}:null}const Xi=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Xi.Translate.toString(e),Xi.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),WO="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function _W(e){return e.matches(WO)?e:e.querySelector(WO)}const OW={display:"none"};function CW(e){let{id:t,value:r}=e;return C.createElement("div",{id:t,style:OW},r)}function IW(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 RW(){const[e,t]=C.useState("");return{announce:C.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Uj=C.createContext(null);function NW(e){const t=C.useContext(Uj);C.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function TW(){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
+ `},MW={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 kW(e){let{announcements:t=MW,container:r,hiddenTextDescribedById:n,screenReaderInstructions:i=PW}=e;const{announce:o,announcement:a}=RW(),s=_l("DndLiveRegion"),[c,u]=C.useState(!1);if(C.useEffect(()=>{u(!0)},[]),NW(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(IW,{id:s,announcement:a}));return r?xn.createPortal(d,r):d}var Zt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Zt||(Zt={}));function zu(){}function AW(e,t){return C.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function DW(){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 jW(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function qW(e,t){const r=qu(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 zW(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function LW(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function BW(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function UO(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 FW=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const i=UO(t,t.left,t.top),o=[];for(const a of n){const{id:s}=a,c=r.get(s);if(c){const u=jW(UO(c),i);o.push({id:s,data:{droppableContainer:a,value:u}})}}return o.sort(zW)};function $W(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 VW=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=$W(s,t);c>0&&i.push({id:a,data:{droppableContainer:o,value:c}})}}return i.sort(LW)};function HW(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function Gj(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Fn}function WW(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 UW=WW(1);function Kj(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 GW(e,t,r){const n=Kj(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 KW={ignoreTransform:!1};function $a(e,t){t===void 0&&(t=KW);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:d}=Rr(e).getComputedStyle(e);u&&(r=GW(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 GO(e){return $a(e,{ignoreTransform:!0})}function YW(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function XW(e,t){return t===void 0&&(t=Rr(e).getComputedStyle(e)),t.position==="fixed"}function ZW(e,t){t===void 0&&(t=Rr(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 l1(e,t){const r=[];function n(i){if(t!=null&&r.length>=t||!i)return r;if(s1(i)&&i.scrollingElement!=null&&!r.includes(i.scrollingElement))return r.push(i.scrollingElement),r;if(!Sl(i)||Hj(i)||r.includes(i))return r;const o=Rr(e).getComputedStyle(i);return i!==e&&ZW(i,o)&&r.push(i),XW(i,o)?r:n(i.parentNode)}return e?n(e):r}function Yj(e){const[t]=l1(e,1);return t??null}function kh(e){return!pd||!e?null:Ba(e)?e:a1(e)?s1(e)||e===Fa(e).scrollingElement?window:Sl(e)?e:null:null}function Xj(e){return Ba(e)?e.scrollX:e.scrollLeft}function Zj(e){return Ba(e)?e.scrollY:e.scrollTop}function _w(e){return{x:Xj(e),y:Zj(e)}}var nr;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(nr||(nr={}));function Jj(e){return!pd||!e?!1:e===document.scrollingElement}function Qj(e){const t={x:0,y:0},r=Jj(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 JW={x:.2,y:.2};function QW(e,t,r,n,i){let{top:o,left:a,right:s,bottom:c}=r;n===void 0&&(n=10),i===void 0&&(i=JW);const{isTop:u,isBottom:d,isLeft:h,isRight:p}=Qj(e),v={x:0,y:0},y={x:0,y:0},m={height:t.height*i.y,width:t.width*i.x};return!u&&o<=t.top+m.height?(v.y=nr.Backward,y.y=n*Math.abs((t.top+m.height-o)/m.height)):!d&&c>=t.bottom-m.height&&(v.y=nr.Forward,y.y=n*Math.abs((t.bottom-m.height-c)/m.height)),!p&&s>=t.right-m.width?(v.x=nr.Forward,y.x=n*Math.abs((t.right-m.width-s)/m.width)):!h&&a<=t.left+m.width&&(v.x=nr.Backward,y.x=n*Math.abs((t.left+m.width-a)/m.width)),{direction:v,speed:y}}function eU(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 e3(e){return e.reduce((t,r)=>wa(t,_w(r)),Fn)}function tU(e){return e.reduce((t,r)=>t+Xj(r),0)}function rU(e){return e.reduce((t,r)=>t+Zj(r),0)}function t3(e,t){if(t===void 0&&(t=$a),!e)return;const{top:r,left:n,bottom:i,right:o}=t(e);Yj(e)&&(i<=0||o<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const nU=[["x",["left","right"],tU],["y",["top","bottom"],rU]];class c1{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=l1(r),i=e3(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,a,s]of nU)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 iU(e){const{EventTarget:t}=Rr(e);return e instanceof t?e:Fa(e)}function Ah(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var yn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(yn||(yn={}));function KO(e){e.preventDefault()}function oU(e){e.stopPropagation()}var at;(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"})(at||(at={}));const r3={start:[at.Space,at.Enter],cancel:[at.Esc],end:[at.Space,at.Enter,at.Tab]},aU=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case at.Right:return{...r,x:r.x+25};case at.Left:return{...r,x:r.x-25};case at.Down:return{...r,y:r.y+25};case at.Up:return{...r,y:r.y-25}}};class n3{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(Fa(r)),this.windowListeners=new Zs(Rr(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(yn.Resize,this.handleCancel),this.windowListeners.add(yn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(yn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&t3(n),r(Fn)}handleKeyDown(t){if(gd(t)){const{active:r,context:n,options:i}=this.props,{keyboardCodes:o=r3,coordinateGetter:a=aU,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=ju(h,d),v={x:0,y:0},{scrollableAncestors:y}=n.current;for(const m of y){const g=t.code,{isTop:w,isRight:x,isLeft:_,isBottom:S,maxScroll:E,minScroll:I}=Qj(m),N=eU(m),T={x:Math.min(g===at.Right?N.right-N.width/2:N.right,Math.max(g===at.Right?N.left:N.left+N.width/2,h.x)),y:Math.min(g===at.Down?N.bottom-N.height/2:N.bottom,Math.max(g===at.Down?N.top:N.top+N.height/2,h.y))},M=g===at.Right&&!x||g===at.Left&&!_,z=g===at.Down&&!S||g===at.Up&&!w;if(M&&T.x!==h.x){const j=m.scrollLeft+p.x,W=g===at.Right&&j<=E.x||g===at.Left&&j>=I.x;if(W&&!p.y){m.scrollTo({left:j,behavior:s});return}W?v.x=m.scrollLeft-j:v.x=g===at.Right?m.scrollLeft-E.x:m.scrollLeft-I.x,v.x&&m.scrollBy({left:-v.x,behavior:s});break}else if(z&&T.y!==h.y){const j=m.scrollTop+p.y,W=g===at.Down&&j<=E.y||g===at.Up&&j>=I.y;if(W&&!p.x){m.scrollTo({top:j,behavior:s});return}W?v.y=m.scrollTop-j:v.y=g===at.Down?m.scrollTop-E.y:m.scrollTop-I.y,v.y&&m.scrollBy({top:-v.y,behavior:s});break}}this.handleMove(t,wa(ju(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()}}n3.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=r3,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 YO(e){return!!(e&&"distance"in e)}function XO(e){return!!(e&&"delay"in e)}class u1{constructor(t,r,n){var i;n===void 0&&(n=iU(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=Fa(a),this.documentListeners=new Zs(this.document),this.listeners=new Zs(n),this.windowListeners=new Zs(Rr(a)),this.initialCoordinates=(i=qu(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(yn.Resize,this.handleCancel),this.windowListeners.add(yn.DragStart,KO),this.windowListeners.add(yn.VisibilityChange,this.handleCancel),this.windowListeners.add(yn.ContextMenu,KO),this.documentListeners.add(yn.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(XO(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(YO(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:i}=this.props;i(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(yn.Click,oU,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(yn.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:i,props:o}=this,{onMove:a,options:{activationConstraint:s}}=o;if(!i)return;const c=(r=qu(t))!=null?r:Fn,u=ju(i,c);if(!n&&s){if(YO(s)){if(s.tolerance!=null&&Ah(u,s.tolerance))return this.handleCancel();if(Ah(u,s.distance))return this.handleStart()}if(XO(s)&&Ah(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===at.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const sU={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class d1 extends u1{constructor(t){const{event:r}=t,n=Fa(r.target);super(t,sU,n)}}d1.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 lU={move:{name:"mousemove"},end:{name:"mouseup"}};var Ow;(function(e){e[e.RightClick=2]="RightClick"})(Ow||(Ow={}));class cU extends u1{constructor(t){super(t,lU,Fa(t.event.target))}}cU.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===Ow.RightClick?!1:(n==null||n({event:r}),!0)}}];const Dh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class uU extends u1{constructor(t){super(t,Dh)}static setup(){return window.addEventListener(Dh.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Dh.move.name,t)};function t(){}}}uU.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 Js;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Js||(Js={}));var Lu;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Lu||(Lu={}));function dU(e){let{acceleration:t,activator:r=Js.Pointer,canScroll:n,draggingRect:i,enabled:o,interval:a=5,order:s=Lu.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:d,delta:h,threshold:p}=e;const v=hU({delta:h,disabled:!o}),[y,m]=wW(),g=C.useRef({x:0,y:0}),w=C.useRef({x:0,y:0}),x=C.useMemo(()=>{switch(r){case Js.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Js.DraggableRect:return i}},[r,i,c]),_=C.useRef(null),S=C.useCallback(()=>{const I=_.current;if(!I)return;const N=g.current.x*w.current.x,T=g.current.y*w.current.y;I.scrollBy(N,T)},[]),E=C.useMemo(()=>s===Lu.TreeOrder?[...u].reverse():u,[s,u]);C.useEffect(()=>{if(!o||!u.length||!x){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:M,speed:z}=QW(I,T,x,t,p);for(const j of["x","y"])v[j][M[j]]||(z[j]=0,M[j]=0);if(z.x>0||z.y>0){m(),_.current=I,y(S,a),g.current=z,w.current=M;return}}g.current={x:0,y:0},w.current={x:0,y:0},m()},[t,S,n,m,o,a,JSON.stringify(x),JSON.stringify(v),y,u,E,d,JSON.stringify(p)])}const fU={x:{[nr.Backward]:!1,[nr.Forward]:!1},y:{[nr.Backward]:!1,[nr.Forward]:!1}};function hU(e){let{delta:t,disabled:r}=e;const n=Du(t);return El(i=>{if(r||!n||!i)return fU;const o={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[nr.Backward]:i.x[nr.Backward]||o.x===-1,[nr.Forward]:i.x[nr.Forward]||o.x===1},y:{[nr.Backward]:i.y[nr.Backward]||o.y===-1,[nr.Forward]:i.y[nr.Forward]||o.y===1}}},[r,t,n])}function pU(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return El(i=>{var o;return t==null?null:(o=n??i)!=null?o:null},[n,t])}function vU(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 ll;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ll||(ll={}));var Cw;(function(e){e.Optimized="optimized"})(Cw||(Cw={}));const ZO=new Map;function gU(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=g(),p=sl(h),v=C.useCallback(function(w){w===void 0&&(w=[]),!p.current&&a(x=>x===null?w:x.concat(w.filter(_=>!x.includes(_))))},[p]),y=C.useRef(null),m=El(w=>{if(h&&!r)return ZO;if(!w||w===ZO||d.current!==e||o!=null){const x=new Map;for(let _ of e){if(!_)continue;if(o&&o.length>0&&!o.includes(_.id)&&_.rect.current){x.set(_.id,_.rect.current);continue}const S=_.node.current,E=S?new c1(c(S),S):null;_.rect.current=E,E&&x.set(_.id,E)}return x}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"||y.current!==null||(y.current=setTimeout(()=>{v(),y.current=null},s))},[s,h,v,...n]),{droppableRects:m,measureDroppableContainers:v,measuringScheduled:o!=null};function g(){switch(u){case ll.Always:return!1;case ll.BeforeDragging:return r;default:return!r}}}function f1(e,t){return El(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function mU(e,t){return f1(e,t)}function bU(e){let{callback:t,disabled:r}=e;const n=vd(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 md(e){let{callback:t,disabled:r}=e;const n=vd(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 yU(e){return new c1($a(e),e)}function JO(e,t,r){t===void 0&&(t=yU);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=bU({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=md({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 xU(e){const t=f1(e);return Gj(e,t)}const QO=[];function wU(e){const t=C.useRef(e),r=El(n=>e?n&&n!==QO&&e&&t.current&&e.parentNode===t.current.parentNode?n:l1(e):QO,[e]);return C.useEffect(()=>{t.current=e},[e]),r}function SU(e){const[t,r]=C.useState(null),n=C.useRef(e),i=C.useCallback(o=>{const a=kh(o.target);a&&r(s=>s?(s.set(a,_w(a)),new Map(s)):null)},[]);return C.useEffect(()=>{const o=n.current;if(e!==o){a(o);const s=e.map(c=>{const u=kh(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,_w(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=kh(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),C.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,a)=>wa(o,a),Fn):e3(e):Fn,[e,t])}function eC(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?ju(e,r.current):Fn}function EU(e){C.useEffect(()=>{if(!pd)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 _U(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 i3(e){return C.useMemo(()=>e?YW(e):null,[e])}const tC=[];function OU(e,t){t===void 0&&(t=$a);const[r]=e,n=i3(r?Rr(r):null),[i,o]=C.useState(tC);function a(){o(()=>e.length?e.map(c=>Jj(c)?n:new c1(t(c),c)):tC)}const s=md({callback:a});return Bn(()=>{s==null||s.disconnect(),a(),e.forEach(c=>s==null?void 0:s.observe(c))},[e]),i}function o3(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Sl(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(Sl(d)){n(h=>{const p=t(d);return h?{...h,width:p.width,height:p.height}:p});break}},[t]),o=md({callback:i}),a=C.useCallback(u=>{const d=o3(u);o==null||o.disconnect(),d&&(o==null||o.observe(d)),n(d?t(d):null)},[t,o]),[s,c]=Au(a);return C.useMemo(()=>({nodeRef:s,rect:r,setRef:c}),[r,s,c])}const IU=[{sensor:d1,options:{}},{sensor:n3,options:{}}],RU={current:{}},hu={draggable:{measure:GO},droppable:{measure:GO,strategy:ll.WhileDragging,frequency:Cw.Optimized},dragOverlay:{measure:$a}};class Qs 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 NU={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Qs,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:zu},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:hu,measureDroppableContainers:zu,windowRect:null,measuringScheduled:!1},a3={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:zu,draggableNodes:new Map,over:null,measureDroppableContainers:zu},Ol=C.createContext(a3),s3=C.createContext(NU);function TU(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Qs}}}function PU(e,t){switch(t.type){case Zt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Zt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Zt.DragEnd:case Zt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Zt.RegisterDroppable:{const{element:r}=t,{id:n}=r,i=new Qs(e.droppable.containers);return i.set(n,r),{...e,droppable:{...e.droppable,containers:i}}}case Zt.SetDroppableDisabled:{const{id:r,key:n,disabled:i}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const a=new Qs(e.droppable.containers);return a.set(r,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:a}}}case Zt.UnregisterDroppable:{const{id:r,key:n}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const o=new Qs(e.droppable.containers);return o.delete(r),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function MU(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:i}=C.useContext(Ol),o=Du(n),a=Du(r==null?void 0:r.id);return C.useEffect(()=>{if(!t&&!n&&o&&a!=null){if(!gd(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=_W(d);if(h){h.focus();break}}})}},[n,t,i,a,o]),null}function l3(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...n}),r):r}function kU(e){return C.useMemo(()=>({draggable:{...hu.draggable,...e==null?void 0:e.draggable},droppable:{...hu.droppable,...e==null?void 0:e.droppable},dragOverlay:{...hu.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 AU(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=Gj(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=Yj(c);h&&h.scrollBy({top:d.y,left:d.x})}},[t,a,s,n,r])}const bd=C.createContext({...Fn,scaleX:1,scaleY:1});var Ui;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ui||(Ui={}));const DU=C.memo(function(e){var t,r,n,i;let{id:o,accessibility:a,autoScroll:s=!0,children:c,sensors:u=IU,collisionDetection:d=VW,measuring:h,modifiers:p,...v}=e;const y=C.useReducer(PU,void 0,TU),[m,g]=y,[w,x]=TW(),[_,S]=C.useState(Ui.Uninitialized),E=_===Ui.Initialized,{draggable:{active:I,nodes:N,translate:T},droppable:{containers:M}}=m,z=I!=null?N.get(I):null,j=C.useRef({initial:null,translated:null}),W=C.useMemo(()=>{var zt;return I!=null?{id:I,data:(zt=z==null?void 0:z.data)!=null?zt:RU,rect:j}:null},[I,z]),U=C.useRef(null),[A,K]=C.useState(null),[V,te]=C.useState(null),G=sl(v,Object.values(v)),re=_l("DndDescribedBy",o),P=C.useMemo(()=>M.getEnabled(),[M]),B=kU(h),{droppableRects:X,measureDroppableContainers:Q,measuringScheduled:D}=gU(P,{dragging:E,dependencies:[T.x,T.y],config:B.droppable}),$=pU(N,I),H=C.useMemo(()=>V?qu(V):null,[V]),q=no(),Y=mU($,B.draggable.measure);AU({activeNode:I!=null?N.get(I):null,config:q.layoutShiftCompensation,initialRect:Y,measure:B.draggable.measure});const ie=JO($,B.draggable.measure,Y),ne=JO($?$.parentElement:null),pe=C.useRef({activatorEvent:null,active:null,activeNode:$,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Z=M.getNodeFor((t=pe.current.over)==null?void 0:t.id),J=CU({measure:B.dragOverlay.measure}),ae=(r=J.nodeRef.current)!=null?r:$,he=E?(n=J.rect)!=null?n:ie:null,ue=!!(J.nodeRef.current&&J.rect),de=xU(ue?null:ie),le=i3(ae?Rr(ae):null),xe=wU(E?Z??$:null),Ee=OU(xe),Ie=l3(p,{transform:{x:T.x-de.x,y:T.y-de.y,scaleX:1,scaleY:1},activatorEvent:V,active:W,activeNodeRect:ie,containerNodeRect:ne,draggingNodeRect:he,over:pe.current.over,overlayNodeRect:J.rect,scrollableAncestors:xe,scrollableAncestorRects:Ee,windowRect:le}),Te=H?wa(H,T):null,Me=SU(xe),Xe=eC(Me),tt=eC(Me,[ie]),Fe=wa(Ie,Xe),Le=he?UW(he,Ie):null,ze=W&&Le?d({active:W,collisionRect:Le,droppableRects:X,droppableContainers:P,pointerCoordinates:Te}):null,Ze=BW(ze,"id"),[rt,Pt]=C.useState(null),gt=ue?Ie:wa(Ie,tt),Rt=HW(gt,(i=rt==null?void 0:rt.rect)!=null?i:null,ie),qt=C.useRef(null),Ot=C.useCallback((zt,Mt)=>{let{sensor:Lt,options:fr}=Mt;if(U.current==null)return;const kt=N.get(U.current);if(!kt)return;const At=zt.nativeEvent,hr=new Lt({active:U.current,activeNode:kt,event:At,options:fr,context:pe,onAbort(Et){if(!N.get(Et))return;const{onDragAbort:Bt}=G.current,pr={id:Et};Bt==null||Bt(pr),w({type:"onDragAbort",event:pr})},onPending(Et,Bt,pr,vr){if(!N.get(Et))return;const{onDragPending:yr}=G.current,sr={id:Et,constraint:Bt,initialCoordinates:pr,offset:vr};yr==null||yr(sr),w({type:"onDragPending",event:sr})},onStart(Et){const Bt=U.current;if(Bt==null)return;const pr=N.get(Bt);if(!pr)return;const{onDragStart:vr}=G.current,yr={activatorEvent:At,active:{id:Bt,data:pr.data,rect:j}};xn.unstable_batchedUpdates(()=>{vr==null||vr(yr),S(Ui.Initializing),g({type:Zt.DragStart,initialCoordinates:Et,active:Bt}),w({type:"onDragStart",event:yr}),K(qt.current),te(At)})},onMove(Et){g({type:Zt.DragMove,coordinates:Et})},onEnd:Mr(Zt.DragEnd),onCancel:Mr(Zt.DragCancel)});qt.current=hr;function Mr(Et){return async function(){const{active:Bt,collisions:pr,over:vr,scrollAdjustedTranslate:yr}=pe.current;let sr=null;if(Bt&&yr){const{cancelDrop:Tn}=G.current;sr={activatorEvent:At,active:Bt,collisions:pr,delta:yr,over:vr},Et===Zt.DragEnd&&typeof Tn=="function"&&await Promise.resolve(Tn(sr))&&(Et=Zt.DragCancel)}U.current=null,xn.unstable_batchedUpdates(()=>{g({type:Et}),S(Ui.Uninitialized),Pt(null),K(null),te(null),qt.current=null;const Tn=Et===Zt.DragEnd?"onDragEnd":"onDragCancel";if(sr){const Un=G.current[Tn];Un==null||Un(sr),w({type:Tn,event:sr})}})}}},[N]),Gr=C.useCallback((zt,Mt)=>(Lt,fr)=>{const kt=Lt.nativeEvent,At=N.get(fr);if(U.current!==null||!At||kt.dndKit||kt.defaultPrevented)return;const hr={active:At};zt(Lt,Mt.options,hr)===!0&&(kt.dndKit={capturedBy:Mt.sensor},U.current=fr,Ot(Lt,Mt))},[N,Ot]),Kr=vU(u,Gr);EU(u),Bn(()=>{ie&&_===Ui.Initializing&&S(Ui.Initialized)},[ie,_]),C.useEffect(()=>{const{onDragMove:zt}=G.current,{active:Mt,activatorEvent:Lt,collisions:fr,over:kt}=pe.current;if(!Mt||!Lt)return;const At={active:Mt,activatorEvent:Lt,collisions:fr,delta:{x:Fe.x,y:Fe.y},over:kt};xn.unstable_batchedUpdates(()=>{zt==null||zt(At),w({type:"onDragMove",event:At})})},[Fe.x,Fe.y]),C.useEffect(()=>{const{active:zt,activatorEvent:Mt,collisions:Lt,droppableContainers:fr,scrollAdjustedTranslate:kt}=pe.current;if(!zt||U.current==null||!Mt||!kt)return;const{onDragOver:At}=G.current,hr=fr.get(Ze),Mr=hr&&hr.rect.current?{id:hr.id,rect:hr.rect.current,data:hr.data,disabled:hr.disabled}:null,Et={active:zt,activatorEvent:Mt,collisions:Lt,delta:{x:kt.x,y:kt.y},over:Mr};xn.unstable_batchedUpdates(()=>{Pt(Mr),At==null||At(Et),w({type:"onDragOver",event:Et})})},[Ze]),Bn(()=>{pe.current={activatorEvent:V,active:W,activeNode:$,collisionRect:Le,collisions:ze,droppableRects:X,draggableNodes:N,draggingNode:ae,draggingNodeRect:he,droppableContainers:M,over:rt,scrollableAncestors:xe,scrollAdjustedTranslate:Fe},j.current={initial:he,translated:Le}},[W,$,ze,Le,N,ae,he,X,M,rt,xe,Fe]),dU({...q,delta:T,draggingRect:Le,pointerCoordinates:Te,scrollableAncestors:xe,scrollableAncestorRects:Ee});const ar=C.useMemo(()=>({active:W,activeNode:$,activeNodeRect:ie,activatorEvent:V,collisions:ze,containerNodeRect:ne,dragOverlay:J,draggableNodes:N,droppableContainers:M,droppableRects:X,over:rt,measureDroppableContainers:Q,scrollableAncestors:xe,scrollableAncestorRects:Ee,measuringConfiguration:B,measuringScheduled:D,windowRect:le}),[W,$,ie,V,ze,ne,J,N,M,X,rt,Q,xe,Ee,B,D,le]),Nn=C.useMemo(()=>({activatorEvent:V,activators:Kr,active:W,activeNodeRect:ie,ariaDescribedById:{draggable:re},dispatch:g,draggableNodes:N,over:rt,measureDroppableContainers:Q}),[V,Kr,W,ie,g,re,N,rt,Q]);return C.createElement(Uj.Provider,{value:x},C.createElement(Ol.Provider,{value:Nn},C.createElement(s3.Provider,{value:ar},C.createElement(bd.Provider,{value:Rt},c)),C.createElement(MU,{disabled:(a==null?void 0:a.restoreFocus)===!1})),C.createElement(kW,{...a,hiddenTextDescribedById:re}));function no(){const zt=(A==null?void 0:A.autoScrollEnabled)===!1,Mt=typeof s=="object"?s.enabled===!1:s===!1,Lt=E&&!zt&&!Mt;return typeof s=="object"?{...s,enabled:Lt}:{enabled:Lt}}}),jU=C.createContext(null),rC="button",qU="Draggable";function zU(e){let{id:t,data:r,disabled:n=!1,attributes:i}=e;const o=_l(qU),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:d,draggableNodes:h,over:p}=C.useContext(Ol),{role:v=rC,roleDescription:y="draggable",tabIndex:m=0}=i??{},g=(c==null?void 0:c.id)===t,w=C.useContext(g?bd:jU),[x,_]=Au(),[S,E]=Au(),I=_U(a,t),N=sl(r);Bn(()=>(h.set(t,{id:t,key:o,node:x,activatorNode:S,data:N}),()=>{const M=h.get(t);M&&M.key===o&&h.delete(t)}),[h,t]);const T=C.useMemo(()=>({role:v,tabIndex:m,"aria-disabled":n,"aria-pressed":g&&v===rC?!0:void 0,"aria-roledescription":y,"aria-describedby":d.draggable}),[n,v,m,g,y,d.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:T,isDragging:g,listeners:n?void 0:I,node:x,over:p,setNodeRef:_,setActivatorNodeRef:E,transform:w}}function c3(){return C.useContext(s3)}const LU="Droppable",BU={timeout:25};function FU(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:i}=e;const o=_l(LU),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=C.useContext(Ol),d=C.useRef({disabled:r}),h=C.useRef(!1),p=C.useRef(null),v=C.useRef(null),{disabled:y,updateMeasurementsFor:m,timeout:g}={...BU,...i},w=sl(m??n),x=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},g)},[g]),_=md({callback:x,disabled:y||!a}),S=C.useCallback((T,M)=>{_&&(M&&(_.unobserve(M),h.current=!1),T&&_.observe(T))},[_]),[E,I]=Au(S),N=sl(t);return C.useEffect(()=>{!_||!E.current||(_.disconnect(),h.current=!1,_.observe(E.current))},[E,_]),C.useEffect(()=>(s({type:Zt.RegisterDroppable,element:{id:n,key:o,disabled:r,node:E,rect:p,data:N}}),()=>s({type:Zt.UnregisterDroppable,key:o,id:n})),[n]),C.useEffect(()=>{r!==d.current.disabled&&(s({type:Zt.SetDroppableDisabled,id:n,key:o,disabled:r}),d.current.disabled=r)},[n,o,r,s]),{active:a,rect:p,isOver:(c==null?void 0:c.id)===n,node:E,over:c,setNodeRef:I}}function $U(e){let{animation:t,children:r}=e;const[n,i]=C.useState(null),[o,a]=C.useState(null),s=Du(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 VU={x:0,y:0,scaleX:1,scaleY:1};function HU(e){let{children:t}=e;return C.createElement(Ol.Provider,{value:a3},C.createElement(bd.Provider,{value:VU},t))}const WU={position:"fixed",touchAction:"none"},UU=e=>gd(e)?"transform 250ms ease":void 0,GU=C.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:i,children:o,className:a,rect:s,style:c,transform:u,transition:d=UU}=e;if(!s)return null;const h=i?u:{...u,scaleX:1,scaleY:1},p={...WU,width:s.width,height:s.height,top:s.top,left:s.left,transform:Xi.Transform.toString(h),transformOrigin:i&&n?qW(n,s):void 0,transition:typeof d=="function"?d(n):d,...c};return C.createElement(r,{className:a,style:p,ref:t},o)}),KU=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)}},YU=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:Xi.Transform.toString(t)},{transform:Xi.Transform.toString(r)}]},XU={duration:250,easing:"ease",keyframes:YU,sideEffects:KU({styles:{active:{opacity:"0"}}})};function ZU(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:i}=e;return vd((o,a)=>{if(t===null)return;const s=r.get(o);if(!s)return;const c=s.node.current;if(!c)return;const u=o3(a);if(!u)return;const{transform:d}=Rr(a).getComputedStyle(a),h=Kj(d);if(!h)return;const p=typeof t=="function"?t:JU(t);return t3(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 JU(e){const{duration:t,easing:r,sideEffects:n,keyframes:i}={...XU,...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}}),[y]=v,m=v[v.length-1];if(JSON.stringify(y)===JSON.stringify(m))return;const g=n==null?void 0:n({active:a,dragOverlay:s,...u}),w=s.node.animate(v,{duration:t,easing:r,fill:"forwards"});return new Promise(x=>{w.onfinish=()=>{g==null||g(),x()}})}}let nC=0;function QU(e){return C.useMemo(()=>{if(e!=null)return nC++,nC},[e])}const eG=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:y,droppableContainers:m,dragOverlay:g,over:w,measuringConfiguration:x,scrollableAncestors:_,scrollableAncestorRects:S,windowRect:E}=c3(),I=C.useContext(bd),N=QU(h==null?void 0:h.id),T=l3(a,{activatorEvent:d,active:h,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:g.rect,over:w,overlayNodeRect:g.rect,scrollableAncestors:_,scrollableAncestorRects:S,transform:I,windowRect:E}),M=f1(p),z=ZU({config:n,draggableNodes:y,droppableContainers:m,measuringConfiguration:x}),j=M?g.setRef:void 0;return C.createElement(HU,null,C.createElement($U,{animation:z},h&&N?C.createElement(GU,{key:N,id:h.id,ref:j,as:s,activatorEvent:d,adjustScale:t,className:c,transition:o,rect:M,style:{zIndex:u,...i},transform:T},r):null))});function h1(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function tG(e,t){return e.reduce((r,n,i)=>{const o=t.get(n);return o&&(r[i]=o),r},Array(e.length))}function Dc(e){return e!==null&&e>=0}function rG(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 nG(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const jc={scaleX:1,scaleY:1},iG=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=oG(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,...jc}:null}return a>i&&a<=o?{x:-s.width-c,y:0,...jc}:a<i&&a>=o?{x:s.width+c,y:0,...jc}:{x:0,y:0,...jc}};function oG(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 u3=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const o=h1(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}},d3="Sortable",f3=C.createContext({activeIndex:-1,containerId:d3,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:u3,disabled:{draggable:!1,droppable:!1}});function aG(e){let{children:t,id:r,items:n,strategy:i=u3,disabled:o=!1}=e;const{active:a,dragOverlay:s,droppableRects:c,over:u,measureDroppableContainers:d}=c3(),h=_l(d3,r),p=s.rect!==null,v=C.useMemo(()=>n.map(I=>typeof I=="object"&&"id"in I?I.id:I),[n]),y=a!=null,m=a?v.indexOf(a.id):-1,g=u?v.indexOf(u.id):-1,w=C.useRef(v),x=!rG(v,w.current),_=g!==-1&&m===-1||x,S=nG(o);Bn(()=>{x&&y&&d(v)},[x,v,y,d]),C.useEffect(()=>{w.current=v},[v]);const E=C.useMemo(()=>({activeIndex:m,containerId:h,disabled:S,disableTransforms:_,items:v,overIndex:g,useDragOverlay:p,sortedRects:tG(v,c),strategy:i}),[m,h,S.draggable,S.droppable,_,v,g,c,p,i]);return C.createElement(f3.Provider,{value:E},t)}const sG=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return h1(r,n,i).indexOf(t)},lG=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},cG={duration:200,easing:"ease"},h3="transform",uG=Xi.Transition.toString({property:h3,duration:0,easing:"linear"}),dG={roleDescription:"sortable"};function fG(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=$a(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 hG(e){let{animateLayoutChanges:t=lG,attributes:r,disabled:n,data:i,getNewIndex:o=sG,id:a,strategy:s,resizeObserverConfig:c,transition:u=cG}=e;const{items:d,containerId:h,activeIndex:p,disabled:v,disableTransforms:y,sortedRects:m,overIndex:g,useDragOverlay:w,strategy:x}=C.useContext(f3),_=pG(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:M,setNodeRef:z}=FU({id:a,data:E,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...c}}),{active:j,activatorEvent:W,activeNodeRect:U,attributes:A,setNodeRef:K,listeners:V,isDragging:te,over:G,setActivatorNodeRef:re,transform:P}=zU({id:a,data:E,attributes:{...dG,...r},disabled:_.draggable}),B=xW(z,K),X=!!j,Q=X&&!y&&Dc(p)&&Dc(g),D=!w&&te,$=D&&Q?P:null,H=Q?$??(s??x)({rects:m,activeNodeRect:U,activeIndex:p,overIndex:g,index:S}):null,q=Dc(p)&&Dc(g)?o({id:a,items:d,activeIndex:p,overIndex:g}):S,Y=j==null?void 0:j.id,ie=C.useRef({activeId:Y,items:d,newIndex:q,containerId:h}),ne=d!==ie.current.items,pe=t({active:j,containerId:h,isDragging:te,isSorting:X,id:a,index:S,items:d,newIndex:ie.current.newIndex,previousItems:ie.current.items,previousContainerId:ie.current.containerId,transition:u,wasDragging:ie.current.activeId!=null}),Z=fG({disabled:!pe,index:S,node:T,rect:N});return C.useEffect(()=>{X&&ie.current.newIndex!==q&&(ie.current.newIndex=q),h!==ie.current.containerId&&(ie.current.containerId=h),d!==ie.current.items&&(ie.current.items=d)},[X,q,h,d]),C.useEffect(()=>{if(Y===ie.current.activeId)return;if(Y!=null&&ie.current.activeId==null){ie.current.activeId=Y;return}const ae=setTimeout(()=>{ie.current.activeId=Y},50);return()=>clearTimeout(ae)},[Y]),{active:j,activeIndex:p,attributes:A,data:E,rect:N,index:S,newIndex:q,items:d,isOver:M,isSorting:X,isDragging:te,listeners:V,node:T,overIndex:g,over:G,setNodeRef:B,setActivatorNodeRef:re,setDroppableNodeRef:z,setDraggableNodeRef:K,transform:Z??H,transition:J()};function J(){if(Z||ne&&ie.current.newIndex===S)return uG;if(!(D&&!gd(W)||!u)&&(X||pe))return Xi.Transition.toString({...u,property:h3})}}function pG(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}}at.Down,at.Right,at.Up,at.Left;const vG=e=>{let{transform:t}=e;return{...t,y:0}};function gG(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 mG=e=>{let{draggingNodeRect:t,transform:r,scrollableAncestorRects:n}=e;const i=n[0];return!t||!i?r:gG(r,t,i)},iC=({tab:e,value:t,isActive:r,onTabClick:n,dragOverlay:i=!1})=>{const o=e,a=o.onClose,s=o.renderTab,{attributes:c,listeners:u,setNodeRef:d,transform:h,transition:p,isDragging:v}=hG({id:t}),y={transform:Xi.Transform.toString(h),transition:p||"transform 200ms cubic-bezier(0.2, 0, 0, 1) 0s",opacity:v&&!i?.5:1,cursor:"pointer"},m=()=>{n(t)},g=w=>{w==null||w.stopPropagation(),a&&a(t)};return s?O.jsx("div",{ref:d,style:y,...c,...u,className:"flex h-full shrink-0 select-none focus:outline-hidden","aria-roledescription":"sortable",children:s({tab:e,isActive:r,onClick:m,onClose:a?g:void 0})}):null},p3={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"}},bG={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"}}},oC=()=>ye("inline-flex items-center rounded overflow-hidden"),v3=(e,t,r,n)=>{const i=bG[e],o=p3[t],a="relative inline-flex items-center font-medium cursor-pointer transition-all duration-200";return n?ye(a,o.padding,o.text,o.gap,"pointer-events-none cursor-not-allowed opacity-50","bg-card","text-inactive-text"):r?ye(a,o.padding,o.text,o.gap,i.active.bg,i.active.text,"shadow-xs"):ye(a,o.padding,o.text,o.gap,i.inactive.bg,i.inactive.text,i.hover.bg,i.hover.text)},g3=(e,t)=>ye("flex items-center justify-center",p3[e].icon,{"opacity-50":t}),m3=()=>ye("whitespace-nowrap"),jh=()=>ye("min-w-full flex h-8 bg-tab-bg-default pt-0.5"),b3=(e,t)=>{const r=ye("group flex items-center justify-between space-x-4","rounded-t px-2 text-xs","focus:outline-hidden");return e&&!t?ye(r,"z-2 border border-b-0 border-tab-border","bg-tab-active-bg font-semibold text-tab-active-fg"):t&&!e?ye(r,"border border-transparent bg-tab-inactive-bg text-inactive-text"):ye(r,"border border-transparent bg-tab-inactive-bg text-tab-inactive-fg","hover:text-tab-active-fg")},Iw=C.createContext(void 0),y3=C.forwardRef(({value:e,label:t,icon:r,disabled:n,children:i,className:o,onClick:a,active:s,onClose:c,closable:u,touched:d,content:h,renderTab:p,...v},y)=>{const m=C.useContext(Iw);if(!m)return null;const{activeTab:g,onTabChange:w,variant:x,color:_,size:S,showIcons:E,disabled:I}=m,N=s!==void 0?s:g===e,T=n||I,M=z=>{T||(w(e),a==null||a(z))};return x==="file"?O.jsx("div",{"data-qui":"FileTabItem",className:ye(b3(N,!1),"cursor-pointer",o),onClick:z=>!T&&M(z),children:i||O.jsx(O.Fragment,{children:O.jsxs("span",{className:"flex items-center gap-2",children:[r,O.jsx("span",{children:t})]})})}):O.jsxs("button",{ref:y,"data-qui":"TabItem",type:"button",role:"tab","aria-selected":N,"aria-disabled":T,className:ye(v3(_,S,N,T||!1),o),onClick:M,disabled:T,...v,children:[E&&r&&O.jsx("span",{className:g3(S,T||!1),children:r}),O.jsx("span",{className:m3(),children:i||t})]})});y3.displayName="TabItem";const yG=({tab:e,value:t,label:r,isActive:n,color:i="primary",size:o="md",showIcons:a,onTabClick:s})=>{const c=e,u=c.icon,d=c.disabled??!1,h=c.onClose,p=c.renderTab,v=()=>{d||s(t)},y=m=>{m==null||m.stopPropagation(),!d&&h&&h(t)};return p?O.jsx(O.Fragment,{children:p({tab:e,isActive:n,onClick:v,onClose:h?y:void 0})}):O.jsxs("button",{"data-qui":"TabItem",type:"button",role:"tab","aria-selected":n,"aria-disabled":d,className:v3(i,o,n,d),onClick:v,disabled:d,children:[a&&u&&O.jsx("span",{className:g3(o,d),children:u}),O.jsx("span",{className:m3(),children:r})]})},xG=({tab:e,value:t,isActive:r,onTabClick:n})=>{const i=e,o=i.onClose,a=i.renderTab,s=()=>{n(t)},c=u=>{u==null||u.stopPropagation(),o&&o(t)};return a?O.jsx("div",{"data-qui":"FileTabItem",className:"flex h-full shrink-0 select-none focus:outline-hidden",children:a({tab:e,isActive:r,onClick:s,onClose:o?c:void 0})}):null},wG=[],p1=({tabs:e=wG,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:y,renderTab:m,children:g})=>{const w=G=>{const re=G[t]??G.value??G.key;return re!==void 0?String(re):""},x=G=>G[r]??G.label,_=i||(e[0]?w(e[0]):""),[S,E]=C.useState(_),[I,N]=C.useState(null),[T,M]=C.useState(e),z=n!==void 0?n:S,j=T,W=DW(AW(d1,{activationConstraint:{distance:10}})),U=G=>{n===void 0&&E(G),v==null||v(G)},A=G=>j.findIndex(re=>w(re)===G),K=I?A(I):-1;C.useEffect(()=>{M(e)},[e]);const V={activeTab:z,onTabChange:U,variant:o,color:a,size:s,showIcons:u,disabled:d};if(g)return O.jsxs(Iw.Provider,{value:V,children:[O.jsx("div",{"data-qui":"Tabs",role:"tablist",className:ye(o==="file"?jh():oC(),h,p),children:g}),o==="file"&&O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]});const te=o==="file"&&c?O.jsxs("div",{className:"relative h-full w-full",children:[O.jsxs(DU,{collisionDetection:FW,modifiers:[vG,mG],sensors:W,onDragStart:({active:G})=>{G&&N(G.id)},onDragEnd:({over:G})=>{if(N(null),G){const re=A(G.id);if(K!==re&&K!==-1){const P=h1(j,K,re);M(P),y&&y(P,P[re]),U(w(P[re]))}}},onDragCancel:()=>{N(null)},children:[O.jsx(aG,{items:j.map(G=>w(G)),strategy:iG,children:O.jsx("div",{role:"tablist",className:ye(jh(),p),children:j.map(G=>{const re=w(G);return O.jsx(iC,{value:re,tab:{...G,renderTab:G.renderTab||m},isActive:z===re,onTabClick:U,className:h},re)})})}),O.jsx(eG,{children:I&&K!==-1?O.jsx(iC,{value:w(j[K]),tab:{...j[K],renderTab:j[K].renderTab||m},isActive:z===w(j[K]),onTabClick:U,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:ye(jh(),p),children:e.map(G=>{const re=w(G);return O.jsx(xG,{value:re,tab:{...G,renderTab:G.renderTab||m},isActive:z===re,onTabClick:U},re)})}),O.jsx("hr",{className:"absolute bottom-0 z-1 w-full border-tab-border"})]}):O.jsx("div",{role:"tablist",className:ye(oC(),p),children:e.map(G=>{const re=w(G);return O.jsx(yG,{value:re,label:x(G),tab:{...G,renderTab:G.renderTab||m},isActive:z===re,color:a,size:s,showIcons:u,onTabClick:U},re)})});return O.jsx(Iw.Provider,{value:V,children:O.jsx("div",{"data-qui":"Tabs",className:h,children:te})})},SG=C.forwardRef(({isActive:e=!1,isDesactive:t=!1,children:r,...n},i)=>O.jsx("div",{"data-qui":"TabNavContainer",className:b3(e,t),ref:i,...n,children:r}));SG.displayName="TabNavContainer";p1.displayName="Tabs";p1.Item=y3;const qh=p1;var Wt=function(){return Wt=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},Wt.apply(this,arguments)},aC={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},sC={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},qc={width:"20px",height:"20px",position:"absolute",zIndex:1},EG={top:Wt(Wt({},aC),{top:"-5px"}),right:Wt(Wt({},sC),{left:void 0,right:"-5px"}),bottom:Wt(Wt({},aC),{top:void 0,bottom:"-5px"}),left:Wt(Wt({},sC),{left:"-5px"}),topRight:Wt(Wt({},qc),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Wt(Wt({},qc),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Wt(Wt({},qc),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Wt(Wt({},qc),{left:"-10px",top:"-10px",cursor:"nw-resize"})},_G=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 Wt(Wt({position:"absolute",userSelect:"none"},EG[r]),i??{})},[i,r]);return O.jsx("div",{className:o||void 0,style:c,onMouseDown:a,onTouchStart:s,children:n})}),OG=(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)}})(),ei=function(){return ei=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},ei.apply(this,arguments)},CG={width:"auto",height:"auto"},zc=function(e,t,r){return Math.max(Math.min(e,r),t)},lC=function(e,t,r){var n=Math.round(e/t);return n*t+r*(n-1)},ia=function(e,t){return new RegExp(e,"i").test(t)},Lc=function(e){return!!(e.touches&&e.touches.length)},IG=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},cC=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},zh=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")},Bc=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},RG=function(e,t,r,n,i,o,a){return n=Bc(n,e.width,t,r),i=Bc(i,e.height,t,r),o=Bc(o,e.width,t,r),a=Bc(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)}},NG=function(e){return Array.isArray(e)?e:[e,e]},TG=["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"],uC="__resizable_base__",PG=(function(e){OG(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(uC):u.className+=uC,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 zh(r.state[s])},o=n&&typeof n.width<"u"&&!this.state.isResizing?zh(n.width):i("width"),a=n&&typeof n.height<"u"&&!this.state.isResizing?zh(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&&ia("left",o),s=i&&ia("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=NG(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,y=h.lockAspectRatioExtraWidth,m=d.width,g=d.height,w=v||0,x=y||0;return ia("right",u)&&(m=d.width+(r-d.x)*a/i,p&&(g=(m-x)/this.ratio+w)),ia("left",u)&&(m=d.width-(r-d.x)*a/i,p&&(g=(m-x)/this.ratio+w)),ia("bottom",u)&&(g=d.height+(n-d.y)*s/i,p&&(m=(g-w)*this.ratio+x)),ia("top",u)&&(g=d.height-(n-d.y)*s/i,p&&(m=(g-w)*this.ratio+x)),{newWidth:m,newHeight:g}},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,y=c||0,m=u||0;if(s){var g=(p-y)*this.ratio+m,w=(v-y)*this.ratio+m,x=(d-m)/this.ratio+y,_=(h-m)/this.ratio+y,S=Math.max(d,g),E=Math.min(h,w),I=Math.max(p,x),N=Math.min(v,_);r=zc(r,S,E),n=zc(n,I,N)}else r=zc(r,d,h),n=zc(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&&IG(r.nativeEvent)?(i=r.nativeEvent.clientX,o=r.nativeEvent.clientY):r.nativeEvent&&Lc(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:ei(ei({},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&&Lc(r))try{r.preventDefault(),r.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,c=i.minHeight,u=Lc(r)?r.touches[0].clientX:r.clientX,d=Lc(r)?r.touches[0].clientY:r.clientY,h=this.state,p=h.direction,v=h.original,y=h.width,m=h.height,g=this.getParentSize(),w=RG(g,this.window.innerWidth,this.window.innerHeight,o,a,s,c);o=w.maxWidth,a=w.maxHeight,s=w.minWidth,c=w.minHeight;var x=this.calculateNewSizeFromDirection(u,d),_=x.newHeight,S=x.newWidth,E=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(S=cC(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=cC(_,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=lC(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),T=lC(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),M=this.props.snapGap||0,z=M===0||Math.abs(N-S)<=M?N:S,j=M===0||Math.abs(T-_)<=M?T:_;S=z,_=j}var W={width:S-v.width,height:_-v.height};if(this.delta=W,y&&typeof y=="string"){if(y.endsWith("%")){var U=S/g.width*100;S="".concat(U,"%")}else if(y.endsWith("vw")){var A=S/this.window.innerWidth*100;S="".concat(A,"vw")}else if(y.endsWith("vh")){var K=S/this.window.innerHeight*100;S="".concat(K,"vh")}}if(m&&typeof m=="string"){if(m.endsWith("%")){var U=_/g.height*100;_="".concat(U,"%")}else if(m.endsWith("vw")){var A=_/this.window.innerWidth*100;_="".concat(A,"vw")}else if(m.endsWith("vh")){var K=_/this.window.innerHeight*100;_="".concat(K,"vh")}}var V={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(_,"height")};this.flexDir==="row"?V.flexBasis=V.width:this.flexDir==="column"&&(V.flexBasis=V.height);var te=this.state.width!==V.width,G=this.state.height!==V.height,re=this.state.flexBasis!==V.flexBasis,P=te||G||re;P&&xn.flushSync(function(){n.setState(V)}),this.props.onResize&&P&&this.props.onResize(r,p,this.resizable,W)}},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:ei(ei({},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(_G,{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 TG.indexOf(s)!==-1||(a[s]=r.props[s]),a},{}),i=ei(ei(ei({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,ei({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 MG={0:"bg-panel-0",1:"bg-panel-1",2:"bg-panel-2",3:"bg-panel-3",4:"bg-panel-4",5:"bg-panel-5"},kG={tabs:"border-tab-border",primary:"border-primary",negative:"border-input-error-border",positive:"border-positive",light:"border-panel-border-subtle",default:"border-panel-border"},x3=({depth:e=0,className:t,borderType:r,disabled:n})=>ye("transition-colors duration-200",{"text-body":!n,"text-inactive-text":n},r?kG[r]:"border-panel-border",MG[e],t),AG=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},DG=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:y,handleStyles:m={},handleClasses:g={},handleComponent:w={},style:x={},className:_,onResizeStart:S,onResize:E,onResizeStop:I,scale:N=1,bounds:T,snapGap:M,as:z="div",depth:j,disabled:W},U)=>{const A=x3({depth:j,className:_,disabled:W}),K=AG(_),V=d?{size:d}:t!==void 0||r!==void 0?{size:{width:t??"auto",height:r??"auto"}}:{},te=u?{defaultSize:u}:s!==void 0||c!==void 0?{defaultSize:{width:s??"auto",height:c??"auto"}}:{},G=C.useRef(null);return C.useImperativeHandle(U,()=>{var re;return(re=G.current)==null?void 0:re.resizable}),O.jsx(PG,{"data-qui":"Resizable",ref:G,...V,...te,minWidth:n??K.minWidth,minHeight:i??K.minHeight,maxWidth:o??K.maxWidth,maxHeight:a??K.maxHeight,grid:h,snap:p,lockAspectRatio:v,enable:y,handleStyles:m,handleClasses:g,handleComponent:w,style:x,className:ye("relative box-border",A),onResizeStart:S,onResize:E,onResizeStop:I,scale:N,bounds:T,snapGap:M,as:z,children:e})});DG.displayName="Resizable";const oa={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"}},Fc={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"}},jG=(e,t,r,n,i,o)=>({container:ye("inline-flex items-center",oa[e].gap,o),track:ye("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",oa[e].track,{[Fc[t].bg]:r&&!n&&!i,"bg-input-bg":!r&&!n||i,"bg-panel cursor-not-allowed":n,"cursor-pointer":!n}),thumb:ye("bg-input-text pointer-events-none inline-flex items-center justify-center shadow-xs","transition-all duration-200 ease-in-out","rounded-full absolute",oa[e].thumb,r?oa[e].thumbChecked:oa[e].thumbUnchecked,{[Fc[t].thumb]:!n,"bg-canvas-subtle":n}),iconLeft:ye("flex items-center justify-center z-10 w-1/2 p-0.5",{[Fc[t].icon]:!r&&!n,"text-panel-subtle":n||r}),iconRight:ye("flex items-center justify-center z-10 w-1/2 p-0.5",{[Fc[t].icon]:r&&!n,"text-panel-subtle":n||!r}),label:ye("font-medium text-body",oa[e].label,{"cursor-pointer":!n,"cursor-not-allowed text-muted":n})}),Bu=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,y]=C.useState(r),m=t!==void 0,g=m?t:v,w=()=>{const _=!g;m||y(_),s==null||s(_)},x=jG(i,o,g,n,!!a,c);return O.jsxs("div",{"data-qui":"Toggle",className:x.container,children:[e&&O.jsx("label",{htmlFor:u,className:x.label,children:e}),O.jsxs("button",{ref:p,...h,type:"button",role:"switch","aria-checked":g,"aria-label":e,disabled:n,onClick:w,name:d,id:u,className:x.track,children:[a&&O.jsx("span",{className:x.iconLeft,children:a.unchecked}),O.jsx("span",{className:x.thumb,"aria-hidden":"true"}),a&&O.jsx("span",{className:x.iconRight,children:a.checked})]})]})});Bu.displayName="Toggle";C.createContext(null);const br=C.forwardRef(({depth:e=0,className:t,children:r,borderType:n,disabled:i,...o},a)=>{const s=x3({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})});br.displayName="Panel";const cl={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"}},pu={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"},grey:{bg:"bg-input-bg",text:"text-input-text",border:"border-input-border",buttonHover:"hover:bg-input-hover"},dark:{bg:"bg-tab-inactive-bg",text:"text-input-text",border:"border-input-border",buttonHover:"hover:bg-primary-hover hover:text-button-text"}},qG=(e,t,r,n)=>ye("inline-flex items-center justify-center font-medium border",cl[e].container,pu[t].bg,pu[t].text,pu[t].border,cl[e].text,{"opacity-60 pointer-events-none":r,"cursor-pointer hover:bg-opacity-90 transition-opacity":n&&!r}),zG=(e,t,r)=>ye({[cl[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}),LG=e=>ye(cl[e].text),w3=(e,t,r)=>ye("inline-flex items-center justify-center rounded transition-colors duration-200 focus:outline-hidden ",cl[e].iconButton,pu[t].buttonHover,{"pointer-events-none":r}),S3=C.createContext(null),yd=()=>{const e=C.useContext(S3);if(!e)throw new Error("Pill components must be used within a Pill.Root");return e},v1=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:ye(qG(e,t,i,u),r),...a,children:n})})});v1.displayName="Pill.Root";const g1=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i}=yd();return O.jsx("span",{ref:n,className:ye(LG(i),e),...r,children:t})});g1.displayName="Pill.Text";const m1=C.forwardRef(({className:e,children:t,label:r,position:n,...i},o)=>{const{size:a,color:s,disabled:c}=yd(),u=!!r,d=O.jsx("span",{ref:o,className:ye(zG(a,s,u),e,{"opacity-60":c}),...i,children:t});return u&&!c?O.jsx(Lr,{label:r||"",position:n||"up",children:d}):d});m1.displayName="Pill.Icon";const E3=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,disabled:a}=yd();return O.jsx("button",{ref:n,type:"button",disabled:a,className:ye(w3(i,o,a),e),...r,children:t})});E3.displayName="Pill.Button";const b1=C.forwardRef(({className:e,onClose:t,"aria-label":r="Remove pill",children:n,...i},o)=>{const{size:a,color:s,disabled:c}=yd();return O.jsx("button",{ref:o,type:"button",disabled:c,className:ye(w3(a,s,c),e),onClick:t,"aria-label":r,...i,children:n||O.jsx(fd,{})})});b1.displayName="Pill.Close";const _3=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(v1,{ref:d,size:e,color:t,className:a,disabled:c,...u,children:[n&&O.jsx(m1,{children:n}),s||r&&O.jsx(g1,{children:r}),o&&O.jsx(b1,{onClose:i})]}));_3.displayName="Pill";const vu=Object.assign(_3,{Root:v1,Text:g1,Icon:m1,Button:E3,Close:b1});function aa(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,y)=>n[y]!==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,y=Math.round((Date.now()-p)*100)/100,m=y/16,g=(w,x)=>{for(w=String(w);w.length<x;)w=" "+w;return w};console.info(`%c⏱ ${g(y,5)} /${g(v,5)} ms`,`
36
19
  font-size: .6rem;
37
20
  font-weight: bold;
38
- 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 GT(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const oJ=(e,t)=>Math.abs(e-t)<1.01,aJ=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},KT=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},sJ=e=>e,uJ=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},lJ=(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(KT(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(KT(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},YT={passive:!0},XT=typeof window>"u"?!0:"onscrollend"in window,cJ=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&XT?()=>{}:aJ(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,YT);const d=e.options.useScrollendEvent&&XT;return d&&r.addEventListener("scrollend",l,YT),()=>{r.removeEventListener("scroll",u),d&&r.removeEventListener("scrollend",l)}},fJ=(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"]},dJ=(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 hJ{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:sJ,rangeExtractor:uJ,onChange:()=>{},measureElement:fJ,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=oo(()=>(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=oo(()=>[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=oo(()=>[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=oo(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?pJ({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=oo(()=>{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=oo(()=>[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 GT(n[mk(0,n.length-1,i=>GT(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&&oJ(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 mk=(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 pJ({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=mk(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 ZT=typeof document<"u"?ce.useLayoutEffect:ce.useEffect;function vJ({useFlushSync:e=!0,...t}){const r=ce.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var u;e&&a?gx.flushSync(r):r(),(u=t.onChange)==null||u.call(t,o,a)}},[i]=ce.useState(()=>new hJ(n));return i.setOptions(n),ZT(()=>i._didMount(),[]),ZT(()=>i._willUpdate()),i}function Ga(e){return vJ({observeElementRect:lJ,observeElementOffset:cJ,scrollToFn:dJ,...e})}const gJ=({item:e,depth:t})=>{const r=$t(),[n,i]=P.useState(!1),o=r.getPrivileges(),a=ae.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:u=>{u.stopPropagation(),i(!n)},children:O.jsx(we.FdRight,{className:We("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(yk,{depth:t+1,data:a})})]})},yk=({data:e,depth:t=0})=>e.map(r=>r.includes.length?O.jsx(gJ,{item:r,depth:t},r.id):O.jsx("div",{className:We("py-1 text-xs text-white",{}),children:r.privilege},r.id)),Ft=()=>document.querySelector(`.${KD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,ac=({container:e,...t})=>O.jsx(ae.Portal,{...t,container:e||Ft()}),JT=vw,QT=gw,eN=P.memo(function({privilege:t,selectedPrivilege:r,onSelect:n,isGuest:i=!1}){const o=$t(),a=o.getPrivileges(),u=ae.populateShallow(t.includes,a),[l,d]=P.useState(!1),[f,h]=P.useState(t.privilege),[p,v]=P.useState(null),m=ae.useOutsideClick(()=>{l&&b()});ae.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{ae.validateName(f);const _=ae.renamePrivilege(f,t.id,a);o.actions.updatePrivileges(_),d(!1)}catch(_){v(_.message)}}const w=async _=>{_.stopPropagation();const{confirmed:S}=await o.actions.openModal({title:"Delete Privilege",type:ae.ModalType.CONFIRM,color:ae.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(S){const R=ae.removePrivilege(t.id,a);if((r==null?void 0:r.id)!==t.id){o.actions.updatePrivileges(R);return}const I=Object.keys(R).filter(N=>R[N].privilege!=="guest");if(I.length===0)n(null);else{const N=Object.keys(a).filter($=>a[$].privilege!=="guest"),A=N.indexOf(t.id),k=Math.max(0,A-1),L=N[k];A===0?n(R[I[0]]):R[L]?n(R[L]):n(R[I[0]])}o.actions.updatePrivileges(R)}},E=P.useMemo(()=>t.resources.some(_=>_.exists===!1),[t]);return O.jsxs(JT,{openDelay:0,closeDelay:0,children:[O.jsx(QT,{asChild:!0,children:O.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:[O.jsxs("div",{className:"flex items-center justify-between",children:[O.jsxs("div",{className:"flex flex-1 items-center text-white",children:[O.jsx("span",{className:"mr-4",children:i?O.jsx(we.FdGuest,{className:"h-6 w-6"}):O.jsx(we.FdGroup,{className:"h-6 w-6"})}),l?O.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[O.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&&O.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})]}):O.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:f})]}),i?O.jsx("div",{className:"flex items-center justify-center",children:O.jsxs(JT,{openDelay:0,closeDelay:0,children:[O.jsx(QT,{asChild:!0,children:O.jsx("span",{children:O.jsx(we.FdInfoBold,{className:"h-4 w-4 text-grey-50"})})}),O.jsx(Lr,{container:Ft(),children:O.jsx(Fr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:O.jsx("div",{className:"space-y-1 px-2",children:O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(we.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsx("p",{children:"the guest privilege must be used to indicate resources accessible without any permission required (e.g. an authenticate function)"})]})})})})]})}):O.jsx("div",{className:"flex items-center space-x-2",children:l?O.jsxs(O.Fragment,{children:[O.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:x,children:O.jsx("span",{children:O.jsx(we.FdClose,{className:"h-4 w-4 text-grey-50"})})}),O.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:b,children:O.jsx("span",{children:O.jsx(we.FdCheckCircle,{className:"h-4 w-4 text-grey-50"})})})]}):O.jsxs(O.Fragment,{children:[O.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:y,children:O.jsx("span",{children:O.jsx(we.FdPen,{className:"h-4 w-4 text-grey-50"})})}),O.jsx("button",{className:"rounded p-1 hover:bg-primary-hover hover:text-white",onClick:w,children:O.jsx("span",{children:O.jsx(we.FdTrash,{className:"h-4 w-4 text-grey-50"})})})]})})]}),u.length?O.jsx("div",{className:"ml-[43px]",children:O.jsx(yk,{data:u})}):null]})}),O.jsx(Lr,{container:Ft(),children:O.jsxs(Fr,{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:[O.jsx(we.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),O.jsx("p",{children:"This privilege uses non-existing resources"})]})})]})}),mJ=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=$t(),i=n.getGuestPrivilege(),o=n.getCatalog(),a=P.useMemo(()=>{if(o===null||!i)return i;const f=wq({guest:i},Object.values((o==null?void 0:o.dataClasses)??{}));return _q(f,o).guest},[e,o]),u=P.useMemo(()=>Object.entries(e).filter(([,f])=>f.privilege!=="guest").sort(([,f],[,h])=>ae.localeCompare(f.privilege,h.privilege)),[e]),l=P.useRef(null),d=Ga({count:u.length,getScrollElement:()=>l.current,estimateSize:()=>72,overscan:5});return O.jsxs("div",{ref:l,className:"flex flex-1 flex-col overflow-auto p-4 pb-10 pt-1",children:[a?O.jsx("div",{className:"mb-4",children:O.jsx(eN,{privilege:a,onSelect:t,selectedPrivilege:r,privileges:e,isGuest:!0})}):null,u.length?O.jsx("div",{style:{position:"relative",height:`${d.getTotalSize()}px`},children:d.getVirtualItems().map(f=>{const[h,p]=u[f.index];return O.jsx("div",{ref:d.measureElement,"data-index":f.index,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${f.start}px)`,paddingBottom:"16px"},children:O.jsx(eN,{privilege:p,onSelect:t,selectedPrivilege:r,privileges:e})},h)})}):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center bg-grey-800",children:O.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[O.jsx(we.FdInfoBold,{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(we.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})]})};var Ou={exports:{}},Cu={exports:{}},Ye={};/** @license React v16.13.1
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 dC(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const BG=(e,t)=>Math.abs(e-t)<1.01,FG=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},fC=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},$G=e=>e,VG=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},HG=(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(fC(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(fC(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},hC={passive:!0},pC=typeof window>"u"?!0:"onscrollend"in window,WG=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&pC?()=>{}:FG(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,hC);const u=e.options.useScrollendEvent&&pC;return u&&r.addEventListener("scrollend",c,hC),()=>{r.removeEventListener("scroll",s),u&&r.removeEventListener("scrollend",c)}},UG=(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"]},GG=(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 KG{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:$G,rangeExtractor:VG,onChange:()=>{},measureElement:UG,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=aa(()=>(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=aa(()=>[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=aa(()=>[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),y=this.laneAssignments.get(p);let m,g;if(y!==void 0&&this.options.lanes>1){m=y;const S=h[m],E=S!==void 0?d[S]:void 0;g=E?E.end+this.options.gap:n+i}else{const S=this.options.lanes===1?d[p-1]:this.getFurthestMeasurement(d,p);g=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),x=typeof w=="number"?w:this.options.estimateSize(p),_=g+x;d[p]={index:p,start:g,size:x,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=aa(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?YG({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=aa(()=>{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=aa(()=>[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 dC(n[O3(0,n.length-1,i=>dC(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&&BG(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 O3=(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 YG({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=O3(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 vC=typeof document<"u"?nt.useLayoutEffect:nt.useEffect;function XG({useFlushSync:e=!0,...t}){const r=nt.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var s;e&&a?xn.flushSync(r):r(),(s=t.onChange)==null||s.call(t,o,a)}},[i]=nt.useState(()=>new KG(n));return i.setOptions(n),vC(()=>i._didMount(),[]),vC(()=>i._willUpdate()),i}function ZG(e){return XG({observeElementRect:HG,observeElementOffset:WG,scrollToFn:GG,...e})}const C3=C.createContext(null),or=()=>{const e=C.useContext(C3);if(!e)throw new Error("Select compound components must be used within Select.Root");return e},Qt={sm:{trigger:"h-5 min-h-fit",control:"min-h-5 p-0.5 gap-1",input:"text-xs h-3.5",placeholder:"placeholder:text-xs text-xs",singleValue:"text-xs",multiValue:"h-3.5 px-0.5 gap-1 text-xxs",multiValueLabel:"text-xxs",multiValueRemove:"w-3 h-3",indicatorsContainer:"gap-1",clearIndicator:"p-0.5 size-3",dropdownIndicator:"p-0.5 size-3",indicatorSeparator:"h-3",loadingIndicator:"w-3 h-3",menu:"m-0",menuList:"py-1",option:"px-1 py-0.5 text-xs",group:"pt-1",groupHeading:"px-2 py-0.5 text-xxs",noOptionsMessage:"px-2 py-1 text-xxs",loadingMessage:"px-2 py-1 text-xxs",message:"text-xxs p-1.5",icon:"text-sm"},md:{trigger:"h-6 min-h-fit",control:"min-h-6 p-1 gap-1.5",input:"text-s h-4",placeholder:"placeholder:text-s text-s",singleValue:"text-s",multiValue:"h-4 p-1 gap-1 text-xs",multiValueLabel:"text-xs",multiValueRemove:"w-3.5 h-3.5",indicatorsContainer:"gap-1",clearIndicator:"p-0.5 size-4",dropdownIndicator:"p-0.5 size-4",indicatorSeparator:"h-4",loadingIndicator:"w-4 h-4",menu:"m-0",menuList:"py-1",option:"px-2 py-1 text-s",group:"pt-1.5",groupHeading:"px-3 py-1 text-xs",noOptionsMessage:"px-2 py-1.5 text-xs",loadingMessage:"px-3 py-1.5 text-xs",message:"text-xs p-2",icon:"text-base"},lg:{trigger:"h-7 min-h-fit",control:"min-h-7 p-1.5 gap-2",input:"text-sm h-5",placeholder:"placeholder:text-sm text-sm",singleValue:"text-sm",multiValue:"h-5 px-1.5 gap-1.5 text-s",multiValueLabel:"text-xs",multiValueRemove:"w-4 h-4",indicatorsContainer:"gap-1.5",clearIndicator:"p-0.5 size-5",dropdownIndicator:"p-1 size-5",indicatorSeparator:"h-5",loadingIndicator:"w-5 h-5",menu:"m-0",menuList:"py-1.5",option:"px-3 py-2 text-sm",group:"pt-2",groupHeading:"px-4 py-1.5 text-s",noOptionsMessage:"px-4 py-2 text-s",loadingMessage:"px-4 py-2 text-s",message:"text-s p-2.5",icon:"text-lg"}},Tt={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"}},I3=({menuOpen:e,menuPlacement:t,hasMessage:r,fallback:n})=>{if(!e)return n;const i=t==="top";return r?i?"last:rounded-b":"first:rounded-t":i?"rounded-b":"rounded-t"},JG=()=>ye("flex flex-col relative"),QG=({size:e,color:t,isDisabled:r,hasMessage:n,isInvalid:i,isFocused:o,menuPlacement:a})=>{const s=Tt[i?"negative":t],c=I3({menuOpen:!!(o&&a),menuPlacement:a,hasMessage:n,fallback:"only:rounded first:rounded-t last:rounded-b"});return ye("bg-input-bg flex relative transition-all duration-200 ease-in-out items-center",c,s.control,n?["ring-1",s.messageBorder]:["border",r?"border-input-border":o?s.controlFocused:`border-select-border focus-within:${s.controlFocused}`],Qt[e].trigger,{"ring-1":n,[s.controlDisabled]:r})},eK=({size:e,color:t,isDisabled:r,isAction:n})=>{const i=Tt[t];return ye("transition-colors duration-200 rounded max-h-full h-fit px-0.5",Qt[e].icon,e==="sm"?"m-px":"m-0.5",r?"text-muted opacity-60 pointer-events-none":n?i.iconAction:i.icon,{"cursor-pointer p-0.5":n&&!r,[i.iconActionHover]:n&&!r,"pointer-events-none":!n})},tK=({size:e,color:t,isDisabled:r,isFocused:n,isInvalid:i,hasMessage:o,hasGroup:a,menuPlacement:s})=>{const c=Tt[i?"negative":t],u=I3({menuOpen:!!(n&&s),menuPlacement:s,hasMessage:o,fallback:"rounded"});return a?ye("flex items-center justify-between flex-1 min-w-0",Qt[e].control,"bg-transparent border-0",{[c.controlDisabled]:r}):ye("flex items-center justify-between",u,Qt[e].control,c.control,o?["ring-1",c.messageBorder]:["border",r?"border-input-border":n?c.controlFocused:`border-select-border
22
+ focus-within:${c.controlFocused}`],{[c.controlDisabled]:r})},rK=({isMulti:e})=>ye("flex items-center gap-1 flex-1 min-w-0 overflow-hidden",{"flex-wrap":e,"px-0.5":!e}),nK=({size:e,color:t})=>ye("bg-transparent border-0 outline-hidden flex-1 min-w-7.5 text-input-text",Qt[e].input,Tt[t].placeholder),iK=({size:e,color:t})=>ye("select-none truncate",Qt[e].placeholder,Tt[t].placeholder),oK=({size:e,color:t,isDisabled:r})=>ye("truncate",Qt[e].singleValue,r?Tt[t].singleValueDisabled:Tt[t].singleValue),aK=({size:e,color:t,isDisabled:r,isFocused:n})=>ye("inline-flex items-center rounded-xs",Qt[e].multiValue,r?Tt[t].multiValueDisabled:Tt[t].multiValue,{"border border-white":n&&!r}),sK=({size:e})=>ye("truncate",Qt[e].multiValueLabel),lK=({size:e,color:t,isDisabled:r})=>ye("flex items-center justify-center cursor-pointer transition-colors",Qt[e].multiValueRemove,Tt[t].multiValueRemove),R3=({size:e,color:t,isDisabled:r})=>ye("flex items-center justify-center transition-colors rounded",Qt[e].clearIndicator,r?"hidden":[Tt[t].clearIndicator,Tt[t].clearIndicatorHover]),cK=({size:e,color:t,isDisabled:r})=>ye("flex items-center justify-center transition-colors rounded",Qt[e].dropdownIndicator,r?"text-grey-200":[Tt[t].dropdownIndicator,Tt[t].dropdownIndicatorHover]),uK=({size:e,placement:t,hasMessage:r,color:n,hasGroup:i})=>{const o=t==="top";return ye("absolute z-50 overflow-hidden border",i?"-left-px -right-px":"w-full",Tt[n].menu,{[Tt[n].messageBorder]:r},o?"bottom-full rounded-t rounded-b-none border-b-0":"top-full rounded-b border-t-0",Qt[e].menu)},dK=({size:e})=>ye("overflow-y-auto",Qt[e].menuList,Tt.primary.menuList),fK=({size:e,color:t,isDisabled:r,isFocused:n,isSelected:i})=>ye("transition-colors duration-150 cursor-pointer mx-1 rounded flex items-center gap-2 min-w-fit",Qt[e].option,{[Tt[t].optionDisabled]:r,[Tt[t].optionSelected]:i&&!r,[Tt[t].optionFocused]:n&&!i&&!r,[Tt[t].option]:!i&&!n&&!r}),hK=({size:e})=>ye(Qt[e].group),pK=({size:e,color:t})=>ye(Qt[e].groupHeading,Tt[t].groupHeading),vK=({size:e})=>ye("text-grey-100",Qt[e].loadingMessage),gK=({size:e})=>ye(Qt[e].noOptionsMessage,Tt.primary.noOptionsMessage),Rw=e=>{const t=e[0];return e.length>0&&typeof t=="object"&&t!==null&&"options"in t&&Array.isArray(t.options)},mK=e=>Rw(e)?e.reduce((t,r)=>[...t,...r.options],[]):e;function Ir(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 je(){return je=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},je.apply(null,arguments)}function Nw(e,t){return Nw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Nw(e,t)}function bK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Nw(e,t)}var $c={exports:{}},Lh={exports:{}},ut={};/** @license React v16.13.1
39
23
  * react-is.production.min.js
40
24
  *
41
25
  * Copyright (c) Facebook, Inc. and its affiliates.
42
26
  *
43
27
  * This source code is licensed under the MIT license found in the
44
28
  * LICENSE file in the root directory of this source tree.
45
- */var tN;function yJ(){if(tN)return Ye;tN=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function E(S){if(typeof S=="object"&&S!==null){var R=S.$$typeof;switch(R){case t:switch(S=S.type,S){case l:case d:case n:case o:case i:case h:return S;default:switch(S=S&&S.$$typeof,S){case u:case f:case m:case v:case a:return S;default:return R}}case r:return R}}}function _(S){return E(S)===d}return Ye.AsyncMode=l,Ye.ConcurrentMode=d,Ye.ContextConsumer=u,Ye.ContextProvider=a,Ye.Element=t,Ye.ForwardRef=f,Ye.Fragment=n,Ye.Lazy=m,Ye.Memo=v,Ye.Portal=r,Ye.Profiler=o,Ye.StrictMode=i,Ye.Suspense=h,Ye.isAsyncMode=function(S){return _(S)||E(S)===l},Ye.isConcurrentMode=_,Ye.isContextConsumer=function(S){return E(S)===u},Ye.isContextProvider=function(S){return E(S)===a},Ye.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},Ye.isForwardRef=function(S){return E(S)===f},Ye.isFragment=function(S){return E(S)===n},Ye.isLazy=function(S){return E(S)===m},Ye.isMemo=function(S){return E(S)===v},Ye.isPortal=function(S){return E(S)===r},Ye.isProfiler=function(S){return E(S)===o},Ye.isStrictMode=function(S){return E(S)===i},Ye.isSuspense=function(S){return E(S)===h},Ye.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===n||S===d||S===o||S===i||S===h||S===p||typeof S=="object"&&S!==null&&(S.$$typeof===m||S.$$typeof===v||S.$$typeof===a||S.$$typeof===u||S.$$typeof===f||S.$$typeof===x||S.$$typeof===b||S.$$typeof===w||S.$$typeof===y)},Ye.typeOf=E,Ye}var Xe={};/** @license React v16.13.1
29
+ */var gC;function yK(){if(gC)return ut;gC=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,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,x=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 y:case v:case a:return E;default:return I}}case r:return I}}}function S(E){return _(E)===u}return ut.AsyncMode=c,ut.ConcurrentMode=u,ut.ContextConsumer=s,ut.ContextProvider=a,ut.Element=t,ut.ForwardRef=d,ut.Fragment=n,ut.Lazy=y,ut.Memo=v,ut.Portal=r,ut.Profiler=o,ut.StrictMode=i,ut.Suspense=h,ut.isAsyncMode=function(E){return S(E)||_(E)===c},ut.isConcurrentMode=S,ut.isContextConsumer=function(E){return _(E)===s},ut.isContextProvider=function(E){return _(E)===a},ut.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ut.isForwardRef=function(E){return _(E)===d},ut.isFragment=function(E){return _(E)===n},ut.isLazy=function(E){return _(E)===y},ut.isMemo=function(E){return _(E)===v},ut.isPortal=function(E){return _(E)===r},ut.isProfiler=function(E){return _(E)===o},ut.isStrictMode=function(E){return _(E)===i},ut.isSuspense=function(E){return _(E)===h},ut.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===y||E.$$typeof===v||E.$$typeof===a||E.$$typeof===s||E.$$typeof===d||E.$$typeof===g||E.$$typeof===w||E.$$typeof===x||E.$$typeof===m)},ut.typeOf=_,ut}var pt={};/** @license React v16.13.1
46
30
  * react-is.development.js
47
31
  *
48
32
  * Copyright (c) Facebook, Inc. and its affiliates.
49
33
  *
50
34
  * This source code is licensed under the MIT license found in the
51
35
  * LICENSE file in the root directory of this source tree.
52
- */var rN;function bJ(){return rN||(rN=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(ne){return typeof ne=="string"||typeof ne=="function"||ne===n||ne===d||ne===o||ne===i||ne===h||ne===p||typeof ne=="object"&&ne!==null&&(ne.$$typeof===m||ne.$$typeof===v||ne.$$typeof===a||ne.$$typeof===u||ne.$$typeof===f||ne.$$typeof===x||ne.$$typeof===b||ne.$$typeof===w||ne.$$typeof===y)}function _(ne){if(typeof ne=="object"&&ne!==null){var K=ne.$$typeof;switch(K){case t:var he=ne.type;switch(he){case l:case d:case n:case o:case i:case h:return he;default:var be=he&&he.$$typeof;switch(be){case u:case f:case m:case v:case a:return be;default:return K}}case r:return K}}}var S=l,R=d,I=u,N=a,A=t,k=f,L=n,$=m,j=v,D=r,W=o,F=i,X=h,Z=!1;function Q(ne){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(ne)||_(ne)===l}function U(ne){return _(ne)===d}function ee(ne){return _(ne)===u}function ie(ne){return _(ne)===a}function ue(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===t}function B(ne){return _(ne)===f}function V(ne){return _(ne)===n}function J(ne){return _(ne)===m}function H(ne){return _(ne)===v}function G(ne){return _(ne)===r}function se(ne){return _(ne)===o}function oe(ne){return _(ne)===i}function fe(ne){return _(ne)===h}Xe.AsyncMode=S,Xe.ConcurrentMode=R,Xe.ContextConsumer=I,Xe.ContextProvider=N,Xe.Element=A,Xe.ForwardRef=k,Xe.Fragment=L,Xe.Lazy=$,Xe.Memo=j,Xe.Portal=D,Xe.Profiler=W,Xe.StrictMode=F,Xe.Suspense=X,Xe.isAsyncMode=Q,Xe.isConcurrentMode=U,Xe.isContextConsumer=ee,Xe.isContextProvider=ie,Xe.isElement=ue,Xe.isForwardRef=B,Xe.isFragment=V,Xe.isLazy=J,Xe.isMemo=H,Xe.isPortal=G,Xe.isProfiler=se,Xe.isStrictMode=oe,Xe.isSuspense=fe,Xe.isValidElementType=E,Xe.typeOf=_})()),Xe}var nN;function bk(){return nN||(nN=1,process.env.NODE_ENV==="production"?Cu.exports=yJ():Cu.exports=bJ()),Cu.exports}/*
36
+ */var mC;function xK(){return mC||(mC=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,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function _(Z){return typeof Z=="string"||typeof Z=="function"||Z===n||Z===u||Z===o||Z===i||Z===h||Z===p||typeof Z=="object"&&Z!==null&&(Z.$$typeof===y||Z.$$typeof===v||Z.$$typeof===a||Z.$$typeof===s||Z.$$typeof===d||Z.$$typeof===g||Z.$$typeof===w||Z.$$typeof===x||Z.$$typeof===m)}function S(Z){if(typeof Z=="object"&&Z!==null){var J=Z.$$typeof;switch(J){case t:var ae=Z.type;switch(ae){case c:case u:case n:case o:case i:case h:return ae;default:var he=ae&&ae.$$typeof;switch(he){case s:case d:case y:case v:case a:return he;default:return J}}case r:return J}}}var E=c,I=u,N=s,T=a,M=t,z=d,j=n,W=y,U=v,A=r,K=o,V=i,te=h,G=!1;function re(Z){return G||(G=!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.")),P(Z)||S(Z)===c}function P(Z){return S(Z)===u}function B(Z){return S(Z)===s}function X(Z){return S(Z)===a}function Q(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function D(Z){return S(Z)===d}function $(Z){return S(Z)===n}function H(Z){return S(Z)===y}function q(Z){return S(Z)===v}function Y(Z){return S(Z)===r}function ie(Z){return S(Z)===o}function ne(Z){return S(Z)===i}function pe(Z){return S(Z)===h}pt.AsyncMode=E,pt.ConcurrentMode=I,pt.ContextConsumer=N,pt.ContextProvider=T,pt.Element=M,pt.ForwardRef=z,pt.Fragment=j,pt.Lazy=W,pt.Memo=U,pt.Portal=A,pt.Profiler=K,pt.StrictMode=V,pt.Suspense=te,pt.isAsyncMode=re,pt.isConcurrentMode=P,pt.isContextConsumer=B,pt.isContextProvider=X,pt.isElement=Q,pt.isForwardRef=D,pt.isFragment=$,pt.isLazy=H,pt.isMemo=q,pt.isPortal=Y,pt.isProfiler=ie,pt.isStrictMode=ne,pt.isSuspense=pe,pt.isValidElementType=_,pt.typeOf=S})()),pt}var bC;function N3(){return bC||(bC=1,process.env.NODE_ENV==="production"?Lh.exports=yK():Lh.exports=xK()),Lh.exports}/*
53
37
  object-assign
54
38
  (c) Sindre Sorhus
55
39
  @license MIT
56
- */var Jm,iN;function xJ(){if(iN)return Jm;iN=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},u=0;u<10;u++)a["_"+String.fromCharCode(u)]=u;var l=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(l.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(f){d[f]=f}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Jm=i()?Object.assign:function(o,a){for(var u,l=n(o),d,f=1;f<arguments.length;f++){u=Object(arguments[f]);for(var h in u)t.call(u,h)&&(l[h]=u[h]);if(e){d=e(u);for(var p=0;p<d.length;p++)r.call(u,d[p])&&(l[d[p]]=u[d[p]])}}return l},Jm}var Qm,oN;function mw(){if(oN)return Qm;oN=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Qm=e,Qm}var ey,aN;function xk(){return aN||(aN=1,ey=Function.call.bind(Object.prototype.hasOwnProperty)),ey}var ty,sN;function wJ(){if(sN)return ty;sN=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=mw(),r={},n=xk();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={})},ty=i,ty}var ry,uN;function _J(){if(uN)return ry;uN=1;var e=bk(),t=xJ(),r=mw(),n=xk(),i=wJ(),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 ry=function(u,l){var d=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(U){var ee=U&&(d&&U[d]||U[f]);if(typeof ee=="function")return ee}var p="<<anonymous>>",v={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:w(),arrayOf:E,element:_(),elementType:S(),instanceOf:R,node:k(),objectOf:N,oneOf:I,oneOfType:A,shape:$,exact:j};function m(U,ee){return U===ee?U!==0||1/U===1/ee:U!==U&&ee!==ee}function y(U,ee){this.message=U,this.data=ee&&typeof ee=="object"?ee:{},this.stack=""}y.prototype=Error.prototype;function x(U){if(process.env.NODE_ENV!=="production")var ee={},ie=0;function ue(V,J,H,G,se,oe,fe){if(G=G||p,oe=oe||H,fe!==r){if(l){var ne=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 ne.name="Invariant Violation",ne}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var K=G+":"+H;!ee[K]&&ie<3&&(o("You are manually calling a React.PropTypes validation function for the `"+oe+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),ee[K]=!0,ie++)}}return J[H]==null?V?J[H]===null?new y("The "+se+" `"+oe+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new y("The "+se+" `"+oe+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:U(J,H,G,se,oe)}var B=ue.bind(null,!1);return B.isRequired=ue.bind(null,!0),B}function b(U){function ee(ie,ue,B,V,J,H){var G=ie[ue],se=F(G);if(se!==U){var oe=X(G);return new y("Invalid "+V+" `"+J+"` of type "+("`"+oe+"` supplied to `"+B+"`, expected ")+("`"+U+"`."),{expectedType:U})}return null}return x(ee)}function w(){return x(a)}function E(U){function ee(ie,ue,B,V,J){if(typeof U!="function")return new y("Property `"+J+"` of component `"+B+"` has invalid PropType notation inside arrayOf.");var H=ie[ue];if(!Array.isArray(H)){var G=F(H);return new y("Invalid "+V+" `"+J+"` of type "+("`"+G+"` supplied to `"+B+"`, expected an array."))}for(var se=0;se<H.length;se++){var oe=U(H,se,B,V,J+"["+se+"]",r);if(oe instanceof Error)return oe}return null}return x(ee)}function _(){function U(ee,ie,ue,B,V){var J=ee[ie];if(!u(J)){var H=F(J);return new y("Invalid "+B+" `"+V+"` of type "+("`"+H+"` supplied to `"+ue+"`, expected a single ReactElement."))}return null}return x(U)}function S(){function U(ee,ie,ue,B,V){var J=ee[ie];if(!e.isValidElementType(J)){var H=F(J);return new y("Invalid "+B+" `"+V+"` of type "+("`"+H+"` supplied to `"+ue+"`, expected a single ReactElement type."))}return null}return x(U)}function R(U){function ee(ie,ue,B,V,J){if(!(ie[ue]instanceof U)){var H=U.name||p,G=Q(ie[ue]);return new y("Invalid "+V+" `"+J+"` of type "+("`"+G+"` supplied to `"+B+"`, expected ")+("instance of `"+H+"`."))}return null}return x(ee)}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 ee(ie,ue,B,V,J){for(var H=ie[ue],G=0;G<U.length;G++)if(m(H,U[G]))return null;var se=JSON.stringify(U,function(fe,ne){var K=X(ne);return K==="symbol"?String(ne):ne});return new y("Invalid "+V+" `"+J+"` of value `"+String(H)+"` "+("supplied to `"+B+"`, expected one of "+se+"."))}return x(ee)}function N(U){function ee(ie,ue,B,V,J){if(typeof U!="function")return new y("Property `"+J+"` of component `"+B+"` has invalid PropType notation inside objectOf.");var H=ie[ue],G=F(H);if(G!=="object")return new y("Invalid "+V+" `"+J+"` of type "+("`"+G+"` supplied to `"+B+"`, expected an object."));for(var se in H)if(n(H,se)){var oe=U(H,se,B,V,J+"."+se,r);if(oe instanceof Error)return oe}return null}return x(ee)}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 ee=0;ee<U.length;ee++){var ie=U[ee];if(typeof ie!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(ie)+" at index "+ee+"."),a}function ue(B,V,J,H,G){for(var se=[],oe=0;oe<U.length;oe++){var fe=U[oe],ne=fe(B,V,J,H,G,r);if(ne==null)return null;ne.data&&n(ne.data,"expectedType")&&se.push(ne.data.expectedType)}var K=se.length>0?", expected one of type ["+se.join(", ")+"]":"";return new y("Invalid "+H+" `"+G+"` supplied to "+("`"+J+"`"+K+"."))}return x(ue)}function k(){function U(ee,ie,ue,B,V){return D(ee[ie])?null:new y("Invalid "+B+" `"+V+"` supplied to "+("`"+ue+"`, expected a ReactNode."))}return x(U)}function L(U,ee,ie,ue,B){return new y((U||"React class")+": "+ee+" type `"+ie+"."+ue+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+B+"`.")}function $(U){function ee(ie,ue,B,V,J){var H=ie[ue],G=F(H);if(G!=="object")return new y("Invalid "+V+" `"+J+"` of type `"+G+"` "+("supplied to `"+B+"`, expected `object`."));for(var se in U){var oe=U[se];if(typeof oe!="function")return L(B,V,J,se,X(oe));var fe=oe(H,se,B,V,J+"."+se,r);if(fe)return fe}return null}return x(ee)}function j(U){function ee(ie,ue,B,V,J){var H=ie[ue],G=F(H);if(G!=="object")return new y("Invalid "+V+" `"+J+"` of type `"+G+"` "+("supplied to `"+B+"`, expected `object`."));var se=t({},ie[ue],U);for(var oe in se){var fe=U[oe];if(n(U,oe)&&typeof fe!="function")return L(B,V,J,oe,X(fe));if(!fe)return new y("Invalid "+V+" `"+J+"` key `"+oe+"` supplied to `"+B+"`.\nBad object: "+JSON.stringify(ie[ue],null," ")+`
57
- Valid keys: `+JSON.stringify(Object.keys(U),null," "));var ne=fe(H,oe,B,V,J+"."+oe,r);if(ne)return ne}return null}return x(ee)}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 ee=h(U);if(ee){var ie=ee.call(U),ue;if(ee!==U.entries){for(;!(ue=ie.next()).done;)if(!D(ue.value))return!1}else for(;!(ue=ie.next()).done;){var B=ue.value;if(B&&!D(B[1]))return!1}}else return!1;return!0;default:return!1}}function W(U,ee){return U==="symbol"?!0:ee?ee["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ee instanceof Symbol:!1}function F(U){var ee=typeof U;return Array.isArray(U)?"array":U instanceof RegExp?"object":W(ee,U)?"symbol":ee}function X(U){if(typeof U>"u"||U===null)return""+U;var ee=F(U);if(ee==="object"){if(U instanceof Date)return"date";if(U instanceof RegExp)return"regexp"}return ee}function Z(U){var ee=X(U);switch(ee){case"array":case"object":return"an "+ee;case"boolean":case"date":case"regexp":return"a "+ee;default:return ee}}function Q(U){return!U.constructor||!U.constructor.name?p:U.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},ry}var ny,lN;function EJ(){if(lN)return ny;lN=1;var e=mw();function t(){}function r(){}return r.resetWarningCache=t,ny=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},ny}var cN;function SJ(){if(cN)return Ou.exports;if(cN=1,process.env.NODE_ENV!=="production"){var e=bk(),t=!0;Ou.exports=_J()(e.isElement,t)}else Ou.exports=EJ()();return Ou.exports}var OJ=SJ();const ve=Gn(OJ);var Ru={exports:{}},Je={};/** @license React v17.0.2
40
+ */var Bh,yC;function wK(){if(yC)return Bh;yC=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 Bh=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},Bh}var Fh,xC;function y1(){if(xC)return Fh;xC=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Fh=e,Fh}var wC,SC;function T3(){return SC||(SC=1,wC=Function.call.bind(Object.prototype.hasOwnProperty)),wC}var $h,EC;function SK(){if(EC)return $h;EC=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=y1(),r={},n=T3();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(y){h=y}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={})},$h=i,$h}var Vh,_C;function EK(){if(_C)return Vh;_C=1;var e=N3(),t=wK(),r=y1(),n=T3(),i=SK(),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 Vh=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function h(P){var B=P&&(u&&P[u]||P[d]);if(typeof B=="function")return B}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:x(),arrayOf:_,element:S(),elementType:E(),instanceOf:I,node:z(),objectOf:T,oneOf:N,oneOfType:M,shape:W,exact:U};function y(P,B){return P===B?P!==0||1/P===1/B:P!==P&&B!==B}function m(P,B){this.message=P,this.data=B&&typeof B=="object"?B:{},this.stack=""}m.prototype=Error.prototype;function g(P){if(process.env.NODE_ENV!=="production")var B={},X=0;function Q($,H,q,Y,ie,ne,pe){if(Y=Y||p,ne=ne||q,pe!==r){if(c){var Z=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 Z.name="Invariant Violation",Z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var J=Y+":"+q;!B[J]&&X<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+Y+"`. 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."),B[J]=!0,X++)}}return H[q]==null?$?H[q]===null?new m("The "+ie+" `"+ne+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new m("The "+ie+" `"+ne+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:P(H,q,Y,ie,ne)}var D=Q.bind(null,!1);return D.isRequired=Q.bind(null,!0),D}function w(P){function B(X,Q,D,$,H,q){var Y=X[Q],ie=V(Y);if(ie!==P){var ne=te(Y);return new m("Invalid "+$+" `"+H+"` of type "+("`"+ne+"` supplied to `"+D+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return g(B)}function x(){return g(a)}function _(P){function B(X,Q,D,$,H){if(typeof P!="function")return new m("Property `"+H+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var q=X[Q];if(!Array.isArray(q)){var Y=V(q);return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected an array."))}for(var ie=0;ie<q.length;ie++){var ne=P(q,ie,D,$,H+"["+ie+"]",r);if(ne instanceof Error)return ne}return null}return g(B)}function S(){function P(B,X,Q,D,$){var H=B[X];if(!s(H)){var q=V(H);return new m("Invalid "+D+" `"+$+"` of type "+("`"+q+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return g(P)}function E(){function P(B,X,Q,D,$){var H=B[X];if(!e.isValidElementType(H)){var q=V(H);return new m("Invalid "+D+" `"+$+"` of type "+("`"+q+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return g(P)}function I(P){function B(X,Q,D,$,H){if(!(X[Q]instanceof P)){var q=P.name||p,Y=re(X[Q]);return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected ")+("instance of `"+q+"`."))}return null}return g(B)}function N(P){if(!Array.isArray(P))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 B(X,Q,D,$,H){for(var q=X[Q],Y=0;Y<P.length;Y++)if(y(q,P[Y]))return null;var ie=JSON.stringify(P,function(ne,pe){var Z=te(pe);return Z==="symbol"?String(pe):pe});return new m("Invalid "+$+" `"+H+"` of value `"+String(q)+"` "+("supplied to `"+D+"`, expected one of "+ie+"."))}return g(B)}function T(P){function B(X,Q,D,$,H){if(typeof P!="function")return new m("Property `"+H+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected an object."));for(var ie in q)if(n(q,ie)){var ne=P(q,ie,D,$,H+"."+ie,r);if(ne instanceof Error)return ne}return null}return g(B)}function M(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<P.length;B++){var X=P[B];if(typeof X!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(X)+" at index "+B+"."),a}function Q(D,$,H,q,Y){for(var ie=[],ne=0;ne<P.length;ne++){var pe=P[ne],Z=pe(D,$,H,q,Y,r);if(Z==null)return null;Z.data&&n(Z.data,"expectedType")&&ie.push(Z.data.expectedType)}var J=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new m("Invalid "+q+" `"+Y+"` supplied to "+("`"+H+"`"+J+"."))}return g(Q)}function z(){function P(B,X,Q,D,$){return A(B[X])?null:new m("Invalid "+D+" `"+$+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return g(P)}function j(P,B,X,Q,D){return new m((P||"React class")+": "+B+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function W(P){function B(X,Q,D,$,H){var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type `"+Y+"` "+("supplied to `"+D+"`, expected `object`."));for(var ie in P){var ne=P[ie];if(typeof ne!="function")return j(D,$,H,ie,te(ne));var pe=ne(q,ie,D,$,H+"."+ie,r);if(pe)return pe}return null}return g(B)}function U(P){function B(X,Q,D,$,H){var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type `"+Y+"` "+("supplied to `"+D+"`, expected `object`."));var ie=t({},X[Q],P);for(var ne in ie){var pe=P[ne];if(n(P,ne)&&typeof pe!="function")return j(D,$,H,ne,te(pe));if(!pe)return new m("Invalid "+$+" `"+H+"` key `"+ne+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(X[Q],null," ")+`
41
+ Valid keys: `+JSON.stringify(Object.keys(P),null," "));var Z=pe(q,ne,D,$,H+"."+ne,r);if(Z)return Z}return null}return g(B)}function A(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(A);if(P===null||s(P))return!0;var B=h(P);if(B){var X=B.call(P),Q;if(B!==P.entries){for(;!(Q=X.next()).done;)if(!A(Q.value))return!1}else for(;!(Q=X.next()).done;){var D=Q.value;if(D&&!A(D[1]))return!1}}else return!1;return!0;default:return!1}}function K(P,B){return P==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function V(P){var B=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":K(B,P)?"symbol":B}function te(P){if(typeof P>"u"||P===null)return""+P;var B=V(P);if(B==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return B}function G(P){var B=te(P);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function re(P){return!P.constructor||!P.constructor.name?p:P.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},Vh}var Hh,OC;function _K(){if(OC)return Hh;OC=1;var e=y1();function t(){}function r(){}return r.resetWarningCache=t,Hh=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},Hh}var CC;function OK(){if(CC)return $c.exports;if(CC=1,process.env.NODE_ENV!=="production"){var e=N3(),t=!0;$c.exports=EK()(e.isElement,t)}else $c.exports=_K()();return $c.exports}var CK=OK();const Se=Rj(CK);var Wh={exports:{}},dt={};/**
42
+ * @license React
43
+ * react-is.production.min.js
44
+ *
45
+ * Copyright (c) Facebook, Inc. and its affiliates.
46
+ *
47
+ * This source code is licensed under the MIT license found in the
48
+ * LICENSE file in the root directory of this source tree.
49
+ */var IC;function IK(){if(IC)return dt;IC=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"),y;y=Symbol.for("react.module.reference");function m(g){if(typeof g=="object"&&g!==null){var w=g.$$typeof;switch(w){case e:switch(g=g.type,g){case r:case i:case n:case u:case d:return g;default:switch(g=g&&g.$$typeof,g){case s:case a:case c:case p:case h:case o:return g;default:return w}}case t:return w}}}return dt.ContextConsumer=a,dt.ContextProvider=o,dt.Element=e,dt.ForwardRef=c,dt.Fragment=r,dt.Lazy=p,dt.Memo=h,dt.Portal=t,dt.Profiler=i,dt.StrictMode=n,dt.Suspense=u,dt.SuspenseList=d,dt.isAsyncMode=function(){return!1},dt.isConcurrentMode=function(){return!1},dt.isContextConsumer=function(g){return m(g)===a},dt.isContextProvider=function(g){return m(g)===o},dt.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},dt.isForwardRef=function(g){return m(g)===c},dt.isFragment=function(g){return m(g)===r},dt.isLazy=function(g){return m(g)===p},dt.isMemo=function(g){return m(g)===h},dt.isPortal=function(g){return m(g)===t},dt.isProfiler=function(g){return m(g)===i},dt.isStrictMode=function(g){return m(g)===n},dt.isSuspense=function(g){return m(g)===u},dt.isSuspenseList=function(g){return m(g)===d},dt.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===i||g===n||g===u||g===d||g===v||typeof g=="object"&&g!==null&&(g.$$typeof===p||g.$$typeof===h||g.$$typeof===o||g.$$typeof===a||g.$$typeof===c||g.$$typeof===y||g.getModuleId!==void 0)},dt.typeOf=m,dt}var vt={};/**
50
+ * @license React
51
+ * react-is.development.js
52
+ *
53
+ * Copyright (c) Facebook, Inc. and its affiliates.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE file in the root directory of this source tree.
57
+ */var RC;function RK(){return RC||(RC=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"),y=!1,m=!1,g=!1,w=!1,x=!1,_;_=Symbol.for("react.module.reference");function S(ae){return!!(typeof ae=="string"||typeof ae=="function"||ae===r||ae===i||x||ae===n||ae===u||ae===d||w||ae===v||y||m||g||typeof ae=="object"&&ae!==null&&(ae.$$typeof===p||ae.$$typeof===h||ae.$$typeof===o||ae.$$typeof===a||ae.$$typeof===c||ae.$$typeof===_||ae.getModuleId!==void 0))}function E(ae){if(typeof ae=="object"&&ae!==null){var he=ae.$$typeof;switch(he){case e:var ue=ae.type;switch(ue){case r:case i:case n:case u:case d:return ue;default:var de=ue&&ue.$$typeof;switch(de){case s:case a:case c:case p:case h:case o:return de;default:return he}}case t:return he}}}var I=a,N=o,T=e,M=c,z=r,j=p,W=h,U=t,A=i,K=n,V=u,te=d,G=!1,re=!1;function P(ae){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function B(ae){return re||(re=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function X(ae){return E(ae)===a}function Q(ae){return E(ae)===o}function D(ae){return typeof ae=="object"&&ae!==null&&ae.$$typeof===e}function $(ae){return E(ae)===c}function H(ae){return E(ae)===r}function q(ae){return E(ae)===p}function Y(ae){return E(ae)===h}function ie(ae){return E(ae)===t}function ne(ae){return E(ae)===i}function pe(ae){return E(ae)===n}function Z(ae){return E(ae)===u}function J(ae){return E(ae)===d}vt.ContextConsumer=I,vt.ContextProvider=N,vt.Element=T,vt.ForwardRef=M,vt.Fragment=z,vt.Lazy=j,vt.Memo=W,vt.Portal=U,vt.Profiler=A,vt.StrictMode=K,vt.Suspense=V,vt.SuspenseList=te,vt.isAsyncMode=P,vt.isConcurrentMode=B,vt.isContextConsumer=X,vt.isContextProvider=Q,vt.isElement=D,vt.isForwardRef=$,vt.isFragment=H,vt.isLazy=q,vt.isMemo=Y,vt.isPortal=ie,vt.isProfiler=ne,vt.isStrictMode=pe,vt.isSuspense=Z,vt.isSuspenseList=J,vt.isValidElementType=S,vt.typeOf=E})()),vt}var NC;function NK(){return NC||(NC=1,process.env.NODE_ENV==="production"?Wh.exports=IK():Wh.exports=RK()),Wh.exports}var TC=NK();const PC=e=>typeof e=="object"&&e!=null&&e.nodeType===1,MC=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Vc=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return MC(r.overflowY,t)||MC(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},Hc=(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,TK=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:U=>U!==s;if(!PC(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=e;for(;PC(p)&&u(p);){if(p=TK(p),p===d){h.push(p);break}p!=null&&p===document.body&&Vc(p)&&!Vc(document.documentElement)||p!=null&&Vc(p,c)&&h.push(p)}const v=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,y=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:m,scrollY:g}=window,{height:w,width:x,top:_,right:S,bottom:E,left:I}=e.getBoundingClientRect(),{top:N,right:T,left:M}=(U=>{const A=window.getComputedStyle(U);return{top:parseFloat(A.scrollMarginTop)||0,right:parseFloat(A.scrollMarginRight)||0,bottom:parseFloat(A.scrollMarginBottom)||0,left:parseFloat(A.scrollMarginLeft)||0}})(e);let z=_-N,j=a==="center"?I+x/2-M+T:a==="end"?S+T:I-M;const W=[];for(let U=0;U<h.length;U++){const A=h[U],{height:K,width:V,top:te,right:G,bottom:re,left:P}=A.getBoundingClientRect();if(_>=0&&I>=0&&E<=y&&S<=v&&(A===d&&!Vc(A)||_>=te&&E<=re&&I>=P&&S<=G))return W;const B=getComputedStyle(A),X=parseInt(B.borderLeftWidth,10),Q=parseInt(B.borderTopWidth,10),D=parseInt(B.borderRightWidth,10),$=parseInt(B.borderBottomWidth,10);let H=0,q=0;const Y="offsetWidth"in A?A.offsetWidth-A.clientWidth-X-D:0,ie="offsetHeight"in A?A.offsetHeight-A.clientHeight-Q-$:0,ne="offsetWidth"in A?A.offsetWidth===0?0:V/A.offsetWidth:0,pe="offsetHeight"in A?A.offsetHeight===0?0:K/A.offsetHeight:0;if(d===A)H=Hc(g,g+y,y,Q,$,g+z,g+z+w,w),q=a==="start"?j:a==="center"?j-v/2:a==="end"?j-v:Hc(m,m+v,v,X,D,m+j,m+j+x,x),H=Math.max(0,H+g),q=Math.max(0,q+m);else{H=Hc(te,re,K,Q,$+ie,z,z+w,w),q=a==="start"?j-P-X:a==="center"?j-(P+V/2)+Y/2:a==="end"?j-G+D+Y:Hc(P,G,V,X,D+Y,j,j+x,x);const{scrollLeft:Z,scrollTop:J}=A;H=pe===0?0:Math.max(0,Math.min(J+H/pe,A.scrollHeight-K/pe+ie)),q=ne===0?0:Math.max(0,Math.min(Z+q/ne,A.scrollWidth-V/ne+Y)),z+=J-H,j+=Z-q}W.push({el:A,top:H,left:q})}return W};var Ia=function(){return Ia=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},Ia.apply(this,arguments)},MK=0;function kC(e){return typeof e=="function"?e:Cr}function Cr(){}function P3(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 AC(e,t,r){var n=e===t||t instanceof r.Node&&e.contains&&e.contains(t);return n}function xd(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 st(){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 zn(){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 M3(){return String(MK++)}function kK(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 DC(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function k3(e){return typeof e.type=="string"}function A3(e){return e.props}function AK(e,t){console.error('The property "'+t+'" is required in "'+e+'"')}var DK=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Wc(e){e===void 0&&(e={});var t={};return DK.forEach(function(r){e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function ul(e,t){return!e||!t?e:Object.keys(e).reduce(function(r,n){return r[n]=Fu(t,n)?t[n]:e[n],r},{})}function Fu(e,t){return e[t]!==void 0}function Ra(e){var t=e.key,r=e.keyCode;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function jK(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ln(e,t,r,n,i){i===void 0&&(i=!1);var o=r.length;if(o===0)return-1;var a=o-1;(typeof e!="number"||e<0||e>a)&&(e=t>0?-1:a+1);var s=e+t;s<0?s=i?a:0:s>a&&(s=i?0:a);var c=Zi(s,t<0,r,n,i);return c===-1?e>=o?-1:e:c}function Zi(e,t,r,n,i){i===void 0&&(i=!1);var o=r.length;if(t){for(var a=e;a>=0;a--)if(!n(r[a],a))return a}else for(var s=e;s<o;s++)if(!n(r[s],s))return s;return i?Zi(t?o-1:0,t,r,n):-1}function $u(e,t,r,n){return n===void 0&&(n=!0),r&&t.some(function(i){return i&&(AC(i,e,r)||n&&AC(i,r.document.activeElement,r))})}var x1=Cr;process.env.NODE_ENV!=="production"&&(x1=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 qK=xd(function(e){D3(e).textContent=""},500);function D3(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 j3(e,t){if(!(!e||!t)){var r=D3(t);r.textContent=e,qK(t)}}function zK(e){var t=e==null?void 0:e.getElementById("a11y-status-message");t&&t.remove()}var q3=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,z3=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,L3=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,gu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,mu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,B3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,F3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,$3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,V3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,H3=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,W3=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,U3=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,G3=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,Tw=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,K3=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Y3=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,X3=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16,LK=Object.freeze({__proto__:null,blurButton:K3,blurInput:W3,changeInput:U3,clickButton:Tw,clickItem:H3,controlledPropUpdatedSelectedItem:Y3,itemMouseEnter:L3,keyDownArrowDown:mu,keyDownArrowUp:gu,keyDownEnd:V3,keyDownEnter:F3,keyDownEscape:B3,keyDownHome:$3,keyDownSpaceButton:G3,mouseUp:z3,touchEnd:X3,unknown:q3}),BK=["refKey","ref"],FK=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],$K=["onKeyDown","onBlur","onChange","onInput","onChangeText"],VK=["refKey","ref"],HK=["onMouseMove","onMouseDown","onClick","onPress","index","item"],WK=(function(){var e=(function(t){function r(i){var o;o=t.call(this,i)||this,o.id=o.props.id||"downshift-"+M3(),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(x){return o.id+"-item-"+x},o.items=[],o.itemCount=null,o.previousResultCount=0,o.timeoutIds=[],o.internalSetTimeout=function(x,_){var S=setTimeout(function(){o.timeoutIds=o.timeoutIds.filter(function(E){return E!==S}),x()},_);o.timeoutIds.push(S)},o.setItemCount=function(x){o.itemCount=x},o.unsetItemCount=function(){o.itemCount=null},o.isItemDisabled=function(x,_){var S=o.getItemNodeFromIndex(_);return S&&S.hasAttribute("disabled")},o.setHighlightedIndex=function(x,_){x===void 0&&(x=o.props.defaultHighlightedIndex),_===void 0&&(_={}),_=Wc(_),o.internalSetState(je({highlightedIndex:x},_))},o.clearSelection=function(x){o.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:o.props.defaultHighlightedIndex,isOpen:o.props.defaultIsOpen},x)},o.selectItem=function(x,_,S){_=Wc(_),o.internalSetState(je({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,selectedItem:x,inputValue:o.props.itemToString(x)},_),S)},o.selectItemAtIndex=function(x,_,S){var E=o.items[x];E!=null&&o.selectItem(E,_,S)},o.selectHighlightedItem=function(x,_){return o.selectItemAtIndex(o.getState().highlightedIndex,x,_)},o.internalSetState=function(x,_){var S,E,I={},N=typeof x=="function";return!N&&x.hasOwnProperty("inputValue")&&o.props.onInputValueChange(x.inputValue,je({},o.getStateAndHelpers(),x)),o.setState(function(T){var M;T=o.getState(T);var z=N?x(T):x;z=o.props.stateReducer(T,z),S=z.hasOwnProperty("selectedItem");var j={};return S&&z.selectedItem!==T.selectedItem&&(E=z.selectedItem),(M=z).type||(M.type=q3),Object.keys(z).forEach(function(W){T[W]!==z[W]&&(I[W]=z[W]),W!=="type"&&(z[W],Fu(o.props,W)||(j[W]=z[W]))}),N&&z.hasOwnProperty("inputValue")&&o.props.onInputValueChange(z.inputValue,je({},o.getStateAndHelpers(),z)),j},function(){kC(_)();var T=Object.keys(I).length>1;T&&o.props.onStateChange(I,o.getStateAndHelpers()),S&&o.props.onSelect(x.selectedItem,o.getStateAndHelpers()),E!==void 0&&o.props.onChange(E,o.getStateAndHelpers()),o.props.onUserAction(I,o.getStateAndHelpers())})},o.rootRef=function(x){return o._rootNode=x},o.getRootProps=function(x,_){var S,E=x===void 0?{}:x,I=E.refKey,N=I===void 0?"ref":I,T=E.ref,M=Ir(E,BK),z=_===void 0?{}:_,j=z.suppressRefError,W=j===void 0?!1:j;o.getRootProps.called=!0,o.getRootProps.refKey=N,o.getRootProps.suppressRefError=W;var U=o.getState(),A=U.isOpen;return je((S={},S[N]=zn(T,o.rootRef),S.role="combobox",S["aria-expanded"]=A,S["aria-haspopup"]="listbox",S["aria-owns"]=A?o.menuId:void 0,S["aria-labelledby"]=o.labelId,S),M)},o.keyDownHandlers={ArrowDown:function(x){var _=this;if(x.preventDefault(),this.getState().isOpen){var S=x.shiftKey?5:1;this.moveHighlightedIndex(S,{type:mu})}else this.internalSetState({isOpen:!0,type:mu},function(){var E=_.getItemCount();if(E>0){var I=_.getState(),N=I.highlightedIndex,T=Ln(N,1,{length:E},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:mu})}})},ArrowUp:function(x){var _=this;if(x.preventDefault(),this.getState().isOpen){var S=x.shiftKey?-5:-1;this.moveHighlightedIndex(S,{type:gu})}else this.internalSetState({isOpen:!0,type:gu},function(){var E=_.getItemCount();if(E>0){var I=_.getState(),N=I.highlightedIndex,T=Ln(N,-1,{length:E},_.isItemDisabled,!0);_.setHighlightedIndex(T,{type:gu})}})},Enter:function(x){if(x.which!==229){var _=this.getState(),S=_.isOpen,E=_.highlightedIndex;if(S&&E!=null){x.preventDefault();var I=this.items[E],N=this.getItemNodeFromIndex(E);if(I==null||N&&N.hasAttribute("disabled"))return;this.selectHighlightedItem({type:F3})}}},Escape:function(x){x.preventDefault(),this.reset(je({type:B3},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},o.buttonKeyDownHandlers=je({},o.keyDownHandlers,{" ":function(x){x.preventDefault(),this.toggleMenu({type:G3})}}),o.inputKeyDownHandlers=je({},o.keyDownHandlers,{Home:function(x){var _=this.getState(),S=_.isOpen;if(S){x.preventDefault();var E=this.getItemCount();if(!(E<=0||!S)){var I=Zi(0,!1,{length:E},this.isItemDisabled);this.setHighlightedIndex(I,{type:$3})}}},End:function(x){var _=this.getState(),S=_.isOpen;if(S){x.preventDefault();var E=this.getItemCount();if(!(E<=0||!S)){var I=Zi(E-1,!0,{length:E},this.isItemDisabled);this.setHighlightedIndex(I,{type:V3})}}}}),o.getToggleButtonProps=function(x){var _=x===void 0?{}:x,S=_.onClick;_.onPress;var E=_.onKeyDown,I=_.onKeyUp,N=_.onBlur,T=Ir(_,FK),M=o.getState(),z=M.isOpen,j={onClick:st(S,o.buttonHandleClick),onKeyDown:st(E,o.buttonHandleKeyDown),onKeyUp:st(I,o.buttonHandleKeyUp),onBlur:st(N,o.buttonHandleBlur)},W=T.disabled?{}:j;return je({type:"button",role:"button","aria-label":z?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},W,T)},o.buttonHandleKeyUp=function(x){x.preventDefault()},o.buttonHandleKeyDown=function(x){var _=Ra(x);o.buttonKeyDownHandlers[_]&&o.buttonKeyDownHandlers[_].call(o,x)},o.buttonHandleClick=function(x){if(x.preventDefault(),o.props.environment){var _=o.props.environment.document,S=_.body,E=_.activeElement;S&&S===E&&x.target.focus()}process.env.NODE_ENV==="test"?o.toggleMenu({type:Tw}):o.internalSetTimeout(function(){return o.toggleMenu({type:Tw})})},o.buttonHandleBlur=function(x){var _=x.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(x){return je({htmlFor:o.inputId,id:o.labelId},x)},o.getInputProps=function(x){var _=x===void 0?{}:x,S=_.onKeyDown,E=_.onBlur,I=_.onChange,N=_.onInput;_.onChangeText;var T=Ir(_,$K),M,z={};M="onChange";var j=o.getState(),W=j.inputValue,U=j.isOpen,A=j.highlightedIndex;if(!T.disabled){var K;z=(K={},K[M]=st(I,N,o.inputHandleChange),K.onKeyDown=st(S,o.inputHandleKeyDown),K.onBlur=st(E,o.inputHandleBlur),K)}return je({"aria-autocomplete":"list","aria-activedescendant":U&&typeof A=="number"&&A>=0?o.getItemId(A):void 0,"aria-controls":U?o.menuId:void 0,"aria-labelledby":T&&T["aria-label"]?void 0:o.labelId,autoComplete:"off",value:W,id:o.inputId},z,T)},o.inputHandleKeyDown=function(x){var _=Ra(x);_&&o.inputKeyDownHandlers[_]&&o.inputKeyDownHandlers[_].call(o,x)},o.inputHandleChange=function(x){o.internalSetState({type:U3,isOpen:!0,inputValue:x.target.value,highlightedIndex:o.props.defaultHighlightedIndex})},o.inputHandleBlur=function(){o.internalSetTimeout(function(){var x;if(!(o.isMouseDown||!o.props.environment)){var _=o.props.environment.document.activeElement,S=(_==null||(x=_.dataset)==null?void 0:x.toggle)&&o._rootNode&&o._rootNode.contains(_);S||o.reset({type:W3})}})},o.menuRef=function(x){o._menuNode=x},o.getMenuProps=function(x,_){var S,E=x===void 0?{}:x,I=E.refKey,N=I===void 0?"ref":I,T=E.ref,M=Ir(E,VK),z=_===void 0?{}:_,j=z.suppressRefError,W=j===void 0?!1:j;return o.getMenuProps.called=!0,o.getMenuProps.refKey=N,o.getMenuProps.suppressRefError=W,je((S={},S[N]=zn(T,o.menuRef),S.role="listbox",S["aria-labelledby"]=M&&M["aria-label"]?void 0:o.labelId,S.id=o.menuId,S),M)},o.getItemProps=function(x){var _,S=x===void 0?{}:x,E=S.onMouseMove,I=S.onMouseDown,N=S.onClick;S.onPress;var T=S.index,M=S.item,z=M===void 0?process.env.NODE_ENV==="production"?void 0:AK("getItemProps","item"):M,j=Ir(S,HK);T===void 0?(o.items.push(z),T=o.items.indexOf(z)):o.items[T]=z;var W="onClick",U=N,A=(_={onMouseMove:st(E,function(){T!==o.getState().highlightedIndex&&(o.setHighlightedIndex(T,{type:L3}),o.avoidScrolling=!0,o.internalSetTimeout(function(){return o.avoidScrolling=!1},250))}),onMouseDown:st(I,function(V){V.preventDefault()})},_[W]=st(U,function(){o.selectItemAtIndex(T,{type:H3})}),_),K=j.disabled?{onMouseDown:A.onMouseDown}:A;return je({id:o.getItemId(T),role:"option","aria-selected":o.getState().highlightedIndex===T},K,j)},o.clearItems=function(){o.items=[]},o.reset=function(x,_){x===void 0&&(x={}),x=Wc(x),o.internalSetState(function(S){var E=S.selectedItem;return je({isOpen:o.props.defaultIsOpen,highlightedIndex:o.props.defaultHighlightedIndex,inputValue:o.props.itemToString(E)},x)},_)},o.toggleMenu=function(x,_){x===void 0&&(x={}),x=Wc(x),o.internalSetState(function(S){var E=S.isOpen;return je({isOpen:!E},E&&{highlightedIndex:o.props.defaultHighlightedIndex},x)},function(){var S=o.getState(),E=S.isOpen,I=S.highlightedIndex;E&&o.getItemCount()>0&&typeof I=="number"&&o.setHighlightedIndex(I,x),kC(_)()})},o.openMenu=function(x){o.internalSetState({isOpen:!0},x)},o.closeMenu=function(x){o.internalSetState({isOpen:!1},x)},o.updateStatus=xd(function(){var x;if((x=o.props)!=null&&(x=x.environment)!=null&&x.document){var _=o.getState(),S=o.items[_.highlightedIndex],E=o.getItemCount(),I=o.props.getA11yStatusMessage(je({itemToString:o.props.itemToString,previousResultCount:o.previousResultCount,resultCount:E,highlightedItem:S},_));o.previousResultCount=E,j3(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,y=v===void 0?"":v,m=a.initialSelectedItem,g=m===void 0?null:m,w=o.getState({highlightedIndex:u,isOpen:p,inputValue:y,selectedItem:g});return w.selectedItem!=null&&o.props.initialInputValue===void 0&&(w.inputValue=o.props.itemToString(w.selectedItem)),o.state=w,o}bK(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),ul(i,this.props)},n.getItemCount=function(){var i=this.items.length;return this.itemCount!=null?i=this.itemCount:this.props.itemCount!==void 0&&(i=this.props.itemCount),i},n.getItemNodeFromIndex=function(i){return this.props.environment?this.props.environment.document.getElementById(this.getItemId(i)):null},n.scrollHighlightedItemIntoView=function(){{var i=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(i,this._menuNode)}},n.moveHighlightedIndex=function(i,o){var a=this.getItemCount(),s=this.getState(),c=s.highlightedIndex;if(a>0){var u=Ln(c,i,{length:a},this.isItemDisabled,!0);this.setHighlightedIndex(u,o)}},n.getStateAndHelpers=function(){var i=this.getState(),o=i.highlightedIndex,a=i.inputValue,s=i.selectedItem,c=i.isOpen,u=this.props.itemToString,d=this.id,h=this.getRootProps,p=this.getToggleButtonProps,v=this.getLabelProps,y=this.getMenuProps,m=this.getInputProps,g=this.getItemProps,w=this.openMenu,x=this.closeMenu,_=this.toggleMenu,S=this.selectItem,E=this.selectItemAtIndex,I=this.selectHighlightedItem,N=this.setHighlightedIndex,T=this.clearSelection,M=this.clearItems,z=this.reset,j=this.setItemCount,W=this.unsetItemCount,U=this.internalSetState;return{getRootProps:h,getToggleButtonProps:p,getLabelProps:v,getMenuProps:y,getInputProps:m,getItemProps:g,reset:z,openMenu:w,closeMenu:x,toggleMenu:_,selectItem:S,selectItemAtIndex:E,selectHighlightedItem:I,setHighlightedIndex:N,clearSelection:T,clearItems:M,setItemCount:j,unsetItemCount:W,setState:U,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&&jC(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=$u(h.target,[i._rootNode,i._menuNode],i.props.environment);!p&&i.getState().isOpen&&i.reset({type:z3},function(){return i.props.onOuterClick(i.getStateAndHelpers())})},s=function(){i.isTouchMove=!1},c=function(){i.isTouchMove=!0},u=function(h){var p=$u(h.target,[i._rootNode,i._menuNode],i.props.environment,!1);!i.isTouchMove&&!p&&i.getState().isOpen&&i.reset({type:X3},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"&&(x1(this.state,i,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&jC(this._menuNode,this.getMenuProps)),Fu(this.props,"selectedItem")&&this.props.selectedItemChanged(i.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Y3,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=DC(this.props.children,Cr);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=DC(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&&UK(o,this.getRootProps),o;if(k3(o))return C.cloneElement(o,this.getRootProps(A3(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:kK,itemToString:function(t){return t==null?"":(process.env.NODE_ENV!=="production"&&jK(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:Cr,onInputValueChange:Cr,onUserAction:Cr,onChange:Cr,onSelect:Cr,onOuterClick:Cr,selectedItemChanged:function(t,r){return t!==r},environment:typeof window>"u"?void 0:window,stateReducer:function(t,r){return r},suppressRefError:!1,scrollIntoView:P3},e.stateChangeTypes=LK,e})();process.env.NODE_ENV!=="production"&&(WK.propTypes={children:Se.func,defaultHighlightedIndex:Se.number,defaultIsOpen:Se.bool,initialHighlightedIndex:Se.number,initialSelectedItem:Se.any,initialInputValue:Se.string,initialIsOpen:Se.bool,getA11yStatusMessage:Se.func,itemToString:Se.func,onChange:Se.func,onSelect:Se.func,onStateChange:Se.func,onInputValueChange:Se.func,onUserAction:Se.func,onOuterClick:Se.func,selectedItemChanged:Se.func,stateReducer:Se.func,itemCount:Se.number,id:Se.string,environment:Se.shape({addEventListener:Se.func.isRequired,removeEventListener:Se.func.isRequired,document:Se.shape({createElement:Se.func.isRequired,getElementById:Se.func.isRequired,activeElement:Se.any.isRequired,body:Se.any.isRequired}).isRequired,Node:Se.func.isRequired}),suppressRefError:Se.bool,scrollIntoView:Se.func,selectedItem:Se.any,isOpen:Se.bool,inputValue:Se.string,highlightedIndex:Se.number,labelId:Se.string,inputId:Se.string,menuId:Se.string,getItemId:Se.func});function jC(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 UK(e,t){var r=t.refKey,n=r!=="ref",i=!k3(e);i&&!n&&!TC.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+'"'),!TC.isForwardRef(e)&&!A3(e)[r]&&console.error('downshift: You must apply the ref prop "'+r+'" from getRootProps onto your root element.')}var Z3={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function GK(e,t,r){var n=e.props,i=e.type,o={};Object.keys(t).forEach(function(a){KK(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange(je({type:i},o))}function KK(e,t,r,n){var i=t.props,o=t.type,a="on"+S1(e)+"Change";i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a](je({type:o},n))}function YK(e,t){return t.changes}var qC=xd(function(e,t){j3(e,t)},200),XK=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-"+M3():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 w1(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 ZK(e){return/^\S{1}$/.test(e)}function S1(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function wd(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,y){o.current=y,v=ul(v,y.props);var m=e(v,y),g=y.props.stateReducer(v,je({},y,{changes:m}));return g},[e]),s=C.useReducer(a,t,r),c=s[0],u=s[1],d=wd(t),h=C.useCallback(function(v){return u(je({props:d.current},v))},[d]),p=o.current;return C.useEffect(function(){var v=ul(i.current,p==null?void 0:p.props),y=p&&i.current&&!n(v,c);y&&GK(p,v,c),i.current=c},[c,p,n]),[c,h]}function e4(e,t,r,n){var i=Q3(e,t,r,n),o=i[0],a=i[1];return[ul(o,t),a]}var el={itemToString:function(e){return e?String(e):""},itemToKey:function(e){return e},stateReducer:YK,scrollIntoView:P3,environment:typeof window>"u"?void 0:window};function ri(e,t,r){r===void 0&&(r=Z3);var n=e["default"+S1(t)];return n!==void 0?n:r[t]}function wo(e,t,r){r===void 0&&(r=Z3);var n=e[t];if(n!==void 0)return n;var i=e["initial"+S1(t)];return i!==void 0?i:ri(e,t,r)}function t4(e){var t=wo(e,"selectedItem"),r=wo(e,"isOpen"),n=JK(e),i=wo(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 So(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 r4(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 Cr;function o(){n.current.isTouchEnd=!1,n.current.isMouseDown=!0}function a(d){n.current.isMouseDown=!1,$u(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&&!$u(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 Sd=function(){return Cr};process.env.NODE_ENV!=="production"&&(Sd=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 E1(e,t,r,n){n===void 0&&(n={});var i=n.document,o=Cl();C.useEffect(function(){if(!(!e||o||!i)){var a=e(t);qC(a,i)}},r),C.useEffect(function(){return function(){qC.cancel(),zK(i)}},[i])}function n4(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 XK(function(){t<0||!r||!Object.keys(n.current).length||(s.current===!1?s.current=!0:a(i(t),o))},[t]),s}var Ed=Cr;process.env.NODE_ENV!=="production"&&(Ed=function(e){var t=e.props,r=e.state,n=C.useRef(t),i=Cl();C.useEffect(function(){i||(x1(r,n.current,t),n.current=t)},[r,t,i])});function Vu(e,t,r){var n;r===void 0&&(r=!0);var i=((n=e.items)==null?void 0:n.length)&&t>=0;return je({isOpen:!1,highlightedIndex:-1},i&&je({selectedItem:e.items[t],isOpen:ri(e,"isOpen"),highlightedIndex:ri(e,"highlightedIndex")},r&&{inputValue:e.itemToString(e.items[t])}))}function i4(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Cl(){var e=C.useRef(!0);return C.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Hu(e){var t=ri(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function JK(e){var t=wo(e,"highlightedIndex");return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}var bu={environment:Se.shape({addEventListener:Se.func.isRequired,removeEventListener:Se.func.isRequired,document:Se.shape({createElement:Se.func.isRequired,getElementById:Se.func.isRequired,activeElement:Se.any.isRequired,body:Se.any.isRequired}).isRequired,Node:Se.func.isRequired}),itemToString:Se.func,itemToKey:Se.func,stateReducer:Se.func},o4=je({},bu,{getA11yStatusMessage:Se.func,highlightedIndex:Se.number,defaultHighlightedIndex:Se.number,initialHighlightedIndex:Se.number,isOpen:Se.bool,defaultIsOpen:Se.bool,initialIsOpen:Se.bool,selectedItem:Se.any,initialSelectedItem:Se.any,defaultSelectedItem:Se.any,id:Se.string,labelId:Se.string,menuId:Se.string,getItemId:Se.func,toggleButtonId:Se.string,onSelectedItemChange:Se.func,onHighlightedIndexChange:Se.func,onStateChange:Se.func,onIsOpenChange:Se.func,scrollIntoView:Se.func});function a4(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:So(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:So(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:Hu(i),isOpen:ri(i,"isOpen"),selectedItem:ri(i,"selectedItem"),inputValue:ri(i,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return je({},e,o)}function QK(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 eY=Ia(Ia({},o4),{items:Se.array.isRequired,isItemDisabled:Se.func}),tY=Ia(Ia({},el),{isItemDisabled:function(){return!1}}),s4=Cr;process.env.NODE_ENV!=="production"&&(s4=function(e,t){Se.checkPropTypes(eY,e,"prop",t.name)});var yu=process.env.NODE_ENV!=="production"?"__togglebutton_click__":0,_1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_down__":1,O1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_arrow_up__":2,Wu=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_character__":3,C1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_escape__":4,I1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_home__":5,R1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_end__":6,N1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_enter__":7,T1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_space_button__":8,P1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_up__":9,M1=process.env.NODE_ENV!=="production"?"__togglebutton_keydown_page_down__":10,Uu=process.env.NODE_ENV!=="production"?"__togglebutton_blur__":11,l4=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":12,c4=process.env.NODE_ENV!=="production"?"__item_mouse_move__":13,k1=process.env.NODE_ENV!=="production"?"__item_click__":14,u4=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,d4=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,f4=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,h4=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,A1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,Pw=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,p4=process.env.NODE_ENV!=="production"?"__function_reset__":21,v4=Object.freeze({__proto__:null,FunctionCloseMenu:f4,FunctionOpenMenu:d4,FunctionReset:p4,FunctionSelectItem:A1,FunctionSetHighlightedIndex:h4,FunctionSetInputValue:Pw,FunctionToggleMenu:u4,ItemClick:k1,ItemMouseMove:c4,MenuMouseLeave:l4,ToggleButtonBlur:Uu,ToggleButtonClick:yu,ToggleButtonKeyDownArrowDown:_1,ToggleButtonKeyDownArrowUp:O1,ToggleButtonKeyDownCharacter:Wu,ToggleButtonKeyDownEnd:R1,ToggleButtonKeyDownEnter:N1,ToggleButtonKeyDownEscape:C1,ToggleButtonKeyDownHome:I1,ToggleButtonKeyDownPageDown:M1,ToggleButtonKeyDownPageUp:P1,ToggleButtonKeyDownSpaceButton:T1});function rY(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case k1:a={isOpen:ri(i,"isOpen"),highlightedIndex:Hu(i),selectedItem:i.items[t.index]};break;case Wu:{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=QK({keysSoFar:c,highlightedIndex:u,items:i.items,itemToString:i.itemToString,isItemDisabled:i.isItemDisabled});a={inputValue:c,highlightedIndex:d,isOpen:!0}}break;case _1:{var h=e.isOpen?Ln(e.highlightedIndex,1,i.items,i.isItemDisabled):o&&e.selectedItem==null?-1:So(i,e,1);a={highlightedIndex:h,isOpen:!0}}break;case O1:if(e.isOpen&&o)a=Vu(i,e.highlightedIndex,!1);else{var p=e.isOpen?Ln(e.highlightedIndex,-1,i.items,i.isItemDisabled):So(i,e,-1);a={highlightedIndex:p,isOpen:!0}}break;case N1:case T1:a=Vu(i,e.highlightedIndex,!1);break;case I1:a={highlightedIndex:Zi(0,!1,i.items,i.isItemDisabled),isOpen:!0};break;case R1:a={highlightedIndex:Zi(i.items.length-1,!0,i.items,i.isItemDisabled),isOpen:!0};break;case P1:a={highlightedIndex:Ln(e.highlightedIndex,-10,i.items,i.isItemDisabled)};break;case M1:a={highlightedIndex:Ln(e.highlightedIndex,10,i.items,i.isItemDisabled)};break;case C1:a={isOpen:!1,highlightedIndex:-1};break;case Uu:a=je({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((r=i.items)==null?void 0:r.length)&&{selectedItem:i.items[e.highlightedIndex]});break;case A1:a={selectedItem:t.selectedItem};break;default:return a4(e,t,v4)}return je({},e,a)}var nY=["onClick"],iY=["onMouseLeave","refKey","ref"],oY=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],aY=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];xi.stateChangeTypes=v4;function xi(e){e===void 0&&(e={}),s4(e,xi);var t=je({},tY,e),r=t.scrollIntoView,n=t.environment,i=t.getA11yStatusMessage,o=e4(rY,t,t4,i4),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),y=C.useRef({}),m=C.useRef(null),g=J3(t),w=wd({state:a,props:t}),x=C.useCallback(function(P){return y.current[g.getItemId(P)]},[g]);E1(i,a,[c,u,d,h],n);var _=n4({menuElement:v.current,highlightedIndex:u,isOpen:c,itemRefs:y,scrollIntoView:r,getItemNodeFromIndex:x});C.useEffect(function(){return m.current=xd(function(P){P({type:Pw,inputValue:""})},500),function(){m.current.cancel()}},[]),C.useEffect(function(){h&&m.current(s)},[s,h]),Ed({props:t,state:a}),C.useEffect(function(){var P=wo(t,"isOpen");P&&p.current&&p.current.focus()},[]);var S=C.useCallback(function(){w.current.state.isOpen&&s({type:Uu})},[s,w]),E=C.useMemo(function(){return[v,p]},[]),I=r4(n,S,E),N=Sd("getMenuProps","getToggleButtonProps");C.useEffect(function(){c||(y.current={})},[c]);var T=C.useMemo(function(){return{ArrowDown:function(P){P.preventDefault(),s({type:_1,altKey:P.altKey})},ArrowUp:function(P){P.preventDefault(),s({type:O1,altKey:P.altKey})},Home:function(P){P.preventDefault(),s({type:I1})},End:function(P){P.preventDefault(),s({type:R1})},Escape:function(){w.current.state.isOpen&&s({type:C1})},Enter:function(P){P.preventDefault(),s({type:w.current.state.isOpen?N1:yu})},PageUp:function(P){w.current.state.isOpen&&(P.preventDefault(),s({type:P1}))},PageDown:function(P){w.current.state.isOpen&&(P.preventDefault(),s({type:M1}))}," ":function(P){P.preventDefault();var B=w.current.state;if(!B.isOpen){s({type:yu});return}B.inputValue?s({type:Wu,key:" "}):s({type:T1})}}},[s,w]),M=C.useCallback(function(){s({type:u4})},[s]),z=C.useCallback(function(){s({type:f4})},[s]),j=C.useCallback(function(){s({type:d4})},[s]),W=C.useCallback(function(P){s({type:h4,highlightedIndex:P})},[s]),U=C.useCallback(function(P){s({type:A1,selectedItem:P})},[s]),A=C.useCallback(function(){s({type:p4})},[s]),K=C.useCallback(function(P){s({type:Pw,inputValue:P})},[s]),V=C.useCallback(function(P){var B=P===void 0?{}:P,X=B.onClick,Q=Ir(B,nY),D=function(){var $;($=p.current)==null||$.focus()};return je({id:g.labelId,htmlFor:g.toggleButtonId,onClick:st(X,D)},Q)},[g]),te=C.useCallback(function(P,B){var X,Q=P===void 0?{}:P,D=Q.onMouseLeave,$=Q.refKey,H=$===void 0?"ref":$,q=Q.ref,Y=Ir(Q,iY),ie=B===void 0?{}:B,ne=ie.suppressRefError,pe=ne===void 0?!1:ne,Z=function(){s({type:l4})};return N("getMenuProps",pe,H,v),je((X={},X[H]=zn(q,function(J){v.current=J}),X.id=g.menuId,X.role="listbox",X["aria-labelledby"]=Y&&Y["aria-label"]?void 0:""+g.labelId,X.onMouseLeave=st(D,Z),X),Y)},[s,N,g]),G=C.useCallback(function(P,B){var X,Q=P===void 0?{}:P,D=Q.onBlur,$=Q.onClick;Q.onPress;var H=Q.onKeyDown,q=Q.refKey,Y=q===void 0?"ref":q,ie=Q.ref,ne=Ir(Q,oY),pe=B===void 0?{}:B,Z=pe.suppressRefError,J=Z===void 0?!1:Z,ae=w.current.state,he=function(){s({type:yu})},ue=function(){ae.isOpen&&!I.isMouseDown&&s({type:Uu})},de=function(xe){var Ee=Ra(xe);Ee&&T[Ee]?T[Ee](xe):ZK(Ee)&&s({type:Wu,key:Ee})},le=je((X={},X[Y]=zn(ie,function(xe){p.current=xe}),X["aria-activedescendant"]=ae.isOpen&&ae.highlightedIndex>-1?g.getItemId(ae.highlightedIndex):"",X["aria-controls"]=g.menuId,X["aria-expanded"]=w.current.state.isOpen,X["aria-haspopup"]="listbox",X["aria-labelledby"]=ne&&ne["aria-label"]?void 0:""+g.labelId,X.id=g.toggleButtonId,X.role="combobox",X.tabIndex=0,X.onBlur=st(D,ue),X),ne);return ne.disabled||(le.onClick=st($,he),le.onKeyDown=st(H,de)),N("getToggleButtonProps",J,Y,p),le},[s,g,w,I,N,T]),re=C.useCallback(function(P){var B,X=P===void 0?{}:P,Q=X.item,D=X.index,$=X.onMouseMove,H=X.onClick,q=X.onMouseDown;X.onPress;var Y=X.refKey,ie=Y===void 0?"ref":Y,ne=X.disabled,pe=X.ref,Z=Ir(X,aY);ne!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var J=w.current,ae=J.state,he=J.props,ue=w1(Q,D,he.items,"Pass either item or index to getItemProps!"),de=ue[0],le=ue[1],xe=he.isItemDisabled(de,le),Ee=function(){I.isTouchEnd||le===ae.highlightedIndex||(_.current=!1,s({type:c4,index:le,disabled:xe}))},Ie=function(){s({type:k1,index:le})},Te=function(Xe){return Xe.preventDefault()},Me=je((B={},B[ie]=zn(pe,function(Xe){Xe&&(y.current[g.getItemId(le)]=Xe)}),B["aria-disabled"]=xe,B["aria-selected"]=de===ae.selectedItem,B.id=g.getItemId(le),B.role="option",B),Z);return xe||(Me.onClick=st(H,Ie)),Me.onMouseMove=st($,Ee),Me.onMouseDown=st(q,Te),Me},[w,g,I,_,s]);return{getToggleButtonProps:G,getLabelProps:V,getMenuProps:te,getItemProps:re,toggleMenu:M,openMenu:j,closeMenu:z,setHighlightedIndex:W,selectItem:U,reset:A,setInputValue:K,highlightedIndex:u,isOpen:c,selectedItem:d,inputValue:h}}var D1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,j1=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,q1=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,z1=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,L1=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,B1=process.env.NODE_ENV!=="production"?"__input_keydown_page_up__":5,F1=process.env.NODE_ENV!=="production"?"__input_keydown_page_down__":6,$1=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":7,V1=process.env.NODE_ENV!=="production"?"__input_change__":8,Gu=process.env.NODE_ENV!=="production"?"__input_blur__":9,H1=process.env.NODE_ENV!=="production"?"__input_click__":10,g4=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":11,m4=process.env.NODE_ENV!=="production"?"__item_mouse_move__":12,W1=process.env.NODE_ENV!=="production"?"__item_click__":13,b4=process.env.NODE_ENV!=="production"?"__togglebutton_click__":14,y4=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":15,x4=process.env.NODE_ENV!=="production"?"__function_open_menu__":16,w4=process.env.NODE_ENV!=="production"?"__function_close_menu__":17,S4=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":18,U1=process.env.NODE_ENV!=="production"?"__function_select_item__":19,E4=process.env.NODE_ENV!=="production"?"__function_set_input_value__":20,_4=process.env.NODE_ENV!=="production"?"__function_reset__":21,G1=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":22,O4=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:G1,FunctionCloseMenu:w4,FunctionOpenMenu:x4,FunctionReset:_4,FunctionSelectItem:U1,FunctionSetHighlightedIndex:S4,FunctionSetInputValue:E4,FunctionToggleMenu:y4,InputBlur:Gu,InputChange:V1,InputClick:H1,InputKeyDownArrowDown:D1,InputKeyDownArrowUp:j1,InputKeyDownEnd:L1,InputKeyDownEnter:$1,InputKeyDownEscape:q1,InputKeyDownHome:z1,InputKeyDownPageDown:F1,InputKeyDownPageUp:B1,ItemClick:W1,ItemMouseMove:m4,MenuMouseLeave:g4,ToggleButtonClick:b4});function sY(e){var t=t4(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)),je({},t,{inputValue:n})}var lY=je({},o4,{items:Se.array.isRequired,isItemDisabled:Se.func,inputValue:Se.string,defaultInputValue:Se.string,initialInputValue:Se.string,inputId:Se.string,onInputValueChange:Se.func});function cY(e,t,r,n){var i=C.useRef(),o=Q3(e,t,r,n),a=o[0],s=o[1],c=Cl();return C.useEffect(function(){if(Fu(t,"selectedItem")){if(!c){var u=t.itemToKey(t.selectedItem)!==t.itemToKey(i.current);u&&s({type:G1,inputValue:t.itemToString(t.selectedItem)})}i.current=a.selectedItem===i.current?t.selectedItem:a.selectedItem}},[a.selectedItem,t.selectedItem]),[ul(a,t),s]}var C4=Cr;process.env.NODE_ENV!=="production"&&(C4=function(e,t){Se.checkPropTypes(lY,e,"prop",t.name)});var uY=je({},el,{isItemDisabled:function(){return!1}});function dY(e,t){var r,n=t.type,i=t.props,o=t.altKey,a;switch(n){case W1:a={isOpen:ri(i,"isOpen"),highlightedIndex:Hu(i),selectedItem:i.items[t.index],inputValue:i.itemToString(i.items[t.index])};break;case D1:e.isOpen?a={highlightedIndex:Ln(e.highlightedIndex,1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:o&&e.selectedItem==null?-1:So(i,e,1),isOpen:i.items.length>=0};break;case j1:e.isOpen?o?a=Vu(i,e.highlightedIndex):a={highlightedIndex:Ln(e.highlightedIndex,-1,i.items,i.isItemDisabled,!0)}:a={highlightedIndex:So(i,e,-1),isOpen:i.items.length>=0};break;case $1:a=Vu(i,e.highlightedIndex);break;case q1:a=je({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case B1:a={highlightedIndex:Ln(e.highlightedIndex,-10,i.items,i.isItemDisabled,!0)};break;case F1:a={highlightedIndex:Ln(e.highlightedIndex,10,i.items,i.isItemDisabled,!0)};break;case z1:a={highlightedIndex:Zi(0,!1,i.items,i.isItemDisabled)};break;case L1:a={highlightedIndex:Zi(i.items.length-1,!0,i.items,i.isItemDisabled)};break;case Gu:a=je({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 V1:a={isOpen:!0,highlightedIndex:Hu(i),inputValue:t.inputValue};break;case H1:a={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:So(i,e,0)};break;case U1:a={selectedItem:t.selectedItem,inputValue:i.itemToString(t.selectedItem)};break;case G1:a={inputValue:t.inputValue};break;default:return a4(e,t,O4)}return je({},e,a)}var fY=["onMouseLeave","refKey","ref"],hY=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],pY=["onClick","onPress","refKey","ref"],vY=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];zr.stateChangeTypes=O4;function zr(e){e===void 0&&(e={}),C4(e,zr);var t=je({},uY,e),r=t.items,n=t.scrollIntoView,i=t.environment,o=t.getA11yStatusMessage,a=cY(dY,t,sY,i4),s=a[0],c=a[1],u=s.isOpen,d=s.highlightedIndex,h=s.selectedItem,p=s.inputValue,v=C.useRef(null),y=C.useRef({}),m=C.useRef(null),g=C.useRef(null),w=Cl(),x=J3(t),_=C.useRef(),S=wd({state:s,props:t}),E=C.useCallback(function(D){return y.current[x.getItemId(D)]},[x]);E1(o,s,[u,d,h,p],i);var I=n4({menuElement:v.current,highlightedIndex:d,isOpen:u,itemRefs:y,scrollIntoView:n,getItemNodeFromIndex:E});Ed({props:t,state:s}),C.useEffect(function(){var D=wo(t,"isOpen");D&&m.current&&m.current.focus()},[]),C.useEffect(function(){w||(_.current=r.length)});var N=C.useCallback(function(){S.current.state.isOpen&&c({type:Gu})},[c,S]),T=C.useMemo(function(){return[v,g,m]},[]),M=r4(i,N,T),z=Sd("getInputProps","getMenuProps");C.useEffect(function(){u||(y.current={})},[u]),C.useEffect(function(){var D;!u||!(i!=null&&i.document)||!(m!=null&&(D=m.current)!=null&&D.focus)||i.document.activeElement!==m.current&&m.current.focus()},[u,i]);var j=C.useMemo(function(){return{ArrowDown:function(D){D.preventDefault(),c({type:D1,altKey:D.altKey})},ArrowUp:function(D){D.preventDefault(),c({type:j1,altKey:D.altKey})},Home:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:z1}))},End:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:L1}))},Escape:function(D){var $=S.current.state;($.isOpen||$.inputValue||$.selectedItem||$.highlightedIndex>-1)&&(D.preventDefault(),c({type:q1}))},Enter:function(D){var $=S.current.state;!$.isOpen||D.which===229||(D.preventDefault(),c({type:$1}))},PageUp:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:B1}))},PageDown:function(D){S.current.state.isOpen&&(D.preventDefault(),c({type:F1}))}}},[c,S]),W=C.useCallback(function(D){return je({id:x.labelId,htmlFor:x.inputId},D)},[x]),U=C.useCallback(function(D,$){var H,q=D===void 0?{}:D,Y=q.onMouseLeave,ie=q.refKey,ne=ie===void 0?"ref":ie,pe=q.ref,Z=Ir(q,fY),J=$===void 0?{}:$,ae=J.suppressRefError,he=ae===void 0?!1:ae;return z("getMenuProps",he,ne,v),je((H={},H[ne]=zn(pe,function(ue){v.current=ue}),H.id=x.menuId,H.role="listbox",H["aria-labelledby"]=Z&&Z["aria-label"]?void 0:""+x.labelId,H.onMouseLeave=st(Y,function(){c({type:g4})}),H),Z)},[c,z,x]),A=C.useCallback(function(D){var $,H,q=D===void 0?{}:D,Y=q.item,ie=q.index,ne=q.refKey,pe=ne===void 0?"ref":ne,Z=q.ref,J=q.onMouseMove,ae=q.onMouseDown,he=q.onClick;q.onPress;var ue=q.disabled,de=Ir(q,hY);ue!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var le=S.current,xe=le.props,Ee=le.state,Ie=w1(Y,ie,xe.items,"Pass either item or index to getItemProps!"),Te=Ie[0],Me=Ie[1],Xe=xe.isItemDisabled(Te,Me),tt="onClick",Fe=he,Le=function(){M.isTouchEnd||Me===Ee.highlightedIndex||(I.current=!1,c({type:m4,index:Me,disabled:Xe}))},ze=function(){c({type:W1,index:Me})},Ze=function(rt){return rt.preventDefault()};return je(($={},$[pe]=zn(Z,function(rt){rt&&(y.current[x.getItemId(Me)]=rt)}),$["aria-disabled"]=Xe,$["aria-selected"]=Me===Ee.highlightedIndex,$.id=x.getItemId(Me),$.role="option",$),!Xe&&(H={},H[tt]=st(Fe,ze),H),{onMouseMove:st(J,Le),onMouseDown:st(ae,Ze)},de)},[c,x,S,M,I]),K=C.useCallback(function(D){var $,H=D===void 0?{}:D,q=H.onClick;H.onPress;var Y=H.refKey,ie=Y===void 0?"ref":Y,ne=H.ref,pe=Ir(H,pY),Z=S.current.state,J=function(){c({type:b4})};return je(($={},$[ie]=zn(ne,function(ae){g.current=ae}),$["aria-controls"]=x.menuId,$["aria-expanded"]=Z.isOpen,$.id=x.toggleButtonId,$.tabIndex=-1,$),!pe.disabled&&je({},{onClick:st(q,J)}),pe)},[c,S,x]),V=C.useCallback(function(D,$){var H,q=D===void 0?{}:D,Y=q.onKeyDown,ie=q.onChange,ne=q.onInput,pe=q.onBlur;q.onChangeText;var Z=q.onClick,J=q.refKey,ae=J===void 0?"ref":J,he=q.ref,ue=Ir(q,vY),de=$===void 0?{}:$,le=de.suppressRefError,xe=le===void 0?!1:le;z("getInputProps",xe,ae,m);var Ee=S.current.state,Ie=function(ze){var Ze=Ra(ze);Ze&&j[Ze]&&j[Ze](ze)},Te=function(ze){c({type:V1,inputValue:ze.target.value})},Me=function(ze){if(i!=null&&i.document&&Ee.isOpen&&!M.isMouseDown){var Ze=ze.relatedTarget===null&&i.document.activeElement!==i.document.body;c({type:Gu,selectItem:!Ze})}},Xe=function(){c({type:H1})},tt="onChange",Fe={};if(!ue.disabled){var Le;Fe=(Le={},Le[tt]=st(ie,ne,Te),Le.onKeyDown=st(Y,Ie),Le.onBlur=st(pe,Me),Le.onClick=st(Z,Xe),Le)}return je((H={},H[ae]=zn(he,function(ze){m.current=ze}),H["aria-activedescendant"]=Ee.isOpen&&Ee.highlightedIndex>-1?x.getItemId(Ee.highlightedIndex):"",H["aria-autocomplete"]="list",H["aria-controls"]=x.menuId,H["aria-expanded"]=Ee.isOpen,H["aria-labelledby"]=ue&&ue["aria-label"]?void 0:x.labelId,H.autoComplete="off",H.id=x.inputId,H.role="combobox",H.value=Ee.inputValue,H),Fe,ue)},[c,x,i,j,S,M,z]),te=C.useCallback(function(){c({type:y4})},[c]),G=C.useCallback(function(){c({type:w4})},[c]),re=C.useCallback(function(){c({type:x4})},[c]),P=C.useCallback(function(D){c({type:S4,highlightedIndex:D})},[c]),B=C.useCallback(function(D){c({type:U1,selectedItem:D})},[c]),X=C.useCallback(function(D){c({type:E4,inputValue:D})},[c]),Q=C.useCallback(function(){c({type:_4})},[c]);return{getItemProps:A,getLabelProps:W,getMenuProps:U,getInputProps:V,getToggleButtonProps:K,toggleMenu:te,openMenu:re,closeMenu:G,setHighlightedIndex:P,setInputValue:X,selectItem:B,reset:Q,highlightedIndex:d,isOpen:u,selectedItem:h,inputValue:p}}var I4={activeIndex:-1,selectedItems:[]};function zC(e,t){return wo(e,t,I4)}function LC(e,t){return ri(e,t,I4)}function gY(e){var t=zC(e,"activeIndex"),r=zC(e,"selectedItems");return{activeIndex:t,selectedItems:r}}function BC(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 mY(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var bY={stateReducer:bu.stateReducer,itemToKey:bu.itemToKey,environment:bu.environment,selectedItems:Se.array,initialSelectedItems:Se.array,defaultSelectedItems:Se.array,getA11yStatusMessage:Se.func,activeIndex:Se.number,initialActiveIndex:Se.number,defaultActiveIndex:Se.number,onActiveIndexChange:Se.func,onSelectedItemsChange:Se.func,keyNavigationNext:Se.string,keyNavigationPrevious:Se.string},yY={itemToKey:el.itemToKey,stateReducer:el.stateReducer,environment:el.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},R4=Cr;process.env.NODE_ENV!=="production"&&(R4=function(e,t){Se.checkPropTypes(bY,e,"prop",t.name)});var K1=process.env.NODE_ENV!=="production"?"__selected_item_click__":0,Y1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_delete__":1,X1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_backspace__":2,Z1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_next__":3,J1=process.env.NODE_ENV!=="production"?"__selected_item_keydown_navigation_previous__":4,Q1=process.env.NODE_ENV!=="production"?"__dropdown_keydown_navigation_previous__":5,eS=process.env.NODE_ENV!=="production"?"__dropdown_keydown_backspace__":6,tS=process.env.NODE_ENV!=="production"?"__dropdown_click__":7,rS=process.env.NODE_ENV!=="production"?"__function_add_selected_item__":8,nS=process.env.NODE_ENV!=="production"?"__function_remove_selected_item__":9,iS=process.env.NODE_ENV!=="production"?"__function_set_selected_items__":10,oS=process.env.NODE_ENV!=="production"?"__function_set_active_index__":11,aS=process.env.NODE_ENV!=="production"?"__function_reset__":12,xY=Object.freeze({__proto__:null,DropdownClick:tS,DropdownKeyDownBackspace:eS,DropdownKeyDownNavigationPrevious:Q1,FunctionAddSelectedItem:rS,FunctionRemoveSelectedItem:nS,FunctionReset:aS,FunctionSetActiveIndex:oS,FunctionSetSelectedItems:iS,SelectedItemClick:K1,SelectedItemKeyDownBackspace:X1,SelectedItemKeyDownDelete:Y1,SelectedItemKeyDownNavigationNext:Z1,SelectedItemKeyDownNavigationPrevious:J1});function wY(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 K1:c={activeIndex:n};break;case J1:c={activeIndex:a-1<0?0:a-1};break;case Z1:c={activeIndex:a+1>=s.length?-1:a+1};break;case X1:case Y1:{if(a<0)break;var u=a;s.length===1?u=-1:a===s.length-1&&(u=s.length-2),c=je({selectedItems:[].concat(s.slice(0,a),s.slice(a+1))},{activeIndex:u});break}case Q1:c={activeIndex:s.length-1};break;case eS:c={selectedItems:s.slice(0,s.length-1)};break;case rS:c={selectedItems:[].concat(s,[o])};break;case tS:c={activeIndex:-1};break;case nS:{var d=a,h=s.findIndex(function(y){return i.itemToKey(y)===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 iS:{var p=t.selectedItems;c={selectedItems:p};break}case oS:{var v=t.activeIndex;c={activeIndex:v};break}case aS:c={activeIndex:LC(i,"activeIndex"),selectedItems:LC(i,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return je({},e,c)}var SY=["refKey","ref","onClick","onKeyDown","selectedItem","index"],EY=["refKey","ref","onKeyDown","onClick","preventKeyAction"];sS.stateChangeTypes=xY;function sS(e){e===void 0&&(e={}),R4(e,sS);var t=je({},yY,e),r=t.getA11yStatusMessage,n=t.environment,i=t.keyNavigationNext,o=t.keyNavigationPrevious,a=e4(wY,t,gY,mY),s=a[0],c=a[1],u=s.activeIndex,d=s.selectedItems,h=Cl(),p=C.useRef(null),v=C.useRef();v.current=[];var y=wd({state:s,props:t});E1(r,s,[u,d],n),C.useEffect(function(){h||(u===-1&&p.current?p.current.focus():v.current[u]&&v.current[u].focus())},[u]),Ed({props:t,state:s});var m=Sd("getDropdownProps"),g=C.useMemo(function(){var M;return M={},M[o]=function(){c({type:J1})},M[i]=function(){c({type:Z1})},M.Delete=function(){c({type:Y1})},M.Backspace=function(){c({type:X1})},M},[c,i,o]),w=C.useMemo(function(){var M;return M={},M[o]=function(z){BC(z)&&c({type:Q1})},M.Backspace=function(z){BC(z)&&c({type:eS})},M},[c,o]),x=C.useCallback(function(M){var z,j=M===void 0?{}:M,W=j.refKey,U=W===void 0?"ref":W,A=j.ref,K=j.onClick,V=j.onKeyDown,te=j.selectedItem,G=j.index,re=Ir(j,SY),P=y.current.state,B=w1(te,G,P.selectedItems,"Pass either item or index to getSelectedItemProps!"),X=B[1],Q=X>-1&&X===P.activeIndex,D=function(){c({type:K1,index:X})},$=function(H){var q=Ra(H);q&&g[q]&&g[q](H)};return je((z={},z[U]=zn(A,function(H){H&&v.current.push(H)}),z.tabIndex=Q?0:-1,z.onClick=st(K,D),z.onKeyDown=st(V,$),z),re)},[c,y,g]),_=C.useCallback(function(M,z){var j,W=M===void 0?{}:M,U=W.refKey,A=U===void 0?"ref":U,K=W.ref,V=W.onKeyDown,te=W.onClick,G=W.preventKeyAction,re=G===void 0?!1:G,P=Ir(W,EY),B=z===void 0?{}:z,X=B.suppressRefError,Q=X===void 0?!1:X;m("getDropdownProps",Q,A,p);var D=function(H){var q=Ra(H);q&&w[q]&&w[q](H)},$=function(){c({type:tS})};return je((j={},j[A]=zn(K,function(H){H&&(p.current=H)}),j),!re&&{onKeyDown:st(V,D),onClick:st(te,$)},P)},[c,w,m]),S=C.useCallback(function(M){c({type:rS,selectedItem:M})},[c]),E=C.useCallback(function(M){c({type:nS,selectedItem:M})},[c]),I=C.useCallback(function(M){c({type:iS,selectedItems:M})},[c]),N=C.useCallback(function(M){c({type:oS,activeIndex:M})},[c]),T=C.useCallback(function(){c({type:aS})},[c]);return{getSelectedItemProps:x,getDropdownProps:_,addSelectedItem:S,removeSelectedItem:E,setSelectedItems:I,setActiveIndex:N,reset:T,selectedItems:d,activeIndex:u}}let _Y=0;const OY=()=>{const e=C.useRef(null);return e.current===null&&(e.current=`select-${++_Y}`),e.current},CY=e=>{const{items:t=[],isMulti:r=!1,isSearchable:n=!1,value:i,defaultValue:o,inputValue:a,onChange:s,onInputChange:c,getOptionLabel:u=le=>(le==null?void 0:le.label)||"",getOptionValue:d=le=>(le==null?void 0:le.value)||"",isOpen:h,onOpenChange:p,customOptionGenerator:v,disableInternalFiltering:y=!1,stateReducer:m,isDisabled:g=!1,clearSearchOnSelect:w=!1,closeMenuOnSelect:x,onSelectionComplete:_,id:S}=e,E=OY(),I=S||E,N=C.useCallback(le=>{const xe=u(le);if(typeof xe=="string")return xe;if(typeof xe=="number")return String(xe);const Ee=le;if(typeof Ee=="object"&&Ee!==null){if(typeof Ee.label=="string")return Ee.label;if(typeof Ee.name=="string")return Ee.name}return String(d(le))},[u,d]),T=le=>le?Array.isArray(le)?le:[le]:[],M=o!==void 0?o:i!==void 0?i:null,[z,j]=C.useState(()=>T(M)),[W,U]=C.useState(()=>{if(a!==void 0)return a;if(n&&!r){const le=T(M)[0];if(le!==void 0)return N(le)}return""}),[A,K]=C.useState(()=>h!==void 0?h:!1),V=i!==void 0?T(i):z,te=a!==void 0?a:W,G=h!==void 0?h:A,re=C.useRef(null),P=C.useRef(null),B=C.useRef(!1);C.useEffect(()=>{const le=xe=>{const Ee=xe.target,Ie=document.querySelectorAll(`[data-select-id="${I}"]`);B.current=Array.from(Ie).some(Te=>Te.contains(Ee))};return document.addEventListener("mousedown",le,!0),()=>document.removeEventListener("mousedown",le,!0)},[I]);const X=C.useCallback(le=>{h===void 0&&K(le),p==null||p(le)},[h,p]),Q=C.useCallback(le=>{i===void 0&&j(le);const xe=r?le:le[0]||null;s==null||s(xe)},[i,r,s]),D=C.useCallback(le=>{a===void 0&&U(le),c==null||c(le)},[a,c]),$=sS({selectedItems:V,onSelectedItemsChange:le=>{const xe=le.selectedItems||[];Q(xe)}}),H=C.useCallback(le=>{r&&$.removeSelectedItem(le)},[r,$]),q=C.useCallback(le=>{if(le){if(r)V.some(xe=>d(xe)===d(le))?H(le):$.addSelectedItem(le);else{const xe=V[0];(!xe||d(xe)!==d(le))&&Q([le])}_==null||_(d(le),le)}},[r,V,d,H,$,Q,_]);C.useEffect(()=>{if(P.current){const le=P.current;P.current=null,q(le)}}),C.useLayoutEffect(()=>{if(n&&G){const le=requestAnimationFrame(()=>{var xe;(xe=re.current)==null||xe.focus()});return()=>cancelAnimationFrame(le)}},[n,G]),C.useEffect(()=>{if(n&&!r&&a===void 0&&!G){const le=V[0],xe=le!==void 0?N(le):"";xe!==W&&U(xe)}},[V,G,n,r]);const[Y,ie]=C.useState(te);C.useEffect(()=>{const le=setTimeout(()=>ie(te),120);return()=>clearTimeout(le)},[te]);const ne=C.useMemo(()=>v?v(te,t):y||!n||!Y?t:t.filter(le=>N(le).toLowerCase().includes(Y.toLowerCase())),[t,te,Y,v,y,n,N]),pe={items:ne,itemToString:le=>le?N(le):"",isOpen:G,onIsOpenChange:({isOpen:le})=>{le!==void 0&&X(le)},selectedItem:r?null:V[0]||null},Z=le=>{const xe=new Map;for(const[Ee,Ie]of Object.entries(le.stateChangeTypes))xe.set(Ie,Ee);return(Ee,Ie)=>{const{changes:Te,type:Me}=Ie,Xe=x??!r,tt=[zr.stateChangeTypes.ItemClick,zr.stateChangeTypes.InputKeyDownEnter,zr.stateChangeTypes.FunctionSelectItem,xi.stateChangeTypes.ItemClick,xi.stateChangeTypes.ToggleButtonKeyDownEnter,xi.stateChangeTypes.ToggleButtonKeyDownSpaceButton,xi.stateChangeTypes.FunctionSelectItem].includes(Me);if((Me===zr.stateChangeTypes.InputBlur||Me===xi.stateChangeTypes.ToggleButtonBlur)&&typeof document<"u"){const Fe=document.activeElement,Le=document.querySelectorAll(`[data-select-id="${I}"]`),ze=!!Fe&&Array.from(Le).some(Pt=>Pt.contains(Fe)),Ze=Fe===document.body,rt=r&&Ze&&B.current;if(ze||rt)return{...Te,isOpen:!0}}if(tt){const Fe=Te.selectedItem||null;Fe&&(P.current=Fe);const Le={...Te};return r?(Le.selectedItem=null,Le.isOpen=!Xe,Le.highlightedIndex=Ee.highlightedIndex,Le.inputValue=""):Fe&&(w?Le.inputValue="":n&&(Le.inputValue=N(Fe)),x===!1&&(Le.isOpen=!0,Le.highlightedIndex=Ee.highlightedIndex)),Le}return n&&!tt&&Me!==zr.stateChangeTypes.InputChange&&(Me===zr.stateChangeTypes.ControlledPropUpdatedSelectedItem||Me===zr.stateChangeTypes.FunctionSetInputValue||Me===zr.stateChangeTypes.InputBlur||Me===zr.stateChangeTypes.FunctionReset)?{...Te,inputValue:Ee.inputValue}:m?m(Ee,{...Ie,type:xe.get(Ie.type)||Ie.type,changes:Te}):Te}},J=n?zr({...pe,inputValue:te,onInputValueChange:({inputValue:le,type:xe})=>{!r&&!le&&xe===zr.stateChangeTypes.InputChange&&Q([]),D(le||"")},stateReducer:Z(zr),id:I}):xi({...pe,stateReducer:Z(xi),id:I}),ae=C.useCallback(()=>{g||("toggleMenu"in J&&typeof J.toggleMenu=="function"?J.toggleMenu():X(!G))},[J,g,X,G]),he=C.useCallback(()=>{g||("openMenu"in J&&typeof J.openMenu=="function"?J.openMenu():X(!0))},[J,g,X]),ue=C.useCallback(()=>{"closeMenu"in J&&typeof J.closeMenu=="function"?J.closeMenu():X(!1)},[J,X]),de=C.useCallback(()=>{Q([]),D(""),r&&$.reset()},[Q,D,r,$]);return{isOpen:J.isOpen,selectedItem:J.selectedItem,highlightedIndex:J.highlightedIndex,inputValue:te,getToggleButtonProps:J.getToggleButtonProps,getMenuProps:J.getMenuProps,getItemProps:J.getItemProps,getInputProps:n?(le,xe)=>({..."getInputProps"in J?J.getInputProps(le,xe):{},ref:re,value:te}):void 0,selectedItems:V,filteredItems:ne,setInputValue:D,setIsOpen:X,toggleMenu:ae,openMenu:he,closeMenu:ue,clearSelection:de,selectItem:"selectItem"in J?J.selectItem:void 0,removeItem:H,multipleSelection:$,isMulti:r,isSearchable:n,inputRef:re,selectId:I}},N4=({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:y,onOpenChange:m,customOptionGenerator:g,disableInternalFiltering:w,getOptionLabel:x=j=>typeof j=="string"||typeof j=="number"?String(j):(j==null?void 0:j.label)||(j==null?void 0:j.name)||String(j),getOptionValue:_=j=>typeof j=="string"||typeof j=="number"?String(j):(j==null?void 0:j.value)||(j==null?void 0:j.id)||(j==null?void 0:j.name)||String(j),isOptionDisabled:S=j=>(j==null?void 0:j.isDisabled)||!1,stateReducer:E,clearSearchOnSelect:I,closeMenuOnSelect:N,inputClassName:T,onSelectionComplete:M,...z})=>{const[j,W]=C.useState(!1),[U,A]=C.useState(!1),K=C.useRef(null),[V,te]=C.useState(!1),[G,re]=C.useState("bottom"),P=C.useRef(new Set),B=C.useCallback(H=>(P.current.add(H),()=>P.current.delete(H)),[]),X=C.useCallback((H,q)=>{M==null||M(H,q),P.current.forEach(Y=>Y(H,q))},[M]),Q=C.useMemo(()=>mK(a),[a]),D=CY({items:Q,value:s,defaultValue:c,onChange:u,isMulti:d,inputValue:h,onInputChange:p,isSearchable:v,isOpen:y,onOpenChange:m,getOptionLabel:x,getOptionValue:_,customOptionGenerator:g,disableInternalFiltering:w,stateReducer:E,isDisabled:n,clearSearchOnSelect:I,closeMenuOnSelect:N,onSelectionComplete:X}),$={size:e,color:r?"negative":t,isInvalid:r,isDisabled:n,hasMessage:j,setHasMessage:W,hasGroup:U,setHasGroup:A,groupRef:K,menuVisible:V,setMenuVisible:te,menuPlacement:G,setMenuPlacement:re,downshift:D,options:a,getOptionLabel:x,getOptionValue:_,isOptionDisabled:S,inputClassName:T,registerOnSelectionComplete:B};return O.jsx(C3.Provider,{value:$,children:O.jsx("div",{"data-qui":"Select","data-select-id":D.selectId,className:ye(JG(),i),...z,children:o})})},IY=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}=or(),y=n??c,m=r??h.isOpen;return O.jsx("div",{ref:o,className:ye(tK({size:a,color:s,isDisabled:y,isFocused:!!m,isInvalid:p&&!h.isOpen,hasMessage:u,hasGroup:d,menuPlacement:h.isOpen?v:void 0}),e),"aria-disabled":y,"aria-invalid":p,role:"combobox",tabIndex:y?-1:0,...i,children:t})}),RY=({className:e,children:t,isMulti:r})=>O.jsx("div",{className:ye(rK({isMulti:r}),e),children:t}),xu=C.forwardRef(({isHidden:e,inputClassName:t,className:r,...n},i)=>{const{size:o,color:a}=or();return e?O.jsx("input",{ref:i,type:"text",className:r,style:{position:"absolute",top:0,left:0,opacity:0,width:"100%",height:"100%",pointerEvents:"none"},tabIndex:-1,...n}):O.jsx("input",{ref:i,type:"text","data-qui":"SelectSearchInput",className:ye(nK({size:o,color:a}),t,e?"":r),...n})}),NY=({className:e,children:t})=>{const{size:r,color:n}=or();return O.jsx("div",{className:ye(iK({size:r,color:n}),e),children:t})},TY=({className:e,children:t,data:r,isDisabled:n})=>{const{size:i,color:o,getOptionLabel:a}=or();return O.jsx("div",{className:ye(oK({size:i,color:o,isDisabled:n}),e),children:t||a(r)})},T4=({className:e,children:t,data:r,isDisabled:n,isFocused:i,onRemove:o})=>{const{size:a,color:s,downshift:c,getOptionLabel:u}=or(),d=()=>{o?o(r):c.removeItem(r)};return O.jsxs("div",{className:ye(aK({size:a,color:s,isDisabled:n,isFocused:i}),e),children:[O.jsx("div",{className:sK({size:a}),children:t||u(r)}),!n&&O.jsx("div",{className:lK({size:a,color:s,isDisabled:!1}),onClick:d,children:O.jsx(fd,{className:"w-3 h-3"})})]})},P4=({color:e,className:t,children:r,onClick:n,isDisabled:i,...o})=>{const{size:a,color:s,isDisabled:c,downshift:u}=or(),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:ye(R3({size:a,color:e||s,isDisabled:d}),t),onClick:p,role:"button",tabIndex:0,"aria-label":"Clear selection",...o,children:r||O.jsx(QD,{})})},PY=({className:e,children:t,onClick:r,isDisabled:n,...i})=>{const{size:o,color:a,isDisabled:s,downshift:c}=or(),u=n??s,d=c.inputValue.length>0&&c.isSearchable;if(u||!d)return null;const h=p=>{u||(p.preventDefault(),p.stopPropagation(),r?r(p):(c.setInputValue(""),c.clearSelection()))};return O.jsx("div",{"data-qui":"SelectIndicator",className:ye(R3({size:o,color:a,isDisabled:u}),"cursor-pointer",e),onClick:h,onMouseDown:p=>{p.preventDefault(),p.stopPropagation()},role:"button",tabIndex:-1,"aria-label":"Clear selection",...i,children:t||O.jsx(fd,{})})},M4=C.forwardRef(({color:e,className:t,children:r,onClick:n,isDisabled:i,...o},a)=>{const{size:s,color:c,isDisabled:u,downshift:d}=or(),h=i??u,p=d.isOpen,v=m=>{h||(m.preventDefault(),m.stopPropagation(),n?n(m):d.toggleMenu())},y=m=>{m.preventDefault(),m.stopPropagation()};return O.jsx("div",{ref:a,"data-qui":"SelectIndicator",className:ye(cK({size:s,color:e||c,isDisabled:h}),"cursor-pointer",t),onClick:y,onMouseDown:v,role:"button",tabIndex:-1,"aria-label":p?"Close menu":"Open menu","aria-expanded":p,"aria-disabled":h,...o,children:r||O.jsx(rj,{className:ye("transition-transform duration-200",{"rotate-180":p})})})}),MY=C.forwardRef(({className:e,children:t,placement:r,...n},i)=>{const{size:o,hasMessage:a,color:s,hasGroup:c}=or();return O.jsx("div",{"data-qui":"SelectMenu",ref:i,className:ye(uK({size:o,placement:r,hasMessage:a,color:s,hasGroup:c}),e),...n,children:t})}),kY=C.forwardRef(({className:e,children:t,maxHeight:r=300,totalHeight:n,...i},o)=>{const{size:a}=or();return O.jsx(o1,{scrollableNodeProps:{ref:o},className:ye(dK({size:a}),e),style:{maxHeight:r},...i,children:n!==void 0?O.jsx("div",{style:{height:n,position:"relative",width:"100%"},children:t}):t})}),wu=({className:e,children:t,data:r,isDisabled:n,isFocused:i,isSelected:o,innerProps:a,optionClassName:s,...c})=>{const{size:u,color:d,getOptionLabel:h}=or();return O.jsx("div",{"data-qui":"SelectOption",className:ye(fK({size:u,color:d,isDisabled:n,isFocused:i,isSelected:o}),s,e),...a,...c,children:t??h(r)})},k4=({className:e,children:t,data:r,label:n,renderGroupHeading:i})=>{const{size:o}=or();return O.jsxs("div",{"data-qui":"SelectOptionGroup",className:ye(hK({size:o}),e),children:[O.jsx(AY,{children:i?i(r):n||r.label}),t]})},AY=({className:e,children:t})=>{const{size:r,color:n}=or();return O.jsx("div",{className:ye(pK({size:r,color:n}),e),children:t})},Uh=({className:e,children:t,inputValue:r})=>{const{size:n}=or();return O.jsx("div",{className:ye(gK({size:n}),e),children:t||`No options found${r?` for "${r}"`:""}`})},A4=C.forwardRef(({className:e,children:t,...r},n)=>{const{size:i,color:o,isDisabled:a,hasMessage:s,isInvalid:c,setHasGroup:u,groupRef:d,menuVisible:h,menuPlacement:p}=or();return C.useEffect(()=>(u(!0),()=>{u(!1)}),[u]),O.jsx("div",{ref:ga([n,d]),"data-qui":"SelectGroup",className:ye(QG({size:i,color:o,isDisabled:a,hasMessage:s,isInvalid:c,isFocused:h,menuPlacement:h?p:void 0}),e),...r,children:t})}),DY=C.forwardRef(({isAction:e=!1,className:t,isDisabled:r=!1,style:n,children:i,...o},a)=>{const{size:s,color:c,isDisabled:u}=or(),d=r||u,h=eK({size:s,color:c,isDisabled:d,isAction:e});return O.jsx("div",{ref:a,"data-qui":"SelectIcon",className:ye(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})}),jY=({isOpen:e,usePortal:t,controlRef:r,selectId:n,children:i})=>{const[o,a]=C.useState(null);return C.useLayoutEffect(()=>{if(t&&e&&r.current){const s=()=>{var c;const u=(c=r.current)==null?void 0:c.closest('[data-qui="SelectGroup"]'),d=u||r.current;if(!d)return;const h=d.getBoundingClientRect();a(u?{top:h.top+window.scrollY+u.clientTop,left:h.left+window.scrollX+u.clientLeft,width:u.clientWidth,height:u.clientHeight}:{top:h.top+window.scrollY,left:h.left+window.scrollX,width:h.width,height:h.height})};return s(),window.addEventListener("resize",s),window.addEventListener("scroll",s,!0),()=>{window.removeEventListener("resize",s),window.removeEventListener("scroll",s,!0)}}},[e,t,r]),e?t&&o?xn.createPortal(O.jsx("div",{"data-qui":"SelectPortal","data-select-id":n,style:{position:"absolute",top:o.top,left:o.left,width:o.width,height:o.height,zIndex:50,pointerEvents:"none"},children:O.jsx("div",{style:{pointerEvents:"auto"},children:i})}),document.body):O.jsx(O.Fragment,{children:i}):null},ga=e=>t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&"current"in r&&(r.current=t)})},qY=e=>{let t=0,r=window.innerHeight,n=e.parentElement;for(;n&&n!==document.body&&n!==document.documentElement;){const{overflowY:i}=window.getComputedStyle(n);if(i!=="visible"){const o=n.getBoundingClientRect();t=Math.max(t,o.top),r=Math.min(r,o.bottom)}n=n.parentElement}return{top:t,bottom:r}},D4=C.forwardRef(({placeholder:e,noOptionsMessage:t,hideNoOptions:r=!1,loadingMessage:n="Loading...",isClearable:i=!1,isSearchClearable:o=!1,isLoading:a=!1,isRequired:s=!1,hideIndicators:c=!1,hideDropdownIndicator:u=!1,searchPlacement:d="trigger",menuPlacement:h="bottom",hideSelectedOptions:p=!1,onFocus:v,onBlur:y,renderMenuHeader:m,formatOptionLabel:g,renderOption:w,optionClassName:x,renderValue:_,renderGroupHeading:S,inputRef:E,controlShouldRenderValue:I=!0,name:N,id:T,onSelectionComplete:M,"aria-label":z,"aria-labelledby":j,"aria-describedby":W,children:U,usePortal:A=!1,virtualizeThreshold:K=100,className:V,inputClassName:te,...G},re)=>{const{size:P,isInvalid:B,isDisabled:X,hasGroup:Q,downshift:D,options:$=[],getOptionLabel:H,getOptionValue:q,isOptionDisabled:Y,menuPlacement:ie,setMenuPlacement:ne,menuVisible:pe,setMenuVisible:Z,inputClassName:J}=or(),ae=te||J,he=C.useMemo(()=>{if(w)return w;if(g)return({data:ke})=>g(ke)},[w,g]),ue=C.useRef(null),de=E||ue,le=C.useRef(null),[xe,Ee]=C.useState(null),Ie=C.useRef(null),{isOpen:Te,openMenu:Me,selectedItem:Xe,inputValue:tt,highlightedIndex:Fe,getToggleButtonProps:Le,getMenuProps:ze,getInputProps:Ze,getItemProps:rt,isMulti:Pt,isSearchable:gt,multipleSelection:Rt}=D,{getDropdownProps:qt}=Rt;C.useLayoutEffect(()=>{if(!Te)return;if(h==="top"||h==="bottom"){ne(h);return}const ke=le.current;if(!ke)return;const $e=()=>{const Ht=ke.getBoundingClientRect(),wr=A?{top:0,bottom:window.innerHeight}:qY(ke),Sr=wr.bottom-Ht.bottom,tr=Ht.top-wr.top,un=P==="sm"?22:P==="lg"?36:28,Yr=Math.min((D.filteredItems.length||1)*un+16,300),ci=xe==null?void 0:xe.getBoundingClientRect().height,Ni=ci&&ci>0?ci:Yr,Qa=Sr>=Ni;ne(!Qa&&tr>Sr?"top":"bottom")};$e(),window.addEventListener("resize",$e),window.addEventListener("scroll",$e,!0);const xr=xe&&typeof ResizeObserver<"u"?new ResizeObserver(()=>$e()):void 0;return xe&&(xr==null||xr.observe(xe)),()=>{window.removeEventListener("resize",$e),window.removeEventListener("scroll",$e,!0),xr==null||xr.disconnect()}},[Te,ne,P,D.filteredItems.length,h,A,xe]),C.useLayoutEffect(()=>{const ke=Te&&!(r&&D.filteredItems.length===0);return Z(ke),()=>Z(!1)},[Te,r,D.filteredItems.length,Z]);const Ot=Pt?D.selectedItems??[]:Xe?[Xe]:[],Gr=Ot.length>0,Kr=o&&!!tt&&!X&&!c,ar=i&&(Gr||!!tt)&&!X&&!c,Nn=!u&&!c,no=!Gr&&(!gt||!tt)||!I,zt={},Mt={};Object.entries(G).forEach(([ke,$e])=>{ke.startsWith("data-")||ke.startsWith("aria-")||ke==="role"?zt[ke]=$e:Mt[ke]=$e});const Lt=C.useMemo(()=>ga([le,re]),[re]),fr=ze({},{suppressRefError:!0}),kt=qt({preventKeyAction:Te}),At={ref:de,disabled:X,required:s,name:N,id:T,"aria-label":z,"aria-labelledby":j,"aria-describedby":W,"aria-invalid":B,onFocus:v,onBlur:y,...Mt},hr=gt?(Ze==null?void 0:Ze({...At,...kt}))??At:{...At,...kt},{ref:Mr,...Et}=hr,Bt=C.useMemo(()=>ga([Mr]),[Mr]),{ref:pr,...vr}=fr,yr=C.useRef(pr);yr.current=pr;const sr=C.useCallback(ke=>{Ee($e=>$e===ke?$e:ke),ga([yr.current])(ke)},[]),Tn=ke=>Ot.some($e=>q($e)===q(ke)),Un=ke=>p?ke.filter($e=>!Tn($e)):ke,Za=ke=>p?ke.map($e=>({...$e,options:Un($e.options)})).filter($e=>$e.options.length>0):ke,Gn=Rw($)?[]:Un(D.filteredItems),Ja={sm:22,md:28,lg:36}[P]??28,Kn=Gn.length>=K,Ri=ZG({count:Kn?Gn.length:0,getScrollElement:()=>Ie.current,estimateSize:()=>Ja,overscan:5});C.useEffect(()=>{Kn&&Te&&Fe>=0&&Fe<Gn.length&&Ri.scrollToIndex(Fe,{align:"auto"})},[Fe,Kn,Te]);const{registerOnSelectionComplete:Bo}=or();C.useEffect(()=>{if(M)return Bo(M)},[M,Bo]);const Fo=gt?{}:Le({disabled:X,...kt,ref:ga([Lt,kt.ref])});return O.jsxs("div",{className:ye({relative:!Q,"flex-1 min-w-0":Q}),children:[O.jsxs(IY,{"data-qui":"SelectControl",className:V,...gt?{ref:ga([Lt,kt.ref])}:Fo,...zt,isFocused:pe,isDisabled:X,onClick:ke=>{ke.defaultPrevented||(gt?Me():D.toggleMenu())},children:[U||O.jsxs(RY,{isMulti:Pt,children:[Pt&&I&&Ot.map((ke,$e)=>O.jsx(T4,{data:ke,index:$e,isDisabled:X,children:_?_(ke):void 0},q(ke))),!Pt&&Gr&&I&&!gt&&O.jsx("div",{className:"flex items-center gap-2",children:O.jsx(TY,{data:Ot[0],isDisabled:X,children:_?_(Ot[0]):H(Ot[0])})}),gt&&d==="trigger"?O.jsx(xu,{ref:Bt,...Et,className:V,inputClassName:ae,placeholder:e}):O.jsxs(O.Fragment,{children:[O.jsx(xu,{ref:Bt,...Et,className:V,inputClassName:ae,isHidden:!0,readOnly:!0,value:Ot.map(ke=>q(ke)).join(",")}),no&&O.jsx(NY,{children:e})]})]}),O.jsxs("div",{className:ye("flex items-center size-fit gap-1",{hidden:!ar&&!Nn}),children:[Kr&&O.jsx(PY,{}),ar&&O.jsx(P4,{}),Nn&&O.jsx(M4,{...gt?Le({disabled:X,"aria-label":Te?"Close menu":"Open menu"}):{}})]})]}),!Te&&O.jsx("div",{ref:fr.ref,style:{display:"none"},"aria-hidden":"true"}),O.jsx(jY,{isOpen:Te,usePortal:A,controlRef:le,selectId:D.selectId,children:r&&D.filteredItems.length===0?O.jsx("div",{...vr,style:{display:"none"},"aria-hidden":"true"}):O.jsxs(MY,{ref:sr,...vr,placement:ie,children:[m&&m(D),gt&&d==="menu"&&O.jsx("div",{className:"p-2",children:O.jsx(xu,{ref:Bt,...Et,className:V,inputClassName:ae,autoFocus:!0,placeholder:e,onClick:ke=>ke.stopPropagation()})}),O.jsx(kY,{ref:Ie,totalHeight:Kn?Ri.getTotalSize():void 0,children:a?O.jsx("div",{className:vK({size:P}),children:n}):D.filteredItems.length===0?O.jsx(Uh,{inputValue:tt,children:typeof t=="function"?t(tt):t}):Rw($)?(()=>{const ke=Za($);return ke.length===0?O.jsx(Uh,{inputValue:tt,children:typeof t=="function"?t(tt):t}):ke.map(($e,xr)=>O.jsx(k4,{data:$e,label:$e.label,options:$e.options,renderGroupHeading:S,children:$e.options.map(Ht=>{const wr=q(Ht),Sr=Ot.some(Ni=>q(Ni)===wr),tr=D.filteredItems.indexOf(Ht),un=Fe===tr,Yr=Y(Ht),ci=rt({item:Ht,index:tr});return O.jsx(wu,{...ci,data:Ht,isDisabled:Yr,isFocused:un,isSelected:Sr,optionClassName:x,children:he?he({data:Ht,isFocused:un,isSelected:Sr,isDisabled:Yr}):void 0},`${wr}-${tr}`)})},`${$e.label}-${xr}`))})():Gn.length===0?O.jsx(Uh,{inputValue:tt,children:typeof t=="function"?t(tt):t}):Kn?Ri.getVirtualItems().map(ke=>{const $e=Gn[ke.index],xr=q($e),Ht=Ot.some(Yr=>q(Yr)===xr),wr=D.filteredItems.indexOf($e),Sr=Fe===wr,tr=Y($e),un=rt({item:$e,index:wr});return O.jsx("div",{"data-index":ke.index,ref:Ri.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${ke.start}px)`},children:O.jsx(wu,{...un,data:$e,isDisabled:tr,isFocused:Sr,isSelected:Ht,optionClassName:x,children:he?he({data:$e,isFocused:Sr,isSelected:Ht,isDisabled:tr}):void 0})},ke.key)}):Gn.map(ke=>{const $e=q(ke),xr=Ot.some(un=>q(un)===$e),Ht=D.filteredItems.indexOf(ke),wr=Fe===Ht,Sr=Y(ke),tr=rt({item:ke,index:Ht});return O.jsx(wu,{...tr,data:ke,isDisabled:Sr,isFocused:wr,isSelected:xr,optionClassName:x,children:he?he({data:ke,isFocused:wr,isSelected:xr,isDisabled:Sr}):void 0},`${$e}-${Ht}`)})})]})})]})});N4.displayName="Select.Root";A4.displayName="Select.Group";DY.displayName="Select.Icon";xu.displayName="Select.Input";T4.displayName="Select.MultiValue";P4.displayName="Select.ClearIndicator";M4.displayName="Select.DropdownIndicator";wu.displayName="Select.Option";k4.displayName="Select.OptionGroup";const zY=D4;zY.displayName="Select.Field";const Gh={Root:N4,Group:A4,Field:D4};C.createContext(void 0);const LY=({active:e,disabled:t,error:r,isOpen:n,className:i})=>ye("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),BY=C.forwardRef(({active:e,disabled:t,error:r,isOpen:n,className:i,children:o,as:a="div",...s},c)=>{const u=LY({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})});BY.displayName="ListItem";function FY({qodly:e,activeTab:t,forceLogin:r,onTabChange:n,restrictedByDefault:i,onRestrictedByDefaultChange:o,onForceLoginChange:a}){return O.jsx(O.Fragment,{children:O.jsx(br,{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(qh,{defaultValue:t,onTabChange:s=>n(s),children:[O.jsx(qh.Item,{label:"Roles",value:"roles","data-cy":"roles_btn_navbar",className:"min-w-[110px] place-content-center"}),O.jsx(qh.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(Bu,{checked:i||!1,onChange:s=>{o(s)}}),O.jsx("span",{className:"px-1 text-xs",children:"Restrict Access By Default"}),O.jsx(ve.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(Bu,{checked:r||!1,onChange:s=>{a(s)}}),O.jsx("span",{className:"px-1 text-xs",children:"Force login"}),O.jsx(ve.Tip,{tipKey:"editors:roles:toolbar:forceLogin",alwaysOn:!0,side:"left"})]})]})]})})})})}const j4=C.createContext(void 0),$Y=({children:e})=>{const[t,r]=C.useState(null),[n,i]=C.useState(null);function o(s){r(s),setTimeout(()=>i(s),0)}const a={selectedRole:t,deferredSelectedRole:n,selectRole:o};return O.jsx(j4.Provider,{value:a,children:e})};function lS(){const e=C.useContext(j4);if(e===void 0)throw new Error("useSelectedRole must be used within a SelectedRoleProvider");return e}var FC=function(t){return t.reduce(function(r,n){var i=n[0],o=n[1];return r[i]=o,r},{})},$C=typeof window<"u"&&window.document&&window.document.createElement?nt.useLayoutEffect:nt.useEffect,$r="top",En="bottom",_n="right",Vr="left",cS="auto",Il=[$r,En,_n,Vr],Na="start",dl="end",VY="clippingParents",q4="viewport",Es="popper",HY="reference",VC=Il.reduce(function(e,t){return e.concat([t+"-"+Na,t+"-"+dl])},[]),z4=[].concat(Il,[cS]).reduce(function(e,t){return e.concat([t,t+"-"+Na,t+"-"+dl])},[]),WY="beforeRead",UY="read",GY="afterRead",KY="beforeMain",YY="main",XY="afterMain",ZY="beforeWrite",JY="write",QY="afterWrite",eX=[WY,UY,GY,KY,YY,XY,ZY,JY,QY];function ai(e){return e?(e.nodeName||"").toLowerCase():null}function sn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function To(e){var t=sn(e).Element;return e instanceof t||e instanceof Element}function Sn(e){var t=sn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function uS(e){if(typeof ShadowRoot>"u")return!1;var t=sn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function tX(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];!Sn(o)||!ai(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 rX(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},{});!Sn(i)||!ai(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const nX={name:"applyStyles",enabled:!0,phase:"write",fn:tX,effect:rX,requires:["computeStyles"]};function ni(e){return e.split("-")[0]}var Eo=Math.max,Ku=Math.min,Ta=Math.round;function Mw(){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 L4(){return!/^((?!chrome|android).)*safari/i.test(Mw())}function Pa(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,o=1;t&&Sn(e)&&(i=e.offsetWidth>0&&Ta(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ta(n.height)/e.offsetHeight||1);var a=To(e)?sn(e):window,s=a.visualViewport,c=!L4()&&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 dS(e){var t=Pa(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 B4(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&uS(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ei(e){return sn(e).getComputedStyle(e)}function iX(e){return["table","td","th"].indexOf(ai(e))>=0}function Ji(e){return((To(e)?e.ownerDocument:e.document)||window.document).documentElement}function _d(e){return ai(e)==="html"?e:e.assignedSlot||e.parentNode||(uS(e)?e.host:null)||Ji(e)}function HC(e){return!Sn(e)||Ei(e).position==="fixed"?null:e.offsetParent}function oX(e){var t=/firefox/i.test(Mw()),r=/Trident/i.test(Mw());if(r&&Sn(e)){var n=Ei(e);if(n.position==="fixed")return null}var i=_d(e);for(uS(i)&&(i=i.host);Sn(i)&&["html","body"].indexOf(ai(i))<0;){var o=Ei(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 Rl(e){for(var t=sn(e),r=HC(e);r&&iX(r)&&Ei(r).position==="static";)r=HC(r);return r&&(ai(r)==="html"||ai(r)==="body"&&Ei(r).position==="static")?t:r||oX(e)||t}function fS(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function tl(e,t,r){return Eo(e,Ku(t,r))}function aX(e,t,r){var n=tl(e,t,r);return n>r?r:n}function F4(){return{top:0,right:0,bottom:0,left:0}}function $4(e){return Object.assign({},F4(),e)}function V4(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var sX=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,$4(typeof t!="number"?t:V4(t,Il))};function lX(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=ni(r.placement),c=fS(s),u=[Vr,_n].indexOf(s)>=0,d=u?"height":"width";if(!(!o||!a)){var h=sX(i.padding,r),p=dS(o),v=c==="y"?$r:Vr,y=c==="y"?En:_n,m=r.rects.reference[d]+r.rects.reference[c]-a[c]-r.rects.popper[d],g=a[c]-r.rects.reference[c],w=Rl(o),x=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,_=m/2-g/2,S=h[v],E=x-p[d]-h[y],I=x/2-p[d]/2+_,N=tl(S,I,E),T=c;r.modifiersData[n]=(t={},t[T]=N,t.centerOffset=N-I,t)}}function cX(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)||B4(t.elements.popper,i)&&(t.elements.arrow=i))}const uX={name:"arrow",enabled:!0,phase:"main",fn:lX,effect:cX,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ma(e){return e.split("-")[1]}var dX={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fX(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:Ta(r*i)/i||0,y:Ta(n*i)/i||0}}function WC(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,y=a.y,m=y===void 0?0:y,g=typeof d=="function"?d({x:v,y:m}):{x:v,y:m};v=g.x,m=g.y;var w=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),_=Vr,S=$r,E=window;if(u){var I=Rl(r),N="clientHeight",T="clientWidth";if(I===sn(r)&&(I=Ji(r),Ei(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",T="scrollWidth")),I=I,i===$r||(i===Vr||i===_n)&&o===dl){S=En;var M=h&&I===E&&E.visualViewport?E.visualViewport.height:I[N];m-=M-n.height,m*=c?1:-1}if(i===Vr||(i===$r||i===En)&&o===dl){_=_n;var z=h&&I===E&&E.visualViewport?E.visualViewport.width:I[T];v-=z-n.width,v*=c?1:-1}}var j=Object.assign({position:s},u&&dX),W=d===!0?fX({x:v,y:m},sn(r)):{x:v,y:m};if(v=W.x,m=W.y,c){var U;return Object.assign({},j,(U={},U[S]=x?"0":"",U[_]=w?"0":"",U.transform=(E.devicePixelRatio||1)<=1?"translate("+v+"px, "+m+"px)":"translate3d("+v+"px, "+m+"px, 0)",U))}return Object.assign({},j,(t={},t[S]=x?m+"px":"",t[_]=w?v+"px":"",t.transform="",t))}function hX(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:ni(t.placement),variation:Ma(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,WC(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,WC(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 pX={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:hX,data:{}};var Uc={passive:!0};function vX(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=sn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",r.update,Uc)}),s&&c.addEventListener("resize",r.update,Uc),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",r.update,Uc)}),s&&c.removeEventListener("resize",r.update,Uc)}}const gX={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vX,data:{}};var mX={left:"right",right:"left",bottom:"top",top:"bottom"};function Su(e){return e.replace(/left|right|bottom|top/g,function(t){return mX[t]})}var bX={start:"end",end:"start"};function UC(e){return e.replace(/start|end/g,function(t){return bX[t]})}function hS(e){var t=sn(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function pS(e){return Pa(Ji(e)).left+hS(e).scrollLeft}function yX(e,t){var r=sn(e),n=Ji(e),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var u=L4();(u||!u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+pS(e),y:c}}function xX(e){var t,r=Ji(e),n=hS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Eo(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Eo(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+pS(e),c=-n.scrollTop;return Ei(i||r).direction==="rtl"&&(s+=Eo(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}function vS(e){var t=Ei(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function H4(e){return["html","body","#document"].indexOf(ai(e))>=0?e.ownerDocument.body:Sn(e)&&vS(e)?e:H4(_d(e))}function rl(e,t){var r;t===void 0&&(t=[]);var n=H4(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=sn(n),a=i?[o].concat(o.visualViewport||[],vS(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(rl(_d(a)))}function kw(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function wX(e,t){var r=Pa(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 GC(e,t,r){return t===q4?kw(yX(e,r)):To(t)?wX(t,r):kw(xX(Ji(e)))}function SX(e){var t=rl(_d(e)),r=["absolute","fixed"].indexOf(Ei(e).position)>=0,n=r&&Sn(e)?Rl(e):e;return To(n)?t.filter(function(i){return To(i)&&B4(i,n)&&ai(i)!=="body"}):[]}function EX(e,t,r,n){var i=t==="clippingParents"?SX(e):[].concat(t),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(c,u){var d=GC(e,u,n);return c.top=Eo(d.top,c.top),c.right=Ku(d.right,c.right),c.bottom=Ku(d.bottom,c.bottom),c.left=Eo(d.left,c.left),c},GC(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 W4(e){var t=e.reference,r=e.element,n=e.placement,i=n?ni(n):null,o=n?Ma(n):null,a=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(i){case $r:c={x:a,y:t.y-r.height};break;case En:c={x:a,y:t.y+t.height};break;case _n:c={x:t.x+t.width,y:s};break;case Vr:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var u=i?fS(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case Na:c[u]=c[u]-(t[d]/2-r[d]/2);break;case dl:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function fl(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?VY:s,u=r.rootBoundary,d=u===void 0?q4:u,h=r.elementContext,p=h===void 0?Es:h,v=r.altBoundary,y=v===void 0?!1:v,m=r.padding,g=m===void 0?0:m,w=$4(typeof g!="number"?g:V4(g,Il)),x=p===Es?HY:Es,_=e.rects.popper,S=e.elements[y?x:p],E=EX(To(S)?S:S.contextElement||Ji(e.elements.popper),c,d,a),I=Pa(e.elements.reference),N=W4({reference:I,element:_,placement:i}),T=kw(Object.assign({},_,N)),M=p===Es?T:I,z={top:E.top-M.top+w.top,bottom:M.bottom-E.bottom+w.bottom,left:E.left-M.left+w.left,right:M.right-E.right+w.right},j=e.modifiersData.offset;if(p===Es&&j){var W=j[i];Object.keys(z).forEach(function(U){var A=[_n,En].indexOf(U)>=0?1:-1,K=[$r,En].indexOf(U)>=0?"y":"x";z[U]+=W[K]*A})}return z}function _X(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?z4:c,d=Ma(n),h=d?s?VC:VC.filter(function(y){return Ma(y)===d}):Il,p=h.filter(function(y){return u.indexOf(y)>=0});p.length===0&&(p=h);var v=p.reduce(function(y,m){return y[m]=fl(e,{placement:m,boundary:i,rootBoundary:o,padding:a})[ni(m)],y},{});return Object.keys(v).sort(function(y,m){return v[y]-v[m]})}function OX(e){if(ni(e)===cS)return[];var t=Su(e);return[UC(e),t,UC(t)]}function CX(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,y=v===void 0?!0:v,m=r.allowedAutoPlacements,g=t.options.placement,w=ni(g),x=w===g,_=c||(x||!y?[Su(g)]:OX(g)),S=[g].concat(_).reduce(function(D,$){return D.concat(ni($)===cS?_X(t,{placement:$,boundary:d,rootBoundary:h,padding:u,flipVariations:y,allowedAutoPlacements:m}):$)},[]),E=t.rects.reference,I=t.rects.popper,N=new Map,T=!0,M=S[0],z=0;z<S.length;z++){var j=S[z],W=ni(j),U=Ma(j)===Na,A=[$r,En].indexOf(W)>=0,K=A?"width":"height",V=fl(t,{placement:j,boundary:d,rootBoundary:h,altBoundary:p,padding:u}),te=A?U?_n:Vr:U?En:$r;E[K]>I[K]&&(te=Su(te));var G=Su(te),re=[];if(o&&re.push(V[W]<=0),s&&re.push(V[te]<=0,V[G]<=0),re.every(function(D){return D})){M=j,T=!1;break}N.set(j,re)}if(T)for(var P=y?3:1,B=function($){var H=S.find(function(q){var Y=N.get(q);if(Y)return Y.slice(0,$).every(function(ie){return ie})});if(H)return M=H,"break"},X=P;X>0;X--){var Q=B(X);if(Q==="break")break}t.placement!==M&&(t.modifiersData[n]._skip=!0,t.placement=M,t.reset=!0)}}const IX={name:"flip",enabled:!0,phase:"main",fn:CX,requiresIfExists:["offset"],data:{_skip:!1}};function KC(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 YC(e){return[$r,_n,En,Vr].some(function(t){return e[t]>=0})}function RX(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=fl(t,{elementContext:"reference"}),s=fl(t,{altBoundary:!0}),c=KC(a,n),u=KC(s,i,o),d=YC(c),h=YC(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 NX={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:RX};function TX(e,t,r){var n=ni(e),i=[Vr,$r].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Vr,_n].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function PX(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,a=z4.reduce(function(d,h){return d[h]=TX(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 MX={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:PX};function kX(e){var t=e.state,r=e.name;t.modifiersData[r]=W4({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const AX={name:"popperOffsets",enabled:!0,phase:"read",fn:kX,data:{}};function DX(e){return e==="x"?"y":"x"}function jX(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,y=r.tetherOffset,m=y===void 0?0:y,g=fl(t,{boundary:c,rootBoundary:u,padding:h,altBoundary:d}),w=ni(t.placement),x=Ma(t.placement),_=!x,S=fS(w),E=DX(S),I=t.modifiersData.popperOffsets,N=t.rects.reference,T=t.rects.popper,M=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,z=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,W={x:0,y:0};if(I){if(o){var U,A=S==="y"?$r:Vr,K=S==="y"?En:_n,V=S==="y"?"height":"width",te=I[S],G=te+g[A],re=te-g[K],P=v?-T[V]/2:0,B=x===Na?N[V]:T[V],X=x===Na?-T[V]:-N[V],Q=t.elements.arrow,D=v&&Q?dS(Q):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:F4(),H=$[A],q=$[K],Y=tl(0,N[V],D[V]),ie=_?N[V]/2-P-Y-H-z.mainAxis:B-Y-H-z.mainAxis,ne=_?-N[V]/2+P+Y+q+z.mainAxis:X+Y+q+z.mainAxis,pe=t.elements.arrow&&Rl(t.elements.arrow),Z=pe?S==="y"?pe.clientTop||0:pe.clientLeft||0:0,J=(U=j==null?void 0:j[S])!=null?U:0,ae=te+ie-J-Z,he=te+ne-J,ue=tl(v?Ku(G,ae):G,te,v?Eo(re,he):re);I[S]=ue,W[S]=ue-te}if(s){var de,le=S==="x"?$r:Vr,xe=S==="x"?En:_n,Ee=I[E],Ie=E==="y"?"height":"width",Te=Ee+g[le],Me=Ee-g[xe],Xe=[$r,Vr].indexOf(w)!==-1,tt=(de=j==null?void 0:j[E])!=null?de:0,Fe=Xe?Te:Ee-N[Ie]-T[Ie]-tt+z.altAxis,Le=Xe?Ee+N[Ie]+T[Ie]-tt-z.altAxis:Me,ze=v&&Xe?aX(Fe,Ee,Le):tl(v?Fe:Te,Ee,v?Le:Me);I[E]=ze,W[E]=ze-Ee}t.modifiersData[n]=W}}const qX={name:"preventOverflow",enabled:!0,phase:"main",fn:jX,requiresIfExists:["offset"]};function zX(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function LX(e){return e===sn(e)||!Sn(e)?hS(e):zX(e)}function BX(e){var t=e.getBoundingClientRect(),r=Ta(t.width)/e.offsetWidth||1,n=Ta(t.height)/e.offsetHeight||1;return r!==1||n!==1}function FX(e,t,r){r===void 0&&(r=!1);var n=Sn(t),i=Sn(t)&&BX(t),o=Ji(t),a=Pa(e,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((ai(t)!=="body"||vS(o))&&(s=LX(t)),Sn(t)?(c=Pa(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=pS(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 VX(e){var t=$X(e);return eX.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function HX(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function WX(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 XC={placement:"bottom",modifiers:[],strategy:"absolute"};function ZC(){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 UX(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?XC:i;return function(s,c,u){u===void 0&&(u=o);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},XC,o),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},h=[],p=!1,v={state:d,setOptions:function(w){var x=typeof w=="function"?w(d.options):w;m(),d.options=Object.assign({},o,d.options,x),d.scrollParents={reference:To(s)?rl(s):s.contextElement?rl(s.contextElement):[],popper:rl(c)};var _=VX(WX([].concat(n,d.options.modifiers)));return d.orderedModifiers=_.filter(function(S){return S.enabled}),y(),v.update()},forceUpdate:function(){if(!p){var w=d.elements,x=w.reference,_=w.popper;if(ZC(x,_)){d.rects={reference:FX(x,Rl(_),d.options.strategy==="fixed"),popper:dS(_)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(z){return d.modifiersData[z.name]=Object.assign({},z.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,M=E.name;typeof I=="function"&&(d=I({state:d,options:T,name:M,instance:v})||d)}}}},update:HX(function(){return new Promise(function(g){v.forceUpdate(),g(d)})}),destroy:function(){m(),p=!0}};if(!ZC(s,c))return v;v.setOptions(u).then(function(g){!p&&u.onFirstUpdate&&u.onFirstUpdate(g)});function y(){d.orderedModifiers.forEach(function(g){var w=g.name,x=g.options,_=x===void 0?{}:x,S=g.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(g){return g()}),h=[]}return v}}var GX=[gX,AX,pX,nX,MX,IX,qX,uX,NX],KX=UX({defaultModifiers:GX}),jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kh,JC;function YX(){if(JC)return Kh;JC=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 Kh=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}},Kh}var XX=YX();const ZX=Qi(XX);var JX=[],Od=function(t,r,n){n===void 0&&(n={});var i=nt.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||JX},a=nt.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],c=a[1],u=nt.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(v){var y=v.state,m=Object.keys(y.elements);vV.flushSync(function(){c({styles:FC(m.map(function(g){return[g,y.styles[g]||{}]})),attributes:FC(m.map(function(g){return[g,y.attributes[g]]}))})})},requires:["computeStyles"]}},[]),d=nt.useMemo(function(){var p={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[u,{name:"applyStyles",enabled:!1}])};return ZX(i.current,p)?i.current||p:(i.current=p,p)},[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,u]),h=nt.useRef();return $C(function(){h.current&&h.current.setOptions(d)},[d]),$C(function(){if(!(t==null||r==null)){var p=n.createPopper||KX,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 U4=({tab:e})=>O.jsx(br,{depth:1,className:"flex flex-1 items-center justify-center border-l-[0.5px]",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 text-inactive-text",children:[O.jsx(on,{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 gS(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 Yh,QC;function QX(){if(QC)return Yh;QC=1;function e(){this.__data__=[],this.size=0}return Yh=e,Yh}var Xh,e2;function Va(){if(e2)return Xh;e2=1;function e(t,r){return t===r||t!==t&&r!==r}return Xh=e,Xh}var Zh,t2;function Cd(){if(t2)return Zh;t2=1;var e=Va();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Zh=t,Zh}var Jh,r2;function eZ(){if(r2)return Jh;r2=1;var e=Cd(),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 Jh=n,Jh}var Qh,n2;function tZ(){if(n2)return Qh;n2=1;var e=Cd();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Qh=t,Qh}var ep,i2;function rZ(){if(i2)return ep;i2=1;var e=Cd();function t(r){return e(this.__data__,r)>-1}return ep=t,ep}var tp,o2;function nZ(){if(o2)return tp;o2=1;var e=Cd();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 tp=t,tp}var rp,a2;function Id(){if(a2)return rp;a2=1;var e=QX(),t=eZ(),r=tZ(),n=rZ(),i=nZ();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,rp=o,rp}var np,s2;function iZ(){if(s2)return np;s2=1;var e=Id();function t(){this.__data__=new e,this.size=0}return np=t,np}var ip,l2;function oZ(){if(l2)return ip;l2=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return ip=e,ip}var op,c2;function aZ(){if(c2)return op;c2=1;function e(t){return this.__data__.get(t)}return op=e,op}var ap,u2;function sZ(){if(u2)return ap;u2=1;function e(t){return this.__data__.has(t)}return ap=e,ap}var sp,d2;function G4(){if(d2)return sp;d2=1;var e=typeof jt=="object"&&jt&&jt.Object===Object&&jt;return sp=e,sp}var lp,f2;function Vn(){if(f2)return lp;f2=1;var e=G4(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return lp=r,lp}var cp,h2;function Ha(){if(h2)return cp;h2=1;var e=Vn(),t=e.Symbol;return cp=t,cp}var up,p2;function lZ(){if(p2)return up;p2=1;var e=Ha(),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 up=o,up}var dp,v2;function cZ(){if(v2)return dp;v2=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return dp=r,dp}var fp,g2;function ko(){if(g2)return fp;g2=1;var e=Ha(),t=lZ(),r=cZ(),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 fp=a,fp}var hp,m2;function On(){if(m2)return hp;m2=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return hp=e,hp}var pp,b2;function Nl(){if(b2)return pp;b2=1;var e=ko(),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 pp=a,pp}var vp,y2;function uZ(){if(y2)return vp;y2=1;var e=Vn(),t=e["__core-js_shared__"];return vp=t,vp}var gp,x2;function dZ(){if(x2)return gp;x2=1;var e=uZ(),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 gp=r,gp}var mp,w2;function K4(){if(w2)return mp;w2=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 mp=r,mp}var bp,S2;function fZ(){if(S2)return bp;S2=1;var e=Nl(),t=dZ(),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 bp=h,bp}var yp,E2;function hZ(){if(E2)return yp;E2=1;function e(t,r){return t==null?void 0:t[r]}return yp=e,yp}var xp,_2;function Ao(){if(_2)return xp;_2=1;var e=fZ(),t=hZ();function r(n,i){var o=t(n,i);return e(o)?o:void 0}return xp=r,xp}var wp,O2;function mS(){if(O2)return wp;O2=1;var e=Ao(),t=Vn(),r=e(t,"Map");return wp=r,wp}var Sp,C2;function Rd(){if(C2)return Sp;C2=1;var e=Ao(),t=e(Object,"create");return Sp=t,Sp}var Ep,I2;function pZ(){if(I2)return Ep;I2=1;var e=Rd();function t(){this.__data__=e?e(null):{},this.size=0}return Ep=t,Ep}var _p,R2;function vZ(){if(R2)return _p;R2=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return _p=e,_p}var Op,N2;function gZ(){if(N2)return Op;N2=1;var e=Rd(),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 Op=i,Op}var Cp,T2;function mZ(){if(T2)return Cp;T2=1;var e=Rd(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var o=this.__data__;return e?o[i]!==void 0:r.call(o,i)}return Cp=n,Cp}var Ip,P2;function bZ(){if(P2)return Ip;P2=1;var e=Rd(),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 Ip=r,Ip}var Rp,M2;function yZ(){if(M2)return Rp;M2=1;var e=pZ(),t=vZ(),r=gZ(),n=mZ(),i=bZ();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,Rp=o,Rp}var Np,k2;function xZ(){if(k2)return Np;k2=1;var e=yZ(),t=Id(),r=mS();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return Np=n,Np}var Tp,A2;function wZ(){if(A2)return Tp;A2=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return Tp=e,Tp}var Pp,D2;function Nd(){if(D2)return Pp;D2=1;var e=wZ();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return Pp=t,Pp}var Mp,j2;function SZ(){if(j2)return Mp;j2=1;var e=Nd();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return Mp=t,Mp}var kp,q2;function EZ(){if(q2)return kp;q2=1;var e=Nd();function t(r){return e(this,r).get(r)}return kp=t,kp}var Ap,z2;function _Z(){if(z2)return Ap;z2=1;var e=Nd();function t(r){return e(this,r).has(r)}return Ap=t,Ap}var Dp,L2;function OZ(){if(L2)return Dp;L2=1;var e=Nd();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 Dp=t,Dp}var jp,B2;function bS(){if(B2)return jp;B2=1;var e=xZ(),t=SZ(),r=EZ(),n=_Z(),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,jp=o,jp}var qp,F2;function CZ(){if(F2)return qp;F2=1;var e=Id(),t=mS(),r=bS(),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 qp=i,qp}var zp,$2;function Td(){if($2)return zp;$2=1;var e=Id(),t=iZ(),r=oZ(),n=aZ(),i=sZ(),o=CZ();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,zp=a,zp}var Lp,V2;function yS(){if(V2)return Lp;V2=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 Lp=e,Lp}var Bp,H2;function Y4(){if(H2)return Bp;H2=1;var e=Ao(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return Bp=t,Bp}var Fp,W2;function Pd(){if(W2)return Fp;W2=1;var e=Y4();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Fp=t,Fp}var $p,U2;function Md(){if(U2)return $p;U2=1;var e=Pd(),t=Va(),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 $p=i,$p}var Vp,G2;function Tl(){if(G2)return Vp;G2=1;var e=Md(),t=Pd();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 Vp=r,Vp}var Hp,K2;function IZ(){if(K2)return Hp;K2=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Hp=e,Hp}var Wp,Y2;function si(){if(Y2)return Wp;Y2=1;function e(t){return t!=null&&typeof t=="object"}return Wp=e,Wp}var Up,X2;function RZ(){if(X2)return Up;X2=1;var e=ko(),t=si(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Up=n,Up}var Gp,Z2;function Pl(){if(Z2)return Gp;Z2=1;var e=RZ(),t=si(),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 Gp=o,Gp}var Kp,J2;function Ut(){if(J2)return Kp;J2=1;var e=Array.isArray;return Kp=e,Kp}var Hs={exports:{}},Yp,Q2;function NZ(){if(Q2)return Yp;Q2=1;function e(){return!1}return Yp=e,Yp}Hs.exports;var eI;function Wa(){return eI||(eI=1,(function(e,t){var r=Vn(),n=NZ(),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})(Hs,Hs.exports)),Hs.exports}var Xp,tI;function kd(){if(tI)return Xp;tI=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 Xp=r,Xp}var Zp,rI;function xS(){if(rI)return Zp;rI=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Zp=t,Zp}var Jp,nI;function TZ(){if(nI)return Jp;nI=1;var e=ko(),t=xS(),r=si(),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]",y="[object String]",m="[object WeakMap]",g="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",_="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",I="[object Int32Array]",N="[object Uint8Array]",T="[object Uint8ClampedArray]",M="[object Uint16Array]",z="[object Uint32Array]",j={};j[x]=j[_]=j[S]=j[E]=j[I]=j[N]=j[T]=j[M]=j[z]=!0,j[n]=j[i]=j[g]=j[o]=j[w]=j[a]=j[s]=j[c]=j[u]=j[d]=j[h]=j[p]=j[v]=j[y]=j[m]=!1;function W(U){return r(U)&&t(U.length)&&!!j[e(U)]}return Jp=W,Jp}var Qp,iI;function Ad(){if(iI)return Qp;iI=1;function e(t){return function(r){return t(r)}}return Qp=e,Qp}var Ws={exports:{}};Ws.exports;var oI;function wS(){return oI||(oI=1,(function(e,t){var r=G4(),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})(Ws,Ws.exports)),Ws.exports}var ev,aI;function Ml(){if(aI)return ev;aI=1;var e=TZ(),t=Ad(),r=wS(),n=r&&r.isTypedArray,i=n?t(n):e;return ev=i,ev}var tv,sI;function X4(){if(sI)return tv;sI=1;var e=IZ(),t=Pl(),r=Ut(),n=Wa(),i=kd(),o=Ml(),a=Object.prototype,s=a.hasOwnProperty;function c(u,d){var h=r(u),p=!h&&t(u),v=!h&&!p&&n(u),y=!h&&!p&&!v&&o(u),m=h||p||v||y,g=m?e(u.length,String):[],w=g.length;for(var x in u)(d||s.call(u,x))&&!(m&&(x=="length"||v&&(x=="offset"||x=="parent")||y&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||i(x,w)))&&g.push(x);return g}return tv=c,tv}var rv,lI;function Dd(){if(lI)return rv;lI=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return rv=t,rv}var nv,cI;function Z4(){if(cI)return nv;cI=1;function e(t,r){return function(n){return t(r(n))}}return nv=e,nv}var iv,uI;function PZ(){if(uI)return iv;uI=1;var e=Z4(),t=e(Object.keys,Object);return iv=t,iv}var ov,dI;function SS(){if(dI)return ov;dI=1;var e=Dd(),t=PZ(),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 ov=i,ov}var av,fI;function Oi(){if(fI)return av;fI=1;var e=Nl(),t=xS();function r(n){return n!=null&&t(n.length)&&!e(n)}return av=r,av}var sv,hI;function eo(){if(hI)return sv;hI=1;var e=X4(),t=SS(),r=Oi();function n(i){return r(i)?e(i):t(i)}return sv=n,sv}var lv,pI;function MZ(){if(pI)return lv;pI=1;var e=Tl(),t=eo();function r(n,i){return n&&e(i,t(i),n)}return lv=r,lv}var cv,vI;function kZ(){if(vI)return cv;vI=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return cv=e,cv}var uv,gI;function AZ(){if(gI)return uv;gI=1;var e=On(),t=Dd(),r=kZ(),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 uv=o,uv}var dv,mI;function Do(){if(mI)return dv;mI=1;var e=X4(),t=AZ(),r=Oi();function n(i){return r(i)?e(i,!0):t(i)}return dv=n,dv}var fv,bI;function DZ(){if(bI)return fv;bI=1;var e=Tl(),t=Do();function r(n,i){return n&&e(i,t(i),n)}return fv=r,fv}var Us={exports:{}};Us.exports;var yI;function J4(){return yI||(yI=1,(function(e,t){var r=Vn(),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})(Us,Us.exports)),Us.exports}var hv,xI;function Q4(){if(xI)return hv;xI=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 hv=e,hv}var pv,wI;function e6(){if(wI)return pv;wI=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 pv=e,pv}var vv,SI;function t6(){if(SI)return vv;SI=1;function e(){return[]}return vv=e,vv}var gv,EI;function ES(){if(EI)return gv;EI=1;var e=e6(),t=t6(),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 gv=o,gv}var mv,_I;function jZ(){if(_I)return mv;_I=1;var e=Tl(),t=ES();function r(n,i){return e(n,t(n),i)}return mv=r,mv}var bv,OI;function _S(){if(OI)return bv;OI=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 bv=e,bv}var yv,CI;function jd(){if(CI)return yv;CI=1;var e=Z4(),t=e(Object.getPrototypeOf,Object);return yv=t,yv}var xv,II;function r6(){if(II)return xv;II=1;var e=_S(),t=jd(),r=ES(),n=t6(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,r(a)),a=t(a);return s}:n;return xv=o,xv}var wv,RI;function qZ(){if(RI)return wv;RI=1;var e=Tl(),t=r6();function r(n,i){return e(n,t(n),i)}return wv=r,wv}var Sv,NI;function n6(){if(NI)return Sv;NI=1;var e=_S(),t=Ut();function r(n,i,o){var a=i(n);return t(n)?a:e(a,o(n))}return Sv=r,Sv}var Ev,TI;function i6(){if(TI)return Ev;TI=1;var e=n6(),t=ES(),r=eo();function n(i){return e(i,r,t)}return Ev=n,Ev}var _v,PI;function zZ(){if(PI)return _v;PI=1;var e=n6(),t=r6(),r=Do();function n(i){return e(i,r,t)}return _v=n,_v}var Ov,MI;function LZ(){if(MI)return Ov;MI=1;var e=Ao(),t=Vn(),r=e(t,"DataView");return Ov=r,Ov}var Cv,kI;function BZ(){if(kI)return Cv;kI=1;var e=Ao(),t=Vn(),r=e(t,"Promise");return Cv=r,Cv}var Iv,AI;function o6(){if(AI)return Iv;AI=1;var e=Ao(),t=Vn(),r=e(t,"Set");return Iv=r,Iv}var Rv,DI;function FZ(){if(DI)return Rv;DI=1;var e=Ao(),t=Vn(),r=e(t,"WeakMap");return Rv=r,Rv}var Nv,jI;function Ua(){if(jI)return Nv;jI=1;var e=LZ(),t=mS(),r=BZ(),n=o6(),i=FZ(),o=ko(),a=K4(),s="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",h="[object WeakMap]",p="[object DataView]",v=a(e),y=a(t),m=a(r),g=a(n),w=a(i),x=o;return(e&&x(new e(new ArrayBuffer(1)))!=p||t&&x(new t)!=s||r&&x(r.resolve())!=u||n&&x(new n)!=d||i&&x(new i)!=h)&&(x=function(_){var S=o(_),E=S==c?_.constructor:void 0,I=E?a(E):"";if(I)switch(I){case v:return p;case y:return s;case m:return u;case g:return d;case w:return h}return S}),Nv=x,Nv}var Tv,qI;function $Z(){if(qI)return Tv;qI=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 Tv=r,Tv}var Pv,zI;function a6(){if(zI)return Pv;zI=1;var e=Vn(),t=e.Uint8Array;return Pv=t,Pv}var Mv,LI;function OS(){if(LI)return Mv;LI=1;var e=a6();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return Mv=t,Mv}var kv,BI;function VZ(){if(BI)return kv;BI=1;var e=OS();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return kv=t,kv}var Av,FI;function HZ(){if(FI)return Av;FI=1;var e=/\w*$/;function t(r){var n=new r.constructor(r.source,e.exec(r));return n.lastIndex=r.lastIndex,n}return Av=t,Av}var Dv,$I;function WZ(){if($I)return Dv;$I=1;var e=Ha(),t=e?e.prototype:void 0,r=t?t.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return Dv=n,Dv}var jv,VI;function s6(){if(VI)return jv;VI=1;var e=OS();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return jv=t,jv}var qv,HI;function UZ(){if(HI)return qv;HI=1;var e=OS(),t=VZ(),r=HZ(),n=WZ(),i=s6(),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]",y="[object DataView]",m="[object Float32Array]",g="[object Float64Array]",w="[object Int8Array]",x="[object Int16Array]",_="[object Int32Array]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",I="[object Uint16Array]",N="[object Uint32Array]";function T(M,z,j){var W=M.constructor;switch(z){case v:return e(M);case o:case a:return new W(+M);case y:return t(M,j);case m:case g:case w:case x:case _:case S:case E:case I:case N:return i(M,j);case s:return new W;case c:case h:return new W(M);case u:return r(M);case d:return new W;case p:return n(M)}}return qv=T,qv}var zv,WI;function l6(){if(WI)return zv;WI=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 zv=r,zv}var Lv,UI;function c6(){if(UI)return Lv;UI=1;var e=l6(),t=jd(),r=Dd();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Lv=n,Lv}var Bv,GI;function GZ(){if(GI)return Bv;GI=1;var e=Ua(),t=si(),r="[object Map]";function n(i){return t(i)&&e(i)==r}return Bv=n,Bv}var Fv,KI;function KZ(){if(KI)return Fv;KI=1;var e=GZ(),t=Ad(),r=wS(),n=r&&r.isMap,i=n?t(n):e;return Fv=i,Fv}var $v,YI;function YZ(){if(YI)return $v;YI=1;var e=Ua(),t=si(),r="[object Set]";function n(i){return t(i)&&e(i)==r}return $v=n,$v}var Vv,XI;function XZ(){if(XI)return Vv;XI=1;var e=YZ(),t=Ad(),r=wS(),n=r&&r.isSet,i=n?t(n):e;return Vv=i,Vv}var Hv,ZI;function u6(){if(ZI)return Hv;ZI=1;var e=Td(),t=yS(),r=Md(),n=MZ(),i=DZ(),o=J4(),a=Q4(),s=jZ(),c=qZ(),u=i6(),d=zZ(),h=Ua(),p=$Z(),v=UZ(),y=c6(),m=Ut(),g=Wa(),w=KZ(),x=On(),_=XZ(),S=eo(),E=Do(),I=1,N=2,T=4,M="[object Arguments]",z="[object Array]",j="[object Boolean]",W="[object Date]",U="[object Error]",A="[object Function]",K="[object GeneratorFunction]",V="[object Map]",te="[object Number]",G="[object Object]",re="[object RegExp]",P="[object Set]",B="[object String]",X="[object Symbol]",Q="[object WeakMap]",D="[object ArrayBuffer]",$="[object DataView]",H="[object Float32Array]",q="[object Float64Array]",Y="[object Int8Array]",ie="[object Int16Array]",ne="[object Int32Array]",pe="[object Uint8Array]",Z="[object Uint8ClampedArray]",J="[object Uint16Array]",ae="[object Uint32Array]",he={};he[M]=he[z]=he[D]=he[$]=he[j]=he[W]=he[H]=he[q]=he[Y]=he[ie]=he[ne]=he[V]=he[te]=he[G]=he[re]=he[P]=he[B]=he[X]=he[pe]=he[Z]=he[J]=he[ae]=!0,he[U]=he[A]=he[Q]=!1;function ue(de,le,xe,Ee,Ie,Te){var Me,Xe=le&I,tt=le&N,Fe=le&T;if(xe&&(Me=Ie?xe(de,Ee,Ie,Te):xe(de)),Me!==void 0)return Me;if(!x(de))return de;var Le=m(de);if(Le){if(Me=p(de),!Xe)return a(de,Me)}else{var ze=h(de),Ze=ze==A||ze==K;if(g(de))return o(de,Xe);if(ze==G||ze==M||Ze&&!Ie){if(Me=tt||Ze?{}:y(de),!Xe)return tt?c(de,i(Me,de)):s(de,n(Me,de))}else{if(!he[ze])return Ie?de:{};Me=v(de,ze,Xe)}}Te||(Te=new e);var rt=Te.get(de);if(rt)return rt;Te.set(de,Me),_(de)?de.forEach(function(Rt){Me.add(ue(Rt,le,xe,Rt,de,Te))}):w(de)&&de.forEach(function(Rt,qt){Me.set(qt,ue(Rt,le,xe,qt,de,Te))});var Pt=Fe?tt?d:u:tt?E:S,gt=Le?void 0:Pt(de);return t(gt||de,function(Rt,qt){gt&&(qt=Rt,Rt=de[qt]),r(Me,qt,ue(Rt,le,xe,qt,de,Te))}),Me}return Hv=ue,Hv}var Wv,JI;function ZZ(){if(JI)return Wv;JI=1;var e=u6(),t=4;function r(n){return e(n,t)}return Wv=r,Wv}var Uv,QI;function CS(){if(QI)return Uv;QI=1;function e(t){return function(){return t}}return Uv=e,Uv}var Gv,eR;function JZ(){if(eR)return Gv;eR=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 Gv=e,Gv}var Kv,tR;function IS(){if(tR)return Kv;tR=1;var e=JZ(),t=e();return Kv=t,Kv}var Yv,rR;function RS(){if(rR)return Yv;rR=1;var e=IS(),t=eo();function r(n,i){return n&&e(n,i,t)}return Yv=r,Yv}var Xv,nR;function QZ(){if(nR)return Xv;nR=1;var e=Oi();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 Xv=t,Xv}var Zv,iR;function qd(){if(iR)return Zv;iR=1;var e=RS(),t=QZ(),r=t(e);return Zv=r,Zv}var Jv,oR;function jo(){if(oR)return Jv;oR=1;function e(t){return t}return Jv=e,Jv}var Qv,aR;function d6(){if(aR)return Qv;aR=1;var e=jo();function t(r){return typeof r=="function"?r:e}return Qv=t,Qv}var eg,sR;function f6(){if(sR)return eg;sR=1;var e=yS(),t=qd(),r=d6(),n=Ut();function i(o,a){var s=n(o)?e:t;return s(o,r(a))}return eg=i,eg}var tg,lR;function h6(){return lR||(lR=1,tg=f6()),tg}var rg,cR;function eJ(){if(cR)return rg;cR=1;var e=qd();function t(r,n){var i=[];return e(r,function(o,a,s){n(o,a,s)&&i.push(o)}),i}return rg=t,rg}var ng,uR;function tJ(){if(uR)return ng;uR=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return ng=t,ng}var ig,dR;function rJ(){if(dR)return ig;dR=1;function e(t){return this.__data__.has(t)}return ig=e,ig}var og,fR;function p6(){if(fR)return og;fR=1;var e=bS(),t=tJ(),r=rJ();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,og=n,og}var ag,hR;function nJ(){if(hR)return ag;hR=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 ag=e,ag}var sg,pR;function v6(){if(pR)return sg;pR=1;function e(t,r){return t.has(r)}return sg=e,sg}var lg,vR;function g6(){if(vR)return lg;vR=1;var e=p6(),t=nJ(),r=v6(),n=1,i=2;function o(a,s,c,u,d,h){var p=c&n,v=a.length,y=s.length;if(v!=y&&!(p&&y>v))return!1;var m=h.get(a),g=h.get(s);if(m&&g)return m==s&&g==a;var w=-1,x=!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;x=!1;break}if(_){if(!t(s,function(N,T){if(!r(_,T)&&(S===N||d(S,N,c,u,h)))return _.push(T)})){x=!1;break}}else if(!(S===E||d(S,E,c,u,h))){x=!1;break}}return h.delete(a),h.delete(s),x}return lg=o,lg}var cg,gR;function iJ(){if(gR)return cg;gR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,o){n[++r]=[o,i]}),n}return cg=e,cg}var ug,mR;function NS(){if(mR)return ug;mR=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return ug=e,ug}var dg,bR;function oJ(){if(bR)return dg;bR=1;var e=Ha(),t=a6(),r=Va(),n=g6(),i=iJ(),o=NS(),a=1,s=2,c="[object Boolean]",u="[object Date]",d="[object Error]",h="[object Map]",p="[object Number]",v="[object RegExp]",y="[object Set]",m="[object String]",g="[object Symbol]",w="[object ArrayBuffer]",x="[object DataView]",_=e?e.prototype:void 0,S=_?_.valueOf:void 0;function E(I,N,T,M,z,j,W){switch(T){case x:if(I.byteLength!=N.byteLength||I.byteOffset!=N.byteOffset)return!1;I=I.buffer,N=N.buffer;case w:return!(I.byteLength!=N.byteLength||!j(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 U=i;case y:var A=M&a;if(U||(U=o),I.size!=N.size&&!A)return!1;var K=W.get(I);if(K)return K==N;M|=s,W.set(I,N);var V=n(U(I),U(N),M,z,j,W);return W.delete(I),V;case g:if(S)return S.call(I)==S.call(N)}return!1}return dg=E,dg}var fg,yR;function aJ(){if(yR)return fg;yR=1;var e=i6(),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,y=e(a),m=y.length;if(v!=m&&!h)return!1;for(var g=v;g--;){var w=p[g];if(!(h?w in a:n.call(a,w)))return!1}var x=d.get(o),_=d.get(a);if(x&&_)return x==a&&_==o;var S=!0;d.set(o,a),d.set(a,o);for(var E=h;++g<v;){w=p[g];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 M=o.constructor,z=a.constructor;M!=z&&"constructor"in o&&"constructor"in a&&!(typeof M=="function"&&M instanceof M&&typeof z=="function"&&z instanceof z)&&(S=!1)}return d.delete(o),d.delete(a),S}return fg=i,fg}var hg,xR;function sJ(){if(xR)return hg;xR=1;var e=Td(),t=g6(),r=oJ(),n=aJ(),i=Ua(),o=Ut(),a=Wa(),s=Ml(),c=1,u="[object Arguments]",d="[object Array]",h="[object Object]",p=Object.prototype,v=p.hasOwnProperty;function y(m,g,w,x,_,S){var E=o(m),I=o(g),N=E?d:i(m),T=I?d:i(g);N=N==u?h:N,T=T==u?h:T;var M=N==h,z=T==h,j=N==T;if(j&&a(m)){if(!a(g))return!1;E=!0,M=!1}if(j&&!M)return S||(S=new e),E||s(m)?t(m,g,w,x,_,S):r(m,g,N,w,x,_,S);if(!(w&c)){var W=M&&v.call(m,"__wrapped__"),U=z&&v.call(g,"__wrapped__");if(W||U){var A=W?m.value():m,K=U?g.value():g;return S||(S=new e),_(A,K,w,x,S)}}return j?(S||(S=new e),n(m,g,w,x,_,S)):!1}return hg=y,hg}var pg,wR;function m6(){if(wR)return pg;wR=1;var e=sJ(),t=si();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 pg=r,pg}var vg,SR;function lJ(){if(SR)return vg;SR=1;var e=Td(),t=m6(),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],y=o[v],m=p[1];if(h&&p[2]){if(y===void 0&&!(v in o))return!1}else{var g=new e;if(c)var w=c(y,m,v,o,a,g);if(!(w===void 0?t(m,y,r|n,c,g):w))return!1}}return!0}return vg=i,vg}var gg,ER;function b6(){if(ER)return gg;ER=1;var e=On();function t(r){return r===r&&!e(r)}return gg=t,gg}var mg,_R;function cJ(){if(_R)return mg;_R=1;var e=b6(),t=eo();function r(n){for(var i=t(n),o=i.length;o--;){var a=i[o],s=n[a];i[o]=[a,s,e(s)]}return i}return mg=r,mg}var bg,OR;function y6(){if(OR)return bg;OR=1;function e(t,r){return function(n){return n==null?!1:n[t]===r&&(r!==void 0||t in Object(n))}}return bg=e,bg}var yg,CR;function uJ(){if(CR)return yg;CR=1;var e=lJ(),t=cJ(),r=y6();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 yg=n,yg}var xg,IR;function Ga(){if(IR)return xg;IR=1;var e=ko(),t=si(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return xg=n,xg}var wg,RR;function TS(){if(RR)return wg;RR=1;var e=Ut(),t=Ga(),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 wg=i,wg}var Sg,NR;function dJ(){if(NR)return Sg;NR=1;var e=bS(),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,Sg=r,Sg}var Eg,TR;function fJ(){if(TR)return Eg;TR=1;var e=dJ(),t=500;function r(n){var i=e(n,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return Eg=r,Eg}var _g,PR;function hJ(){if(PR)return _g;PR=1;var e=fJ(),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 _g=n,_g}var Og,MR;function zd(){if(MR)return Og;MR=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 Og=e,Og}var Cg,kR;function pJ(){if(kR)return Cg;kR=1;var e=Ha(),t=zd(),r=Ut(),n=Ga(),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 Cg=a,Cg}var Ig,AR;function x6(){if(AR)return Ig;AR=1;var e=pJ();function t(r){return r==null?"":e(r)}return Ig=t,Ig}var Rg,DR;function Ld(){if(DR)return Rg;DR=1;var e=Ut(),t=TS(),r=hJ(),n=x6();function i(o,a){return e(o)?o:t(o,a)?[o]:r(n(o))}return Rg=i,Rg}var Ng,jR;function kl(){if(jR)return Ng;jR=1;var e=Ga();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Ng=t,Ng}var Tg,qR;function Bd(){if(qR)return Tg;qR=1;var e=Ld(),t=kl();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 Tg=r,Tg}var Pg,zR;function vJ(){if(zR)return Pg;zR=1;var e=Bd();function t(r,n,i){var o=r==null?void 0:e(r,n);return o===void 0?i:o}return Pg=t,Pg}var Mg,LR;function gJ(){if(LR)return Mg;LR=1;function e(t,r){return t!=null&&r in Object(t)}return Mg=e,Mg}var kg,BR;function w6(){if(BR)return kg;BR=1;var e=Ld(),t=Pl(),r=Ut(),n=kd(),i=xS(),o=kl();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 kg=a,kg}var Ag,FR;function S6(){if(FR)return Ag;FR=1;var e=gJ(),t=w6();function r(n,i){return n!=null&&t(n,i,e)}return Ag=r,Ag}var Dg,$R;function mJ(){if($R)return Dg;$R=1;var e=m6(),t=vJ(),r=S6(),n=TS(),i=b6(),o=y6(),a=kl(),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 Dg=u,Dg}var jg,VR;function E6(){if(VR)return jg;VR=1;function e(t){return function(r){return r==null?void 0:r[t]}}return jg=e,jg}var qg,HR;function bJ(){if(HR)return qg;HR=1;var e=Bd();function t(r){return function(n){return e(n,r)}}return qg=t,qg}var zg,WR;function yJ(){if(WR)return zg;WR=1;var e=E6(),t=bJ(),r=TS(),n=kl();function i(o){return r(o)?e(n(o)):t(o)}return zg=i,zg}var Lg,UR;function Ci(){if(UR)return Lg;UR=1;var e=uJ(),t=mJ(),r=jo(),n=Ut(),i=yJ();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 Lg=o,Lg}var Bg,GR;function _6(){if(GR)return Bg;GR=1;var e=e6(),t=eJ(),r=Ci(),n=Ut();function i(o,a){var s=n(o)?e:t;return s(o,r(a,3))}return Bg=i,Bg}var Fg,KR;function xJ(){if(KR)return Fg;KR=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,i){return n!=null&&t.call(n,i)}return Fg=r,Fg}var $g,YR;function O6(){if(YR)return $g;YR=1;var e=xJ(),t=w6();function r(n,i){return n!=null&&t(n,i,e)}return $g=r,$g}var Vg,XR;function wJ(){if(XR)return Vg;XR=1;var e=SS(),t=Ua(),r=Pl(),n=Ut(),i=Oi(),o=Wa(),a=Dd(),s=Ml(),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 y=t(v);if(y==c||y==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 Vg=p,Vg}var Hg,ZR;function C6(){if(ZR)return Hg;ZR=1;function e(t){return t===void 0}return Hg=e,Hg}var Wg,JR;function I6(){if(JR)return Wg;JR=1;var e=qd(),t=Oi();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 Wg=r,Wg}var Ug,QR;function R6(){if(QR)return Ug;QR=1;var e=zd(),t=Ci(),r=I6(),n=Ut();function i(o,a){var s=n(o)?e:r;return s(o,t(a,3))}return Ug=i,Ug}var Gg,eN;function SJ(){if(eN)return Gg;eN=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 Gg=e,Gg}var Kg,tN;function EJ(){if(tN)return Kg;tN=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 Kg=e,Kg}var Yg,rN;function N6(){if(rN)return Yg;rN=1;var e=SJ(),t=qd(),r=Ci(),n=EJ(),i=Ut();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 Yg=o,Yg}var Xg,nN;function _J(){if(nN)return Xg;nN=1;var e=ko(),t=Ut(),r=si(),n="[object String]";function i(o){return typeof o=="string"||!t(o)&&r(o)&&e(o)==n}return Xg=i,Xg}var Zg,iN;function OJ(){if(iN)return Zg;iN=1;var e=E6(),t=e("length");return Zg=t,Zg}var Jg,oN;function CJ(){if(oN)return Jg;oN=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 Jg=c,Jg}var Qg,aN;function IJ(){if(aN)return Qg;aN=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",y=u+"?",m="["+o+"]?",g="(?:"+v+"(?:"+[d,h,p].join("|")+")"+m+y+")*",w=m+y+g,x="(?:"+[d+s+"?",s,h,p,a].join("|")+")",_=RegExp(c+"(?="+c+")|"+x+w,"g");function S(E){for(var I=_.lastIndex=0;_.test(E);)++I;return I}return Qg=S,Qg}var em,sN;function RJ(){if(sN)return em;sN=1;var e=OJ(),t=CJ(),r=IJ();function n(i){return t(i)?r(i):e(i)}return em=n,em}var tm,lN;function NJ(){if(lN)return tm;lN=1;var e=SS(),t=Ua(),r=Oi(),n=_J(),i=RJ(),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 tm=s,tm}var rm,cN;function TJ(){if(cN)return rm;cN=1;var e=yS(),t=l6(),r=RS(),n=Ci(),i=jd(),o=Ut(),a=Wa(),s=Nl(),c=On(),u=Ml();function d(h,p,v){var y=o(h),m=y||a(h)||u(h);if(p=n(p,4),v==null){var g=h&&h.constructor;m?v=y?new g:[]:c(h)?v=s(g)?t(i(h)):{}:v={}}return(m?e:r)(h,function(w,x,_){return p(v,w,x,_)}),v}return rm=d,rm}var nm,uN;function PJ(){if(uN)return nm;uN=1;var e=Ha(),t=Pl(),r=Ut(),n=e?e.isConcatSpreadable:void 0;function i(o){return r(o)||t(o)||!!(n&&o&&o[n])}return nm=i,nm}var im,dN;function PS(){if(dN)return im;dN=1;var e=_S(),t=PJ();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 im=r,im}var om,fN;function MJ(){if(fN)return om;fN=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 om=e,om}var am,hN;function T6(){if(hN)return am;hN=1;var e=MJ(),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 am=r,am}var sm,pN;function kJ(){if(pN)return sm;pN=1;var e=CS(),t=Y4(),r=jo(),n=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:r;return sm=n,sm}var lm,vN;function AJ(){if(vN)return lm;vN=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 lm=n,lm}var cm,gN;function P6(){if(gN)return cm;gN=1;var e=kJ(),t=AJ(),r=t(e);return cm=r,cm}var um,mN;function Fd(){if(mN)return um;mN=1;var e=jo(),t=T6(),r=P6();function n(i,o){return r(t(i,o,e),i+"")}return um=n,um}var dm,bN;function M6(){if(bN)return dm;bN=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 dm=e,dm}var fm,yN;function DJ(){if(yN)return fm;yN=1;function e(t){return t!==t}return fm=e,fm}var hm,xN;function jJ(){if(xN)return hm;xN=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 hm=e,hm}var pm,wN;function qJ(){if(wN)return pm;wN=1;var e=M6(),t=DJ(),r=jJ();function n(i,o,a){return o===o?r(i,o,a):e(i,t,a)}return pm=n,pm}var vm,SN;function zJ(){if(SN)return vm;SN=1;var e=qJ();function t(r,n){var i=r==null?0:r.length;return!!i&&e(r,n,0)>-1}return vm=t,vm}var gm,EN;function LJ(){if(EN)return gm;EN=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 gm=e,gm}var mm,_N;function BJ(){if(_N)return mm;_N=1;function e(){}return mm=e,mm}var bm,ON;function FJ(){if(ON)return bm;ON=1;var e=o6(),t=BJ(),r=NS(),n=1/0,i=e&&1/r(new e([,-0]))[1]==n?function(o){return new e(o)}:t;return bm=i,bm}var ym,CN;function $J(){if(CN)return ym;CN=1;var e=p6(),t=zJ(),r=LJ(),n=v6(),i=FJ(),o=NS(),a=200;function s(c,u,d){var h=-1,p=t,v=c.length,y=!0,m=[],g=m;if(d)y=!1,p=r;else if(v>=a){var w=u?null:i(c);if(w)return o(w);y=!1,p=n,g=new e}else g=u?[]:m;e:for(;++h<v;){var x=c[h],_=u?u(x):x;if(x=d||x!==0?x:0,y&&_===_){for(var S=g.length;S--;)if(g[S]===_)continue e;u&&g.push(_),m.push(x)}else p(g,_,d)||(g!==m&&g.push(_),m.push(x))}return m}return ym=s,ym}var xm,IN;function k6(){if(IN)return xm;IN=1;var e=Oi(),t=si();function r(n){return t(n)&&e(n)}return xm=r,xm}var wm,RN;function VJ(){if(RN)return wm;RN=1;var e=PS(),t=Fd(),r=$J(),n=k6(),i=t(function(o){return r(e(o,1,n,!0))});return wm=i,wm}var Sm,NN;function HJ(){if(NN)return Sm;NN=1;var e=zd();function t(r,n){return e(n,function(i){return r[i]})}return Sm=t,Sm}var Em,TN;function A6(){if(TN)return Em;TN=1;var e=HJ(),t=eo();function r(n){return n==null?[]:e(n,t(n))}return Em=r,Em}var _m,PN;function Cn(){if(PN)return _m;PN=1;var e;if(typeof gS=="function")try{e={clone:ZZ(),constant:CS(),each:h6(),filter:_6(),has:O6(),isArray:Ut(),isEmpty:wJ(),isFunction:Nl(),isUndefined:C6(),keys:eo(),map:R6(),reduce:N6(),size:NJ(),transform:TJ(),union:VJ(),values:A6()}}catch{}return e||(e=window._),_m=e,_m}var Om,MN;function MS(){if(MN)return Om;MN=1;var e=Cn();Om=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(y){p.length>1?v.setNode(y,h):v.setNode(y)}),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,g){d(g)&&h.setNode(g,m)}),e.each(this._edgeObjs,function(m){h.hasNode(m.v)&&h.hasNode(m.w)&&h.setEdge(m,p.edge(m))});var v={};function y(m){var g=p.parent(m);return g===void 0||h.hasNode(g)?(v[m]=g,g):g in v?v[g]:y(g)}return this._isCompound&&e.each(h.nodes(),function(m){h.setParent(m,y(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(y,m){return v.length>1?p.setEdge(y,m,h):p.setEdge(y,m),m}),this},i.prototype.setEdge=function(){var d,h,p,v,y=!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],y=!0)):(d=m,h=arguments[1],p=arguments[3],arguments.length>2&&(v=arguments[2],y=!0)),d=""+d,h=""+h,e.isUndefined(p)||(p=""+p);var g=s(this._isDirected,d,h,p);if(e.has(this._edgeLabels,g))return y&&(this._edgeLabels[g]=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[g]=y?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[g]=w,o(this._preds[h],d),o(this._sucs[d],h),this._in[h][g]=w,this._out[d][g]=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),y=this._edgeObjs[v];return y&&(d=y.v,h=y.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(y){return y.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(y){return y.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 y=""+h,m=""+p;if(!d&&y>m){var g=y;y=m,m=g}return y+n+m+n+(e.isUndefined(v)?t:v)}function c(d,h,p,v){var y=""+h,m=""+p;if(!d&&y>m){var g=y;y=m,m=g}var w={v:y,w:m};return v&&(w.name=v),w}function u(d,h){return s(d,h.v,h.w,h.name)}return Om}var Cm,kN;function WJ(){return kN||(kN=1,Cm="2.1.8"),Cm}var Im,AN;function UJ(){return AN||(AN=1,Im={Graph:MS(),version:WJ()}),Im}var Rm,DN;function GJ(){if(DN)return Rm;DN=1;var e=Cn(),t=MS();Rm={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 Rm}var Nm,jN;function KJ(){if(jN)return Nm;jN=1;var e=Cn();Nm=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 Nm}var Tm,qN;function D6(){if(qN)return Tm;qN=1;var e=Cn();Tm=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},Tm}var Pm,zN;function j6(){if(zN)return Pm;zN=1;var e=Cn(),t=D6();Pm=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(y){var m=y.v!==h?y.v:y.w,g=u[m],w=s(y),x=p.distance+w;if(w<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+y+" Weight: "+w);x<g.distance&&(g.distance=x,g.predecessor=h,d.decrease(m,x))};for(o.nodes().forEach(function(y){var m=y===a?0:Number.POSITIVE_INFINITY;u[y]={distance:m},d.add(y,m)});d.size()>0&&(h=d.removeMin(),p=u[h],p.distance!==Number.POSITIVE_INFINITY);)c(h).forEach(v);return u}return Pm}var Mm,LN;function YJ(){if(LN)return Mm;LN=1;var e=j6(),t=Cn();Mm=r;function r(n,i,o){return t.transform(n.nodes(),function(a,s){a[s]=e(n,s,i,o)},{})}return Mm}var km,BN;function q6(){if(BN)return km;BN=1;var e=Cn();km=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 km}var Am,FN;function XJ(){if(FN)return Am;FN=1;var e=Cn(),t=q6();Am=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 Am}var Dm,$N;function ZJ(){if($N)return Dm;$N=1;var e=Cn();Dm=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 y=p[u],m=d[v],g=p[v],w=y.distance+m.distance;w<g.distance&&(g.distance=w,g.predecessor=m.predecessor)})})}),s}return Dm}var jm,VN;function z6(){if(VN)return jm;VN=1;var e=Cn();jm=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,jm}var qm,HN;function JJ(){if(HN)return qm;HN=1;var e=z6();qm=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return qm}var zm,WN;function L6(){if(WN)return zm;WN=1;var e=Cn();zm=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 zm}var Lm,UN;function QJ(){if(UN)return Lm;UN=1;var e=L6();Lm=t;function t(r,n){return e(r,n,"post")}return Lm}var Bm,GN;function eQ(){if(GN)return Bm;GN=1;var e=L6();Bm=t;function t(r,n){return e(r,n,"pre")}return Bm}var Fm,KN;function tQ(){if(KN)return Fm;KN=1;var e=Cn(),t=MS(),r=D6();Fm=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,y=c.priority(v);if(y!==void 0){var m=o(p);m<y&&(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 Fm}var $m,YN;function rQ(){return YN||(YN=1,$m={components:KJ(),dijkstra:j6(),dijkstraAll:YJ(),findCycles:XJ(),floydWarshall:ZJ(),isAcyclic:JJ(),postorder:QJ(),preorder:eQ(),prim:tQ(),tarjan:q6(),topsort:z6()}),$m}var Vm,XN;function nQ(){if(XN)return Vm;XN=1;var e=UJ();return Vm={Graph:e.Graph,json:GJ(),alg:rQ(),version:e.version},Vm}var Hm,ZN;function $n(){if(ZN)return Hm;ZN=1;var e;if(typeof gS=="function")try{e=nQ()}catch{}return e||(e=window.graphlib),Hm=e,Hm}var Wm,JN;function iQ(){if(JN)return Wm;JN=1;var e=u6(),t=1,r=4;function n(i){return e(i,t|r)}return Wm=n,Wm}var Um,QN;function $d(){if(QN)return Um;QN=1;var e=Va(),t=Oi(),r=kd(),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 Um=i,Um}var Gm,eT;function oQ(){if(eT)return Gm;eT=1;var e=Fd(),t=Va(),r=$d(),n=Do(),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),y=-1,m=v.length;++y<m;){var g=v[y],w=s[g];(w===void 0||t(w,i[g])&&!o.call(s,g))&&(s[g]=p[g])}return s});return Gm=a,Gm}var Km,tT;function aQ(){if(tT)return Km;tT=1;var e=Ci(),t=Oi(),r=eo();function n(i){return function(o,a,s){var c=Object(o);if(!t(o)){var u=e(a,3);o=r(o),a=function(h){return u(c[h],h,c)}}var d=i(o,a,s);return d>-1?c[u?o[d]:d]:void 0}}return Km=n,Km}var Ym,rT;function sQ(){if(rT)return Ym;rT=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Ym=t,Ym}var Xm,nT;function lQ(){if(nT)return Xm;nT=1;var e=sQ(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Xm=r,Xm}var Zm,iT;function cQ(){if(iT)return Zm;iT=1;var e=lQ(),t=On(),r=Ga(),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 Zm=c,Zm}var Jm,oT;function B6(){if(oT)return Jm;oT=1;var e=cQ(),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 Jm=n,Jm}var Qm,aT;function uQ(){if(aT)return Qm;aT=1;var e=B6();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return Qm=t,Qm}var eb,sT;function dQ(){if(sT)return eb;sT=1;var e=M6(),t=Ci(),r=uQ(),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 eb=i,eb}var tb,lT;function fQ(){if(lT)return tb;lT=1;var e=aQ(),t=dQ(),r=e(t);return tb=r,tb}var rb,cT;function F6(){if(cT)return rb;cT=1;var e=PS();function t(r){var n=r==null?0:r.length;return n?e(r,1):[]}return rb=t,rb}var nb,uT;function hQ(){if(uT)return nb;uT=1;var e=IS(),t=d6(),r=Do();function n(i,o){return i==null?i:e(i,t(o),r)}return nb=n,nb}var ib,dT;function pQ(){if(dT)return ib;dT=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return ib=e,ib}var ob,fT;function vQ(){if(fT)return ob;fT=1;var e=Pd(),t=RS(),r=Ci();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 ob=n,ob}var ab,hT;function kS(){if(hT)return ab;hT=1;var e=Ga();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 ab=t,ab}var sb,pT;function gQ(){if(pT)return sb;pT=1;function e(t,r){return t>r}return sb=e,sb}var lb,vT;function mQ(){if(vT)return lb;vT=1;var e=kS(),t=gQ(),r=jo();function n(i){return i&&i.length?e(i,r,t):void 0}return lb=n,lb}var cb,gT;function $6(){if(gT)return cb;gT=1;var e=Pd(),t=Va();function r(n,i,o){(o!==void 0&&!t(n[i],o)||o===void 0&&!(i in n))&&e(n,i,o)}return cb=r,cb}var ub,mT;function bQ(){if(mT)return ub;mT=1;var e=ko(),t=jd(),r=si(),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 ub=u,ub}var db,bT;function V6(){if(bT)return db;bT=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return db=e,db}var fb,yT;function yQ(){if(yT)return fb;yT=1;var e=Tl(),t=Do();function r(n){return e(n,t(n))}return fb=r,fb}var hb,xT;function xQ(){if(xT)return hb;xT=1;var e=$6(),t=J4(),r=s6(),n=Q4(),i=c6(),o=Pl(),a=Ut(),s=k6(),c=Wa(),u=Nl(),d=On(),h=bQ(),p=Ml(),v=V6(),y=yQ();function m(g,w,x,_,S,E,I){var N=v(g,x),T=v(w,x),M=I.get(T);if(M){e(g,x,M);return}var z=E?E(N,T,x+"",g,w,I):void 0,j=z===void 0;if(j){var W=a(T),U=!W&&c(T),A=!W&&!U&&p(T);z=T,W||U||A?a(N)?z=N:s(N)?z=n(N):U?(j=!1,z=t(T,!0)):A?(j=!1,z=r(T,!0)):z=[]:h(T)||o(T)?(z=N,o(N)?z=y(N):(!d(N)||u(N))&&(z=i(T))):j=!1}j&&(I.set(T,z),S(z,T,_,E,I),I.delete(T)),e(g,x,z)}return hb=m,hb}var pb,wT;function wQ(){if(wT)return pb;wT=1;var e=Td(),t=$6(),r=IS(),n=xQ(),i=On(),o=Do(),a=V6();function s(c,u,d,h,p){c!==u&&r(u,function(v,y){if(p||(p=new e),i(v))n(c,u,y,d,s,h,p);else{var m=h?h(a(c,y),v,y+"",c,u,p):void 0;m===void 0&&(m=v),t(c,y,m)}},o)}return pb=s,pb}var vb,ST;function SQ(){if(ST)return vb;ST=1;var e=Fd(),t=$d();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 vb=r,vb}var gb,ET;function EQ(){if(ET)return gb;ET=1;var e=wQ(),t=SQ(),r=t(function(n,i,o){e(n,i,o)});return gb=r,gb}var mb,_T;function H6(){if(_T)return mb;_T=1;function e(t,r){return t<r}return mb=e,mb}var bb,OT;function _Q(){if(OT)return bb;OT=1;var e=kS(),t=H6(),r=jo();function n(i){return i&&i.length?e(i,r,t):void 0}return bb=n,bb}var yb,CT;function OQ(){if(CT)return yb;CT=1;var e=kS(),t=Ci(),r=H6();function n(i,o){return i&&i.length?e(i,t(o,2),r):void 0}return yb=n,yb}var xb,IT;function CQ(){if(IT)return xb;IT=1;var e=Vn(),t=function(){return e.Date.now()};return xb=t,xb}var wb,RT;function IQ(){if(RT)return wb;RT=1;var e=Md(),t=Ld(),r=kd(),n=On(),i=kl();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 y=i(s[d]),m=c;if(y==="__proto__"||y==="constructor"||y==="prototype")return a;if(d!=p){var g=v[y];m=u?u(g,y,v):void 0,m===void 0&&(m=n(g)?g:r(s[d+1])?[]:{})}e(v,y,m),v=v[y]}return a}return wb=o,wb}var Sb,NT;function RQ(){if(NT)return Sb;NT=1;var e=Bd(),t=IQ(),r=Ld();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 Sb=n,Sb}var Eb,TT;function NQ(){if(TT)return Eb;TT=1;var e=RQ(),t=S6();function r(n,i){return e(n,i,function(o,a){return t(n,a)})}return Eb=r,Eb}var _b,PT;function TQ(){if(PT)return _b;PT=1;var e=F6(),t=T6(),r=P6();function n(i){return r(t(i,void 0,e),i+"")}return _b=n,_b}var Ob,MT;function PQ(){if(MT)return Ob;MT=1;var e=NQ(),t=TQ(),r=t(function(n,i){return n==null?{}:e(n,i)});return Ob=r,Ob}var Cb,kT;function MQ(){if(kT)return Cb;kT=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 Cb=r,Cb}var Ib,AT;function kQ(){if(AT)return Ib;AT=1;var e=MQ(),t=$d(),r=B6();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 Ib=n,Ib}var Rb,DT;function AQ(){if(DT)return Rb;DT=1;var e=kQ(),t=e();return Rb=t,Rb}var Nb,jT;function DQ(){if(jT)return Nb;jT=1;function e(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}return Nb=e,Nb}var Tb,qT;function jQ(){if(qT)return Tb;qT=1;var e=Ga();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 Tb=t,Tb}var Pb,zT;function qQ(){if(zT)return Pb;zT=1;var e=jQ();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 Pb=t,Pb}var Mb,LT;function zQ(){if(LT)return Mb;LT=1;var e=zd(),t=Bd(),r=Ci(),n=I6(),i=DQ(),o=Ad(),a=qQ(),s=jo(),c=Ut();function u(d,h,p){h.length?h=e(h,function(m){return c(m)?function(g){return t(g,m.length===1?m[0]:m)}:m}):h=[s];var v=-1;h=e(h,o(r));var y=n(d,function(m,g,w){var x=e(h,function(_){return _(m)});return{criteria:x,index:++v,value:m}});return i(y,function(m,g){return a(m,g,p)})}return Mb=u,Mb}var kb,BT;function LQ(){if(BT)return kb;BT=1;var e=PS(),t=zQ(),r=Fd(),n=$d(),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 kb=i,kb}var Ab,FT;function BQ(){if(FT)return Ab;FT=1;var e=x6(),t=0;function r(n){var i=++t;return e(n)+i}return Ab=r,Ab}var Db,$T;function FQ(){if($T)return Db;$T=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 Db=e,Db}var jb,VT;function $Q(){if(VT)return jb;VT=1;var e=Md(),t=FQ();function r(n,i){return t(n||[],i||[],e)}return jb=r,jb}var qb,HT;function It(){if(HT)return qb;HT=1;var e;if(typeof gS=="function")try{e={cloneDeep:iQ(),constant:CS(),defaults:oQ(),each:h6(),filter:_6(),find:fQ(),flatten:F6(),forEach:f6(),forIn:hQ(),has:O6(),isUndefined:C6(),last:pQ(),map:R6(),mapValues:vQ(),max:mQ(),merge:EQ(),min:_Q(),minBy:OQ(),now:CQ(),pick:PQ(),range:AQ(),reduce:N6(),sortBy:LQ(),uniqueId:BQ(),values:A6(),zipObject:$Q()}}catch{}return e||(e=window._),qb=e,qb}var zb,WT;function VQ(){if(WT)return zb;WT=1,zb=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 zb}var Lb,UT;function HQ(){if(UT)return Lb;UT=1;var e=It(),t=$n().Graph,r=VQ();Lb=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],y=d[0],m;u.nodeCount();){for(;m=y.dequeue();)a(u,d,h,m);for(;m=v.dequeue();)a(u,d,h,m);if(u.nodeCount()){for(var g=d.length-2;g>0;--g)if(m=d[g].dequeue(),m){p=p.concat(a(u,d,h,m,!0));break}}}return p}function a(u,d,h,p,v){var y=v?[]:void 0;return e.forEach(u.inEdges(p.v),function(m){var g=u.edge(m),w=u.node(m.v);v&&y.push({v:m.v,w:m.w}),w.out-=g,c(d,h,w)}),e.forEach(u.outEdges(p.v),function(m){var g=u.edge(m),w=m.w,x=u.node(w);x.in-=g,c(d,h,x)}),u.removeNode(p.v),y}function s(u,d){var h=new t,p=0,v=0;e.forEach(u.nodes(),function(g){h.setNode(g,{v:g,in:0,out:0})}),e.forEach(u.edges(),function(g){var w=h.edge(g.v,g.w)||0,x=d(g),_=w+x;h.setEdge(g.v,g.w,_),v=Math.max(v,h.node(g.v).out+=x),p=Math.max(p,h.node(g.w).in+=x)});var y=e.range(v+p+3).map(function(){return new r}),m=p+1;return e.forEach(h.nodes(),function(g){c(y,m,h.node(g))}),{graph:h,buckets:y,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 Lb}var Bb,GT;function WQ(){if(GT)return Bb;GT=1;var e=It(),t=HQ();Bb={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 Bb}var Fb,KT;function Hr(){if(KT)return Fb;KT=1;var e=It(),t=$n().Graph;Fb={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:y,notime:m};function r(g,w,x,_){var S;do S=e.uniqueId(_);while(g.hasNode(S));return x.dummy=w,g.setNode(S,x),S}function n(g){var w=new t().setGraph(g.graph());return e.forEach(g.nodes(),function(x){w.setNode(x,g.node(x))}),e.forEach(g.edges(),function(x){var _=w.edge(x.v,x.w)||{weight:0,minlen:1},S=g.edge(x);w.setEdge(x.v,x.w,{weight:_.weight+S.weight,minlen:Math.max(_.minlen,S.minlen)})}),w}function i(g){var w=new t({multigraph:g.isMultigraph()}).setGraph(g.graph());return e.forEach(g.nodes(),function(x){g.children(x).length||w.setNode(x,g.node(x))}),e.forEach(g.edges(),function(x){w.setEdge(x,g.edge(x))}),w}function o(g){var w=e.map(g.nodes(),function(x){var _={};return e.forEach(g.outEdges(x),function(S){_[S.w]=(_[S.w]||0)+g.edge(S).weight}),_});return e.zipObject(g.nodes(),w)}function a(g){var w=e.map(g.nodes(),function(x){var _={};return e.forEach(g.inEdges(x),function(S){_[S.v]=(_[S.v]||0)+g.edge(S).weight}),_});return e.zipObject(g.nodes(),w)}function s(g,w){var x=g.x,_=g.y,S=w.x-x,E=w.y-_,I=g.width/2,N=g.height/2;if(!S&&!E)throw new Error("Not possible to find intersection inside of the rectangle");var T,M;return Math.abs(E)*I>Math.abs(S)*N?(E<0&&(N=-N),T=N*S/E,M=N):(S<0&&(I=-I),T=I,M=I*E/S),{x:x+T,y:_+M}}function c(g){var w=e.map(e.range(p(g)+1),function(){return[]});return e.forEach(g.nodes(),function(x){var _=g.node(x),S=_.rank;e.isUndefined(S)||(w[S][_.order]=x)}),w}function u(g){var w=e.min(e.map(g.nodes(),function(x){return g.node(x).rank}));e.forEach(g.nodes(),function(x){var _=g.node(x);e.has(_,"rank")&&(_.rank-=w)})}function d(g){var w=e.min(e.map(g.nodes(),function(E){return g.node(E).rank})),x=[];e.forEach(g.nodes(),function(E){var I=g.node(E).rank-w;x[I]||(x[I]=[]),x[I].push(E)});var _=0,S=g.graph().nodeRankFactor;e.forEach(x,function(E,I){e.isUndefined(E)&&I%S!==0?--_:_&&e.forEach(E,function(N){g.node(N).rank+=_})})}function h(g,w,x,_){var S={width:0,height:0};return arguments.length>=4&&(S.rank=x,S.order=_),r(g,"border",S,w)}function p(g){return e.max(e.map(g.nodes(),function(w){var x=g.node(w).rank;if(!e.isUndefined(x))return x}))}function v(g,w){var x={lhs:[],rhs:[]};return e.forEach(g,function(_){w(_)?x.lhs.push(_):x.rhs.push(_)}),x}function y(g,w){var x=e.now();try{return w()}finally{console.log(g+" time: "+(e.now()-x)+"ms")}}function m(g,w){return w()}return Fb}var $b,YT;function UQ(){if(YT)return $b;YT=1;var e=It(),t=Hr();$b={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 y,m,g;for(g=0,++c;c<d;++g,++c)p.points=[],m={width:0,height:0,edgeLabel:p,edgeObj:a,rank:c},y=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,y,{weight:p.weight},h),g===0&&o.graph().dummyChains.push(y),s=y;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 $b}var Vb,XT;function Yu(){if(XT)return Vb;XT=1;var e=It();Vb={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 Vb}var Hb,ZT;function W6(){if(ZT)return Hb;ZT=1;var e=It(),t=$n().Graph,r=Yu().slack;Hb=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 Hb}var Wb,JT;function GQ(){if(JT)return Wb;JT=1;var e=It(),t=W6(),r=Yu().slack,n=Yu().longestPath,i=$n().alg.preorder,o=$n().alg.postorder,a=Hr().simplify;Wb=s,s.initLowLimValues=h,s.initCutValues=c,s.calcCutValue=d,s.leaveEdge=v,s.enterEdge=y,s.exchangeEdges=m;function s(_){_=a(_),n(_);var S=t(_);h(S),c(S,_);for(var E,I;E=v(S);)I=y(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,M=S.edge(E,N),z=0;return M||(T=!1,M=S.edge(N,E)),z=M.weight,e.forEach(S.nodeEdges(E),function(j){var W=j.v===E,U=W?j.w:j.v;if(U!==N){var A=W===T,K=S.edge(j).weight;if(z+=A?K:-K,w(_,E,U)){var V=_.edge(E,U).cutvalue;z+=A?-V:V}}}),z}function h(_,S){arguments.length<2&&(S=_.nodes()[0]),p(_,{},1,S)}function p(_,S,E,I,N){var T=E,M=_.node(I);return S[I]=!0,e.forEach(_.neighbors(I),function(z){e.has(S,z)||(E=p(_,S,E,z,I))}),M.low=T,M.lim=E++,N?M.parent=N:delete M.parent,E}function v(_){return e.find(_.edges(),function(S){return _.edge(S).cutvalue<0})}function y(_,S,E){var I=E.v,N=E.w;S.hasEdge(I,N)||(I=E.w,N=E.v);var T=_.node(I),M=_.node(N),z=T,j=!1;T.lim>M.lim&&(z=M,j=!0);var W=e.filter(S.edges(),function(U){return j===x(_,_.node(U.v),z)&&j!==x(_,_.node(U.w),z)});return e.minBy(W,function(U){return r(S,U)})}function m(_,S,E,I){var N=E.v,T=E.w;_.removeEdge(N,T),_.setEdge(I.v,I.w,{}),h(_),c(_,S),g(_,S)}function g(_,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,M=S.edge(N,T),z=!1;M||(M=S.edge(T,N),z=!0),S.node(N).rank=S.node(T).rank+(z?M.minlen:-M.minlen)})}function w(_,S,E){return _.hasEdge(S,E)}function x(_,S,E){return E.low<=S.lim&&S.lim<=E.lim}return Wb}var Ub,QT;function KQ(){if(QT)return Ub;QT=1;var e=Yu(),t=e.longestPath,r=W6(),n=GQ();Ub=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 Ub}var Gb,eP;function YQ(){if(eP)return Gb;eP=1;var e=It();Gb=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],y=!0;a!==c.w;){if(s=i.node(a),y){for(;(v=d[p])!==h&&i.node(v).maxRank<s.rank;)p++;v===h&&(y=!1)}if(!y){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 Gb}var Kb,tP;function XQ(){if(tP)return Kb;tP=1;var e=It(),t=Hr();Kb={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 y=s.children(v);if(!y.length){v!==c&&s.setEdge(c,v,{weight:0,minlen:u});return}var m=t.addBorderNode(s,"_bt"),g=t.addBorderNode(s,"_bb"),w=s.node(v);s.setParent(m,v),w.borderTop=m,s.setParent(g,v),w.borderBottom=g,e.forEach(y,function(x){n(s,c,u,d,h,p,x);var _=s.node(x),S=_.borderTop?_.borderTop:x,E=_.borderBottom?_.borderBottom:x,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,g,{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 Kb}var Yb,rP;function ZQ(){if(rP)return Yb;rP=1;var e=It(),t=Hr();Yb=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 Yb}var Xb,nP;function JQ(){if(nP)return Xb;nP=1;var e=It();Xb={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 Xb}var Zb,iP;function QQ(){if(iP)return Zb;iP=1;var e=It();Zb=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 Zb}var Jb,oP;function eee(){if(oP)return Jb;oP=1;var e=It();Jb=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 y=0;v>0;)v%2&&(y+=d[v+1]),v=v-1>>1,d[v]+=p.weight;h+=p.weight*y})),h}return Jb}var Qb,aP;function tee(){if(aP)return Qb;aP=1;var e=It();Qb=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 Qb}var e0,sP;function ree(){if(sP)return e0;sP=1;var e=It();e0=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 e0}var t0,lP;function nee(){if(lP)return t0;lP=1;var e=It(),t=Hr();t0=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 y={vs:e.flatten(d,!0)};return p&&(y.barycenter=h/p,y.weight=p),y}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 t0}var r0,cP;function iee(){if(cP)return r0;cP=1;var e=It(),t=tee(),r=ree(),n=nee();r0=i;function i(s,c,u,d){var h=s.children(c),p=s.node(c),v=p?p.borderLeft:void 0,y=p?p.borderRight:void 0,m={};v&&(h=e.filter(h,function(E){return E!==v&&E!==y}));var g=t(s,h);e.forEach(g,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(g,u);o(w,m);var x=n(w,d);if(v&&(x.vs=e.flatten([v,x.vs,y],!0),s.predecessors(v).length)){var _=s.node(s.predecessors(v)[0]),S=s.node(s.predecessors(y)[0]);e.has(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+_.order+S.order)/(x.weight+2),x.weight+=2}return x}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 r0}var n0,uP;function oee(){if(uP)return n0;uP=1;var e=It(),t=$n().Graph;n0=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,y=c.edge(v,u),m=e.isUndefined(y)?0:y.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 n0}var i0,dP;function aee(){if(dP)return i0;dP=1;var e=It();i0=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 i0}var o0,fP;function see(){if(fP)return o0;fP=1;var e=It(),t=QQ(),r=eee(),n=iee(),i=oee(),o=aee(),a=$n().Graph,s=Hr();o0=c;function c(p){var v=s.maxRank(p),y=u(p,e.range(1,v+1),"inEdges"),m=u(p,e.range(v-1,-1,-1),"outEdges"),g=t(p);h(p,g);for(var w=Number.POSITIVE_INFINITY,x,_=0,S=0;S<4;++_,++S){d(_%2?y:m,_%4>=2),g=s.buildLayerMatrix(p);var E=r(p,g);E<w&&(S=0,x=e.cloneDeep(g),w=E)}h(p,x)}function u(p,v,y){return e.map(v,function(m){return i(p,m,y)})}function d(p,v){var y=new a;e.forEach(p,function(m){var g=m.graph().root,w=n(m,g,y,v);e.forEach(w.vs,function(x,_){m.node(x).order=_}),o(m,y,w.vs)})}function h(p,v){e.forEach(v,function(y){e.forEach(y,function(m,g){p.node(m).order=g})})}return o0}var a0,hP;function lee(){if(hP)return a0;hP=1;var e=It(),t=$n().Graph,r=Hr();a0={positionX:y,findType1Conflicts:n,findType2Conflicts:i,addConflict:a,hasConflict:s,verticalAlignment:c,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:h,balance:v};function n(w,x){var _={};function S(E,I){var N=0,T=0,M=E.length,z=e.last(I);return e.forEach(I,function(j,W){var U=o(w,j),A=U?w.node(U).order:M;(U||j===z)&&(e.forEach(I.slice(T,W+1),function(K){e.forEach(w.predecessors(K),function(V){var te=w.node(V),G=te.order;(G<N||A<G)&&!(te.dummy&&w.node(K).dummy)&&a(_,V,K)})}),T=W+1,N=A)}),I}return e.reduce(x,S),_}function i(w,x){var _={};function S(I,N,T,M,z){var j;e.forEach(e.range(N,T),function(W){j=I[W],w.node(j).dummy&&e.forEach(w.predecessors(j),function(U){var A=w.node(U);A.dummy&&(A.order<M||A.order>z)&&a(_,U,j)})})}function E(I,N){var T=-1,M,z=0;return e.forEach(N,function(j,W){if(w.node(j).dummy==="border"){var U=w.predecessors(j);U.length&&(M=w.node(U[0]).order,S(N,z,W,T,M),z=W,T=M)}S(N,z,N.length,M,I.length)}),N}return e.reduce(x,E),_}function o(w,x){if(w.node(x).dummy)return e.find(w.predecessors(x),function(_){return w.node(_).dummy})}function a(w,x,_){if(x>_){var S=x;x=_,_=S}var E=w[x];E||(w[x]=E={}),E[_]=!0}function s(w,x,_){if(x>_){var S=x;x=_,_=S}return e.has(w[x],_)}function c(w,x,_,S){var E={},I={},N={};return e.forEach(x,function(T){e.forEach(T,function(M,z){E[M]=M,I[M]=M,N[M]=z})}),e.forEach(x,function(T){var M=-1;e.forEach(T,function(z){var j=S(z);if(j.length){j=e.sortBy(j,function(V){return N[V]});for(var W=(j.length-1)/2,U=Math.floor(W),A=Math.ceil(W);U<=A;++U){var K=j[U];I[z]===z&&M<N[K]&&!s(_,z,K)&&(I[K]=z,I[z]=E[z]=E[K],M=N[K])}}})}),{root:E,align:I}}function u(w,x,_,S,E){var I={},N=d(w,x,_,E),T=E?"borderLeft":"borderRight";function M(W,U){for(var A=N.nodes(),K=A.pop(),V={};K;)V[K]?W(K):(V[K]=!0,A.push(K),A=A.concat(U(K))),K=A.pop()}function z(W){I[W]=N.inEdges(W).reduce(function(U,A){return Math.max(U,I[A.v]+N.edge(A))},0)}function j(W){var U=N.outEdges(W).reduce(function(K,V){return Math.min(K,I[V.w]-N.edge(V))},Number.POSITIVE_INFINITY),A=w.node(W);U!==Number.POSITIVE_INFINITY&&A.borderType!==T&&(I[W]=Math.max(I[W],U))}return M(z,N.predecessors.bind(N)),M(j,N.successors.bind(N)),e.forEach(S,function(W){I[W]=I[_[W]]}),I}function d(w,x,_,S){var E=new t,I=w.graph(),N=m(I.nodesep,I.edgesep,S);return e.forEach(x,function(T){var M;e.forEach(T,function(z){var j=_[z];if(E.setNode(j),M){var W=_[M],U=E.edge(W,j);E.setEdge(W,j,Math.max(N(w,z,M),U||0))}M=z})}),E}function h(w,x){return e.minBy(e.values(x),function(_){var S=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY;return e.forIn(_,function(I,N){var T=g(w,N)/2;S=Math.max(I+T,S),E=Math.min(I-T,E)}),S-E})}function p(w,x){var _=e.values(x),S=e.min(_),E=e.max(_);e.forEach(["u","d"],function(I){e.forEach(["l","r"],function(N){var T=I+N,M=w[T],z;if(M!==x){var j=e.values(M);z=N==="l"?S-e.min(j):E-e.max(j),z&&(w[T]=e.mapValues(M,function(W){return W+z}))}})})}function v(w,x){return e.mapValues(w.ul,function(_,S){if(x)return w[x.toLowerCase()][S];var E=e.sortBy(e.map(w,S));return(E[1]+E[2])/2})}function y(w){var x=r.buildLayerMatrix(w),_=e.merge(n(w,x),i(w,x)),S={},E;e.forEach(["u","d"],function(N){E=N==="u"?x:e.values(x).reverse(),e.forEach(["l","r"],function(T){T==="r"&&(E=e.map(E,function(W){return e.values(W).reverse()}));var M=(N==="u"?w.predecessors:w.successors).bind(w),z=c(w,E,_,M),j=u(w,E,z.root,z.align,T==="r");T==="r"&&(j=e.mapValues(j,function(W){return-W})),S[N+T]=j})});var I=h(w,S);return p(S,I),v(S,w.graph().align)}function m(w,x,_){return function(S,E,I){var N=S.node(E),T=S.node(I),M=0,z;if(M+=N.width/2,e.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":z=-N.width/2;break;case"r":z=N.width/2;break}if(z&&(M+=_?z:-z),z=0,M+=(N.dummy?x:w)/2,M+=(T.dummy?x:w)/2,M+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":z=T.width/2;break;case"r":z=-T.width/2;break}return z&&(M+=_?z:-z),z=0,M}}function g(w,x){return w.node(x).width}return a0}var s0,pP;function cee(){if(pP)return s0;pP=1;var e=It(),t=Hr(),r=lee().positionX;s0=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 s0}var l0,vP;function uee(){if(vP)return l0;vP=1;var e=It(),t=WQ(),r=UQ(),n=KQ(),i=Hr().normalizeRanks,o=YQ(),a=Hr().removeEmptyRanks,s=XQ(),c=ZQ(),u=JQ(),d=see(),h=cee(),p=Hr(),v=$n().Graph;l0=y;function y(D,$){var H=$&&$.debugTiming?p.time:p.notime;H("layout",function(){var q=H(" buildLayoutGraph",function(){return M(D)});H(" runLayout",function(){m(q,H)}),H(" updateInputGraph",function(){g(D,q)})})}function m(D,$){$(" makeSpaceForEdgeLabels",function(){z(D)}),$(" removeSelfEdges",function(){re(D)}),$(" acyclic",function(){t.run(D)}),$(" nestingGraph.run",function(){s.run(D)}),$(" rank",function(){n(p.asNonCompoundGraph(D))}),$(" injectEdgeLabelProxies",function(){j(D)}),$(" removeEmptyRanks",function(){a(D)}),$(" nestingGraph.cleanup",function(){s.cleanup(D)}),$(" normalizeRanks",function(){i(D)}),$(" assignRankMinMax",function(){W(D)}),$(" removeEdgeLabelProxies",function(){U(D)}),$(" normalize.run",function(){r.run(D)}),$(" parentDummyChains",function(){o(D)}),$(" addBorderSegments",function(){c(D)}),$(" order",function(){d(D)}),$(" insertSelfEdges",function(){P(D)}),$(" adjustCoordinateSystem",function(){u.adjust(D)}),$(" position",function(){h(D)}),$(" positionSelfEdges",function(){B(D)}),$(" removeBorderNodes",function(){G(D)}),$(" normalize.undo",function(){r.undo(D)}),$(" fixupEdgeLabelCoords",function(){V(D)}),$(" undoCoordinateSystem",function(){u.undo(D)}),$(" translateGraph",function(){A(D)}),$(" assignNodeIntersects",function(){K(D)}),$(" reversePoints",function(){te(D)}),$(" acyclic.undo",function(){t.undo(D)})}function g(D,$){e.forEach(D.nodes(),function(H){var q=D.node(H),Y=$.node(H);q&&(q.x=Y.x,q.y=Y.y,$.children(H).length&&(q.width=Y.width,q.height=Y.height))}),e.forEach(D.edges(),function(H){var q=D.edge(H),Y=$.edge(H);q.points=Y.points,e.has(Y,"x")&&(q.x=Y.x,q.y=Y.y)}),D.graph().width=$.graph().width,D.graph().height=$.graph().height}var w=["nodesep","edgesep","ranksep","marginx","marginy"],x={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 M(D){var $=new v({multigraph:!0,compound:!0}),H=Q(D.graph());return $.setGraph(e.merge({},x,X(H,w),e.pick(H,_))),e.forEach(D.nodes(),function(q){var Y=Q(D.node(q));$.setNode(q,e.defaults(X(Y,S),E)),$.setParent(q,D.parent(q))}),e.forEach(D.edges(),function(q){var Y=Q(D.edge(q));$.setEdge(q,e.merge({},N,X(Y,I),e.pick(Y,T)))}),$}function z(D){var $=D.graph();$.ranksep/=2,e.forEach(D.edges(),function(H){var q=D.edge(H);q.minlen*=2,q.labelpos.toLowerCase()!=="c"&&($.rankdir==="TB"||$.rankdir==="BT"?q.width+=q.labeloffset:q.height+=q.labeloffset)})}function j(D){e.forEach(D.edges(),function($){var H=D.edge($);if(H.width&&H.height){var q=D.node($.v),Y=D.node($.w),ie={rank:(Y.rank-q.rank)/2+q.rank,e:$};p.addDummyNode(D,"edge-proxy",ie,"_ep")}})}function W(D){var $=0;e.forEach(D.nodes(),function(H){var q=D.node(H);q.borderTop&&(q.minRank=D.node(q.borderTop).rank,q.maxRank=D.node(q.borderBottom).rank,$=e.max($,q.maxRank))}),D.graph().maxRank=$}function U(D){e.forEach(D.nodes(),function($){var H=D.node($);H.dummy==="edge-proxy"&&(D.edge(H.e).labelRank=H.rank,D.removeNode($))})}function A(D){var $=Number.POSITIVE_INFINITY,H=0,q=Number.POSITIVE_INFINITY,Y=0,ie=D.graph(),ne=ie.marginx||0,pe=ie.marginy||0;function Z(J){var ae=J.x,he=J.y,ue=J.width,de=J.height;$=Math.min($,ae-ue/2),H=Math.max(H,ae+ue/2),q=Math.min(q,he-de/2),Y=Math.max(Y,he+de/2)}e.forEach(D.nodes(),function(J){Z(D.node(J))}),e.forEach(D.edges(),function(J){var ae=D.edge(J);e.has(ae,"x")&&Z(ae)}),$-=ne,q-=pe,e.forEach(D.nodes(),function(J){var ae=D.node(J);ae.x-=$,ae.y-=q}),e.forEach(D.edges(),function(J){var ae=D.edge(J);e.forEach(ae.points,function(he){he.x-=$,he.y-=q}),e.has(ae,"x")&&(ae.x-=$),e.has(ae,"y")&&(ae.y-=q)}),ie.width=H-$+ne,ie.height=Y-q+pe}function K(D){e.forEach(D.edges(),function($){var H=D.edge($),q=D.node($.v),Y=D.node($.w),ie,ne;H.points?(ie=H.points[0],ne=H.points[H.points.length-1]):(H.points=[],ie=Y,ne=q),H.points.unshift(p.intersectRect(q,ie)),H.points.push(p.intersectRect(Y,ne))})}function V(D){e.forEach(D.edges(),function($){var H=D.edge($);if(e.has(H,"x"))switch((H.labelpos==="l"||H.labelpos==="r")&&(H.width-=H.labeloffset),H.labelpos){case"l":H.x-=H.width/2+H.labeloffset;break;case"r":H.x+=H.width/2+H.labeloffset;break}})}function te(D){e.forEach(D.edges(),function($){var H=D.edge($);H.reversed&&H.points.reverse()})}function G(D){e.forEach(D.nodes(),function($){if(D.children($).length){var H=D.node($),q=D.node(H.borderTop),Y=D.node(H.borderBottom),ie=D.node(e.last(H.borderLeft)),ne=D.node(e.last(H.borderRight));H.width=Math.abs(ne.x-ie.x),H.height=Math.abs(Y.y-q.y),H.x=ie.x+H.width/2,H.y=q.y+H.height/2}}),e.forEach(D.nodes(),function($){D.node($).dummy==="border"&&D.removeNode($)})}function re(D){e.forEach(D.edges(),function($){if($.v===$.w){var H=D.node($.v);H.selfEdges||(H.selfEdges=[]),H.selfEdges.push({e:$,label:D.edge($)}),D.removeEdge($)}})}function P(D){var $=p.buildLayerMatrix(D);e.forEach($,function(H){var q=0;e.forEach(H,function(Y,ie){var ne=D.node(Y);ne.order=ie+q,e.forEach(ne.selfEdges,function(pe){p.addDummyNode(D,"selfedge",{width:pe.label.width,height:pe.label.height,rank:ne.rank,order:ie+ ++q,e:pe.e,label:pe.label},"_se")}),delete ne.selfEdges})})}function B(D){e.forEach(D.nodes(),function($){var H=D.node($);if(H.dummy==="selfedge"){var q=D.node(H.e.v),Y=q.x+q.width/2,ie=q.y,ne=H.x-Y,pe=q.height/2;D.setEdge(H.e,H.label),D.removeNode($),H.label.points=[{x:Y+2*ne/3,y:ie-pe},{x:Y+5*ne/6,y:ie-pe},{x:Y+ne,y:ie},{x:Y+5*ne/6,y:ie+pe},{x:Y+2*ne/3,y:ie+pe}],H.label.x=H.x,H.label.y=H.y}})}function X(D,$){return e.mapValues(e.pick(D,$),Number)}function Q(D){var $={};return e.forEach(D,function(H,q){$[q.toLowerCase()]=H}),$}return l0}var c0,gP;function dee(){if(gP)return c0;gP=1;var e=It(),t=Hr(),r=$n().Graph;c0={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 c0}var u0,mP;function fee(){return mP||(mP=1,u0="0.8.5"),u0}var d0,bP;function hee(){return bP||(bP=1,d0={graphlib:$n(),layout:uee(),debug:dee(),util:{time:Hr().time,notime:Hr().notime},version:fee()}),d0}var pee=hee();const yP=Qi(pee);function vee(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 y=d(t);if(!h(p,y)){const m=p;u(p=y,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 gee=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),xP=gee?C.useEffect:C.useLayoutEffect;function mee(e){const t=typeof e=="function"?vee(e):e,r=(n=t.getState,i=Object.is)=>{const[,o]=C.useReducer(g=>g+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)),xP(()=>{v&&(h.current=p),s.current=a,c.current=n,u.current=i,d.current=!1});const y=C.useRef(a);xP(()=>{const g=()=>{try{const x=t.getState(),_=c.current(x);u.current(h.current,_)||(s.current=x,h.current=_,o())}catch{d.current=!0,o()}},w=t.subscribe(g);return t.getState()!==y.current&&g(),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 bee(){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 yee={value:()=>{}};function Vd(){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 Eu(r)}function Eu(e){this._=e}function xee(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}})}Eu.prototype=Vd.prototype={constructor:Eu,on:function(e,t){var r=this._,n=xee(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=wee(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]=wP(r[i],e.name,t);else if(t==null)for(i in r)r[i]=wP(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 Eu(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 wee(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function wP(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=yee,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Aw="http://www.w3.org/1999/xhtml";const SP={svg:"http://www.w3.org/2000/svg",xhtml:Aw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Hd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),SP.hasOwnProperty(t)?{space:SP[t],local:e}:e}function See(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Aw&&t.documentElement.namespaceURI===Aw?t.createElement(e):t.createElementNS(r,e)}}function Eee(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function U6(e){var t=Hd(e);return(t.local?Eee:See)(t)}function _ee(){}function AS(e){return e==null?_ee:function(){return this.querySelector(e)}}function Oee(e){typeof e!="function"&&(e=AS(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 ln(n,this._parents)}function Cee(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Iee(){return[]}function G6(e){return e==null?Iee:function(){return this.querySelectorAll(e)}}function Ree(e){return function(){return Cee(e.apply(this,arguments))}}function Nee(e){typeof e=="function"?e=Ree(e):e=G6(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 ln(n,i)}function K6(e){return function(){return this.matches(e)}}function Y6(e){return function(t){return t.matches(e)}}var Tee=Array.prototype.find;function Pee(e){return function(){return Tee.call(this.children,e)}}function Mee(){return this.firstElementChild}function kee(e){return this.select(e==null?Mee:Pee(typeof e=="function"?e:Y6(e)))}var Aee=Array.prototype.filter;function Dee(){return Array.from(this.children)}function jee(e){return function(){return Aee.call(this.children,e)}}function qee(e){return this.selectAll(e==null?Dee:jee(typeof e=="function"?e:Y6(e)))}function zee(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 ln(n,this._parents)}function X6(e){return new Array(e.length)}function Lee(){return new ln(this._enter||this._groups.map(X6),this._parents)}function Xu(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Xu.prototype={constructor:Xu,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 Bee(e){return function(){return e}}function Fee(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 Xu(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 Xu(e,o[s]);for(s=0;s<d;++s)(c=t[s])&&u.get(p[s])===c&&(i[s]=c)}function Vee(e){return e.__data__}function Hee(e,t){if(!arguments.length)return Array.from(this,Vee);var r=t?$ee:Fee,n=this._parents,i=this._groups;typeof e!="function"&&(e=Bee(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=Wee(e.call(d,d&&d.__data__,u,n)),y=v.length,m=s[u]=new Array(y),g=a[u]=new Array(y),w=c[u]=new Array(p);r(d,h,m,g,w,v,t);for(var x=0,_=0,S,E;x<y;++x)if(S=m[x]){for(x>=_&&(_=x+1);!(E=g[_])&&++_<y;);S._next=E||null}}return a=new ln(a,n),a._enter=s,a._exit=c,a}function Wee(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Uee(){return new ln(this._exit||this._groups.map(X6),this._parents)}function Gee(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 Kee(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,y=0;y<h;++y)(v=u[y]||d[y])&&(p[y]=v);for(;c<i;++c)s[c]=r[c];return new ln(s,this._parents)}function Yee(){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 Xee(e){e||(e=Zee);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 ln(i,this._parents).order()}function Zee(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Jee(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Qee(){return Array.from(this)}function ete(){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 tte(){let e=0;for(const t of this)++e;return e}function rte(){return!this.node()}function nte(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 ite(e){return function(){this.removeAttribute(e)}}function ote(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ate(e,t){return function(){this.setAttribute(e,t)}}function ste(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function lte(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function cte(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 ute(e,t){var r=Hd(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?ote:ite:typeof t=="function"?r.local?cte:lte:r.local?ste:ate)(r,t))}function Z6(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function dte(e){return function(){this.style.removeProperty(e)}}function fte(e,t,r){return function(){this.style.setProperty(e,t,r)}}function hte(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function pte(e,t,r){return arguments.length>1?this.each((t==null?dte:typeof t=="function"?hte:fte)(e,t,r??"")):ka(this.node(),e)}function ka(e,t){return e.style.getPropertyValue(t)||Z6(e).getComputedStyle(e,null).getPropertyValue(t)}function vte(e){return function(){delete this[e]}}function gte(e,t){return function(){this[e]=t}}function mte(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function bte(e,t){return arguments.length>1?this.each((t==null?vte:typeof t=="function"?mte:gte)(e,t)):this.node()[e]}function J6(e){return e.trim().split(/^|\s+/)}function DS(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 eq(e,t){for(var r=DS(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function tq(e,t){for(var r=DS(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function yte(e){return function(){eq(this,e)}}function xte(e){return function(){tq(this,e)}}function wte(e,t){return function(){(t.apply(this,arguments)?eq:tq)(this,e)}}function Ste(e,t){var r=J6(e+"");if(arguments.length<2){for(var n=DS(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?wte:t?yte:xte)(r,t))}function Ete(){this.textContent=""}function _te(e){return function(){this.textContent=e}}function Ote(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Cte(e){return arguments.length?this.each(e==null?Ete:(typeof e=="function"?Ote:_te)(e)):this.node().textContent}function Ite(){this.innerHTML=""}function Rte(e){return function(){this.innerHTML=e}}function Nte(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Tte(e){return arguments.length?this.each(e==null?Ite:(typeof e=="function"?Nte:Rte)(e)):this.node().innerHTML}function Pte(){this.nextSibling&&this.parentNode.appendChild(this)}function Mte(){return this.each(Pte)}function kte(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ate(){return this.each(kte)}function Dte(e){var t=typeof e=="function"?e:U6(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function jte(){return null}function qte(e,t){var r=typeof e=="function"?e:U6(e),n=t==null?jte:typeof t=="function"?t:AS(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function zte(){var e=this.parentNode;e&&e.removeChild(this)}function Lte(){return this.each(zte)}function Bte(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Fte(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $te(e){return this.select(e?Fte:Bte)}function Vte(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Hte(e){return function(t){e.call(this,t,this.__data__)}}function Wte(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 Ute(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 Gte(e,t,r){return function(){var n=this.__on,i,o=Hte(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 Kte(e,t,r){var n=Wte(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?Gte:Ute,i=0;i<o;++i)this.each(s(n[i],t,r));return this}function rq(e,t,r){var n=Z6(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 Yte(e,t){return function(){return rq(this,e,t)}}function Xte(e,t){return function(){return rq(this,e,t.apply(this,arguments))}}function Zte(e,t){return this.each((typeof t=="function"?Xte:Yte)(e,t))}function*Jte(){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 nq=[null];function ln(e,t){this._groups=e,this._parents=t}function Al(){return new ln([[document.documentElement]],nq)}function Qte(){return this}ln.prototype=Al.prototype={constructor:ln,select:Oee,selectAll:Nee,selectChild:kee,selectChildren:qee,filter:zee,data:Hee,enter:Lee,exit:Uee,join:Gee,merge:Kee,selection:Qte,order:Yee,sort:Xee,call:Jee,nodes:Qee,node:ete,size:tte,empty:rte,each:nte,attr:ute,style:pte,property:bte,classed:Ste,text:Cte,html:Tte,raise:Mte,lower:Ate,append:Dte,insert:qte,remove:Lte,clone:$te,datum:Vte,on:Kte,dispatch:Zte,[Symbol.iterator]:Jte};function jn(e){return typeof e=="string"?new ln([[document.querySelector(e)]],[document.documentElement]):new ln([[e]],nq)}function ere(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ti(e,t){if(e=ere(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 tre={passive:!1},hl={capture:!0,passive:!1};function f0(e){e.stopImmediatePropagation()}function Sa(e){e.preventDefault(),e.stopImmediatePropagation()}function iq(e){var t=e.document.documentElement,r=jn(e).on("dragstart.drag",Sa,hl);"onselectstart"in t?r.on("selectstart.drag",Sa,hl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function oq(e,t){var r=e.document.documentElement,n=jn(e).on("dragstart.drag",null);t&&(n.on("click.drag",Sa,hl),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 Gc=e=>()=>e;function Dw(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}})}Dw.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function rre(e){return!e.ctrlKey&&!e.button}function nre(){return this.parentNode}function ire(e,t){return t??{x:e.x,y:e.y}}function ore(){return navigator.maxTouchPoints||"ontouchstart"in this}function are(){var e=rre,t=nre,r=ire,n=ore,i={},o=Vd("start","drag","end"),a=0,s,c,u,d,h=0;function p(S){S.on("mousedown.drag",v).filter(n).on("touchstart.drag",g).on("touchmove.drag",w,tre).on("touchend.drag touchcancel.drag",x).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",y,hl).on("mouseup.drag",m,hl),iq(S.view),f0(S),u=!1,s=S.clientX,c=S.clientY,I("start",S))}}function y(S){if(Sa(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),oq(S.view,u),Sa(S),i.mouse("end",S)}function g(S,E){if(e.call(this,S,E)){var I=S.changedTouches,N=t.call(this,S,E),T=I.length,M,z;for(M=0;M<T;++M)(z=_(this,N,S,E,I[M].identifier,I[M]))&&(f0(S),z("start",S,I[M]))}}function w(S){var E=S.changedTouches,I=E.length,N,T;for(N=0;N<I;++N)(T=i[E[N].identifier])&&(Sa(S),T("drag",S,E[N]))}function x(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])&&(f0(S),T("end",S,E[N]))}function _(S,E,I,N,T,M){var z=o.copy(),j=ti(M||I,E),W,U,A;if((A=r.call(S,new Dw("beforestart",{sourceEvent:I,target:p,identifier:T,active:a,x:j[0],y:j[1],dx:0,dy:0,dispatch:z}),N))!=null)return W=A.x-j[0]||0,U=A.y-j[1]||0,function K(V,te,G){var re=j,P;switch(V){case"start":i[T]=K,P=a++;break;case"end":delete i[T],--a;case"drag":j=ti(G||te,E),P=a;break}z.call(V,S,new Dw(V,{sourceEvent:te,subject:A,target:p,identifier:T,active:P,x:j[0]+W,y:j[1]+U,dx:j[0]-re[0],dy:j[1]-re[1],dispatch:z}),N)}}return p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Gc(!!S),p):e},p.container=function(S){return arguments.length?(t=typeof S=="function"?S:Gc(S),p):t},p.subject=function(S){return arguments.length?(r=typeof S=="function"?S:Gc(S),p):r},p.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:Gc(!!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 jS(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function aq(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Dl(){}var pl=.7,Zu=1/pl,Ea="\\s*([+-]?\\d+)\\s*",vl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sre=/^#([0-9a-f]{3,8})$/,lre=new RegExp(`^rgb\\(${Ea},${Ea},${Ea}\\)$`),cre=new RegExp(`^rgb\\(${ii},${ii},${ii}\\)$`),ure=new RegExp(`^rgba\\(${Ea},${Ea},${Ea},${vl}\\)$`),dre=new RegExp(`^rgba\\(${ii},${ii},${ii},${vl}\\)$`),fre=new RegExp(`^hsl\\(${vl},${ii},${ii}\\)$`),hre=new RegExp(`^hsla\\(${vl},${ii},${ii},${vl}\\)$`),EP={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};jS(Dl,gl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_P,formatHex:_P,formatHex8:pre,formatHsl:vre,formatRgb:OP,toString:OP});function _P(){return this.rgb().formatHex()}function pre(){return this.rgb().formatHex8()}function vre(){return sq(this).formatHsl()}function OP(){return this.rgb().formatRgb()}function gl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=sre.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?CP(t):r===3?new Fr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Kc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Kc(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=lre.exec(e))?new Fr(t[1],t[2],t[3],1):(t=cre.exec(e))?new Fr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ure.exec(e))?Kc(t[1],t[2],t[3],t[4]):(t=dre.exec(e))?Kc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=fre.exec(e))?NP(t[1],t[2]/100,t[3]/100,1):(t=hre.exec(e))?NP(t[1],t[2]/100,t[3]/100,t[4]):EP.hasOwnProperty(e)?CP(EP[e]):e==="transparent"?new Fr(NaN,NaN,NaN,0):null}function CP(e){return new Fr(e>>16&255,e>>8&255,e&255,1)}function Kc(e,t,r,n){return n<=0&&(e=t=r=NaN),new Fr(e,t,r,n)}function gre(e){return e instanceof Dl||(e=gl(e)),e?(e=e.rgb(),new Fr(e.r,e.g,e.b,e.opacity)):new Fr}function jw(e,t,r,n){return arguments.length===1?gre(e):new Fr(e,t,r,n??1)}function Fr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}jS(Fr,jw,aq(Dl,{brighter(e){return e=e==null?Zu:Math.pow(Zu,e),new Fr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pl:Math.pow(pl,e),new Fr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fr(_o(this.r),_o(this.g),_o(this.b),Ju(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:IP,formatHex:IP,formatHex8:mre,formatRgb:RP,toString:RP}));function IP(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}`}function mre(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}${yo((isNaN(this.opacity)?1:this.opacity)*255)}`}function RP(){const e=Ju(this.opacity);return`${e===1?"rgb(":"rgba("}${_o(this.r)}, ${_o(this.g)}, ${_o(this.b)}${e===1?")":`, ${e})`}`}function Ju(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _o(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yo(e){return e=_o(e),(e<16?"0":"")+e.toString(16)}function NP(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 sq(e){if(e instanceof qn)return new qn(e.h,e.s,e.l,e.opacity);if(e instanceof Dl||(e=gl(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 bre(e,t,r,n){return arguments.length===1?sq(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}jS(qn,bre,aq(Dl,{brighter(e){return e=e==null?Zu:Math.pow(Zu,e),new qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pl:Math.pow(pl,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 Fr(h0(e>=240?e-240:e+120,i,n),h0(e,i,n),h0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new qn(TP(this.h),Yc(this.s),Yc(this.l),Ju(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=Ju(this.opacity);return`${e===1?"hsl(":"hsla("}${TP(this.h)}, ${Yc(this.s)*100}%, ${Yc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function TP(e){return e=(e||0)%360,e<0?e+360:e}function Yc(e){return Math.max(0,Math.min(1,e||0))}function h0(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 lq=e=>()=>e;function yre(e,t){return function(r){return e+r*t}}function xre(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 wre(e){return(e=+e)==1?cq:function(t,r){return r-t?xre(t,r,e):lq(isNaN(t)?r:t)}}function cq(e,t){var r=t-e;return r?yre(e,r):lq(isNaN(e)?t:e)}const PP=(function e(t){var r=wre(t);function n(i,o){var a=r((i=jw(i)).r,(o=jw(o)).r),s=r(i.g,o.g),c=r(i.b,o.b),u=cq(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 Gi(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var qw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,p0=new RegExp(qw.source,"g");function Sre(e){return function(){return e}}function Ere(e){return function(t){return e(t)+""}}function _re(e,t){var r=qw.lastIndex=p0.lastIndex=0,n,i,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(n=qw.exec(e))&&(i=p0.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:Gi(n,i)})),r=p0.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?Ere(c[0].x):Sre(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 MP=180/Math.PI,zw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function uq(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)*MP,skewX:Math.atan(c)*MP,scaleX:a,scaleY:s}}var Xc;function Ore(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zw:uq(t.a,t.b,t.c,t.d,t.e,t.f)}function Cre(e){return e==null||(Xc||(Xc=document.createElementNS("http://www.w3.org/2000/svg","g")),Xc.setAttribute("transform",e),!(e=Xc.transform.baseVal.consolidate()))?zw:(e=e.matrix,uq(e.a,e.b,e.c,e.d,e.e,e.f))}function dq(e,t,r,n){function i(u){return u.length?u.pop()+" ":""}function o(u,d,h,p,v,y){if(u!==h||d!==p){var m=v.push("translate(",null,t,null,r);y.push({i:m-4,x:Gi(u,h)},{i:m-2,x:Gi(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:Gi(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:Gi(u,d)}):d&&h.push(i(h)+"skewX("+d+n)}function c(u,d,h,p,v,y){if(u!==h||d!==p){var m=v.push(i(v)+"scale(",null,",",null,")");y.push({i:m-4,x:Gi(u,h)},{i:m-2,x:Gi(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 y=-1,m=p.length,g;++y<m;)h[(g=p[y]).i]=g.x(v);return h.join("")}}}var Ire=dq(Ore,"px, ","px)","deg)"),Rre=dq(Cre,", ",")",")"),Nre=1e-12;function kP(e){return((e=Math.exp(e))+1/e)/2}function Tre(e){return((e=Math.exp(e))-1/e)/2}function Pre(e){return((e=Math.exp(2*e))-1)/(e+1)}const Mre=(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,y=h-c,m=v*v+y*y,g,w;if(m<Nre)w=Math.log(p/u)/t,g=function(N){return[s+N*v,c+N*y,u*Math.exp(t*N*w)]};else{var x=Math.sqrt(m),_=(p*p-u*u+n*m)/(2*u*r*x),S=(p*p-u*u-n*m)/(2*p*r*x),E=Math.log(Math.sqrt(_*_+1)-_),I=Math.log(Math.sqrt(S*S+1)-S);w=(I-E)/t,g=function(N){var T=N*w,M=kP(E),z=u/(r*x)*(M*Pre(t*T+E)-Tre(E));return[s+z*v,c+z*y,u*M/kP(t*T+E)]}}return g.duration=w*1e3*t/Math.SQRT2,g}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 Aa=0,Gs=0,_s=0,fq=1e3,Qu,Ks,ed=0,Po=0,Wd=0,ml=typeof performance=="object"&&performance.now?performance:Date,hq=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function qS(){return Po||(hq(kre),Po=ml.now()+Wd)}function kre(){Po=0}function td(){this._call=this._time=this._next=null}td.prototype=pq.prototype={constructor:td,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?qS():+r)+(t==null?0:+t),!this._next&&Ks!==this&&(Ks?Ks._next=this:Qu=this,Ks=this),this._call=e,this._time=r,Lw()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lw())}};function pq(e,t,r){var n=new td;return n.restart(e,t,r),n}function Are(){qS(),++Aa;for(var e=Qu,t;e;)(t=Po-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Aa}function AP(){Po=(ed=ml.now())+Wd,Aa=Gs=0;try{Are()}finally{Aa=0,jre(),Po=0}}function Dre(){var e=ml.now(),t=e-ed;t>fq&&(Wd-=t,ed=e)}function jre(){for(var e,t=Qu,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:Qu=r);Ks=e,Lw(n)}function Lw(e){if(!Aa){Gs&&(Gs=clearTimeout(Gs));var t=e-Po;t>24?(e<1/0&&(Gs=setTimeout(AP,e-ml.now()-Wd)),_s&&(_s=clearInterval(_s))):(_s||(ed=ml.now(),_s=setInterval(Dre,fq)),Aa=1,hq(AP))}}function DP(e,t,r){var n=new td;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var qre=Vd("start","end","cancel","interrupt"),zre=[],vq=0,jP=1,Bw=2,_u=3,qP=4,Fw=5,Ou=6;function Ud(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Lre(e,r,{name:t,index:n,group:i,on:qre,tween:zre,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:vq})}function zS(e,t){var r=Hn(e,t);if(r.state>vq)throw new Error("too late; already scheduled");return r}function li(e,t){var r=Hn(e,t);if(r.state>_u)throw new Error("too late; already running");return r}function Hn(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Lre(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=pq(o,0,r.time);function o(u){r.state=jP,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!==jP)return c();for(d in n)if(v=n[d],v.name===r.name){if(v.state===_u)return DP(a);v.state===qP?(v.state=Ou,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete n[d]):+d<t&&(v.state=Ou,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete n[d])}if(DP(function(){r.state===_u&&(r.state=qP,r.timer.restart(s,r.delay,r.time),s(u))}),r.state=Bw,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Bw){for(r.state=_u,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=Fw,1),h=-1,p=i.length;++h<p;)i[h].call(e,d);r.state===Fw&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=Ou,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function Cu(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>Bw&&n.state<Fw,n.state=Ou,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function Bre(e){return this.each(function(){Cu(this,e)})}function Fre(e,t){var r,n;return function(){var i=li(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=li(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 Vre(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Hn(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?Fre:$re)(r,e,t))}function LS(e,t,r){var n=e._id;return e.each(function(){var i=li(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Hn(i,n).value[t]}}function gq(e,t){var r;return(typeof t=="number"?Gi:t instanceof gl?PP:(r=gl(t))?(t=r,PP):_re)(e,t)}function Hre(e){return function(){this.removeAttribute(e)}}function Wre(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ure(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 Gre(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 Kre(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 Yre(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 Xre(e,t){var r=Hd(e),n=r==="transform"?Rre:gq;return this.attrTween(e,typeof t=="function"?(r.local?Yre:Kre)(r,n,LS(this,"attr."+e,t)):t==null?(r.local?Wre:Hre)(r):(r.local?Gre:Ure)(r,n,t))}function Zre(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Jre(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Qre(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Jre(e,o)),r}return i._value=t,i}function ene(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Zre(e,o)),r}return i._value=t,i}function tne(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=Hd(e);return this.tween(r,(n.local?Qre:ene)(n,t))}function rne(e,t){return function(){zS(this,e).delay=+t.apply(this,arguments)}}function nne(e,t){return t=+t,function(){zS(this,e).delay=t}}function ine(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?rne:nne)(t,e)):Hn(this.node(),t).delay}function one(e,t){return function(){li(this,e).duration=+t.apply(this,arguments)}}function ane(e,t){return t=+t,function(){li(this,e).duration=t}}function sne(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?one:ane)(t,e)):Hn(this.node(),t).duration}function lne(e,t){if(typeof t!="function")throw new Error;return function(){li(this,e).ease=t}}function cne(e){var t=this._id;return arguments.length?this.each(lne(t,e)):Hn(this.node(),t).ease}function une(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;li(this,e).ease=r}}function dne(e){if(typeof e!="function")throw new Error;return this.each(une(this._id,e))}function fne(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 _i(n,this._parents,this._name,this._id)}function hne(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 _i(a,this._parents,this._name,this._id)}function pne(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 vne(e,t,r){var n,i,o=pne(t)?zS:li;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function gne(e,t){var r=this._id;return arguments.length<2?Hn(this.node(),r).on.on(e):this.each(vne(r,e,t))}function mne(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function bne(){return this.on("end.remove",mne(this._id))}function yne(e){var t=this._name,r=this._id;typeof e!="function"&&(e=AS(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,Ud(u[p],t,r,p,u,Hn(d,r)));return new _i(o,this._parents,t,r)}function xne(e){var t=this._name,r=this._id;typeof e!="function"&&(e=G6(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,y=Hn(d,r),m=0,g=p.length;m<g;++m)(v=p[m])&&Ud(v,t,r,m,p,y);o.push(p),a.push(d)}return new _i(o,a,t,r)}var wne=Al.prototype.constructor;function Sne(){return new wne(this._groups,this._parents)}function Ene(e,t){var r,n,i;return function(){var o=ka(this,e),a=(this.style.removeProperty(e),ka(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function mq(e){return function(){this.style.removeProperty(e)}}function _ne(e,t,r){var n,i=r+"",o;return function(){var a=ka(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=ka(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),ka(this,e))),a===c?null:a===n&&c===i?o:(i=c,o=t(n=a,s))}}function Cne(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var c=li(this,e),u=c.on,d=c.value[o]==null?s||(s=mq(t)):void 0;(u!==r||i!==d)&&(n=(r=u).copy()).on(a,i=d),c.on=n}}function Ine(e,t,r){var n=(e+="")=="transform"?Ire:gq;return t==null?this.styleTween(e,Ene(e,n)).on("end.style."+e,mq(e)):typeof t=="function"?this.styleTween(e,One(e,n,LS(this,"style."+e,t))).each(Cne(this._id,e)):this.styleTween(e,_ne(e,n,t),r).on("end.style."+e,null)}function Rne(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function Nne(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&Rne(e,a,r)),n}return o._value=t,o}function Tne(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,Nne(e,t,r??""))}function Pne(e){return function(){this.textContent=e}}function Mne(e){return function(){var t=e(this);this.textContent=t??""}}function kne(e){return this.tween("text",typeof e=="function"?Mne(LS(this,"text",e)):Pne(e==null?"":e+""))}function Ane(e){return function(t){this.textContent=e.call(this,t)}}function Dne(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&Ane(i)),t}return n._value=e,n}function jne(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,Dne(e))}function qne(){for(var e=this._name,t=this._id,r=bq(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,c,u=0;u<s;++u)if(c=a[u]){var d=Hn(c,t);Ud(c,e,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new _i(n,this._parents,e,r)}function zne(){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=li(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 Lne=0;function _i(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function bq(){return++Lne}var yi=Al.prototype;_i.prototype={constructor:_i,select:yne,selectAll:xne,selectChild:yi.selectChild,selectChildren:yi.selectChildren,filter:fne,merge:hne,selection:Sne,transition:qne,call:yi.call,nodes:yi.nodes,node:yi.node,size:yi.size,empty:yi.empty,each:yi.each,on:gne,attr:Xre,attrTween:tne,style:Ine,styleTween:Tne,text:kne,textTween:jne,remove:bne,tween:Vre,delay:ine,duration:sne,ease:cne,easeVarying:dne,end:zne,[Symbol.iterator]:yi[Symbol.iterator]};function Bne(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Fne={time:null,delay:0,duration:250,ease:Bne};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 Vne(e){var t,r;e instanceof _i?(t=e._id,e=e._name):(t=bq(),(r=Fne).time=qS(),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])&&Ud(c,e,t,u,a,r||$ne(c,t));return new _i(n,this._parents,e,t)}Al.prototype.interrupt=Bre;Al.prototype.transition=Vne;const Zc=e=>()=>e;function Hne(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 Si(e,t,r){this.k=e,this.x=t,this.y=r}Si.prototype={constructor:Si,scale:function(e){return e===1?this:new Si(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Si(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 Oo=new Si(1,0,0);Si.prototype;function v0(e){e.stopImmediatePropagation()}function Os(e){e.preventDefault(),e.stopImmediatePropagation()}function Wne(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Une(){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 zP(){return this.__zoom||Oo}function Gne(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Kne(){return navigator.maxTouchPoints||"ontouchstart"in this}function Yne(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 Xne(){var e=Wne,t=Une,r=Yne,n=Gne,i=Kne,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=Mre,u=Vd("start","zoom","end"),d,h,p,v=500,y=150,m=0,g=10;function w(A){A.property("__zoom",zP).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",z).filter(i).on("touchstart.zoom",j).on("touchmove.zoom",W).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(A,K,V,te){var G=A.selection?A.selection():A;G.property("__zoom",zP),A!==G?E(A,K,V,te):G.interrupt().each(function(){I(this,arguments).event(te).start().zoom(null,typeof K=="function"?K.apply(this,arguments):K).end()})},w.scaleBy=function(A,K,V,te){w.scaleTo(A,function(){var G=this.__zoom.k,re=typeof K=="function"?K.apply(this,arguments):K;return G*re},V,te)},w.scaleTo=function(A,K,V,te){w.transform(A,function(){var G=t.apply(this,arguments),re=this.__zoom,P=V==null?S(G):typeof V=="function"?V.apply(this,arguments):V,B=re.invert(P),X=typeof K=="function"?K.apply(this,arguments):K;return r(_(x(re,X),P,B),G,a)},V,te)},w.translateBy=function(A,K,V,te){w.transform(A,function(){return r(this.__zoom.translate(typeof K=="function"?K.apply(this,arguments):K,typeof V=="function"?V.apply(this,arguments):V),t.apply(this,arguments),a)},null,te)},w.translateTo=function(A,K,V,te,G){w.transform(A,function(){var re=t.apply(this,arguments),P=this.__zoom,B=te==null?S(re):typeof te=="function"?te.apply(this,arguments):te;return r(Oo.translate(B[0],B[1]).scale(P.k).translate(typeof K=="function"?-K.apply(this,arguments):-K,typeof V=="function"?-V.apply(this,arguments):-V),re,a)},te,G)};function x(A,K){return K=Math.max(o[0],Math.min(o[1],K)),K===A.k?A:new Si(K,A.x,A.y)}function _(A,K,V){var te=K[0]-V[0]*A.k,G=K[1]-V[1]*A.k;return te===A.x&&G===A.y?A:new Si(A.k,te,G)}function S(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function E(A,K,V,te){A.on("start.zoom",function(){I(this,arguments).event(te).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(te).end()}).tween("zoom",function(){var G=this,re=arguments,P=I(G,re).event(te),B=t.apply(G,re),X=V==null?S(B):typeof V=="function"?V.apply(G,re):V,Q=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),D=G.__zoom,$=typeof K=="function"?K.apply(G,re):K,H=c(D.invert(X).concat(Q/D.k),$.invert(X).concat(Q/$.k));return function(q){if(q===1)q=$;else{var Y=H(q),ie=Q/Y[2];q=new Si(ie,X[0]-Y[0]*ie,X[1]-Y[1]*ie)}P.zoom(null,q)}})}function I(A,K,V){return!V&&A.__zooming||new N(A,K)}function N(A,K){this.that=A,this.args=K,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,K),this.taps=0}N.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,K){return this.mouse&&A!=="mouse"&&(this.mouse[1]=K.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=K.invert(this.touch0[0])),this.touch1&&A!=="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(A){var K=jn(this.that).datum();u.call(A,this.that,new Hne(A,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:u}),K)}};function T(A,...K){if(!e.apply(this,arguments))return;var V=I(this,K).event(A),te=this.__zoom,G=Math.max(o[0],Math.min(o[1],te.k*Math.pow(2,n.apply(this,arguments)))),re=ti(A);if(V.wheel)(V.mouse[0][0]!==re[0]||V.mouse[0][1]!==re[1])&&(V.mouse[1]=te.invert(V.mouse[0]=re)),clearTimeout(V.wheel);else{if(te.k===G)return;V.mouse=[re,te.invert(re)],Cu(this),V.start()}Os(A),V.wheel=setTimeout(P,y),V.zoom("mouse",r(_(x(te,G),V.mouse[0],V.mouse[1]),V.extent,a));function P(){V.wheel=null,V.end()}}function M(A,...K){if(p||!e.apply(this,arguments))return;var V=A.currentTarget,te=I(this,K,!0).event(A),G=jn(A.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",Q,!0),re=ti(A,V),P=A.clientX,B=A.clientY;iq(A.view),v0(A),te.mouse=[re,this.__zoom.invert(re)],Cu(this),te.start();function X(D){if(Os(D),!te.moved){var $=D.clientX-P,H=D.clientY-B;te.moved=$*$+H*H>m}te.event(D).zoom("mouse",r(_(te.that.__zoom,te.mouse[0]=ti(D,V),te.mouse[1]),te.extent,a))}function Q(D){G.on("mousemove.zoom mouseup.zoom",null),oq(D.view,te.moved),Os(D),te.event(D).end()}}function z(A,...K){if(e.apply(this,arguments)){var V=this.__zoom,te=ti(A.changedTouches?A.changedTouches[0]:A,this),G=V.invert(te),re=V.k*(A.shiftKey?.5:2),P=r(_(x(V,re),te,G),t.apply(this,K),a);Os(A),s>0?jn(this).transition().duration(s).call(E,P,te,A):jn(this).call(w.transform,P,te,A)}}function j(A,...K){if(e.apply(this,arguments)){var V=A.touches,te=V.length,G=I(this,K,A.changedTouches.length===te).event(A),re,P,B,X;for(v0(A),P=0;P<te;++P)B=V[P],X=ti(B,this),X=[X,this.__zoom.invert(X),B.identifier],G.touch0?!G.touch1&&G.touch0[2]!==X[2]&&(G.touch1=X,G.taps=0):(G.touch0=X,re=!0,G.taps=1+!!d);d&&(d=clearTimeout(d)),re&&(G.taps<2&&(h=X[0],d=setTimeout(function(){d=null},v)),Cu(this),G.start())}}function W(A,...K){if(this.__zooming){var V=I(this,K).event(A),te=A.changedTouches,G=te.length,re,P,B,X;for(Os(A),re=0;re<G;++re)P=te[re],B=ti(P,this),V.touch0&&V.touch0[2]===P.identifier?V.touch0[0]=B:V.touch1&&V.touch1[2]===P.identifier&&(V.touch1[0]=B);if(P=V.that.__zoom,V.touch1){var Q=V.touch0[0],D=V.touch0[1],$=V.touch1[0],H=V.touch1[1],q=(q=$[0]-Q[0])*q+(q=$[1]-Q[1])*q,Y=(Y=H[0]-D[0])*Y+(Y=H[1]-D[1])*Y;P=x(P,Math.sqrt(q/Y)),B=[(Q[0]+$[0])/2,(Q[1]+$[1])/2],X=[(D[0]+H[0])/2,(D[1]+H[1])/2]}else if(V.touch0)B=V.touch0[0],X=V.touch0[1];else return;V.zoom("touch",r(_(P,B,X),V.extent,a))}}function U(A,...K){if(this.__zooming){var V=I(this,K).event(A),te=A.changedTouches,G=te.length,re,P;for(v0(A),p&&clearTimeout(p),p=setTimeout(function(){p=null},v),re=0;re<G;++re)P=te[re],V.touch0&&V.touch0[2]===P.identifier?delete V.touch0:V.touch1&&V.touch1[2]===P.identifier&&delete V.touch1;if(V.touch1&&!V.touch0&&(V.touch0=V.touch1,delete V.touch1),V.touch0)V.touch0[1]=this.__zoom.invert(V.touch0[0]);else if(V.end(),V.taps===2&&(P=ti(P,this),Math.hypot(h[0]-P[0],h[1]-P[1])<g)){var B=jn(this).on("dblclick.zoom");B&&B.apply(this,arguments)}}}return w.wheelDelta=function(A){return arguments.length?(n=typeof A=="function"?A:Zc(+A),w):n},w.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Zc(!!A),w):e},w.touchable=function(A){return arguments.length?(i=typeof A=="function"?A:Zc(!!A),w):i},w.extent=function(A){return arguments.length?(t=typeof A=="function"?A:Zc([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),w):t},w.scaleExtent=function(A){return arguments.length?(o[0]=+A[0],o[1]=+A[1],w):[o[0],o[1]]},w.translateExtent=function(A){return arguments.length?(a[0][0]=+A[0][0],a[1][0]=+A[1][0],a[0][1]=+A[0][1],a[1][1]=+A[1][1],w):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},w.constrain=function(A){return arguments.length?(r=A,w):r},w.duration=function(A){return arguments.length?(s=+A,w):s},w.interpolate=function(A){return arguments.length?(c=A,w):c},w.on=function(){var A=u.on.apply(u,arguments);return A===u?w:A},w.clickDistance=function(A){return arguments.length?(m=(A=+A)*A,w):Math.sqrt(m)},w.tapDistance=function(A){return arguments.length?(g=+A,w):g},w}function it(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $w(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 yq(e,t){if(e){if(typeof e=="string")return $w(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 $w(e,t)}}function Zne(e){if(Array.isArray(e))return e}function Jne(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 Qne(){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 Ye(e,t){return Zne(e)||Jne(e,t)||yq(e,t)||Qne()}var Da;(function(e){e.Strict="strict",e.Loose="loose"})(Da||(Da={}));var Mo;(function(e){e.Lines="lines",e.Dots="dots"})(Mo||(Mo={}));var _a;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(_a||(_a={}));var Yi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Yi||(Yi={}));var rd;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(rd||(rd={}));var Oe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Oe||(Oe={}));var BS=function(t){return{width:t.offsetWidth,height:t.offsetHeight}},Oa=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)},xq=function(t,r){return{x:Oa(t.x,r[0][0],r[1][0]),y:Oa(t.y,r[0][1],r[1][1])}},wq=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)},eie=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)}},nd=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}},tie=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}},Sq=function(t){return!isNaN(t)&&isFinite(t)},ur=Symbol("internals");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 Ys(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){it(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}function BP(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=Ys({},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 Eq(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(Ys(Ys({},i),{},{selected:o.selected})),n;case"position":{var a=Ys({},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&&BP(n,a),n.push(a),n}case"dimensions":{var s=Ys({},i);return typeof o.dimensions<"u"&&(s.width=o.dimensions.width,s.height=o.dimensions.height),s.expandParent&&BP(n,s),n.push(s),n}case"remove":return n}return n.push(i),n},r)}function _q(e,t){return Eq(e,t)}function rie(e,t){return Eq(e,t)}var Ki=function(t,r){return{id:t,type:"select",selected:r}};function ya(e,t){return e.reduce(function(r,n){var i=t.includes(n.id);return!n.selected&&i?(n.selected=!0,r.push(Ki(n.id,!0))):n.selected&&!i&&(n.selected=!1,r.push(Ki(n.id,!1))),r},[])}function FP(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 Oq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $P=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 Oq({id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(c.left-a.left)/n,y:(c.top-a.top)/n},BS(s))})};function Cs(e,t,r){return r===void 0?r:function(n){var i=t().nodeInternals.get(e);r(n,Oq({},i))}}function Cq(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 VP(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 nl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var nie=function(t){return"id"in t&&"source"in t&&"target"in t},iie=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||"")},Vw=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("&"))},oie=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)})},aie=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 nie(t)?n=nl({},t):n=nl(nl({},t),{},{id:iie(t)}),oie(n,r)?r:r.concat(n)},Iq=function(t,r,n,i){var o=t.x,a=t.y,s=Ye(r,3),c=s[0],u=s[1],d=s[2],h=Ye(i,2),p=h[0],v=h[1],y={x:(o-c)/d,y:(a-u)/d};return n?{x:p*Math.round(y.x/p),y:v*Math.round(y.y/v)}:y},FS=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 eie(n,nd({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 tie(r)},Rq=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[0,0,1],i=Ye(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=nd({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,y=p.width,m=p.height,g=p.selectable,w=g===void 0?!0:g;if(u&&!w)return!1;var x=nd(nl(nl({},v),{},{width:y||0,height:m||0})),_=Math.max(0,Math.min(d.x2,x.x2)-Math.max(d.x,x.x)),S=Math.max(0,Math.min(d.y2,x.y2)-Math.max(d.y,x.y)),E=Math.ceil(_*S),I=typeof y>"u"||typeof m>"u"||y===null||m===null,N=c&&E>0,T=(y||0)*(m||0),M=I||N||E>=T;M&&h.push(p)}),h},Nq=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)})},Tq=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=Oa(u,i,o),h=t.x+t.width/2,p=t.y+t.height/2,v=r/2-h*d,y=n/2-p*d;return[v,y,d]},go=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.transition().duration(r)};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 xa(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){it(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}function Pq(e,t,r,n){var i,o,a,s,c,u,d,h,p,v,y,m;if(!e.parentNode)return n;var g=t.get(e.parentNode);return Pq(g,t,r,{x:((i=n.x)!==null&&i!==void 0?i:0)+((o=(a=g.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=g.position)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0),z:((d=(h=g[ur])===null||h===void 0?void 0:h.z)!==null&&d!==void 0?d:0)>((p=n.z)!==null&&p!==void 0?p:0)?(v=(y=g[ur])===null||y===void 0?void 0:y.z)!==null&&v!==void 0?v:0:(m=n.z)!==null&&m!==void 0?m:0})}function g0(e,t){var r=new Map,n={};return e.forEach(function(i){var o,a=Sq(i.zIndex)?i.zIndex:i.selected?1e3:0,s=t.get(i.id),c=xa(xa({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,ur,{enumerable:!1,value:{handleBounds:s==null||(o=s[ur])===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=Pq(i,r,n,xa(xa({},i.position),{},{z:(o=(a=i[ur])===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[ur].z=d,n[i.id]&&(i[ur].isParent=!0)}}),r}function Mq(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 y,m,g,w=FS(p),x=Tq(w,i,o,(y=t.minZoom)!==null&&y!==void 0?y:a,(m=t.maxZoom)!==null&&m!==void 0?m:s,(g=t.padding)!==null&&g!==void 0?g:.1),_=Ye(x,3),S=_[0],E=_[1],I=_[2],N=Oo.translate(S,E).scale(I);return typeof t.duration=="number"&&t.duration>0?c.transform(go(u,t.duration),N):c.transform(u,N),!0}}return!1}function sie(e,t){return e.forEach(function(r){var n=t.get(r.id);if(n){var i;t.set(n.id,xa(xa({},n),{},(i={},it(i,ur,n[ur]),it(i,"selected",r.selected),i)))}}),new Map(t)}function lie(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 Jc(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:sie(t,a)}),c==null||c(t)),r!=null&&r.length&&(h&&i({edges:lie(r,s)}),u==null||u(r))}var Hw=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],WP={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:Hw,nodeExtent:Hw,nodesSelectionActive:!1,userSelectionActive:!1,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionMode:Da.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 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 Jn(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){it(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 $S=bee(),cie=$S.Provider,Vt=$S.useStore,Nr=$S.useStoreApi,uie=function(){return mee(function(t,r){return Jn(Jn({},WP),{},{setNodes:function(i){t({nodeInternals:g0(i,r().nodeInternals)})},setEdges:function(i){var o=r(),a=o.defaultEdgeOptions,s=a===void 0?{}:a;t({edges:i.map(function(c){return Jn(Jn({},s),c)})})},setDefaultNodesAndEdges:function(i,o){var a=typeof i<"u",s=typeof o<"u",c=a?g0(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),y=new window.DOMMatrixReadOnly(v.transform),m=y.m22,g=i.reduce(function(x,_){var S=s.get(_.id);if(S){var E=BS(_.nodeElement),I=!!(E.width&&E.height&&(S.width!==E.width||S.height!==E.height||_.forceUpdate));I&&(s.set(S.id,Jn(Jn({},S),{},it({},ur,Jn(Jn({},S[ur]),{},{handleBounds:{source:$P(".source",_.nodeElement,m),target:$P(".target",_.nodeElement,m)}})),E)),x.push({id:S.id,type:"dimensions",dimensions:E}))}return x},[]),w=u||c&&!u&&Mq(r,Jn({initial:!0},d));t({nodeInternals:new Map(s),fitViewOnInitDone:w}),(g==null?void 0:g.length)>0&&(a==null||a(g))}},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(y){var m={id:y.id,type:"position",dragging:a};return o&&(m.positionAbsolute=y.positionAbsolute,m.position=y.position),m});if(h!=null&&h.length){if(d){var p=_q(h,Array.from(u.values())),v=g0(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 Ki(h,!0)}):(u=ya(Array.from(s.values()),i),d=ya(c,[])),Jc({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 Ki(h,!0)}):(u=ya(s,i),d=ya(Array.from(c.values()),[])),Jc({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(y){return y.selected=!1,Ki(y.id,!1)}),v=h.map(function(y){return Ki(y.id,!1)});Jc({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 Ki(d.id,!1)}),u=a.filter(function(d){return d.selected}).map(function(d){return Ki(d.id,!1)});Jc({changedNodes:c,changedEdges:u,get:r,set:t})},setNodeExtent:function(i){var o=r(),a=o.nodeInternals;a.forEach(function(s){s.positionAbsolute=xq(s.position,i)}),t({nodeExtent:i,nodeInternals:new Map(a)})},reset:function(){return t(Jn({},WP))}})})};function cn(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=cn(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}function Wr(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}function die(e){if(Array.isArray(e))return $w(e)}function fie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hie(){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 Co(e){return die(e)||fie(e)||yq(e)||hie()}var pie={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},vie=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}},gie=function(){var t=Nr(),r=Vt(vie,Wr),n=r.d3Zoom,i=r.d3Selection,o=C.useMemo(function(){return i&&n?{zoomIn:function(s){return n.scaleBy(go(i,s==null?void 0:s.duration),1.2)},zoomOut:function(s){return n.scaleBy(go(i,s==null?void 0:s.duration),1/1.2)},zoomTo:function(s,c){return n.scaleTo(go(i,c==null?void 0:c.duration),s)},getZoom:function(){return t.getState().transform[2]},setViewport:function(s,c){var u,d,h,p=Ye(t.getState().transform,3),v=p[0],y=p[1],m=p[2],g=Oo.translate((u=s.x)!==null&&u!==void 0?u:v,(d=s.y)!==null&&d!==void 0?d:y).scale((h=s.zoom)!==null&&h!==void 0?h:m);n.transform(go(i,c==null?void 0:c.duration),g)},getViewport:function(){var s=Ye(t.getState().transform,3),c=s[0],u=s[1],d=s[2];return{x:c,y:u,zoom:d}},fitView:function(s){return Mq(t.getState,s)},setCenter:function(s,c,u){var d=t.getState(),h=d.width,p=d.height,v=d.maxZoom,y=typeof(u==null?void 0:u.zoom)<"u"?u.zoom:v,m=h/2-s*y,g=p/2-c*y,w=Oo.translate(m,g).scale(y);n.transform(go(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,y=d.maxZoom,m=Tq(s,h,p,v,y,(u=c==null?void 0:c.padding)!==null&&u!==void 0?u:.1),g=Ye(m,3),w=g[0],x=g[1],_=g[2],S=Oo.translate(w,x).scale(_);n.transform(go(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 Iq(s,u,d,h)},viewportInitialized:!0}:pie},[n,i]);return o};function GP(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 sa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kq(){var e=gie(),t=Nr(),r=C.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=Array.from(p.values());return v.map(function(y){return sa({},y)})},[]),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(y){return sa({},y)})},[]),o=C.useCallback(function(h){var p=t.getState(),v=p.edges,y=v===void 0?[]:v;return y.find(function(m){return m.id===h})},[]),a=C.useCallback(function(h){var p=t.getState(),v=p.nodeInternals,y=p.setNodes,m=p.hasDefaultNodes,g=p.onNodesChange,w=Array.from(v.values()),x=typeof h=="function"?h(w):h;if(m)y(x);else if(g){var _=x.length===0?w.map(function(S){return{type:"remove",id:S.id}}):x.map(function(S){return{item:S,type:"reset"}});g(_)}},[]),s=C.useCallback(function(h){var p=t.getState(),v=p.edges,y=v===void 0?[]:v,m=p.setEdges,g=p.hasDefaultEdges,w=p.onEdgesChange,x=typeof h=="function"?h(y):h;if(g)m(x);else if(w){var _=x.length===0?y.map(function(S){return{type:"remove",id:S.id}}):x.map(function(S){return{item:S,type:"reset"}});w(_)}},[]),c=C.useCallback(function(h){var p=Array.isArray(h)?h:[h],v=t.getState(),y=v.nodeInternals,m=v.setNodes,g=v.hasDefaultNodes,w=v.onNodesChange;if(g){var x=Array.from(y.values()),_=[].concat(x,Co(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(),y=v.edges,m=y===void 0?[]:y,g=v.setEdges,w=v.hasDefaultEdges,x=v.onEdgesChange;if(w)g([].concat(Co(m),Co(p)));else if(x){var _=p.map(function(S){return{item:S,type:"add"}});x(_)}},[]),d=C.useCallback(function(){var h=t.getState(),p=h.nodeInternals,v=h.edges,y=v===void 0?[]:v,m=h.transform,g=Array.from(p.values()),w=Ye(m,3),x=w[0],_=w[1],S=w[2];return{nodes:g.map(function(E){return sa({},E)}),edges:y.map(function(E){return sa({},E)}),viewport:{x,y:_,zoom:S}}},[]);return C.useMemo(function(){return sa(sa({},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 mie(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 Gd(e,t){if(e==null)return{};var r=mie(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 bie(){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 yie(){return C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},C.createElement("path",{d:"M0 0h32v4.2H0z"}))}function xie(){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 wie(){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 Sie(){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 Eie=["children","className"];function KP(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 _ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Qc=function(t){var r=t.children,n=t.className,i=Gd(t,Eie);return C.createElement("button",_ie({type:"button",className:cn(["react-flow__controls-button",n])},i),r)},Oie=function(t){return t.nodesDraggable&&t.nodesConnectable&&t.elementsSelectable},Cie=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,y=t.className,m=t.children,g=Nr(),w=C.useState(!1),x=Ye(w,2),_=x[0],S=x[1],E=Vt(Oie),I=kq(),N=I.zoomIn,T=I.zoomOut,M=I.fitView;if(C.useEffect(function(){S(!0)},[]),!_)return null;var z=function(){N==null||N(),d==null||d()},j=function(){T==null||T(),h==null||h()},W=function(){M==null||M(u),p==null||p()},U=function(){g.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),v==null||v(!E)};return C.createElement("div",{className:cn(["react-flow__controls",y]),style:r},i&&C.createElement(C.Fragment,null,C.createElement(Qc,{onClick:z,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in"},C.createElement(bie,null)),C.createElement(Qc,{onClick:j,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out"},C.createElement(yie,null))),a&&C.createElement(Qc,{className:"react-flow__controls-fitview",onClick:W,title:"fit view","aria-label":"fit view"},C.createElement(xie,null)),c&&C.createElement(Qc,{className:"react-flow__controls-interactive",onClick:U,title:"toggle interactivity","aria-label":"toggle interactivity"},E?C.createElement(Sie,null):C.createElement(wie,null)),m)};Cie.displayName="Controls";var Iie=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)})},Rie=function(t,r){return C.createElement("circle",{cx:t,cy:t,r:t,fill:r})},eu;function YP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function XP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Nie=(eu={},it(eu,Mo.Dots,"#81818a"),it(eu,Mo.Lines,"#eee"),eu),Tie=function(t){return t.transform},Aq=function(t){var r=t.variant,n=r===void 0?Mo.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=Ye(p,2),y=v[0],m=v[1],g=Vt(Tie),w=Ye(g,3),x=w[0],_=w[1],S=w[2];C.useEffect(function(){var j=document.querySelectorAll(".react-flow__background"),W=Array.from(j).findIndex(function(U){return U===h.current});m("pattern-".concat(W))},[]);var E=o*S||1,I=x%E,N=_%E,T=n===Mo.Lines,M=c||Nie[n],z=T?Iie(E,s,M):Rie(s*S,M);return C.createElement("svg",{className:cn(["react-flow__background","react-flow__container",d]),style:XP(XP({},u),{},{width:"100%",height:"100%"}),ref:h},y&&C.createElement(C.Fragment,null,C.createElement("pattern",{id:y,x:I,y:N,width:E,height:E,patternUnits:"userSpaceOnUse"},z),C.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(y,")")})))};Aq.displayName="Background";var Pie=C.memo(Aq),Mie=["paid-pro","paid-sponsor","paid-enterprise","paid-custom"];function kie(e){var t=e.proOptions,r=e.position,n=r===void 0?"bottom-right":r;if(t!=null&&t.account&&Mie.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:cn(["react-flow__attribution"].concat(Co(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 Aie=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function ZP(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 Die(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var jie=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,y=v===void 0?2:v,m=t.children,g=t.className,w=Gd(t,Aie),x=C.useRef(null),_=C.useState({x:0,y:0,width:0,height:0}),S=Ye(_,2),E=S[0],I=S[1],N=cn(["react-flow__edge-textwrapper",g]);return C.useEffect(function(){if(x.current){var T=x.current.getBBox();I({x:T.x,y:T.y,width:T.width,height:T.height})}},[i]),typeof i>"u"||!i?null:C.createElement("g",Die({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:y,ry:y}),C.createElement("text",{className:"react-flow__edge-text",y:E.height/2,dy:"0.3em",ref:x,style:a},i),m)},qie=C.memo(jie),Kd=(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(qie,{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 id(e){var t=e.pos,r=e.x1,n=e.y1,i=e.x2,o=e.y2,a,s;switch(t){case Oe.Left:case Oe.Right:a=.5*(r+i),s=n;break;case Oe.Top:case Oe.Bottom:a=r,s=.5*(n+o);break}return[a,s]}function Dq(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=id({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ye(u,2),h=d[0],p=d[1],v=id({pos:c,x1:o,y1:a,x2:t,y2:r}),y=Ye(v,2),m=y[0],g=y[1];return"M".concat(t,",").concat(r," C").concat(h,",").concat(p," ").concat(m,",").concat(g," ").concat(o,",").concat(a)}function zie(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=id({pos:i,x1:t,y1:r,x2:o,y2:a}),d=Ye(u,2),h=d[0],p=d[1],v=id({pos:c,x1:o,y1:a,x2:t,y2:r}),y=Ye(v,2),m=y[0],g=y[1],w=t*.125+h*.375+m*.375+o*.125,x=r*.125+p*.375+g*.375+a*.125,_=Math.abs(w-t),S=Math.abs(x-r);return[w,x,_,S]}var jq=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Oe.Bottom:o,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=e.label,d=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,y=e.labelBgBorderRadius,m=e.style,g=e.markerEnd,w=e.markerStart,x={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c},_=Dq(x),S=zie(x),E=Ye(S,2),I=E[0],N=E[1];return C.createElement(Kd,{path:_,centerX:I,centerY:N,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:y,style:m,markerEnd:g,markerStart:w})});function JP(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 Lie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JP(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var QP=[Oe.Left,Oe.Right],qq=function(t){var r=t.sourceX,n=t.sourceY,i=t.targetX,o=t.targetY,a=t.sourcePosition,s=a===void 0?Oe.Bottom:a,c=t.targetPosition,u=c===void 0?Oe.Top:c,d=QP.includes(s),h=QP.includes(u),p=d&&!h||h&&!d;if(p){var v=d?Math.abs(i-r):0,y=r>i?r-v:r+v,m=d?0:Math.abs(o-n),g=n<o?n+m:n-m;return[y,g,v,m]}var w=Math.abs(i-r)/2,x=i<r?i+w:i-w,_=Math.abs(o-n)/2,S=o<n?o+_:o-_;return[x,S,w,_]};function Is(e,t,r){return r===void 0?r:function(n){var i=t().edges.find(function(o){return o.id===e});r(n,Lie({},i))}}var 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)},y0=function(t,r,n){return"L ".concat(t,",").concat(r-n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},x0=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r-n)},w0=function(t,r,n){return"L ".concat(t+n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)},S0=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t+n,",").concat(r)},E0=function(t,r,n){return"L ".concat(t,",").concat(r+n,"Q ").concat(t,",").concat(r," ").concat(t-n,",").concat(r)},_0=function(t,r,n){return"L ".concat(t-n,",").concat(r,"Q ").concat(t,",").concat(r," ").concat(t,",").concat(r+n)};function Ww(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=e.borderRadius,d=u===void 0?5:u,h=e.centerX,p=e.centerY,v=qq({sourceX:t,sourceY:r,targetX:o,targetY:a}),y=Ye(v,4),m=y[0],g=y[1],w=y[2],x=y[3],_=Math.min(d,Math.abs(o-t)),S=Math.min(d,Math.abs(a-r)),E=Math.min(_,S,w,x),I=[Oe.Left,Oe.Right],N=typeof h<"u"?h:m,T=typeof p<"u"?p:g,M=null,z=null;return t<=o?(M=r<=a?m0(t,T,E):S0(t,T,E),z=r<=a?_0(o,T,E):x0(o,T,E)):(M=r<a?y0(t,T,E):E0(t,T,E),z=r<a?w0(o,T,E):b0(o,T,E)),I.includes(i)&&I.includes(c)?t<=o?(M=r<=a?_0(N,r,E):x0(N,r,E),z=r<=a?m0(N,a,E):S0(N,a,E)):(i===Oe.Right&&c===Oe.Left||i===Oe.Left&&c===Oe.Right||i===Oe.Left&&c===Oe.Left)&&(M=r<=a?w0(N,r,E):b0(N,r,E),z=r<=a?y0(N,a,E):E0(N,a,E)):I.includes(i)&&!I.includes(c)?(t<=o?M=r<=a?_0(o,r,E):x0(o,r,E):M=r<=a?w0(o,r,E):b0(o,r,E),z=""):!I.includes(i)&&I.includes(c)&&(t<=o?M=r<=a?m0(t,a,E):S0(t,a,E):M=r<=a?y0(t,a,E):E0(t,a,E),z=""),"M ".concat(t,",").concat(r).concat(M).concat(z,"L ").concat(o,",").concat(a)}var VS=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?Oe.Bottom:p,y=e.targetPosition,m=y===void 0?Oe.Top:y,g=e.markerEnd,w=e.markerStart,x=e.borderRadius,_=x===void 0?5:x,S=qq({sourceX:t,sourceY:r,targetX:n,targetY:i,sourcePosition:v,targetPosition:m}),E=Ye(S,2),I=E[0],N=E[1],T=Ww({sourceX:t,sourceY:r,sourcePosition:v,targetX:n,targetY:i,targetPosition:m,borderRadius:_});return C.createElement(Kd,{path:T,centerX:I,centerY:N,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:h,markerEnd:g,markerStart:w})});function e5(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 t5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var zq=C.memo(function(e){return C.createElement(VS,t5(t5({},e),{},{borderRadius:0}))}),Lq=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,y=Math.abs(i-r)/2,m=i<r?i+y:i-y,g=Math.abs(n-t)/2,w=n<t?n+g:n-g,x="M ".concat(t,",").concat(r,"L ").concat(n,",").concat(i);return C.createElement(Kd,{path:x,centerX:w,centerY:m,label:o,labelStyle:a,labelShowBg:s,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:h,markerEnd:p,markerStart:v})});function tu(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function od(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 Oe.Left:s=r-tu(r-i,a),c=n;break;case Oe.Right:s=r+tu(i-r,a),c=n;break;case Oe.Top:s=r,c=n-tu(n-o,a);break;case Oe.Bottom:s=r,c=n+tu(o-n,a);break}return[s,c]}function Yd(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=e.curvature,d=u===void 0?.25:u,h=od({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),p=Ye(h,2),v=p[0],y=p[1],m=od({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),g=Ye(m,2),w=g[0],x=g[1];return"M".concat(t,",").concat(r," C").concat(v,",").concat(y," ").concat(w,",").concat(x," ").concat(o,",").concat(a)}function Bie(e){var t=e.sourceX,r=e.sourceY,n=e.sourcePosition,i=n===void 0?Oe.Bottom:n,o=e.targetX,a=e.targetY,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=e.curvature,d=u===void 0?.25:u,h=od({pos:i,x1:t,y1:r,x2:o,y2:a,c:d}),p=Ye(h,2),v=p[0],y=p[1],m=od({pos:c,x1:o,y1:a,x2:t,y2:r,c:d}),g=Ye(m,2),w=g[0],x=g[1],_=t*.125+v*.375+w*.375+o*.125,S=r*.125+y*.375+x*.375+a*.125,E=Math.abs(_-t),I=Math.abs(S-r);return[_,S,E,I]}var Uw=C.memo(function(e){var t=e.sourceX,r=e.sourceY,n=e.targetX,i=e.targetY,o=e.sourcePosition,a=o===void 0?Oe.Bottom:o,s=e.targetPosition,c=s===void 0?Oe.Top:s,u=e.label,d=e.labelStyle,h=e.labelShowBg,p=e.labelBgStyle,v=e.labelBgPadding,y=e.labelBgBorderRadius,m=e.style,g=e.markerEnd,w=e.markerStart,x=e.curvature,_={sourceX:t,sourceY:r,sourcePosition:a,targetX:n,targetY:i,targetPosition:c,curvature:x},S=Yd(_),E=Bie(_),I=Ye(E,2),N=I[0],T=I[1];return C.createElement(Kd,{path:S,centerX:N,centerY:T,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:p,labelBgPadding:v,labelBgBorderRadius:y,style:m,markerEnd:g,markerStart:w})}),HS=C.createContext(null),Fie=HS.Provider;HS.Consumer;function Gw(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 y=t===Da.Strict?r&&u||!r&&c:!0;y&&(d.isValid=o(v))}return d}function O0(e){e==null||e.classList.remove("react-flow__handle-valid"),e==null||e.classList.remove("react-flow__handle-connecting")}function Bq(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=wq(t.target);if(!p)return;var v=p.elementFromPoint(t.clientX,t.clientY),y=v==null?void 0:v.classList.contains("target"),m=v==null?void 0:v.classList.contains("source");if(!h||!y&&!m&&!u)return;var g=a(),w=g.onConnectStart,x=g.connectionMode,_=u||(y?"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 M=Gw(T,x,o,n,r,c,p),z=M.connection,j=M.elementBelow,W=M.isValid,U=M.isHoveringHandle;if(!U)return O0(E);z.source!==z.target&&j&&(O0(E),E=j,j.classList.add("react-flow__handle-connecting"),j.classList.toggle("react-flow__handle-valid",W))}function N(T){var M=a(),z=M.onConnectStop,j=M.onConnectEnd,W=Gw(T,x,o,n,r,c,p),U=W.connection,A=W.isValid;z==null||z(T),A&&(i==null||i(U)),j==null||j(T),u&&d&&d(T),O0(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 r5(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 C0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Vie=function(){return!0},Hie=function(t){return{connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick}},Fq=C.forwardRef(function(e,t){var r=e.type,n=r===void 0?"source":r,i=e.position,o=i===void 0?Oe.Top:i,a=e.isValidConnection,s=a===void 0?Vie:a,c=e.isConnectable,u=c===void 0?!0:c,d=e.id,h=e.onConnect,p=e.children,v=e.className,y=e.onMouseDown,m=Gd(e,$ie),g=Nr(),w=C.useContext(HS),x=Vt(Hie,Wr),_=x.connectionStartHandle,S=x.connectOnClick,E=d||null,I=n==="target",N=function(j){var W=g.getState(),U=W.defaultEdgeOptions,A=W.onConnect,K=W.hasDefaultEdges,V=C0(C0({},U),j);if(K){var te=g.getState(),G=te.edges;g.setState({edges:aie(V,G)})}A==null||A(V),h==null||h(V)},T=function(j){j.button===0&&Bq({event:j,handleId:E,nodeId:w,onConnect:N,isTarget:I,getState:g.getState,setState:g.setState,isValidConnection:s}),y==null||y(j)},M=function(j){var W=g.getState(),U=W.onClickConnectStart,A=W.onClickConnectStop,K=W.onClickConnectEnd,V=W.connectionMode;if(!_){U==null||U(j,{nodeId:w,handleId:E,handleType:n}),g.setState({connectionStartHandle:{nodeId:w,type:n,handleId:E}});return}var te=wq(j.target),G=Gw(j,V,_.type==="target",_.nodeId,_.handleId||null,s,te),re=G.connection,P=G.isValid;A==null||A(j),P&&N(re),K==null||K(j),g.setState({connectionStartHandle:null})};return C.createElement("div",C0({"data-handleid":E,"data-nodeid":w,"data-handlepos":o,className:cn(["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?M:void 0,ref:t},m),p)});Fq.displayName="Handle";var ad=C.memo(Fq),$q=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Oe.Top:i,a=t.sourcePosition,s=a===void 0?Oe.Bottom:a;return C.createElement(C.Fragment,null,C.createElement(ad,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label,C.createElement(ad,{type:"source",position:s,isConnectable:n}))};$q.displayName="DefaultNode";var Kw=C.memo($q),Vq=function(t){var r=t.data,n=t.isConnectable,i=t.sourcePosition,o=i===void 0?Oe.Bottom:i;return C.createElement(C.Fragment,null,r==null?void 0:r.label,C.createElement(ad,{type:"source",position:o,isConnectable:n}))};Vq.displayName="InputNode";var Hq=C.memo(Vq),Wq=function(t){var r=t.data,n=t.isConnectable,i=t.targetPosition,o=i===void 0?Oe.Top:i;return C.createElement(C.Fragment,null,C.createElement(ad,{type:"target",position:o,isConnectable:n}),r==null?void 0:r.label)};Wq.displayName="OutputNode";var Uq=C.memo(Wq),Wie=function(t){return{selectedNodes:Array.from(t.nodeInternals.values()).filter(function(r){return r.selected}),selectedEdges:t.edges.filter(function(r){return r.selected})}},Uie=function(t,r){var n=t.selectedNodes.map(function(s){return s.id}),i=r.selectedNodes.map(function(s){return s.id}),o=t.selectedEdges.map(function(s){return s.id}),a=r.selectedEdges.map(function(s){return s.id});return Wr(n,i)&&Wr(o,a)};function Gie(e){var t=e.onSelectionChange,r=Vt(Wie,Uie),n=r.selectedNodes,i=r.selectedEdges;return C.useEffect(function(){t({nodes:n,edges:i})},[n,i]),null}var Kie=C.memo(Gie),Yie=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 Vi(e,t){C.useEffect(function(){typeof e<"u"&&t(e)},[e])}function bt(e,t,r){C.useEffect(function(){typeof t<"u"&&r(it({},e,t))},[t])}var Xie=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,y=t.nodesConnectable,m=t.minZoom,g=t.maxZoom,w=t.nodeExtent,x=t.onNodesChange,_=t.onEdgesChange,S=t.elementsSelectable,E=t.connectionMode,I=t.snapGrid,N=t.snapToGrid,T=t.translateExtent,M=t.connectOnClick,z=t.defaultEdgeOptions,j=t.fitView,W=t.fitViewOptions,U=t.onNodesDelete,A=t.onEdgesDelete,K=t.onNodeDrag,V=t.onNodeDragStart,te=t.onNodeDragStop,G=t.onSelectionDrag,re=t.onSelectionDragStart,P=t.onSelectionDragStop,B=Vt(Yie,Wr),X=B.setNodes,Q=B.setEdges,D=B.setDefaultNodesAndEdges,$=B.setMinZoom,H=B.setMaxZoom,q=B.setTranslateExtent,Y=B.setNodeExtent,ie=B.reset,ne=Nr();return C.useEffect(function(){return D(i,o),function(){ie()}},[]),bt("defaultEdgeOptions",z,ne.setState),bt("connectionMode",E,ne.setState),bt("onConnect",a,ne.setState),bt("onConnectStart",s,ne.setState),bt("onConnectStop",c,ne.setState),bt("onConnectEnd",u,ne.setState),bt("onClickConnectStart",d,ne.setState),bt("onClickConnectStop",h,ne.setState),bt("onClickConnectEnd",p,ne.setState),bt("nodesDraggable",v,ne.setState),bt("nodesConnectable",y,ne.setState),bt("elementsSelectable",S,ne.setState),bt("snapToGrid",N,ne.setState),bt("snapGrid",I,ne.setState),bt("onNodesChange",x,ne.setState),bt("onEdgesChange",_,ne.setState),bt("connectOnClick",M,ne.setState),bt("fitViewOnInit",j,ne.setState),bt("fitViewOnInitOptions",W,ne.setState),bt("onNodesDelete",U,ne.setState),bt("onEdgesDelete",A,ne.setState),bt("onNodeDrag",K,ne.setState),bt("onNodeDragStart",V,ne.setState),bt("onNodeDragStop",te,ne.setState),bt("onSelectionDrag",G,ne.setState),bt("onSelectionDragStart",re,ne.setState),bt("onSelectionDragStop",P,ne.setState),Vi(r,X),Vi(n,Q),Vi(i,X),Vi(o,Q),Vi(m,$),Vi(g,H),Vi(T,q),Vi(w,Y),null},Zie=".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%)}",Jie=Zie,Qie=".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}",eoe=Qie,toe=function(t,r,n){return n===Oe.Left?t-r:n===Oe.Right?t+r:t},roe=function(t,r,n){return n===Oe.Top?t-r:n===Oe.Bottom?t+r:t},n5=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:cn(["react-flow__edgeupdater",r]),cx:toe(i,s,n),cy:roe(o,s,n),r:s,stroke:"transparent",fill:"transparent"})},la=(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,y=n.labelShowBg,m=n.labelBgStyle,g=n.labelBgPadding,w=n.labelBgBorderRadius,x=n.style,_=n.source,S=n.target,E=n.sourceX,I=n.sourceY,N=n.targetX,T=n.targetY,M=n.sourcePosition,z=n.targetPosition,j=n.elementsSelectable,W=n.hidden,U=n.sourceHandleId,A=n.targetHandleId,K=n.onContextMenu,V=n.onMouseEnter,te=n.onMouseMove,G=n.onMouseLeave,re=n.edgeUpdaterRadius,P=n.onEdgeUpdate,B=n.onEdgeUpdateStart,X=n.onEdgeUpdateEnd,Q=n.markerEnd,D=n.markerStart,$=n.rfId,H=C.useState(!1),q=Ye(H,2),Y=q[0],ie=q[1],ne=Nr(),pe=function(ze){var Ze=ne.getState(),rt=Ze.edges,Pt=Ze.addSelectedEdges,gt=rt.find(function(Rt){return Rt.id===i});j&&(ne.setState({nodesSelectionActive:!1}),Pt([i])),c==null||c(ze,gt)},Z=Is(i,ne.getState,u),J=Is(i,ne.getState,K),ae=Is(i,ne.getState,V),he=Is(i,ne.getState,te),ue=Is(i,ne.getState,G),de=function(ze,Ze){var rt=Ze?S:_,Pt=(Ze?A:U)||null,gt=Ze?"target":"source",Rt=function(){return!0},qt=Ze,Ot=ne.getState().edges.find(function(ar){return ar.id===i});B==null||B(ze,Ot,gt);var Gr=X?function(ar){return X(ar,Ot,gt)}:void 0,Kr=function(Nn){return P==null?void 0:P(Ot,Nn)};Bq({event:ze,handleId:Pt,nodeId:rt,onConnect:Kr,isTarget:qt,getState:ne.getState,setState:ne.setState,isValidConnection:Rt,elementEdgeUpdaterType:gt,onEdgeUpdateEnd:Gr})},le=function(ze){return de(ze,!0)},xe=function(ze){return de(ze,!1)},Ee=function(){return ie(!0)},Ie=function(){return ie(!1)},Te=C.useMemo(function(){return"url(#".concat(Vw(D,$),")")},[D,$]),Me=C.useMemo(function(){return"url(#".concat(Vw(Q,$),")")},[Q,$]);if(W)return null;var Xe=!j&&!c,tt=typeof P<"u",Fe=cn(["react-flow__edge","react-flow__edge-".concat(a),o,{selected:d,animated:h,inactive:Xe,updating:Y}]);return C.createElement("g",{className:Fe,onClick:pe,onDoubleClick:Z,onContextMenu:J,onMouseEnter:ae,onMouseMove:he,onMouseLeave:ue},C.createElement(e,{id:i,source:_,target:S,selected:d,animated:h,label:p,labelStyle:v,labelShowBg:y,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:w,data:s,style:x,sourceX:E,sourceY:I,targetX:N,targetY:T,sourcePosition:M,targetPosition:z,sourceHandleId:U,targetHandleId:A,markerStart:Te,markerEnd:Me,"data-testid":"rf__edge-".concat(i)}),tt&&C.createElement("g",{onMouseDown:le,onMouseEnter:Ee,onMouseOut:Ie},C.createElement(n5,{position:M,centerX:E,centerY:I,radius:re})),tt&&C.createElement("g",{onMouseDown:xe,onMouseEnter:Ee,onMouseOut:Ie},C.createElement(n5,{position:z,centerX:N,centerY:T,radius:re})))};return t.displayName="EdgeWrapper",C.memo(t)});function i5(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 o5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function noe(e){var t={default:la(e.default||Uw),straight:la(e.bezier||Lq),step:la(e.step||zq),smoothstep:la(e.step||VS),simplebezier:la(e.simplebezier||jq)},r={},n=Object.keys(e).filter(function(i){return!["default","bezier"].includes(i)}).reduce(function(i,o){return i[o]=la(e[o]||Uw),i},r);return o5(o5({},t),n)}function a5(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 Oe.Top:return{x:n+o/2,y:i};case Oe.Right:return{x:n+o,y:i+a/2};case Oe.Bottom:return{x:n+o/2,y:i+a};case Oe.Left:return{x:n,y:i+a/2}}}function s5(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 ioe=function(t,r,n,i,o,a){var s=a5(n,t,r),c=a5(a,i,o);return{sourceX:s.x,sourceY:s.y,targetX:c.x,targetY:c.y}};function ooe(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=nd({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)),y=Math.ceil(p*v);return y>0}function l5(e,t){var r,n,i,o,a,s=e.get(t),c=(s==null||(r=s[ur])===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 aoe=typeof document<"u"?document:null,sd=(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{target:aoe},r=C.useState(!1),n=Ye(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(y){return typeof y=="string"}).map(function(y){return y.split("+")}),v=p.reduce(function(y,m){return y.concat.apply(y,Co(m))},[]);return[p,v]}return[[],[]]},[e]),c=Ye(s,2),u=c[0],d=c[1];return C.useEffect(function(){if(e!==null){var h,p,v=function(w){if(d5(w))return!1;var x=u5(w.code,d);a.current.add(w[x]),c5(u,a.current,!1)&&(w.preventDefault(),o(!0))},y=function(w){if(d5(w))return!1;var x=u5(w.code,d);c5(u,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(w[x])},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",y),window.addEventListener("blur",m),function(){var g,w;t==null||(g=t.target)===null||g===void 0||g.removeEventListener("keydown",v),t==null||(w=t.target)===null||w===void 0||w.removeEventListener("keyup",y),window.removeEventListener("blur",m)}}},[e,o]),i});function c5(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 u5(e,t){return t.includes(e)?"code":"key"}function d5(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 soe=function(t){return{onNodesChange:t.onNodesChange,onEdgesChange:t.onEdgesChange}},loe=(function(e){var t=e.deleteKeyCode,r=e.multiSelectionKeyCode,n=Nr(),i=Vt(soe,Wr),o=i.onNodesChange,a=i.onEdgesChange,s=sd(t),c=sd(r);C.useEffect(function(){var u=n.getState(),d=u.nodeInternals,h=u.edges,p=u.hasDefaultNodes,v=u.hasDefaultEdges,y=u.onNodesDelete,m=u.onEdgesDelete,g=Array.from(d.values()),w=g.reduce(function(T,M){return(!M.selected&&M.parentNode&&T.find(function(z){return z.id===M.parentNode})||M.selected)&&T.push(M),T},[]),x=h.filter(function(T){return T.selected});if(s&&(w||x)){var _=Nq(w,h),S=[].concat(Co(x),Co(_)),E=S.reduce(function(T,M){return T.includes(M.id)||T.push(M.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&&(y==null||y(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 coe(e){var t=Nr();C.useEffect(function(){var r,n=function(){if(e.current){var o=BS(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 uoe=function(t,r){return t.x!==r.x||t.y!==r.y||t.zoom!==r.k},I0=function(t){return{x:t.x,y:t.y,zoom:t.k}},ru=function(t,r){return t.target.closest(".".concat(r))},doe=function(t){return{d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler}},foe=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,y=v===void 0?_a.Free:v,m=t.zoomOnDoubleClick,g=m===void 0?!0:m,w=t.selectionKeyPressed,x=t.elementsSelectable,_=t.panOnDrag,S=_===void 0?!0:_,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,M=T===void 0?1:T,z=t.defaultPosition,j=z===void 0?[0,0]:z,W=t.zoomActivationKeyCode,U=t.preventScrolling,A=U===void 0?!0:U,K=t.children,V=t.noWheelClassName,te=t.noPanClassName,G=Nr(),re=C.useRef(!1),P=C.useRef(null),B=C.useRef({x:0,y:0,zoom:0}),X=Vt(doe,Wr),Q=X.d3Zoom,D=X.d3Selection,$=X.d3ZoomHandler,H=sd(W);return coe(P),C.useEffect(function(){if(P.current){var q,Y=Xne().scaleExtent([I,N]).translateExtent(E),ie=jn(P.current).call(Y),ne=Oa(j[0],E[0][0],E[1][0]),pe=Oa(j[1],E[0][1],E[1][1]),Z=Oa(M,I,N),J=Oo.translate(ne,pe).scale(Z);Y.transform(ie,J),G.setState({d3Zoom:Y,d3Selection:ie,d3ZoomHandler:ie.on("wheel.zoom"),transform:[ne,pe,Z],domNode:(q=ie.node())===null||q===void 0?void 0:q.closest(".react-flow")})}},[]),C.useEffect(function(){D&&Q&&(d&&!H?D.on("wheel",function(q){if(ru(q,V))return!1;q.preventDefault(),q.stopImmediatePropagation();var Y=D.property("__zoom").k||1;if(q.ctrlKey&&c){var ie=ti(q),ne=-q.deltaY*(q.deltaMode===1?.05:q.deltaMode?1:.002)*10,pe=Y*Math.pow(2,ne);Q.scaleTo(D,pe,ie);return}var Z=q.deltaMode===1?20:1,J=y===_a.Vertical?0:q.deltaX*Z,ae=y===_a.Horizontal?0:q.deltaY*Z;Q.translateBy(D,-(J/Y)*p,-(ae/Y)*p)}).on("wheel.zoom",null):typeof $<"u"&&D.on("wheel",function(q){if(!A||ru(q,V))return null;q.preventDefault()}).on("wheel.zoom",$))},[d,y,D,Q,$,H,c,A,V]),C.useEffect(function(){Q&&(w&&!re.current?Q.on("zoom",null):w||Q.on("zoom",function(q){if(G.setState({transform:[q.transform.x,q.transform.y,q.transform.k]}),r){var Y=I0(q.transform);r(q.sourceEvent,Y)}}))},[w,Q,r]),C.useEffect(function(){Q&&Q.on("start",function(q){if(re.current=!0,n){var Y=I0(q.transform);B.current=Y,n(q.sourceEvent,Y)}})},[Q,n]),C.useEffect(function(){Q&&Q.on("end",function(q){if(re.current=!1,i&&uoe(B.current,q.transform)){var Y=I0(q.transform);B.current=Y,i(q.sourceEvent,Y)}})},[Q,i]),C.useEffect(function(){Q&&Q.filter(function(q){var Y=H||a,ie=c&&q.ctrlKey;return!S&&!Y&&!d&&!g&&!c||w||!g&&q.type==="dblclick"||ru(q,V)&&q.type==="wheel"||ru(q,te)&&q.type!=="wheel"||!c&&q.ctrlKey&&q.type==="wheel"||!Y&&!d&&!ie&&q.type==="wheel"||!S&&(q.type==="mousedown"||q.type==="touchstart")?!1:(!q.ctrlKey||q.type==="wheel")&&!q.button})},[Q,a,c,d,g,S,w,x,H]),C.createElement("div",{className:"react-flow__renderer react-flow__container",ref:P},K)};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 h5(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){it(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 p5(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}var hoe=function(t){return{userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable}},v5={startX:0,startY:0,x:0,y:0,width:0,height:0,draw:!1},poe=C.memo(function(e){var t=e.selectionKeyPressed,r=Nr(),n=C.useRef(0),i=C.useRef(0),o=C.useRef(),a=C.useState(v5),s=Ye(a,2),c=s[0],u=s[1],d=Vt(hoe,Wr),h=d.userSelectionActive,p=d.elementsSelectable,v=h||t;if(!p||!v)return null;var y=function(){u(v5),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=p5(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})},g=function(S){var E,I;if(!(!t||!c.draw||!o.current)){var N=p5(S,o.current),T=(E=c.startX)!==null&&E!==void 0?E:0,M=(I=c.startY)!==null&&I!==void 0?I:0,z=h5(h5({},c),{},{x:N.x<T?N.x:T,y:N.y<M?N.y:M,width:Math.abs(N.x-T),height:Math.abs(N.y-M)}),j=r.getState(),W=j.nodeInternals,U=j.edges,A=j.transform,K=j.onNodesChange,V=j.onEdgesChange,te=Array.from(W.values()),G=Rq(W,z,A,!1,!0),re=Nq(G,U).map(function(Q){return Q.id}),P=G.map(function(Q){return Q.id});if(n.current!==P.length){n.current=P.length;var B=ya(te,P);B.length&&(K==null||K(B))}if(i.current!==re.length){i.current=re.length;var X=ya(U,re);X.length&&(V==null||V(X))}u(z)}},w=function(){r.setState({nodesSelectionActive:n.current>0}),y()},x=function(){r.setState({nodesSelectionActive:!1}),y()};return C.createElement("div",{className:"react-flow__selectionpane react-flow__container",onMouseDown:m,onMouseMove:g,onMouseUp:w,onMouseLeave:x},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 g5(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 m5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Gq(e,t){if(!e.parentNode)return!1;var r=t.get(e.parentNode);return r?r.selected?!0:Gq(r,t):!1}function b5(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 voe(e,t,r){return Array.from(e.values()).filter(function(n){return(n.selected||n.id===r)&&(!n.parentNode||!Gq(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 goe(e,t,r,n,i,o){var a=Ye(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,y,m,g=i.get(e.parentNode),w=(p=g==null||(v=g.positionAbsolute)===null||v===void 0?void 0:v.x)!==null&&p!==void 0?p:0,x=(y=g==null||(m=g.positionAbsolute)===null||m===void 0?void 0:m.y)!==null&&y!==void 0?y:0;u=[[e.extent[0][0]+w,e.extent[0][1]+x],[e.extent[1][0]+w,e.extent[1][1]+x]]}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?xq(d,u):d,e.position={x:e.positionAbsolute.x-_.x,y:e.positionAbsolute.y-_.y},e}function R0(e){var t=e.nodeId,r=e.dragItems,n=e.nodeInternals,i=r.map(function(o){var a=n.get(o.id);return m5(m5({},a),{},{position:o.position,positionAbsolute:o.positionAbsolute})});return[t?i.find(function(o){return o.id===t}):i[0],i]}function N0(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=Ye(u,2),h=d[0],p=d[1],v=Nr(),y=C.useRef(),m=C.useRef({x:null,y:null}),g=C.useCallback(function(w){var x=w.sourceEvent,_=v.getState(),S=_.transform,E=_.snapGrid,I=_.snapToGrid,N=x.touches?x.touches[0].clientX:x.clientX,T=x.touches?x.touches[0].clientY:x.clientY,M=Iq({x:N,y:T},S,I,E);return M},[]);return C.useEffect(function(){if(t!=null&&t.current){var w=jn(t.current);if(n)w.on(".drag",null);else{var x=are().on("start",function(_){var S=v.getState(),E=S.nodeInternals,I=S.multiSelectionActive,N=S.unselectNodesAndEdges,T=S.onNodeDragStart,M=S.onSelectionDragStart,z=a?T:N0(M);if(!c&&!I&&a){var j;(j=E.get(a))!==null&&j!==void 0&&j.selected||N()}a&&s&&c&&Cq({id:a,store:v});var W=g(_);if(m.current=W,y.current=voe(E,W,a),z&&y.current){var U=R0({nodeId:a,dragItems:y.current,nodeInternals:E}),A=Ye(U,2),K=A[0],V=A[1];z(_.sourceEvent,K,V)}}).on("drag",function(_){var S=v.getState(),E=S.updateNodePositions,I=S.snapToGrid,N=S.snapGrid,T=S.nodeInternals,M=S.nodeExtent,z=S.onNodeDrag,j=S.onSelectionDrag,W=g(_);if((m.current.x!==W.x||m.current.y!==W.y)&&y.current){m.current=W,y.current=y.current.map(function(G){return goe(G,W,I,N,T,M)});var U=a?z:N0(j);if(E(y.current,!0,!0),p(!0),U){var A=R0({nodeId:a,dragItems:y.current,nodeInternals:T}),K=Ye(A,2),V=K[0],te=K[1];U(_.sourceEvent,V,te)}}_.on("end",function(G){if(p(!1),y.current){var re=v.getState(),P=re.updateNodePositions,B=re.nodeInternals,X=re.onNodeDragStop,Q=re.onSelectionDragStop,D=a?X:N0(Q);if(P(y.current,!1,!1),D){var $=R0({nodeId:a,dragItems:y.current,nodeInternals:B}),H=Ye($,2),q=H[0],Y=H[1];D(G.sourceEvent,q,Y)}}})}).filter(function(_){var S=_.target,E=!_.button&&(!i||!b5(S,".".concat(i),t))&&(!o||b5(S,o,t));return E});return w.call(x),function(){w.on(".drag",null)}}}},[t,n,i,o,s,v,a,c,g]),h}function y5(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 moe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var boe=function(t){return moe({transformString:"translate(".concat(t.transform[0],"px,").concat(t.transform[1],"px) scale(").concat(t.transform[2],")"),userSelectionActive:t.userSelectionActive},FS(Array.from(t.nodeInternals.values()).filter(function(r){return r.selected})))},yoe=function(t){var r=Array.from(t.nodeInternals.values()).filter(function(n){return n.selected});return FS(r)};function xoe(e){var t=e.onSelectionContextMenu,r=e.noPanClassName,n=Nr(),i=Vt(boe,Wr),o=i.transformString,a=i.userSelectionActive,s=Vt(yoe,Wr),c=s.width,u=s.height,d=s.x,h=s.y,p=C.useRef(null);if(Kq({nodeRef:p}),a||!c||!u)return null;var v=t?function(y){var m=Array.from(n.getState().nodeInternals.values()).filter(function(g){return g.selected});t(y,m)}:void 0;return C.createElement("div",{className:cn(["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 woe=C.memo(xoe),Soe=function(t){return t.nodesSelectionActive},Yq=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,y=t.zoomOnScroll,m=t.zoomOnPinch,g=t.panOnScroll,w=t.panOnScrollSpeed,x=t.panOnScrollMode,_=t.zoomOnDoubleClick,S=t.panOnDrag,E=t.translateExtent,I=t.minZoom,N=t.maxZoom,T=t.defaultZoom,M=t.defaultPosition,z=t.preventScrolling,j=t.onSelectionContextMenu,W=t.noWheelClassName,U=t.noPanClassName,A=Nr(),K=Vt(Soe),V=sd(d);loe({deleteKeyCode:a,multiSelectionKeyCode:h});var te=function(B){n==null||n(B),A.getState().resetSelectedElements(),A.setState({nodesSelectionActive:!1})},G=i?function(P){return i(P)}:void 0,re=o?function(P){return o(P)}:void 0;return C.createElement(foe,{onMove:s,onMoveStart:c,onMoveEnd:u,selectionKeyPressed:V,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:g,panOnScrollSpeed:w,panOnScrollMode:x,zoomOnDoubleClick:_,panOnDrag:S,translateExtent:E,minZoom:I,maxZoom:N,defaultZoom:T,defaultPosition:M,zoomActivationKeyCode:p,preventScrolling:z,noWheelClassName:W,noPanClassName:U},r,C.createElement(poe,{selectionKeyPressed:V}),K&&C.createElement(woe,{onSelectionContextMenu:j,noPanClassName:U}),C.createElement("div",{className:"react-flow__pane react-flow__container",onClick:te,onContextMenu:G,onWheel:re}))};Yq.displayName="FlowRenderer";var Eoe=C.memo(Yq);function _oe(e){var t=Vt(C.useCallback(function(r){return e?Rq(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}},Xq=function(t){var r=Vt(Ooe,Wr),n=r.nodesDraggable,i=r.nodesConnectable,o=r.elementsSelectable,a=r.updateNodeDimensions,s=_oe(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,y,m,g,w,x=d.type||"default";t.nodeTypes[x]||(process.env.NODE_ENV==="development"&&console.warn('[React Flow]: Node type "'.concat(x,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),x="default");var _=t.nodeTypes[x]||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:x,data:d.data,sourcePosition:d.sourcePosition||Oe.Bottom,targetPosition:d.targetPosition||Oe.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=(y=d.positionAbsolute)===null||y===void 0?void 0:y.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=(g=d[ur])===null||g===void 0?void 0:g.z)!==null&&m!==void 0?m:0,isParent:!!((w=d[ur])!==null&&w!==void 0&&w.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!d.width&&!!d.height})}))};Xq.displayName="NodeRenderer";var Coe=C.memo(Xq),ca;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 w5(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){it(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 Ioe=(ca={},it(ca,Oe.Left,Oe.Right),it(ca,Oe.Right,Oe.Left),it(ca,Oe.Top,Oe.Bottom),it(ca,Oe.Bottom,Oe.Top),ca),Roe=(function(e){var t,r,n,i,o,a=e.connectionNodeId,s=e.connectionHandleType,c=e.connectionLineStyle,u=e.connectionLineType,d=u===void 0?Yi.Bezier:u,h=e.isConnectable,p=e.CustomConnectionLineComponent,v=Vt(C.useCallback(function(re){return{fromNode:re.nodeInternals.get(a),handleId:re.connectionHandleId,toX:(re.connectionPosition.x-re.transform[0])/re.transform[2],toY:(re.connectionPosition.y-re.transform[1])/re.transform[2]}},[a]),Wr),y=v.fromNode,m=v.handleId,g=v.toX,w=v.toY,x=y==null||(t=y[ur])===null||t===void 0?void 0:t.handleBounds;if(!y||!h||!(x!=null&&x[s]))return null;var _=x[s],S=m?_.find(function(re){return re.id===m}):_[0],E=S?S.x+S.width/2:((r=y==null?void 0:y.width)!==null&&r!==void 0?r:0)/2,I=S?S.y+S.height/2:(n=y==null?void 0:y.height)!==null&&n!==void 0?n:0,N=((y==null||(i=y.positionAbsolute)===null||i===void 0?void 0:i.x)||0)+E,T=((y==null||(o=y.positionAbsolute)===null||o===void 0?void 0:o.y)||0)+I,M=S==null?void 0:S.position;if(!M)return null;var z=Ioe[M],j,W,U,A,K,V;switch(s){case"source":j=N,W=T,U=M,A=g,K=w,V=z;break;case"target":j=g,W=w,U=z,A=N,K=T,V=M;break}if(p)return C.createElement("g",{className:"react-flow__connection"},C.createElement(p,{connectionLineType:d,connectionLineStyle:c,fromNode:y,fromHandle:S,fromX:N,fromY:T,toX:g,toY:w,fromPosition:M,toPosition:z,sourcePosition:U,targetPosition:V,sourceNode:y,sourceHandle:S,targetX:A,targetY:K,sourceX:j,sourceY:W}));var te="",G={sourceX:j,sourceY:W,sourcePosition:U,targetX:A,targetY:K,targetPosition:V};return d===Yi.Bezier?te=Yd(G):d===Yi.Step?te=Ww(w5(w5({},G),{},{borderRadius:0})):d===Yi.SmoothStep?te=Ww(G):d===Yi.SimpleBezier?te=Dq(G):te="M".concat(j,",").concat(W," ").concat(A,",").concat(K),C.createElement("g",{className:"react-flow__connection"},C.createElement("path",{d:te,className:"react-flow__connection-path",style:c}))});function Yw(e){"@babel/helpers - typeof";return Yw=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},Yw(e)}var nu,Noe=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"})},Toe=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"})},S5=(nu={},it(nu,rd.Arrow,Noe),it(nu,rd.ArrowClosed,Toe),nu);function Poe(e){var t=C.useMemo(function(){var r=S5.hasOwnProperty(e);return r?S5[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 E5(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 Moe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var koe=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,y=Poe(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(y,{color:i,strokeWidth:h}))},Aoe=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&&Yw(c)==="object"){var u=Vw(c,n);o.includes(u)||(a.push(Moe({id:u,color:c.color||r},c)),o.push(u))}}),a},[]).sort(function(a,s){return a.id.localeCompare(s.id)})}},Zq=function(t){var r=t.defaultColor,n=t.rfId,i=Vt(C.useCallback(Aoe({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(koe,{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})}))};Zq.displayName="MarkerDefinitions";var Doe=C.memo(Zq),joe=[{level:0,isMaxLevel:!0,edges:[]}];function qoe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=-1,i=e.reduce(function(a,s){var c=Sq(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[ur])===null||h===void 0?void 0:h.z)||0,((p=t.get(s.target))===null||p===void 0||(v=p[ur])===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=Ye(a,2),c=s[0],u=s[1],d=+c;return{edges:u,level:d,isMaxLevel:d===n}});return o.length===0?joe:o}function zoe(e,t,r){var n=Vt(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)&&ooe({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 qoe(n,t,r)}var Loe=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=Vt(Loe,Wr),n=r.connectionNodeId,i=r.connectionHandleType,o=r.nodesConnectable,a=r.elementsSelectable,s=r.width,c=r.height,u=r.connectionMode,d=r.nodeInternals,h=zoe(t.onlyRenderVisibleElements,d,t.elevateEdgesOnSelect);if(!s)return null;var p=t.connectionLineType,v=t.defaultMarkerColor,y=t.connectionLineStyle,m=t.connectionLineComponent,g=t.connectionLineContainerStyle,w=n&&i;return C.createElement(C.Fragment,null,h.map(function(x){var _=x.level,S=x.edges,E=x.isMaxLevel;return C.createElement("svg",{key:_,style:{zIndex:_},width:s,height:c,className:"react-flow__edges react-flow__container"},E&&C.createElement(Doe,{defaultColor:v,rfId:t.rfId}),C.createElement("g",null,S.map(function(I){var N=l5(d,I.source),T=Ye(N,3),M=T[0],z=T[1],j=T[2],W=l5(d,I.target),U=Ye(W,3),A=U[0],K=U[1],V=U[2];if(!j||!V)return null;var te=I.type||"default";t.edgeTypes[te]||(console.warn('[React Flow]: Edge type "'.concat(te,'" not found. Using fallback type "default". Help: https://reactflow.dev/error#300')),te="default");var G=t.edgeTypes[te]||t.edgeTypes.default,re=u===Da.Strict?K.target:K.target||K.source,P=s5(z.source,I.sourceHandle||null),B=s5(re,I.targetHandle||null),X=(P==null?void 0:P.position)||Oe.Bottom,Q=(B==null?void 0:B.position)||Oe.Top;if(!P)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(!B)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 D=ioe(M,P,X,A,B,Q),$=D.sourceX,H=D.sourceY,q=D.targetX,Y=D.targetY;return C.createElement(G,{key:I.id,id:I.id,className:cn([I.className,t.noPanClassName]),type:te,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:$,sourceY:H,targetX:q,targetY:Y,sourcePosition:X,targetPosition:Q,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:g,width:s,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},C.createElement(Roe,{connectionNodeId:n,connectionHandleType:i,connectionLineStyle:y,connectionLineType:p,isConnectable:o,CustomConnectionLineComponent:m})))};Jq.displayName="EdgeRenderer";var Boe=C.memo(Jq),Foe=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=Vt(Foe);return C.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:r}},t)}function Voe(e){var t=kq(),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,y=t.onNodeMouseLeave,m=t.onNodeContextMenu,g=t.onSelectionContextMenu,w=t.connectionLineType,x=t.connectionLineStyle,_=t.connectionLineComponent,S=t.connectionLineContainerStyle,E=t.selectionKeyCode,I=t.multiSelectionKeyCode,N=t.zoomActivationKeyCode,T=t.deleteKeyCode,M=t.onlyRenderVisibleElements,z=t.elementsSelectable,j=t.selectNodesOnDrag,W=t.translateExtent,U=t.minZoom,A=t.maxZoom,K=t.defaultZoom,V=t.defaultPosition,te=t.preventScrolling,G=t.defaultMarkerColor,re=t.zoomOnScroll,P=t.zoomOnPinch,B=t.panOnScroll,X=t.panOnScrollSpeed,Q=t.panOnScrollMode,D=t.zoomOnDoubleClick,$=t.panOnDrag,H=t.onPaneClick,q=t.onPaneScroll,Y=t.onPaneContextMenu,ie=t.onEdgeUpdate,ne=t.onEdgeContextMenu,pe=t.onEdgeMouseEnter,Z=t.onEdgeMouseMove,J=t.onEdgeMouseLeave,ae=t.edgeUpdaterRadius,he=t.onEdgeUpdateStart,ue=t.onEdgeUpdateEnd,de=t.noDragClassName,le=t.noWheelClassName,xe=t.noPanClassName,Ee=t.elevateEdgesOnSelect,Ie=t.id;return Voe(s),C.createElement(Eoe,{onPaneClick:H,onPaneContextMenu:Y,onPaneScroll:q,deleteKeyCode:T,selectionKeyCode:E,multiSelectionKeyCode:I,zoomActivationKeyCode:N,elementsSelectable:z,onMove:i,onMoveStart:o,onMoveEnd:a,zoomOnScroll:re,zoomOnPinch:P,zoomOnDoubleClick:D,panOnScroll:B,panOnScrollSpeed:X,panOnScrollMode:Q,panOnDrag:$,translateExtent:W,minZoom:U,maxZoom:A,defaultZoom:K,defaultPosition:V,onSelectionContextMenu:g,preventScrolling:te,noDragClassName:de,noWheelClassName:le,noPanClassName:xe},C.createElement($oe,null,C.createElement(Boe,{edgeTypes:n,onEdgeClick:u,onEdgeDoubleClick:h,connectionLineType:w,connectionLineStyle:x,connectionLineComponent:_,connectionLineContainerStyle:S,onEdgeUpdate:ie,onlyRenderVisibleElements:M,onEdgeContextMenu:ne,onEdgeMouseEnter:pe,onEdgeMouseMove:Z,onEdgeMouseLeave:J,onEdgeUpdateStart:he,onEdgeUpdateEnd:ue,edgeUpdaterRadius:ae,defaultMarkerColor:G,noPanClassName:xe,elevateEdgesOnSelect:!!Ee,rfId:Ie}),C.createElement(Coe,{nodeTypes:r,onNodeClick:c,onNodeDoubleClick:d,onNodeMouseEnter:p,onNodeMouseMove:v,onNodeMouseLeave:y,onNodeContextMenu:m,selectNodesOnDrag:j,onlyRenderVisibleElements:M,noPanClassName:xe,noDragClassName:de})))};Qq.displayName="GraphView";var Hoe=C.memo(Qq),ez=function(){return null};ez.displayName="GroupNode";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 O5(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){it(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 Rs=(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,y=n.onContextMenu,m=n.onDoubleClick,g=n.style,w=n.className,x=n.isDraggable,_=n.isSelectable,S=n.isConnectable,E=n.selectNodesOnDrag,I=n.sourcePosition,N=n.targetPosition,T=n.hidden,M=n.resizeObserver,z=n.dragHandle,j=n.zIndex,W=n.isParent,U=n.noPanClassName,A=n.noDragClassName,K=n.initialized,V=Nr(),te=C.useRef(null),G=C.useRef(I),re=C.useRef(N),P=C.useRef(o),B=_||x||d||h||p||v,X=Cs(i,V.getState,h),Q=Cs(i,V.getState,p),D=Cs(i,V.getState,v),$=Cs(i,V.getState,y),H=Cs(i,V.getState,m),q=function(ne){if(_&&(!E||!x)&&Cq({id:i,store:V}),d){var pe=V.getState().nodeInternals.get(i);d(ne,O5({},pe))}};C.useEffect(function(){if(te.current&&!T){var ie=te.current;return M==null||M.observe(ie),function(){return M==null?void 0:M.unobserve(ie)}}},[T]),C.useEffect(function(){var ie=P.current!==o,ne=G.current!==I,pe=re.current!==N;te.current&&(ie||ne||pe)&&(ie&&(P.current=o),ne&&(G.current=I),pe&&(re.current=N),V.getState().updateNodeDimensions([{id:i,nodeElement:te.current,forceUpdate:!0}]))},[i,o,I,N]);var Y=Kq({nodeRef:te,disabled:T||!x,noDragClassName:A,handleSelector:z,nodeId:i,isSelectable:_,selectNodesOnDrag:E});return T?null:C.createElement("div",{className:cn(["react-flow__node","react-flow__node-".concat(o),U,w,{selected:u,selectable:_,parent:W}]),ref:te,style:O5({zIndex:j,transform:"translate(".concat(s,"px,").concat(c,"px)"),pointerEvents:B?"all":"none",visibility:K?"visible":"hidden"},g),onMouseEnter:X,onMouseMove:Q,onMouseLeave:D,onContextMenu:$,onClick:q,onDoubleClick:H,"data-testid":"rf__node-".concat(i),"data-id":i},C.createElement(Fie,{value:i},C.createElement(e,{id:i,data:a,type:o,xPos:s,yPos:c,selected:u,isConnectable:S,sourcePosition:I,targetPosition:N,dragging:Y,dragHandle:z,zIndex:j})))};return t.displayName="NodeWrapper",C.memo(t)});function C5(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 I5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Woe(e){var t={input:Rs(e.input||Hq),default:Rs(e.default||Kw),output:Rs(e.output||Uq),group:Rs(e.group||ez)},r={},n=Object.keys(e).filter(function(i){return!["input","default","output","group"].includes(i)}).reduce(function(i,o){return i[o]=Rs(e[o]||Kw),i},r);return I5(I5({},t),n)}function R5(e,t){var r=C.useRef(null),n=C.useMemo(function(){if(process.env.NODE_ENV==="development"){var i=Object.keys(e);Wr(r.current,i)&&console.warn("[React Flow]: It looks like you have created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them. Help: https://reactflow.dev/error#200"),r.current=i}return t(e)},[e]);return n}function N5(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 tz=function(t){var r=t.children,n=!0;try{Nr()}catch{n=!1}return n?C.createElement(C.Fragment,null,r):C.createElement(cie,{createStore:uie},r)};tz.displayName="ReactFlowWrapper";var Uoe=["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 T5(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 P5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T5(Object(r),!0).forEach(function(n){it(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T5(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}N5(Jie),N5(eoe);var Goe={input:Hq,default:Kw,output:Uq},Koe={default:Uw,straight:Lq,step:zq,smoothstep:VS,simplebezier:jq},Yoe=[15,15],Xoe=[0,0],rz=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?Goe:s,u=e.edgeTypes,d=u===void 0?Koe:u,h=e.onNodeClick,p=e.onEdgeClick,v=e.onInit,y=e.onMove,m=e.onMoveStart,g=e.onMoveEnd,w=e.onConnect,x=e.onConnectStart,_=e.onConnectStop,S=e.onConnectEnd,E=e.onClickConnectStart,I=e.onClickConnectStop,N=e.onClickConnectEnd,T=e.onNodeMouseEnter,M=e.onNodeMouseMove,z=e.onNodeMouseLeave,j=e.onNodeContextMenu,W=e.onNodeDoubleClick,U=e.onNodeDragStart,A=e.onNodeDrag,K=e.onNodeDragStop,V=e.onNodesDelete,te=e.onEdgesDelete,G=e.onSelectionChange,re=e.onSelectionDragStart,P=e.onSelectionDrag,B=e.onSelectionDragStop,X=e.onSelectionContextMenu,Q=e.connectionMode,D=Q===void 0?Da.Strict:Q,$=e.connectionLineType,H=$===void 0?Yi.Bezier:$,q=e.connectionLineStyle,Y=e.connectionLineComponent,ie=e.connectionLineContainerStyle,ne=e.deleteKeyCode,pe=ne===void 0?"Backspace":ne,Z=e.selectionKeyCode,J=Z===void 0?"Shift":Z,ae=e.multiSelectionKeyCode,he=ae===void 0?"Meta":ae,ue=e.zoomActivationKeyCode,de=ue===void 0?"Meta":ue,le=e.snapToGrid,xe=le===void 0?!1:le,Ee=e.snapGrid,Ie=Ee===void 0?Yoe:Ee,Te=e.onlyRenderVisibleElements,Me=Te===void 0?!1:Te,Xe=e.selectNodesOnDrag,tt=Xe===void 0?!0:Xe,Fe=e.nodesDraggable,Le=e.nodesConnectable,ze=e.elementsSelectable,Ze=e.minZoom,rt=Ze===void 0?.5:Ze,Pt=e.maxZoom,gt=Pt===void 0?2:Pt,Rt=e.defaultZoom,qt=Rt===void 0?1:Rt,Ot=e.defaultPosition,Gr=Ot===void 0?Xoe:Ot,Kr=e.translateExtent,ar=Kr===void 0?Hw:Kr,Nn=e.preventScrolling,no=Nn===void 0?!0:Nn,zt=e.nodeExtent,Mt=e.defaultMarkerColor,Lt=Mt===void 0?"#b1b1b7":Mt,fr=e.zoomOnScroll,kt=fr===void 0?!0:fr,At=e.zoomOnPinch,hr=At===void 0?!0:At,Mr=e.panOnScroll,Et=Mr===void 0?!1:Mr,Bt=e.panOnScrollSpeed,pr=Bt===void 0?.5:Bt,vr=e.panOnScrollMode,yr=vr===void 0?_a.Free:vr,sr=e.zoomOnDoubleClick,Tn=sr===void 0?!0:sr,Un=e.panOnDrag,Za=Un===void 0?!0:Un,Gn=e.onPaneClick,Ja=e.onPaneScroll,Kn=e.onPaneContextMenu,Ri=e.children,Bo=e.onEdgeUpdate,Fo=e.onEdgeContextMenu,ke=e.onEdgeDoubleClick,$e=e.onEdgeMouseEnter,xr=e.onEdgeMouseMove,Ht=e.onEdgeMouseLeave,wr=e.onEdgeUpdateStart,Sr=e.onEdgeUpdateEnd,tr=e.edgeUpdaterRadius,un=tr===void 0?10:tr,Yr=e.onNodesChange,ci=e.onEdgesChange,Ni=e.noDragClassName,Qa=Ni===void 0?"nodrag":Ni,es=e.noWheelClassName,$l=es===void 0?"nowheel":es,ts=e.noPanClassName,hf=ts===void 0?"nopan":ts,Vl=e.fitView,pf=Vl===void 0?!1:Vl,vf=e.fitViewOptions,rs=e.connectOnClick,Hl=rs===void 0?!0:rs,Wl=e.attributionPosition,ns=e.proOptions,gf=e.defaultEdgeOptions,is=e.elevateEdgesOnSelect,$o=is===void 0?!1:is,io=Gd(e,Uoe),mf=R5(c,Woe),Ul=R5(d,noe);return C.createElement("div",P5(P5({},io),{},{ref:t,className:cn(["react-flow",a])}),C.createElement(tz,null,C.createElement(Hoe,{onInit:v,onMove:y,onMoveStart:m,onMoveEnd:g,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:T,onNodeMouseMove:M,onNodeMouseLeave:z,onNodeContextMenu:j,onNodeDoubleClick:W,nodeTypes:mf,edgeTypes:Ul,connectionLineType:H,connectionLineStyle:q,connectionLineComponent:Y,connectionLineContainerStyle:ie,selectionKeyCode:J,deleteKeyCode:pe,multiSelectionKeyCode:he,zoomActivationKeyCode:de,onlyRenderVisibleElements:Me,selectNodesOnDrag:tt,translateExtent:ar,minZoom:rt,maxZoom:gt,defaultZoom:qt,defaultPosition:Gr,preventScrolling:no,zoomOnScroll:kt,zoomOnPinch:hr,zoomOnDoubleClick:Tn,panOnScroll:Et,panOnScrollSpeed:pr,panOnScrollMode:yr,panOnDrag:Za,onPaneClick:Gn,onPaneScroll:Ja,onPaneContextMenu:Kn,onSelectionContextMenu:X,onEdgeUpdate:Bo,onEdgeContextMenu:Fo,onEdgeDoubleClick:ke,onEdgeMouseEnter:$e,onEdgeMouseMove:xr,onEdgeMouseLeave:Ht,onEdgeUpdateStart:wr,onEdgeUpdateEnd:Sr,edgeUpdaterRadius:un,defaultMarkerColor:Lt,noDragClassName:Qa,noWheelClassName:$l,noPanClassName:hf,elevateEdgesOnSelect:$o,id:io==null?void 0:io.id}),C.createElement(Xie,{nodes:r,edges:n,defaultNodes:i,defaultEdges:o,onConnect:w,onConnectStart:x,onConnectStop:_,onConnectEnd:S,onClickConnectStart:E,onClickConnectStop:I,onClickConnectEnd:N,nodesDraggable:Fe,nodesConnectable:Le,elementsSelectable:ze,minZoom:rt,maxZoom:gt,nodeExtent:zt,onNodesChange:Yr,onEdgesChange:ci,snapToGrid:xe,snapGrid:Ie,connectionMode:D,translateExtent:ar,connectOnClick:Hl,defaultEdgeOptions:gf,fitView:pf,fitViewOptions:vf,onNodesDelete:V,onEdgesDelete:te,onNodeDragStart:U,onNodeDrag:A,onNodeDragStop:K,onSelectionDrag:P,onSelectionDragStart:re,onSelectionDragStop:B}),G&&C.createElement(Kie,{onSelectionChange:G}),Ri,C.createElement(kie,{proOptions:ns,position:Wl})))});rz.displayName="ReactFlow";function nz(e){return function(t){var r=C.useState(t),n=Ye(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 Zoe=nz(_q),Joe=nz(rie);function M5(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),y=1/(Math.abs(p)+Math.abs(v)),m=y*p,g=y*v,w=a*(m+g)+c,x=s*(-m+g)+u;return{x:w,y:x}}function k5(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?Oe.Left:o>=n+r.width-1?Oe.Right:a<=i+1?Oe.Top:a>=r.y+r.height-1?Oe.Bottom:Oe.Top}function iz(e,t){const r=M5(e,t),n=M5(t,e),i=k5(e,r),o=k5(t,n);return{sx:r.x,sy:r.y,tx:n.x,ty:n.y,sourcePos:i,targetPos:o}}const Qoe=({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}=iz(i,o),c=Yd({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})]})},eae=({id:e,source:t,target:r,markerEnd:n,style:i})=>{const o=Vt(C.useCallback(y=>y.nodeInternals.get(t),[t])),a=Vt(C.useCallback(y=>y.nodeInternals.get(r),[r]));if(!o||!a)return null;const{sx:s,sy:c,tx:u,ty:d,sourcePos:h,targetPos:p}=iz(o,a),v=Yd({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})},A5=172,D5=36,tae={custom:eae},rae=(e,t,r="LR")=>{const n=new yP.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const i=r==="LR";return n.setGraph({rankdir:r}),e.forEach(o=>{n.setNode(o.id,{width:A5,height:D5})}),t.forEach(o=>{n.setEdge(o.source,o.target)}),yP.layout(n),e.forEach(o=>{const a=n.node(o.id);return o.targetPosition=i?Oe.Left:Oe.Top,o.sourcePosition=i?Oe.Right:Oe.Bottom,o.position={x:a.x-A5/2,y:a.y-D5/2},o}),{nodes:e,edges:t}},nae=()=>{},iae=({data:e,dict:t,onSelect:r=nae})=>{const{nodes:n,edges:i}=rae(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:Oe.Right,targetPosition:Oe.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]=Zoe(n),[c,u,d]=Joe(i);return C.useEffect(()=>{a([...n]),u([...i])},[e]),O.jsx(rz,{nodes:o,edges:c,fitView:!0,onNodesChange:s,onEdgesChange:d,onNodeClick:(h,p)=>{r(p.id)},defaultZoom:.5,edgeTypes:tae,connectionLineComponent:Qoe,children:O.jsx(Pie,{variant:Mo.Dots,color:"#81818140",gap:18,size:1})})};var oz=(e=>(e.method="methods",e.entityCollection="entityselMethod",e.dataClass="dataclassMethod",e.dataStore="dsMethod",e.entity="entityMethod",e.attribute="attributes",e.singletonMethod="singletonMethod",e))(oz||{});const az=e=>{switch(e){case"entityCollection":return ve.ESubPermissionType.ENTITY_SEL_METHOD;case"dataClass":return ve.ESubPermissionType.DATACLASS_METHOD;case"dataStore":return ve.ESubPermissionType.DS_METHOD;case"entity":return ve.ESubPermissionType.ENTITY_METHOD;default:return ve.EPermissionType.METHOD}},j5=(e=[],t,r)=>{var i;const n=[];for(const o of e)(i=o[oz[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===ve.EPermissionType.METHOD&&(c.subType=az(a.applyTo)),n.push(c)}});return n},oae=(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:ve.EPermissionType.SINGLETON_METHOD})});return r};function WS(e,t=[],r=[],n=[]){const i=j5(r,e,ve.EPermissionType.ATTRIBUTE),o=j5(r,e,ve.EPermissionType.METHOD),a=oae(n,e),s=t.filter(h=>!e||`ds.${h.name.toLowerCase()}`.includes(e)).map(h=>({applyTo:`ds.${h.name}`,type:ve.ESubPermissionType.DS_METHOD})),c=[],u=[];return r.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{c.push({applyTo:h.name,type:ve.EPermissionType.DATACLASS})}),n.filter(h=>h.name.toLowerCase().includes(e)).forEach(h=>{u.push({applyTo:h.name,type:ve.EPermissionType.SINGLETON})}),[...[{applyTo:"ds",type:ve.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"],[y,m]=p.applyTo.split("."),g=h.find(w=>w.prefix===y);return g?(g.resources=[...g.resources,p].sort((w,x)=>{const _=v.indexOf(w.type),S=v.indexOf(x.type);return _>S?1:-1}),g.type=m?g.type:p.type,[...h].sort((w,x)=>{const _=v.indexOf(w.type),S=v.indexOf(x.type);return _>S?1:-1})):[...h,{prefix:y,type:m?null:p.type,resources:[p]}]},[]).reduce((h,p)=>[...h,...p.resources],[])}const aae=(e=[],t=[],r=[])=>{const n=WS("",e,t,r),i={ds:{applyTo:"ds",type:ve.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===ve.EPermissionType.DATACLASS?i.ds.dataClasses.push({applyTo:c,type:ve.EPermissionType.DATACLASS,methods:[],attributes:[]}):s.type===ve.EPermissionType.SINGLETON&&i.ds.singletons.push({applyTo:c,type:ve.EPermissionType.SINGLETON,methods:[],attributes:[]})),u){const d=(h,p,v)=>{h.forEach(y=>{y.applyTo===c&&y[p].push(v)})};[ve.ESubPermissionType.DS_METHOD,ve.ESubPermissionType.DATACLASS_METHOD,ve.ESubPermissionType.ENTITY_METHOD,ve.ESubPermissionType.ENTITY_SEL_METHOD].includes(s.type)?c==="ds"?i.ds.methods.push(s):d(i.ds.dataClasses,"methods",s):s.type===ve.EPermissionType.ATTRIBUTE?(d(i.ds.dataClasses,"attributes",s),d(i.ds.singletons,"attributes",s)):s.type===ve.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},sz=(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===ve.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:az(h)}}return o})}}),r},lz=(e,t)=>Object.entries(e).map(([r,n])=>{const i=n.resources.map(o=>{var u,d,h,p,v,y,m,g;const[a,s]=o.resource.split(".");let c=!0;switch(o.type){case ve.EPermissionType.DATASTORE:c=!!t;break;case ve.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 ve.ESubPermissionType.DS_METHOD:c=!!t.methods.find(w=>w.name===s&&w.applyTo==="dataStore");break;case ve.EPermissionType.DATACLASS:c=!!t.dataClasses[a];break;case ve.EPermissionType.ATTRIBUTE:c=!!((p=(h=t.dataClasses[a])==null?void 0:h.attributes)!=null&&p.find(w=>w.name===s));break;case ve.ESubPermissionType.ENTITY_SEL_METHOD:c=!!((v=t.dataClasses[a])!=null&&v.methods.find(w=>w.name===s&&w.applyTo==="entityCollection"));break;case ve.ESubPermissionType.DATACLASS_METHOD:c=!!((y=t.dataClasses[a])!=null&&y.methods.find(w=>w.name===s&&w.applyTo==="dataClass"));break;case ve.ESubPermissionType.ENTITY_METHOD:c=!!((m=t.dataClasses[a])!=null&&m.methods.find(w=>w.name===s&&w.applyTo==="entity"));break;case ve.EPermissionType.SINGLETON_METHOD:c=!!((g=t.singletons[a])!=null&&g.methods.find(w=>w.name===s));break;case ve.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 T0={exports:{}};/*!
60
+ Copyright (c) 2018 Jed Watson.
61
+ Licensed under the MIT License (MIT), see
62
+ http://jedwatson.github.io/classnames
63
+ */var q5;function sae(){return q5||(q5=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})()})(T0)),T0.exports}var lae=sae();const an=Qi(lae);var Xs={exports:{}};/**
64
+ * @license
65
+ * Lodash <https://lodash.com/>
66
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
67
+ * Released under MIT license <https://lodash.com/license>
68
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
69
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
70
+ */var cae=Xs.exports,z5;function uae(){return z5||(z5=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,y=4,m=1,g=2,w=1,x=2,_=4,S=8,E=16,I=32,N=64,T=128,M=256,z=512,j=30,W="...",U=800,A=16,K=1,V=2,te=3,G=1/0,re=9007199254740991,P=17976931348623157e292,B=NaN,X=4294967295,Q=X-1,D=X>>>1,$=[["ary",T],["bind",w],["bindKey",x],["curry",S],["curryRight",E],["flip",z],["partial",I],["partialRight",N],["rearg",M]],H="[object Arguments]",q="[object Array]",Y="[object AsyncFunction]",ie="[object Boolean]",ne="[object Date]",pe="[object DOMException]",Z="[object Error]",J="[object Function]",ae="[object GeneratorFunction]",he="[object Map]",ue="[object Number]",de="[object Null]",le="[object Object]",xe="[object Promise]",Ee="[object Proxy]",Ie="[object RegExp]",Te="[object Set]",Me="[object String]",Xe="[object Symbol]",tt="[object Undefined]",Fe="[object WeakMap]",Le="[object WeakSet]",ze="[object ArrayBuffer]",Ze="[object DataView]",rt="[object Float32Array]",Pt="[object Float64Array]",gt="[object Int8Array]",Rt="[object Int16Array]",qt="[object Int32Array]",Ot="[object Uint8Array]",Gr="[object Uint8ClampedArray]",Kr="[object Uint16Array]",ar="[object Uint32Array]",Nn=/\b__p \+= '';/g,no=/\b(__p \+=) '' \+/g,zt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mt=/&(?:amp|lt|gt|quot|#39);/g,Lt=/[&<>"']/g,fr=RegExp(Mt.source),kt=RegExp(Lt.source),At=/<%-([\s\S]+?)%>/g,hr=/<%([\s\S]+?)%>/g,Mr=/<%=([\s\S]+?)%>/g,Et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bt=/^\w*$/,pr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,vr=/[\\^$.*+?()[\]{}|]/g,yr=RegExp(vr.source),sr=/^\s+/,Tn=/\s/,Un=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Za=/\{\n\/\* \[wrapped with (.+)\] \*/,Gn=/,? & /,Ja=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Kn=/[()=,{}\[\]\/\s]/,Ri=/\\(\\)?/g,Bo=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fo=/\w*$/,ke=/^[-+]0x[0-9a-f]+$/i,$e=/^0b[01]+$/i,xr=/^\[object .+?Constructor\]$/,Ht=/^0o[0-7]+$/i,wr=/^(?:0|[1-9]\d*)$/,Sr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,tr=/($^)/,un=/['\n\r\u2028\u2029\\]/g,Yr="\\ud800-\\udfff",ci="\\u0300-\\u036f",Ni="\\ufe20-\\ufe2f",Qa="\\u20d0-\\u20ff",es=ci+Ni+Qa,$l="\\u2700-\\u27bf",ts="a-z\\xdf-\\xf6\\xf8-\\xff",hf="\\xac\\xb1\\xd7\\xf7",Vl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pf="\\u2000-\\u206f",vf=" \\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",rs="A-Z\\xc0-\\xd6\\xd8-\\xde",Hl="\\ufe0e\\ufe0f",Wl=hf+Vl+pf+vf,ns="['’]",gf="["+Yr+"]",is="["+Wl+"]",$o="["+es+"]",io="\\d+",mf="["+$l+"]",Ul="["+ts+"]",fE="[^"+Yr+Wl+io+$l+ts+rs+"]",bf="\\ud83c[\\udffb-\\udfff]",bL="(?:"+$o+"|"+bf+")",hE="[^"+Yr+"]",yf="(?:\\ud83c[\\udde6-\\uddff]){2}",xf="[\\ud800-\\udbff][\\udc00-\\udfff]",Vo="["+rs+"]",pE="\\u200d",vE="(?:"+Ul+"|"+fE+")",yL="(?:"+Vo+"|"+fE+")",gE="(?:"+ns+"(?:d|ll|m|re|s|t|ve))?",mE="(?:"+ns+"(?:D|LL|M|RE|S|T|VE))?",bE=bL+"?",yE="["+Hl+"]?",xL="(?:"+pE+"(?:"+[hE,yf,xf].join("|")+")"+yE+bE+")*",wL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",SL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",xE=yE+bE+xL,EL="(?:"+[mf,yf,xf].join("|")+")"+xE,_L="(?:"+[hE+$o+"?",$o,yf,xf,gf].join("|")+")",OL=RegExp(ns,"g"),CL=RegExp($o,"g"),wf=RegExp(bf+"(?="+bf+")|"+_L+xE,"g"),IL=RegExp([Vo+"?"+Ul+"+"+gE+"(?="+[is,Vo,"$"].join("|")+")",yL+"+"+mE+"(?="+[is,Vo+vE,"$"].join("|")+")",Vo+"?"+vE+"+"+gE,Vo+"+"+mE,SL,wL,io,EL].join("|"),"g"),RL=RegExp("["+pE+Yr+es+Hl+"]"),NL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,TL=["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"],PL=-1,_t={};_t[rt]=_t[Pt]=_t[gt]=_t[Rt]=_t[qt]=_t[Ot]=_t[Gr]=_t[Kr]=_t[ar]=!0,_t[H]=_t[q]=_t[ze]=_t[ie]=_t[Ze]=_t[ne]=_t[Z]=_t[J]=_t[he]=_t[ue]=_t[le]=_t[Ie]=_t[Te]=_t[Me]=_t[Fe]=!1;var xt={};xt[H]=xt[q]=xt[ze]=xt[Ze]=xt[ie]=xt[ne]=xt[rt]=xt[Pt]=xt[gt]=xt[Rt]=xt[qt]=xt[he]=xt[ue]=xt[le]=xt[Ie]=xt[Te]=xt[Me]=xt[Xe]=xt[Ot]=xt[Gr]=xt[Kr]=xt[ar]=!0,xt[Z]=xt[J]=xt[Fe]=!1;var ML={À:"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"},kL={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},AL={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},DL={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jL=parseFloat,qL=parseInt,wE=typeof jt=="object"&&jt&&jt.Object===Object&&jt,zL=typeof self=="object"&&self&&self.Object===Object&&self,lr=wE||zL||Function("return this")(),Sf=t&&!t.nodeType&&t,oo=Sf&&!0&&e&&!e.nodeType&&e,SE=oo&&oo.exports===Sf,Ef=SE&&wE.process,dn=(function(){try{var se=oo&&oo.require&&oo.require("util").types;return se||Ef&&Ef.binding&&Ef.binding("util")}catch{}})(),EE=dn&&dn.isArrayBuffer,_E=dn&&dn.isDate,OE=dn&&dn.isMap,CE=dn&&dn.isRegExp,IE=dn&&dn.isSet,RE=dn&&dn.isTypedArray;function Xr(se,ge,fe){switch(fe.length){case 0:return se.call(ge);case 1:return se.call(ge,fe[0]);case 2:return se.call(ge,fe[0],fe[1]);case 3:return se.call(ge,fe[0],fe[1],fe[2])}return se.apply(ge,fe)}function LL(se,ge,fe,Ce){for(var Be=-1,ot=se==null?0:se.length;++Be<ot;){var Kt=se[Be];ge(Ce,Kt,fe(Kt),se)}return Ce}function Zr(se,ge){for(var fe=-1,Ce=se==null?0:se.length;++fe<Ce&&ge(se[fe],fe,se)!==!1;);return se}function BL(se,ge){for(var fe=se==null?0:se.length;fe--&&ge(se[fe],fe,se)!==!1;);return se}function NE(se,ge){for(var fe=-1,Ce=se==null?0:se.length;++fe<Ce;)if(!ge(se[fe],fe,se))return!1;return!0}function Ti(se,ge){for(var fe=-1,Ce=se==null?0:se.length,Be=0,ot=[];++fe<Ce;){var Kt=se[fe];ge(Kt,fe,se)&&(ot[Be++]=Kt)}return ot}function Gl(se,ge){var fe=se==null?0:se.length;return!!fe&&Ho(se,ge,0)>-1}function _f(se,ge,fe){for(var Ce=-1,Be=se==null?0:se.length;++Ce<Be;)if(fe(ge,se[Ce]))return!0;return!1}function Ct(se,ge){for(var fe=-1,Ce=se==null?0:se.length,Be=Array(Ce);++fe<Ce;)Be[fe]=ge(se[fe],fe,se);return Be}function Pi(se,ge){for(var fe=-1,Ce=ge.length,Be=se.length;++fe<Ce;)se[Be+fe]=ge[fe];return se}function Of(se,ge,fe,Ce){var Be=-1,ot=se==null?0:se.length;for(Ce&&ot&&(fe=se[++Be]);++Be<ot;)fe=ge(fe,se[Be],Be,se);return fe}function FL(se,ge,fe,Ce){var Be=se==null?0:se.length;for(Ce&&Be&&(fe=se[--Be]);Be--;)fe=ge(fe,se[Be],Be,se);return fe}function Cf(se,ge){for(var fe=-1,Ce=se==null?0:se.length;++fe<Ce;)if(ge(se[fe],fe,se))return!0;return!1}var $L=If("length");function VL(se){return se.split("")}function HL(se){return se.match(Ja)||[]}function TE(se,ge,fe){var Ce;return fe(se,function(Be,ot,Kt){if(ge(Be,ot,Kt))return Ce=ot,!1}),Ce}function Kl(se,ge,fe,Ce){for(var Be=se.length,ot=fe+(Ce?1:-1);Ce?ot--:++ot<Be;)if(ge(se[ot],ot,se))return ot;return-1}function Ho(se,ge,fe){return ge===ge?r7(se,ge,fe):Kl(se,PE,fe)}function WL(se,ge,fe,Ce){for(var Be=fe-1,ot=se.length;++Be<ot;)if(Ce(se[Be],ge))return Be;return-1}function PE(se){return se!==se}function ME(se,ge){var fe=se==null?0:se.length;return fe?Nf(se,ge)/fe:B}function If(se){return function(ge){return ge==null?r:ge[se]}}function Rf(se){return function(ge){return se==null?r:se[ge]}}function kE(se,ge,fe,Ce,Be){return Be(se,function(ot,Kt,mt){fe=Ce?(Ce=!1,ot):ge(fe,ot,Kt,mt)}),fe}function UL(se,ge){var fe=se.length;for(se.sort(ge);fe--;)se[fe]=se[fe].value;return se}function Nf(se,ge){for(var fe,Ce=-1,Be=se.length;++Ce<Be;){var ot=ge(se[Ce]);ot!==r&&(fe=fe===r?ot:fe+ot)}return fe}function Tf(se,ge){for(var fe=-1,Ce=Array(se);++fe<se;)Ce[fe]=ge(fe);return Ce}function GL(se,ge){return Ct(ge,function(fe){return[fe,se[fe]]})}function AE(se){return se&&se.slice(0,zE(se)+1).replace(sr,"")}function Jr(se){return function(ge){return se(ge)}}function Pf(se,ge){return Ct(ge,function(fe){return se[fe]})}function os(se,ge){return se.has(ge)}function DE(se,ge){for(var fe=-1,Ce=se.length;++fe<Ce&&Ho(ge,se[fe],0)>-1;);return fe}function jE(se,ge){for(var fe=se.length;fe--&&Ho(ge,se[fe],0)>-1;);return fe}function KL(se,ge){for(var fe=se.length,Ce=0;fe--;)se[fe]===ge&&++Ce;return Ce}var YL=Rf(ML),XL=Rf(kL);function ZL(se){return"\\"+DL[se]}function JL(se,ge){return se==null?r:se[ge]}function Wo(se){return RL.test(se)}function QL(se){return NL.test(se)}function e7(se){for(var ge,fe=[];!(ge=se.next()).done;)fe.push(ge.value);return fe}function Mf(se){var ge=-1,fe=Array(se.size);return se.forEach(function(Ce,Be){fe[++ge]=[Be,Ce]}),fe}function qE(se,ge){return function(fe){return se(ge(fe))}}function Mi(se,ge){for(var fe=-1,Ce=se.length,Be=0,ot=[];++fe<Ce;){var Kt=se[fe];(Kt===ge||Kt===h)&&(se[fe]=h,ot[Be++]=fe)}return ot}function Yl(se){var ge=-1,fe=Array(se.size);return se.forEach(function(Ce){fe[++ge]=Ce}),fe}function t7(se){var ge=-1,fe=Array(se.size);return se.forEach(function(Ce){fe[++ge]=[Ce,Ce]}),fe}function r7(se,ge,fe){for(var Ce=fe-1,Be=se.length;++Ce<Be;)if(se[Ce]===ge)return Ce;return-1}function n7(se,ge,fe){for(var Ce=fe+1;Ce--;)if(se[Ce]===ge)return Ce;return Ce}function Uo(se){return Wo(se)?o7(se):$L(se)}function Pn(se){return Wo(se)?a7(se):VL(se)}function zE(se){for(var ge=se.length;ge--&&Tn.test(se.charAt(ge)););return ge}var i7=Rf(AL);function o7(se){for(var ge=wf.lastIndex=0;wf.test(se);)++ge;return ge}function a7(se){return se.match(wf)||[]}function s7(se){return se.match(IL)||[]}var l7=(function se(ge){ge=ge==null?lr:Go.defaults(lr.Object(),ge,Go.pick(lr,TL));var fe=ge.Array,Ce=ge.Date,Be=ge.Error,ot=ge.Function,Kt=ge.Math,mt=ge.Object,kf=ge.RegExp,c7=ge.String,fn=ge.TypeError,Xl=fe.prototype,u7=ot.prototype,Ko=mt.prototype,Zl=ge["__core-js_shared__"],Jl=u7.toString,lt=Ko.hasOwnProperty,d7=0,LE=(function(){var l=/[^.]+$/.exec(Zl&&Zl.keys&&Zl.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Ql=Ko.toString,f7=Jl.call(mt),h7=lr._,p7=kf("^"+Jl.call(lt).replace(vr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ec=SE?ge.Buffer:r,ki=ge.Symbol,tc=ge.Uint8Array,BE=ec?ec.allocUnsafe:r,rc=qE(mt.getPrototypeOf,mt),FE=mt.create,$E=Ko.propertyIsEnumerable,nc=Xl.splice,VE=ki?ki.isConcatSpreadable:r,as=ki?ki.iterator:r,ao=ki?ki.toStringTag:r,ic=(function(){try{var l=fo(mt,"defineProperty");return l({},"",{}),l}catch{}})(),v7=ge.clearTimeout!==lr.clearTimeout&&ge.clearTimeout,g7=Ce&&Ce.now!==lr.Date.now&&Ce.now,m7=ge.setTimeout!==lr.setTimeout&&ge.setTimeout,oc=Kt.ceil,ac=Kt.floor,Af=mt.getOwnPropertySymbols,b7=ec?ec.isBuffer:r,HE=ge.isFinite,y7=Xl.join,x7=qE(mt.keys,mt),Yt=Kt.max,gr=Kt.min,w7=Ce.now,S7=ge.parseInt,WE=Kt.random,E7=Xl.reverse,Df=fo(ge,"DataView"),ss=fo(ge,"Map"),jf=fo(ge,"Promise"),Yo=fo(ge,"Set"),ls=fo(ge,"WeakMap"),cs=fo(mt,"create"),sc=ls&&new ls,Xo={},_7=ho(Df),O7=ho(ss),C7=ho(jf),I7=ho(Yo),R7=ho(ls),lc=ki?ki.prototype:r,us=lc?lc.valueOf:r,UE=lc?lc.toString:r;function L(l){if(Dt(l)&&!Ve(l)&&!(l instanceof Je)){if(l instanceof hn)return l;if(lt.call(l,"__wrapped__"))return G_(l)}return new hn(l)}var Zo=(function(){function l(){}return function(f){if(!Nt(f))return{};if(FE)return FE(f);l.prototype=f;var b=new l;return l.prototype=r,b}})();function cc(){}function hn(l,f){this.__wrapped__=l,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=r}L.templateSettings={escape:At,evaluate:hr,interpolate:Mr,variable:"",imports:{_:L}},L.prototype=cc.prototype,L.prototype.constructor=L,hn.prototype=Zo(cc.prototype),hn.prototype.constructor=hn;function Je(l){this.__wrapped__=l,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function N7(){var l=new Je(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 T7(){if(this.__filtered__){var l=new Je(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__,b=Ve(l),R=f<0,k=b?l.length:0,F=V8(0,k,this.__views__),ee=F.start,oe=F.end,ce=oe-ee,me=R?oe:ee-1,be=this.__iteratees__,we=be.length,_e=0,Pe=gr(ce,this.__takeCount__);if(!b||!R&&k==ce&&Pe==ce)return g_(l,this.__actions__);var qe=[];e:for(;ce--&&_e<Pe;){me+=f;for(var We=-1,Ae=l[me];++We<we;){var Ke=be[We],Qe=Ke.iteratee,tn=Ke.type,Or=Qe(Ae);if(tn==V)Ae=Or;else if(!Or){if(tn==K)continue e;break e}}qe[_e++]=Ae}return qe}Je.prototype=Zo(cc.prototype),Je.prototype.constructor=Je;function so(l){var f=-1,b=l==null?0:l.length;for(this.clear();++f<b;){var R=l[f];this.set(R[0],R[1])}}function M7(){this.__data__=cs?cs(null):{},this.size=0}function k7(l){var f=this.has(l)&&delete this.__data__[l];return this.size-=f?1:0,f}function A7(l){var f=this.__data__;if(cs){var b=f[l];return b===u?r:b}return lt.call(f,l)?f[l]:r}function D7(l){var f=this.__data__;return cs?f[l]!==r:lt.call(f,l)}function j7(l,f){var b=this.__data__;return this.size+=this.has(l)?0:1,b[l]=cs&&f===r?u:f,this}so.prototype.clear=M7,so.prototype.delete=k7,so.prototype.get=A7,so.prototype.has=D7,so.prototype.set=j7;function ui(l){var f=-1,b=l==null?0:l.length;for(this.clear();++f<b;){var R=l[f];this.set(R[0],R[1])}}function q7(){this.__data__=[],this.size=0}function z7(l){var f=this.__data__,b=uc(f,l);if(b<0)return!1;var R=f.length-1;return b==R?f.pop():nc.call(f,b,1),--this.size,!0}function L7(l){var f=this.__data__,b=uc(f,l);return b<0?r:f[b][1]}function B7(l){return uc(this.__data__,l)>-1}function F7(l,f){var b=this.__data__,R=uc(b,l);return R<0?(++this.size,b.push([l,f])):b[R][1]=f,this}ui.prototype.clear=q7,ui.prototype.delete=z7,ui.prototype.get=L7,ui.prototype.has=B7,ui.prototype.set=F7;function di(l){var f=-1,b=l==null?0:l.length;for(this.clear();++f<b;){var R=l[f];this.set(R[0],R[1])}}function $7(){this.size=0,this.__data__={hash:new so,map:new(ss||ui),string:new so}}function V7(l){var f=Sc(this,l).delete(l);return this.size-=f?1:0,f}function H7(l){return Sc(this,l).get(l)}function W7(l){return Sc(this,l).has(l)}function U7(l,f){var b=Sc(this,l),R=b.size;return b.set(l,f),this.size+=b.size==R?0:1,this}di.prototype.clear=$7,di.prototype.delete=V7,di.prototype.get=H7,di.prototype.has=W7,di.prototype.set=U7;function lo(l){var f=-1,b=l==null?0:l.length;for(this.__data__=new di;++f<b;)this.add(l[f])}function G7(l){return this.__data__.set(l,u),this}function K7(l){return this.__data__.has(l)}lo.prototype.add=lo.prototype.push=G7,lo.prototype.has=K7;function Mn(l){var f=this.__data__=new ui(l);this.size=f.size}function Y7(){this.__data__=new ui,this.size=0}function X7(l){var f=this.__data__,b=f.delete(l);return this.size=f.size,b}function Z7(l){return this.__data__.get(l)}function J7(l){return this.__data__.has(l)}function Q7(l,f){var b=this.__data__;if(b instanceof ui){var R=b.__data__;if(!ss||R.length<i-1)return R.push([l,f]),this.size=++b.size,this;b=this.__data__=new di(R)}return b.set(l,f),this.size=b.size,this}Mn.prototype.clear=Y7,Mn.prototype.delete=X7,Mn.prototype.get=Z7,Mn.prototype.has=J7,Mn.prototype.set=Q7;function GE(l,f){var b=Ve(l),R=!b&&po(l),k=!b&&!R&&zi(l),F=!b&&!R&&!k&&ta(l),ee=b||R||k||F,oe=ee?Tf(l.length,c7):[],ce=oe.length;for(var me in l)(f||lt.call(l,me))&&!(ee&&(me=="length"||k&&(me=="offset"||me=="parent")||F&&(me=="buffer"||me=="byteLength"||me=="byteOffset")||pi(me,ce)))&&oe.push(me);return oe}function KE(l){var f=l.length;return f?l[Gf(0,f-1)]:r}function e8(l,f){return Ec(kr(l),co(f,0,l.length))}function t8(l){return Ec(kr(l))}function qf(l,f,b){(b!==r&&!An(l[f],b)||b===r&&!(f in l))&&Yn(l,f,b)}function ds(l,f,b){var R=l[f];(!(lt.call(l,f)&&An(R,b))||b===r&&!(f in l))&&Yn(l,f,b)}function uc(l,f){for(var b=l.length;b--;)if(An(l[b][0],f))return b;return-1}function r8(l,f,b,R){return Ai(l,function(k,F,ee){f(R,k,b(k),ee)}),R}function YE(l,f){return l&&Zn(f,rr(f),l)}function n8(l,f){return l&&Zn(f,Dr(f),l)}function Yn(l,f,b){f=="__proto__"&&ic?ic(l,f,{configurable:!0,enumerable:!0,value:b,writable:!0}):l[f]=b}function zf(l,f){for(var b=-1,R=f.length,k=fe(R),F=l==null;++b<R;)k[b]=F?r:yh(l,f[b]);return k}function co(l,f,b){return l===l&&(b!==r&&(l=l<=b?l:b),f!==r&&(l=l>=f?l:f)),l}function pn(l,f,b,R,k,F){var ee,oe=f&p,ce=f&v,me=f&y;if(b&&(ee=k?b(l,R,k,F):b(l)),ee!==r)return ee;if(!Nt(l))return l;var be=Ve(l);if(be){if(ee=W8(l),!oe)return kr(l,ee)}else{var we=mr(l),_e=we==J||we==ae;if(zi(l))return y_(l,oe);if(we==le||we==H||_e&&!k){if(ee=ce||_e?{}:z_(l),!oe)return ce?A8(l,n8(ee,l)):k8(l,YE(ee,l))}else{if(!xt[we])return k?l:{};ee=U8(l,we,oe)}}F||(F=new Mn);var Pe=F.get(l);if(Pe)return Pe;F.set(l,ee),hO(l)?l.forEach(function(Ae){ee.add(pn(Ae,f,b,Ae,l,F))}):dO(l)&&l.forEach(function(Ae,Ke){ee.set(Ke,pn(Ae,f,b,Ke,l,F))});var qe=me?ce?ih:nh:ce?Dr:rr,We=be?r:qe(l);return Zr(We||l,function(Ae,Ke){We&&(Ke=Ae,Ae=l[Ke]),ds(ee,Ke,pn(Ae,f,b,Ke,l,F))}),ee}function i8(l){var f=rr(l);return function(b){return XE(b,l,f)}}function XE(l,f,b){var R=b.length;if(l==null)return!R;for(l=mt(l);R--;){var k=b[R],F=f[k],ee=l[k];if(ee===r&&!(k in l)||!F(ee))return!1}return!0}function ZE(l,f,b){if(typeof l!="function")throw new fn(a);return bs(function(){l.apply(r,b)},f)}function fs(l,f,b,R){var k=-1,F=Gl,ee=!0,oe=l.length,ce=[],me=f.length;if(!oe)return ce;b&&(f=Ct(f,Jr(b))),R?(F=_f,ee=!1):f.length>=i&&(F=os,ee=!1,f=new lo(f));e:for(;++k<oe;){var be=l[k],we=b==null?be:b(be);if(be=R||be!==0?be:0,ee&&we===we){for(var _e=me;_e--;)if(f[_e]===we)continue e;ce.push(be)}else F(f,we,R)||ce.push(be)}return ce}var Ai=__(Xn),JE=__(Bf,!0);function o8(l,f){var b=!0;return Ai(l,function(R,k,F){return b=!!f(R,k,F),b}),b}function dc(l,f,b){for(var R=-1,k=l.length;++R<k;){var F=l[R],ee=f(F);if(ee!=null&&(oe===r?ee===ee&&!en(ee):b(ee,oe)))var oe=ee,ce=F}return ce}function a8(l,f,b,R){var k=l.length;for(b=He(b),b<0&&(b=-b>k?0:k+b),R=R===r||R>k?k:He(R),R<0&&(R+=k),R=b>R?0:vO(R);b<R;)l[b++]=f;return l}function QE(l,f){var b=[];return Ai(l,function(R,k,F){f(R,k,F)&&b.push(R)}),b}function cr(l,f,b,R,k){var F=-1,ee=l.length;for(b||(b=K8),k||(k=[]);++F<ee;){var oe=l[F];f>0&&b(oe)?f>1?cr(oe,f-1,b,R,k):Pi(k,oe):R||(k[k.length]=oe)}return k}var Lf=O_(),e_=O_(!0);function Xn(l,f){return l&&Lf(l,f,rr)}function Bf(l,f){return l&&e_(l,f,rr)}function fc(l,f){return Ti(f,function(b){return vi(l[b])})}function uo(l,f){f=ji(f,l);for(var b=0,R=f.length;l!=null&&b<R;)l=l[kn(f[b++])];return b&&b==R?l:r}function t_(l,f,b){var R=f(l);return Ve(l)?R:Pi(R,b(l))}function Er(l){return l==null?l===r?tt:de:ao&&ao in mt(l)?$8(l):tB(l)}function Ff(l,f){return l>f}function s8(l,f){return l!=null&&lt.call(l,f)}function l8(l,f){return l!=null&&f in mt(l)}function c8(l,f,b){return l>=gr(f,b)&&l<Yt(f,b)}function $f(l,f,b){for(var R=b?_f:Gl,k=l[0].length,F=l.length,ee=F,oe=fe(F),ce=1/0,me=[];ee--;){var be=l[ee];ee&&f&&(be=Ct(be,Jr(f))),ce=gr(be.length,ce),oe[ee]=!b&&(f||k>=120&&be.length>=120)?new lo(ee&&be):r}be=l[0];var we=-1,_e=oe[0];e:for(;++we<k&&me.length<ce;){var Pe=be[we],qe=f?f(Pe):Pe;if(Pe=b||Pe!==0?Pe:0,!(_e?os(_e,qe):R(me,qe,b))){for(ee=F;--ee;){var We=oe[ee];if(!(We?os(We,qe):R(l[ee],qe,b)))continue e}_e&&_e.push(qe),me.push(Pe)}}return me}function u8(l,f,b,R){return Xn(l,function(k,F,ee){f(R,b(k),F,ee)}),R}function hs(l,f,b){f=ji(f,l),l=$_(l,f);var R=l==null?l:l[kn(gn(f))];return R==null?r:Xr(R,l,b)}function r_(l){return Dt(l)&&Er(l)==H}function d8(l){return Dt(l)&&Er(l)==ze}function f8(l){return Dt(l)&&Er(l)==ne}function ps(l,f,b,R,k){return l===f?!0:l==null||f==null||!Dt(l)&&!Dt(f)?l!==l&&f!==f:h8(l,f,b,R,ps,k)}function h8(l,f,b,R,k,F){var ee=Ve(l),oe=Ve(f),ce=ee?q:mr(l),me=oe?q:mr(f);ce=ce==H?le:ce,me=me==H?le:me;var be=ce==le,we=me==le,_e=ce==me;if(_e&&zi(l)){if(!zi(f))return!1;ee=!0,be=!1}if(_e&&!be)return F||(F=new Mn),ee||ta(l)?D_(l,f,b,R,k,F):B8(l,f,ce,b,R,k,F);if(!(b&m)){var Pe=be&&lt.call(l,"__wrapped__"),qe=we&&lt.call(f,"__wrapped__");if(Pe||qe){var We=Pe?l.value():l,Ae=qe?f.value():f;return F||(F=new Mn),k(We,Ae,b,R,F)}}return _e?(F||(F=new Mn),F8(l,f,b,R,k,F)):!1}function p8(l){return Dt(l)&&mr(l)==he}function Vf(l,f,b,R){var k=b.length,F=k,ee=!R;if(l==null)return!F;for(l=mt(l);k--;){var oe=b[k];if(ee&&oe[2]?oe[1]!==l[oe[0]]:!(oe[0]in l))return!1}for(;++k<F;){oe=b[k];var ce=oe[0],me=l[ce],be=oe[1];if(ee&&oe[2]){if(me===r&&!(ce in l))return!1}else{var we=new Mn;if(R)var _e=R(me,be,ce,l,f,we);if(!(_e===r?ps(be,me,m|g,R,we):_e))return!1}}return!0}function n_(l){if(!Nt(l)||X8(l))return!1;var f=vi(l)?p7:xr;return f.test(ho(l))}function v8(l){return Dt(l)&&Er(l)==Ie}function g8(l){return Dt(l)&&mr(l)==Te}function m8(l){return Dt(l)&&Nc(l.length)&&!!_t[Er(l)]}function i_(l){return typeof l=="function"?l:l==null?jr:typeof l=="object"?Ve(l)?s_(l[0],l[1]):a_(l):IO(l)}function Hf(l){if(!ms(l))return x7(l);var f=[];for(var b in mt(l))lt.call(l,b)&&b!="constructor"&&f.push(b);return f}function b8(l){if(!Nt(l))return eB(l);var f=ms(l),b=[];for(var R in l)R=="constructor"&&(f||!lt.call(l,R))||b.push(R);return b}function Wf(l,f){return l<f}function o_(l,f){var b=-1,R=Ar(l)?fe(l.length):[];return Ai(l,function(k,F,ee){R[++b]=f(k,F,ee)}),R}function a_(l){var f=ah(l);return f.length==1&&f[0][2]?B_(f[0][0],f[0][1]):function(b){return b===l||Vf(b,l,f)}}function s_(l,f){return lh(l)&&L_(f)?B_(kn(l),f):function(b){var R=yh(b,l);return R===r&&R===f?xh(b,l):ps(f,R,m|g)}}function hc(l,f,b,R,k){l!==f&&Lf(f,function(F,ee){if(k||(k=new Mn),Nt(F))y8(l,f,ee,b,hc,R,k);else{var oe=R?R(uh(l,ee),F,ee+"",l,f,k):r;oe===r&&(oe=F),qf(l,ee,oe)}},Dr)}function y8(l,f,b,R,k,F,ee){var oe=uh(l,b),ce=uh(f,b),me=ee.get(ce);if(me){qf(l,b,me);return}var be=F?F(oe,ce,b+"",l,f,ee):r,we=be===r;if(we){var _e=Ve(ce),Pe=!_e&&zi(ce),qe=!_e&&!Pe&&ta(ce);be=ce,_e||Pe||qe?Ve(oe)?be=oe:Ft(oe)?be=kr(oe):Pe?(we=!1,be=y_(ce,!0)):qe?(we=!1,be=x_(ce,!0)):be=[]:ys(ce)||po(ce)?(be=oe,po(oe)?be=gO(oe):(!Nt(oe)||vi(oe))&&(be=z_(ce))):we=!1}we&&(ee.set(ce,be),k(be,ce,R,F,ee),ee.delete(ce)),qf(l,b,be)}function l_(l,f){var b=l.length;if(b)return f+=f<0?b:0,pi(f,b)?l[f]:r}function c_(l,f,b){f.length?f=Ct(f,function(F){return Ve(F)?function(ee){return uo(ee,F.length===1?F[0]:F)}:F}):f=[jr];var R=-1;f=Ct(f,Jr(De()));var k=o_(l,function(F,ee,oe){var ce=Ct(f,function(me){return me(F)});return{criteria:ce,index:++R,value:F}});return UL(k,function(F,ee){return M8(F,ee,b)})}function x8(l,f){return u_(l,f,function(b,R){return xh(l,R)})}function u_(l,f,b){for(var R=-1,k=f.length,F={};++R<k;){var ee=f[R],oe=uo(l,ee);b(oe,ee)&&vs(F,ji(ee,l),oe)}return F}function w8(l){return function(f){return uo(f,l)}}function Uf(l,f,b,R){var k=R?WL:Ho,F=-1,ee=f.length,oe=l;for(l===f&&(f=kr(f)),b&&(oe=Ct(l,Jr(b)));++F<ee;)for(var ce=0,me=f[F],be=b?b(me):me;(ce=k(oe,be,ce,R))>-1;)oe!==l&&nc.call(oe,ce,1),nc.call(l,ce,1);return l}function d_(l,f){for(var b=l?f.length:0,R=b-1;b--;){var k=f[b];if(b==R||k!==F){var F=k;pi(k)?nc.call(l,k,1):Xf(l,k)}}return l}function Gf(l,f){return l+ac(WE()*(f-l+1))}function S8(l,f,b,R){for(var k=-1,F=Yt(oc((f-l)/(b||1)),0),ee=fe(F);F--;)ee[R?F:++k]=l,l+=b;return ee}function Kf(l,f){var b="";if(!l||f<1||f>re)return b;do f%2&&(b+=l),f=ac(f/2),f&&(l+=l);while(f);return b}function Ue(l,f){return dh(F_(l,f,jr),l+"")}function E8(l){return KE(ra(l))}function _8(l,f){var b=ra(l);return Ec(b,co(f,0,b.length))}function vs(l,f,b,R){if(!Nt(l))return l;f=ji(f,l);for(var k=-1,F=f.length,ee=F-1,oe=l;oe!=null&&++k<F;){var ce=kn(f[k]),me=b;if(ce==="__proto__"||ce==="constructor"||ce==="prototype")return l;if(k!=ee){var be=oe[ce];me=R?R(be,ce,oe):r,me===r&&(me=Nt(be)?be:pi(f[k+1])?[]:{})}ds(oe,ce,me),oe=oe[ce]}return l}var f_=sc?function(l,f){return sc.set(l,f),l}:jr,O8=ic?function(l,f){return ic(l,"toString",{configurable:!0,enumerable:!1,value:Sh(f),writable:!0})}:jr;function C8(l){return Ec(ra(l))}function vn(l,f,b){var R=-1,k=l.length;f<0&&(f=-f>k?0:k+f),b=b>k?k:b,b<0&&(b+=k),k=f>b?0:b-f>>>0,f>>>=0;for(var F=fe(k);++R<k;)F[R]=l[R+f];return F}function I8(l,f){var b;return Ai(l,function(R,k,F){return b=f(R,k,F),!b}),!!b}function pc(l,f,b){var R=0,k=l==null?R:l.length;if(typeof f=="number"&&f===f&&k<=D){for(;R<k;){var F=R+k>>>1,ee=l[F];ee!==null&&!en(ee)&&(b?ee<=f:ee<f)?R=F+1:k=F}return k}return Yf(l,f,jr,b)}function Yf(l,f,b,R){var k=0,F=l==null?0:l.length;if(F===0)return 0;f=b(f);for(var ee=f!==f,oe=f===null,ce=en(f),me=f===r;k<F;){var be=ac((k+F)/2),we=b(l[be]),_e=we!==r,Pe=we===null,qe=we===we,We=en(we);if(ee)var Ae=R||qe;else me?Ae=qe&&(R||_e):oe?Ae=qe&&_e&&(R||!Pe):ce?Ae=qe&&_e&&!Pe&&(R||!We):Pe||We?Ae=!1:Ae=R?we<=f:we<f;Ae?k=be+1:F=be}return gr(F,Q)}function h_(l,f){for(var b=-1,R=l.length,k=0,F=[];++b<R;){var ee=l[b],oe=f?f(ee):ee;if(!b||!An(oe,ce)){var ce=oe;F[k++]=ee===0?0:ee}}return F}function p_(l){return typeof l=="number"?l:en(l)?B:+l}function Qr(l){if(typeof l=="string")return l;if(Ve(l))return Ct(l,Qr)+"";if(en(l))return UE?UE.call(l):"";var f=l+"";return f=="0"&&1/l==-G?"-0":f}function Di(l,f,b){var R=-1,k=Gl,F=l.length,ee=!0,oe=[],ce=oe;if(b)ee=!1,k=_f;else if(F>=i){var me=f?null:z8(l);if(me)return Yl(me);ee=!1,k=os,ce=new lo}else ce=f?[]:oe;e:for(;++R<F;){var be=l[R],we=f?f(be):be;if(be=b||be!==0?be:0,ee&&we===we){for(var _e=ce.length;_e--;)if(ce[_e]===we)continue e;f&&ce.push(we),oe.push(be)}else k(ce,we,b)||(ce!==oe&&ce.push(we),oe.push(be))}return oe}function Xf(l,f){f=ji(f,l);var b=-1,R=f.length;if(!R)return!0;for(;++b<R;){var k=kn(f[b]);if(k==="__proto__"&&!lt.call(l,"__proto__")||(k==="constructor"||k==="prototype")&&b<R-1)return!1}var F=$_(l,f);return F==null||delete F[kn(gn(f))]}function v_(l,f,b,R){return vs(l,f,b(uo(l,f)),R)}function vc(l,f,b,R){for(var k=l.length,F=R?k:-1;(R?F--:++F<k)&&f(l[F],F,l););return b?vn(l,R?0:F,R?F+1:k):vn(l,R?F+1:0,R?k:F)}function g_(l,f){var b=l;return b instanceof Je&&(b=b.value()),Of(f,function(R,k){return k.func.apply(k.thisArg,Pi([R],k.args))},b)}function Zf(l,f,b){var R=l.length;if(R<2)return R?Di(l[0]):[];for(var k=-1,F=fe(R);++k<R;)for(var ee=l[k],oe=-1;++oe<R;)oe!=k&&(F[k]=fs(F[k]||ee,l[oe],f,b));return Di(cr(F,1),f,b)}function m_(l,f,b){for(var R=-1,k=l.length,F=f.length,ee={};++R<k;){var oe=R<F?f[R]:r;b(ee,l[R],oe)}return ee}function Jf(l){return Ft(l)?l:[]}function Qf(l){return typeof l=="function"?l:jr}function ji(l,f){return Ve(l)?l:lh(l,f)?[l]:U_(ct(l))}var R8=Ue;function qi(l,f,b){var R=l.length;return b=b===r?R:b,!f&&b>=R?l:vn(l,f,b)}var b_=v7||function(l){return lr.clearTimeout(l)};function y_(l,f){if(f)return l.slice();var b=l.length,R=BE?BE(b):new l.constructor(b);return l.copy(R),R}function eh(l){var f=new l.constructor(l.byteLength);return new tc(f).set(new tc(l)),f}function N8(l,f){var b=f?eh(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.byteLength)}function T8(l){var f=new l.constructor(l.source,Fo.exec(l));return f.lastIndex=l.lastIndex,f}function P8(l){return us?mt(us.call(l)):{}}function x_(l,f){var b=f?eh(l.buffer):l.buffer;return new l.constructor(b,l.byteOffset,l.length)}function w_(l,f){if(l!==f){var b=l!==r,R=l===null,k=l===l,F=en(l),ee=f!==r,oe=f===null,ce=f===f,me=en(f);if(!oe&&!me&&!F&&l>f||F&&ee&&ce&&!oe&&!me||R&&ee&&ce||!b&&ce||!k)return 1;if(!R&&!F&&!me&&l<f||me&&b&&k&&!R&&!F||oe&&b&&k||!ee&&k||!ce)return-1}return 0}function M8(l,f,b){for(var R=-1,k=l.criteria,F=f.criteria,ee=k.length,oe=b.length;++R<ee;){var ce=w_(k[R],F[R]);if(ce){if(R>=oe)return ce;var me=b[R];return ce*(me=="desc"?-1:1)}}return l.index-f.index}function S_(l,f,b,R){for(var k=-1,F=l.length,ee=b.length,oe=-1,ce=f.length,me=Yt(F-ee,0),be=fe(ce+me),we=!R;++oe<ce;)be[oe]=f[oe];for(;++k<ee;)(we||k<F)&&(be[b[k]]=l[k]);for(;me--;)be[oe++]=l[k++];return be}function E_(l,f,b,R){for(var k=-1,F=l.length,ee=-1,oe=b.length,ce=-1,me=f.length,be=Yt(F-oe,0),we=fe(be+me),_e=!R;++k<be;)we[k]=l[k];for(var Pe=k;++ce<me;)we[Pe+ce]=f[ce];for(;++ee<oe;)(_e||k<F)&&(we[Pe+b[ee]]=l[k++]);return we}function kr(l,f){var b=-1,R=l.length;for(f||(f=fe(R));++b<R;)f[b]=l[b];return f}function Zn(l,f,b,R){var k=!b;b||(b={});for(var F=-1,ee=f.length;++F<ee;){var oe=f[F],ce=R?R(b[oe],l[oe],oe,b,l):r;ce===r&&(ce=l[oe]),k?Yn(b,oe,ce):ds(b,oe,ce)}return b}function k8(l,f){return Zn(l,sh(l),f)}function A8(l,f){return Zn(l,j_(l),f)}function gc(l,f){return function(b,R){var k=Ve(b)?LL:r8,F=f?f():{};return k(b,l,De(R,2),F)}}function Jo(l){return Ue(function(f,b){var R=-1,k=b.length,F=k>1?b[k-1]:r,ee=k>2?b[2]:r;for(F=l.length>3&&typeof F=="function"?(k--,F):r,ee&&_r(b[0],b[1],ee)&&(F=k<3?r:F,k=1),f=mt(f);++R<k;){var oe=b[R];oe&&l(f,oe,R,F)}return f})}function __(l,f){return function(b,R){if(b==null)return b;if(!Ar(b))return l(b,R);for(var k=b.length,F=f?k:-1,ee=mt(b);(f?F--:++F<k)&&R(ee[F],F,ee)!==!1;);return b}}function O_(l){return function(f,b,R){for(var k=-1,F=mt(f),ee=R(f),oe=ee.length;oe--;){var ce=ee[l?oe:++k];if(b(F[ce],ce,F)===!1)break}return f}}function D8(l,f,b){var R=f&w,k=gs(l);function F(){var ee=this&&this!==lr&&this instanceof F?k:l;return ee.apply(R?b:this,arguments)}return F}function C_(l){return function(f){f=ct(f);var b=Wo(f)?Pn(f):r,R=b?b[0]:f.charAt(0),k=b?qi(b,1).join(""):f.slice(1);return R[l]()+k}}function Qo(l){return function(f){return Of(OO(_O(f).replace(OL,"")),l,"")}}function gs(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 b=Zo(l.prototype),R=l.apply(b,f);return Nt(R)?R:b}}function j8(l,f,b){var R=gs(l);function k(){for(var F=arguments.length,ee=fe(F),oe=F,ce=ea(k);oe--;)ee[oe]=arguments[oe];var me=F<3&&ee[0]!==ce&&ee[F-1]!==ce?[]:Mi(ee,ce);if(F-=me.length,F<b)return P_(l,f,mc,k.placeholder,r,ee,me,r,r,b-F);var be=this&&this!==lr&&this instanceof k?R:l;return Xr(be,this,ee)}return k}function I_(l){return function(f,b,R){var k=mt(f);if(!Ar(f)){var F=De(b,3);f=rr(f),b=function(oe){return F(k[oe],oe,k)}}var ee=l(f,b,R);return ee>-1?k[F?f[ee]:ee]:r}}function R_(l){return hi(function(f){var b=f.length,R=b,k=hn.prototype.thru;for(l&&f.reverse();R--;){var F=f[R];if(typeof F!="function")throw new fn(a);if(k&&!ee&&wc(F)=="wrapper")var ee=new hn([],!0)}for(R=ee?R:b;++R<b;){F=f[R];var oe=wc(F),ce=oe=="wrapper"?oh(F):r;ce&&ch(ce[0])&&ce[1]==(T|S|I|M)&&!ce[4].length&&ce[9]==1?ee=ee[wc(ce[0])].apply(ee,ce[3]):ee=F.length==1&&ch(F)?ee[oe]():ee.thru(F)}return function(){var me=arguments,be=me[0];if(ee&&me.length==1&&Ve(be))return ee.plant(be).value();for(var we=0,_e=b?f[we].apply(this,me):be;++we<b;)_e=f[we].call(this,_e);return _e}})}function mc(l,f,b,R,k,F,ee,oe,ce,me){var be=f&T,we=f&w,_e=f&x,Pe=f&(S|E),qe=f&z,We=_e?r:gs(l);function Ae(){for(var Ke=arguments.length,Qe=fe(Ke),tn=Ke;tn--;)Qe[tn]=arguments[tn];if(Pe)var Or=ea(Ae),rn=KL(Qe,Or);if(R&&(Qe=S_(Qe,R,k,Pe)),F&&(Qe=E_(Qe,F,ee,Pe)),Ke-=rn,Pe&&Ke<me){var $t=Mi(Qe,Or);return P_(l,f,mc,Ae.placeholder,b,Qe,$t,oe,ce,me-Ke)}var Dn=we?b:this,mi=_e?Dn[l]:l;return Ke=Qe.length,oe?Qe=rB(Qe,oe):qe&&Ke>1&&Qe.reverse(),be&&ce<Ke&&(Qe.length=ce),this&&this!==lr&&this instanceof Ae&&(mi=We||gs(mi)),mi.apply(Dn,Qe)}return Ae}function N_(l,f){return function(b,R){return u8(b,l,f(R),{})}}function bc(l,f){return function(b,R){var k;if(b===r&&R===r)return f;if(b!==r&&(k=b),R!==r){if(k===r)return R;typeof b=="string"||typeof R=="string"?(b=Qr(b),R=Qr(R)):(b=p_(b),R=p_(R)),k=l(b,R)}return k}}function th(l){return hi(function(f){return f=Ct(f,Jr(De())),Ue(function(b){var R=this;return l(f,function(k){return Xr(k,R,b)})})})}function yc(l,f){f=f===r?" ":Qr(f);var b=f.length;if(b<2)return b?Kf(f,l):f;var R=Kf(f,oc(l/Uo(f)));return Wo(f)?qi(Pn(R),0,l).join(""):R.slice(0,l)}function q8(l,f,b,R){var k=f&w,F=gs(l);function ee(){for(var oe=-1,ce=arguments.length,me=-1,be=R.length,we=fe(be+ce),_e=this&&this!==lr&&this instanceof ee?F:l;++me<be;)we[me]=R[me];for(;ce--;)we[me++]=arguments[++oe];return Xr(_e,k?b:this,we)}return ee}function T_(l){return function(f,b,R){return R&&typeof R!="number"&&_r(f,b,R)&&(b=R=r),f=gi(f),b===r?(b=f,f=0):b=gi(b),R=R===r?f<b?1:-1:gi(R),S8(f,b,R,l)}}function xc(l){return function(f,b){return typeof f=="string"&&typeof b=="string"||(f=mn(f),b=mn(b)),l(f,b)}}function P_(l,f,b,R,k,F,ee,oe,ce,me){var be=f&S,we=be?ee:r,_e=be?r:ee,Pe=be?F:r,qe=be?r:F;f|=be?I:N,f&=~(be?N:I),f&_||(f&=-4);var We=[l,f,k,Pe,we,qe,_e,oe,ce,me],Ae=b.apply(r,We);return ch(l)&&V_(Ae,We),Ae.placeholder=R,H_(Ae,l,f)}function rh(l){var f=Kt[l];return function(b,R){if(b=mn(b),R=R==null?0:gr(He(R),292),R&&HE(b)){var k=(ct(b)+"e").split("e"),F=f(k[0]+"e"+(+k[1]+R));return k=(ct(F)+"e").split("e"),+(k[0]+"e"+(+k[1]-R))}return f(b)}}var z8=Yo&&1/Yl(new Yo([,-0]))[1]==G?function(l){return new Yo(l)}:Oh;function M_(l){return function(f){var b=mr(f);return b==he?Mf(f):b==Te?t7(f):GL(f,l(f))}}function fi(l,f,b,R,k,F,ee,oe){var ce=f&x;if(!ce&&typeof l!="function")throw new fn(a);var me=R?R.length:0;if(me||(f&=-97,R=k=r),ee=ee===r?ee:Yt(He(ee),0),oe=oe===r?oe:He(oe),me-=k?k.length:0,f&N){var be=R,we=k;R=k=r}var _e=ce?r:oh(l),Pe=[l,f,b,R,k,be,we,F,ee,oe];if(_e&&Q8(Pe,_e),l=Pe[0],f=Pe[1],b=Pe[2],R=Pe[3],k=Pe[4],oe=Pe[9]=Pe[9]===r?ce?0:l.length:Yt(Pe[9]-me,0),!oe&&f&(S|E)&&(f&=-25),!f||f==w)var qe=D8(l,f,b);else f==S||f==E?qe=j8(l,f,oe):(f==I||f==(w|I))&&!k.length?qe=q8(l,f,b,R):qe=mc.apply(r,Pe);var We=_e?f_:V_;return H_(We(qe,Pe),l,f)}function k_(l,f,b,R){return l===r||An(l,Ko[b])&&!lt.call(R,b)?f:l}function A_(l,f,b,R,k,F){return Nt(l)&&Nt(f)&&(F.set(f,l),hc(l,f,r,A_,F),F.delete(f)),l}function L8(l){return ys(l)?r:l}function D_(l,f,b,R,k,F){var ee=b&m,oe=l.length,ce=f.length;if(oe!=ce&&!(ee&&ce>oe))return!1;var me=F.get(l),be=F.get(f);if(me&&be)return me==f&&be==l;var we=-1,_e=!0,Pe=b&g?new lo:r;for(F.set(l,f),F.set(f,l);++we<oe;){var qe=l[we],We=f[we];if(R)var Ae=ee?R(We,qe,we,f,l,F):R(qe,We,we,l,f,F);if(Ae!==r){if(Ae)continue;_e=!1;break}if(Pe){if(!Cf(f,function(Ke,Qe){if(!os(Pe,Qe)&&(qe===Ke||k(qe,Ke,b,R,F)))return Pe.push(Qe)})){_e=!1;break}}else if(!(qe===We||k(qe,We,b,R,F))){_e=!1;break}}return F.delete(l),F.delete(f),_e}function B8(l,f,b,R,k,F,ee){switch(b){case Ze:if(l.byteLength!=f.byteLength||l.byteOffset!=f.byteOffset)return!1;l=l.buffer,f=f.buffer;case ze:return!(l.byteLength!=f.byteLength||!F(new tc(l),new tc(f)));case ie:case ne:case ue:return An(+l,+f);case Z:return l.name==f.name&&l.message==f.message;case Ie:case Me:return l==f+"";case he:var oe=Mf;case Te:var ce=R&m;if(oe||(oe=Yl),l.size!=f.size&&!ce)return!1;var me=ee.get(l);if(me)return me==f;R|=g,ee.set(l,f);var be=D_(oe(l),oe(f),R,k,F,ee);return ee.delete(l),be;case Xe:if(us)return us.call(l)==us.call(f)}return!1}function F8(l,f,b,R,k,F){var ee=b&m,oe=nh(l),ce=oe.length,me=nh(f),be=me.length;if(ce!=be&&!ee)return!1;for(var we=ce;we--;){var _e=oe[we];if(!(ee?_e in f:lt.call(f,_e)))return!1}var Pe=F.get(l),qe=F.get(f);if(Pe&&qe)return Pe==f&&qe==l;var We=!0;F.set(l,f),F.set(f,l);for(var Ae=ee;++we<ce;){_e=oe[we];var Ke=l[_e],Qe=f[_e];if(R)var tn=ee?R(Qe,Ke,_e,f,l,F):R(Ke,Qe,_e,l,f,F);if(!(tn===r?Ke===Qe||k(Ke,Qe,b,R,F):tn)){We=!1;break}Ae||(Ae=_e=="constructor")}if(We&&!Ae){var Or=l.constructor,rn=f.constructor;Or!=rn&&"constructor"in l&&"constructor"in f&&!(typeof Or=="function"&&Or instanceof Or&&typeof rn=="function"&&rn instanceof rn)&&(We=!1)}return F.delete(l),F.delete(f),We}function hi(l){return dh(F_(l,r,X_),l+"")}function nh(l){return t_(l,rr,sh)}function ih(l){return t_(l,Dr,j_)}var oh=sc?function(l){return sc.get(l)}:Oh;function wc(l){for(var f=l.name+"",b=Xo[f],R=lt.call(Xo,f)?b.length:0;R--;){var k=b[R],F=k.func;if(F==null||F==l)return k.name}return f}function ea(l){var f=lt.call(L,"placeholder")?L:l;return f.placeholder}function De(){var l=L.iteratee||Eh;return l=l===Eh?i_:l,arguments.length?l(arguments[0],arguments[1]):l}function Sc(l,f){var b=l.__data__;return Y8(f)?b[typeof f=="string"?"string":"hash"]:b.map}function ah(l){for(var f=rr(l),b=f.length;b--;){var R=f[b],k=l[R];f[b]=[R,k,L_(k)]}return f}function fo(l,f){var b=JL(l,f);return n_(b)?b:r}function $8(l){var f=lt.call(l,ao),b=l[ao];try{l[ao]=r;var R=!0}catch{}var k=Ql.call(l);return R&&(f?l[ao]=b:delete l[ao]),k}var sh=Af?function(l){return l==null?[]:(l=mt(l),Ti(Af(l),function(f){return $E.call(l,f)}))}:Ch,j_=Af?function(l){for(var f=[];l;)Pi(f,sh(l)),l=rc(l);return f}:Ch,mr=Er;(Df&&mr(new Df(new ArrayBuffer(1)))!=Ze||ss&&mr(new ss)!=he||jf&&mr(jf.resolve())!=xe||Yo&&mr(new Yo)!=Te||ls&&mr(new ls)!=Fe)&&(mr=function(l){var f=Er(l),b=f==le?l.constructor:r,R=b?ho(b):"";if(R)switch(R){case _7:return Ze;case O7:return he;case C7:return xe;case I7:return Te;case R7:return Fe}return f});function V8(l,f,b){for(var R=-1,k=b.length;++R<k;){var F=b[R],ee=F.size;switch(F.type){case"drop":l+=ee;break;case"dropRight":f-=ee;break;case"take":f=gr(f,l+ee);break;case"takeRight":l=Yt(l,f-ee);break}}return{start:l,end:f}}function H8(l){var f=l.match(Za);return f?f[1].split(Gn):[]}function q_(l,f,b){f=ji(f,l);for(var R=-1,k=f.length,F=!1;++R<k;){var ee=kn(f[R]);if(!(F=l!=null&&b(l,ee)))break;l=l[ee]}return F||++R!=k?F:(k=l==null?0:l.length,!!k&&Nc(k)&&pi(ee,k)&&(Ve(l)||po(l)))}function W8(l){var f=l.length,b=new l.constructor(f);return f&&typeof l[0]=="string"&&lt.call(l,"index")&&(b.index=l.index,b.input=l.input),b}function z_(l){return typeof l.constructor=="function"&&!ms(l)?Zo(rc(l)):{}}function U8(l,f,b){var R=l.constructor;switch(f){case ze:return eh(l);case ie:case ne:return new R(+l);case Ze:return N8(l,b);case rt:case Pt:case gt:case Rt:case qt:case Ot:case Gr:case Kr:case ar:return x_(l,b);case he:return new R;case ue:case Me:return new R(l);case Ie:return T8(l);case Te:return new R;case Xe:return P8(l)}}function G8(l,f){var b=f.length;if(!b)return l;var R=b-1;return f[R]=(b>1?"& ":"")+f[R],f=f.join(b>2?", ":" "),l.replace(Un,`{
71
+ /* [wrapped with `+f+`] */
72
+ `)}function K8(l){return Ve(l)||po(l)||!!(VE&&l&&l[VE])}function pi(l,f){var b=typeof l;return f=f??re,!!f&&(b=="number"||b!="symbol"&&wr.test(l))&&l>-1&&l%1==0&&l<f}function _r(l,f,b){if(!Nt(b))return!1;var R=typeof f;return(R=="number"?Ar(b)&&pi(f,b.length):R=="string"&&f in b)?An(b[f],l):!1}function lh(l,f){if(Ve(l))return!1;var b=typeof l;return b=="number"||b=="symbol"||b=="boolean"||l==null||en(l)?!0:Bt.test(l)||!Et.test(l)||f!=null&&l in mt(f)}function Y8(l){var f=typeof l;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?l!=="__proto__":l===null}function ch(l){var f=wc(l),b=L[f];if(typeof b!="function"||!(f in Je.prototype))return!1;if(l===b)return!0;var R=oh(b);return!!R&&l===R[0]}function X8(l){return!!LE&&LE in l}var Z8=Zl?vi:Ih;function ms(l){var f=l&&l.constructor,b=typeof f=="function"&&f.prototype||Ko;return l===b}function L_(l){return l===l&&!Nt(l)}function B_(l,f){return function(b){return b==null?!1:b[l]===f&&(f!==r||l in mt(b))}}function J8(l){var f=Ic(l,function(R){return b.size===d&&b.clear(),R}),b=f.cache;return f}function Q8(l,f){var b=l[1],R=f[1],k=b|R,F=k<(w|x|T),ee=R==T&&b==S||R==T&&b==M&&l[7].length<=f[8]||R==(T|M)&&f[7].length<=f[8]&&b==S;if(!(F||ee))return l;R&w&&(l[2]=f[2],k|=b&w?0:_);var oe=f[3];if(oe){var ce=l[3];l[3]=ce?S_(ce,oe,f[4]):oe,l[4]=ce?Mi(l[3],h):f[4]}return oe=f[5],oe&&(ce=l[5],l[5]=ce?E_(ce,oe,f[6]):oe,l[6]=ce?Mi(l[5],h):f[6]),oe=f[7],oe&&(l[7]=oe),R&T&&(l[8]=l[8]==null?f[8]:gr(l[8],f[8])),l[9]==null&&(l[9]=f[9]),l[0]=f[0],l[1]=k,l}function eB(l){var f=[];if(l!=null)for(var b in mt(l))f.push(b);return f}function tB(l){return Ql.call(l)}function F_(l,f,b){return f=Yt(f===r?l.length-1:f,0),function(){for(var R=arguments,k=-1,F=Yt(R.length-f,0),ee=fe(F);++k<F;)ee[k]=R[f+k];k=-1;for(var oe=fe(f+1);++k<f;)oe[k]=R[k];return oe[f]=b(ee),Xr(l,this,oe)}}function $_(l,f){return f.length<2?l:uo(l,vn(f,0,-1))}function rB(l,f){for(var b=l.length,R=gr(f.length,b),k=kr(l);R--;){var F=f[R];l[R]=pi(F,b)?k[F]:r}return l}function uh(l,f){if(!(f==="constructor"&&typeof l[f]=="function")&&f!="__proto__")return l[f]}var V_=W_(f_),bs=m7||function(l,f){return lr.setTimeout(l,f)},dh=W_(O8);function H_(l,f,b){var R=f+"";return dh(l,G8(R,nB(H8(R),b)))}function W_(l){var f=0,b=0;return function(){var R=w7(),k=A-(R-b);if(b=R,k>0){if(++f>=U)return arguments[0]}else f=0;return l.apply(r,arguments)}}function Ec(l,f){var b=-1,R=l.length,k=R-1;for(f=f===r?R:f;++b<f;){var F=Gf(b,k),ee=l[F];l[F]=l[b],l[b]=ee}return l.length=f,l}var U_=J8(function(l){var f=[];return l.charCodeAt(0)===46&&f.push(""),l.replace(pr,function(b,R,k,F){f.push(k?F.replace(Ri,"$1"):R||b)}),f});function kn(l){if(typeof l=="string"||en(l))return l;var f=l+"";return f=="0"&&1/l==-G?"-0":f}function ho(l){if(l!=null){try{return Jl.call(l)}catch{}try{return l+""}catch{}}return""}function nB(l,f){return Zr($,function(b){var R="_."+b[0];f&b[1]&&!Gl(l,R)&&l.push(R)}),l.sort()}function G_(l){if(l instanceof Je)return l.clone();var f=new hn(l.__wrapped__,l.__chain__);return f.__actions__=kr(l.__actions__),f.__index__=l.__index__,f.__values__=l.__values__,f}function iB(l,f,b){(b?_r(l,f,b):f===r)?f=1:f=Yt(He(f),0);var R=l==null?0:l.length;if(!R||f<1)return[];for(var k=0,F=0,ee=fe(oc(R/f));k<R;)ee[F++]=vn(l,k,k+=f);return ee}function oB(l){for(var f=-1,b=l==null?0:l.length,R=0,k=[];++f<b;){var F=l[f];F&&(k[R++]=F)}return k}function aB(){var l=arguments.length;if(!l)return[];for(var f=fe(l-1),b=arguments[0],R=l;R--;)f[R-1]=arguments[R];return Pi(Ve(b)?kr(b):[b],cr(f,1))}var sB=Ue(function(l,f){return Ft(l)?fs(l,cr(f,1,Ft,!0)):[]}),lB=Ue(function(l,f){var b=gn(f);return Ft(b)&&(b=r),Ft(l)?fs(l,cr(f,1,Ft,!0),De(b,2)):[]}),cB=Ue(function(l,f){var b=gn(f);return Ft(b)&&(b=r),Ft(l)?fs(l,cr(f,1,Ft,!0),r,b):[]});function uB(l,f,b){var R=l==null?0:l.length;return R?(f=b||f===r?1:He(f),vn(l,f<0?0:f,R)):[]}function dB(l,f,b){var R=l==null?0:l.length;return R?(f=b||f===r?1:He(f),f=R-f,vn(l,0,f<0?0:f)):[]}function fB(l,f){return l&&l.length?vc(l,De(f,3),!0,!0):[]}function hB(l,f){return l&&l.length?vc(l,De(f,3),!0):[]}function pB(l,f,b,R){var k=l==null?0:l.length;return k?(b&&typeof b!="number"&&_r(l,f,b)&&(b=0,R=k),a8(l,f,b,R)):[]}function K_(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=b==null?0:He(b);return k<0&&(k=Yt(R+k,0)),Kl(l,De(f,3),k)}function Y_(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=R-1;return b!==r&&(k=He(b),k=b<0?Yt(R+k,0):gr(k,R-1)),Kl(l,De(f,3),k,!0)}function X_(l){var f=l==null?0:l.length;return f?cr(l,1):[]}function vB(l){var f=l==null?0:l.length;return f?cr(l,G):[]}function gB(l,f){var b=l==null?0:l.length;return b?(f=f===r?1:He(f),cr(l,f)):[]}function mB(l){for(var f=-1,b=l==null?0:l.length,R={};++f<b;){var k=l[f];Yn(R,k[0],k[1])}return R}function Z_(l){return l&&l.length?l[0]:r}function bB(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=b==null?0:He(b);return k<0&&(k=Yt(R+k,0)),Ho(l,f,k)}function yB(l){var f=l==null?0:l.length;return f?vn(l,0,-1):[]}var xB=Ue(function(l){var f=Ct(l,Jf);return f.length&&f[0]===l[0]?$f(f):[]}),wB=Ue(function(l){var f=gn(l),b=Ct(l,Jf);return f===gn(b)?f=r:b.pop(),b.length&&b[0]===l[0]?$f(b,De(f,2)):[]}),SB=Ue(function(l){var f=gn(l),b=Ct(l,Jf);return f=typeof f=="function"?f:r,f&&b.pop(),b.length&&b[0]===l[0]?$f(b,r,f):[]});function EB(l,f){return l==null?"":y7.call(l,f)}function gn(l){var f=l==null?0:l.length;return f?l[f-1]:r}function _B(l,f,b){var R=l==null?0:l.length;if(!R)return-1;var k=R;return b!==r&&(k=He(b),k=k<0?Yt(R+k,0):gr(k,R-1)),f===f?n7(l,f,k):Kl(l,PE,k,!0)}function OB(l,f){return l&&l.length?l_(l,He(f)):r}var CB=Ue(J_);function J_(l,f){return l&&l.length&&f&&f.length?Uf(l,f):l}function IB(l,f,b){return l&&l.length&&f&&f.length?Uf(l,f,De(b,2)):l}function RB(l,f,b){return l&&l.length&&f&&f.length?Uf(l,f,r,b):l}var NB=hi(function(l,f){var b=l==null?0:l.length,R=zf(l,f);return d_(l,Ct(f,function(k){return pi(k,b)?+k:k}).sort(w_)),R});function TB(l,f){var b=[];if(!(l&&l.length))return b;var R=-1,k=[],F=l.length;for(f=De(f,3);++R<F;){var ee=l[R];f(ee,R,l)&&(b.push(ee),k.push(R))}return d_(l,k),b}function fh(l){return l==null?l:E7.call(l)}function PB(l,f,b){var R=l==null?0:l.length;return R?(b&&typeof b!="number"&&_r(l,f,b)?(f=0,b=R):(f=f==null?0:He(f),b=b===r?R:He(b)),vn(l,f,b)):[]}function MB(l,f){return pc(l,f)}function kB(l,f,b){return Yf(l,f,De(b,2))}function AB(l,f){var b=l==null?0:l.length;if(b){var R=pc(l,f);if(R<b&&An(l[R],f))return R}return-1}function DB(l,f){return pc(l,f,!0)}function jB(l,f,b){return Yf(l,f,De(b,2),!0)}function qB(l,f){var b=l==null?0:l.length;if(b){var R=pc(l,f,!0)-1;if(An(l[R],f))return R}return-1}function zB(l){return l&&l.length?h_(l):[]}function LB(l,f){return l&&l.length?h_(l,De(f,2)):[]}function BB(l){var f=l==null?0:l.length;return f?vn(l,1,f):[]}function FB(l,f,b){return l&&l.length?(f=b||f===r?1:He(f),vn(l,0,f<0?0:f)):[]}function $B(l,f,b){var R=l==null?0:l.length;return R?(f=b||f===r?1:He(f),f=R-f,vn(l,f<0?0:f,R)):[]}function VB(l,f){return l&&l.length?vc(l,De(f,3),!1,!0):[]}function HB(l,f){return l&&l.length?vc(l,De(f,3)):[]}var WB=Ue(function(l){return Di(cr(l,1,Ft,!0))}),UB=Ue(function(l){var f=gn(l);return Ft(f)&&(f=r),Di(cr(l,1,Ft,!0),De(f,2))}),GB=Ue(function(l){var f=gn(l);return f=typeof f=="function"?f:r,Di(cr(l,1,Ft,!0),r,f)});function KB(l){return l&&l.length?Di(l):[]}function YB(l,f){return l&&l.length?Di(l,De(f,2)):[]}function XB(l,f){return f=typeof f=="function"?f:r,l&&l.length?Di(l,r,f):[]}function hh(l){if(!(l&&l.length))return[];var f=0;return l=Ti(l,function(b){if(Ft(b))return f=Yt(b.length,f),!0}),Tf(f,function(b){return Ct(l,If(b))})}function Q_(l,f){if(!(l&&l.length))return[];var b=hh(l);return f==null?b:Ct(b,function(R){return Xr(f,r,R)})}var ZB=Ue(function(l,f){return Ft(l)?fs(l,f):[]}),JB=Ue(function(l){return Zf(Ti(l,Ft))}),QB=Ue(function(l){var f=gn(l);return Ft(f)&&(f=r),Zf(Ti(l,Ft),De(f,2))}),eF=Ue(function(l){var f=gn(l);return f=typeof f=="function"?f:r,Zf(Ti(l,Ft),r,f)}),tF=Ue(hh);function rF(l,f){return m_(l||[],f||[],ds)}function nF(l,f){return m_(l||[],f||[],vs)}var iF=Ue(function(l){var f=l.length,b=f>1?l[f-1]:r;return b=typeof b=="function"?(l.pop(),b):r,Q_(l,b)});function eO(l){var f=L(l);return f.__chain__=!0,f}function oF(l,f){return f(l),l}function _c(l,f){return f(l)}var aF=hi(function(l){var f=l.length,b=f?l[0]:0,R=this.__wrapped__,k=function(F){return zf(F,l)};return f>1||this.__actions__.length||!(R instanceof Je)||!pi(b)?this.thru(k):(R=R.slice(b,+b+(f?1:0)),R.__actions__.push({func:_c,args:[k],thisArg:r}),new hn(R,this.__chain__).thru(function(F){return f&&!F.length&&F.push(r),F}))});function sF(){return eO(this)}function lF(){return new hn(this.value(),this.__chain__)}function cF(){this.__values__===r&&(this.__values__=pO(this.value()));var l=this.__index__>=this.__values__.length,f=l?r:this.__values__[this.__index__++];return{done:l,value:f}}function uF(){return this}function dF(l){for(var f,b=this;b instanceof cc;){var R=G_(b);R.__index__=0,R.__values__=r,f?k.__wrapped__=R:f=R;var k=R;b=b.__wrapped__}return k.__wrapped__=l,f}function fF(){var l=this.__wrapped__;if(l instanceof Je){var f=l;return this.__actions__.length&&(f=new Je(this)),f=f.reverse(),f.__actions__.push({func:_c,args:[fh],thisArg:r}),new hn(f,this.__chain__)}return this.thru(fh)}function hF(){return g_(this.__wrapped__,this.__actions__)}var pF=gc(function(l,f,b){lt.call(l,b)?++l[b]:Yn(l,b,1)});function vF(l,f,b){var R=Ve(l)?NE:o8;return b&&_r(l,f,b)&&(f=r),R(l,De(f,3))}function gF(l,f){var b=Ve(l)?Ti:QE;return b(l,De(f,3))}var mF=I_(K_),bF=I_(Y_);function yF(l,f){return cr(Oc(l,f),1)}function xF(l,f){return cr(Oc(l,f),G)}function wF(l,f,b){return b=b===r?1:He(b),cr(Oc(l,f),b)}function tO(l,f){var b=Ve(l)?Zr:Ai;return b(l,De(f,3))}function rO(l,f){var b=Ve(l)?BL:JE;return b(l,De(f,3))}var SF=gc(function(l,f,b){lt.call(l,b)?l[b].push(f):Yn(l,b,[f])});function EF(l,f,b,R){l=Ar(l)?l:ra(l),b=b&&!R?He(b):0;var k=l.length;return b<0&&(b=Yt(k+b,0)),Tc(l)?b<=k&&l.indexOf(f,b)>-1:!!k&&Ho(l,f,b)>-1}var _F=Ue(function(l,f,b){var R=-1,k=typeof f=="function",F=Ar(l)?fe(l.length):[];return Ai(l,function(ee){F[++R]=k?Xr(f,ee,b):hs(ee,f,b)}),F}),OF=gc(function(l,f,b){Yn(l,b,f)});function Oc(l,f){var b=Ve(l)?Ct:o_;return b(l,De(f,3))}function CF(l,f,b,R){return l==null?[]:(Ve(f)||(f=f==null?[]:[f]),b=R?r:b,Ve(b)||(b=b==null?[]:[b]),c_(l,f,b))}var IF=gc(function(l,f,b){l[b?0:1].push(f)},function(){return[[],[]]});function RF(l,f,b){var R=Ve(l)?Of:kE,k=arguments.length<3;return R(l,De(f,4),b,k,Ai)}function NF(l,f,b){var R=Ve(l)?FL:kE,k=arguments.length<3;return R(l,De(f,4),b,k,JE)}function TF(l,f){var b=Ve(l)?Ti:QE;return b(l,Rc(De(f,3)))}function PF(l){var f=Ve(l)?KE:E8;return f(l)}function MF(l,f,b){(b?_r(l,f,b):f===r)?f=1:f=He(f);var R=Ve(l)?e8:_8;return R(l,f)}function kF(l){var f=Ve(l)?t8:C8;return f(l)}function AF(l){if(l==null)return 0;if(Ar(l))return Tc(l)?Uo(l):l.length;var f=mr(l);return f==he||f==Te?l.size:Hf(l).length}function DF(l,f,b){var R=Ve(l)?Cf:I8;return b&&_r(l,f,b)&&(f=r),R(l,De(f,3))}var jF=Ue(function(l,f){if(l==null)return[];var b=f.length;return b>1&&_r(l,f[0],f[1])?f=[]:b>2&&_r(f[0],f[1],f[2])&&(f=[f[0]]),c_(l,cr(f,1),[])}),Cc=g7||function(){return lr.Date.now()};function qF(l,f){if(typeof f!="function")throw new fn(a);return l=He(l),function(){if(--l<1)return f.apply(this,arguments)}}function nO(l,f,b){return f=b?r:f,f=l&&f==null?l.length:f,fi(l,T,r,r,r,r,f)}function iO(l,f){var b;if(typeof f!="function")throw new fn(a);return l=He(l),function(){return--l>0&&(b=f.apply(this,arguments)),l<=1&&(f=r),b}}var ph=Ue(function(l,f,b){var R=w;if(b.length){var k=Mi(b,ea(ph));R|=I}return fi(l,R,f,b,k)}),oO=Ue(function(l,f,b){var R=w|x;if(b.length){var k=Mi(b,ea(oO));R|=I}return fi(f,R,l,b,k)});function aO(l,f,b){f=b?r:f;var R=fi(l,S,r,r,r,r,r,f);return R.placeholder=aO.placeholder,R}function sO(l,f,b){f=b?r:f;var R=fi(l,E,r,r,r,r,r,f);return R.placeholder=sO.placeholder,R}function lO(l,f,b){var R,k,F,ee,oe,ce,me=0,be=!1,we=!1,_e=!0;if(typeof l!="function")throw new fn(a);f=mn(f)||0,Nt(b)&&(be=!!b.leading,we="maxWait"in b,F=we?Yt(mn(b.maxWait)||0,f):F,_e="trailing"in b?!!b.trailing:_e);function Pe($t){var Dn=R,mi=k;return R=k=r,me=$t,ee=l.apply(mi,Dn),ee}function qe($t){return me=$t,oe=bs(Ke,f),be?Pe($t):ee}function We($t){var Dn=$t-ce,mi=$t-me,RO=f-Dn;return we?gr(RO,F-mi):RO}function Ae($t){var Dn=$t-ce,mi=$t-me;return ce===r||Dn>=f||Dn<0||we&&mi>=F}function Ke(){var $t=Cc();if(Ae($t))return Qe($t);oe=bs(Ke,We($t))}function Qe($t){return oe=r,_e&&R?Pe($t):(R=k=r,ee)}function tn(){oe!==r&&b_(oe),me=0,R=ce=k=oe=r}function Or(){return oe===r?ee:Qe(Cc())}function rn(){var $t=Cc(),Dn=Ae($t);if(R=arguments,k=this,ce=$t,Dn){if(oe===r)return qe(ce);if(we)return b_(oe),oe=bs(Ke,f),Pe(ce)}return oe===r&&(oe=bs(Ke,f)),ee}return rn.cancel=tn,rn.flush=Or,rn}var zF=Ue(function(l,f){return ZE(l,1,f)}),LF=Ue(function(l,f,b){return ZE(l,mn(f)||0,b)});function BF(l){return fi(l,z)}function Ic(l,f){if(typeof l!="function"||f!=null&&typeof f!="function")throw new fn(a);var b=function(){var R=arguments,k=f?f.apply(this,R):R[0],F=b.cache;if(F.has(k))return F.get(k);var ee=l.apply(this,R);return b.cache=F.set(k,ee)||F,ee};return b.cache=new(Ic.Cache||di),b}Ic.Cache=di;function Rc(l){if(typeof l!="function")throw new fn(a);return function(){var f=arguments;switch(f.length){case 0:return!l.call(this);case 1:return!l.call(this,f[0]);case 2:return!l.call(this,f[0],f[1]);case 3:return!l.call(this,f[0],f[1],f[2])}return!l.apply(this,f)}}function FF(l){return iO(2,l)}var $F=R8(function(l,f){f=f.length==1&&Ve(f[0])?Ct(f[0],Jr(De())):Ct(cr(f,1),Jr(De()));var b=f.length;return Ue(function(R){for(var k=-1,F=gr(R.length,b);++k<F;)R[k]=f[k].call(this,R[k]);return Xr(l,this,R)})}),vh=Ue(function(l,f){var b=Mi(f,ea(vh));return fi(l,I,r,f,b)}),cO=Ue(function(l,f){var b=Mi(f,ea(cO));return fi(l,N,r,f,b)}),VF=hi(function(l,f){return fi(l,M,r,r,r,f)});function HF(l,f){if(typeof l!="function")throw new fn(a);return f=f===r?f:He(f),Ue(l,f)}function WF(l,f){if(typeof l!="function")throw new fn(a);return f=f==null?0:Yt(He(f),0),Ue(function(b){var R=b[f],k=qi(b,0,f);return R&&Pi(k,R),Xr(l,this,k)})}function UF(l,f,b){var R=!0,k=!0;if(typeof l!="function")throw new fn(a);return Nt(b)&&(R="leading"in b?!!b.leading:R,k="trailing"in b?!!b.trailing:k),lO(l,f,{leading:R,maxWait:f,trailing:k})}function GF(l){return nO(l,1)}function KF(l,f){return vh(Qf(f),l)}function YF(){if(!arguments.length)return[];var l=arguments[0];return Ve(l)?l:[l]}function XF(l){return pn(l,y)}function ZF(l,f){return f=typeof f=="function"?f:r,pn(l,y,f)}function JF(l){return pn(l,p|y)}function QF(l,f){return f=typeof f=="function"?f:r,pn(l,p|y,f)}function e9(l,f){return f==null||XE(l,f,rr(f))}function An(l,f){return l===f||l!==l&&f!==f}var t9=xc(Ff),r9=xc(function(l,f){return l>=f}),po=r_((function(){return arguments})())?r_:function(l){return Dt(l)&&lt.call(l,"callee")&&!$E.call(l,"callee")},Ve=fe.isArray,n9=EE?Jr(EE):d8;function Ar(l){return l!=null&&Nc(l.length)&&!vi(l)}function Ft(l){return Dt(l)&&Ar(l)}function i9(l){return l===!0||l===!1||Dt(l)&&Er(l)==ie}var zi=b7||Ih,o9=_E?Jr(_E):f8;function a9(l){return Dt(l)&&l.nodeType===1&&!ys(l)}function s9(l){if(l==null)return!0;if(Ar(l)&&(Ve(l)||typeof l=="string"||typeof l.splice=="function"||zi(l)||ta(l)||po(l)))return!l.length;var f=mr(l);if(f==he||f==Te)return!l.size;if(ms(l))return!Hf(l).length;for(var b in l)if(lt.call(l,b))return!1;return!0}function l9(l,f){return ps(l,f)}function c9(l,f,b){b=typeof b=="function"?b:r;var R=b?b(l,f):r;return R===r?ps(l,f,r,b):!!R}function gh(l){if(!Dt(l))return!1;var f=Er(l);return f==Z||f==pe||typeof l.message=="string"&&typeof l.name=="string"&&!ys(l)}function u9(l){return typeof l=="number"&&HE(l)}function vi(l){if(!Nt(l))return!1;var f=Er(l);return f==J||f==ae||f==Y||f==Ee}function uO(l){return typeof l=="number"&&l==He(l)}function Nc(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=re}function Nt(l){var f=typeof l;return l!=null&&(f=="object"||f=="function")}function Dt(l){return l!=null&&typeof l=="object"}var dO=OE?Jr(OE):p8;function d9(l,f){return l===f||Vf(l,f,ah(f))}function f9(l,f,b){return b=typeof b=="function"?b:r,Vf(l,f,ah(f),b)}function h9(l){return fO(l)&&l!=+l}function p9(l){if(Z8(l))throw new Be(o);return n_(l)}function v9(l){return l===null}function g9(l){return l==null}function fO(l){return typeof l=="number"||Dt(l)&&Er(l)==ue}function ys(l){if(!Dt(l)||Er(l)!=le)return!1;var f=rc(l);if(f===null)return!0;var b=lt.call(f,"constructor")&&f.constructor;return typeof b=="function"&&b instanceof b&&Jl.call(b)==f7}var mh=CE?Jr(CE):v8;function m9(l){return uO(l)&&l>=-re&&l<=re}var hO=IE?Jr(IE):g8;function Tc(l){return typeof l=="string"||!Ve(l)&&Dt(l)&&Er(l)==Me}function en(l){return typeof l=="symbol"||Dt(l)&&Er(l)==Xe}var ta=RE?Jr(RE):m8;function b9(l){return l===r}function y9(l){return Dt(l)&&mr(l)==Fe}function x9(l){return Dt(l)&&Er(l)==Le}var w9=xc(Wf),S9=xc(function(l,f){return l<=f});function pO(l){if(!l)return[];if(Ar(l))return Tc(l)?Pn(l):kr(l);if(as&&l[as])return e7(l[as]());var f=mr(l),b=f==he?Mf:f==Te?Yl:ra;return b(l)}function gi(l){if(!l)return l===0?l:0;if(l=mn(l),l===G||l===-G){var f=l<0?-1:1;return f*P}return l===l?l:0}function He(l){var f=gi(l),b=f%1;return f===f?b?f-b:f:0}function vO(l){return l?co(He(l),0,X):0}function mn(l){if(typeof l=="number")return l;if(en(l))return B;if(Nt(l)){var f=typeof l.valueOf=="function"?l.valueOf():l;l=Nt(f)?f+"":f}if(typeof l!="string")return l===0?l:+l;l=AE(l);var b=$e.test(l);return b||Ht.test(l)?qL(l.slice(2),b?2:8):ke.test(l)?B:+l}function gO(l){return Zn(l,Dr(l))}function E9(l){return l?co(He(l),-re,re):l===0?l:0}function ct(l){return l==null?"":Qr(l)}var _9=Jo(function(l,f){if(ms(f)||Ar(f)){Zn(f,rr(f),l);return}for(var b in f)lt.call(f,b)&&ds(l,b,f[b])}),mO=Jo(function(l,f){Zn(f,Dr(f),l)}),bO=Jo(function(l,f,b,R){Zn(f,Dr(f),l,R)}),bh=Jo(function(l,f,b,R){Zn(f,rr(f),l,R)}),O9=hi(zf);function C9(l,f){var b=Zo(l);return f==null?b:YE(b,f)}var I9=Ue(function(l,f){l=mt(l);var b=-1,R=f.length,k=R>2?f[2]:r;for(k&&_r(f[0],f[1],k)&&(R=1);++b<R;)for(var F=f[b],ee=Dr(F),oe=-1,ce=ee.length;++oe<ce;){var me=ee[oe],be=l[me];(be===r||An(be,Ko[me])&&!lt.call(l,me))&&(l[me]=F[me])}return l}),R9=Ue(function(l){return l.push(r,A_),Xr(yO,r,l)});function N9(l,f){return TE(l,De(f,3),Xn)}function T9(l,f){return TE(l,De(f,3),Bf)}function P9(l,f){return l==null?l:Lf(l,De(f,3),Dr)}function M9(l,f){return l==null?l:e_(l,De(f,3),Dr)}function k9(l,f){return l&&Xn(l,De(f,3))}function A9(l,f){return l&&Bf(l,De(f,3))}function D9(l){return l==null?[]:fc(l,rr(l))}function j9(l){return l==null?[]:fc(l,Dr(l))}function yh(l,f,b){var R=l==null?r:uo(l,f);return R===r?b:R}function q9(l,f){return l!=null&&q_(l,f,s8)}function xh(l,f){return l!=null&&q_(l,f,l8)}var z9=N_(function(l,f,b){f!=null&&typeof f.toString!="function"&&(f=Ql.call(f)),l[f]=b},Sh(jr)),L9=N_(function(l,f,b){f!=null&&typeof f.toString!="function"&&(f=Ql.call(f)),lt.call(l,f)?l[f].push(b):l[f]=[b]},De),B9=Ue(hs);function rr(l){return Ar(l)?GE(l):Hf(l)}function Dr(l){return Ar(l)?GE(l,!0):b8(l)}function F9(l,f){var b={};return f=De(f,3),Xn(l,function(R,k,F){Yn(b,f(R,k,F),R)}),b}function $9(l,f){var b={};return f=De(f,3),Xn(l,function(R,k,F){Yn(b,k,f(R,k,F))}),b}var V9=Jo(function(l,f,b){hc(l,f,b)}),yO=Jo(function(l,f,b,R){hc(l,f,b,R)}),H9=hi(function(l,f){var b={};if(l==null)return b;var R=!1;f=Ct(f,function(F){return F=ji(F,l),R||(R=F.length>1),F}),Zn(l,ih(l),b),R&&(b=pn(b,p|v|y,L8));for(var k=f.length;k--;)Xf(b,f[k]);return b});function W9(l,f){return xO(l,Rc(De(f)))}var U9=hi(function(l,f){return l==null?{}:x8(l,f)});function xO(l,f){if(l==null)return{};var b=Ct(ih(l),function(R){return[R]});return f=De(f),u_(l,b,function(R,k){return f(R,k[0])})}function G9(l,f,b){f=ji(f,l);var R=-1,k=f.length;for(k||(k=1,l=r);++R<k;){var F=l==null?r:l[kn(f[R])];F===r&&(R=k,F=b),l=vi(F)?F.call(l):F}return l}function K9(l,f,b){return l==null?l:vs(l,f,b)}function Y9(l,f,b,R){return R=typeof R=="function"?R:r,l==null?l:vs(l,f,b,R)}var wO=M_(rr),SO=M_(Dr);function X9(l,f,b){var R=Ve(l),k=R||zi(l)||ta(l);if(f=De(f,4),b==null){var F=l&&l.constructor;k?b=R?new F:[]:Nt(l)?b=vi(F)?Zo(rc(l)):{}:b={}}return(k?Zr:Xn)(l,function(ee,oe,ce){return f(b,ee,oe,ce)}),b}function Z9(l,f){return l==null?!0:Xf(l,f)}function J9(l,f,b){return l==null?l:v_(l,f,Qf(b))}function Q9(l,f,b,R){return R=typeof R=="function"?R:r,l==null?l:v_(l,f,Qf(b),R)}function ra(l){return l==null?[]:Pf(l,rr(l))}function e$(l){return l==null?[]:Pf(l,Dr(l))}function t$(l,f,b){return b===r&&(b=f,f=r),b!==r&&(b=mn(b),b=b===b?b:0),f!==r&&(f=mn(f),f=f===f?f:0),co(mn(l),f,b)}function r$(l,f,b){return f=gi(f),b===r?(b=f,f=0):b=gi(b),l=mn(l),c8(l,f,b)}function n$(l,f,b){if(b&&typeof b!="boolean"&&_r(l,f,b)&&(f=b=r),b===r&&(typeof f=="boolean"?(b=f,f=r):typeof l=="boolean"&&(b=l,l=r)),l===r&&f===r?(l=0,f=1):(l=gi(l),f===r?(f=l,l=0):f=gi(f)),l>f){var R=l;l=f,f=R}if(b||l%1||f%1){var k=WE();return gr(l+k*(f-l+jL("1e-"+((k+"").length-1))),f)}return Gf(l,f)}var i$=Qo(function(l,f,b){return f=f.toLowerCase(),l+(b?EO(f):f)});function EO(l){return wh(ct(l).toLowerCase())}function _O(l){return l=ct(l),l&&l.replace(Sr,YL).replace(CL,"")}function o$(l,f,b){l=ct(l),f=Qr(f);var R=l.length;b=b===r?R:co(He(b),0,R);var k=b;return b-=f.length,b>=0&&l.slice(b,k)==f}function a$(l){return l=ct(l),l&&kt.test(l)?l.replace(Lt,XL):l}function s$(l){return l=ct(l),l&&yr.test(l)?l.replace(vr,"\\$&"):l}var l$=Qo(function(l,f,b){return l+(b?"-":"")+f.toLowerCase()}),c$=Qo(function(l,f,b){return l+(b?" ":"")+f.toLowerCase()}),u$=C_("toLowerCase");function d$(l,f,b){l=ct(l),f=He(f);var R=f?Uo(l):0;if(!f||R>=f)return l;var k=(f-R)/2;return yc(ac(k),b)+l+yc(oc(k),b)}function f$(l,f,b){l=ct(l),f=He(f);var R=f?Uo(l):0;return f&&R<f?l+yc(f-R,b):l}function h$(l,f,b){l=ct(l),f=He(f);var R=f?Uo(l):0;return f&&R<f?yc(f-R,b)+l:l}function p$(l,f,b){return b||f==null?f=0:f&&(f=+f),S7(ct(l).replace(sr,""),f||0)}function v$(l,f,b){return(b?_r(l,f,b):f===r)?f=1:f=He(f),Kf(ct(l),f)}function g$(){var l=arguments,f=ct(l[0]);return l.length<3?f:f.replace(l[1],l[2])}var m$=Qo(function(l,f,b){return l+(b?"_":"")+f.toLowerCase()});function b$(l,f,b){return b&&typeof b!="number"&&_r(l,f,b)&&(f=b=r),b=b===r?X:b>>>0,b?(l=ct(l),l&&(typeof f=="string"||f!=null&&!mh(f))&&(f=Qr(f),!f&&Wo(l))?qi(Pn(l),0,b):l.split(f,b)):[]}var y$=Qo(function(l,f,b){return l+(b?" ":"")+wh(f)});function x$(l,f,b){return l=ct(l),b=b==null?0:co(He(b),0,l.length),f=Qr(f),l.slice(b,b+f.length)==f}function w$(l,f,b){var R=L.templateSettings;b&&_r(l,f,b)&&(f=r),l=ct(l),f=bh({},f,R,k_);var k=bh({},f.imports,R.imports,k_),F=rr(k),ee=Pf(k,F);Zr(F,function(Ae){if(Kn.test(Ae))throw new Be(c)});var oe,ce,me=0,be=f.interpolate||tr,we="__p += '",_e=kf((f.escape||tr).source+"|"+be.source+"|"+(be===Mr?Bo:tr).source+"|"+(f.evaluate||tr).source+"|$","g"),Pe="//# sourceURL="+(lt.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++PL+"]")+`
73
+ `;l.replace(_e,function(Ae,Ke,Qe,tn,Or,rn){return Qe||(Qe=tn),we+=l.slice(me,rn).replace(un,ZL),Ke&&(oe=!0,we+=`' +
74
+ __e(`+Ke+`) +
75
+ '`),Or&&(ce=!0,we+=`';
76
+ `+Or+`;
77
+ __p += '`),Qe&&(we+=`' +
78
+ ((__t = (`+Qe+`)) == null ? '' : __t) +
79
+ '`),me=rn+Ae.length,Ae}),we+=`';
80
+ `;var qe=lt.call(f,"variable")&&f.variable;if(!qe)we=`with (obj) {
81
+ `+we+`
82
+ }
83
+ `;else if(Kn.test(qe))throw new Be(s);we=(ce?we.replace(Nn,""):we).replace(no,"$1").replace(zt,"$1;"),we="function("+(qe||"obj")+`) {
84
+ `+(qe?"":`obj || (obj = {});
85
+ `)+"var __t, __p = ''"+(oe?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join;
86
+ function print() { __p += __j.call(arguments, '') }
87
+ `:`;
88
+ `)+we+`return __p
89
+ }`;var We=CO(function(){return ot(F,Pe+"return "+we).apply(r,ee)});if(We.source=we,gh(We))throw We;return We}function S$(l){return ct(l).toLowerCase()}function E$(l){return ct(l).toUpperCase()}function _$(l,f,b){if(l=ct(l),l&&(b||f===r))return AE(l);if(!l||!(f=Qr(f)))return l;var R=Pn(l),k=Pn(f),F=DE(R,k),ee=jE(R,k)+1;return qi(R,F,ee).join("")}function O$(l,f,b){if(l=ct(l),l&&(b||f===r))return l.slice(0,zE(l)+1);if(!l||!(f=Qr(f)))return l;var R=Pn(l),k=jE(R,Pn(f))+1;return qi(R,0,k).join("")}function C$(l,f,b){if(l=ct(l),l&&(b||f===r))return l.replace(sr,"");if(!l||!(f=Qr(f)))return l;var R=Pn(l),k=DE(R,Pn(f));return qi(R,k).join("")}function I$(l,f){var b=j,R=W;if(Nt(f)){var k="separator"in f?f.separator:k;b="length"in f?He(f.length):b,R="omission"in f?Qr(f.omission):R}l=ct(l);var F=l.length;if(Wo(l)){var ee=Pn(l);F=ee.length}if(b>=F)return l;var oe=b-Uo(R);if(oe<1)return R;var ce=ee?qi(ee,0,oe).join(""):l.slice(0,oe);if(k===r)return ce+R;if(ee&&(oe+=ce.length-oe),mh(k)){if(l.slice(oe).search(k)){var me,be=ce;for(k.global||(k=kf(k.source,ct(Fo.exec(k))+"g")),k.lastIndex=0;me=k.exec(be);)var we=me.index;ce=ce.slice(0,we===r?oe:we)}}else if(l.indexOf(Qr(k),oe)!=oe){var _e=ce.lastIndexOf(k);_e>-1&&(ce=ce.slice(0,_e))}return ce+R}function R$(l){return l=ct(l),l&&fr.test(l)?l.replace(Mt,i7):l}var N$=Qo(function(l,f,b){return l+(b?" ":"")+f.toUpperCase()}),wh=C_("toUpperCase");function OO(l,f,b){return l=ct(l),f=b?r:f,f===r?QL(l)?s7(l):HL(l):l.match(f)||[]}var CO=Ue(function(l,f){try{return Xr(l,r,f)}catch(b){return gh(b)?b:new Be(b)}}),T$=hi(function(l,f){return Zr(f,function(b){b=kn(b),Yn(l,b,ph(l[b],l))}),l});function P$(l){var f=l==null?0:l.length,b=De();return l=f?Ct(l,function(R){if(typeof R[1]!="function")throw new fn(a);return[b(R[0]),R[1]]}):[],Ue(function(R){for(var k=-1;++k<f;){var F=l[k];if(Xr(F[0],this,R))return Xr(F[1],this,R)}})}function M$(l){return i8(pn(l,p))}function Sh(l){return function(){return l}}function k$(l,f){return l==null||l!==l?f:l}var A$=R_(),D$=R_(!0);function jr(l){return l}function Eh(l){return i_(typeof l=="function"?l:pn(l,p))}function j$(l){return a_(pn(l,p))}function q$(l,f){return s_(l,pn(f,p))}var z$=Ue(function(l,f){return function(b){return hs(b,l,f)}}),L$=Ue(function(l,f){return function(b){return hs(l,b,f)}});function _h(l,f,b){var R=rr(f),k=fc(f,R);b==null&&!(Nt(f)&&(k.length||!R.length))&&(b=f,f=l,l=this,k=fc(f,rr(f)));var F=!(Nt(b)&&"chain"in b)||!!b.chain,ee=vi(l);return Zr(k,function(oe){var ce=f[oe];l[oe]=ce,ee&&(l.prototype[oe]=function(){var me=this.__chain__;if(F||me){var be=l(this.__wrapped__),we=be.__actions__=kr(this.__actions__);return we.push({func:ce,args:arguments,thisArg:l}),be.__chain__=me,be}return ce.apply(l,Pi([this.value()],arguments))})}),l}function B$(){return lr._===this&&(lr._=h7),this}function Oh(){}function F$(l){return l=He(l),Ue(function(f){return l_(f,l)})}var $$=th(Ct),V$=th(NE),H$=th(Cf);function IO(l){return lh(l)?If(kn(l)):w8(l)}function W$(l){return function(f){return l==null?r:uo(l,f)}}var U$=T_(),G$=T_(!0);function Ch(){return[]}function Ih(){return!1}function K$(){return{}}function Y$(){return""}function X$(){return!0}function Z$(l,f){if(l=He(l),l<1||l>re)return[];var b=X,R=gr(l,X);f=De(f),l-=X;for(var k=Tf(R,f);++b<l;)f(b);return k}function J$(l){return Ve(l)?Ct(l,kn):en(l)?[l]:kr(U_(ct(l)))}function Q$(l){var f=++d7;return ct(l)+f}var eV=bc(function(l,f){return l+f},0),tV=rh("ceil"),rV=bc(function(l,f){return l/f},1),nV=rh("floor");function iV(l){return l&&l.length?dc(l,jr,Ff):r}function oV(l,f){return l&&l.length?dc(l,De(f,2),Ff):r}function aV(l){return ME(l,jr)}function sV(l,f){return ME(l,De(f,2))}function lV(l){return l&&l.length?dc(l,jr,Wf):r}function cV(l,f){return l&&l.length?dc(l,De(f,2),Wf):r}var uV=bc(function(l,f){return l*f},1),dV=rh("round"),fV=bc(function(l,f){return l-f},0);function hV(l){return l&&l.length?Nf(l,jr):0}function pV(l,f){return l&&l.length?Nf(l,De(f,2)):0}return L.after=qF,L.ary=nO,L.assign=_9,L.assignIn=mO,L.assignInWith=bO,L.assignWith=bh,L.at=O9,L.before=iO,L.bind=ph,L.bindAll=T$,L.bindKey=oO,L.castArray=YF,L.chain=eO,L.chunk=iB,L.compact=oB,L.concat=aB,L.cond=P$,L.conforms=M$,L.constant=Sh,L.countBy=pF,L.create=C9,L.curry=aO,L.curryRight=sO,L.debounce=lO,L.defaults=I9,L.defaultsDeep=R9,L.defer=zF,L.delay=LF,L.difference=sB,L.differenceBy=lB,L.differenceWith=cB,L.drop=uB,L.dropRight=dB,L.dropRightWhile=fB,L.dropWhile=hB,L.fill=pB,L.filter=gF,L.flatMap=yF,L.flatMapDeep=xF,L.flatMapDepth=wF,L.flatten=X_,L.flattenDeep=vB,L.flattenDepth=gB,L.flip=BF,L.flow=A$,L.flowRight=D$,L.fromPairs=mB,L.functions=D9,L.functionsIn=j9,L.groupBy=SF,L.initial=yB,L.intersection=xB,L.intersectionBy=wB,L.intersectionWith=SB,L.invert=z9,L.invertBy=L9,L.invokeMap=_F,L.iteratee=Eh,L.keyBy=OF,L.keys=rr,L.keysIn=Dr,L.map=Oc,L.mapKeys=F9,L.mapValues=$9,L.matches=j$,L.matchesProperty=q$,L.memoize=Ic,L.merge=V9,L.mergeWith=yO,L.method=z$,L.methodOf=L$,L.mixin=_h,L.negate=Rc,L.nthArg=F$,L.omit=H9,L.omitBy=W9,L.once=FF,L.orderBy=CF,L.over=$$,L.overArgs=$F,L.overEvery=V$,L.overSome=H$,L.partial=vh,L.partialRight=cO,L.partition=IF,L.pick=U9,L.pickBy=xO,L.property=IO,L.propertyOf=W$,L.pull=CB,L.pullAll=J_,L.pullAllBy=IB,L.pullAllWith=RB,L.pullAt=NB,L.range=U$,L.rangeRight=G$,L.rearg=VF,L.reject=TF,L.remove=TB,L.rest=HF,L.reverse=fh,L.sampleSize=MF,L.set=K9,L.setWith=Y9,L.shuffle=kF,L.slice=PB,L.sortBy=jF,L.sortedUniq=zB,L.sortedUniqBy=LB,L.split=b$,L.spread=WF,L.tail=BB,L.take=FB,L.takeRight=$B,L.takeRightWhile=VB,L.takeWhile=HB,L.tap=oF,L.throttle=UF,L.thru=_c,L.toArray=pO,L.toPairs=wO,L.toPairsIn=SO,L.toPath=J$,L.toPlainObject=gO,L.transform=X9,L.unary=GF,L.union=WB,L.unionBy=UB,L.unionWith=GB,L.uniq=KB,L.uniqBy=YB,L.uniqWith=XB,L.unset=Z9,L.unzip=hh,L.unzipWith=Q_,L.update=J9,L.updateWith=Q9,L.values=ra,L.valuesIn=e$,L.without=ZB,L.words=OO,L.wrap=KF,L.xor=JB,L.xorBy=QB,L.xorWith=eF,L.zip=tF,L.zipObject=rF,L.zipObjectDeep=nF,L.zipWith=iF,L.entries=wO,L.entriesIn=SO,L.extend=mO,L.extendWith=bO,_h(L,L),L.add=eV,L.attempt=CO,L.camelCase=i$,L.capitalize=EO,L.ceil=tV,L.clamp=t$,L.clone=XF,L.cloneDeep=JF,L.cloneDeepWith=QF,L.cloneWith=ZF,L.conformsTo=e9,L.deburr=_O,L.defaultTo=k$,L.divide=rV,L.endsWith=o$,L.eq=An,L.escape=a$,L.escapeRegExp=s$,L.every=vF,L.find=mF,L.findIndex=K_,L.findKey=N9,L.findLast=bF,L.findLastIndex=Y_,L.findLastKey=T9,L.floor=nV,L.forEach=tO,L.forEachRight=rO,L.forIn=P9,L.forInRight=M9,L.forOwn=k9,L.forOwnRight=A9,L.get=yh,L.gt=t9,L.gte=r9,L.has=q9,L.hasIn=xh,L.head=Z_,L.identity=jr,L.includes=EF,L.indexOf=bB,L.inRange=r$,L.invoke=B9,L.isArguments=po,L.isArray=Ve,L.isArrayBuffer=n9,L.isArrayLike=Ar,L.isArrayLikeObject=Ft,L.isBoolean=i9,L.isBuffer=zi,L.isDate=o9,L.isElement=a9,L.isEmpty=s9,L.isEqual=l9,L.isEqualWith=c9,L.isError=gh,L.isFinite=u9,L.isFunction=vi,L.isInteger=uO,L.isLength=Nc,L.isMap=dO,L.isMatch=d9,L.isMatchWith=f9,L.isNaN=h9,L.isNative=p9,L.isNil=g9,L.isNull=v9,L.isNumber=fO,L.isObject=Nt,L.isObjectLike=Dt,L.isPlainObject=ys,L.isRegExp=mh,L.isSafeInteger=m9,L.isSet=hO,L.isString=Tc,L.isSymbol=en,L.isTypedArray=ta,L.isUndefined=b9,L.isWeakMap=y9,L.isWeakSet=x9,L.join=EB,L.kebabCase=l$,L.last=gn,L.lastIndexOf=_B,L.lowerCase=c$,L.lowerFirst=u$,L.lt=w9,L.lte=S9,L.max=iV,L.maxBy=oV,L.mean=aV,L.meanBy=sV,L.min=lV,L.minBy=cV,L.stubArray=Ch,L.stubFalse=Ih,L.stubObject=K$,L.stubString=Y$,L.stubTrue=X$,L.multiply=uV,L.nth=OB,L.noConflict=B$,L.noop=Oh,L.now=Cc,L.pad=d$,L.padEnd=f$,L.padStart=h$,L.parseInt=p$,L.random=n$,L.reduce=RF,L.reduceRight=NF,L.repeat=v$,L.replace=g$,L.result=G9,L.round=dV,L.runInContext=se,L.sample=PF,L.size=AF,L.snakeCase=m$,L.some=DF,L.sortedIndex=MB,L.sortedIndexBy=kB,L.sortedIndexOf=AB,L.sortedLastIndex=DB,L.sortedLastIndexBy=jB,L.sortedLastIndexOf=qB,L.startCase=y$,L.startsWith=x$,L.subtract=fV,L.sum=hV,L.sumBy=pV,L.template=w$,L.times=Z$,L.toFinite=gi,L.toInteger=He,L.toLength=vO,L.toLower=S$,L.toNumber=mn,L.toSafeInteger=E9,L.toString=ct,L.toUpper=E$,L.trim=_$,L.trimEnd=O$,L.trimStart=C$,L.truncate=I$,L.unescape=R$,L.uniqueId=Q$,L.upperCase=N$,L.upperFirst=wh,L.each=tO,L.eachRight=rO,L.first=Z_,_h(L,(function(){var l={};return Xn(L,function(f,b){lt.call(L.prototype,b)||(l[b]=f)}),l})(),{chain:!1}),L.VERSION=n,Zr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(l){L[l].placeholder=L}),Zr(["drop","take"],function(l,f){Je.prototype[l]=function(b){b=b===r?1:Yt(He(b),0);var R=this.__filtered__&&!f?new Je(this):this.clone();return R.__filtered__?R.__takeCount__=gr(b,R.__takeCount__):R.__views__.push({size:gr(b,X),type:l+(R.__dir__<0?"Right":"")}),R},Je.prototype[l+"Right"]=function(b){return this.reverse()[l](b).reverse()}}),Zr(["filter","map","takeWhile"],function(l,f){var b=f+1,R=b==K||b==te;Je.prototype[l]=function(k){var F=this.clone();return F.__iteratees__.push({iteratee:De(k,3),type:b}),F.__filtered__=F.__filtered__||R,F}}),Zr(["head","last"],function(l,f){var b="take"+(f?"Right":"");Je.prototype[l]=function(){return this[b](1).value()[0]}}),Zr(["initial","tail"],function(l,f){var b="drop"+(f?"":"Right");Je.prototype[l]=function(){return this.__filtered__?new Je(this):this[b](1)}}),Je.prototype.compact=function(){return this.filter(jr)},Je.prototype.find=function(l){return this.filter(l).head()},Je.prototype.findLast=function(l){return this.reverse().find(l)},Je.prototype.invokeMap=Ue(function(l,f){return typeof l=="function"?new Je(this):this.map(function(b){return hs(b,l,f)})}),Je.prototype.reject=function(l){return this.filter(Rc(De(l)))},Je.prototype.slice=function(l,f){l=He(l);var b=this;return b.__filtered__&&(l>0||f<0)?new Je(b):(l<0?b=b.takeRight(-l):l&&(b=b.drop(l)),f!==r&&(f=He(f),b=f<0?b.dropRight(-f):b.take(f-l)),b)},Je.prototype.takeRightWhile=function(l){return this.reverse().takeWhile(l).reverse()},Je.prototype.toArray=function(){return this.take(X)},Xn(Je.prototype,function(l,f){var b=/^(?:filter|find|map|reject)|While$/.test(f),R=/^(?:head|last)$/.test(f),k=L[R?"take"+(f=="last"?"Right":""):f],F=R||/^find/.test(f);k&&(L.prototype[f]=function(){var ee=this.__wrapped__,oe=R?[1]:arguments,ce=ee instanceof Je,me=oe[0],be=ce||Ve(ee),we=function(Ke){var Qe=k.apply(L,Pi([Ke],oe));return R&&_e?Qe[0]:Qe};be&&b&&typeof me=="function"&&me.length!=1&&(ce=be=!1);var _e=this.__chain__,Pe=!!this.__actions__.length,qe=F&&!_e,We=ce&&!Pe;if(!F&&be){ee=We?ee:new Je(this);var Ae=l.apply(ee,oe);return Ae.__actions__.push({func:_c,args:[we],thisArg:r}),new hn(Ae,_e)}return qe&&We?l.apply(this,oe):(Ae=this.thru(we),qe?R?Ae.value()[0]:Ae.value():Ae)})}),Zr(["pop","push","shift","sort","splice","unshift"],function(l){var f=Xl[l],b=/^(?:push|sort|unshift)$/.test(l)?"tap":"thru",R=/^(?:pop|shift)$/.test(l);L.prototype[l]=function(){var k=arguments;if(R&&!this.__chain__){var F=this.value();return f.apply(Ve(F)?F:[],k)}return this[b](function(ee){return f.apply(Ve(ee)?ee:[],k)})}}),Xn(Je.prototype,function(l,f){var b=L[f];if(b){var R=b.name+"";lt.call(Xo,R)||(Xo[R]=[]),Xo[R].push({name:f,func:b})}}),Xo[mc(r,x).name]=[{name:"wrapper",func:r}],Je.prototype.clone=N7,Je.prototype.reverse=T7,Je.prototype.value=P7,L.prototype.at=aF,L.prototype.chain=sF,L.prototype.commit=lF,L.prototype.next=cF,L.prototype.plant=dF,L.prototype.reverse=fF,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=hF,L.prototype.first=L.prototype.head,as&&(L.prototype[as]=uF),L}),Go=l7();oo?((oo.exports=Go)._=Go,Sf._=Go):lr._=Go}).call(cae)})(Xs,Xs.exports)),Xs.exports}var Io=uae();function dae(){const e=et.useAppDispatch(),t=et.useAppSelector(et.selectRoles),r=et.useAppSelector(et.selectPrivileges),n=et.useAppSelector(et.selectRolesFlags),i=et.useAppSelector(et.selectRolesAndPrivileges,(y,m)=>Io.isEqual(y,m)),o=et.useAppSelector(et.selectCatalog),a=et.useAppSelector(et.selectQodly),s=et.useAppSelector(et.selectSelectedTab),c=et.useAppSelector(et.selectForceLogin),u=et.useAppSelector(et.selectRestrictedByDefault),d=et.useAppSelector(et.selectGuestPrivilege),h=et.useAppSelector(et.selectCatalogMethods),p=et.useAppSelector(et.selectDataclasses),v=et.useAppSelector(et.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,getHost:()=>"web",actions:{updateRoles:y=>{e(et.updateRoles(y))},updatePrivileges:y=>{e(et.updatePrivileges(y))},setRolesContent:y=>{e(et.setRolesContent(y))},toggleTab:y=>{e(et.toggleTab(y))},toggleForceLogin:y=>{e(et.toggleForceLogin(y))},toggleRestrictedByDefault:y=>{e(et.toggleRestrictedByDefault(y))},setTabFlags:(y,m)=>{e(et.setTabFlags({path:y,flags:m}))},openModal:async y=>await e(et.openModal(y)).unwrap()}}}const cz=C.createContext(null),uz=({children:e,adapter:t})=>O.jsx(cz.Provider,{value:t,children:e}),Tr=()=>{const e=C.useContext(cz);if(!e)throw new Error("useEditorStateAdapter must be used within an EditorStateAdapterProvider");return e};var Xw=function(e,t){return Xw=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])},Xw(e,t)};function jl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Xw(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Zw(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 Jw(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 Qw(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 oi(e){return typeof e=="function"}function dz(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 P0=dz(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 e1(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var Xd=(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=Zw(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(oi(d))try{d()}catch(m){o=m instanceof P0?m.errors:[m]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var p=Zw(h),v=p.next();!v.done;v=p.next()){var y=v.value;try{L5(y)}catch(m){o=o??[],m instanceof P0?o=Qw(Qw([],Jw(o)),Jw(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 P0(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)L5(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)&&e1(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&e1(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),fz=Xd.EMPTY;function hz(e){return e instanceof Xd||e&&"closed"in e&&oi(e.remove)&&oi(e.add)&&oi(e.unsubscribe)}function L5(e){oi(e)?e():e.unsubscribe()}var fae={Promise:void 0},hae={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,Qw([e,t],Jw(r)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function pae(e){hae.setTimeout(function(){throw e})}function B5(){}function Iu(e){e()}var US=(function(e){jl(t,e);function t(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,hz(r)&&r.add(n)):n.destination=mae,n}return t.create=function(r,n,i){return new t1(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})(Xd),vae=(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){iu(n)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(n){iu(n)}else iu(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){iu(r)}},e})(),t1=(function(e){jl(t,e);function t(r,n,i){var o=e.call(this)||this,a;return oi(r)||!r?a={next:r??void 0,error:n??void 0,complete:i??void 0}:a=r,o.destination=new vae(a),o}return t})(US);function iu(e){pae(e)}function gae(e){throw e}var mae={closed:!0,next:B5,error:gae,complete:B5},bae=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function yae(e){return e}function xae(e){return e.length===0?yae:e.length===1?e[0]:function(r){return e.reduce(function(n,i){return i(n)},r)}}var F5=(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=Sae(t)?t:new t1(t,r,n);return Iu(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=$5(r),new r(function(i,o){var a=new t1({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[bae]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return xae(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=$5(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 $5(e){var t;return(t=e??fae.Promise)!==null&&t!==void 0?t:Promise}function wae(e){return e&&oi(e.next)&&oi(e.error)&&oi(e.complete)}function Sae(e){return e&&e instanceof US||wae(e)&&hz(e)}function Eae(e){return oi(e==null?void 0:e.lift)}function _ae(e){return function(t){if(Eae(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 Cae(e,t,r,n,i)}var Cae=(function(e){jl(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})(US),Iae=dz(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),pz=(function(e){jl(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 V5(this,this);return n.operator=r,n},t.prototype._throwIfClosed=function(){if(this.closed)throw new Iae},t.prototype.next=function(r){var n=this;Iu(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=Zw(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;Iu(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;Iu(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?fz:(this.currentObservers=null,s.push(r),new Xd(function(){n.currentObservers=null,e1(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 F5;return r.source=this,r},t.create=function(r,n){return new V5(r,n)},t})(F5),V5=(function(e){jl(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:fz},t})(pz);function Rae(e,t){return _ae(function(r,n){var i=0;r.subscribe(Oae(n,function(o){return e.call(t,o,i++)&&n.next(o)}))})}var M0={},Ns={},ou={},H5;function vz(){if(H5)return ou;H5=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.default=r;let e;const t=new Uint8Array(16);function r(){if(!e&&(e=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}return ou}var ua={},Ts={},Ps={},W5;function Nae(){if(W5)return Ps;W5=1,Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.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 Ps.default=e,Ps}var U5;function Zd(){if(U5)return Ts;U5=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.default=void 0;var e=t(Nae());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 Ts.default=n,Ts}var G5;function Jd(){if(G5)return ua;G5=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.default=void 0,ua.unsafeStringify=n;var e=t(Zd());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 ua.default=o,ua}var K5;function Tae(){if(K5)return Ns;K5=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.default=void 0;var e=r(vz()),t=Jd();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 y=u.node||n,m=u.clockseq!==void 0?u.clockseq:i;if(y==null||m==null){const E=u.random||(u.rng||e.default)();y==null&&(y=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 g=u.msecs!==void 0?u.msecs:Date.now(),w=u.nsecs!==void 0?u.nsecs:a+1;const x=g-o+(w-a)/1e4;if(x<0&&u.clockseq===void 0&&(m=m+1&16383),(x<0||g>o)&&u.nsecs===void 0&&(w=0),w>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");o=g,a=w,i=m,g+=122192928e5;const _=((g&268435455)*1e4+w)%4294967296;v[p++]=_>>>24&255,v[p++]=_>>>16&255,v[p++]=_>>>8&255,v[p++]=_&255;const S=g/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]=y[E];return d||(0,t.unsafeStringify)(v)}var c=s;return Ns.default=c,Ns}var Ms={},Hi={},ks={},Y5;function gz(){if(Y5)return ks;Y5=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.default=void 0;var e=t(Zd());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 ks.default=n,ks}var X5;function mz(){if(X5)return Hi;X5=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.URL=Hi.DNS=void 0,Hi.default=a;var e=Jd(),t=r(gz());function r(s){return s&&s.__esModule?s:{default:s}}function n(s){s=unescape(encodeURIComponent(s));const c=[];for(let u=0;u<s.length;++u)c.push(s.charCodeAt(u));return c}const i="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Hi.DNS=i;const o="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Hi.URL=o;function a(s,c,u){function d(h,p,v,y){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 g=new Uint8Array(16+h.length);if(g.set(p),g.set(h,p.length),g=u(g),g[6]=g[6]&15|c,g[8]=g[8]&63|128,v){y=y||0;for(let w=0;w<16;++w)v[y+w]=g[w];return v}return(0,e.unsafeStringify)(g)}try{d.name=s}catch{}return d.DNS=i,d.URL=o,d}return Hi}var As={},Z5;function Pae(){if(Z5)return As;Z5=1,Object.defineProperty(As,"__esModule",{value:!0}),As.default=void 0;function e(v){if(typeof v=="string"){const y=unescape(encodeURIComponent(v));v=new Uint8Array(y.length);for(let m=0;m<y.length;++m)v[m]=y.charCodeAt(m)}return t(n(i(v),v.length*8))}function t(v){const y=[],m=v.length*32,g="0123456789abcdef";for(let w=0;w<m;w+=8){const x=v[w>>5]>>>w%32&255,_=parseInt(g.charAt(x>>>4&15)+g.charAt(x&15),16);y.push(_)}return y}function r(v){return(v+64>>>9<<4)+14+1}function n(v,y){v[y>>5]|=128<<y%32,v[r(y)-1]=y;let m=1732584193,g=-271733879,w=-1732584194,x=271733878;for(let _=0;_<v.length;_+=16){const S=m,E=g,I=w,N=x;m=c(m,g,w,x,v[_],7,-680876936),x=c(x,m,g,w,v[_+1],12,-389564586),w=c(w,x,m,g,v[_+2],17,606105819),g=c(g,w,x,m,v[_+3],22,-1044525330),m=c(m,g,w,x,v[_+4],7,-176418897),x=c(x,m,g,w,v[_+5],12,1200080426),w=c(w,x,m,g,v[_+6],17,-1473231341),g=c(g,w,x,m,v[_+7],22,-45705983),m=c(m,g,w,x,v[_+8],7,1770035416),x=c(x,m,g,w,v[_+9],12,-1958414417),w=c(w,x,m,g,v[_+10],17,-42063),g=c(g,w,x,m,v[_+11],22,-1990404162),m=c(m,g,w,x,v[_+12],7,1804603682),x=c(x,m,g,w,v[_+13],12,-40341101),w=c(w,x,m,g,v[_+14],17,-1502002290),g=c(g,w,x,m,v[_+15],22,1236535329),m=u(m,g,w,x,v[_+1],5,-165796510),x=u(x,m,g,w,v[_+6],9,-1069501632),w=u(w,x,m,g,v[_+11],14,643717713),g=u(g,w,x,m,v[_],20,-373897302),m=u(m,g,w,x,v[_+5],5,-701558691),x=u(x,m,g,w,v[_+10],9,38016083),w=u(w,x,m,g,v[_+15],14,-660478335),g=u(g,w,x,m,v[_+4],20,-405537848),m=u(m,g,w,x,v[_+9],5,568446438),x=u(x,m,g,w,v[_+14],9,-1019803690),w=u(w,x,m,g,v[_+3],14,-187363961),g=u(g,w,x,m,v[_+8],20,1163531501),m=u(m,g,w,x,v[_+13],5,-1444681467),x=u(x,m,g,w,v[_+2],9,-51403784),w=u(w,x,m,g,v[_+7],14,1735328473),g=u(g,w,x,m,v[_+12],20,-1926607734),m=d(m,g,w,x,v[_+5],4,-378558),x=d(x,m,g,w,v[_+8],11,-2022574463),w=d(w,x,m,g,v[_+11],16,1839030562),g=d(g,w,x,m,v[_+14],23,-35309556),m=d(m,g,w,x,v[_+1],4,-1530992060),x=d(x,m,g,w,v[_+4],11,1272893353),w=d(w,x,m,g,v[_+7],16,-155497632),g=d(g,w,x,m,v[_+10],23,-1094730640),m=d(m,g,w,x,v[_+13],4,681279174),x=d(x,m,g,w,v[_],11,-358537222),w=d(w,x,m,g,v[_+3],16,-722521979),g=d(g,w,x,m,v[_+6],23,76029189),m=d(m,g,w,x,v[_+9],4,-640364487),x=d(x,m,g,w,v[_+12],11,-421815835),w=d(w,x,m,g,v[_+15],16,530742520),g=d(g,w,x,m,v[_+2],23,-995338651),m=h(m,g,w,x,v[_],6,-198630844),x=h(x,m,g,w,v[_+7],10,1126891415),w=h(w,x,m,g,v[_+14],15,-1416354905),g=h(g,w,x,m,v[_+5],21,-57434055),m=h(m,g,w,x,v[_+12],6,1700485571),x=h(x,m,g,w,v[_+3],10,-1894986606),w=h(w,x,m,g,v[_+10],15,-1051523),g=h(g,w,x,m,v[_+1],21,-2054922799),m=h(m,g,w,x,v[_+8],6,1873313359),x=h(x,m,g,w,v[_+15],10,-30611744),w=h(w,x,m,g,v[_+6],15,-1560198380),g=h(g,w,x,m,v[_+13],21,1309151649),m=h(m,g,w,x,v[_+4],6,-145523070),x=h(x,m,g,w,v[_+11],10,-1120210379),w=h(w,x,m,g,v[_+2],15,718787259),g=h(g,w,x,m,v[_+9],21,-343485551),m=o(m,S),g=o(g,E),w=o(w,I),x=o(x,N)}return[m,g,w,x]}function i(v){if(v.length===0)return[];const y=v.length*8,m=new Uint32Array(r(y));for(let g=0;g<y;g+=8)m[g>>5]|=(v[g/8]&255)<<g%32;return m}function o(v,y){const m=(v&65535)+(y&65535);return(v>>16)+(y>>16)+(m>>16)<<16|m&65535}function a(v,y){return v<<y|v>>>32-y}function s(v,y,m,g,w,x){return o(a(o(o(y,v),o(g,x)),w),m)}function c(v,y,m,g,w,x,_){return s(y&m|~y&g,v,y,w,x,_)}function u(v,y,m,g,w,x,_){return s(y&g|m&~g,v,y,w,x,_)}function d(v,y,m,g,w,x,_){return s(y^m^g,v,y,w,x,_)}function h(v,y,m,g,w,x,_){return s(m^(y|~g),v,y,w,x,_)}var p=e;return As.default=p,As}var J5;function Mae(){if(J5)return Ms;J5=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.default=void 0;var e=r(mz()),t=r(Pae());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v3",48,t.default);return Ms.default=i,Ms}var Ds={},js={},Q5;function kae(){if(Q5)return js;Q5=1,Object.defineProperty(js,"__esModule",{value:!0}),js.default=void 0;var t={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};return js.default=t,js}var eM;function Aae(){if(eM)return Ds;eM=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.default=void 0;var e=n(kae()),t=n(vz()),r=Jd();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 Ds.default=o,Ds}var qs={},zs={},tM;function Dae(){if(tM)return zs;tM=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.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],y=a[2],m=a[3],g=a[4];for(let w=0;w<80;++w){const x=Math.floor(w/20),_=t(p,5)+e(x,v,y,m)+g+o[x]+h[w]>>>0;g=m,m=y,y=t(v,30)>>>0,v=p,p=_}a[0]=a[0]+p>>>0,a[1]=a[1]+v>>>0,a[2]=a[2]+y>>>0,a[3]=a[3]+m>>>0,a[4]=a[4]+g>>>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 zs.default=n,zs}var rM;function jae(){if(rM)return qs;rM=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.default=void 0;var e=r(mz()),t=r(Dae());function r(o){return o&&o.__esModule?o:{default:o}}var i=(0,e.default)("v5",80,t.default);return qs.default=i,qs}var Ls={},nM;function qae(){if(nM)return Ls;nM=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.default=void 0;var e="00000000-0000-0000-0000-000000000000";return Ls.default=e,Ls}var Bs={},iM;function zae(){if(iM)return Bs;iM=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=void 0;var e=t(Zd());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 Bs.default=n,Bs}var oM;function Lae(){return oM||(oM=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(Tae()),r=d(Mae()),n=d(Aae()),i=d(jae()),o=d(qae()),a=d(zae()),s=d(Zd()),c=d(Jd()),u=d(gz());function d(h){return h&&h.__esModule?h:{default:h}}})(M0)),M0}var k0,aM;function Bae(){if(aM)return k0;aM=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},k0=e,k0}var A0,sM;function Fae(){if(sM)return A0;sM=1;var e=Bae();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",A0=t,A0}var D0,lM;function $ae(){if(lM)return D0;lM=1;const{v4:e,validate:t}=Lae(),r=Fae(),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 D0=(()=>{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 y=c(p.length),m={shortIdLength:y,consistentLength:v.consistentLength,paddingChar:p[0]},g=r(r.HEX,p),w=r(p,r.HEX),x=()=>a(e(),g,m),S={alphabet:p,fromUUID:E=>a(E,g,m),maxLength:y,generate:x,new:x,toUUID:E=>s(E,w),uuid:e,validate:(E,I=!1)=>{if(!E||typeof E!="string")return!1;const N=v.consistentLength?E.length===y:E.length<=y,T=E.split("").every(M=>p.includes(M));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})(),D0}var bz=$ae();const yz=new pz;function Vae(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=ve.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 yz.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 GS=C.createContext(null),Hae=()=>({roles:{},privileges:{},flags:{touched:!1},date:void 0,selectedTab:"roles",forceLogin:!1,restrictedByDefault:!1,modals:{list:[]}}),Wae=({children:e,catalog:t=null,qodly:r=!1,host:n,onSetTabFlags:i,initialState:o})=>{const[a,s]=C.useReducer(Vae,{...Hae(),...o}),c=C.useMemo(()=>t?ve.parseCatalog(t):null,[t]),u=C.useMemo(()=>({catalog:c,qodly:r,host:n,onSetTabFlags:i}),[c,r,n,i]);return O.jsx(GS.Provider,{value:{state:a,dispatch:s,external:u},children:e})};function Uae(){const e=C.useContext(GS);if(!e)throw new Error("useReducerAdapter must be used within a ReducerAdapterProvider");const{state:t,dispatch:r,external:n}=e,i=C.useMemo(()=>ve.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]),getHost:C.useCallback(()=>n.host??"web",[n.host]),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=ve.ModalType.ALERT}=o,s=bz.generate();return r({type:"CREATE_MODAL",payload:{id:s,type:a,isOpen:!0,...o}}),a===ve.ModalType.CONFIRM?new Promise(c=>{const u=yz.pipe(Rae(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===ve.ModalCloseReason.CONFIRMED,y=Io.entries(((p=h.views)==null?void 0:p.toggles)||{}).reduce((m,g)=>({...m,[g[0]]:g[1].value}),{});r({type:"REMOVE_MODAL",payload:s}),u.unsubscribe(),c({confirmed:v,options:y})}})}):{confirmed:!1}},[r])}}}function Gae(){const e=C.useContext(GS);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 j0=({child:e,parent:t,status:r})=>{const n=Tr(),i=n.getPrivileges();function o(){const s=ve.addPrivilegeIn(t.id,e.id,i);n.actions.updatePrivileges(s)}function a(){const s=ve.removePrivilegeFrom(t.id,e.id,i);n.actions.updatePrivileges(s)}return O.jsxs(vu,{color:r==="included"?"primary":"dark",onClick:r==="included"?a:o,disabled:r==="disabled",children:[e.privilege,O.jsx(ja,{className:an("transform transition-transform",{"rotate-45":r==="included"})})]})},Kae=({selectedPrivilege:e,privileges:t,onSelect:r,setShowIncluded:n,showIncluded:i})=>{const o=Object.values(t),a=ve.getPrivilegeById(e.id,t);let s=a?ve.populateShallow(a.includes,t):[],c=a?ve.populateShallow(ve.parents(a.id,t),t):[],u=a?ve.populateShallow(ve.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(br,{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(Bu,{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(j0,{child:d,parent:e,status:"included",onSelect:r,currentPrivilegeId:d.id},d.id)),u.map(d=>O.jsx(j0,{child:d,parent:e,status:"available",onSelect:r,currentPrivilegeId:d.id},d.id)),c.map(d=>O.jsx(j0,{child:d,parent:e,status:"disabled",onSelect:r,currentPrivilegeId:d.id},d.id))]})]})};function da(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((y,m)=>n[m]!==y)))return i;n=h;let v;if(r.key&&((c=r.debug)!=null&&c.call(r))&&(v=Date.now()),i=t(...h),r.key&&((u=r.debug)!=null&&u.call(r))){const y=Math.round((Date.now()-d)*100)/100,m=Math.round((Date.now()-v)*100)/100,g=m/16,w=(x,_)=>{for(x=String(x);x.length<_;)x=" "+x;return x};console.info(`%c⏱ ${w(m,5)} /${w(y,5)} ms`,`
92
+ font-size: .6rem;
93
+ font-weight: bold;
94
+ color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(o&&r.skipInitialOnChange)&&r.onChange(i),o=!1,i}return a.updateDeps=s=>{n=s},a}function cM(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Yae=(e,t)=>Math.abs(e-t)<1.01,Xae=(e,t,r)=>{let n;return function(...i){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,i),r)}},uM=e=>{const{offsetWidth:t,offsetHeight:r}=e;return{width:t,height:r}},Zae=e=>e,Jae=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},Qae=(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(uM(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(uM(r))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()});return o.observe(r,{box:"border-box"}),()=>{o.unobserve(r)}},dM={passive:!0},fM=typeof window>"u"?!0:"onscrollend"in window,ese=(e,t)=>{const r=e.scrollElement;if(!r)return;const n=e.targetWindow;if(!n)return;let i=0;const o=e.options.useScrollendEvent&&fM?()=>{}:Xae(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,dM);const u=e.options.useScrollendEvent&&fM;return u&&r.addEventListener("scrollend",c,dM),()=>{r.removeEventListener("scroll",s),u&&r.removeEventListener("scrollend",c)}},tse=(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"]},rse=(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 nse{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:Zae,rangeExtractor:Jae,onChange:()=>{},measureElement:tse,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=da(()=>(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=da(()=>[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=da(()=>[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),y=this.laneAssignments.get(p);let m,g;if(y!==void 0&&this.options.lanes>1){m=y;const S=h[m],E=S!==void 0?d[S]:void 0;g=E?E.end+this.options.gap:n+i}else{const S=this.options.lanes===1?d[p-1]:this.getFurthestMeasurement(d,p);g=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),x=typeof w=="number"?w:this.options.estimateSize(p),_=g+x;d[p]={index:p,start:g,size:x,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=da(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,n,i,o)=>this.range=r.length>0&&n>0?ise({measurements:r,outerSize:n,scrollOffset:i,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=da(()=>{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=da(()=>[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 cM(n[xz(0,n.length-1,i=>cM(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 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&&Yae(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 xz=(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 ise({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=xz(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 hM=typeof document<"u"?nt.useLayoutEffect:nt.useEffect;function ose({useFlushSync:e=!0,...t}){const r=nt.useReducer(()=>({}),{})[1],n={...t,onChange:(o,a)=>{var s;e&&a?xn.flushSync(r):r(),(s=t.onChange)==null||s.call(t,o,a)}},[i]=nt.useState(()=>new nse(n));return i.setOptions(n),hM(()=>i._didMount(),[]),hM(()=>i._willUpdate()),i}function ld(e){return ose({observeElementRect:Qae,observeElementOffset:ese,scrollToFn:rse,...e})}const ase=({item:e,depth:t})=>{const r=Tr(),[n,i]=C.useState(!1),o=r.getPrivileges(),a=ve.populateShallow(e.includes,o);return O.jsxs("div",{className:"py-1 text-xs text-body",children:[O.jsxs("div",{className:"flex items-center",children:[O.jsx("button",{className:"-ml-1",onClick:s=>{s.stopPropagation(),i(!n)},children:O.jsx(uj,{className:an("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(wz,{depth:t+1,data:a})})]})},wz=({data:e,depth:t=0})=>e.map(r=>r.includes.length?O.jsx(ase,{item:r,depth:t},r.id):O.jsx("div",{className:an("py-1 text-xs",{}),children:r.privilege},r.id)),Br=()=>document.querySelector(`.${XD.ROLES_EDITOR_SCOPE_CLASS}`)||document.body,Qd=({container:e,...t})=>O.jsx(ve.Portal,{...t,container:e||Br()}),pM=C.memo(function({privilege:t,selectedPrivilege:r,onSelect:n,isGuest:i=!1}){const o=Tr(),a=o.getPrivileges(),s=ve.populateShallow(t.includes,a),[c,u]=C.useState(!1),[d,h]=C.useState(t.privilege),[p,v]=C.useState(null),y=ve.useOutsideClick(()=>{c&&w()});ve.useDidMountEffect(()=>{t.privilege!==d&&h(t.privilege)},[t.privilege]);function m(){u(!0),v(null)}function g(){u(!1),h(t.privilege)}function w(){v(null);try{ve.validateName(d);const S=ve.renamePrivilege(d,t.id,a);o.actions.updatePrivileges(S),u(!1)}catch(S){v(S.message)}}const x=async S=>{S.stopPropagation();const{confirmed:E}=await o.actions.openModal({title:"Delete Privilege",type:ve.ModalType.CONFIRM,color:ve.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(E){const I=ve.removePrivilege(t.id,a);if((r==null?void 0:r.id)!==t.id){o.actions.updatePrivileges(I);return}const N=Object.keys(I).filter(T=>I[T].privilege!=="guest");if(N.length===0)n(null);else{const T=Object.keys(a).filter(W=>a[W].privilege!=="guest"),M=T.indexOf(t.id),z=Math.max(0,M-1),j=T[z];M===0?n(I[N[0]]):I[j]?n(I[j]):n(I[N[0]])}o.actions.updatePrivileges(I)}},_=C.useMemo(()=>t.resources.some(S=>S.exists===!1),[t]);return O.jsx(Lr,{container:Br(),color:"negative",icon:O.jsx(wi,{}),label:"This privilege uses non-existing resources",isHidden:!_,className:"w-full",usePortal:!0,children:O.jsxs(br,{depth:4,borderType:(r==null?void 0:r.id)===t.id?"primary":_?"negative":"light",className:an("w-full rounded border p-2"),role:"button","data-cy":"privilegeCard",onClick:()=>{n(t)},ref:y,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:i?O.jsx(xV,{className:"h-6 w-6"}):O.jsx(hd,{className:"h-6 w-6"})}),c?O.jsxs(wt.Root,{color:p?"negative":"primary",className:"flex-1 mr-2",children:[O.jsx(wt.Group,{className:"border-input-focus-border",children:O.jsx(wt.Field,{autoFocus:!0,value:d,onChange:S=>h(S.target.value),onKeyDown:S=>{S.key==="Enter"&&w(),S.key==="Escape"&&g()},type:"text"})}),p&&O.jsx(wt.Message,{children:p})]}):O.jsx("span",{className:"inline-block grow overflow-hidden truncate whitespace-nowrap text-xs font-bold",children:d})]}),i?O.jsx("div",{className:"flex items-center justify-center",children:O.jsx(Lr,{icon:O.jsx(wi,{}),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)"}),usePortal:!0,children:O.jsx(on,{className:"h-4 w-4"})})}):O.jsx("div",{className:"flex items-center gap-x-2",children:c?O.jsxs(O.Fragment,{children:[O.jsx(Jt,{variant:"ghost",color:"white",onClick:g,children:O.jsx("span",{children:O.jsx(ej,{className:"h-4 w-4"})})}),O.jsx(Jt,{variant:"ghost",color:"white",onClick:w,children:O.jsx("span",{children:O.jsx(gV,{className:"h-4 w-4"})})})]}):O.jsxs(O.Fragment,{children:[O.jsx(Jt,{variant:"ghost",color:"white",onClick:m,children:O.jsx(cj,{className:"h-4 w-4"})}),O.jsx(Jt,{variant:"ghost",color:"white",onClick:x,children:O.jsx(pj,{className:"h-4 w-4"})})]})})]}),s.length?O.jsx("div",{className:"ml-10.75",children:O.jsx(wz,{data:s})}):null]})})}),sse=({privileges:e,selectPrivilege:t,selectedPrivilege:r})=>{const n=Tr(),i=n.getGuestPrivilege(),o=n.getCatalog(),a=C.useMemo(()=>{if(o===null||!i)return i;const d=sz({guest:i},Object.values((o==null?void 0:o.dataClasses)??{}));return lz(d,o).guest},[e,o]),s=C.useMemo(()=>Object.entries(e).filter(([,d])=>d.privilege!=="guest").sort(([,d],[,h])=>ve.localeCompare(d.privilege,h.privilege)),[e]),c=C.useRef(null),u=ld({count:s.length,getScrollElement:()=>c.current,estimateSize:()=>72,overscan:5});return O.jsxs("div",{ref:c,className:"flex flex-1 flex-col overflow-auto p-4 pb-10 pt-1",children:[a?O.jsx("div",{className:"mb-4",children:O.jsx(pM,{privilege:a,onSelect:t,selectedPrivilege:r,privileges:e,isGuest:!0})}):null,s.length?O.jsx("div",{style:{position:"relative",height:`${u.getTotalSize()}px`},children:u.getVirtualItems().map(d=>{const[h,p]=s[d.index];return O.jsx("div",{ref:u.measureElement,"data-index":d.index,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${d.start}px)`,paddingBottom:"16px"},children:O.jsx(pM,{privilege:p,onSelect:t,selectedPrivilege:r,privileges:e})},h)})}):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 text-inactive-text",children:[O.jsx(on,{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(ja,{className:"ml-2 inline h-4 w-4"})]})]})})})]})};var au={exports:{}},su={exports:{}},ft={};/** @license React v16.13.1
58
95
  * react-is.production.min.js
59
96
  *
60
97
  * Copyright (c) Facebook, Inc. and its affiliates.
61
98
  *
62
99
  * This source code is licensed under the MIT license found in the
63
100
  * LICENSE file in the root directory of this source tree.
64
- */var fN;function CJ(){if(fN)return Je;fN=1;var e=60103,t=60106,r=60107,n=60108,i=60114,o=60109,a=60110,u=60112,l=60113,d=60120,f=60115,h=60116,p=60121,v=60122,m=60117,y=60129,x=60131;if(typeof Symbol=="function"&&Symbol.for){var b=Symbol.for;e=b("react.element"),t=b("react.portal"),r=b("react.fragment"),n=b("react.strict_mode"),i=b("react.profiler"),o=b("react.provider"),a=b("react.context"),u=b("react.forward_ref"),l=b("react.suspense"),d=b("react.suspense_list"),f=b("react.memo"),h=b("react.lazy"),p=b("react.block"),v=b("react.server.block"),m=b("react.fundamental"),y=b("react.debug_trace_mode"),x=b("react.legacy_hidden")}function w(j){if(typeof j=="object"&&j!==null){var D=j.$$typeof;switch(D){case e:switch(j=j.type,j){case r:case i:case n:case l:case d:return j;default:switch(j=j&&j.$$typeof,j){case a:case u:case h:case f:case o:return j;default:return D}}case t:return D}}}var E=o,_=e,S=u,R=r,I=h,N=f,A=t,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=N,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
101
+ */var vM;function lse(){if(vM)return ft;vM=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,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,x=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 y:case v:case a:return E;default:return I}}case r:return I}}}function S(E){return _(E)===u}return ft.AsyncMode=c,ft.ConcurrentMode=u,ft.ContextConsumer=s,ft.ContextProvider=a,ft.Element=t,ft.ForwardRef=d,ft.Fragment=n,ft.Lazy=y,ft.Memo=v,ft.Portal=r,ft.Profiler=o,ft.StrictMode=i,ft.Suspense=h,ft.isAsyncMode=function(E){return S(E)||_(E)===c},ft.isConcurrentMode=S,ft.isContextConsumer=function(E){return _(E)===s},ft.isContextProvider=function(E){return _(E)===a},ft.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},ft.isForwardRef=function(E){return _(E)===d},ft.isFragment=function(E){return _(E)===n},ft.isLazy=function(E){return _(E)===y},ft.isMemo=function(E){return _(E)===v},ft.isPortal=function(E){return _(E)===r},ft.isProfiler=function(E){return _(E)===o},ft.isStrictMode=function(E){return _(E)===i},ft.isSuspense=function(E){return _(E)===h},ft.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===y||E.$$typeof===v||E.$$typeof===a||E.$$typeof===s||E.$$typeof===d||E.$$typeof===g||E.$$typeof===w||E.$$typeof===x||E.$$typeof===m)},ft.typeOf=_,ft}var ht={};/** @license React v16.13.1
65
102
  * react-is.development.js
66
103
  *
67
104
  * Copyright (c) Facebook, Inc. and its affiliates.
68
105
  *
69
106
  * This source code is licensed under the MIT license found in the
70
107
  * LICENSE file in the root directory of this source tree.
71
- */var dN;function RJ(){return dN||(dN=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 ne=fe.$$typeof;switch(ne){case e:var K=fe.type;switch(K){case r:case i:case n:case l:case d:return K;default:var he=K&&K.$$typeof;switch(he){case a:case u:case h:case f:case o:return he;default:return ne}}case t:return ne}}}var S=a,R=o,I=e,N=u,A=r,k=h,L=f,$=t,j=i,D=n,W=l,F=!1,X=!1;function Z(fe){return F||(F=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Q(fe){return X||(X=!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 ee(fe){return _(fe)===o}function ie(fe){return typeof fe=="object"&&fe!==null&&fe.$$typeof===e}function ue(fe){return _(fe)===u}function B(fe){return _(fe)===r}function V(fe){return _(fe)===h}function J(fe){return _(fe)===f}function H(fe){return _(fe)===t}function G(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=N,Qe.Fragment=A,Qe.Lazy=k,Qe.Memo=L,Qe.Portal=$,Qe.Profiler=j,Qe.StrictMode=D,Qe.Suspense=W,Qe.isAsyncMode=Z,Qe.isConcurrentMode=Q,Qe.isContextConsumer=U,Qe.isContextProvider=ee,Qe.isElement=ie,Qe.isForwardRef=ue,Qe.isFragment=B,Qe.isLazy=V,Qe.isMemo=J,Qe.isPortal=H,Qe.isProfiler=G,Qe.isStrictMode=se,Qe.isSuspense=oe,Qe.isValidElementType=E,Qe.typeOf=_})()),Qe}var hN;function IJ(){return hN||(hN=1,process.env.NODE_ENV==="production"?Ru.exports=CJ():Ru.exports=RJ()),Ru.exports}var pN=IJ();function vN(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function gN(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function iy(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return gN(r.overflowY,t)||gN(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 Iu(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 PJ=function(e,t){var r=window,n=t.inline,i=t.boundary,o=t.skipOverflowHiddenElements,a=typeof i=="function"?i:function(ne){return ne!==i};if(!vN(e))throw new TypeError("Invalid target");for(var u,l,d=document.scrollingElement||document.documentElement,f=[],h=e;vN(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&&iy(h)&&!iy(document.documentElement)||h!=null&&iy(h,o)&&f.push(h)}for(var p=r.visualViewport?r.visualViewport.width:innerWidth,v=r.visualViewport?r.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,y=window.scrollY||pageYOffset,x=e.getBoundingClientRect(),b=x.height,w=x.width,E=x.top,_=x.right,S=x.bottom,R=x.left,I=E,N=n==="center"?R+w/2:n==="end"?_:R,A=[],k=0;k<f.length;k++){var L=f[k],$=L.getBoundingClientRect(),j=$.height,D=$.width,W=$.top,F=$.right,X=$.bottom,Z=$.left;if(E>=0&&R>=0&&S<=v&&_<=p&&E>=W&&S<=X&&R>=Z&&_<=F)return A;var Q=getComputedStyle(L),U=parseInt(Q.borderLeftWidth,10),ee=parseInt(Q.borderTopWidth,10),ie=parseInt(Q.borderRightWidth,10),ue=parseInt(Q.borderBottomWidth,10),B=0,V=0,J="offsetWidth"in L?L.offsetWidth-L.clientWidth-U-ie:0,H="offsetHeight"in L?L.offsetHeight-L.clientHeight-ee-ue:0,G="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)B=Iu(y,y+v,v,ee,ue,y+I,y+I+b,b),V=n==="start"?N:n==="center"?N-p/2:n==="end"?N-p:Iu(m,m+p,p,U,ie,m+N,m+N+w,w),B=Math.max(0,B+y),V=Math.max(0,V+m);else{B=Iu(W,X,j,ee,ue+H,I,I+b,b),V=n==="start"?N-Z-U:n==="center"?N-(Z+D/2)+J/2:n==="end"?N-F+ie+J:Iu(Z,F,D,U,ie+J,N,N+w,w);var oe=L.scrollLeft,fe=L.scrollTop;I+=fe-(B=Math.max(0,Math.min(fe+B/se,L.scrollHeight-j/se+H))),N+=oe-(V=Math.max(0,Math.min(oe+V/G,L.scrollWidth-D/G+J)))}A.push({el:L,top:B,left:V})}return A};let TJ=0;function mN(e){return typeof e=="function"?e:wr}function wr(){}function wk(e,t){if(!e)return;PJ(e,{boundary:t}).forEach(n=>{let{el:i,top:o,left:a}=n;i.scrollTop=o,i.scrollLeft=a})}function yN(e,t,r){return e===t||t instanceof r.Node&&e.contains&&e.contains(t)}function yw(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 pi(){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 _k(){return String(TJ++)}function Ek(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 bN(e,t){return e=Array.isArray(e)?e[0]:e,!e&&t?t:e}function Sk(e){return typeof e.type=="string"}function Ok(e){return e.props}function NJ(e,t){console.error(`The property "${t}" is required in "${e}"`)}const AJ=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function Pu(e){e===void 0&&(e={});const t={};return AJ.forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}function hl(e,t){return Object.keys(e).reduce((r,n)=>(r[n]=pl(t,n)?t[n]:e[n],r),{})}function pl(e,t){return e[t]!==void 0}function hx(e){const{key:t,keyCode:r}=e;return r>=37&&r<=40&&t.indexOf("Arrow")!==0?`Arrow${t}`:t}function MJ(e){return Object.prototype.toString.call(e)==="[object Object]"}function yo(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=Ii(e,a,r,n,i);return u===-1?t>=r?-1:t:u}function Ii(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?Ii(1,0,r,n,!1):Ii(-1,r-1,r,n,!1):-1}function vl(e,t,r,n){return n===void 0&&(n=!0),t.some(i=>i&&(yN(i,e,r)||n&&yN(i,r.document.activeElement,r)))}let bw=wr;process.env.NODE_ENV!=="production"&&(bw=(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 DJ=yw(e=>{Rk(e).textContent=""},500);function Ck(e,t){const r=Rk(t);e&&(r.textContent=e,DJ(t))}function Rk(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 Ik=process.env.NODE_ENV!=="production"?"__autocomplete_unknown__":0,Pk=process.env.NODE_ENV!=="production"?"__autocomplete_mouseup__":1,Tk=process.env.NODE_ENV!=="production"?"__autocomplete_item_mouseenter__":2,zu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_up__":3,Hu=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_arrow_down__":4,Nk=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_escape__":5,Ak=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_enter__":6,Mk=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_home__":7,Dk=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_end__":8,jk=process.env.NODE_ENV!=="production"?"__autocomplete_click_item__":9,qk=process.env.NODE_ENV!=="production"?"__autocomplete_blur_input__":10,kk=process.env.NODE_ENV!=="production"?"__autocomplete_change_input__":11,Lk=process.env.NODE_ENV!=="production"?"__autocomplete_keydown_space_button__":12,px=process.env.NODE_ENV!=="production"?"__autocomplete_click_button__":13,Fk=process.env.NODE_ENV!=="production"?"__autocomplete_blur_button__":14,Bk=process.env.NODE_ENV!=="production"?"__autocomplete_controlled_prop_updated_selected_item__":15,$k=process.env.NODE_ENV!=="production"?"__autocomplete_touchend__":16;var jJ=Object.freeze({__proto__:null,unknown:Ik,mouseUp:Pk,itemMouseEnter:Tk,keyDownArrowUp:zu,keyDownArrowDown:Hu,keyDownEscape:Nk,keyDownEnter:Ak,keyDownHome:Mk,keyDownEnd:Dk,clickItem:jk,blurInput:qk,changeInput:kk,keyDownSpaceButton:Lk,clickButton:px,blurButton:Fk,controlledPropUpdatedSelectedItem:Bk,touchEnd:$k});const qJ=(()=>{class e extends P.Component{constructor(r){var n;super(r),n=this,this.id=this.props.id||`downshift-${_k()}`,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=Pu(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=Pu(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||Ik,Object.keys(w).forEach(_=>{b[_]!==w[_]&&(y[_]=w[_]),_!=="type"&&(w[_],pl(this.props,_)||(E[_]=w[_]))}),x&&w.hasOwnProperty("inputValue")&&this.props.onInputValueChange(w.inputValue,{...this.getStateAndHelpers(),...w}),E},()=>{mN(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]:pi(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:Hu})}else this.internalSetState({isOpen:!0,type:Hu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=yo(1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:Hu})}})},ArrowUp(h){if(h.preventDefault(),this.getState().isOpen){const p=h.shiftKey?-5:-1;this.moveHighlightedIndex(p,{type:zu})}else this.internalSetState({isOpen:!0,type:zu},()=>{const p=this.getItemCount();if(p>0){const{highlightedIndex:v}=this.getState(),m=yo(-1,v,p,y=>this.getItemNodeFromIndex(y));this.setHighlightedIndex(m,{type:zu})}})},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:Ak})}},Escape(h){h.preventDefault(),this.reset({type:Nk,...!this.state.isOpen&&{selectedItem:null,inputValue:""}})}},this.buttonKeyDownHandlers={...this.keyDownHandlers," "(h){h.preventDefault(),this.toggleMenu({type:Lk})}},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=Ii(1,0,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:Mk})},End(h){const{isOpen:p}=this.getState();if(!p)return;h.preventDefault();const v=this.getItemCount();if(v<=0||!p)return;const m=Ii(-1,v-1,v,y=>this.getItemNodeFromIndex(y),!1);this.setHighlightedIndex(m,{type:Dk})}},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=hx(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:px}):this.internalSetTimeout(()=>this.toggleMenu({type:px}))},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:Fk})})},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=hx(h);p&&this.inputKeyDownHandlers[p]&&this.inputKeyDownHandlers[p].call(this,h)},this.inputHandleChange=h=>{this.internalSetState({type:kk,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:qk})})},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]:pi(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:NJ("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:Tk}),n.avoidScrolling=!0,n.internalSetTimeout(()=>n.avoidScrolling=!1,250))}),onMouseDown:Rt(v,I=>{I.preventDefault()}),[E]:Rt(_,()=>{n.selectItemAtIndex(x,{type:jk})})},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=Pu(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=Pu(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),mN(p)()})},this.openMenu=h=>{this.internalSetState({isOpen:!0},h)},this.closeMenu=h=>{this.internalSetState({isOpen:!1},h)},this.updateStatus=yw(()=>{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,Ck(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),hl(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=yo(r,o,i,u=>this.getItemNodeFromIndex(u));this.setHighlightedIndex(a,n)}}getStateAndHelpers(){const{highlightedIndex:r,inputValue:n,selectedItem:i,isOpen:o}=this.getState(),{itemToString:a}=this.props,{id:u}=this,{getRootProps:l,getToggleButtonProps:d,getLabelProps:f,getMenuProps:h,getInputProps:p,getItemProps:v,openMenu:m,closeMenu:y,toggleMenu:x,selectItem:b,selectItemAtIndex:w,selectHighlightedItem:E,setHighlightedIndex:_,clearSelection:S,clearItems:R,reset:I,setItemCount:N,unsetItemCount:A,internalSetState: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:N,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&&xN(this._menuNode,this.getMenuProps);{const r=()=>{this.isMouseDown=!0},n=l=>{this.isMouseDown=!1,!vl(l.target,[this._rootNode,this._menuNode],this.props.environment)&&this.getState().isOpen&&this.reset({type:Pk},()=>this.props.onOuterClick(this.getStateAndHelpers()))},i=()=>{this.isTouchMove=!1},o=()=>{this.isTouchMove=!0},a=l=>{const d=vl(l.target,[this._rootNode,this._menuNode],this.props.environment,!1);!this.isTouchMove&&!d&&this.getState().isOpen&&this.reset({type:$k},()=>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"&&(bw(this.state,r,this.props),this.getMenuProps.called&&!this.getMenuProps.suppressRefError&&xN(this._menuNode,this.getMenuProps)),pl(this.props,"selectedItem")&&this.props.selectedItemChanged(r.selectedItem,this.props.selectedItem)&&this.internalSetState({type:Bk,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(n,r)&&this.scrollHighlightedItemIntoView(),this.updateStatus()}componentWillUnmount(){this.cleanup()}render(){const r=bN(this.props.children,wr);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=bN(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&&kJ(n,this.getRootProps),n;if(Sk(n))return P.cloneElement(n,this.getRootProps(Ok(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:Ek,itemToString:t=>t==null?"":(process.env.NODE_ENV!=="production"&&MJ(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:wr,onInputValueChange:wr,onUserAction:wr,onChange:wr,onSelect:wr,onOuterClick:wr,selectedItemChanged:(t,r)=>t!==r,environment:typeof window>"u"?{}:window,stateReducer:(t,r)=>r,suppressRefError:!1,scrollIntoView:wk},e.stateChangeTypes=jJ,e})();process.env.NODE_ENV!=="production"&&(qJ.propTypes={children:ve.func,defaultHighlightedIndex:ve.number,defaultIsOpen:ve.bool,initialHighlightedIndex:ve.number,initialSelectedItem:ve.any,initialInputValue:ve.string,initialIsOpen:ve.bool,getA11yStatusMessage:ve.func,itemToString:ve.func,onChange:ve.func,onSelect:ve.func,onStateChange:ve.func,onInputValueChange:ve.func,onUserAction:ve.func,onOuterClick:ve.func,selectedItemChanged:ve.func,stateReducer:ve.func,itemCount:ve.number,id:ve.string,environment:ve.shape({addEventListener:ve.func,removeEventListener:ve.func,document:ve.shape({getElementById:ve.func,activeElement:ve.any,body:ve.any})}),suppressRefError:ve.bool,scrollIntoView:ve.func,selectedItem:ve.any,isOpen:ve.bool,inputValue:ve.string,highlightedIndex:ve.number,labelId:ve.string,inputId:ve.string,menuId:ve.string,getItemId:ve.func});function xN(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 kJ(e,t){let{refKey:r}=t;const n=r!=="ref",i=!Sk(e);i&&!n&&!pN.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}"`),!pN.isForwardRef(e)&&!Ok(e)[r]&&console.error(`downshift: You must apply the ref prop "${r}" from getRootProps onto your root element.`)}const zk={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function LJ(e,t,r){const{props:n,type:i}=e,o={};Object.keys(t).forEach(a=>{FJ(a,e,t,r),r[a]!==t[a]&&(o[a]=r[a])}),n.onStateChange&&Object.keys(o).length&&n.onStateChange({type:i,...o})}function FJ(e,t,r,n){const{props:i,type:o}=t,a=`on${xw(e)}Change`;i[a]&&n[e]!==void 0&&n[e]!==r[e]&&i[a]({type:o,...n})}function BJ(e,t){return t.changes}function $J(e){const{selectedItem:t,itemToString:r}=e;return t?`${r(t)} has been selected.`:""}const zJ=yw((e,t)=>{Ck(e(),t)},200),HJ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?P.useLayoutEffect:P.useEffect;function UJ(e){let{id:t=`downshift-${_k()}`,labelId:r,menuId:n,getItemId:i,toggleButtonId:o,inputId:a}=e;return P.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 VJ(e,t,r){return e!==void 0?e:r.length===0?-1:r.indexOf(t)}function WJ(e){return e?String(e):""}function xw(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function Hk(e){const t=P.useRef(e);return t.current=e,t}function GJ(e,t,r){const n=P.useRef(),i=P.useRef(),o=P.useCallback((h,p)=>{i.current=p,h=hl(h,p.props);const v=e(h,p);return p.props.stateReducer(h,{...p,changes:v})},[e]),[a,u]=P.useReducer(o,t),l=Hk(r),d=P.useCallback(h=>u({props:l.current,...h}),[l]),f=i.current;return P.useEffect(()=>{f&&n.current&&n.current!==a&&LJ(f,hl(n.current,f.props),a),n.current=a},[a,r,f]),[a,d]}const ka={itemToString:WJ,stateReducer:BJ,getA11ySelectionMessage:$J,scrollIntoView:wk,circularNavigation:!1,environment:typeof window>"u"?{}:window};function Jr(e,t,r){r===void 0&&(r=zk);const n=e[`default${xw(t)}`];return n!==void 0?n:r[t]}function Tu(e,t,r){r===void 0&&(r=zk);const n=e[t];if(n!==void 0)return n;const i=e[`initial${xw(t)}`];return i!==void 0?i:Jr(e,t,r)}function KJ(e){const t=Tu(e,"selectedItem"),r=Tu(e,"isOpen"),n=Tu(e,"highlightedIndex"),i=Tu(e,"inputValue");return{highlightedIndex:n<0&&t&&r?e.items.indexOf(t):n,isOpen:r,selectedItem:t,inputValue:i}}function gl(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):yo(r,i.indexOf(u),i.length,n,!1):r===0?-1:r<0?i.length-1:0}function YJ(e,t,r,n){const i=P.useRef({isMouseDown:!1,isTouchMove:!1});return P.useEffect(()=>{const o=()=>{i.current.isMouseDown=!0},a=f=>{i.current.isMouseDown=!1,e&&!vl(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&&!vl(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=()=>wr;process.env.NODE_ENV!=="production"&&(Uk=function(){const e=P.useRef(!0);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const i=P.useRef(r.reduce((a,u)=>(a[u]={},a),{}));return P.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}),P.useCallback((a,u,l,d)=>{i.current[a]={suppressRefError:u,refKey:l,elementRef:d}},[])});function wN(e,t,r){let{isInitialMount:n,highlightedIndex:i,items:o,environment:a,...u}=r;P.useEffect(()=>{n||zJ(()=>e({highlightedIndex:i,highlightedItem:o[i],resultCount:o.length,...u}),a.document)},t)}function XJ(e){let{highlightedIndex:t,isOpen:r,itemRefs:n,getItemNodeFromIndex:i,menuElement:o,scrollIntoView:a}=e;const u=P.useRef(!0);return HJ(()=>{t<0||!r||!Object.keys(n.current).length||(u.current===!1?u.current=!0:a(i(t),o))},[t]),u}let Vk=wr;process.env.NODE_ENV!=="production"&&(Vk=e=>{let{isInitialMount:t,props:r,state:n}=e;const i=P.useRef(r);P.useEffect(()=>{t||(bw(n,i.current,r),i.current=r)},[n,r,t])});function ZJ(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:gl(i,e,0)};break;case r.FunctionOpenMenu:o={isOpen:!0,highlightedIndex:gl(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}}ve.array.isRequired,ve.func,ve.func,ve.func,ve.bool,ve.number,ve.number,ve.number,ve.bool,ve.bool,ve.bool,ve.any,ve.any,ve.any,ve.string,ve.string,ve.string,ve.func,ve.string,ve.func,ve.func,ve.func,ve.func,ve.func,ve.shape({addEventListener:ve.func,removeEventListener:ve.func,document:ve.shape({getElementById:ve.func,activeElement:ve.any,body:ve.any})});function JJ(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.":""}al(al({},ka),{getA11yStatusMessage:JJ});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 ww=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_down__":0,_w=process.env.NODE_ENV!=="production"?"__input_keydown_arrow_up__":1,Ew=process.env.NODE_ENV!=="production"?"__input_keydown_escape__":2,Sw=process.env.NODE_ENV!=="production"?"__input_keydown_home__":3,Ow=process.env.NODE_ENV!=="production"?"__input_keydown_end__":4,Cw=process.env.NODE_ENV!=="production"?"__input_keydown_enter__":5,Rw=process.env.NODE_ENV!=="production"?"__input_change__":6,ml=process.env.NODE_ENV!=="production"?"__input_blur__":7,Wk=process.env.NODE_ENV!=="production"?"__menu_mouse_leave__":8,Gk=process.env.NODE_ENV!=="production"?"__item_mouse_move__":9,Iw=process.env.NODE_ENV!=="production"?"__item_click__":10,Kk=process.env.NODE_ENV!=="production"?"__togglebutton_click__":11,Yk=process.env.NODE_ENV!=="production"?"__function_toggle_menu__":12,Xk=process.env.NODE_ENV!=="production"?"__function_open_menu__":13,Zk=process.env.NODE_ENV!=="production"?"__function_close_menu__":14,Jk=process.env.NODE_ENV!=="production"?"__function_set_highlighted_index__":15,Pw=process.env.NODE_ENV!=="production"?"__function_select_item__":16,Qk=process.env.NODE_ENV!=="production"?"__function_set_input_value__":17,eL=process.env.NODE_ENV!=="production"?"__function_reset__":18,Tw=process.env.NODE_ENV!=="production"?"__controlled_prop_updated_selected_item__":19;var tL=Object.freeze({__proto__:null,InputKeyDownArrowDown:ww,InputKeyDownArrowUp:_w,InputKeyDownEscape:Ew,InputKeyDownHome:Sw,InputKeyDownEnd:Ow,InputKeyDownEnter:Cw,InputChange:Rw,InputBlur:ml,MenuMouseLeave:Wk,ItemMouseMove:Gk,ItemClick:Iw,ToggleButtonClick:Kk,FunctionToggleMenu:Yk,FunctionOpenMenu:Xk,FunctionCloseMenu:Zk,FunctionSetHighlightedIndex:Jk,FunctionSelectItem:Pw,FunctionSetInputValue:Qk,FunctionReset:eL,ControlledPropUpdatedSelectedItem:Tw});function QJ(e){const t=KJ(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 eQ={items:ve.array.isRequired,itemToString:ve.func,getA11yStatusMessage:ve.func,getA11ySelectionMessage:ve.func,circularNavigation:ve.bool,highlightedIndex:ve.number,defaultHighlightedIndex:ve.number,initialHighlightedIndex:ve.number,isOpen:ve.bool,defaultIsOpen:ve.bool,initialIsOpen:ve.bool,selectedItem:ve.any,initialSelectedItem:ve.any,defaultSelectedItem:ve.any,inputValue:ve.string,defaultInputValue:ve.string,initialInputValue:ve.string,id:ve.string,labelId:ve.string,menuId:ve.string,getItemId:ve.func,inputId:ve.string,toggleButtonId:ve.string,stateReducer:ve.func,onSelectedItemChange:ve.func,onHighlightedIndexChange:ve.func,onStateChange:ve.func,onIsOpenChange:ve.func,onInputValueChange:ve.func,environment:ve.shape({addEventListener:ve.func,removeEventListener:ve.func,document:ve.shape({getElementById:ve.func,activeElement:ve.any,body:ve.any})})};function tQ(e,t,r){const n=P.useRef(),[i,o]=GJ(e,t,r);return P.useEffect(()=>{pl(r,"selectedItem")&&(n.current!==r.selectedItem&&o({type:Tw,inputValue:r.itemToString(r.selectedItem)}),n.current=i.selectedItem===n.current?r.selectedItem:i.selectedItem)}),[hl(i,r),o]}let rL=wr;process.env.NODE_ENV!=="production"&&(rL=(e,t)=>{ve.checkPropTypes(eQ,e,"prop",t.name)});const rQ={...ka,getA11yStatusMessage:Ek,circularNavigation:!0};function nQ(e,t){const{type:r,props:n,shiftKey:i}=t;let o;switch(r){case Iw:o={isOpen:Jr(n,"isOpen"),highlightedIndex:Jr(n,"highlightedIndex"),selectedItem:n.items[t.index],inputValue:n.itemToString(n.items[t.index])};break;case ww:e.isOpen?o={highlightedIndex:yo(i?5:1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:gl(n,e,1,t.getItemNodeFromIndex),isOpen:n.items.length>=0};break;case _w:e.isOpen?o={highlightedIndex:yo(i?-5:-1,e.highlightedIndex,n.items.length,t.getItemNodeFromIndex,n.circularNavigation)}:o={highlightedIndex:gl(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 Ew:o={isOpen:!1,highlightedIndex:-1,...!e.isOpen&&{selectedItem:null,inputValue:""}};break;case Sw:o={highlightedIndex:Ii(1,0,n.items.length,t.getItemNodeFromIndex,!1)};break;case Ow:o={highlightedIndex:Ii(-1,n.items.length-1,n.items.length,t.getItemNodeFromIndex,!1)};break;case ml:o={isOpen:!1,highlightedIndex:-1,...e.highlightedIndex>=0&&t.selectItem&&{selectedItem:n.items[e.highlightedIndex],inputValue:n.itemToString(n.items[e.highlightedIndex])}};break;case Rw:o={isOpen:!0,highlightedIndex:Jr(n,"highlightedIndex"),inputValue:t.inputValue};break;case Pw:o={selectedItem:t.selectedItem,inputValue:n.itemToString(t.selectedItem)};break;case Tw:o={inputValue:t.inputValue};break;default:return ZJ(e,t,tL)}return{...e,...o}}fo.stateChangeTypes=tL;function fo(e){e===void 0&&(e={}),rL(e,fo);const t={...rQ,...e},{initialIsOpen:r,defaultIsOpen:n,items:i,scrollIntoView:o,environment:a,getA11yStatusMessage:u,getA11ySelectionMessage:l,itemToString:d}=t,f=QJ(t),[h,p]=tQ(nQ,f,t),{isOpen:v,highlightedIndex:m,selectedItem:y,inputValue:x}=h,b=P.useRef(null),w=P.useRef({}),E=P.useRef(null),_=P.useRef(null),S=P.useRef(null),R=P.useRef(!0),I=UJ(t),N=P.useRef(),A=Hk({state:h,props:t}),k=P.useCallback(G=>w.current[I.getItemId(G)],[I]);wN(u,[v,m,x,i],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h}),wN(l,[y],{isInitialMount:R.current,previousResultCount:N.current,items:i,environment:a,itemToString:d,...h});const L=XJ({menuElement:b.current,highlightedIndex:m,isOpen:v,itemRefs:w,scrollIntoView:o,getItemNodeFromIndex:k});Vk({isInitialMount:R.current,props:t,state:h}),P.useEffect(()=>{(r||n||v)&&E.current&&E.current.focus()},[]),P.useEffect(()=>{R.current||(N.current=i.length)});const $=YJ(v,[S,b,_],a,()=>{p({type:ml,selectItem:!1})}),j=Uk("getInputProps","getComboboxProps","getMenuProps");P.useEffect(()=>{R.current=!1},[]),P.useEffect(()=>{v||(w.current={})},[v]);const D=P.useMemo(()=>({ArrowDown(G){G.preventDefault(),p({type:ww,shiftKey:G.shiftKey,getItemNodeFromIndex:k})},ArrowUp(G){G.preventDefault(),p({type:_w,shiftKey:G.shiftKey,getItemNodeFromIndex:k})},Home(G){A.current.state.isOpen&&(G.preventDefault(),p({type:Sw,getItemNodeFromIndex:k}))},End(G){A.current.state.isOpen&&(G.preventDefault(),p({type:Ow,getItemNodeFromIndex:k}))},Escape(G){const se=A.current.state;(se.isOpen||se.inputValue||se.selectedItem||se.highlightedIndex>-1)&&(G.preventDefault(),p({type:Ew}))},Enter(G){const se=A.current.state;!se.isOpen||se.highlightedIndex<0||G.which===229||(G.preventDefault(),p({type:Cw,getItemNodeFromIndex:k}))}}),[p,A,k]),W=P.useCallback(G=>({id:I.labelId,htmlFor:I.inputId,...G}),[I]),F=P.useCallback(function(G,se){let{onMouseLeave:oe,refKey:fe="ref",ref:ne,...K}=G===void 0?{}:G,{suppressRefError:he=!1}=se===void 0?{}:se;return j("getMenuProps",he,fe,b),{[fe]:pi(ne,be=>{b.current=be}),id:I.menuId,role:"listbox","aria-labelledby":I.labelId,onMouseLeave:Rt(oe,()=>{p({type:Wk})}),...K}},[p,j,I]),X=P.useCallback(function(G){let{item:se,index:oe,refKey:fe="ref",ref:ne,onMouseMove:K,onMouseDown:he,onClick:be,onPress:pe,disabled:de,..._e}=G===void 0?{}:G;const{props:Re,state:Ze}=A.current,ze=VJ(oe,se,Re.items);if(ze<0)throw new Error("Pass either item or item index in getItemProps!");const Fe="onClick",Ue=be,lt=()=>{oe!==Ze.highlightedIndex&&(L.current=!1,p({type:Gk,index:oe,disabled:de}))},ct=()=>{p({type:Iw,index:oe})},mt=yt=>yt.preventDefault();return{[fe]:pi(ne,yt=>{yt&&(w.current[I.getItemId(ze)]=yt)}),disabled:de,role:"option","aria-selected":`${ze===Ze.highlightedIndex}`,id:I.getItemId(ze),...!de&&{[Fe]:Rt(Ue,ct)},onMouseMove:Rt(K,lt),onMouseDown:Rt(he,mt),..._e}},[p,A,L,I]),Z=P.useCallback(function(G){let{onClick:se,onPress:oe,refKey:fe="ref",ref:ne,...K}=G===void 0?{}:G;const he=()=>{p({type:Kk}),!A.current.state.isOpen&&E.current&&E.current.focus()};return{[fe]:pi(ne,be=>{_.current=be}),id:I.toggleButtonId,tabIndex:-1,...!K.disabled&&{onClick:Rt(se,he)},...K}},[p,A,I]),Q=P.useCallback(function(G,se){let{onKeyDown:oe,onChange:fe,onInput:ne,onBlur:K,onChangeText:he,refKey:be="ref",ref:pe,...de}=G===void 0?{}:G,{suppressRefError:_e=!1}=se===void 0?{}:se;j("getInputProps",_e,be,E);const Re=A.current.state,Ze=ct=>{const mt=hx(ct);mt&&D[mt]&&D[mt](ct)},ze=ct=>{p({type:Rw,inputValue:ct.target.value})},Fe=()=>{Re.isOpen&&!$.current.isMouseDown&&p({type:ml,selectItem:!0})},Ue="onChange";let lt={};return de.disabled||(lt={[Ue]:Rt(fe,ne,ze),onKeyDown:Rt(oe,Ze),onBlur:Rt(K,Fe)}),{[be]:pi(pe,ct=>{E.current=ct}),id:I.inputId,"aria-autocomplete":"list","aria-controls":I.menuId,...Re.isOpen&&Re.highlightedIndex>-1&&{"aria-activedescendant":I.getItemId(Re.highlightedIndex)},"aria-labelledby":I.labelId,autoComplete:"off",value:Re.inputValue,...lt,...de}},[p,D,A,$,j,I]),U=P.useCallback(function(G,se){let{refKey:oe="ref",ref:fe,...ne}=G===void 0?{}:G,{suppressRefError:K=!1}=se===void 0?{}:se;return j("getComboboxProps",K,oe,S),{[oe]:pi(fe,he=>{S.current=he}),role:"combobox","aria-haspopup":"listbox","aria-owns":I.menuId,"aria-expanded":A.current.state.isOpen,...ne}},[A,j,I]),ee=P.useCallback(()=>{p({type:Yk})},[p]),ie=P.useCallback(()=>{p({type:Zk})},[p]),ue=P.useCallback(()=>{p({type:Xk})},[p]),B=P.useCallback(G=>{p({type:Jk,highlightedIndex:G})},[p]),V=P.useCallback(G=>{p({type:Pw,selectedItem:G})},[p]),J=P.useCallback(G=>{p({type:Qk,inputValue:G})},[p]),H=P.useCallback(()=>{p({type:eL})},[p]);return{getItemProps:X,getLabelProps:W,getMenuProps:F,getInputProps:Q,getComboboxProps:U,getToggleButtonProps:Z,toggleMenu:ee,openMenu:ue,closeMenu:ie,setHighlightedIndex:B,setInputValue:J,selectItem:V,reset:H,highlightedIndex:m,isOpen:v,selectedItem:y,inputValue:x}}ve.array,ve.array,ve.array,ve.func,ve.func,ve.func,ve.number,ve.number,ve.number,ve.func,ve.func,ve.string,ve.string,ve.shape({addEventListener:ve.func,removeEventListener:ve.func,document:ve.shape({getElementById:ve.func,activeElement:ve.any,body:ve.any})});ka.itemToString,ka.stateReducer,ka.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 _N={},Sa,EN;function wt(){if(EN)return Sa;EN=1;var e=function(t){return t&&t.Math===Math&&t};return Sa=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof ht=="object"&&ht)||e(typeof Sa=="object"&&Sa)||(function(){return this})()||Function("return this")(),Sa}var oy={},ay,SN;function it(){return SN||(SN=1,ay=function(e){try{return!!e()}catch{return!0}}),ay}var sy,ON;function Ir(){if(ON)return sy;ON=1;var e=it();return sy=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),sy}var uy,CN;function sc(){if(CN)return uy;CN=1;var e=it();return uy=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),uy}var ly,RN;function Jt(){if(RN)return ly;RN=1;var e=sc(),t=Function.prototype.call;return ly=e?t.bind(t):function(){return t.apply(t,arguments)},ly}var cy={},IN;function nL(){if(IN)return cy;IN=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return cy.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,cy}var fy,PN;function uc(){return PN||(PN=1,fy=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),fy}var dy,TN;function ot(){if(TN)return dy;TN=1;var e=sc(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return dy=e?n:function(i){return function(){return r.apply(i,arguments)}},dy}var hy,NN;function Xn(){if(NN)return hy;NN=1;var e=ot(),t=e({}.toString),r=e("".slice);return hy=function(n){return r(t(n),8,-1)},hy}var py,AN;function lc(){if(AN)return py;AN=1;var e=ot(),t=it(),r=Xn(),n=Object,i=e("".split);return py=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,py}var vy,MN;function ss(){return MN||(MN=1,vy=function(e){return e==null}),vy}var gy,DN;function Mi(){if(DN)return gy;DN=1;var e=ss(),t=TypeError;return gy=function(r){if(e(r))throw new t("Can't call method on "+r);return r},gy}var my,jN;function jo(){if(jN)return my;jN=1;var e=lc(),t=Mi();return my=function(r){return e(t(r))},my}var yy,qN;function Ot(){if(qN)return yy;qN=1;var e=typeof document=="object"&&document.all;return yy=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},yy}var by,kN;function Nt(){if(kN)return by;kN=1;var e=Ot();return by=function(t){return typeof t=="object"?t!==null:e(t)},by}var xy,LN;function cc(){if(LN)return xy;LN=1;var e=wt(),t=Ot(),r=function(n){return t(n)?n:void 0};return xy=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},xy}var wy,FN;function fc(){if(FN)return wy;FN=1;var e=ot();return wy=e({}.isPrototypeOf),wy}var _y,BN;function iL(){if(BN)return _y;BN=1;var e=wt(),t=e.navigator,r=t&&t.userAgent;return _y=r?String(r):"",_y}var Ey,$N;function Nw(){if($N)return Ey;$N=1;var e=wt(),t=iL(),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]))),Ey=u,Ey}var Sy,zN;function oL(){if(zN)return Sy;zN=1;var e=Nw(),t=it(),r=wt(),n=r.String;return Sy=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Sy}var Oy,HN;function aL(){if(HN)return Oy;HN=1;var e=oL();return Oy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Oy}var Cy,UN;function sL(){if(UN)return Cy;UN=1;var e=cc(),t=Ot(),r=fc(),n=aL(),i=Object;return Cy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},Cy}var Ry,VN;function Aw(){if(VN)return Ry;VN=1;var e=String;return Ry=function(t){try{return e(t)}catch{return"Object"}},Ry}var Iy,WN;function us(){if(WN)return Iy;WN=1;var e=Ot(),t=Aw(),r=TypeError;return Iy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},Iy}var Py,GN;function ls(){if(GN)return Py;GN=1;var e=us(),t=ss();return Py=function(r,n){var i=r[n];return t(i)?void 0:e(i)},Py}var Ty,KN;function iQ(){if(KN)return Ty;KN=1;var e=Jt(),t=Ot(),r=Nt(),n=TypeError;return Ty=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")},Ty}var Ny={exports:{}},Ay,YN;function dc(){return YN||(YN=1,Ay=!1),Ay}var My,XN;function Mw(){if(XN)return My;XN=1;var e=wt(),t=Object.defineProperty;return My=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},My}var ZN;function Dw(){if(ZN)return Ny.exports;ZN=1;var e=dc(),t=wt(),r=Mw(),n="__core-js_shared__",i=Ny.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"}),Ny.exports}var Dy,JN;function jw(){if(JN)return Dy;JN=1;var e=Dw();return Dy=function(t,r){return e[t]||(e[t]=r||{})},Dy}var jy,QN;function qo(){if(QN)return jy;QN=1;var e=Mi(),t=Object;return jy=function(r){return t(e(r))},jy}var qy,eA;function Pr(){if(eA)return qy;eA=1;var e=ot(),t=qo(),r=e({}.hasOwnProperty);return qy=Object.hasOwn||function(i,o){return r(t(i),o)},qy}var ky,tA;function qw(){if(tA)return ky;tA=1;var e=ot(),t=0,r=Math.random(),n=e(1.1.toString);return ky=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},ky}var Ly,rA;function zt(){if(rA)return Ly;rA=1;var e=wt(),t=jw(),r=Pr(),n=qw(),i=oL(),o=aL(),a=e.Symbol,u=t("wks"),l=o?a.for||a:a&&a.withoutSetter||n;return Ly=function(d){return r(u,d)||(u[d]=i&&r(a,d)?a[d]:l("Symbol."+d)),u[d]},Ly}var Fy,nA;function oQ(){if(nA)return Fy;nA=1;var e=Jt(),t=Nt(),r=sL(),n=ls(),i=iQ(),o=zt(),a=TypeError,u=o("toPrimitive");return Fy=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)},Fy}var By,iA;function uL(){if(iA)return By;iA=1;var e=oQ(),t=sL();return By=function(r){var n=e(r,"string");return t(n)?n:n+""},By}var $y,oA;function kw(){if(oA)return $y;oA=1;var e=wt(),t=Nt(),r=e.document,n=t(r)&&t(r.createElement);return $y=function(i){return n?r.createElement(i):{}},$y}var zy,aA;function lL(){if(aA)return zy;aA=1;var e=Ir(),t=it(),r=kw();return zy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),zy}var sA;function cL(){if(sA)return oy;sA=1;var e=Ir(),t=Jt(),r=nL(),n=uc(),i=jo(),o=uL(),a=Pr(),u=lL(),l=Object.getOwnPropertyDescriptor;return oy.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])},oy}var Hy={},Uy,uA;function fL(){if(uA)return Uy;uA=1;var e=Ir(),t=it();return Uy=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Uy}var Vy,lA;function Tr(){if(lA)return Vy;lA=1;var e=Nt(),t=String,r=TypeError;return Vy=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Vy}var cA;function ln(){if(cA)return Hy;cA=1;var e=Ir(),t=lL(),r=fL(),n=Tr(),i=uL(),o=TypeError,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,l="enumerable",d="configurable",f="writable";return Hy.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},Hy}var Wy,fA;function cs(){if(fA)return Wy;fA=1;var e=Ir(),t=ln(),r=uc();return Wy=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Wy}var Gy={exports:{}},Ky,dA;function Lw(){if(dA)return Ky;dA=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 Yy,hA;function dL(){if(hA)return Yy;hA=1;var e=ot(),t=Ot(),r=Dw(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),Yy=r.inspectSource,Yy}var Xy,pA;function hL(){if(pA)return Xy;pA=1;var e=wt(),t=Ot(),r=e.WeakMap;return Xy=t(r)&&/native code/.test(String(r)),Xy}var Zy,vA;function Fw(){if(vA)return Zy;vA=1;var e=jw(),t=qw(),r=e("keys");return Zy=function(n){return r[n]||(r[n]=t(n))},Zy}var Jy,gA;function hc(){return gA||(gA=1,Jy={}),Jy}var Qy,mA;function ko(){if(mA)return Qy;mA=1;var e=hL(),t=wt(),r=Nt(),n=cs(),i=Pr(),o=Dw(),a=Fw(),u=hc(),l="Object already initialized",d=t.TypeError,f=t.WeakMap,h,p,v,m=function(w){return v(w)?p(w):h(w,{})},y=function(w){return function(E){var _;if(!r(E)||(_=p(E)).type!==w)throw new d("Incompatible receiver, "+w+" required");return _}};if(e||o.state){var x=o.state||(o.state=new f);x.get=x.get,x.has=x.has,x.set=x.set,h=function(w,E){if(x.has(w))throw new d(l);return E.facade=w,x.set(w,E),E},p=function(w){return x.get(w)||{}},v=function(w){return x.has(w)}}else{var b=a("state");u[b]=!0,h=function(w,E){if(i(w,b))throw new d(l);return E.facade=w,n(w,b,E),E},p=function(w){return i(w,b)?w[b]:{}},v=function(w){return i(w,b)}}return Qy={set:h,get:p,has:v,enforce:m,getterFor:y},Qy}var yA;function pL(){if(yA)return Gy.exports;yA=1;var e=ot(),t=it(),r=Ot(),n=Pr(),i=Ir(),o=Lw().CONFIGURABLE,a=dL(),u=ko(),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=Gy.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"),Gy.exports}var eb,bA;function Di(){if(bA)return eb;bA=1;var e=Ot(),t=ln(),r=pL(),n=Mw();return eb=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},eb}var tb={},rb,xA;function aQ(){if(xA)return rb;xA=1;var e=Math.ceil,t=Math.floor;return rb=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},rb}var nb,wA;function pc(){if(wA)return nb;wA=1;var e=aQ();return nb=function(t){var r=+t;return r!==r||r===0?0:e(r)},nb}var ib,_A;function sQ(){if(_A)return ib;_A=1;var e=pc(),t=Math.max,r=Math.min;return ib=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},ib}var ob,EA;function Bw(){if(EA)return ob;EA=1;var e=pc(),t=Math.min;return ob=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},ob}var ab,SA;function vc(){if(SA)return ab;SA=1;var e=Bw();return ab=function(t){return e(t.length)},ab}var sb,OA;function uQ(){if(OA)return sb;OA=1;var e=jo(),t=sQ(),r=vc(),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 sb={includes:n(!0),indexOf:n(!1)},sb}var ub,CA;function vL(){if(CA)return ub;CA=1;var e=ot(),t=Pr(),r=jo(),n=uQ().indexOf,i=hc(),o=e([].push);return ub=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},ub}var lb,RA;function $w(){return RA||(RA=1,lb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),lb}var IA;function zw(){if(IA)return tb;IA=1;var e=vL(),t=$w(),r=t.concat("length","prototype");return tb.f=Object.getOwnPropertyNames||function(i){return e(i,r)},tb}var cb={},PA;function gL(){return PA||(PA=1,cb.f=Object.getOwnPropertySymbols),cb}var fb,TA;function lQ(){if(TA)return fb;TA=1;var e=cc(),t=ot(),r=zw(),n=gL(),i=Tr(),o=t([].concat);return fb=e("Reflect","ownKeys")||function(u){var l=r.f(i(u)),d=n.f;return d?o(l,d(u)):l},fb}var db,NA;function cQ(){if(NA)return db;NA=1;var e=Pr(),t=lQ(),r=cL(),n=ln();return db=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))}},db}var hb,AA;function mL(){if(AA)return hb;AA=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 hb=n,hb}var pb,MA;function Zn(){if(MA)return pb;MA=1;var e=wt(),t=cL().f,r=cs(),n=Di(),i=Mw(),o=cQ(),a=mL();return pb=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)}},pb}var vb,DA;function Hw(){if(DA)return vb;DA=1;var e=zt(),t=e("toStringTag"),r={};return r[t]="z",vb=String(r)==="[object z]",vb}var gb,jA;function gc(){if(jA)return gb;jA=1;var e=Hw(),t=Ot(),r=Xn(),n=zt(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",u=function(l,d){try{return l[d]}catch{}};return gb=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},gb}var mb,qA;function ji(){if(qA)return mb;qA=1;var e=gc(),t=String;return mb=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},mb}var yb,kA;function yL(){return kA||(kA=1,yb=`
72
- \v\f\r                 \u2028\u2029\uFEFF`),yb}var bb,LA;function fQ(){if(LA)return bb;LA=1;var e=ot(),t=Mi(),r=ji(),n=yL(),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 bb={start:u(1),end:u(2),trim:u(3)},bb}var xb,FA;function dQ(){if(FA)return xb;FA=1;var e=wt(),t=it(),r=ot(),n=ji(),i=fQ().trim,o=yL(),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 xb=h?function(v,m){var y=i(n(v));return a(y,m>>>0||(f(d,y)?16:10))}:a,xb}var BA;function hQ(){if(BA)return _N;BA=1;var e=Zn(),t=dQ();return e({global:!0,forced:parseInt!==t},{parseInt:t}),_N}hQ();var $A={},wb,zA;function bL(){if(zA)return wb;zA=1;var e=vL(),t=$w();return wb=Object.keys||function(n){return e(n,t)},wb}var _b,HA;function pQ(){if(HA)return _b;HA=1;var e=Ir(),t=ot(),r=Jt(),n=it(),i=bL(),o=gL(),a=nL(),u=qo(),l=lc(),d=Object.assign,f=Object.defineProperty,h=t([].concat);return _b=!d||n(function(){if(e&&d({b:1},d(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var p={},v={},m=Symbol("assign detection"),y="abcdefghijklmnopqrst";return p[m]=7,y.split("").forEach(function(x){v[x]=x}),d({},p)[m]!==7||i(d({},v)).join("")!==y})?function(v,m){for(var y=u(v),x=arguments.length,b=1,w=o.f,E=a.f;x>b;)for(var _=l(arguments[b++]),S=w?h(i(_),w(_)):i(_),R=S.length,I=0,N;R>I;)N=S[I++],(!e||r(E,_,N))&&(y[N]=_[N]);return y}:d,_b}var UA;function vQ(){if(UA)return $A;UA=1;var e=Zn(),t=pQ();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),$A}vQ();var VA={},Eb,WA;function gQ(){if(WA)return Eb;WA=1;var e=Xn(),t=ot();return Eb=function(r){if(e(r)==="Function")return t(r)},Eb}var Sb,GA;function xL(){if(GA)return Sb;GA=1;var e=gQ(),t=us(),r=sc(),n=e(e.bind);return Sb=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},Sb}var Ob,KA;function mQ(){if(KA)return Ob;KA=1;var e=Xn();return Ob=Array.isArray||function(r){return e(r)==="Array"},Ob}var Cb,YA;function yQ(){if(YA)return Cb;YA=1;var e=ot(),t=it(),r=Ot(),n=gc(),i=cc(),o=dL(),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,Cb=!u||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,Cb}var Rb,XA;function bQ(){if(XA)return Rb;XA=1;var e=mQ(),t=yQ(),r=Nt(),n=zt(),i=n("species"),o=Array;return Rb=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},Rb}var Ib,ZA;function xQ(){if(ZA)return Ib;ZA=1;var e=bQ();return Ib=function(t,r){return new(e(t))(r===0?0:r)},Ib}var Pb,JA;function wQ(){if(JA)return Pb;JA=1;var e=Ir(),t=ln(),r=uc();return Pb=function(n,i,o){e?t.f(n,i,r(0,o)):n[i]=o},Pb}var Tb,QA;function wL(){if(QA)return Tb;QA=1;var e=xL(),t=lc(),r=qo(),n=vc(),i=xQ(),o=wQ(),a=function(u){var l=u===1,d=u===2,f=u===3,h=u===4,p=u===6,v=u===7,m=u===5||p;return function(y,x,b){for(var w=r(y),E=t(w),_=n(E),S=e(x,b),R=0,I=0,N=l?i(y,_):d||v?i(y,0):void 0,A,k;_>R;R++)if((m||R in E)&&(A=E[R],k=S(A,R,w),u))if(l)o(N,R,k);else if(k)switch(u){case 3:return!0;case 5:return A;case 6:return R;case 2:o(N,I++,A)}else switch(u){case 4:return!1;case 7:o(N,I++,A)}return p?-1:f||h?h:N}};return Tb={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Tb}var Nb,eM;function _Q(){if(eM)return Nb;eM=1;var e=it(),t=zt(),r=Nw(),n=t("species");return Nb=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},Nb}var tM;function EQ(){if(tM)return VA;tM=1;var e=Zn(),t=wL().filter,r=_Q(),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)}}),VA}EQ();var rM={},Ab,nM;function SQ(){if(nM)return Ab;nM=1;var e=Hw(),t=gc();return Ab=e?{}.toString:function(){return"[object "+t(this)+"]"},Ab}var iM;function OQ(){if(iM)return rM;iM=1;var e=Hw(),t=Di(),r=SQ();return e||t(Object.prototype,"toString",r,{unsafe:!0}),rM}OQ();var Mb={},oM;function CQ(){if(oM)return Mb;oM=1;var e=Ir(),t=fL(),r=ln(),n=Tr(),i=jo(),o=bL();return Mb.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},Mb}var Db,aM;function RQ(){if(aM)return Db;aM=1;var e=cc();return Db=e("document","documentElement"),Db}var jb,sM;function mc(){if(sM)return jb;sM=1;var e=Tr(),t=CQ(),r=$w(),n=hc(),i=RQ(),o=kw(),a=Fw(),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,jb=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,_)},jb}var qb,uM;function IQ(){if(uM)return qb;uM=1;var e=zt(),t=mc(),r=ln().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),qb=function(o){i[n][o]=!0},qb}var kb,lM;function fs(){return lM||(lM=1,kb={}),kb}var Lb,cM;function PQ(){if(cM)return Lb;cM=1;var e=it();return Lb=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Lb}var Fb,fM;function _L(){if(fM)return Fb;fM=1;var e=Pr(),t=Ot(),r=qo(),n=Fw(),i=PQ(),o=n("IE_PROTO"),a=Object,u=a.prototype;return Fb=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},Fb}var Bb,dM;function EL(){if(dM)return Bb;dM=1;var e=it(),t=Ot(),r=Nt(),n=mc(),i=_L(),o=Di(),a=zt(),u=dc(),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}),Bb={IteratorPrototype:f,BUGGY_SAFARI_ITERATORS:d},Bb}var $b,hM;function yc(){if(hM)return $b;hM=1;var e=ln().f,t=Pr(),r=zt(),n=r("toStringTag");return $b=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},$b}var zb,pM;function TQ(){if(pM)return zb;pM=1;var e=EL().IteratorPrototype,t=mc(),r=uc(),n=yc(),i=fs(),o=function(){return this};return zb=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},zb}var Hb,vM;function NQ(){if(vM)return Hb;vM=1;var e=ot(),t=us();return Hb=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},Hb}var Ub,gM;function AQ(){if(gM)return Ub;gM=1;var e=Nt();return Ub=function(t){return e(t)||t===null},Ub}var Vb,mM;function MQ(){if(mM)return Vb;mM=1;var e=AQ(),t=String,r=TypeError;return Vb=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},Vb}var Wb,yM;function SL(){if(yM)return Wb;yM=1;var e=NQ(),t=Nt(),r=Mi(),n=MQ();return Wb=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),Wb}var Gb,bM;function OL(){if(bM)return Gb;bM=1;var e=Zn(),t=Jt(),r=dc(),n=Lw(),i=Ot(),o=TQ(),a=_L(),u=SL(),l=yc(),d=cs(),f=Di(),h=zt(),p=fs(),v=EL(),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 Gb=function(I,N,A,k,L,$,j){o(A,N,k);var D=function(B){if(B===L&&Q)return Q;if(!b&&B&&B in X)return X[B];switch(B){case E:return function(){return new A(this,B)};case _:return function(){return new A(this,B)};case S:return function(){return new A(this,B)}}return function(){return new A(this)}},W=N+" Iterator",F=!1,X=I.prototype,Z=X[w]||X["@@iterator"]||L&&X[L],Q=!b&&Z||D(L),U=N==="Array"&&X.entries||Z,ee,ie,ue;if(U&&(ee=a(U.call(new I)),ee!==Object.prototype&&ee.next&&(!r&&a(ee)!==x&&(u?u(ee,x):i(ee[w])||f(ee,w,R)),l(ee,W,!0,!0),r&&(p[W]=R))),m&&L===_&&Z&&Z.name!==_&&(!r&&y?d(X,"name",_):(F=!0,Q=function(){return t(Z,this)})),L)if(ie={values:D(_),keys:$?Q:D(E),entries:D(S)},j)for(ue in ie)(b||F||!(ue in X))&&f(X,ue,ie[ue]);else e({target:N,proto:!0,forced:b||F},ie);return(!r||j)&&X[w]!==Q&&f(X,w,Q,{name:L}),p[N]=Q,ie},Gb}var Kb,xM;function CL(){return xM||(xM=1,Kb=function(e,t){return{value:e,done:t}}),Kb}var Yb,wM;function RL(){if(wM)return Yb;wM=1;var e=jo(),t=IQ(),r=fs(),n=ko(),i=ln().f,o=OL(),a=CL(),u=dc(),l=Ir(),d="Array Iterator",f=n.set,h=n.getterFor(d);Yb=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 Yb}RL();var _M={},Xb,EM;function IL(){if(EM)return Xb;EM=1;var e=ot(),t=pc(),r=ji(),n=Mi(),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 Xb={codeAt:u(!1),charAt:u(!0)},Xb}var SM;function DQ(){if(SM)return _M;SM=1;var e=IL().charAt,t=ji(),r=ko(),n=OL(),i=CL(),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))}),_M}DQ();var OM={},CM={},Zb,RM;function PL(){if(RM)return Zb;RM=1;var e=it();return Zb=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),Zb}var Jb,IM;function TL(){if(IM)return Jb;IM=1;var e=Di();return Jb=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},Jb}var Qb={exports:{}},e0={},t0,PM;function jQ(){if(PM)return t0;PM=1;var e=ot();return t0=e([].slice),t0}var TM;function qQ(){if(TM)return e0;TM=1;var e=Xn(),t=jo(),r=zw().f,n=jQ(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return e0.f=function(u){return i&&e(u)==="Window"?o(u):r(t(u))},e0}var r0,NM;function kQ(){if(NM)return r0;NM=1;var e=it();return r0=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),r0}var n0,AM;function LQ(){if(AM)return n0;AM=1;var e=it(),t=Nt(),r=Xn(),n=kQ(),i=Object.isExtensible,o=e(function(){});return n0=o||n?function(u){return!t(u)||n&&r(u)==="ArrayBuffer"?!1:i?i(u):!0}:i,n0}var MM;function Uw(){if(MM)return Qb.exports;MM=1;var e=Zn(),t=ot(),r=hc(),n=Nt(),i=Pr(),o=ln().f,a=zw(),u=qQ(),l=LQ(),d=qw(),f=PL(),h=!1,p=d("meta"),v=0,m=function(_){o(_,p,{value:{objectID:"O"+v++,weakData:{}}})},y=function(_,S){if(!n(_))return typeof _=="symbol"?_:(typeof _=="string"?"S":"P")+_;if(!i(_,p)){if(!l(_))return"F";if(!S)return"E";m(_)}return _[p].objectID},x=function(_,S){if(!i(_,p)){if(!l(_))return!0;if(!S)return!1;m(_)}return _[p].weakData},b=function(_){return f&&h&&l(_)&&!i(_,p)&&m(_),_},w=function(){E.enable=function(){},h=!0;var _=a.f,S=t([].splice),R={};R[p]=1,_(R).length&&(a.f=function(I){for(var N=_(I),A=0,k=N.length;A<k;A++)if(N[A]===p){S(N,A,1);break}return N},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:u.f}))},E=Qb.exports={enable:w,fastKey:y,getWeakData:x,onFreeze:b};return r[p]=!0,Qb.exports}var i0,DM;function FQ(){if(DM)return i0;DM=1;var e=zt(),t=fs(),r=e("iterator"),n=Array.prototype;return i0=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},i0}var o0,jM;function NL(){if(jM)return o0;jM=1;var e=gc(),t=ls(),r=ss(),n=fs(),i=zt(),o=i("iterator");return o0=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},o0}var a0,qM;function BQ(){if(qM)return a0;qM=1;var e=Jt(),t=us(),r=Tr(),n=Aw(),i=NL(),o=TypeError;return a0=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")},a0}var s0,kM;function $Q(){if(kM)return s0;kM=1;var e=Jt(),t=Tr(),r=ls();return s0=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},s0}var u0,LM;function AL(){if(LM)return u0;LM=1;var e=xL(),t=Jt(),r=Tr(),n=Aw(),i=FQ(),o=vc(),a=fc(),u=BQ(),l=NL(),d=$Q(),f=TypeError,h=function(v,m){this.stopped=v,this.result=m},p=h.prototype;return u0=function(v,m,y){var x=y&&y.that,b=!!(y&&y.AS_ENTRIES),w=!!(y&&y.IS_RECORD),E=!!(y&&y.IS_ITERATOR),_=!!(y&&y.INTERRUPTED),S=e(m,x),R,I,N,A,k,L,$,j=function(F){var X=R;return R=void 0,X&&d(X,"normal"),new h(!0,F)},D=function(F){return b?(r(F),_?S(F[0],F[1],j):S(F[0],F[1])):_?S(F,j):S(F)};if(w)R=v.iterator;else if(E)R=v;else{if(I=l(v),!I)throw new f(n(v)+" is not iterable");if(i(I)){for(N=0,A=o(v);A>N;N++)if(k=D(v[N]),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 W=$.value;try{k=D(W)}catch(F){if(R)d(R,"throw",F);else throw F}if(typeof k=="object"&&k&&a(p,k))return k}return new h(!1)},u0}var l0,FM;function ML(){if(FM)return l0;FM=1;var e=fc(),t=TypeError;return l0=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},l0}var c0,BM;function zQ(){if(BM)return c0;BM=1;var e=zt(),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 c0=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},c0}var f0,$M;function HQ(){if($M)return f0;$M=1;var e=Ot(),t=Nt(),r=SL();return f0=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},f0}var d0,zM;function UQ(){if(zM)return d0;zM=1;var e=Zn(),t=wt(),r=ot(),n=mL(),i=Di(),o=Uw(),a=AL(),u=ML(),l=Ot(),d=ss(),f=Nt(),h=it(),p=zQ(),v=yc(),m=HQ();return d0=function(y,x,b){var w=y.indexOf("Map")!==-1,E=y.indexOf("Weak")!==-1,_=w?"set":"add",S=t[y],R=S&&S.prototype,I=S,N={},A=function(F){var X=r(R[F]);i(R,F,F==="add"?function(Q){return X(this,Q===0?0:Q),this}:F==="delete"?function(Z){return E&&!f(Z)?!1:X(this,Z===0?0:Z)}:F==="get"?function(Q){return E&&!f(Q)?void 0:X(this,Q===0?0:Q)}:F==="has"?function(Q){return E&&!f(Q)?!1:X(this,Q===0?0:Q)}:function(Q,U){return X(this,Q===0?0:Q,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(F){new S(F)}),W=!E&&h(function(){for(var F=new S,X=5;X--;)F[_](X,X);return!F.has(-0)});D||(I=x(function(F,X){u(F,R);var Z=m(new S,F,I);return d(X)||a(X,Z[_],{that:Z,AS_ENTRIES:w}),Z}),I.prototype=R,R.constructor=I),(j||W)&&(A("delete"),A("has"),w&&A("get")),(W||$)&&A(_),E&&R.clear&&delete R.clear}return N[y]=I,e({global:!0,constructor:!0,forced:I!==S},N),v(I,y),E||b.setStrong(I,y,w),I},d0}var h0,HM;function VQ(){if(HM)return h0;HM=1;var e=ot(),t=TL(),r=Uw().getWeakData,n=ML(),i=Tr(),o=ss(),a=Nt(),u=AL(),l=wL(),d=Pr(),f=ko(),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}},h0={getConstructor:function(_,S,R,I){var N=_(function($,j){n($,A),h($,{type:S,id:x++,frozen:null}),o(j)||u(j,$[I],{that:$,AS_ENTRIES:R})}),A=N.prototype,k=p(S),L=function($,j,D){var W=k($),F=r(i(j),!0);return F===!0?b(W).set(j,D):F[W.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 W=r(j);return W===!0?b(D).has(j):W&&d(W,D.id)}}),t(A,R?{get:function(j){var D=k(this);if(a(j)){var W=r(j);if(W===!0)return b(D).get(j);if(W)return W[D.id]}},set:function(j,D){return L(this,j,D)}}:{add:function(j){return L(this,j,!0)}}),N}},h0}var UM;function WQ(){if(UM)return CM;UM=1;var e=PL(),t=wt(),r=ot(),n=TL(),i=Uw(),o=UQ(),a=VQ(),u=Nt(),l=ko().enforce,d=it(),f=hL(),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),N=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 W=l(this);W.frozen||(W.frozen=new E),k(this,j)?I(this,j,D):W.frozen.set(j,D)}else I(this,j,D);return this}})}else N()&&n(R,{set:function(j,D){var W;return p(j)&&(m(j)?W=x:y(j)&&(W=b)),I(this,j,D),W&&W(j),this}});return CM}var VM;function GQ(){return VM||(VM=1,WQ()),OM}GQ();var WM={},p0,GM;function KQ(){return GM||(GM=1,p0={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}),p0}var v0,KM;function YQ(){if(KM)return v0;KM=1;var e=kw(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return v0=r===Object.prototype?void 0:r,v0}var YM;function XQ(){if(YM)return WM;YM=1;var e=wt(),t=KQ(),r=YQ(),n=RL(),i=cs(),o=yc(),a=zt(),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"),WM}XQ();var g0,XM;function ZQ(){if(XM)return g0;XM=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=l||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function x(R,I,N){var A,k,L,$,j,D,W=0,F=!1,X=!1,Z=!0;if(typeof R!="function")throw new TypeError(e);I=S(I)||0,w(N)&&(F=!!N.leading,X="maxWait"in N,L=X?v(S(N.maxWait)||0,I):L,Z="trailing"in N?!!N.trailing:Z);function Q(G){var se=A,oe=k;return A=k=void 0,W=G,$=R.apply(oe,se),$}function U(G){return W=G,j=setTimeout(ue,I),F?Q(G):$}function ee(G){var se=G-D,oe=G-W,fe=I-se;return X?m(fe,L-oe):fe}function ie(G){var se=G-D,oe=G-W;return D===void 0||se>=I||se<0||X&&oe>=L}function ue(){var G=y();if(ie(G))return B(G);j=setTimeout(ue,ee(G))}function B(G){return j=void 0,Z&&A?Q(G):(A=k=void 0,$)}function V(){j!==void 0&&clearTimeout(j),W=0,A=D=k=j=void 0}function J(){return j===void 0?$:B(y())}function H(){var G=y(),se=ie(G);if(A=arguments,k=this,D=G,se){if(j===void 0)return U(D);if(X)return j=setTimeout(ue,I),Q(D)}return j===void 0&&(j=setTimeout(ue,I)),$}return H.cancel=V,H.flush=J,H}function b(R,I,N){var A=!0,k=!0;if(typeof R!="function")throw new TypeError(e);return w(N)&&(A="leading"in N?!!N.leading:A,k="trailing"in N?!!N.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 N=o.test(R);return N||a.test(R)?u(R.slice(2),N?2:8):i.test(R)?t:+R}return g0=b,g0}var JQ=ZQ();const ZM=Gn(JQ);var m0,JM;function QQ(){if(JM)return m0;JM=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,u=parseInt,l=typeof ht=="object"&&ht&&ht.Object===Object&&ht,d=typeof self=="object"&&self&&self.Object===Object&&self,f=l||d||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,m=Math.min,y=function(){return f.Date.now()};function x(S,R,I){var N,A,k,L,$,j,D=0,W=!1,F=!1,X=!0;if(typeof S!="function")throw new TypeError(e);R=_(R)||0,b(I)&&(W=!!I.leading,F="maxWait"in I,k=F?v(_(I.maxWait)||0,R):k,X="trailing"in I?!!I.trailing:X);function Z(H){var G=N,se=A;return N=A=void 0,D=H,L=S.apply(se,G),L}function Q(H){return D=H,$=setTimeout(ie,R),W?Z(H):L}function U(H){var G=H-j,se=H-D,oe=R-G;return F?m(oe,k-se):oe}function ee(H){var G=H-j,se=H-D;return j===void 0||G>=R||G<0||F&&se>=k}function ie(){var H=y();if(ee(H))return ue(H);$=setTimeout(ie,U(H))}function ue(H){return $=void 0,X&&N?Z(H):(N=A=void 0,L)}function B(){$!==void 0&&clearTimeout($),D=0,N=j=A=$=void 0}function V(){return $===void 0?L:ue(y())}function J(){var H=y(),G=ee(H);if(N=arguments,A=this,j=H,G){if($===void 0)return Q(j);if(F)return $=setTimeout(ie,R),Z(j)}return $===void 0&&($=setTimeout(ie,R)),L}return J.cancel=B,J.flush=V,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 m0=x,m0}var eee=QQ();const QM=Gn(eee);var y0,eD;function tee(){if(eD)return y0;eD=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(pe,de){return pe==null?void 0:pe[de]}function f(pe){var de=!1;if(pe!=null&&typeof pe.toString!="function")try{de=!!(pe+"")}catch{}return de}var h=Array.prototype,p=Function.prototype,v=Object.prototype,m=l["__core-js_shared__"],y=(function(){var pe=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||"");return pe?"Symbol(src)_1."+pe:""})(),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=G(l,"Map"),R=G(Object,"create");function I(pe){var de=-1,_e=pe?pe.length:0;for(this.clear();++de<_e;){var Re=pe[de];this.set(Re[0],Re[1])}}function N(){this.__data__=R?R(null):{}}function A(pe){return this.has(pe)&&delete this.__data__[pe]}function k(pe){var de=this.__data__;if(R){var _e=de[pe];return _e===t?void 0:_e}return b.call(de,pe)?de[pe]:void 0}function L(pe){var de=this.__data__;return R?de[pe]!==void 0:b.call(de,pe)}function $(pe,de){var _e=this.__data__;return _e[pe]=R&&de===void 0?t:de,this}I.prototype.clear=N,I.prototype.delete=A,I.prototype.get=k,I.prototype.has=L,I.prototype.set=$;function j(pe){var de=-1,_e=pe?pe.length:0;for(this.clear();++de<_e;){var Re=pe[de];this.set(Re[0],Re[1])}}function D(){this.__data__=[]}function W(pe){var de=this.__data__,_e=V(de,pe);if(_e<0)return!1;var Re=de.length-1;return _e==Re?de.pop():_.call(de,_e,1),!0}function F(pe){var de=this.__data__,_e=V(de,pe);return _e<0?void 0:de[_e][1]}function X(pe){return V(this.__data__,pe)>-1}function Z(pe,de){var _e=this.__data__,Re=V(_e,pe);return Re<0?_e.push([pe,de]):_e[Re][1]=de,this}j.prototype.clear=D,j.prototype.delete=W,j.prototype.get=F,j.prototype.has=X,j.prototype.set=Z;function Q(pe){var de=-1,_e=pe?pe.length:0;for(this.clear();++de<_e;){var Re=pe[de];this.set(Re[0],Re[1])}}function U(){this.__data__={hash:new I,map:new(S||j),string:new I}}function ee(pe){return H(this,pe).delete(pe)}function ie(pe){return H(this,pe).get(pe)}function ue(pe){return H(this,pe).has(pe)}function B(pe,de){return H(this,pe).set(pe,de),this}Q.prototype.clear=U,Q.prototype.delete=ee,Q.prototype.get=ie,Q.prototype.has=ue,Q.prototype.set=B;function V(pe,de){for(var _e=pe.length;_e--;)if(K(pe[_e][0],de))return _e;return-1}function J(pe){if(!be(pe)||oe(pe))return!1;var de=he(pe)||f(pe)?E:o;return de.test(fe(pe))}function H(pe,de){var _e=pe.__data__;return se(de)?_e[typeof de=="string"?"string":"hash"]:_e.map}function G(pe,de){var _e=d(pe,de);return J(_e)?_e:void 0}function se(pe){var de=typeof pe;return de=="string"||de=="number"||de=="symbol"||de=="boolean"?pe!=="__proto__":pe===null}function oe(pe){return!!y&&y in pe}function fe(pe){if(pe!=null){try{return x.call(pe)}catch{}try{return pe+""}catch{}}return""}function ne(pe,de){if(typeof pe!="function"||de&&typeof de!="function")throw new TypeError(e);var _e=function(){var Re=arguments,Ze=de?de.apply(this,Re):Re[0],ze=_e.cache;if(ze.has(Ze))return ze.get(Ze);var Fe=pe.apply(this,Re);return _e.cache=ze.set(Ze,Fe),Fe};return _e.cache=new(ne.Cache||Q),_e}ne.Cache=Q;function K(pe,de){return pe===de||pe!==pe&&de!==de}function he(pe){var de=be(pe)?w.call(pe):"";return de==r||de==n}function be(pe){var de=typeof pe;return!!pe&&(de=="object"||de=="function")}return y0=ne,y0}var ree=tee();const nee=Gn(ree);var wi=[],iee=function(){return wi.some(function(e){return e.activeTargets.length>0})},oee=function(){return wi.some(function(e){return e.skippedTargets.length>0})},tD="ResizeObserver loop completed with undelivered notifications.",aee=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:tD}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=tD),window.dispatchEvent(e)},Ka;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Ka||(Ka={}));var _i=function(e){return Object.freeze(e)},see=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,_i(this)}return e})(),DL=(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,_i(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})(),Vw=function(e){return e instanceof SVGElement&&"getBBox"in e},jL=function(e){if(Vw(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)},rD=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)},uee=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},La=typeof window<"u"?window:{},Nu=new WeakMap,nD=/auto|scroll/,lee=/^tb|vertical/,cee=/msie|trident/i.test(La.navigator&&La.navigator.userAgent),Xr=function(e){return parseFloat(e||"0")},bo=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new see((r?t:e)||0,(r?e:t)||0)},iD=_i({devicePixelContentBoxSize:bo(),borderBoxSize:bo(),contentBoxSize:bo(),contentRect:new DL(0,0,0,0)}),qL=function(e,t){if(t===void 0&&(t=!1),Nu.has(e)&&!t)return Nu.get(e);if(jL(e))return Nu.set(e,iD),iD;var r=getComputedStyle(e),n=Vw(e)&&e.ownerSVGElement&&e.getBBox(),i=!cee&&r.boxSizing==="border-box",o=lee.test(r.writingMode||""),a=!n&&nD.test(r.overflowY||""),u=!n&&nD.test(r.overflowX||""),l=n?0:Xr(r.paddingTop),d=n?0:Xr(r.paddingRight),f=n?0:Xr(r.paddingBottom),h=n?0:Xr(r.paddingLeft),p=n?0:Xr(r.borderTopWidth),v=n?0:Xr(r.borderRightWidth),m=n?0:Xr(r.borderBottomWidth),y=n?0:Xr(r.borderLeftWidth),x=h+d,b=l+f,w=y+v,E=p+m,_=u?e.offsetHeight-E-e.clientHeight:0,S=a?e.offsetWidth-w-e.clientWidth:0,R=i?x+w:0,I=i?b+E:0,N=n?n.width:Xr(r.width)-R-S,A=n?n.height:Xr(r.height)-I-_,k=N+x+S+w,L=A+b+_+E,$=_i({devicePixelContentBoxSize:bo(Math.round(N*devicePixelRatio),Math.round(A*devicePixelRatio),o),borderBoxSize:bo(k,L,o),contentBoxSize:bo(N,A,o),contentRect:new DL(h,l,N,A)});return Nu.set(e,$),$},kL=function(e,t,r){var n=qL(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case Ka.DEVICE_PIXEL_CONTENT_BOX:return a;case Ka.BORDER_BOX:return i;default:return o}},fee=(function(){function e(t){var r=qL(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=_i([r.borderBoxSize]),this.contentBoxSize=_i([r.contentBoxSize]),this.devicePixelContentBoxSize=_i([r.devicePixelContentBoxSize])}return e})(),LL=function(e){if(jL(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},dee=function(){var e=1/0,t=[];wi.forEach(function(a){if(a.activeTargets.length!==0){var u=[];a.activeTargets.forEach(function(d){var f=new fee(d.target),h=LL(d.target);u.push(f),d.lastReportedSize=kL(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},oD=function(e){wi.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(LL(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},hee=function(){var e=0;for(oD(e);iee();)e=dee(),oD(e);return oee()&&aee(),e>0},b0,FL=[],pee=function(){return FL.splice(0).forEach(function(e){return e()})},vee=function(e){if(!b0){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return pee()}).observe(r,n),b0=function(){r.textContent="".concat(t?t--:t++)}}FL.push(e),b0()},gee=function(e){vee(function(){requestAnimationFrame(e)})},Uu=0,mee=function(){return!!Uu},yee=250,bee={attributes:!0,characterData:!0,childList:!0,subtree:!0},aD=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sD=function(e){return e===void 0&&(e=0),Date.now()+e},x0=!1,xee=(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=yee),!x0){x0=!0;var n=sD(t);gee(function(){var i=!1;try{i=hee()}finally{if(x0=!1,t=n-sD(),!mee())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,bee)};document.body?r():La.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),aD.forEach(function(r){return La.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),aD.forEach(function(r){return La.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),vx=new xee,uD=function(e){!Uu&&e>0&&vx.start(),Uu+=e,!Uu&&vx.stop()},wee=function(e){return!Vw(e)&&!uee(e)&&getComputedStyle(e).display==="inline"},_ee=(function(){function e(t,r){this.target=t,this.observedBox=r||Ka.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=kL(this.target,this.observedBox,!0);return wee(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Eee=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Au=new WeakMap,lD=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Mu=(function(){function e(){}return e.connect=function(t,r){var n=new Eee(t,r);Au.set(t,n)},e.observe=function(t,r,n){var i=Au.get(t),o=i.observationTargets.length===0;lD(i.observationTargets,r)<0&&(o&&wi.push(i),i.observationTargets.push(new _ee(r,n&&n.box)),uD(1),vx.schedule())},e.unobserve=function(t,r){var n=Au.get(t),i=lD(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&wi.splice(wi.indexOf(n),1),n.observationTargets.splice(i,1),uD(-1))},e.disconnect=function(t){var r=this,n=Au.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),See=(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.");Mu.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(!rD(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Mu.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(!rD(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Mu.unobserve(this,t)},e.prototype.disconnect=function(){Mu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),w0,cD;function Oee(){if(cD)return w0;cD=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return w0=e,w0}var Cee=Oee();const BL=Gn(Cee);var fD={},_0,dD;function Ree(){if(dD)return _0;dD=1;var e=us(),t=qo(),r=lc(),n=vc(),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 _0={left:a(!1),right:a(!0)},_0}var E0,hD;function Iee(){if(hD)return E0;hD=1;var e=it();return E0=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},E0}var S0,pD;function Pee(){if(pD)return S0;pD=1;var e=wt(),t=iL(),r=Xn(),n=function(i){return t.slice(0,i.length)===i};return S0=(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"})(),S0}var O0,vD;function Tee(){if(vD)return O0;vD=1;var e=Pee();return O0=e==="NODE",O0}var gD;function Nee(){if(gD)return fD;gD=1;var e=Zn(),t=Ree().left,r=Iee(),n=Nw(),i=Tee(),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)}}),fD}Nee();var mD={},C0,yD;function $L(){if(yD)return C0;yD=1;var e=Tr();return C0=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},C0}var R0,bD;function Aee(){if(bD)return R0;bD=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 R0={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},R0}var I0,xD;function Mee(){if(xD)return I0;xD=1;var e=it(),t=wt(),r=t.RegExp;return I0=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
73
- `)&&n.flags==="s")}),I0}var P0,wD;function Dee(){if(wD)return P0;wD=1;var e=it(),t=wt(),r=t.RegExp;return P0=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),P0}var T0,_D;function Ww(){if(_D)return T0;_D=1;var e=Jt(),t=ot(),r=ji(),n=$L(),i=Aee(),o=jw(),a=mc(),u=ko().get,l=Mee(),d=Dee(),f=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,v=t("".charAt),m=t("".indexOf),y=t("".replace),x=t("".slice),b=(function(){var R=/a/,I=/b*/g;return e(h,R,"a"),e(h,I,"a"),R.lastIndex!==0||I.lastIndex!==0})(),w=i.BROKEN_CARET,E=/()??/.exec("")[1]!==void 0,_=b||E||w||l||d,S=function(R,I){for(var N=R.groups=a(null),A=0;A<I.length;A++){var k=I[A];N[k[0]]=R[k[1]]}};return _&&(p=function(I){var N=this,A=u(N),k=r(I),L=A.raw,$,j,D;if(L)return L.lastIndex=N.lastIndex,$=e(p,L,k),N.lastIndex=L.lastIndex,$&&A.groups&&S($,A.groups),$;var W=A.groups,F=w&&N.sticky,X=e(n,N),Z=N.source,Q=0,U=k;if(F){X=y(X,"y",""),m(X,"g")===-1&&(X+="g"),U=x(k,N.lastIndex);var ee=N.lastIndex>0&&v(k,N.lastIndex-1);N.lastIndex>0&&(!N.multiline||N.multiline&&ee!==`
74
- `&&ee!=="\r"&&ee!=="\u2028"&&ee!=="\u2029")&&(Z="(?: (?:"+Z+"))",U=" "+U,Q++),j=new RegExp("^(?:"+Z+")",X)}E&&(j=new RegExp("^"+Z+"$(?!\\s)",X)),b&&(D=N.lastIndex);var ie=e(h,F?j:N,U);return F?ie?(ie.input=k,ie[0]=x(ie[0],Q),ie.index=N.lastIndex,N.lastIndex+=ie[0].length):N.lastIndex=0:b&&ie&&(N.lastIndex=N.global?ie.index+ie[0].length:D),E&&ie&&ie.length>1&&e(f,ie[0],j,function(){for(var ue=1;ue<arguments.length-2;ue++)arguments[ue]===void 0&&(ie[ue]=void 0)}),ie&&W&&S(ie,W),ie}),T0=p,T0}var ED;function zL(){if(ED)return mD;ED=1;var e=Zn(),t=Ww();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),mD}zL();var SD={},N0,OD;function HL(){if(OD)return N0;OD=1,zL();var e=Jt(),t=Di(),r=Ww(),n=it(),i=zt(),o=cs(),a=i("species"),u=RegExp.prototype;return N0=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)},N0}var A0,CD;function UL(){if(CD)return A0;CD=1;var e=IL().charAt;return A0=function(t,r,n){return r+(n&&e(t,r).length||1)},A0}var M0,RD;function jee(){if(RD)return M0;RD=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 M0={correct:n},M0}var D0,ID;function VL(){if(ID)return D0;ID=1;var e=Jt(),t=Pr(),r=fc(),n=jee(),i=$L(),o=RegExp.prototype;return D0=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},D0}var j0,PD;function WL(){if(PD)return j0;PD=1;var e=Jt(),t=Tr(),r=Ot(),n=Xn(),i=Ww(),o=TypeError;return j0=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")},j0}var TD;function qee(){if(TD)return SD;TD=1;var e=Jt(),t=ot(),r=HL(),n=Tr(),i=Nt(),o=Bw(),a=ji(),u=Mi(),l=ls(),d=UL(),f=VL(),h=WL(),p=t("".indexOf);return r("match",function(v,m,y){return[function(b){var w=u(this),E=i(b)?l(b,v):void 0;return E?e(E,b,w):new RegExp(b)[v](a(w))},function(x){var b=n(this),w=a(x),E=y(m,b,w);if(E.done)return E.value;var _=a(f(b));if(!~p(_,"g"))return h(b,w);var S=!!~p(_,"u")||!!~p(_,"v");b.lastIndex=0;for(var R=[],I=0,N;(N=h(b,w))!==null;){var A=a(N[0]);R[I]=A,A===""&&(b.lastIndex=d(w,o(b.lastIndex),S)),I++}return I===0?null:R}]}),SD}qee();var ND={},q0,AD;function kee(){if(AD)return q0;AD=1;var e=pL(),t=ln();return q0=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)},q0}var MD;function Lee(){if(MD)return ND;MD=1;var e=Ir(),t=Lw().EXISTS,r=ot(),n=kee(),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""}}}),ND}Lee();var DD={},k0,jD;function Fee(){if(jD)return k0;jD=1;var e=sc(),t=Function.prototype,r=t.apply,n=t.call;return k0=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),k0}var L0,qD;function Bee(){if(qD)return L0;qD=1;var e=ot(),t=qo(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;return L0=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})},L0}var kD;function $ee(){if(kD)return DD;kD=1;var e=Fee(),t=Jt(),r=ot(),n=HL(),i=it(),o=Tr(),a=Ot(),u=Nt(),l=pc(),d=Bw(),f=ji(),h=Mi(),p=UL(),v=ls(),m=Bee(),y=VL(),x=WL(),b=zt(),w=b("replace"),E=Math.max,_=Math.min,S=r([].concat),R=r([].push),I=r("".indexOf),N=r("".slice),A=function(j){return j===void 0?j:String(j)},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,W){var F=L?"$":"$0";return[function(Z,Q){var U=h(this),ee=u(Z)?v(Z,w):void 0;return ee?t(ee,Z,U,Q):t(D,f(U),Z,Q)},function(X,Z){var Q=o(this),U=f(X),ee=a(Z);ee||(Z=f(Z));var ie=f(y(Q));if(typeof Z=="string"&&!~I(Z,F)&&!~I(Z,"$<")&&!~I(ie,"y")){var ue=W(D,Q,U,Z);if(ue.done)return ue.value}var B=!!~I(ie,"g"),V;B&&(V=!!~I(ie,"u")||!!~I(ie,"v"),Q.lastIndex=0);for(var J=[],H;H=x(Q,U),!(H===null||(R(J,H),!B));){var G=f(H[0]);G===""&&(Q.lastIndex=p(U,d(Q.lastIndex),V))}for(var se="",oe=0,fe=0;fe<J.length;fe++){H=J[fe];for(var ne=f(H[0]),K=E(_(l(H.index),U.length),0),he=[],be,pe=1;pe<H.length;pe++)R(he,A(H[pe]));var de=H.groups;if(ee){var _e=S([ne],he,K,U);de!==void 0&&R(_e,de),be=f(e(Z,void 0,_e))}else be=m(ne,U,K,he,de,Z);K>=oe&&(se+=N(U,oe,K)+be,oe=K+ne.length)}return se+N(U,oe)}]},!$||!k||L),DD}$ee();function Bn(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Vu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var uo=null,LD=null;BL&&window.addEventListener("resize",function(){LD!==window.devicePixelRatio&&(LD=window.devicePixelRatio,uo=null)});function FD(e){if(uo===null){var t=Vu(e);if(typeof t>"u")return uo=0,uo;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),uo=i}return uo}var yl=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=Bn(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=Vu(i.el),u=Bn(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=ZM(this.recalculate.bind(this),64),this.onMouseMove=ZM(this.onMouseMove.bind(this),64),this.hideScrollbars=QM(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=QM(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=nee(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=Vu(n),a=Bn(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),BL&&(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=Bn(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||See;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=Bn(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=Vu(this.el),a=Bn(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=Bn(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:FD(this.el)}catch{return FD(this.el)}},t.removeListeners=function(){var n=this,i=Bn(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})();yl.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};yl.instances=new WeakMap;function BD(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 Du(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BD(Object(r),!0).forEach(function(n){zee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zee(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bl(){return bl=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},bl.apply(this,arguments)}function Hee(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 Uee(e,t){if(e==null)return{};var r=Hee(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 Vee=["children","scrollableNodeProps","tag"],Wee=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},bc=P.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=Uee(e,Vee),l=a,d,f=P.useRef(),h=P.useRef(),p=P.useRef(),v={},m={},y=[];return Object.keys(u).forEach(function(x){Object.prototype.hasOwnProperty.call(yl.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:
108
+ */var gM;function cse(){return gM||(gM=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,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function _(Z){return typeof Z=="string"||typeof Z=="function"||Z===n||Z===u||Z===o||Z===i||Z===h||Z===p||typeof Z=="object"&&Z!==null&&(Z.$$typeof===y||Z.$$typeof===v||Z.$$typeof===a||Z.$$typeof===s||Z.$$typeof===d||Z.$$typeof===g||Z.$$typeof===w||Z.$$typeof===x||Z.$$typeof===m)}function S(Z){if(typeof Z=="object"&&Z!==null){var J=Z.$$typeof;switch(J){case t:var ae=Z.type;switch(ae){case c:case u:case n:case o:case i:case h:return ae;default:var he=ae&&ae.$$typeof;switch(he){case s:case d:case y:case v:case a:return he;default:return J}}case r:return J}}}var E=c,I=u,N=s,T=a,M=t,z=d,j=n,W=y,U=v,A=r,K=o,V=i,te=h,G=!1;function re(Z){return G||(G=!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.")),P(Z)||S(Z)===c}function P(Z){return S(Z)===u}function B(Z){return S(Z)===s}function X(Z){return S(Z)===a}function Q(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function D(Z){return S(Z)===d}function $(Z){return S(Z)===n}function H(Z){return S(Z)===y}function q(Z){return S(Z)===v}function Y(Z){return S(Z)===r}function ie(Z){return S(Z)===o}function ne(Z){return S(Z)===i}function pe(Z){return S(Z)===h}ht.AsyncMode=E,ht.ConcurrentMode=I,ht.ContextConsumer=N,ht.ContextProvider=T,ht.Element=M,ht.ForwardRef=z,ht.Fragment=j,ht.Lazy=W,ht.Memo=U,ht.Portal=A,ht.Profiler=K,ht.StrictMode=V,ht.Suspense=te,ht.isAsyncMode=re,ht.isConcurrentMode=P,ht.isContextConsumer=B,ht.isContextProvider=X,ht.isElement=Q,ht.isForwardRef=D,ht.isFragment=$,ht.isLazy=H,ht.isMemo=q,ht.isPortal=Y,ht.isProfiler=ie,ht.isStrictMode=ne,ht.isSuspense=pe,ht.isValidElementType=_,ht.typeOf=S})()),ht}var mM;function Sz(){return mM||(mM=1,process.env.NODE_ENV==="production"?su.exports=lse():su.exports=cse()),su.exports}/*
109
+ object-assign
110
+ (c) Sindre Sorhus
111
+ @license MIT
112
+ */var q0,bM;function use(){if(bM)return q0;bM=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 q0=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},q0}var z0,yM;function KS(){if(yM)return z0;yM=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return z0=e,z0}var L0,xM;function Ez(){return xM||(xM=1,L0=Function.call.bind(Object.prototype.hasOwnProperty)),L0}var B0,wM;function dse(){if(wM)return B0;wM=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=KS(),r={},n=Ez();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(y){h=y}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={})},B0=i,B0}var F0,SM;function fse(){if(SM)return F0;SM=1;var e=Sz(),t=use(),r=KS(),n=Ez(),i=dse(),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 F0=function(s,c){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function h(P){var B=P&&(u&&P[u]||P[d]);if(typeof B=="function")return B}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:x(),arrayOf:_,element:S(),elementType:E(),instanceOf:I,node:z(),objectOf:T,oneOf:N,oneOfType:M,shape:W,exact:U};function y(P,B){return P===B?P!==0||1/P===1/B:P!==P&&B!==B}function m(P,B){this.message=P,this.data=B&&typeof B=="object"?B:{},this.stack=""}m.prototype=Error.prototype;function g(P){if(process.env.NODE_ENV!=="production")var B={},X=0;function Q($,H,q,Y,ie,ne,pe){if(Y=Y||p,ne=ne||q,pe!==r){if(c){var Z=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 Z.name="Invariant Violation",Z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var J=Y+":"+q;!B[J]&&X<3&&(o("You are manually calling a React.PropTypes validation function for the `"+ne+"` prop on `"+Y+"`. 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."),B[J]=!0,X++)}}return H[q]==null?$?H[q]===null?new m("The "+ie+" `"+ne+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new m("The "+ie+" `"+ne+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:P(H,q,Y,ie,ne)}var D=Q.bind(null,!1);return D.isRequired=Q.bind(null,!0),D}function w(P){function B(X,Q,D,$,H,q){var Y=X[Q],ie=V(Y);if(ie!==P){var ne=te(Y);return new m("Invalid "+$+" `"+H+"` of type "+("`"+ne+"` supplied to `"+D+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return g(B)}function x(){return g(a)}function _(P){function B(X,Q,D,$,H){if(typeof P!="function")return new m("Property `"+H+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var q=X[Q];if(!Array.isArray(q)){var Y=V(q);return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected an array."))}for(var ie=0;ie<q.length;ie++){var ne=P(q,ie,D,$,H+"["+ie+"]",r);if(ne instanceof Error)return ne}return null}return g(B)}function S(){function P(B,X,Q,D,$){var H=B[X];if(!s(H)){var q=V(H);return new m("Invalid "+D+" `"+$+"` of type "+("`"+q+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return g(P)}function E(){function P(B,X,Q,D,$){var H=B[X];if(!e.isValidElementType(H)){var q=V(H);return new m("Invalid "+D+" `"+$+"` of type "+("`"+q+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return g(P)}function I(P){function B(X,Q,D,$,H){if(!(X[Q]instanceof P)){var q=P.name||p,Y=re(X[Q]);return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected ")+("instance of `"+q+"`."))}return null}return g(B)}function N(P){if(!Array.isArray(P))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 B(X,Q,D,$,H){for(var q=X[Q],Y=0;Y<P.length;Y++)if(y(q,P[Y]))return null;var ie=JSON.stringify(P,function(pe,Z){var J=te(Z);return J==="symbol"?String(Z):Z});return new m("Invalid "+$+" `"+H+"` of value `"+String(q)+"` "+("supplied to `"+D+"`, expected one of "+ie+"."))}return g(B)}function T(P){function B(X,Q,D,$,H){if(typeof P!="function")return new m("Property `"+H+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type "+("`"+Y+"` supplied to `"+D+"`, expected an object."));for(var ie in q)if(n(q,ie)){var ne=P(q,ie,D,$,H+"."+ie,r);if(ne instanceof Error)return ne}return null}return g(B)}function M(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<P.length;B++){var X=P[B];if(typeof X!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(X)+" at index "+B+"."),a}function Q(D,$,H,q,Y){for(var ie=[],ne=0;ne<P.length;ne++){var pe=P[ne],Z=pe(D,$,H,q,Y,r);if(Z==null)return null;Z.data&&n(Z.data,"expectedType")&&ie.push(Z.data.expectedType)}var J=ie.length>0?", expected one of type ["+ie.join(", ")+"]":"";return new m("Invalid "+q+" `"+Y+"` supplied to "+("`"+H+"`"+J+"."))}return g(Q)}function z(){function P(B,X,Q,D,$){return A(B[X])?null:new m("Invalid "+D+" `"+$+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return g(P)}function j(P,B,X,Q,D){return new m((P||"React class")+": "+B+" type `"+X+"."+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function W(P){function B(X,Q,D,$,H){var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type `"+Y+"` "+("supplied to `"+D+"`, expected `object`."));for(var ie in P){var ne=P[ie];if(typeof ne!="function")return j(D,$,H,ie,te(ne));var pe=ne(q,ie,D,$,H+"."+ie,r);if(pe)return pe}return null}return g(B)}function U(P){function B(X,Q,D,$,H){var q=X[Q],Y=V(q);if(Y!=="object")return new m("Invalid "+$+" `"+H+"` of type `"+Y+"` "+("supplied to `"+D+"`, expected `object`."));var ie=t({},X[Q],P);for(var ne in ie){var pe=P[ne];if(n(P,ne)&&typeof pe!="function")return j(D,$,H,ne,te(pe));if(!pe)return new m("Invalid "+$+" `"+H+"` key `"+ne+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(X[Q],null," ")+`
113
+ Valid keys: `+JSON.stringify(Object.keys(P),null," "));var Z=pe(q,ne,D,$,H+"."+ne,r);if(Z)return Z}return null}return g(B)}function A(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(A);if(P===null||s(P))return!0;var B=h(P);if(B){var X=B.call(P),Q;if(B!==P.entries){for(;!(Q=X.next()).done;)if(!A(Q.value))return!1}else for(;!(Q=X.next()).done;){var D=Q.value;if(D&&!A(D[1]))return!1}}else return!1;return!0;default:return!1}}function K(P,B){return P==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function V(P){var B=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":K(B,P)?"symbol":B}function te(P){if(typeof P>"u"||P===null)return""+P;var B=V(P);if(B==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return B}function G(P){var B=te(P);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function re(P){return!P.constructor||!P.constructor.name?p:P.constructor.name}return v.checkPropTypes=i,v.resetWarningCache=i.resetWarningCache,v.PropTypes=v,v},F0}var $0,EM;function hse(){if(EM)return $0;EM=1;var e=KS();function t(){}function r(){}return r.resetWarningCache=t,$0=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},$0}var _M;function pse(){if(_M)return au.exports;if(_M=1,process.env.NODE_ENV!=="production"){var e=Sz(),t=!0;au.exports=fse()(e.isElement,t)}else au.exports=hse()();return au.exports}var vse=pse();const Fs=Qi(vse);var OM={},$s,CM;function Gt(){if(CM)return $s;CM=1;var e=function(t){return t&&t.Math===Math&&t};return $s=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof jt=="object"&&jt)||e(typeof $s=="object"&&$s)||(function(){return this})()||Function("return this")(),$s}var V0={},H0,IM;function St(){return IM||(IM=1,H0=function(e){try{return!!e()}catch{return!0}}),H0}var W0,RM;function Wn(){if(RM)return W0;RM=1;var e=St();return W0=!e(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),W0}var U0,NM;function ef(){if(NM)return U0;NM=1;var e=St();return U0=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),U0}var G0,TM;function Ur(){if(TM)return G0;TM=1;var e=ef(),t=Function.prototype.call;return G0=e?t.bind(t):function(){return t.apply(t,arguments)},G0}var K0={},PM;function _z(){if(PM)return K0;PM=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return K0.f=r?function(i){var o=t(this,i);return!!o&&o.enumerable}:e,K0}var Y0,MM;function YS(){return MM||(MM=1,Y0=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),Y0}var X0,kM;function yt(){if(kM)return X0;kM=1;var e=ef(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return X0=e?n:function(i){return function(){return r.apply(i,arguments)}},X0}var Z0,AM;function to(){if(AM)return Z0;AM=1;var e=yt(),t=e({}.toString),r=e("".slice);return Z0=function(n){return r(t(n),8,-1)},Z0}var J0,DM;function tf(){if(DM)return J0;DM=1;var e=yt(),t=St(),r=to(),n=Object,i=e("".split);return J0=t(function(){return!n("z").propertyIsEnumerable(0)})?function(o){return r(o)==="String"?i(o,""):n(o)}:n,J0}var Q0,jM;function ql(){return jM||(jM=1,Q0=function(e){return e==null}),Q0}var ey,qM;function qo(){if(qM)return ey;qM=1;var e=ql(),t=TypeError;return ey=function(r){if(e(r))throw new t("Can't call method on "+r);return r},ey}var ty,zM;function Ka(){if(zM)return ty;zM=1;var e=tf(),t=qo();return ty=function(r){return e(t(r))},ty}var ry,LM;function er(){if(LM)return ry;LM=1;var e=typeof document=="object"&&document.all;return ry=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},ry}var ny,BM;function dr(){if(BM)return ny;BM=1;var e=er();return ny=function(t){return typeof t=="object"?t!==null:e(t)},ny}var iy,FM;function rf(){if(FM)return iy;FM=1;var e=Gt(),t=er(),r=function(n){return t(n)?n:void 0};return iy=function(n,i){return arguments.length<2?r(e[n]):e[n]&&e[n][i]},iy}var oy,$M;function nf(){if($M)return oy;$M=1;var e=yt();return oy=e({}.isPrototypeOf),oy}var ay,VM;function Oz(){if(VM)return ay;VM=1;var e=Gt(),t=e.navigator,r=t&&t.userAgent;return ay=r?String(r):"",ay}var sy,HM;function XS(){if(HM)return sy;HM=1;var e=Gt(),t=Oz(),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]))),sy=s,sy}var ly,WM;function Cz(){if(WM)return ly;WM=1;var e=XS(),t=St(),r=Gt(),n=r.String;return ly=!!Object.getOwnPropertySymbols&&!t(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&e&&e<41}),ly}var cy,UM;function Iz(){if(UM)return cy;UM=1;var e=Cz();return cy=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",cy}var uy,GM;function Rz(){if(GM)return uy;GM=1;var e=rf(),t=er(),r=nf(),n=Iz(),i=Object;return uy=n?function(o){return typeof o=="symbol"}:function(o){var a=e("Symbol");return t(a)&&r(a.prototype,i(o))},uy}var dy,KM;function ZS(){if(KM)return dy;KM=1;var e=String;return dy=function(t){try{return e(t)}catch{return"Object"}},dy}var fy,YM;function zl(){if(YM)return fy;YM=1;var e=er(),t=ZS(),r=TypeError;return fy=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")},fy}var hy,XM;function Ll(){if(XM)return hy;XM=1;var e=zl(),t=ql();return hy=function(r,n){var i=r[n];return t(i)?void 0:e(i)},hy}var py,ZM;function gse(){if(ZM)return py;ZM=1;var e=Ur(),t=er(),r=dr(),n=TypeError;return py=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")},py}var vy={exports:{}},gy,JM;function of(){return JM||(JM=1,gy=!1),gy}var my,QM;function JS(){if(QM)return my;QM=1;var e=Gt(),t=Object.defineProperty;return my=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch{e[r]=n}return n},my}var ek;function QS(){if(ek)return vy.exports;ek=1;var e=of(),t=Gt(),r=JS(),n="__core-js_shared__",i=vy.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"}),vy.exports}var by,tk;function eE(){if(tk)return by;tk=1;var e=QS();return by=function(t,r){return e[t]||(e[t]=r||{})},by}var yy,rk;function Ya(){if(rk)return yy;rk=1;var e=qo(),t=Object;return yy=function(r){return t(e(r))},yy}var xy,nk;function In(){if(nk)return xy;nk=1;var e=yt(),t=Ya(),r=e({}.hasOwnProperty);return xy=Object.hasOwn||function(i,o){return r(t(i),o)},xy}var wy,ik;function tE(){if(ik)return wy;ik=1;var e=yt(),t=0,r=Math.random(),n=e(1.1.toString);return wy=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++t+r,36)},wy}var Sy,ok;function Pr(){if(ok)return Sy;ok=1;var e=Gt(),t=eE(),r=In(),n=tE(),i=Cz(),o=Iz(),a=e.Symbol,s=t("wks"),c=o?a.for||a:a&&a.withoutSetter||n;return Sy=function(u){return r(s,u)||(s[u]=i&&r(a,u)?a[u]:c("Symbol."+u)),s[u]},Sy}var Ey,ak;function mse(){if(ak)return Ey;ak=1;var e=Ur(),t=dr(),r=Rz(),n=Ll(),i=gse(),o=Pr(),a=TypeError,s=o("toPrimitive");return Ey=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)},Ey}var _y,sk;function Nz(){if(sk)return _y;sk=1;var e=mse(),t=Rz();return _y=function(r){var n=e(r,"string");return t(n)?n:n+""},_y}var Oy,lk;function rE(){if(lk)return Oy;lk=1;var e=Gt(),t=dr(),r=e.document,n=t(r)&&t(r.createElement);return Oy=function(i){return n?r.createElement(i):{}},Oy}var Cy,ck;function Tz(){if(ck)return Cy;ck=1;var e=Wn(),t=St(),r=rE();return Cy=!e&&!t(function(){return Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a!==7}),Cy}var uk;function Pz(){if(uk)return V0;uk=1;var e=Wn(),t=Ur(),r=_z(),n=YS(),i=Ka(),o=Nz(),a=In(),s=Tz(),c=Object.getOwnPropertyDescriptor;return V0.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])},V0}var Iy={},Ry,dk;function Mz(){if(dk)return Ry;dk=1;var e=Wn(),t=St();return Ry=e&&t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Ry}var Ny,fk;function Rn(){if(fk)return Ny;fk=1;var e=dr(),t=String,r=TypeError;return Ny=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")},Ny}var hk;function Ii(){if(hk)return Iy;hk=1;var e=Wn(),t=Tz(),r=Mz(),n=Rn(),i=Nz(),o=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c="enumerable",u="configurable",d="writable";return Iy.f=e?r?function(p,v,y){if(n(p),v=i(v),n(y),typeof p=="function"&&v==="prototype"&&"value"in y&&d in y&&!y[d]){var m=s(p,v);m&&m[d]&&(p[v]=y.value,y={configurable:u in y?y[u]:m[u],enumerable:c in y?y[c]:m[c],writable:!1})}return a(p,v,y)}:a:function(p,v,y){if(n(p),v=i(v),n(y),t)try{return a(p,v,y)}catch{}if("get"in y||"set"in y)throw new o("Accessors not supported");return"value"in y&&(p[v]=y.value),p},Iy}var Ty,pk;function Bl(){if(pk)return Ty;pk=1;var e=Wn(),t=Ii(),r=YS();return Ty=e?function(n,i,o){return t.f(n,i,r(1,o))}:function(n,i,o){return n[i]=o,n},Ty}var Py={exports:{}},My,vk;function nE(){if(vk)return My;vk=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 My={EXISTS:i,PROPER:o,CONFIGURABLE:a},My}var ky,gk;function kz(){if(gk)return ky;gk=1;var e=yt(),t=er(),r=QS(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(i){return n(i)}),ky=r.inspectSource,ky}var Ay,mk;function Az(){if(mk)return Ay;mk=1;var e=Gt(),t=er(),r=e.WeakMap;return Ay=t(r)&&/native code/.test(String(r)),Ay}var Dy,bk;function iE(){if(bk)return Dy;bk=1;var e=eE(),t=tE(),r=e("keys");return Dy=function(n){return r[n]||(r[n]=t(n))},Dy}var jy,yk;function af(){return yk||(yk=1,jy={}),jy}var qy,xk;function Xa(){if(xk)return qy;xk=1;var e=Az(),t=Gt(),r=dr(),n=Bl(),i=In(),o=QS(),a=iE(),s=af(),c="Object already initialized",u=t.TypeError,d=t.WeakMap,h,p,v,y=function(x){return v(x)?p(x):h(x,{})},m=function(x){return function(_){var S;if(!r(_)||(S=p(_)).type!==x)throw new u("Incompatible receiver, "+x+" required");return S}};if(e||o.state){var g=o.state||(o.state=new d);g.get=g.get,g.has=g.has,g.set=g.set,h=function(x,_){if(g.has(x))throw new u(c);return _.facade=x,g.set(x,_),_},p=function(x){return g.get(x)||{}},v=function(x){return g.has(x)}}else{var w=a("state");s[w]=!0,h=function(x,_){if(i(x,w))throw new u(c);return _.facade=x,n(x,w,_),_},p=function(x){return i(x,w)?x[w]:{}},v=function(x){return i(x,w)}}return qy={set:h,get:p,has:v,enforce:y,getterFor:m},qy}var wk;function Dz(){if(wk)return Py.exports;wk=1;var e=yt(),t=St(),r=er(),n=In(),i=Wn(),o=nE().CONFIGURABLE,a=kz(),s=Xa(),c=s.enforce,u=s.get,d=String,h=Object.defineProperty,p=e("".slice),v=e("".replace),y=e([].join),m=i&&!t(function(){return h(function(){},"length",{value:8}).length!==8}),g=String(String).split("String"),w=Py.exports=function(x,_,S){p(d(_),0,7)==="Symbol("&&(_="["+v(d(_),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),S&&S.getter&&(_="get "+_),S&&S.setter&&(_="set "+_),(!n(x,"name")||o&&x.name!==_)&&(i?h(x,"name",{value:_,configurable:!0}):x.name=_),m&&S&&n(S,"arity")&&x.length!==S.arity&&h(x,"length",{value:S.arity});try{S&&n(S,"constructor")&&S.constructor?i&&h(x,"prototype",{writable:!1}):x.prototype&&(x.prototype=void 0)}catch{}var E=c(x);return n(E,"source")||(E.source=y(g,typeof _=="string"?_:"")),x};return Function.prototype.toString=w(function(){return r(this)&&u(this).source||a(this)},"toString"),Py.exports}var zy,Sk;function zo(){if(Sk)return zy;Sk=1;var e=er(),t=Ii(),r=Dz(),n=JS();return zy=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},zy}var Ly={},By,Ek;function bse(){if(Ek)return By;Ek=1;var e=Math.ceil,t=Math.floor;return By=Math.trunc||function(n){var i=+n;return(i>0?t:e)(i)},By}var Fy,_k;function sf(){if(_k)return Fy;_k=1;var e=bse();return Fy=function(t){var r=+t;return r!==r||r===0?0:e(r)},Fy}var $y,Ok;function yse(){if(Ok)return $y;Ok=1;var e=sf(),t=Math.max,r=Math.min;return $y=function(n,i){var o=e(n);return o<0?t(o+i,0):r(o,i)},$y}var Vy,Ck;function oE(){if(Ck)return Vy;Ck=1;var e=sf(),t=Math.min;return Vy=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},Vy}var Hy,Ik;function lf(){if(Ik)return Hy;Ik=1;var e=oE();return Hy=function(t){return e(t.length)},Hy}var Wy,Rk;function xse(){if(Rk)return Wy;Rk=1;var e=Ka(),t=yse(),r=lf(),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 Wy={includes:n(!0),indexOf:n(!1)},Wy}var Uy,Nk;function jz(){if(Nk)return Uy;Nk=1;var e=yt(),t=In(),r=Ka(),n=xse().indexOf,i=af(),o=e([].push);return Uy=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},Uy}var Gy,Tk;function aE(){return Tk||(Tk=1,Gy=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Gy}var Pk;function sE(){if(Pk)return Ly;Pk=1;var e=jz(),t=aE(),r=t.concat("length","prototype");return Ly.f=Object.getOwnPropertyNames||function(i){return e(i,r)},Ly}var Ky={},Mk;function qz(){return Mk||(Mk=1,Ky.f=Object.getOwnPropertySymbols),Ky}var Yy,kk;function wse(){if(kk)return Yy;kk=1;var e=rf(),t=yt(),r=sE(),n=qz(),i=Rn(),o=t([].concat);return Yy=e("Reflect","ownKeys")||function(s){var c=r.f(i(s)),u=n.f;return u?o(c,u(s)):c},Yy}var Xy,Ak;function Sse(){if(Ak)return Xy;Ak=1;var e=In(),t=wse(),r=Pz(),n=Ii();return Xy=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))}},Xy}var Zy,Dk;function zz(){if(Dk)return Zy;Dk=1;var e=St(),t=er(),r=/#|\.prototype\./,n=function(c,u){var d=o[i(c)];return d===s?!0:d===a?!1:t(u)?e(u):!!u},i=n.normalize=function(c){return String(c).replace(r,".").toLowerCase()},o=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return Zy=n,Zy}var Jy,jk;function ro(){if(jk)return Jy;jk=1;var e=Gt(),t=Pz().f,r=Bl(),n=zo(),i=JS(),o=Sse(),a=zz();return Jy=function(s,c){var u=s.target,d=s.global,h=s.stat,p,v,y,m,g,w;if(d?v=e:h?v=e[u]||i(u,{}):v=e[u]&&e[u].prototype,v)for(y in c){if(g=c[y],s.dontCallGetSet?(w=t(v,y),m=w&&w.value):m=v[y],p=a(d?y:u+(h?".":"#")+y,s.forced),!p&&m!==void 0){if(typeof g==typeof m)continue;o(g,m)}(s.sham||m&&m.sham)&&r(g,"sham",!0),n(v,y,g,s)}},Jy}var Qy,qk;function lE(){if(qk)return Qy;qk=1;var e=Pr(),t=e("toStringTag"),r={};return r[t]="z",Qy=String(r)==="[object z]",Qy}var ex,zk;function cf(){if(zk)return ex;zk=1;var e=lE(),t=er(),r=to(),n=Pr(),i=n("toStringTag"),o=Object,a=r((function(){return arguments})())==="Arguments",s=function(c,u){try{return c[u]}catch{}};return ex=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},ex}var tx,Lk;function Lo(){if(Lk)return tx;Lk=1;var e=cf(),t=String;return tx=function(r){if(e(r)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return t(r)},tx}var rx,Bk;function Lz(){return Bk||(Bk=1,rx=`
114
+ \v\f\r                 \u2028\u2029\uFEFF`),rx}var nx,Fk;function Ese(){if(Fk)return nx;Fk=1;var e=yt(),t=qo(),r=Lo(),n=Lz(),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 nx={start:s(1),end:s(2),trim:s(3)},nx}var ix,$k;function _se(){if($k)return ix;$k=1;var e=Gt(),t=St(),r=yt(),n=Lo(),i=Ese().trim,o=Lz(),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 ix=h?function(v,y){var m=i(n(v));return a(m,y>>>0||(d(u,m)?16:10))}:a,ix}var Vk;function Ose(){if(Vk)return OM;Vk=1;var e=ro(),t=_se();return e({global:!0,forced:parseInt!==t},{parseInt:t}),OM}Ose();var Hk={},ox,Wk;function Bz(){if(Wk)return ox;Wk=1;var e=jz(),t=aE();return ox=Object.keys||function(n){return e(n,t)},ox}var ax,Uk;function Cse(){if(Uk)return ax;Uk=1;var e=Wn(),t=yt(),r=Ur(),n=St(),i=Bz(),o=qz(),a=_z(),s=Ya(),c=tf(),u=Object.assign,d=Object.defineProperty,h=t([].concat);return ax=!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={},y=Symbol("assign detection"),m="abcdefghijklmnopqrst";return p[y]=7,m.split("").forEach(function(g){v[g]=g}),u({},p)[y]!==7||i(u({},v)).join("")!==m})?function(v,y){for(var m=s(v),g=arguments.length,w=1,x=o.f,_=a.f;g>w;)for(var S=c(arguments[w++]),E=x?h(i(S),x(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,ax}var Gk;function Ise(){if(Gk)return Hk;Gk=1;var e=ro(),t=Cse();return e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),Hk}Ise();var Kk={},sx,Yk;function Rse(){if(Yk)return sx;Yk=1;var e=to(),t=yt();return sx=function(r){if(e(r)==="Function")return t(r)},sx}var lx,Xk;function Fz(){if(Xk)return lx;Xk=1;var e=Rse(),t=zl(),r=ef(),n=e(e.bind);return lx=function(i,o){return t(i),o===void 0?i:r?n(i,o):function(){return i.apply(o,arguments)}},lx}var cx,Zk;function Nse(){if(Zk)return cx;Zk=1;var e=to();return cx=Array.isArray||function(r){return e(r)==="Array"},cx}var ux,Jk;function Tse(){if(Jk)return ux;Jk=1;var e=yt(),t=St(),r=er(),n=cf(),i=rf(),o=kz(),a=function(){},s=i("Reflect","construct"),c=/^\s*(?:class|function)\b/,u=e(c.exec),d=!c.test(a),h=function(y){if(!r(y))return!1;try{return s(a,[],y),!0}catch{return!1}},p=function(y){if(!r(y))return!1;switch(n(y)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!u(c,o(y))}catch{return!0}};return p.sham=!0,ux=!s||t(function(){var v;return h(h.call)||!h(Object)||!h(function(){v=!0})||v})?p:h,ux}var dx,Qk;function Pse(){if(Qk)return dx;Qk=1;var e=Nse(),t=Tse(),r=dr(),n=Pr(),i=n("species"),o=Array;return dx=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},dx}var fx,eA;function Mse(){if(eA)return fx;eA=1;var e=Pse();return fx=function(t,r){return new(e(t))(r===0?0:r)},fx}var hx,tA;function $z(){if(tA)return hx;tA=1;var e=Fz(),t=yt(),r=tf(),n=Ya(),i=lf(),o=Mse(),a=t([].push),s=function(c){var u=c===1,d=c===2,h=c===3,p=c===4,v=c===6,y=c===7,m=c===5||v;return function(g,w,x,_){for(var S=n(g),E=r(S),I=i(E),N=e(w,x),T=0,M=_||o,z=u?M(g,I):d||y?M(g,0):void 0,j,W;I>T;T++)if((m||T in E)&&(j=E[T],W=N(j,T,S),c))if(u)z[T]=W;else if(W)switch(c){case 3:return!0;case 5:return j;case 6:return T;case 2:a(z,j)}else switch(c){case 4:return!1;case 7:a(z,j)}return v?-1:h||p?p:z}};return hx={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},hx}var px,rA;function kse(){if(rA)return px;rA=1;var e=St(),t=Pr(),r=XS(),n=t("species");return px=function(i){return r>=51||!e(function(){var o=[],a=o.constructor={};return a[n]=function(){return{foo:1}},o[i](Boolean).foo!==1})},px}var nA;function Ase(){if(nA)return Kk;nA=1;var e=ro(),t=$z().filter,r=kse(),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)}}),Kk}Ase();var iA={},vx,oA;function Dse(){if(oA)return vx;oA=1;var e=lE(),t=cf();return vx=e?{}.toString:function(){return"[object "+t(this)+"]"},vx}var aA;function jse(){if(aA)return iA;aA=1;var e=lE(),t=zo(),r=Dse();return e||t(Object.prototype,"toString",r,{unsafe:!0}),iA}jse();var gx={},sA;function qse(){if(sA)return gx;sA=1;var e=Wn(),t=Mz(),r=Ii(),n=Rn(),i=Ka(),o=Bz();return gx.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},gx}var mx,lA;function zse(){if(lA)return mx;lA=1;var e=rf();return mx=e("document","documentElement"),mx}var bx,cA;function uf(){if(cA)return bx;cA=1;var e=Rn(),t=qse(),r=aE(),n=af(),i=zse(),o=rE(),a=iE(),s=">",c="<",u="prototype",d="script",h=a("IE_PROTO"),p=function(){},v=function(x){return c+d+s+x+c+"/"+d+s},y=function(x){x.write(v("")),x.close();var _=x.parentWindow.Object;return x=null,_},m=function(){var x=o("iframe"),_="java"+d+":",S;return x.style.display="none",i.appendChild(x),x.src=String(_),S=x.contentWindow.document,S.open(),S.write(v("document.F=Object")),S.close(),S.F},g,w=function(){try{g=new ActiveXObject("htmlfile")}catch{}w=typeof document<"u"?document.domain&&g?y(g):m():y(g);for(var x=r.length;x--;)delete w[u][r[x]];return w()};return n[h]=!0,bx=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)},bx}var yx,uA;function Lse(){if(uA)return yx;uA=1;var e=Pr(),t=uf(),r=Ii().f,n=e("unscopables"),i=Array.prototype;return i[n]===void 0&&r(i,n,{configurable:!0,value:t(null)}),yx=function(o){i[n][o]=!0},yx}var xx,dA;function Fl(){return dA||(dA=1,xx={}),xx}var wx,fA;function Bse(){if(fA)return wx;fA=1;var e=St();return wx=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),wx}var Sx,hA;function Vz(){if(hA)return Sx;hA=1;var e=In(),t=er(),r=Ya(),n=iE(),i=Bse(),o=n("IE_PROTO"),a=Object,s=a.prototype;return Sx=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},Sx}var Ex,pA;function Hz(){if(pA)return Ex;pA=1;var e=St(),t=er(),r=dr(),n=uf(),i=Vz(),o=zo(),a=Pr(),s=of(),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 y={};return d[c].call(y)!==y});return v?d={}:s&&(d=n(d)),t(d[c])||o(d,c,function(){return this}),Ex={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},Ex}var _x,vA;function df(){if(vA)return _x;vA=1;var e=Ii().f,t=In(),r=Pr(),n=r("toStringTag");return _x=function(i,o,a){i&&!a&&(i=i.prototype),i&&!t(i,n)&&e(i,n,{configurable:!0,value:o})},_x}var Ox,gA;function Fse(){if(gA)return Ox;gA=1;var e=Hz().IteratorPrototype,t=uf(),r=YS(),n=df(),i=Fl(),o=function(){return this};return Ox=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},Ox}var Cx,mA;function $se(){if(mA)return Cx;mA=1;var e=yt(),t=zl();return Cx=function(r,n,i){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[i]))}catch{}},Cx}var Ix,bA;function Vse(){if(bA)return Ix;bA=1;var e=dr();return Ix=function(t){return e(t)||t===null},Ix}var Rx,yA;function Hse(){if(yA)return Rx;yA=1;var e=Vse(),t=String,r=TypeError;return Rx=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},Rx}var Nx,xA;function Wz(){if(xA)return Nx;xA=1;var e=$se(),t=dr(),r=qo(),n=Hse();return Nx=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),Nx}var Tx,wA;function Uz(){if(wA)return Tx;wA=1;var e=ro(),t=Ur(),r=of(),n=nE(),i=er(),o=Fse(),a=Vz(),s=Wz(),c=df(),u=Bl(),d=zo(),h=Pr(),p=Fl(),v=Hz(),y=n.PROPER,m=n.CONFIGURABLE,g=v.IteratorPrototype,w=v.BUGGY_SAFARI_ITERATORS,x=h("iterator"),_="keys",S="values",E="entries",I=function(){return this};return Tx=function(N,T,M,z,j,W,U){o(M,T,z);var A=function(D){if(D===j&&re)return re;if(!w&&D&&D in te)return te[D];switch(D){case _:return function(){return new M(this,D)};case S:return function(){return new M(this,D)};case E:return function(){return new M(this,D)}}return function(){return new M(this)}},K=T+" Iterator",V=!1,te=N.prototype,G=te[x]||te["@@iterator"]||j&&te[j],re=!w&&G||A(j),P=T==="Array"&&te.entries||G,B,X,Q;if(P&&(B=a(P.call(new N)),B!==Object.prototype&&B.next&&(!r&&a(B)!==g&&(s?s(B,g):i(B[x])||d(B,x,I)),c(B,K,!0,!0),r&&(p[K]=I))),y&&j===S&&G&&G.name!==S&&(!r&&m?u(te,"name",S):(V=!0,re=function(){return t(G,this)})),j)if(X={values:A(S),keys:W?re:A(_),entries:A(E)},U)for(Q in X)(w||V||!(Q in te))&&d(te,Q,X[Q]);else e({target:T,proto:!0,forced:w||V},X);return(!r||U)&&te[x]!==re&&d(te,x,re,{name:j}),p[T]=re,X},Tx}var Px,SA;function Gz(){return SA||(SA=1,Px=function(e,t){return{value:e,done:t}}),Px}var Mx,EA;function Kz(){if(EA)return Mx;EA=1;var e=Ka(),t=Lse(),r=Fl(),n=Xa(),i=Ii().f,o=Uz(),a=Gz(),s=of(),c=Wn(),u="Array Iterator",d=n.set,h=n.getterFor(u);Mx=o(Array,"Array",function(v,y){d(this,{type:u,target:e(v),index:0,kind:y})},function(){var v=h(this),y=v.target,m=v.index++;if(!y||m>=y.length)return v.target=null,a(void 0,!0);switch(v.kind){case"keys":return a(m,!1);case"values":return a(y[m],!1)}return a([m,y[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 Mx}Kz();var _A={},kx,OA;function Yz(){if(OA)return kx;OA=1;var e=yt(),t=sf(),r=Lo(),n=qo(),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,y,m;return p<0||p>=v?c?"":void 0:(y=o(h,p),y<55296||y>56319||p+1===v||(m=o(h,p+1))<56320||m>57343?c?i(h,p):y:c?a(h,p,p+2):(y-55296<<10)+(m-56320)+65536)}};return kx={codeAt:s(!1),charAt:s(!0)},kx}var CA;function Wse(){if(CA)return _A;CA=1;var e=Yz().charAt,t=Lo(),r=Xa(),n=Uz(),i=Gz(),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))}),_A}Wse();var IA={},RA={},Ax,NA;function Xz(){if(NA)return Ax;NA=1;var e=St();return Ax=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),Ax}var Dx,TA;function Zz(){if(TA)return Dx;TA=1;var e=zo();return Dx=function(t,r,n){for(var i in r)e(t,i,r[i],n);return t},Dx}var jx={exports:{}},qx={},zx,PA;function Use(){if(PA)return zx;PA=1;var e=yt();return zx=e([].slice),zx}var MA;function Gse(){if(MA)return qx;MA=1;var e=to(),t=Ka(),r=sE().f,n=Use(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(a){try{return r(a)}catch{return n(i)}};return qx.f=function(s){return i&&e(s)==="Window"?o(s):r(t(s))},qx}var Lx,kA;function Kse(){if(kA)return Lx;kA=1;var e=St();return Lx=e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Lx}var Bx,AA;function Yse(){if(AA)return Bx;AA=1;var e=St(),t=dr(),r=to(),n=Kse(),i=Object.isExtensible,o=e(function(){});return Bx=o||n?function(s){return!t(s)||n&&r(s)==="ArrayBuffer"?!1:i?i(s):!0}:i,Bx}var DA;function cE(){if(DA)return jx.exports;DA=1;var e=ro(),t=yt(),r=af(),n=dr(),i=In(),o=Ii().f,a=sE(),s=Gse(),c=Yse(),u=tE(),d=Xz(),h=!1,p=u("meta"),v=0,y=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";y(S)}return S[p].objectID},g=function(S,E){if(!i(S,p)){if(!c(S))return!0;if(!E)return!1;y(S)}return S[p].weakData},w=function(S){return d&&h&&c(S)&&!i(S,p)&&y(S),S},x=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),M=0,z=T.length;M<z;M++)if(T[M]===p){E(T,M,1);break}return T},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},_=jx.exports={enable:x,fastKey:m,getWeakData:g,onFreeze:w};return r[p]=!0,jx.exports}var Fx,jA;function Xse(){if(jA)return Fx;jA=1;var e=Pr(),t=Fl(),r=e("iterator"),n=Array.prototype;return Fx=function(i){return i!==void 0&&(t.Array===i||n[r]===i)},Fx}var $x,qA;function Jz(){if(qA)return $x;qA=1;var e=cf(),t=Ll(),r=ql(),n=Fl(),i=Pr(),o=i("iterator");return $x=function(a){if(!r(a))return t(a,o)||t(a,"@@iterator")||n[e(a)]},$x}var Vx,zA;function Zse(){if(zA)return Vx;zA=1;var e=Ur(),t=zl(),r=Rn(),n=ZS(),i=Jz(),o=TypeError;return Vx=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")},Vx}var Hx,LA;function Jse(){if(LA)return Hx;LA=1;var e=Ur(),t=Rn(),r=Ll();return Hx=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},Hx}var Wx,BA;function Qz(){if(BA)return Wx;BA=1;var e=Fz(),t=Ur(),r=Rn(),n=ZS(),i=Xse(),o=lf(),a=nf(),s=Zse(),c=Jz(),u=Jse(),d=TypeError,h=function(v,y){this.stopped=v,this.result=y},p=h.prototype;return Wx=function(v,y,m){var g=m&&m.that,w=!!(m&&m.AS_ENTRIES),x=!!(m&&m.IS_RECORD),_=!!(m&&m.IS_ITERATOR),S=!!(m&&m.INTERRUPTED),E=e(y,g),I,N,T,M,z,j,W,U=function(K){return I&&u(I,"normal"),new h(!0,K)},A=function(K){return w?(r(K),S?E(K[0],K[1],U):E(K[0],K[1])):S?E(K,U):E(K)};if(x)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,M=o(v);M>T;T++)if(z=A(v[T]),z&&a(p,z))return z;return new h(!1)}I=s(v,N)}for(j=x?v.next:I.next;!(W=t(j,I)).done;){try{z=A(W.value)}catch(K){u(I,"throw",K)}if(typeof z=="object"&&z&&a(p,z))return z}return new h(!1)},Wx}var Ux,FA;function eL(){if(FA)return Ux;FA=1;var e=nf(),t=TypeError;return Ux=function(r,n){if(e(n,r))return r;throw new t("Incorrect invocation")},Ux}var Gx,$A;function Qse(){if($A)return Gx;$A=1;var e=Pr(),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 Gx=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},Gx}var Kx,VA;function ele(){if(VA)return Kx;VA=1;var e=er(),t=dr(),r=Wz();return Kx=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},Kx}var Yx,HA;function tle(){if(HA)return Yx;HA=1;var e=ro(),t=Gt(),r=yt(),n=zz(),i=zo(),o=cE(),a=Qz(),s=eL(),c=er(),u=ql(),d=dr(),h=St(),p=Qse(),v=df(),y=ele();return Yx=function(m,g,w){var x=m.indexOf("Map")!==-1,_=m.indexOf("Weak")!==-1,S=x?"set":"add",E=t[m],I=E&&E.prototype,N=E,T={},M=function(V){var te=r(I[V]);i(I,V,V==="add"?function(re){return te(this,re===0?0:re),this}:V==="delete"?function(G){return _&&!d(G)?!1:te(this,G===0?0:G)}:V==="get"?function(re){return _&&!d(re)?void 0:te(this,re===0?0:re)}:V==="has"?function(re){return _&&!d(re)?!1:te(this,re===0?0:re)}:function(re,P){return te(this,re===0?0:re,P),this})},z=n(m,!c(E)||!(_||I.forEach&&!h(function(){new E().entries().next()})));if(z)N=w.getConstructor(g,m,x,S),o.enable();else if(n(m,!0)){var j=new N,W=j[S](_?{}:-0,1)!==j,U=h(function(){j.has(1)}),A=p(function(V){new E(V)}),K=!_&&h(function(){for(var V=new E,te=5;te--;)V[S](te,te);return!V.has(-0)});A||(N=g(function(V,te){s(V,I);var G=y(new E,V,N);return u(te)||a(te,G[S],{that:G,AS_ENTRIES:x}),G}),N.prototype=I,I.constructor=N),(U||K)&&(M("delete"),M("has"),x&&M("get")),(K||W)&&M(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,x),N},Yx}var Xx,WA;function rle(){if(WA)return Xx;WA=1;var e=yt(),t=Zz(),r=cE().getWeakData,n=eL(),i=Rn(),o=ql(),a=dr(),s=Qz(),c=$z(),u=In(),d=Xa(),h=d.set,p=d.getterFor,v=c.find,y=c.findIndex,m=e([].splice),g=0,w=function(S){return S.frozen||(S.frozen=new x)},x=function(){this.entries=[]},_=function(S,E){return v(S.entries,function(I){return I[0]===E})};return x.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=y(this.entries,function(I){return I[0]===S});return~E&&m(this.entries,E,1),!!~E}},Xx={getConstructor:function(S,E,I,N){var T=S(function(W,U){n(W,M),h(W,{type:E,id:g++,frozen:null}),o(U)||s(U,W[N],{that:W,AS_ENTRIES:I})}),M=T.prototype,z=p(E),j=function(W,U,A){var K=z(W),V=r(i(U),!0);return V===!0?w(K).set(U,A):V[K.id]=A,W};return t(M,{delete:function(W){var U=z(this);if(!a(W))return!1;var A=r(W);return A===!0?w(U).delete(W):A&&u(A,U.id)&&delete A[U.id]},has:function(U){var A=z(this);if(!a(U))return!1;var K=r(U);return K===!0?w(A).has(U):K&&u(K,A.id)}}),t(M,I?{get:function(U){var A=z(this);if(a(U)){var K=r(U);if(K===!0)return w(A).get(U);if(K)return K[A.id]}},set:function(U,A){return j(this,U,A)}}:{add:function(U){return j(this,U,!0)}}),T}},Xx}var UA;function nle(){if(UA)return RA;UA=1;var e=Xz(),t=Gt(),r=yt(),n=Zz(),i=cE(),o=tle(),a=rle(),s=dr(),c=Xa().enforce,u=St(),d=Az(),h=Object,p=Array.isArray,v=h.isExtensible,y=h.isFrozen,m=h.isSealed,g=h.freeze,w=h.seal,x=!t.ActiveXObject&&"ActiveXObject"in t,_,S=function(W){return function(){return W(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 W=g([]);return N(new E,W,1),!y(W)})};if(d)if(x){_=a.getConstructor(S,"WeakMap",!0),i.enable();var M=r(I.delete),z=r(I.has),j=r(I.get);n(I,{delete:function(W){if(s(W)&&!v(W)){var U=c(this);return U.frozen||(U.frozen=new _),M(this,W)||U.frozen.delete(W)}return M(this,W)},has:function(U){if(s(U)&&!v(U)){var A=c(this);return A.frozen||(A.frozen=new _),z(this,U)||A.frozen.has(U)}return z(this,U)},get:function(U){if(s(U)&&!v(U)){var A=c(this);return A.frozen||(A.frozen=new _),z(this,U)?j(this,U):A.frozen.get(U)}return j(this,U)},set:function(U,A){if(s(U)&&!v(U)){var K=c(this);K.frozen||(K.frozen=new _),z(this,U)?N(this,U,A):K.frozen.set(U,A)}else N(this,U,A);return this}})}else T()&&n(I,{set:function(U,A){var K;return p(U)&&(y(U)?K=g:m(U)&&(K=w)),N(this,U,A),K&&K(U),this}});return RA}var GA;function ile(){return GA||(GA=1,nle()),IA}ile();var KA={},Zx,YA;function ole(){return YA||(YA=1,Zx={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}),Zx}var Jx,XA;function ale(){if(XA)return Jx;XA=1;var e=rE(),t=e("span").classList,r=t&&t.constructor&&t.constructor.prototype;return Jx=r===Object.prototype?void 0:r,Jx}var ZA;function sle(){if(ZA)return KA;ZA=1;var e=Gt(),t=ole(),r=ale(),n=Kz(),i=Bl(),o=df(),a=Pr(),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"),KA}sle();var Qx,JA;function lle(){if(JA)return Qx;JA=1;var e="Expected a function",t=NaN,r="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,c=typeof jt=="object"&&jt&&jt.Object===Object&&jt,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,y=Math.min,m=function(){return d.Date.now()};function g(I,N,T){var M,z,j,W,U,A,K=0,V=!1,te=!1,G=!0;if(typeof I!="function")throw new TypeError(e);N=E(N)||0,x(T)&&(V=!!T.leading,te="maxWait"in T,j=te?v(E(T.maxWait)||0,N):j,G="trailing"in T?!!T.trailing:G);function re(Y){var ie=M,ne=z;return M=z=void 0,K=Y,W=I.apply(ne,ie),W}function P(Y){return K=Y,U=setTimeout(Q,N),V?re(Y):W}function B(Y){var ie=Y-A,ne=Y-K,pe=N-ie;return te?y(pe,j-ne):pe}function X(Y){var ie=Y-A,ne=Y-K;return A===void 0||ie>=N||ie<0||te&&ne>=j}function Q(){var Y=m();if(X(Y))return D(Y);U=setTimeout(Q,B(Y))}function D(Y){return U=void 0,G&&M?re(Y):(M=z=void 0,W)}function $(){U!==void 0&&clearTimeout(U),K=0,M=A=z=U=void 0}function H(){return U===void 0?W:D(m())}function q(){var Y=m(),ie=X(Y);if(M=arguments,z=this,A=Y,ie){if(U===void 0)return P(A);if(te)return U=setTimeout(Q,N),re(A)}return U===void 0&&(U=setTimeout(Q,N)),W}return q.cancel=$,q.flush=H,q}function w(I,N,T){var M=!0,z=!0;if(typeof I!="function")throw new TypeError(e);return x(T)&&(M="leading"in T?!!T.leading:M,z="trailing"in T?!!T.trailing:z),g(I,N,{leading:M,maxWait:N,trailing:z})}function x(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(x(I)){var N=typeof I.valueOf=="function"?I.valueOf():I;I=x(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 Qx=w,Qx}var cle=lle();const QA=Qi(cle);var ew,eD;function ule(){if(eD)return ew;eD=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 jt=="object"&&jt&&jt.Object===Object&&jt,u=typeof self=="object"&&self&&self.Object===Object&&self,d=c||u||Function("return this")(),h=Object.prototype,p=h.toString,v=Math.max,y=Math.min,m=function(){return d.Date.now()};function g(E,I,N){var T,M,z,j,W,U,A=0,K=!1,V=!1,te=!0;if(typeof E!="function")throw new TypeError(e);I=S(I)||0,w(N)&&(K=!!N.leading,V="maxWait"in N,z=V?v(S(N.maxWait)||0,I):z,te="trailing"in N?!!N.trailing:te);function G(q){var Y=T,ie=M;return T=M=void 0,A=q,j=E.apply(ie,Y),j}function re(q){return A=q,W=setTimeout(X,I),K?G(q):j}function P(q){var Y=q-U,ie=q-A,ne=I-Y;return V?y(ne,z-ie):ne}function B(q){var Y=q-U,ie=q-A;return U===void 0||Y>=I||Y<0||V&&ie>=z}function X(){var q=m();if(B(q))return Q(q);W=setTimeout(X,P(q))}function Q(q){return W=void 0,te&&T?G(q):(T=M=void 0,j)}function D(){W!==void 0&&clearTimeout(W),A=0,T=U=M=W=void 0}function $(){return W===void 0?j:Q(m())}function H(){var q=m(),Y=B(q);if(T=arguments,M=this,U=q,Y){if(W===void 0)return re(U);if(V)return W=setTimeout(X,I),G(U)}return W===void 0&&(W=setTimeout(X,I)),j}return H.cancel=D,H.flush=$,H}function w(E){var I=typeof E;return!!E&&(I=="object"||I=="function")}function x(E){return!!E&&typeof E=="object"}function _(E){return typeof E=="symbol"||x(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 ew=g,ew}var dle=ule();const tD=Qi(dle);var tw,rD;function fle(){if(rD)return tw;rD=1;var e="Expected a function",t="__lodash_hash_undefined__",r="[object Function]",n="[object GeneratorFunction]",i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=typeof jt=="object"&&jt&&jt.Object===Object&&jt,s=typeof self=="object"&&self&&self.Object===Object&&self,c=a||s||Function("return this")();function u(ue,de){return ue==null?void 0:ue[de]}function d(ue){var de=!1;if(ue!=null&&typeof ue.toString!="function")try{de=!!(ue+"")}catch{}return de}var h=Array.prototype,p=Function.prototype,v=Object.prototype,y=c["__core-js_shared__"],m=(function(){var ue=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||"");return ue?"Symbol(src)_1."+ue:""})(),g=p.toString,w=v.hasOwnProperty,x=v.toString,_=RegExp("^"+g.call(w).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=h.splice,E=Y(c,"Map"),I=Y(Object,"create");function N(ue){var de=-1,le=ue?ue.length:0;for(this.clear();++de<le;){var xe=ue[de];this.set(xe[0],xe[1])}}function T(){this.__data__=I?I(null):{}}function M(ue){return this.has(ue)&&delete this.__data__[ue]}function z(ue){var de=this.__data__;if(I){var le=de[ue];return le===t?void 0:le}return w.call(de,ue)?de[ue]:void 0}function j(ue){var de=this.__data__;return I?de[ue]!==void 0:w.call(de,ue)}function W(ue,de){var le=this.__data__;return le[ue]=I&&de===void 0?t:de,this}N.prototype.clear=T,N.prototype.delete=M,N.prototype.get=z,N.prototype.has=j,N.prototype.set=W;function U(ue){var de=-1,le=ue?ue.length:0;for(this.clear();++de<le;){var xe=ue[de];this.set(xe[0],xe[1])}}function A(){this.__data__=[]}function K(ue){var de=this.__data__,le=$(de,ue);if(le<0)return!1;var xe=de.length-1;return le==xe?de.pop():S.call(de,le,1),!0}function V(ue){var de=this.__data__,le=$(de,ue);return le<0?void 0:de[le][1]}function te(ue){return $(this.__data__,ue)>-1}function G(ue,de){var le=this.__data__,xe=$(le,ue);return xe<0?le.push([ue,de]):le[xe][1]=de,this}U.prototype.clear=A,U.prototype.delete=K,U.prototype.get=V,U.prototype.has=te,U.prototype.set=G;function re(ue){var de=-1,le=ue?ue.length:0;for(this.clear();++de<le;){var xe=ue[de];this.set(xe[0],xe[1])}}function P(){this.__data__={hash:new N,map:new(E||U),string:new N}}function B(ue){return q(this,ue).delete(ue)}function X(ue){return q(this,ue).get(ue)}function Q(ue){return q(this,ue).has(ue)}function D(ue,de){return q(this,ue).set(ue,de),this}re.prototype.clear=P,re.prototype.delete=B,re.prototype.get=X,re.prototype.has=Q,re.prototype.set=D;function $(ue,de){for(var le=ue.length;le--;)if(J(ue[le][0],de))return le;return-1}function H(ue){if(!he(ue)||ne(ue))return!1;var de=ae(ue)||d(ue)?_:o;return de.test(pe(ue))}function q(ue,de){var le=ue.__data__;return ie(de)?le[typeof de=="string"?"string":"hash"]:le.map}function Y(ue,de){var le=u(ue,de);return H(le)?le:void 0}function ie(ue){var de=typeof ue;return de=="string"||de=="number"||de=="symbol"||de=="boolean"?ue!=="__proto__":ue===null}function ne(ue){return!!m&&m in ue}function pe(ue){if(ue!=null){try{return g.call(ue)}catch{}try{return ue+""}catch{}}return""}function Z(ue,de){if(typeof ue!="function"||de&&typeof de!="function")throw new TypeError(e);var le=function(){var xe=arguments,Ee=de?de.apply(this,xe):xe[0],Ie=le.cache;if(Ie.has(Ee))return Ie.get(Ee);var Te=ue.apply(this,xe);return le.cache=Ie.set(Ee,Te),Te};return le.cache=new(Z.Cache||re),le}Z.Cache=re;function J(ue,de){return ue===de||ue!==ue&&de!==de}function ae(ue){var de=he(ue)?x.call(ue):"";return de==r||de==n}function he(ue){var de=typeof ue;return!!ue&&(de=="object"||de=="function")}return tw=Z,tw}var hle=fle();const ple=Qi(hle);var Ro=[],vle=function(){return Ro.some(function(e){return e.activeTargets.length>0})},gle=function(){return Ro.some(function(e){return e.skippedTargets.length>0})},nD="ResizeObserver loop completed with undelivered notifications.",mle=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:nD}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=nD),window.dispatchEvent(e)},bl;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(bl||(bl={}));var No=function(e){return Object.freeze(e)},ble=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,No(this)}return e})(),tL=(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,No(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})(),uE=function(e){return e instanceof SVGElement&&"getBBox"in e},rL=function(e){if(uE(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)},iD=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)},yle=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},il=typeof window<"u"?window:{},lu=new WeakMap,oD=/auto|scroll/,xle=/^tb|vertical/,wle=/msie|trident/i.test(il.navigator&&il.navigator.userAgent),Qn=function(e){return parseFloat(e||"0")},Ca=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new ble((r?t:e)||0,(r?e:t)||0)},aD=No({devicePixelContentBoxSize:Ca(),borderBoxSize:Ca(),contentBoxSize:Ca(),contentRect:new tL(0,0,0,0)}),nL=function(e,t){if(t===void 0&&(t=!1),lu.has(e)&&!t)return lu.get(e);if(rL(e))return lu.set(e,aD),aD;var r=getComputedStyle(e),n=uE(e)&&e.ownerSVGElement&&e.getBBox(),i=!wle&&r.boxSizing==="border-box",o=xle.test(r.writingMode||""),a=!n&&oD.test(r.overflowY||""),s=!n&&oD.test(r.overflowX||""),c=n?0:Qn(r.paddingTop),u=n?0:Qn(r.paddingRight),d=n?0:Qn(r.paddingBottom),h=n?0:Qn(r.paddingLeft),p=n?0:Qn(r.borderTopWidth),v=n?0:Qn(r.borderRightWidth),y=n?0:Qn(r.borderBottomWidth),m=n?0:Qn(r.borderLeftWidth),g=h+u,w=c+d,x=m+v,_=p+y,S=s?e.offsetHeight-_-e.clientHeight:0,E=a?e.offsetWidth-x-e.clientWidth:0,I=i?g+x:0,N=i?w+_:0,T=n?n.width:Qn(r.width)-I-E,M=n?n.height:Qn(r.height)-N-S,z=T+g+E+x,j=M+w+S+_,W=No({devicePixelContentBoxSize:Ca(Math.round(T*devicePixelRatio),Math.round(M*devicePixelRatio),o),borderBoxSize:Ca(z,j,o),contentBoxSize:Ca(T,M,o),contentRect:new tL(h,c,T,M)});return lu.set(e,W),W},iL=function(e,t,r){var n=nL(e,r),i=n.borderBoxSize,o=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(t){case bl.DEVICE_PIXEL_CONTENT_BOX:return a;case bl.BORDER_BOX:return i;default:return o}},Sle=(function(){function e(t){var r=nL(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=No([r.borderBoxSize]),this.contentBoxSize=No([r.contentBoxSize]),this.devicePixelContentBoxSize=No([r.devicePixelContentBoxSize])}return e})(),oL=function(e){if(rL(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},Ele=function(){var e=1/0,t=[];Ro.forEach(function(a){if(a.activeTargets.length!==0){var s=[];a.activeTargets.forEach(function(u){var d=new Sle(u.target),h=oL(u.target);s.push(d),u.lastReportedSize=iL(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},sD=function(e){Ro.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(oL(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},_le=function(){var e=0;for(sD(e);vle();)e=Ele(),sD(e);return gle()&&mle(),e>0},rw,aL=[],Ole=function(){return aL.splice(0).forEach(function(e){return e()})},Cle=function(e){if(!rw){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Ole()}).observe(r,n),rw=function(){r.textContent="".concat(t?t--:t++)}}aL.push(e),rw()},Ile=function(e){Cle(function(){requestAnimationFrame(e)})},Ru=0,Rle=function(){return!!Ru},Nle=250,Tle={attributes:!0,characterData:!0,childList:!0,subtree:!0},lD=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],cD=function(e){return e===void 0&&(e=0),Date.now()+e},nw=!1,Ple=(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=Nle),!nw){nw=!0;var n=cD(t);Ile(function(){var i=!1;try{i=_le()}finally{if(nw=!1,t=n-cD(),!Rle())return;i?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,Tle)};document.body?r():il.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),lD.forEach(function(r){return il.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),lD.forEach(function(r){return il.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),r1=new Ple,uD=function(e){!Ru&&e>0&&r1.start(),Ru+=e,!Ru&&r1.stop()},Mle=function(e){return!uE(e)&&!yle(e)&&getComputedStyle(e).display==="inline"},kle=(function(){function e(t,r){this.target=t,this.observedBox=r||bl.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=iL(this.target,this.observedBox,!0);return Mle(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Ale=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),cu=new WeakMap,dD=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},uu=(function(){function e(){}return e.connect=function(t,r){var n=new Ale(t,r);cu.set(t,n)},e.observe=function(t,r,n){var i=cu.get(t),o=i.observationTargets.length===0;dD(i.observationTargets,r)<0&&(o&&Ro.push(i),i.observationTargets.push(new kle(r,n&&n.box)),uD(1),r1.schedule())},e.unobserve=function(t,r){var n=cu.get(t),i=dD(n.observationTargets,r),o=n.observationTargets.length===1;i>=0&&(o&&Ro.splice(Ro.indexOf(n),1),n.observationTargets.splice(i,1),uD(-1))},e.disconnect=function(t){var r=this,n=cu.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),Dle=(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.");uu.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(!iD(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");uu.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(!iD(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");uu.unobserve(this,t)},e.prototype.disconnect=function(){uu.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),iw,fD;function jle(){if(fD)return iw;fD=1;var e=!!(typeof window<"u"&&window.document&&window.document.createElement);return iw=e,iw}var qle=jle();const sL=Qi(qle);var hD={},ow,pD;function zle(){if(pD)return ow;pD=1;var e=zl(),t=Ya(),r=tf(),n=lf(),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),y=n(p);if(e(u),y===0&&d<2)throw new i(o);var m=s?y-1:0,g=s?-1:1;if(d<2)for(;;){if(m in v){h=v[m],m+=g;break}if(m+=g,s?m<0:y<=m)throw new i(o)}for(;s?m>=0:y>m;m+=g)m in v&&(h=u(h,v[m],m,p));return h}};return ow={left:a(!1),right:a(!0)},ow}var aw,vD;function Lle(){if(vD)return aw;vD=1;var e=St();return aw=function(t,r){var n=[][t];return!!n&&e(function(){n.call(null,r||function(){return 1},1)})},aw}var sw,gD;function Ble(){if(gD)return sw;gD=1;var e=Gt(),t=Oz(),r=to(),n=function(i){return t.slice(0,i.length)===i};return sw=(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"})(),sw}var lw,mD;function Fle(){if(mD)return lw;mD=1;var e=Ble();return lw=e==="NODE",lw}var bD;function $le(){if(bD)return hD;bD=1;var e=ro(),t=zle().left,r=Lle(),n=XS(),i=Fle(),o=!i&&n>79&&n<83,a=o||!r("reduce");return e({target:"Array",proto:!0,forced:a},{reduce:function(c){var u=arguments.length;return t(this,c,u,u>1?arguments[1]:void 0)}}),hD}$le();var yD={},cw,xD;function lL(){if(xD)return cw;xD=1;var e=Rn();return cw=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},cw}var uw,wD;function Vle(){if(wD)return uw;wD=1;var e=St(),t=Gt(),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 uw={BROKEN_CARET:o,MISSED_STICKY:i,UNSUPPORTED_Y:n},uw}var dw,SD;function Hle(){if(SD)return dw;SD=1;var e=St(),t=Gt(),r=t.RegExp;return dw=e(function(){var n=r(".","s");return!(n.dotAll&&n.test(`
115
+ `)&&n.flags==="s")}),dw}var fw,ED;function Wle(){if(ED)return fw;ED=1;var e=St(),t=Gt(),r=t.RegExp;return fw=e(function(){var n=r("(?<a>b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$<a>c")!=="bc"}),fw}var hw,_D;function dE(){if(_D)return hw;_D=1;var e=Ur(),t=yt(),r=Lo(),n=lL(),i=Vle(),o=eE(),a=uf(),s=Xa().get,c=Hle(),u=Wle(),d=o("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,v=t("".charAt),y=t("".indexOf),m=t("".replace),g=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})(),x=i.BROKEN_CARET,_=/()??/.exec("")[1]!==void 0,S=w||_||x||c||u;return S&&(p=function(I){var N=this,T=s(N),M=r(I),z=T.raw,j,W,U,A,K,V,te;if(z)return z.lastIndex=N.lastIndex,j=e(p,z,M),N.lastIndex=z.lastIndex,j;var G=T.groups,re=x&&N.sticky,P=e(n,N),B=N.source,X=0,Q=M;if(re&&(P=m(P,"y",""),y(P,"g")===-1&&(P+="g"),Q=g(M,N.lastIndex),N.lastIndex>0&&(!N.multiline||N.multiline&&v(M,N.lastIndex-1)!==`
116
+ `)&&(B="(?: "+B+")",Q=" "+Q,X++),W=new RegExp("^(?:"+B+")",P)),_&&(W=new RegExp("^"+B+"$(?!\\s)",P)),w&&(U=N.lastIndex),A=e(h,re?W:N,Q),re?A?(A.input=g(A.input,X),A[0]=g(A[0],X),A.index=N.lastIndex,N.lastIndex+=A[0].length):N.lastIndex=0:w&&A&&(N.lastIndex=N.global?A.index+A[0].length:U),_&&A&&A.length>1&&e(d,A[0],W,function(){for(K=1;K<arguments.length-2;K++)arguments[K]===void 0&&(A[K]=void 0)}),A&&G)for(A.groups=V=a(null),K=0;K<G.length;K++)te=G[K],V[te[0]]=A[te[1]];return A}),hw=p,hw}var OD;function cL(){if(OD)return yD;OD=1;var e=ro(),t=dE();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),yD}cL();var CD={},pw,ID;function uL(){if(ID)return pw;ID=1,cL();var e=Ur(),t=zo(),r=dE(),n=St(),i=Pr(),o=Bl(),a=i("species"),s=RegExp.prototype;return pw=function(c,u,d,h){var p=i(c),v=!n(function(){var w={};return w[p]=function(){return 7},""[c](w)!==7}),y=v&&!n(function(){var w=!1,x=/a/;return c==="split"&&(x={},x.constructor={},x.constructor[a]=function(){return x},x.flags="",x[p]=/./[p]),x.exec=function(){return w=!0,null},x[p](""),!w});if(!v||!y||d){var m=/./[p],g=u(p,""[c],function(w,x,_,S,E){var I=x.exec;return I===r||I===s.exec?v&&!E?{done:!0,value:e(m,x,_,S)}:{done:!0,value:e(w,_,x,S)}:{done:!1}});t(String.prototype,c,g[0]),t(s,p,g[1])}h&&o(s[p],"sham",!0)},pw}var vw,RD;function dL(){if(RD)return vw;RD=1;var e=Yz().charAt;return vw=function(t,r,n){return r+(n?e(t,r).length:1)},vw}var gw,ND;function Ule(){if(ND)return gw;ND=1;var e=Gt(),t=St(),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 gw={correct:n},gw}var mw,TD;function fL(){if(TD)return mw;TD=1;var e=Ur(),t=In(),r=nf(),n=Ule(),i=lL(),o=RegExp.prototype;return mw=n.correct?function(a){return a.flags}:function(a){return!n.correct&&r(o,a)&&!t(a,"flags")?e(i,a):a.flags},mw}var bw,PD;function hL(){if(PD)return bw;PD=1;var e=Ur(),t=Rn(),r=er(),n=to(),i=dE(),o=TypeError;return bw=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")},bw}var MD;function Gle(){if(MD)return CD;MD=1;var e=Ur(),t=yt(),r=uL(),n=Rn(),i=dr(),o=oE(),a=Lo(),s=qo(),c=Ll(),u=dL(),d=fL(),h=hL(),p=t("".indexOf);return r("match",function(v,y,m){return[function(w){var x=s(this),_=i(w)?c(w,v):void 0;return _?e(_,w,x):new RegExp(w)[v](a(x))},function(g){var w=n(this),x=a(g),_=m(y,w,x);if(_.done)return _.value;var S=a(d(w));if(p(S,"g")===-1)return h(w,x);var E=p(S,"u")!==-1;w.lastIndex=0;for(var I=[],N=0,T;(T=h(w,x))!==null;){var M=a(T[0]);I[N]=M,M===""&&(w.lastIndex=u(x,o(w.lastIndex),E)),N++}return N===0?null:I}]}),CD}Gle();var kD={},yw,AD;function Kle(){if(AD)return yw;AD=1;var e=Dz(),t=Ii();return yw=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)},yw}var DD;function Yle(){if(DD)return kD;DD=1;var e=Wn(),t=nE().EXISTS,r=yt(),n=Kle(),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""}}}),kD}Yle();var jD={},xw,qD;function Xle(){if(qD)return xw;qD=1;var e=ef(),t=Function.prototype,r=t.apply,n=t.call;return xw=typeof Reflect=="object"&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),xw}var ww,zD;function Zle(){if(zD)return ww;zD=1;var e=yt(),t=Ya(),r=Math.floor,n=e("".charAt),i=e("".replace),o=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return ww=function(c,u,d,h,p,v){var y=d+c.length,m=h.length,g=s;return p!==void 0&&(p=t(p),g=a),i(v,g,function(w,x){var _;switch(n(x,0)){case"$":return"$";case"&":return c;case"`":return o(u,0,d);case"'":return o(u,y);case"<":_=p[o(x,1,-1)];break;default:var S=+x;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(x,1):h[E-1]+n(x,1):w}_=h[S-1]}return _===void 0?"":_})},ww}var LD;function Jle(){if(LD)return jD;LD=1;var e=Xle(),t=Ur(),r=yt(),n=uL(),i=St(),o=Rn(),a=er(),s=dr(),c=sf(),u=oE(),d=Lo(),h=qo(),p=dL(),v=Ll(),y=Zle(),m=fL(),g=hL(),w=Pr(),x=w("replace"),_=Math.max,S=Math.min,E=r([].concat),I=r([].push),N=r("".indexOf),T=r("".slice),M=function(U){return U===void 0?U:String(U)},z=(function(){return"a".replace(/./,"$0")==="$0"})(),j=(function(){return/./[x]?/./[x]("a","$0")==="":!1})(),W=!i(function(){var U=/./;return U.exec=function(){var A=[];return A.groups={a:"7"},A},"".replace(U,"$<a>")!=="7"});return n("replace",function(U,A,K){var V=j?"$":"$0";return[function(G,re){var P=h(this),B=s(G)?v(G,x):void 0;return B?t(B,G,P,re):t(A,d(P),G,re)},function(te,G){var re=o(this),P=d(te);if(typeof G=="string"&&N(G,V)===-1&&N(G,"$<")===-1){var B=K(A,re,P,G);if(B.done)return B.value}var X=a(G);X||(G=d(G));var Q=d(m(re)),D=N(Q,"g")!==-1,$;D&&($=N(Q,"u")!==-1,re.lastIndex=0);for(var H=[],q;q=g(re,P),!(q===null||(I(H,q),!D));){var Y=d(q[0]);Y===""&&(re.lastIndex=p(P,u(re.lastIndex),$))}for(var ie="",ne=0,pe=0;pe<H.length;pe++){q=H[pe];for(var Z=d(q[0]),J=_(S(c(q.index),P.length),0),ae=[],he,ue=1;ue<q.length;ue++)I(ae,M(q[ue]));var de=q.groups;if(X){var le=E([Z],ae,J,P);de!==void 0&&I(le,de),he=d(e(G,void 0,le))}else he=y(Z,P,J,ae,de,G);J>=ne&&(ie+=T(P,ne,J)+he,ne=J+Z.length)}return ie+T(P,ne)}]},!W||!z||j),jD}Jle();function Wi(e){return!e||!e.ownerDocument||!e.ownerDocument.defaultView?window:e.ownerDocument.defaultView}function Nu(e){return!e||!e.ownerDocument?document:e.ownerDocument}var ma=null,BD=null;sL&&window.addEventListener("resize",function(){BD!==window.devicePixelRatio&&(BD=window.devicePixelRatio,ma=null)});function FD(e){if(ma===null){var t=Nu(e);if(typeof t>"u")return ma=0,ma;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),ma=i}return ma}var cd=(function(){function e(r,n){var i=this;this.onScroll=function(){var o=Wi(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),y=v*(d-h);i.draggedAxis==="x"&&(y=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?y-(c+u.size):y,y=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-y:y),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=y},this.onEndDrag=function(o){var a=Nu(i.el),s=Wi(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=QA(this.recalculate.bind(this),64),this.onMouseMove=QA(this.onMouseMove.bind(this),64),this.hideScrollbars=tD(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=tD(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=ple(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=Nu(n),a=Wi(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),sL&&(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=Wi(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||Dle;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=Wi(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,y=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&h>s-y,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=Nu(this.el),a=Wi(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=Wi(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,y=function m(){if(p===-1){if(d>v){var g;d-=o.options.clickOnTrackSpeed,o.contentWrapperEl.scrollTo((g={},g[o.axis[i].offsetAttr]=d,g)),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)}};y()}},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:FD(this.el)}catch{return FD(this.el)}},t.removeListeners=function(){var n=this,i=Wi(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})();cd.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};cd.instances=new WeakMap;function $D(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 du(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$D(Object(r),!0).forEach(function(n){Qle(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$D(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Qle(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ud(){return ud=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},ud.apply(this,arguments)}function ece(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 tce(e,t){if(e==null)return{};var r=ece(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 rce=["children","scrollableNodeProps","tag"],nce=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},ff=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=tce(e,rce),c=a,u,d=C.useRef(),h=C.useRef(),p=C.useRef(),v={},y={},m=[];return Object.keys(s).forEach(function(g){Object.prototype.hasOwnProperty.call(cd.defaultOptions,g)?v[g]=s[g]:g.match(/data-simplebar-(.+)/)&&g!=="data-simplebar-direction"?m.push({name:g,value:s[g]}):y[g]=s[g]}),m.length&&console.warn(`simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:
75
117
  'data-simplebar-auto-hide="false"' —> 'autoHide="false"'
76
- `),P.useEffect(function(){return f=i.ref||f,h.current&&(d=new yl(h.current,Du(Du(Du(Du({},Wee(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)}},[]),P.createElement(l,bl({ref:h,"data-simplebar":!0},m),P.createElement("div",{className:"simplebar-wrapper"},P.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},P.createElement("div",{className:"simplebar-height-auto-observer"})),P.createElement("div",{className:"simplebar-mask"},P.createElement("div",{className:"simplebar-offset"},typeof r=="function"?r({scrollableNodeRef:f,contentNodeRef:p}):P.createElement("div",bl({},i,{className:"simplebar-content-wrapper".concat(i.className?" ".concat(i.className):"")}),P.createElement("div",{className:"simplebar-content"},r)))),P.createElement("div",{className:"simplebar-placeholder"})),P.createElement("div",{className:"simplebar-track simplebar-horizontal"},P.createElement("div",{className:"simplebar-scrollbar"})),P.createElement("div",{className:"simplebar-track simplebar-vertical"},P.createElement("div",{className:"simplebar-scrollbar"})))});bc.displayName="SimpleBar";bc.propTypes={children:ve.oneOfType([ve.node,ve.func]),scrollableNodeProps:ve.object,tag:ve.string};const xl=vw,wl=gw,GL=e=>{switch(e){case ae.EPermissionType.DATACLASS:return O.jsx(we.FdTableHeader,{className:"h-6 w-6"});case ae.EPermissionType.SINGLETON:return O.jsx(we.FdSingleton,{className:"h-6 w-6"});case ae.EPermissionType.DATASTORE:return O.jsx(we.FdModel3,{className:"h-6 w-6"});case ae.EPermissionType.ATTRIBUTE:return O.jsx(we.FdTableColumn,{className:"h-6 w-6"});case ae.EPermissionType.METHOD:return O.jsx(we.FdCode,{className:"h-6 w-6"});case ae.EPermissionType.SINGLETON_METHOD:return O.jsx(we.FdFunctionSingleton,{className:"h-6 w-6"});case ae.ESubPermissionType.ENTITY_SEL_METHOD:return O.jsx(we.FdFunctionSelection,{className:"h-6 w-6"});case ae.ESubPermissionType.ENTITY_METHOD:return O.jsx(we.FdFunctionEntity,{className:"h-6 w-6"});case ae.ESubPermissionType.DS_METHOD:return O.jsx(we.FdFunctionDatastore,{className:"h-6 w-6"});case ae.ESubPermissionType.DATACLASS_METHOD:return O.jsx(we.FdFunctionDataclass,{className:"h-6 w-6"});default:return O.jsx(we.FdTableHeader,{className:"h-6 w-6"})}},$D=({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 bg-grey-800",children:O.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[O.jsx(we.FdInfoBold,{className:"h-10 w-10"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})});function Gee(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 O.jsx(ae.BaseCheckboxIcon,{viewBox:"0 0 24 24",...n,children:O.jsx("path",{fill:t?"transparent":"currentColor",d:i,stroke:t?"currentColor":void 0,strokeWidth:t?3:void 0})})}function Kee(e){return O.jsx(ae.Checkbox,{icon:O.jsx(Gee,{}),...e})}const ao=({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 O.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[f||d.from.length===0||t==="promote"?O.jsx(ae.Checkbox,{isChecked:f,onChange:()=>r&&r(d),isInvalid:u===!1}):O.jsx(Kee,{isIndeterminate:o&&d.from.length>0,onChange:()=>r&&r(d),isInvalid:u===!1}),O.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)&&O.jsx(O.Fragment,{children:O.jsxs(xl,{openDelay:0,closeDelay:0,children:[O.jsx(wl,{children:O.jsx(we.FdInfoBold,{className:"h-4 w-4 text-white"})}),O.jsx(Lr,{container:Ft(),children:O.jsx(Fr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:O.jsxs("div",{className:"space-y-1 px-2",children:[d.from.length?O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(we.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:d.from.map(h=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[h].id),children:a[h].privilege},h))})]})]}):null,d.info&&O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(we.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)&&O.jsxs(xl,{openDelay:0,closeDelay:0,children:[O.jsx(wl,{children:O.jsx(we.FdCrown,{className:"h-3 w-3 text-white"})}),O.jsx(Lr,{container:Ft(),children:O.jsx(Fr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:O.jsx("div",{className:"space-y-1 px-2",children:O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(we.FdInfoCircle,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{children:[O.jsxs("span",{className:"mr-1",children:["Function is promoted with:"," "]}),i==null?void 0:i.map(h=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(a[h].id),children:a[h].privilege},h))]})]})})})})]})]})]})},Yee=({privilegeId:e,privileges:t})=>{const r=$t(),n=r.getCatalogMethods(),i=r.getDataclasses(),o=r.getSingletons(),[a,u]=P.useState([]),[l,d]=P.useState("");P.useEffect(()=>{d("")},[e]);const{isOpen:f,getMenuProps:h,getInputProps:p,getComboboxProps:v,highlightedIndex:m,getItemProps:y,selectedItem:x,openMenu:b}=fo({onInputValueChange(){u([])},items:[],itemToString(R){return R?R.applyTo:""},defaultHighlightedIndex:0,stateReducer:(R,I)=>{const{changes:N,type:A}=I;switch(A){case fo.stateChangeTypes.InputKeyDownArrowDown:return{...N,isOpen:!0,highlightedIndex:R.highlightedIndex<=a.length?R.highlightedIndex+1:0};case fo.stateChangeTypes.InputKeyDownArrowUp:return{...N,isOpen:!0,highlightedIndex:R.highlightedIndex>=0?R.highlightedIndex-1:a.length};case fo.stateChangeTypes.InputKeyDownEnter:{const k=a[R.highlightedIndex];if(!k)return N;const L=ae.addPermission(e,k,t);return r.actions.updatePrivileges(L),{...N,isOpen:!0,highlightedIndex:0}}}return N}});P.useEffect(()=>{const R=ae.getInheritedResources(e,t).map(({resource:N,type:A,subType:k})=>({applyTo:N,type:A,subType:k})),I=tw(l.toLowerCase(),n,Object.values(i),Object.values(o));u(I.filter(({applyTo:N,type:A,subType:k})=>!xi.find(R,{applyTo:N,type:A,subType:k})))},[l,e,t,n,i,o]);const w=h({},{suppressRefError:!0}),E=P.useRef(null),_=P.useRef(null),S=Ga({count:a.length,getScrollElement:()=>_.current,estimateSize:()=>32,overscan:5});return P.useEffect(()=>{m!==-1&&S.scrollToIndex(m)},[m,S]),P.useEffect(()=>{f&&E.current&&E.current.focus()},[f]),O.jsxs("div",{className:"relative w-56 text-white group",...v(),children:[O.jsx("div",{...v(),children:O.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()}})}),O.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1",children:O.jsx(we.FdDown,{className:"h-4 w-4 cursor-pointer",onMouseDown:R=>R.preventDefault(),onClick:()=>b()})}),f&&O.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:O.jsx("li",{style:{height:`${S.getTotalSize()}px`,width:"100%",position:"relative"},children:S.getVirtualItems().map(R=>{const I=a[R.index];return O.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 N=ae.addPermission(e,I,t);r.actions.updatePrivileges(N)},children:[GL(I.type),O.jsx("span",{children:I.applyTo})]},R.key)})})})]})};function Xee(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 $n={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},zD=Object.values($n).flat();function fi(e,t){return t.length>0&&t.every(r=>e.includes(r))}function Zee(e,t){return t.some(r=>e.includes(r))}function Jee(e,t){return Array.from(new Set([...e,...t]))}function Qee(e,t){return e.filter(r=>!t.includes(r))}const ete=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n,rawPrivileges:i})=>{var oe,fe;const[o,a]=P.useState(null),[u,l]=P.useState(null),{styles:d,attributes:f}=Sl(o,u,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),h=$t(),[p,v]=P.useState([]),[m,y]=P.useState([]),[x,b]=P.useState(""),[w,E]=P.useState(""),[_,S]=P.useState({}),R=i??n;P.useEffect(()=>{const ne=setTimeout(()=>y(p),0);return()=>clearTimeout(ne)},[p]),P.useEffect(()=>{S({})},[R]);const{id:I}=e,N=P.useMemo(()=>ae.getInheritedResources(I,R),[I,(oe=R[I])==null?void 0:oe.includes,(fe=R[I])==null?void 0:fe.resources]),A=P.useMemo(()=>ae.getPromotions(I,R),[R[I]]),k=ne=>{v([...ne])},L=ne=>{v(K=>fi(K,ne)?Qee(K,ne):Jee(K,ne))},$=ne=>{L($n[ne])},j=fi(p,zD),D=p.length>0&&!j,W=fi(p,$n.functions),F=!W&&Zee(p,$n.functions),X=()=>k(zD),Z=()=>k([]),Q=async ne=>{if(h.getHost()==="vscode"){const he=ae.removePermission(e.id,ne,n);h.actions.updatePrivileges(he);return}const{confirmed:K}=await h.actions.openModal({title:"Delete Privilege",type:ae.ModalType.CONFIRM,color:ae.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(K){const he=ae.removePermission(e.id,ne,n);h.actions.updatePrivileges(he)}},U=async()=>{const{confirmed:ne}=await h.actions.openModal({title:"Reset Permissions",type:ae.ModalType.CONFIRM,color:ae.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"});if(ne){const K=ae.resetResources(e.id,n);h.actions.updatePrivileges(K)}},ee=P.useMemo(()=>m.length>0?N.filter(ne=>m.includes(ne.type)):N,[N,m]),ie=P.useMemo(()=>ee.filter(({resource:ne})=>w?new RegExp(xi.escapeRegExp(w),"i").test(ne):!0),[ee,w]),ue=P.useMemo(()=>Xee(ie),[ie]),B=P.useMemo(()=>ue.filter(ne=>{const K=ne.permissions.every(he=>!he.checked)&&ne.permissions.some(he=>he.from.length>0);return r||!K}),[ue,r]),V=(ne,K)=>{const he=`${ne.resource}|${ne.type}|${K.name}`;S(be=>({...be,[he]:!K.checked})),setTimeout(()=>{const be=ae.togglePermission(e.id,ne,K,n);h.actions.updatePrivileges(be)},0)},J=P.useMemo(()=>B.some(ne=>ne.exists===!1),[B]),H=async()=>{const{confirmed:ne}=await h.actions.openModal({title:"Delete Privilege",type:ae.ModalType.CONFIRM,color:ae.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"}),K=Object.entries(R).map(([he,be])=>{const pe=be.resources.filter(de=>!de.exists);return{[he]:pe.map(de=>({applyTo:de.resource,type:de.type}))}}).reduce((he,be)=>({...he,...be}),{});if(ne){const he=ae.removeMultiplePermissions(K,n);h.actions.updatePrivileges(he)}},G=P.useRef(null),se=Ga({count:B.length,getScrollElement:()=>{var ne;return((ne=G.current)==null?void 0:ne.getScrollElement())??null},estimateSize:()=>36,overscan:5});return P.useEffect(()=>{var ne,K;(K=(ne=G.current)==null?void 0:ne.getScrollElement())==null||K.scrollTo({top:0})},[I]),O.jsxs(bc,{ref:G,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:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20 bg-grey-800",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.jsxs("div",{className:"relative w-56 text-white",children:[O.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:O.jsx(we.FdSearch,{className:"h-4 w-4 text-gray-400"})}),O.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:O.jsx(_r.Popover,{className:"flex items-center",children:({open:ne})=>O.jsxs(O.Fragment,{children:[O.jsx(_r.Popover.Button,{ref:a,children:O.jsx(we.FdAdjust,{className:"h-4 w-4"})}),ne&&O.jsx(ac,{children:O.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:[O.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2",children:[O.jsx(ae.Checkbox,{isChecked:j,isIndeterminate:D,onChange:()=>j?Z():X()}),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(ae.Checkbox,{isChecked:fi(p,$n.datastore),onChange:()=>$("datastore"),label:"Datastore"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ae.Checkbox,{isChecked:fi(p,$n.dataclass),onChange:()=>$("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ae.Checkbox,{isChecked:fi(p,$n.singleton),onChange:()=>$("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ae.Checkbox,{isChecked:W,isIndeterminate:F,onChange:()=>$("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ae.Checkbox,{isChecked:fi(p,$n.attribute),onChange:()=>$("attribute"),label:"Attribute"})})]})]})})]})})}),O.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:x,onChange:ne=>{const K=ne.target.value;b(K),setTimeout(()=>E(K),0)}})]}),O.jsx(Yee,{privilegeId:I,privileges:R}),O.jsx("div",{children:O.jsxs(xl,{openDelay:0,closeDelay:0,children:[O.jsx(wl,{children:O.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:O.jsx(we.FdReload,{})})}),O.jsx(Lr,{container:Ft(),children:O.jsxs(Fr,{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:[O.jsx(we.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),O.jsx("p",{children:"Resetting the privilege will remove all configured ressources"})]})})]})}),O.jsxs(xl,{openDelay:0,closeDelay:0,children:[O.jsx(wl,{children:O.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:O.jsx(we.FdClean,{className:"h-4 w-4"})})}),O.jsx(Lr,{container:Ft(),children:O.jsxs(Fr,{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:[O.jsx(we.FdBulb,{className:"m-0.5 h-4 w-4 flex-shrink-0"}),O.jsx("p",{children:"Delete all the non existing resources from privileges"})]})})]})]})}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Read"}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Create"}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Update"}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Delete"}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Execute"}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Promote"})]})}),B.length?O.jsxs("tbody",{children:[se.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${se.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:7})}):null,se.getVirtualItems().map(ne=>{const K=B[ne.index],he=K.permissions.some(be=>be.from.length>0);return O.jsxs("tr",{className:We("group hover:bg-grey-300",{"bg-grey-600":ne.index%2!==0,"opacity-60":K.exists===!1}),children:[O.jsxs("td",{className:We("group flex items-center gap-3 py-2 text-xs",K.exists===!1?"text-negative-400":"text-white",{"border-b-[0.5px] border-grey-300":!1}),children:[GL(K.type),K.resource,O.jsx(ae.Tooltip,{placement:"top",label:"Remove Permission",isDisabled:he,container:Ft(),children:O.jsx("button",{onClick:()=>{he?ae.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** Inherited permissions can't be removed",customIcon:we.FdInfoBold}):Q({applyTo:K.resource,type:K.type})},className:We("flex flex-shrink-0 items-center justify-center rounded p-1 opacity-0 group-hover:opacity-100",he?"hover:bg-grey-300 group-hover:opacity-70":"hover:bg-primary-hover"),children:O.jsx(we.FdPlus,{className:"h-4 w-4 rotate-45 transform text-white"})})})]}),O.jsx("td",{className:"py-2 text-center",children:O.jsx(ao,{permissions:K.permissions,showIncluded:r,label:"read",onToggle:be=>V(K,be),onSelect:t,privileges:n,exists:K.exists,optimisticChecked:_[`${K.resource}|${K.type}|read`]})}),O.jsx("td",{className:"py-2 text-center",children:O.jsx(ao,{permissions:K.permissions,showIncluded:r,label:"create",onToggle:be=>V(K,be),onSelect:t,privileges:n,exists:K.exists,optimisticChecked:_[`${K.resource}|${K.type}|create`]})}),O.jsx("td",{className:"py-2 text-center",children:O.jsx(ao,{permissions:K.permissions,showIncluded:r,label:"update",onToggle:be=>V(K,be),onSelect:t,privileges:n,exists:K.exists,optimisticChecked:_[`${K.resource}|${K.type}|update`]})}),O.jsx("td",{className:"py-2 text-center",children:O.jsx(ao,{permissions:K.permissions,showIncluded:r,label:"drop",onToggle:be=>V(K,be),onSelect:t,privileges:n,exists:K.exists,optimisticChecked:_[`${K.resource}|${K.type}|drop`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-grey-300",children:O.jsx(ao,{promoted:A[K.resource],permissions:K.permissions,showIncluded:r,label:"execute",onToggle:be=>V(K,be),onSelect:t,privileges:n,exists:K.exists,optimisticChecked:_[`${K.resource}|${K.type}|execute`]})}),O.jsx("td",{className:"py-2 text-center",children:O.jsx(ao,{permissions:K.permissions,showIncluded:r,label:"promote",onToggle:be=>V(K,be),onSelect:t,privileges:n,exists:K.exists,optimisticChecked:_[`${K.resource}|${K.type}|promote`]})})]},`${K.resource}-${ne.index}`)}),(()=>{const ne=se.getVirtualItems();if(!ne.length)return null;const K=se.getTotalSize()-ne[ne.length-1].end;return K>0?O.jsx("tr",{style:{height:`${K}px`},children:O.jsx("td",{colSpan:7})}):null})()]}):null]}),!ue.length&&w?O.jsx($D,{children:"The Permission you're looking for can't be found "}):null,!ue.length&&!w?O.jsxs($D,{children:["This Privilege has no Permissions configured yet ",O.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},tte=({onCreate:e})=>{const t=$t(),r=t.getPrivileges(),[n,i]=P.useState(null),[o,a]=P.useState(null),[u,l]=P.useState(""),[d,f]=P.useState(null),{styles:h,attributes:p}=Sl(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});P.useEffect(()=>{l(""),f(null)},[o]);const v=m=>{f(null);try{const y=ae.createPrivilege(u,r),x=Object.values(y).find(b=>b.privilege===u);t.actions.updatePrivileges(y),x&&e(x),setTimeout(()=>{m()},0)}catch(y){f(y.message)}};return O.jsx(_r.Popover,{children:({open:m,close:y})=>O.jsxs(O.Fragment,{children:[O.jsx(_r.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:i,children:O.jsx("span",{children:O.jsx(we.FdPlus,{className:"h-4 w-4 text-white"})})}),m&&O.jsx(ac,{children:O.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:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),O.jsxs("div",{className:"mt-2",children:[O.jsxs("label",{className:"flex items-center space-x-4",children:[O.jsx("span",{className:"text-grey-100",children:"Name"}),O.jsx("input",{autoFocus:!0,value:u,onChange:x=>l(x.target.value),onKeyDown:x=>{x.key==="Enter"&&v(y)},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&&O.jsx("p",{className:"mt-1 text-xs text-red-400",children:d})]}),O.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[O.jsx("button",{className:"rounded border border-primary-dark bg-primary-dark px-4 py-1 hover:border-primary-hover hover:bg-primary-hover",onClick:()=>v(y),children:"Create"}),O.jsx("button",{className:"rounded border border-grey-100 px-4 py-1 text-grey-100 hover:bg-white hover:text-primary-dark",onClick:()=>y(),children:"Cancel"})]})]})})]})})},rte=()=>{const e=$t(),t=e.getCatalog(),r=e.getPrivileges(),[n,i]=P.useState(r);P.useEffect(()=>{const m=setTimeout(()=>i(r),0);return()=>clearTimeout(m)},[r]);const o=P.useMemo(()=>{if(t===null)return n;const m=wq(n,Object.values((t==null?void 0:t.dataClasses)??{}));return _q(m,t)},[n,t]),[a,u]=P.useState(null),[l,d]=P.useState(null),f=m=>{u(m),setTimeout(()=>d(m),0)},h=P.useMemo(()=>Object.keys(o),[o]);P.useEffect(()=>{if(a&&o[a.id]||!h.length)return;const m=o[h[0]];u(m),d(m)},[o]),P.useEffect(()=>{h.length<2&&v(!0)},[h.length]);const[p,v]=P.useState(!0);return O.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-1",children:[O.jsxs("div",{className:"flex h-full w-[356px] shrink-0 flex-col bg-grey-800",children:[O.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between bg-grey-800 px-3.5 py-[10px]",children:[O.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[O.jsx("span",{children:O.jsx(we.FdGroup,{className:"h-[14px] w-[14px]"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),O.jsx(tte,{onCreate:m=>{u(m),d(m)}})]}),O.jsx(mJ,{privileges:o,selectedPrivilege:a,selectPrivilege:f})]}),a&&o[a.id]?O.jsxs("div",{className:"privileges-container relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden border-l-[0.5px] border-grey-900 bg-grey-800",children:[O.jsxs("div",{className:"mb-1 flex min-h-0 min-w-0 flex-1 w-full flex-col items-stretch overflow-auto",children:[a.privilege!=="guest"?O.jsx(tX,{privileges:o,selectedPrivilege:l??a,onSelect:m=>u(r[m]),setShowIncluded:v,showIncluded:p}):null,O.jsx(ete,{privileges:o,rawPrivileges:r,selectedPrivilege:l??a,onSelect:m=>u(r[m]),showIncluded:p})]}),O.jsx("div",{className:"mt-auto flex-shrink-0",children:O.jsx(nte,{privileges:o,selectedPrivilege:a,setSelectedPrivilege:u})})]}):O.jsx(aj,{tab:"Privilege"})]})},nte=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=P.useState(!1);return O.jsx(ae.Panel,{path:ae.ROLES_TAB_PATH,isOpen:n,onOpen:()=>i(!0),onClose:()=>i(!1),children:O.jsx("div",{className:"flex h-full w-full min-h-0 px-3 pb-3",children:O.jsx("div",{className:"h-full w-full overflow-hidden rounded bg-grey-900",children:O.jsx(h7,{dict:e,data:ae.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})},ite=P.memo(({role:e})=>{var S;const t=$t(),[r,n]=P.useState(e),[i,o]=P.useState(e.role),[a,u]=P.useState(null),l=t.getPrivileges(),d=((S=r.privileges)==null?void 0:S.filter(R=>l[R]&&l[R].privilege!=="guest").length)||0,f=t.getRoles(),{selectedRole:h,selectRole:p}=yx(),[v,m]=P.useState(!1),y=ae.useOutsideClick(()=>{v&&b()});ae.useDidMountEffect(()=>{i!==e.role&&o(e.role)},[e.role]),P.useEffect(()=>{e.role||m(!0)},[]),P.useEffect(()=>{n(e)},[e]);const x=()=>{u(null),m(!0)},b=()=>{u(null),e.role&&e.role===i&&m(!1);try{const R=ae.saveRole({...r,role:i},f);t.actions.updateRoles(R),m(!1)}catch(R){u(R.message)}},w=async R=>{if(R.stopPropagation(),t.getHost()==="vscode"){E();return}const{confirmed:I}=await t.actions.openModal({title:"Delete Role",type:ae.ModalType.CONFIRM,color:ae.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"});I&&E()},E=()=>{const R=ae.removeRole(r.id,f),I=Object.keys(R);if(h!==r.id){t.actions.updateRoles(R);return}if(I.length===0)p(null);else{const N=Object.keys(f),A=N.indexOf(r.id),k=Math.max(0,A-1),L=N[k];A===0?p(I[0]):R[L]?p(L):p(I[0])}t.actions.updateRoles(R)},_=(R=null)=>{if(R&&R.stopPropagation(),!e.role){E();return}m(!1),o(e.role)};return O.jsx(O.Fragment,{children:O.jsxs("div",{className:We("rounded border bg-grey-300 p-2",{"border-grey-100":h!==r.id,"border-primary-dark":h===r.id}),role:"button","data-cy":"privilegeCard",onClick:()=>{p(r.id)},ref:y,children:[O.jsx("div",{className:"flex items-center justify-between",children:O.jsxs("div",{className:"flex flex-1 items-center text-white",children:[O.jsx("span",{className:"mr-4",children:O.jsx(we.FdGroup,{className:"h-6 w-6"})}),v?O.jsxs("div",{className:"relative h-6 flex-1 mr-2",children:[O.jsx("input",{type:"text",value:i,onChange:({target:{value:R}})=>{o(R)},onKeyDown:R=>{R.key==="Enter"&&b(),R.key==="Escape"&&_()},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":a,"focus:border-primary-dark":!a}),placeholder:"role",autoComplete:"off",autoFocus:!0}),a&&O.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: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:We("justify-betwee ml-auto flex w-fit items-center gap-x-2"),children:v?O.jsxs(O.Fragment,{children:[O.jsx("button",{onClick:b,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:O.jsx(we.FdSave,{className:"h-4 w-4 text-grey-50"})}),O.jsx("button",{onClick:_,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:O.jsx(we.FdClose,{className:"h-4 w-4 text-grey-50"})})]}):O.jsxs(O.Fragment,{children:[O.jsx("button",{onClick:x,className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:O.jsx(we.FdPen,{className:"h-4 w-4 text-grey-50"})}),O.jsx("button",{onClick:R=>w(R),className:"rounded p-1 hover:bg-primary-hover hover:text-white",children:O.jsx(we.FdTrash,{className:"h-4 w-4 text-grey-50"})})]})})]})}),O.jsxs("span",{className:We("ml-[43px] py-1 text-xs text-white"),children:[d," Privilege",d>1?"s":""]})]})})}),KL=(e,t)=>e?t[e]:null,HD=(e,t,r)=>{const n=KL(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},ote=()=>{const e=$t(),t=e.getPrivileges(),r=e.getRoles(),{selectedRole:n}=yx(),i=KL(n,r),o=(l,d)=>d&&d.privileges.includes(l.id),a=P.useMemo(()=>Object.values(t).filter(l=>o(l,i)&&l.privilege!=="guest"),[t,i]),u=P.useMemo(()=>Object.values(t).filter(l=>!o(l,i)&&l.privilege!=="guest"),[t,i]);return O.jsxs("div",{className:"w-full border-b border-grey-900 p-4 ",children:[O.jsx("div",{className:"mb-4 flex items-center gap-x-5 text-white",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("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)=>O.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=HD(i.id,l.id,r);e.actions.updateRoles(f)},children:[O.jsx("span",{className:"text-xs",children:l.privilege}),O.jsx("button",{className:"focus:outline-none",children:o(l,i)?O.jsx(we.FdMinus,{className:"h-[14px] w-[14px]"}):O.jsx(we.FdPlus,{className:"h-[14px] w-[14px]"})})]},d)),u.map((l,d)=>O.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=HD(i.id,l.id,r);e.actions.updateRoles(f)},children:[O.jsx("span",{className:"text-xs",children:l.privilege}),O.jsx("button",{className:"text-white focus:outline-none",children:o(l,i)?O.jsx(we.FdMinus,{className:"h-[14px] w-[14px]"}):O.jsx(we.FdPlus,{className:"h-[14px] w-[14px]"})})]},d))]})]})},_l=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===ae.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=_l(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))&&![ae.EPermissionType.DATASTORE,ae.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===ae.EPermissionType.DATACLASS?ae.EPermissionType.DATASTORE:e.type===ae.EPermissionType.SINGLETON_METHOD?ae.EPermissionType.SINGLETON:ae.EPermissionType.DATACLASS},p=_l(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}},ate=({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 bg-grey-800",children:O.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 py-4 text-grey-200",children:[O.jsx(we.FdInfoBold,{className:"absolute -right-full h-10 w-10 translate-x-1"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),ste=e=>{switch(e){case"dataclass":return O.jsx(we.FdTableHeader,{className:"h-6 w-6"});case"singleton":return O.jsx(we.FdSingleton,{className:"h-6 w-6"});case"datastore":return O.jsx(we.FdModel3,{className:"h-6 w-6"});case"attribute":return O.jsx(we.FdTableColumn,{className:"h-6 w-6"});case"method":return O.jsx(we.FdCode,{className:"h-6 w-6"});case"singletonMethod":return O.jsx(we.FdFunctionSingleton,{className:"h-6 w-6"});case"entityselMethod":return O.jsx(we.FdFunctionSelection,{className:"h-6 w-6"});case"entityMethod":return O.jsx(we.FdFunctionEntity,{className:"h-6 w-6"});case"dsMethod":return O.jsx(we.FdFunctionDatastore,{className:"h-6 w-6"});case"dataclassMethod":return O.jsx(we.FdFunctionDataclass,{className:"h-6 w-6"});default:return O.jsx(we.FdTableHeader,{className:"h-6 w-6"})}},Oa=vw,Ca=gw,UD=({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=P.useMemo(()=>h||_l(t,e.otherPrivs,e.rolePrivs,d),[h,e,t,d]);return O.jsxs("tr",{className:We("group even:bg-grey-600 hover:bg-grey-300",o),children:[O.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)=>O.jsx("div",{className:We("ml-1.5 mr-1 w-[2px] bg-grey-100",{"mr-0.5":i})},x)),O.jsxs("div",{className:"flex items-center gap-3 py-2",children:[r&&O.jsx("button",{onClick:u,className:"w-3",children:l?O.jsx(we.FdRight,{className:"inline h-4 w-4"}):O.jsx(we.FdDown,{className:"inline h-4 w-4"})}),ste(t.type),a?t.applyTo:v||p]})]}),O.jsx("td",{className:"py-2 text-center",children:[ae.EPermissionType.ATTRIBUTE,ae.EPermissionType.DATASTORE,ae.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[O.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)&&O.jsx(we.FdCheckNaked,{className:"text-grey-50"})}),O.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?O.jsxs(Oa,{openDelay:0,closeDelay:0,children:[O.jsx(Ca,{children:O.jsx(we.FdInfoBold,{className:"h-4 w-4 text-white"})}),O.jsx(Lr,{container:Ft(),children:O.jsx(Fr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:O.jsx("div",{className:"space-y-1 px-2",children:m.read.from.length?O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(we.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:m.read.from.map((y,x)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),O.jsx("td",{className:"py-2 text-center",children:[ae.EPermissionType.ATTRIBUTE,ae.EPermissionType.DATASTORE,ae.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[O.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)&&O.jsx(we.FdCheckNaked,{className:"text-grey-50"})}),O.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?O.jsxs(Oa,{openDelay:0,closeDelay:0,children:[O.jsx(Ca,{children:O.jsx(we.FdInfoBold,{className:"h-4 w-4 text-white"})}),O.jsx(Lr,{container:Ft(),children:O.jsx(Fr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:O.jsx("div",{className:"space-y-1 px-2",children:m.create.from.length?O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(we.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:m.create.from.map((y,x)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),O.jsx("td",{className:"py-2 text-center",children:[ae.EPermissionType.ATTRIBUTE,ae.EPermissionType.DATASTORE,ae.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[O.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)&&O.jsx(we.FdCheckNaked,{className:"text-grey-50"})}),O.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?O.jsxs(Oa,{openDelay:0,closeDelay:0,children:[O.jsx(Ca,{children:O.jsx(we.FdInfoBold,{className:"h-4 w-4 text-white"})}),O.jsx(Lr,{container:Ft(),children:O.jsx(Fr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:O.jsx("div",{className:"space-y-1 px-2",children:m.update.from.length?O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(we.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:m.update.from.map((y,x)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),O.jsx("td",{className:"py-2 text-center",children:[ae.EPermissionType.ATTRIBUTE,ae.EPermissionType.DATASTORE,ae.EPermissionType.DATACLASS].includes(t.type)&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[O.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)&&O.jsx(we.FdCheckNaked,{className:"text-grey-50"})}),O.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?O.jsxs(Oa,{openDelay:0,closeDelay:0,children:[O.jsx(Ca,{children:O.jsx(we.FdInfoBold,{className:"h-4 w-4 text-white"})}),O.jsx(Lr,{container:Ft(),children:O.jsx(Fr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:O.jsx("div",{className:"space-y-1 px-2",children:m.drop.from.length?O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(we.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:m.drop.from.map((y,x)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})}),O.jsx("td",{className:"py-2 text-center",children:t.type!=="attribute"&&O.jsxs("div",{className:"relative mx-auto flex w-fit items-center justify-center gap-x-1",children:[O.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)&&O.jsx(we.FdCheckNaked,{className:"text-grey-50"})}),O.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?O.jsxs(Oa,{openDelay:0,closeDelay:0,children:[O.jsx(Ca,{children:O.jsx(we.FdInfoBold,{className:"h-4 w-4 text-white"})}),O.jsx(Lr,{container:Ft(),children:O.jsx(Fr,{style:{zIndex:50},avoidCollisions:!0,side:"top",className:"max-w-xs rounded bg-primary-light py-2 text-sm font-semibold text-primary",children:O.jsx("div",{className:"space-y-1 px-2",children:m.execute.from.length?O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(we.FdBulb,{className:"mr-2 mt-0.5 h-4 w-4 flex-shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:m.execute.from.map((y,x)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:y},x))})]})]}):null})})})]}):""})]})})]})};function VD(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 WD=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],hi={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},GD=Object.values(hi).flat();function so(e,t){return t.length>0&&t.every(r=>e.includes(r))}function ute(e,t){return Array.from(new Set([...e,...t]))}function lte(e,t){return e.filter(r=>!t.includes(r))}const cte=({selectedRole:e})=>{const[t,r]=P.useState(null),[n,i]=P.useState(null),{styles:o,attributes:a}=Sl(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),u=$t(),l=u.getRestrictedByDefault(),d=u.getPrivileges(),[f,h]=P.useState([]),[p,v]=P.useState([]),[m,y]=P.useState(""),[x,b]=P.useState("");P.useEffect(()=>{const K=setTimeout(()=>v(f),0);return()=>clearTimeout(K)},[f]);const w=u.getCatalogMethods(),E=u.getDataclasses(),_=u.getSingletons(),S=P.useMemo(()=>v7(w,Object.values(E),Object.values(_)),[w,E,_]),R=P.useMemo(()=>!p.length&&!x?[]:[...tw(x,w,Object.values(E),Object.values(_))].filter(K=>p.length?p.includes(K.type):!0).sort((K,he)=>{const be=WD.indexOf(K.type),pe=WD.indexOf(he.type);return be!==pe?be-pe:K.applyTo.toLowerCase()>he.applyTo.toLowerCase()?1:-1}),[x,p,w,E,_]),I=K=>h([...K]),N=K=>{h(he=>so(he,K)?lte(he,K):ute(he,K))},A=K=>N(hi[K]),k=GD.every(K=>f.includes(K)),L=f.length>0&&!k,$=so(f,hi.functions),j=()=>I(GD),D=()=>I([]),W=u.getRoles(),[F,X]=P.useState(W);P.useEffect(()=>{const K=setTimeout(()=>X(W),0);return()=>clearTimeout(K)},[W]);const Z=P.useRef(null);P.useEffect(()=>{var K,he;(he=(K=Z.current)==null?void 0:K.getScrollElement())==null||he.scrollTo({top:0})},[e]);const Q=Ga({count:R.length,getScrollElement:()=>{var K;return((K=Z.current)==null?void 0:K.getScrollElement())??null},estimateSize:()=>36,overscan:5,paddingEnd:40}),U=P.useMemo(()=>{const K=Object.values(d).find(_e=>_e.privilege==="guest"),he=F[e],be=he?Object.fromEntries(he.privileges.map(_e=>[_e,d[_e]]).filter(([,_e])=>!!_e)):{};if(l)return{rolePrivs:be,otherPrivs:K?{[K.id]:K}:{}};const pe=K?{[K.id]:{...K,active:!0}}:{},de=Object.fromEntries(Object.entries(d).filter(([_e])=>_e!==(K==null?void 0:K.id)&&!(he!=null&&he.privileges.includes(_e))).map(([_e,Re])=>[_e,{...Re,active:!1}]));return{rolePrivs:be,otherPrivs:{...pe,...de}}},[d,F,e,l]),[ee,ie]=P.useState(!1),[ue,B]=P.useState({}),V=P.useMemo(()=>{const K=[];for(const he of Object.values(S)){for(const be of he.dataClasses)K.push(`dc-${be.applyTo}`);for(const be of he.singletons)K.push(`sing-${be.applyTo}`)}return K},[S]),J=V.length>0&&V.every(K=>ue[K]===!0),H=P.useCallback(()=>{const K={};for(const he of V)K[he]=!0;B(K)},[V]),G=P.useCallback(K=>{K==="ds-group"?ie(he=>!he):B(he=>({...he,[K]:!he[K]}))},[]),se=P.useMemo(()=>{const K=new Map;for(const{permission:he}of VD(S,!1,{}))K.set(`${he.applyTo}|${he.type}`,_l(he,U.otherPrivs,U.rolePrivs,l));return K},[U,l,S]),oe=P.useMemo(()=>VD(S,ee,ue),[S,ee,ue]),fe=Ga({count:oe.length,getScrollElement:()=>{var K;return((K=Z.current)==null?void 0:K.getScrollElement())??null},estimateSize:()=>36,overscan:8,paddingEnd:15}),ne=P.useCallback(()=>{ae.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** You can add or modify permissions only in the Privilege section.",customIcon:we.FdInfoCircle})},[]);return O.jsxs(bc,{ref:Z,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:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20 bg-grey-800",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(ae.Tooltip,{label:"Collapse All",placement:"top",container:Ft(),children:O.jsx("button",{onClick:()=>{J?(H(),ie(!0)):H()},className:We("cursor-pointer rounded-md p-1 hover:bg-primary-hover focus:outline-none",{"pointer-events-none text-grey-200":ee&&J,"text-white":!(ee&&J)}),children:O.jsx(we.FdCollapseAll,{className:"h-4 w-4"})})}),O.jsxs("div",{className:"relative w-56 text-white",children:[O.jsx("div",{className:"absolute inset-y-0 left-0 flex items-center px-1",children:O.jsx(we.FdSearch,{className:"h-4 w-4 text-gray-400"})}),O.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:O.jsx(_r.Popover,{className:"flex items-center",children:({open:K})=>O.jsxs(O.Fragment,{children:[O.jsx(_r.Popover.Button,{ref:r,children:O.jsx(we.FdAdjust,{className:"h-4 w-4"})}),K&&O.jsx(ac,{children:O.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:[O.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2",children:[O.jsx(ae.Checkbox,{isChecked:k,isIndeterminate:L,onChange:()=>k?D():j()}),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(ae.Checkbox,{isChecked:so(f,hi.datastore),onChange:()=>A("datastore"),label:"Datastore"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ae.Checkbox,{isChecked:so(f,hi.dataclass),onChange:()=>A("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ae.Checkbox,{isChecked:so(f,hi.singleton),onChange:()=>A("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ae.Checkbox,{isChecked:$,onChange:()=>A("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ae.Checkbox,{isChecked:so(f,hi.attribute),onChange:()=>A("attribute"),label:"Attribute"})})]})]})})]})})}),O.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:m,onChange:K=>{const he=K.target.value;y(he),setTimeout(()=>b(he),0)}})]})]})}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"read"}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Create"}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Update"}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Delete"}),O.jsx("td",{className:"bg-grey-800 px-4 py-2 text-center text-[12px] text-white",children:"Execute"})]})}),O.jsx("tbody",{className:"relative bg-grey-800 text-white",children:p.length||x?O.jsxs(O.Fragment,{children:[Q.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${Q.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:6})}):null,Q.getVirtualItems().map(K=>{const he=R[K.index];return O.jsx(UD,{privileges:U,permission:he,depth:0,inSearch:!0,isRestrictedByDefault:l,allPrivileges:d,toastMessageCallback:ne,computedInherited:se.get(`${he.applyTo}|${he.type}`)},`${he.type}-${K.index}`)}),(()=>{const K=Q.getVirtualItems();if(!K.length)return null;const he=Q.getTotalSize()-K[K.length-1].end;return he>0?O.jsx("tr",{style:{height:`${he}px`},children:O.jsx("td",{colSpan:6})}):null})()]}):O.jsxs(O.Fragment,{children:[fe.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${fe.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:6})}):null,fe.getVirtualItems().map(K=>{const he=oe[K.index];return O.jsx(UD,{privileges:U,permission:he.permission,depth:he.depth,hasChild:he.hasChild,isChild:he.isChild,collapsed:he.isCollapsed,toggleCollapse:he.toggleId?()=>G(he.toggleId):void 0,isRestrictedByDefault:l,allPrivileges:d,toastMessageCallback:ne,computedInherited:se.get(`${he.permission.applyTo}|${he.permission.type}`)},he.id)}),(()=>{const K=fe.getVirtualItems();if(!K.length)return null;const he=fe.getTotalSize()-K[K.length-1].end;return he>0?O.jsx("tr",{style:{height:`${he}px`},children:O.jsx("td",{colSpan:6})}):null})()]})})]}),(x||p.length)&&!R.length?O.jsx(ate,{children:"The Permission you're looking for can't be found "}):null]})},fte=()=>O.jsx("div",{className:"flex flex-1 items-center justify-center",children:O.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-grey-200 border-t-primary-dark"})}),dte=()=>{const e=$t(),t=e.getRoles(),[r,n]=P.useState(null),[i,o]=P.useState(null),[a,u]=P.useState(""),[l,d]=P.useState(null),{styles:f,attributes:h}=Sl(r,i,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});P.useEffect(()=>{u(""),d(null)},[i]);const p=()=>{if(!a)throw new Error("Please enter a valid name");if(Object.values(t).find(x=>x.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const m=Aq.generate(),y=ae.createRole(m,a,t);e.actions.updateRoles(y)};return O.jsx(_r.Popover,{children:({open:v,close:m})=>{const y=()=>{d(null);try{ae.validateName(a),p(),m()}catch(x){d(x.message)}};return O.jsxs(O.Fragment,{children:[O.jsx(_r.Popover.Button,{className:"rounded p-1 hover:bg-primary-hover","data-cy":"New-priv-btn",ref:n,children:O.jsx("span",{children:O.jsx(we.FdPlus,{className:"h-4 w-4 text-white"})})}),v&&O.jsx(ac,{children:O.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:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),O.jsxs("div",{className:"mt-2",children:[O.jsxs("label",{className:"flex items-center space-x-4",children:[O.jsx("span",{className:"text-grey-100",children:"Name"}),O.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&&O.jsx("p",{className:"mt-1 text-xs text-red-400",children:l})]}),O.jsxs("div",{className:"mt-4 flex items-center justify-center space-x-2",children:[O.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"}),O.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"})]})]})})]})}})},hte=()=>{const e=$t(),t=e.getRoles(),r=e.getPrivileges(),{selectedRole:n,deferredSelectedRole:i}=yx(),o=P.useMemo(()=>Object.values(t).sort((a,u)=>ae.localeCompare(a.role,u.role)),[t]);return O.jsxs("div",{className:"flex flex-1 h-full",children:[O.jsxs("div",{className:"flex h-full w-[356px] flex-col bg-grey-800",children:[O.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between bg-grey-800 px-3.5 py-[10px]",children:[O.jsxs("div",{className:"flex items-center space-x-1 text-[#DDE1E6]",children:[O.jsx("span",{children:O.jsx(we.FdGroup,{className:"h-[14px] w-[14px]"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),O.jsx(dte,{})]}),O.jsx("div",{className:"flex-1 overflow-auto p-4 pb-10 pt-1",children:o.length>0?O.jsx("div",{className:"flex flex-col gap-4",children:o.map(a=>O.jsx(ite,{role:a,privileges:r},a.id))}):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center bg-grey-800",children:O.jsxs("div",{className:"flex flex-col items-center justify-center space-y-4 text-grey-200",children:[O.jsx(we.FdInfoBold,{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(we.FdPlus,{className:"ml-2 inline h-4 w-4 text-white"})]})]})})})})]}),O.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":n}),children:O.jsx("div",{className:"flex h-full w-full select-none flex-col bg-grey-800",children:n?O.jsxs(O.Fragment,{children:[O.jsx(ote,{}),i?O.jsx(cte,{selectedRole:i}):O.jsx(fte,{})]}):O.jsx(aj,{tab:"Role"})})})]})},YL=()=>{const e=$t(),t=e.getQodly(),r=e.getSelectedTab(),n=e.getForceLogin(),i=e.getRestrictedByDefault(),o=P.useRef();return O.jsx("div",{className:"absolute inset-0 flex flex-1 overflow-hidden",children:O.jsx("div",{className:"relative flex flex-1 overflow-hidden bg-grey-900","data-cy":"Roles&Privileges-editor-cy",ref:a=>o.current=a,children:O.jsxs("div",{className:"flex min-h-0 w-full flex-1 flex-col",children:[O.jsx(XH,{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}),O.jsx("div",{className:r==="roles"?"flex flex-1 overflow-hidden":"hidden",children:O.jsx(ZH,{children:O.jsx(hte,{})})}),O.jsx("div",{className:r==="privileges"?"flex flex-1 overflow-hidden":"hidden",children:O.jsx(rte,{})})]})})})},pte="object",vte={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"}}}}},gte={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"]},PermissionEntry:{type:"array",items:{type:"string"}},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:{$ref:"#/definitions/PermissionEntry"},create:{$ref:"#/definitions/PermissionEntry"},update:{$ref:"#/definitions/PermissionEntry"},drop:{$ref:"#/definitions/PermissionEntry"},execute:{$ref:"#/definitions/PermissionEntry"},promote:{$ref:"#/definitions/PermissionEntry"}},required:["applyTo","type"]}},mte={type:pte,properties:vte,definitions:gte},yte=()=>{const{modals:e,closeModal:t,editModal:r}=eX();return O.jsx(O.Fragment,{children:e.map((n,i)=>O.jsx(ae.Modal,{hasOverlay:i===0,...n,onClose:t,onEdit:r,container:Ft()},n.id))})},XL=e=>{if(!e)return ae.rolesToAPI(ae.sanitizeRoles({}));try{return ae.rolesToAPI(ae.sanitizeRoles(JSON.parse(e)))}catch{return ae.rolesToAPI(ae.sanitizeRoles({}))}},bte=({initialValue:e,onChange:t,...r})=>{const n=$t(),i=n.getRolesFlags(),o=n.getRolesAndPrivileges(),a=P.useMemo(()=>XL(e),[e]),u=P.useRef(o),l=P.useRef(a),d=P.useRef(a);return P.useEffect(()=>{u.current=o},[o]),P.useEffect(()=>{xi.isEqual(a,d.current)||(d.current=a,l.current=a,!xi.isEqual(a,u.current)&&n.actions.setRolesContent({content:a,flags:{touched:!1}}))},[n,a]),ae.useDidMountEffect(()=>{if(!(!t||!i.touched)&&!xi.isEqual(o,l.current))try{const f=JSON.stringify(o,null,2);t(f),l.current=o}catch(f){console.error("[Roles Editor Standalone] Error on value stringify:",f)}},[o,i.touched,t]),O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"relative h-screen z-10 overflow-hidden",children:O.jsx(YL,{...r})}),O.jsx(yte,{})]})},xte=e=>{const t=Q7();return O.jsx(Sq,{adapter:t,children:O.jsx(ae.TipsProvider,{children:O.jsx(bte,{...e})})})},wte=({initialValue:e,catalog:t,...r})=>{const n=P.useMemo(()=>({...ae.sanitizeRoles(XL(e)),flags:{touched:!1}}),[e]);return O.jsx(J7,{initialState:n,catalog:t,children:O.jsx(xte,{initialValue:e,...r})})};exports.ROLES_EDITOR_SCOPE_CLASS=KD.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=Sq;exports.Roles=YL;exports.Standalone=wte;exports.jsonSchema=mte;exports.useReduxAdapter=y7;
118
+ `),C.useEffect(function(){return d=i.ref||d,h.current&&(u=new cd(h.current,du(du(du(du({},nce(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,ud({ref:h,"data-simplebar":!0},y),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",ud({},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"})))});ff.displayName="SimpleBar";ff.propTypes={children:Fs.oneOfType([Fs.node,Fs.func]),scrollableNodeProps:Fs.object,tag:Fs.string};const pL=e=>{switch(e){case ve.EPermissionType.DATACLASS:return O.jsx(Tu,{className:"h-6 w-6"});case ve.EPermissionType.SINGLETON:return O.jsx(fj,{className:"h-6 w-6"});case ve.EPermissionType.DATASTORE:return O.jsx(lj,{className:"h-6 w-6"});case ve.EPermissionType.ATTRIBUTE:return O.jsx(hj,{className:"h-6 w-6"});case ve.EPermissionType.METHOD:return O.jsx(tj,{className:"h-6 w-6"});case ve.EPermissionType.SINGLETON_METHOD:return O.jsx(sj,{className:"h-6 w-6"});case ve.ESubPermissionType.ENTITY_SEL_METHOD:return O.jsx(aj,{className:"h-6 w-6"});case ve.ESubPermissionType.ENTITY_METHOD:return O.jsx(oj,{className:"h-6 w-6"});case ve.ESubPermissionType.DS_METHOD:return O.jsx(ij,{className:"h-6 w-6"});case ve.ESubPermissionType.DATACLASS_METHOD:return O.jsx(nj,{className:"h-6 w-6"});default:return O.jsx(Tu,{className:"h-6 w-6"})}},VD=({children:e})=>O.jsx("div",{className:"h-full w-full",children:O.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 py-4 text-inactive-text",children:[O.jsx(on,{className:"h-10 w-10"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),fa=({permissions:e,label:t,onToggle:r,onSelect:n,promoted:i,privileges:o,exists:a,optimisticChecked:s})=>{const c=e.find(d=>d.name===t);if(!c)return null;const u=s!==void 0?s:c.checked;return O.jsxs("div",{className:"relative mx-auto flex w-fit items-center",children:[O.jsx(ir,{value:u||c.from.length===0||t==="promote"?u:null,onChange:()=>r&&r(c),isInvalid:a===!1}),O.jsxs("div",{className:"absolute left-full translate-x-1/4 inset-y-0 flex cursor-pointer items-center gap-x-1",children:[t!=="promote"&&(c.checked&&(c.info||c.from.length>0)||!c.checked&&c.from.length>0)&&O.jsx(O.Fragment,{children:O.jsx(Lr,{container:Br(),delay:100,label:O.jsxs("div",{className:"max-w-xs h-fit flex flex-col gap-y-3 p-1.5 text-sm font-semibold",children:[c.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"}),O.jsxs("p",{className:"flex flex-col gap-y-2",children:[O.jsx("span",{className:"mr-1",children:"Permission inherited from:"}),O.jsx("ul",{children:c.from.map(d=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(o[d].id),children:o[d].privilege}))})]})]}):null,c.info&&O.jsxs("div",{className:"flex items-start",children:[O.jsx(Sw,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"})," ",O.jsx("span",{className:"flex-1 min-w-0 wrap-break-word whitespace-normal text-left",children:c.info})]})]}),children:O.jsx(on,{className:"h-4 w-4 "})})}),(c.checked||c.from.length>0)&&["execute"].includes(t)&&!!(i!=null&&i.length)&&O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:O.jsxs("div",{className:"flex items-start text-s",children:[O.jsx(Sw,{className:"mr-2 mt-0.5 h-4 w-4 shrink-0"}),O.jsxs("p",{children:[O.jsx("span",{className:"mr-1",children:"Function is promoted with: "}),i==null?void 0:i.map(d=>O.jsx("li",{className:"cursor-pointer list-disc font-bold hover:underline",onClick:()=>n(o[d].id),children:o[d].privilege}))]})]})}),children:O.jsx(yV,{className:"h-3 w-3 "})})]})]})},ice=({privilegeId:e,privileges:t})=>{const r=Tr(),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=ve.getInheritedResources(e,t).map(({resource:y,type:m,subType:g})=>({applyTo:y,type:m,subType:g})),v=WS(c.toLowerCase(),n,Object.values(i),Object.values(o));s(v.filter(({applyTo:y,type:m,subType:g})=>!Io.find(p,{applyTo:y,type:m,subType:g})))},[c,e,t,n,i,o]);const[d,h]=C.useState(!1);return O.jsx(Gh.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=ve.addPermission(e,p,t);r.actions.updatePrivileges(v),u("")},children:O.jsx(Gh.Group,{children:O.jsx(Gh.Field,{controlShouldRenderValue:!0,renderOption:({data:p})=>O.jsxs("div",{className:"flex items-center gap-x-2",children:[pL(p.type),O.jsx("span",{children:p.applyTo})]}),placeholder:"Create a permission",hideNoOptions:!0})})})};function oce(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 mo={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},HD=Object.values(mo).flat();function ha(e,t){return t.length>0&&t.every(r=>e.includes(r))}function ace(e,t){return t.some(r=>e.includes(r))}function sce(e,t){return Array.from(new Set([...e,...t]))}function lce(e,t){return e.filter(r=>!t.includes(r))}const cce=({selectedPrivilege:e,onSelect:t,showIncluded:r,privileges:n,rawPrivileges:i})=>{var ne,pe;const[o,a]=C.useState(null),[s,c]=C.useState(null),{styles:u,attributes:d}=Od(o,s,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),h=Tr(),[p,v]=C.useState([]),[y,m]=C.useState([]),[g,w]=C.useState(""),[x,_]=C.useState(""),[S,E]=C.useState({}),I=i??n;C.useEffect(()=>{const Z=setTimeout(()=>m(p),0);return()=>clearTimeout(Z)},[p]),C.useEffect(()=>{E({})},[I]);const{id:N}=e,T=C.useMemo(()=>ve.getInheritedResources(N,I),[N,(ne=I[N])==null?void 0:ne.includes,(pe=I[N])==null?void 0:pe.resources]),M=C.useMemo(()=>ve.getPromotions(N,I),[I[N]]),z=Z=>{v([...Z])},j=Z=>{v(J=>ha(J,Z)?lce(J,Z):sce(J,Z))},W=Z=>{j(mo[Z])},U=ha(p,HD),A=p.length>0&&!U,K=ha(p,mo.functions),V=!K&&ace(p,mo.functions),te=()=>z(HD),G=()=>z([]),re=async Z=>{if(h.getHost()==="vscode"){const ae=ve.removePermission(e.id,Z,n);h.actions.updatePrivileges(ae);return}const{confirmed:J}=await h.actions.openModal({title:"Delete Privilege",type:ve.ModalType.CONFIRM,color:ve.ModalColor.DANGER,message:"Are you sure you want to remove this Privilege?",icon:"FdWarningDanger"});if(J){const ae=ve.removePermission(e.id,Z,n);h.actions.updatePrivileges(ae)}},P=async()=>{const{confirmed:Z}=await h.actions.openModal({title:"Reset Permissions",type:ve.ModalType.CONFIRM,color:ve.ModalColor.DANGER,message:"Are you sure you want to reset permissions for this Privilege?",icon:"FdWarningDanger"});if(Z){const J=ve.resetResources(e.id,n);h.actions.updatePrivileges(J)}},B=C.useMemo(()=>y.length>0?T.filter(Z=>y.includes(Z.type)):T,[T,y]),X=C.useMemo(()=>B.filter(({resource:Z})=>x?new RegExp(Io.escapeRegExp(x),"i").test(Z):!0),[B,x]),Q=C.useMemo(()=>oce(X),[X]),D=C.useMemo(()=>Q.filter(Z=>{const J=Z.permissions.every(ae=>!ae.checked)&&Z.permissions.some(ae=>ae.from.length>0);return r||!J}),[Q,r]),$=(Z,J)=>{const ae=`${Z.resource}|${Z.type}|${J.name}`;E(he=>({...he,[ae]:!J.checked})),setTimeout(()=>{const he=ve.togglePermission(e.id,Z,J,n);h.actions.updatePrivileges(he)},0)},H=C.useMemo(()=>D.some(Z=>Z.exists===!1),[D]),q=async()=>{const{confirmed:Z}=await h.actions.openModal({title:"Delete Privilege",type:ve.ModalType.CONFIRM,color:ve.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(I).map(([ae,he])=>{const ue=he.resources.filter(de=>!de.exists);return{[ae]:ue.map(de=>({applyTo:de.resource,type:de.type}))}}).reduce((ae,he)=>({...ae,...he}),{});if(Z){const ae=ve.removeMultiplePermissions(J,n);h.actions.updatePrivileges(ae)}},Y=C.useRef(null),ie=ld({count:D.length,getScrollElement:()=>{var Z;return((Z=Y.current)==null?void 0:Z.getScrollElement())??null},estimateSize:()=>36,overscan:5});return C.useEffect(()=>{var Z,J;(J=(Z=Y.current)==null?void 0:Z.getScrollElement())==null||J.scrollTo({top:0})},[N]),O.jsxs(ff,{ref:Y,className:"z-20 h-full flex-1 overflow-auto p-3.75 pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20 bg-panel-1",children:O.jsxs("tr",{className:"border-b border-panel-border-subtle",children:[O.jsx("td",{className:"py-2",children:O.jsxs("div",{className:"flex items-center gap-x-2",children:[O.jsx(wt.Root,{className:"relative w-56",children:O.jsxs(wt.Group,{children:[O.jsx(wt.Icon,{children:O.jsx(dj,{})}),O.jsx(wt.Field,{type:"text",placeholder:"Search available permissions",value:g,onChange:Z=>{const J=Z.target.value;w(J),setTimeout(()=>_(J),0)}}),O.jsx(wn.Popover,{className:"flex items-center",children:({open:Z})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{ref:a,children:O.jsx(wt.Icon,{isAction:!0,children:O.jsx(JD,{})})}),Z&&O.jsx(Qd,{children:O.jsx(wn.Popover.Panel,{ref:c,style:u.popper,...d.popper,className:"z-50",static:!0,children:O.jsxs(br,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5",children:[O.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2",children:[O.jsx(ir,{size:"sm",value:A?null:U,onChange:()=>U?G():te()}),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(ir,{size:"sm",value:ha(p,mo.dataclass),onChange:()=>W("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:ha(p,mo.singleton),onChange:()=>W("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:V?null:K,onChange:()=>W("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:ha(p,mo.attribute),onChange:()=>W("attribute"),label:"Attribute"})})]})]})})})]})})]})}),O.jsx(ice,{privilegeId:N,privileges:I}),O.jsx("div",{children:O.jsx(Lr,{label:`Resetting the privilege will remove all configured
119
+ ressources`,container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",onClick:P,children:O.jsx(wV,{})})})}),O.jsx(Lr,{icon:O.jsx(wi,{}),label:"Delete all the non existing resources from privileges",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",onClick:q,disabled:!H,children:O.jsx(QD,{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"})]})}),D.length?O.jsxs("tbody",{children:[ie.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${ie.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:7})}):null,ie.getVirtualItems().map(Z=>{const J=D[Z.index],ae=J.permissions.some(he=>he.from.length>0);return O.jsxs("tr",{className:an("group even:bg-white/5 hover:bg-input-bg",{"opacity-60":J.exists===!1}),children:[O.jsxs("td",{className:an("group flex items-center gap-3 py-2 text-xs group-hover:rounded-l group-hover:bg-input-bg ",J.exists===!1?"text-negative-text":""),children:[pL(J.type),J.resource,O.jsx(Lr,{label:"Remove Permission",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",disabled:ae,onClick:()=>{ae?ve.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** Inherited permissions can't be removed",customIcon:on}):re({applyTo:J.resource,type:J.type})},className:"opacity-0 group-hover:opacity-100",children:O.jsx(ja,{className:"h-4 w-4 rotate-45 transform"})})})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"read",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|read`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"create",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|create`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg ",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"update",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|update`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"drop",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|drop`]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:O.jsx(fa,{promoted:M[J.resource],permissions:J.permissions,showIncluded:r,label:"execute",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|execute`]})}),O.jsx("td",{className:"py-2 text-center group-hover:rounded-r group-hover:bg-input-bg",children:O.jsx(fa,{permissions:J.permissions,showIncluded:r,label:"promote",onToggle:he=>$(J,he),onSelect:t,privileges:n,exists:J.exists,optimisticChecked:S[`${J.resource}|${J.type}|promote`]})})]},`${J.resource}-${Z.index}`)}),(()=>{const Z=ie.getVirtualItems();if(!Z.length)return null;const J=ie.getTotalSize()-Z[Z.length-1].end;return J>0?O.jsx("tr",{style:{height:`${J}px`},children:O.jsx("td",{colSpan:7})}):null})()]}):null]}),!Q.length&&x?O.jsx(VD,{children:"The Permission you're looking for can't be found "}):null,!Q.length&&!x?O.jsxs(VD,{children:["This Privilege has no Permissions configured yet ",O.jsx("br",{}),'Add a new permission by using the "Create a permission" input above']}):null]})},uce=({onCreate:e})=>{const t=Tr(),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}=Od(n,o,{modifiers:[{name:"offset",options:{offset:[-10,10]}}],placement:"right-start"});C.useEffect(()=>{c(""),d(null)},[o]);const v=(y=()=>{})=>{d(null);try{const m=ve.createPrivilege(s,r),g=Object.values(m).find(w=>w.privilege===s);t.actions.updatePrivileges(m),g&&e(g),setTimeout(()=>{y()},0)}catch(m){d(m.message)}};return O.jsx(wn.Popover,{children:({open:y,close:m})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",as:"div",ref:i,children:O.jsx(Jt,{variant:"ghost",color:"white",children:O.jsx(ja,{className:"h-4 w-4"})})}),y&&O.jsx(Qd,{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(br,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Privilege"}),O.jsx("div",{className:"mt-2",children:O.jsxs("label",{className:"flex items-center gap-x-4",children:[O.jsx("span",{children:"Name"}),O.jsx(wt.Root,{className:"w-full",color:u?"negative":"primary",children:O.jsxs(wt.Group,{children:[u&&O.jsx(wt.Message,{children:u}),O.jsx(wt.Field,{autoFocus:!0,value:s,onChange:g=>c(g.target.value),onKeyDown:g=>{g.key==="Enter"&&v()},type:"text"})]})})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center gap-x-2",children:[O.jsx(Jt,{onClick:()=>v(m),children:"Create"}),O.jsx(Jt,{color:"white",variant:"outline",onClick:()=>m(),children:"Cancel"})]})]})})})]})})},dce=()=>{const e=Tr(),t=e.getCatalog(),r=e.getPrivileges(),[n,i]=C.useState(r);C.useEffect(()=>{const y=setTimeout(()=>i(r),0);return()=>clearTimeout(y)},[r]);const o=C.useMemo(()=>{if(t===null)return n;const y=sz(n,Object.values((t==null?void 0:t.dataClasses)??{}));return lz(y,t)},[n,t]),[a,s]=C.useState(null),[c,u]=C.useState(null),d=y=>{s(y),setTimeout(()=>u(y),0)},h=C.useMemo(()=>Object.keys(o),[o]);C.useEffect(()=>{if(a&&o[a.id]||!h.length)return;const y=o[h[0]];s(y),u(y)},[o]),C.useEffect(()=>{h.length<2&&v(!0)},[h.length]);const[p,v]=C.useState(!0);return O.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-1",children:[O.jsxs(br,{depth:1,className:"flex h-full w-89 shrink-0 flex-col border-r",children:[O.jsxs("div",{className:"flex flex-shrink-0 items-center justify-between px-3.5 py-2.5",children:[O.jsxs("div",{className:"flex items-center gap-x-1",children:[O.jsx("span",{children:O.jsx(hd,{className:"h-3.5 w-3.5"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Privileges"})]}),O.jsx(uce,{onCreate:y=>{s(y),u(y)}})]}),O.jsx(sse,{privileges:o,selectedPrivilege:a,selectPrivilege:d})]}),a&&o[a.id]?O.jsxs(br,{depth:1,className:"privileges-container relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden border-l-[0.5px]",children:[O.jsxs("div",{className:"mb-1 flex min-h-0 min-w-0 flex-1 h-full w-full flex-col items-stretch overflow-auto",children:[(c??a).privilege!=="guest"?O.jsx(Kae,{privileges:o,selectedPrivilege:c??a,onSelect:y=>s(r[y]),setShowIncluded:v,showIncluded:p}):null,O.jsx(cce,{privileges:o,rawPrivileges:r,selectedPrivilege:c??a,onSelect:y=>s(r[y]),showIncluded:p})]}),O.jsx("div",{className:"mt-auto flex-shrink-0",children:O.jsx(fce,{privileges:o,selectedPrivilege:c??a,setSelectedPrivilege:s})})]}):O.jsx(U4,{tab:"Privilege"})]})},fce=({privileges:e,selectedPrivilege:t,setSelectedPrivilege:r})=>{const[n,i]=C.useState(!1);return O.jsx(ve.Panel,{path:ve.ROLES_TAB_PATH,isOpen:n,onOpen:()=>i(!0),onClose:()=>i(!1),children:O.jsx("div",{className:"flex h-full w-full min-h-0 px-3 pb-3",children:O.jsx(br,{depth:2,className:"h-full w-full overflow-hidden rounded",children:O.jsx(iae,{dict:e,data:ve.getGraphData(t.id,e),onSelect:o=>r(e[o])})})})})},hce=C.memo(({role:e})=>{var E;const t=Tr(),[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}=lS(),[v,y]=C.useState(!1),m=ve.useOutsideClick(()=>{v&&w()});ve.useDidMountEffect(()=>{i!==e.role&&o(e.role)},[e.role]),C.useEffect(()=>{e.role||y(!0)},[]),C.useEffect(()=>{n(e)},[e]);const g=()=>{s(null),y(!0)},w=()=>{s(null),e.role&&e.role===i&&y(!1);try{const I=ve.saveRole({...r,role:i},d);t.actions.updateRoles(I),y(!1)}catch(I){s(I.message)}},x=async I=>{if(I.stopPropagation(),t.getHost()==="vscode"){_();return}const{confirmed:N}=await t.actions.openModal({title:"Delete Role",type:ve.ModalType.CONFIRM,color:ve.ModalColor.DANGER,message:"Are you sure you want to remove this Role?",icon:"FdWarningDanger"});N&&_()},_=()=>{const I=ve.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),M=T.indexOf(r.id),z=Math.max(0,M-1),j=T[z];M===0?p(N[0]):I[j]?p(j):p(N[0])}t.actions.updateRoles(I)},S=(I=null)=>{if(I&&I.stopPropagation(),!e.role){_();return}y(!1),o(e.role)};return O.jsx(O.Fragment,{children:O.jsxs(br,{depth:4,borderType:h===r.id?"primary":h!==r.id?"light":"default",className:an("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(hd,{className:"h-6 w-6"})}),v?O.jsxs(wt.Root,{color:a?"negative":"primary",className:"flex-1 mr-2",children:[O.jsx(wt.Group,{className:"border-input-focus-border",children:O.jsx(wt.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(wt.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:an("justify-between ml-auto flex w-fit items-center gap-x-2"),children:v?O.jsxs(O.Fragment,{children:[O.jsx(Jt,{color:"white",variant:"ghost",onClick:w,children:O.jsx(EV,{className:"h-4 w-4"})}),O.jsx(Jt,{color:"white",variant:"ghost",onClick:S,children:O.jsx(ej,{className:"h-4 w-4"})})]}):O.jsxs(O.Fragment,{children:[O.jsx(Jt,{color:"white",variant:"ghost",onClick:g,children:O.jsx(cj,{className:"h-4 w-4"})}),O.jsx(Jt,{color:"white",variant:"ghost",onClick:I=>x(I),children:O.jsx(pj,{className:"h-4 w-4"})})]})})]})}),O.jsxs("span",{className:an("ml-10.75 py-1 text-xs"),children:[u," Privilege",u>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},pce=()=>{const e=Tr(),t=e.getPrivileges(),r=e.getRoles(),{selectedRole:n}=lS(),i=vL(n,r),o=(c,u)=>u&&u.privileges.includes(c.id),a=C.useMemo(()=>Object.values(t).filter(c=>o(c,i)&&c.privilege!=="guest"),[t,i]),s=C.useMemo(()=>Object.values(t).filter(c=>!o(c,i)&&c.privilege!=="guest"),[t,i]);return O.jsxs(br,{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(vu,{"data-cy":"item=>Permisions",className:"italic opacity-90",children:"guest"}),a.map((c,u)=>O.jsxs(vu,{"data-cy":"item=>Permisions",color:"primary",onClick:()=>{const d=WD(i.id,c.id,r);e.actions.updateRoles(d)},children:[c.privilege,O.jsx(NO.FdPlus,{className:"rotate-45 transform"})]},u)),s.map((c,u)=>O.jsxs(vu,{"data-cy":"item=>Permisions",color:"dark",onClick:()=>{const d=WD(i.id,c.id,r);e.actions.updateRoles(d)},children:[c.privilege,O.jsx(NO.FdPlus,{})]},u))]})]})},dd=(e,t,r,n=!1)=>{const i=e.applyTo,o=e.type===ve.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 y=dd(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||y[m.name].value||y[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))&&![ve.EPermissionType.DATASTORE,ve.EPermissionType.SINGLETON].includes(e.type)){const h={applyTo:o,type:e.type===ve.EPermissionType.DATACLASS?ve.EPermissionType.DATASTORE:e.type===ve.EPermissionType.SINGLETON_METHOD?ve.EPermissionType.SINGLETON:ve.EPermissionType.DATACLASS},p=dd(h,t,r,n),v=y=>{let m=c[y].value;return n?!c[y].value&&!c[y].explicitly&&(m=p[y].value):c[y].value&&!c[y].explicitly&&(m=p[y].value),{value:m,inherited:c[y].inherited||p[y].inherited,from:c[y].from.length>0?c[y].from:p[y].from,explicitly:c[y].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}},vce=({children:e})=>O.jsx("div",{className:"h-full w-full",children:O.jsx("div",{className:"flex h-full w-full flex-1 items-center justify-center",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4 py-4 text-inactive-text",children:[O.jsx(on,{className:"absolute -right-full h-10 w-10 translate-x-1"}),O.jsx("div",{className:"text-center text-sm",children:e})]})})}),gce=e=>{switch(e){case"dataclass":return O.jsx(Tu,{className:"h-6 w-6"});case"singleton":return O.jsx(fj,{className:"h-6 w-6"});case"datastore":return O.jsx(lj,{className:"h-6 w-6"});case"attribute":return O.jsx(hj,{className:"h-6 w-6"});case"method":return O.jsx(tj,{className:"h-6 w-6"});case"singletonMethod":return O.jsx(sj,{className:"h-6 w-6"});case"entityselMethod":return O.jsx(aj,{className:"h-6 w-6"});case"entityMethod":return O.jsx(oj,{className:"h-6 w-6"});case"dsMethod":return O.jsx(ij,{className:"h-6 w-6"});case"dataclassMethod":return O.jsx(nj,{className:"h-6 w-6"});default:return O.jsx(Tu,{className:"h-6 w-6"})}},UD=({privileges:e,permission:t,hasChild:r,depth:n,isChild:i=!1,className:o,inSearch:a,toggleCollapse:s,collapsed:c,isRestrictedByDefault:u,toastMessageCallback:d,computedInherited:h})=>{const[p,v]=t.applyTo.split("."),y=C.useMemo(()=>h||dd(t,e.otherPrivs,e.rolePrivs,u),[h,e,t,u]);return O.jsxs("tr",{className:an("group even:bg-white/5 hover:bg-input-bg",o),children:[O.jsxs("td",{className:an("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((m,g)=>O.jsx("div",{className:an("ml-1.5 mr-1 w-[2px] bg-muted",{"mr-0.5":i})},g)),O.jsxs("div",{className:"flex items-center gap-3 py-2",children:[r&&O.jsx("button",{onClick:s,className:"w-3",children:c?O.jsx(uj,{className:"inline h-4 w-4"}):O.jsx(rj,{className:"inline h-4 w-4"})}),gce(t.type),a?t.applyTo:v||p]})]}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[ve.EPermissionType.ATTRIBUTE,ve.EPermissionType.DATASTORE,ve.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(ir,{value:y.read.value||y.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:!y.read.value&&y.read.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.read.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{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:y.read.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[ve.EPermissionType.ATTRIBUTE,ve.EPermissionType.DATASTORE,ve.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(ir,{value:y.create.value||y.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:!y.create.value&&y.create.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.read.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{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:y.read.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[ve.EPermissionType.ATTRIBUTE,ve.EPermissionType.DATASTORE,ve.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(ir,{value:y.update.value||y.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:!y.update.value&&y.update.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.update.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{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:y.update.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})}),O.jsx("td",{className:"py-2 text-center group-hover:bg-input-bg",children:[ve.EPermissionType.ATTRIBUTE,ve.EPermissionType.DATASTORE,ve.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(ir,{value:y.drop.value||y.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:!y.drop.value&&y.drop.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.drop.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{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:y.drop.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{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(ir,{value:y.execute.value||y.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:!y.execute.value&&y.execute.inherited?O.jsx(Lr,{container:Br(),delay:100,label:O.jsx("div",{className:"space-y-1 p-1",children:y.execute.from.length?O.jsxs("div",{className:"flex items-start",children:[O.jsx(wi,{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:y.execute.from.map((m,g)=>O.jsx("li",{className:"cursor-pointer list-disc font-bold",children:m},g))})]})]}):null}),children:O.jsx(on,{className:"h-4 w-4"})}):""})]})})]})};function GD(e,t,r){const n=[],i=(a,s,c)=>n.push({id:a,permission:s,depth:c,hasChild:!1,isChild:!1}),o=(a,s,c,u,d,h)=>{n.push({id:a,permission:s,depth:c,hasChild:!0,isChild:u,toggleId:a,isCollapsed:d}),d||h()};for(const a of Object.values(e)){o("ds-group",{applyTo:a.applyTo,type:a.type},0,!1,t,()=>{for(const s of a.methods)i(`dsm-${s.applyTo}`,s,1);for(const s of a.dataClasses){const c=`dc-${s.applyTo}`;o(c,{applyTo:s.applyTo,type:s.type},1,!0,r[c]??!1,()=>{for(const u of s.attributes)i(`dca-${u.applyTo}`,u,2);for(const u of s.methods)i(`dcm-${u.applyTo}`,u,2)})}});for(const s of a.singletons){const c=`sing-${s.applyTo}`;o(c,{applyTo:s.applyTo,type:s.type},0,!0,r[c]??!1,()=>{for(const u of s.attributes)i(`singa-${u.applyTo}`,u,1);for(const u of s.methods)i(`singm-${u.applyTo}`,u,1)})}}return n}const KD=["datastore","singleton","dataclass","attribute","dsMethod","dataclassMethod","entityMethod","entityselMethod","singletonMethod"],bo={datastore:["datastore"],dataclass:["dataclass"],singleton:["singleton"],functions:["method","singletonMethod","dsMethod","dataclassMethod","entityMethod","entityselMethod"],attribute:["attribute"]},YD=Object.values(bo).flat();function pa(e,t){return t.length>0&&t.every(r=>e.includes(r))}function mce(e,t){return Array.from(new Set([...e,...t]))}function bce(e,t){return e.filter(r=>!t.includes(r))}const yce=({selectedRole:e})=>{const[t,r]=C.useState(null),[n,i]=C.useState(null),{styles:o,attributes:a}=Od(t,n,{modifiers:[{name:"offset",options:{offset:[0,10]}}]}),s=Tr(),c=s.getRestrictedByDefault(),u=s.getPrivileges(),[d,h]=C.useState([]),[p,v]=C.useState([]),[y,m]=C.useState(""),[g,w]=C.useState("");C.useEffect(()=>{const J=setTimeout(()=>v(d),0);return()=>clearTimeout(J)},[d]);const x=s.getCatalogMethods(),_=s.getDataclasses(),S=s.getSingletons(),E=C.useMemo(()=>aae(x,Object.values(_),Object.values(S)),[x,_,S]),I=C.useMemo(()=>!p.length&&!g?[]:[...WS(g,x,Object.values(_),Object.values(S))].filter(J=>p.length?p.includes(J.type):!0).sort((J,ae)=>{const he=KD.indexOf(J.type),ue=KD.indexOf(ae.type);return he!==ue?he-ue:J.applyTo.toLowerCase()>ae.applyTo.toLowerCase()?1:-1}),[g,p,x,_,S]),N=J=>h([...J]),T=J=>{h(ae=>pa(ae,J)?bce(ae,J):mce(ae,J))},M=J=>T(bo[J]),z=YD.every(J=>d.includes(J)),j=d.length>0&&!z,W=pa(d,bo.functions),U=()=>N(YD),A=()=>N([]),K=s.getRoles(),[V,te]=C.useState(K);C.useEffect(()=>{const J=setTimeout(()=>te(K),0);return()=>clearTimeout(J)},[K]);const G=C.useRef(null);C.useEffect(()=>{var J,ae;(ae=(J=G.current)==null?void 0:J.getScrollElement())==null||ae.scrollTo({top:0})},[e]);const re=ld({count:I.length,getScrollElement:()=>{var J;return((J=G.current)==null?void 0:J.getScrollElement())??null},estimateSize:()=>36,overscan:5,paddingEnd:40}),P=C.useMemo(()=>{const J=Object.values(u).find(le=>le.privilege==="guest"),ae=V[e],he=ae?Object.fromEntries(ae.privileges.map(le=>[le,u[le]]).filter(([,le])=>!!le)):{};if(c)return{rolePrivs:he,otherPrivs:J?{[J.id]:J}:{}};const ue=J?{[J.id]:{...J,active:!0}}:{},de=Object.fromEntries(Object.entries(u).filter(([le])=>le!==(J==null?void 0:J.id)&&!(ae!=null&&ae.privileges.includes(le))).map(([le,xe])=>[le,{...xe,active:!1}]));return{rolePrivs:he,otherPrivs:{...ue,...de}}},[u,V,e,c]),[B,X]=C.useState(!1),[Q,D]=C.useState({}),$=C.useMemo(()=>{const J=[];for(const ae of Object.values(E)){for(const he of ae.dataClasses)J.push(`dc-${he.applyTo}`);for(const he of ae.singletons)J.push(`sing-${he.applyTo}`)}return J},[E]),H=$.length>0&&$.every(J=>Q[J]===!0),q=C.useCallback(()=>{const J={};for(const ae of $)J[ae]=!0;D(J)},[$]),Y=C.useCallback(J=>{J==="ds-group"?X(ae=>!ae):D(ae=>({...ae,[J]:!ae[J]}))},[]),ie=C.useMemo(()=>{const J=new Map;for(const{permission:ae}of GD(E,!1,{}))J.set(`${ae.applyTo}|${ae.type}`,dd(ae,P.otherPrivs,P.rolePrivs,c));return J},[P,c,E]),ne=C.useMemo(()=>GD(E,B,Q),[E,B,Q]),pe=ld({count:ne.length,getScrollElement:()=>{var J;return((J=G.current)==null?void 0:J.getScrollElement())??null},estimateSize:()=>36,overscan:8,paddingEnd:15}),Z=C.useCallback(()=>{ve.toastSubject.next({kind:"info",markdown:!0,message:"**Info:** You can add or modify permissions only in the Privilege section.",customIcon:Sw})},[]);return O.jsxs(ff,{ref:G,className:"z-20 h-full flex-1 overflow-auto p-3.75 pt-0",style:{maxHeight:"calc(100vh - 5.5rem - 85px - 20px)"},children:[O.jsxs("table",{className:"relative h-full w-full border-collapse",children:[O.jsx("thead",{className:"sticky top-0 z-20 bg-panel-1",children:O.jsxs("tr",{className:"border-b border-grey-100",children:[O.jsx("td",{className:"py-2",children:O.jsxs("div",{className:"flex items-center gap-x-2",children:[O.jsx(Lr,{label:"Collapse All",position:"up",container:Br(),children:O.jsx(Jt,{color:"white",variant:"ghost",disabled:B&&H,onClick:()=>{H?(q(),X(!0)):q()},children:O.jsx(bV,{})})}),O.jsx(wt.Root,{className:"w-56",children:O.jsxs(wt.Group,{children:[O.jsx(wt.Icon,{children:O.jsx(dj,{})}),O.jsx(wt.Field,{type:"text",placeholder:"Search",value:y,onChange:J=>{const ae=J.target.value;m(ae),setTimeout(()=>w(ae),0)}}),O.jsx(wn.Popover,{className:"flex items-center",children:({open:J})=>O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{ref:r,children:O.jsx(wt.Icon,{isAction:!0,children:O.jsx(JD,{})})}),J&&O.jsx(Qd,{children:O.jsx(wn.Popover.Panel,{ref:i,style:o.popper,...a.popper,className:"z-50",static:!0,children:O.jsxs(br,{depth:3,borderType:"light",className:"rounded-md border px-4 py-2.5 text-xs",children:[O.jsxs("label",{className:"mb-2 flex cursor-pointer items-center gap-2",children:[O.jsx(ir,{size:"sm",value:j?null:z,onChange:()=>z?A():U()}),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(ir,{size:"sm",value:pa(d,bo.datastore),onChange:()=>M("datastore"),label:"Datastore"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(d,bo.dataclass),onChange:()=>M("dataclass"),label:"Dataclass"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(d,bo.singleton),onChange:()=>M("singleton"),label:"Singleton"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:W,onChange:()=>M("functions"),label:"Functions"})}),O.jsx("div",{className:"flex items-center",children:O.jsx(ir,{size:"sm",value:pa(d,bo.attribute),onChange:()=>M("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:p.length||g?O.jsxs(O.Fragment,{children:[re.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${re.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:6})}):null,re.getVirtualItems().map(J=>{const ae=I[J.index];return O.jsx(UD,{privileges:P,permission:ae,depth:0,inSearch:!0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:Z,computedInherited:ie.get(`${ae.applyTo}|${ae.type}`)},`${ae.type}-${J.index}`)}),(()=>{const J=re.getVirtualItems();if(!J.length)return null;const ae=re.getTotalSize()-J[J.length-1].end;return ae>0?O.jsx("tr",{style:{height:`${ae}px`},children:O.jsx("td",{colSpan:6})}):null})()]}):O.jsxs(O.Fragment,{children:[pe.getVirtualItems().length>0?O.jsx("tr",{style:{height:`${pe.getVirtualItems()[0].start}px`},children:O.jsx("td",{colSpan:6})}):null,pe.getVirtualItems().map(J=>{const ae=ne[J.index];return O.jsx(UD,{privileges:P,permission:ae.permission,depth:ae.depth,hasChild:ae.hasChild,isChild:ae.isChild,collapsed:ae.isCollapsed,toggleCollapse:ae.toggleId?()=>Y(ae.toggleId):void 0,isRestrictedByDefault:c,allPrivileges:u,toastMessageCallback:Z,computedInherited:ie.get(`${ae.permission.applyTo}|${ae.permission.type}`)},ae.id)}),(()=>{const J=pe.getVirtualItems();if(!J.length)return null;const ae=pe.getTotalSize()-J[J.length-1].end;return ae>0?O.jsx("tr",{style:{height:`${ae}px`},children:O.jsx("td",{colSpan:6})}):null})()]})})]}),(g||p.length)&&!I.length?O.jsx(vce,{children:"The Permission you're looking for can't be found "}):null]})},xce=()=>O.jsx("div",{className:"flex flex-1 items-center justify-center",children:O.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-grey-200 border-t-primary-dark"})}),wce=()=>{const e=Tr(),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}=Od(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(g=>g.role.toLowerCase()===a.toLowerCase()))throw new Error(`A role with the name ${a} already exists`);const y=bz.generate(),m=ve.createRole(y,a,t);e.actions.updateRoles(m)};return O.jsx(wn.Popover,{children:({open:v,close:y})=>{const m=()=>{u(null);try{ve.validateName(a),p(),y()}catch(g){u(g.message)}};return O.jsxs(O.Fragment,{children:[O.jsx(wn.Popover.Button,{className:"rounded","data-cy":"New-priv-btn",as:"div",ref:n,children:O.jsx(Jt,{variant:"ghost",color:"white",children:O.jsx(ja,{className:"h-4 w-4"})})}),v&&O.jsx(Qd,{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(br,{className:"min-w-[256px] border rounded px-4 py-2 text-xs shadow-md",depth:3,borderType:"light",children:[O.jsx("h5",{className:"mb-2 text-xs font-semibold",children:"Create New Role"}),O.jsx("div",{className:"mt-2",children:O.jsxs("label",{className:"flex items-center gap-x-4",children:[O.jsx("span",{children:"Name"}),O.jsx(wt.Root,{color:c?"negative":"primary",className:"w-full",children:O.jsxs(wt.Group,{children:[c&&O.jsx(wt.Message,{children:c}),O.jsx(wt.Field,{autoFocus:!0,value:a,onChange:g=>s(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m()},type:"text"})]})})]})}),O.jsxs("div",{className:"mt-4 flex items-center justify-center gap-x-2",children:[O.jsx(Jt,{onClick:()=>{m()},children:"Create"}),O.jsx(Jt,{color:"white",variant:"outline",onClick:()=>y(),children:"Cancel"})]})]})})})]})}})},Sce=()=>{const e=Tr(),t=e.getRoles(),r=e.getPrivileges(),{selectedRole:n,deferredSelectedRole:i}=lS(),o=C.useMemo(()=>Object.values(t).sort((a,s)=>ve.localeCompare(a.role,s.role)),[t]);return O.jsxs("div",{className:"flex flex-1 h-full",children:[O.jsxs(br,{depth:1,className:"flex h-full w-89 flex-col border-r",children:[O.jsxs("div",{className:"flex shrink-0 items-center justify-between px-3.5 py-2.5",children:[O.jsxs("div",{className:"flex items-center gap-x-1",children:[O.jsx("span",{children:O.jsx(hd,{className:"h-3.5 w-3.5"})}),O.jsx("span",{className:"text-[11px] font-semibold",children:"Roles"})]}),O.jsx(wce,{})]}),O.jsx("div",{className:"flex-1 overflow-auto p-4 pb-10 pt-1",children:o.length>0?O.jsx("div",{className:"flex flex-col gap-4",children:o.map(a=>O.jsx(hce,{role:a,privileges:r},a.id))}):O.jsx("div",{className:"flex h-full items-center justify-center",children:O.jsx("div",{className:"flex flex-1 items-center justify-center text-inactive-text",children:O.jsxs("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[O.jsx(on,{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(ja,{className:"ml-2 inline h-4 w-4"})]})]})})})})]}),O.jsx(br,{depth:1,className:an("relative flex h-full w-full flex-1 flex-col items-stretch overflow-x-auto",{"border-l-[0.5px]":n}),children:O.jsx("div",{className:"flex h-full w-full select-none flex-col",children:n?O.jsxs(O.Fragment,{children:[O.jsx(pce,{}),i?O.jsx(yce,{selectedRole:i}):O.jsx(xce,{})]}):O.jsx(U4,{tab:"Role"})})})]})},gL=()=>{const e=Tr(),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-hidden","data-cy":"Roles&Privileges-editor-cy",ref:a=>o.current=a,children:O.jsxs("div",{className:"flex min-h-0 w-full flex-1 flex-col",children:[O.jsx(FY,{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}),O.jsx("div",{className:r==="roles"?"flex flex-1 overflow-hidden":"hidden",children:O.jsx($Y,{children:O.jsx(Sce,{})})}),O.jsx("div",{className:r==="privileges"?"flex flex-1 overflow-hidden":"hidden",children:O.jsx(dce,{})})]})})})},Ece="object",_ce={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"}}}}},Oce={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"]},PermissionEntry:{type:"array",items:{type:"string"}},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:{$ref:"#/definitions/PermissionEntry"},create:{$ref:"#/definitions/PermissionEntry"},update:{$ref:"#/definitions/PermissionEntry"},drop:{$ref:"#/definitions/PermissionEntry"},execute:{$ref:"#/definitions/PermissionEntry"},promote:{$ref:"#/definitions/PermissionEntry"}},required:["applyTo","type"]}},Cce={type:Ece,properties:_ce,definitions:Oce},Ice=()=>{const{modals:e,closeModal:t,editModal:r}=Gae();return O.jsx(O.Fragment,{children:e.map((n,i)=>O.jsx(ve.Modal,{hasOverlay:i===0,...n,onClose:t,onEdit:r,container:Br()},n.id))})},mL=e=>{if(!e)return ve.rolesToAPI(ve.sanitizeRoles({}));try{return ve.rolesToAPI(ve.sanitizeRoles(JSON.parse(e)))}catch{return ve.rolesToAPI(ve.sanitizeRoles({}))}},Rce=({initialValue:e,onChange:t,...r})=>{const n=Tr(),i=n.getRolesFlags(),o=n.getRolesAndPrivileges(),a=C.useMemo(()=>mL(e),[e]),s=C.useRef(o),c=C.useRef(a),u=C.useRef(a);return C.useEffect(()=>{s.current=o},[o]),C.useEffect(()=>{Io.isEqual(a,u.current)||(u.current=a,c.current=a,!Io.isEqual(a,s.current)&&n.actions.setRolesContent({content:a,flags:{touched:!1}}))},[n,a]),ve.useDidMountEffect(()=>{if(!(!t||!i.touched)&&!Io.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(gL,{...r})}),O.jsx(Ice,{})]})},Nce=e=>{const t=Uae();return O.jsx(uz,{adapter:t,children:O.jsx(ve.TipsProvider,{children:O.jsx(Rce,{...e})})})},Tce=({initialValue:e,catalog:t,...r})=>{const n=C.useMemo(()=>({...ve.sanitizeRoles(mL(e)),flags:{touched:!1}}),[e]);return O.jsx(Wae,{initialState:n,catalog:t,children:O.jsx(Nce,{initialValue:e,...r})})};exports.ROLES_EDITOR_SCOPE_CLASS=XD.ROLES_EDITOR_SCOPE_CLASS;exports.EditorStateAdapterProvider=uz;exports.Roles=gL;exports.Standalone=Tce;exports.jsonSchema=Cce;exports.useReduxAdapter=dae;
77
120
  //# sourceMappingURL=index.cjs.js.map