diff --git a/frontend/dist/assets/index.07a20ff8.css b/frontend/dist/assets/index.07a20ff8.css deleted file mode 100644 index fe254c1328..0000000000 --- a/frontend/dist/assets/index.07a20ff8.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(0, 0, 0, .3));--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow: drop-shadow(0 0 1rem rgba(140, 101, 255, .5));--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:#2d3135!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d3135!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:#2d3135!important}.invoke-btn:disabled:hover{background-color:#2d3135!important}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:#2d3135!important}.cancel-btn:disabled:hover{background-color:#2d3135!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-header p{font-weight:700}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:#2d3135!important}.floating-show-hide-button:disabled:hover{background-color:#2d3135!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{background-color:var(--background-color)!important}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/assets/index.5a2fccba.js b/frontend/dist/assets/index.5a2fccba.js new file mode 100644 index 0000000000..df91c5f0b0 --- /dev/null +++ b/frontend/dist/assets/index.5a2fccba.js @@ -0,0 +1,623 @@ +function mq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function I9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},qt={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var zv=Symbol.for("react.element"),vq=Symbol.for("react.portal"),yq=Symbol.for("react.fragment"),Sq=Symbol.for("react.strict_mode"),bq=Symbol.for("react.profiler"),xq=Symbol.for("react.provider"),wq=Symbol.for("react.context"),Cq=Symbol.for("react.forward_ref"),_q=Symbol.for("react.suspense"),kq=Symbol.for("react.memo"),Eq=Symbol.for("react.lazy"),pE=Symbol.iterator;function Pq(e){return e===null||typeof e!="object"?null:(e=pE&&e[pE]||e["@@iterator"],typeof e=="function"?e:null)}var LO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},MO=Object.assign,OO={};function Q0(e,t,n){this.props=e,this.context=t,this.refs=OO,this.updater=n||LO}Q0.prototype.isReactComponent={};Q0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Q0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function RO(){}RO.prototype=Q0.prototype;function N9(e,t,n){this.props=e,this.context=t,this.refs=OO,this.updater=n||LO}var D9=N9.prototype=new RO;D9.constructor=N9;MO(D9,Q0.prototype);D9.isPureReactComponent=!0;var gE=Array.isArray,IO=Object.prototype.hasOwnProperty,z9={current:null},NO={key:!0,ref:!0,__self:!0,__source:!0};function DO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)IO.call(t,r)&&!NO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=G[Z];if(0>>1;Zi(Be,j))Wei(dt,Be)?(G[Z]=dt,G[We]=j,Z=We):(G[Z]=Be,G[xe]=j,Z=xe);else if(Wei(dt,j))G[Z]=dt,G[We]=j,Z=We;else break e}}return Q}function i(G,Q){var j=G.sortIndex-Q.sortIndex;return j!==0?j:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=G)r(u),Q.sortIndex=Q.expirationTime,t(l,Q);else break;Q=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,ee(R);else{var Q=n(u);Q!==null&&X(M,Q.startTime-G)}}function R(G,Q){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var j=m;try{for(T(Q),p=n(l);p!==null&&(!(p.expirationTime>Q)||G&&!q());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,m=p.priorityLevel;var me=Z(p.expirationTime<=Q);Q=e.unstable_now(),typeof me=="function"?p.callback=me:p===n(l)&&r(l),T(Q)}else r(l);p=n(l)}if(p!==null)var Se=!0;else{var xe=n(u);xe!==null&&X(M,xe.startTime-Q),Se=!1}return Se}finally{p=null,m=j,v=!1}}var I=!1,N=null,z=-1,$=5,H=-1;function q(){return!(e.unstable_now()-H<$)}function de(){if(N!==null){var G=e.unstable_now();H=G;var Q=!0;try{Q=N(!0,G)}finally{Q?V():(I=!1,N=null)}}else I=!1}var V;if(typeof k=="function")V=function(){k(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,ie=J.port2;J.port1.onmessage=de,V=function(){ie.postMessage(null)}}else V=function(){E(de,0)};function ee(G){N=G,I||(I=!0,V())}function X(G,Q){z=E(function(){G(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,ee(R))},e.unstable_forceFrameRate=function(G){0>G||125Z?(G.sortIndex=j,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,X(M,j-Z))):(G.sortIndex=me,t(l,G),S||v||(S=!0,ee(R))),G},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(G){var Q=m;return function(){var j=m;m=Q;try{return G.apply(this,arguments)}finally{m=j}}}})(zO);(function(e){e.exports=zO})(e0);/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var FO=C.exports,ca=e0.exports;function Re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bw=Object.prototype.hasOwnProperty,Oq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vE={},yE={};function Rq(e){return Bw.call(yE,e)?!0:Bw.call(vE,e)?!1:Oq.test(e)?yE[e]=!0:(vE[e]=!0,!1)}function Iq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Nq(e,t,n,r){if(t===null||typeof t>"u"||Iq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var B9=/[\-:]([a-z])/g;function $9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(B9,$9);Mi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(B9,$9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(B9,$9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Mi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function H9(e,t,n,r){var i=Mi.hasOwnProperty(t)?Mi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` +`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{qb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qg(e):""}function Dq(e){switch(e.tag){case 5:return Qg(e.type);case 16:return Qg("Lazy");case 13:return Qg("Suspense");case 19:return Qg("SuspenseList");case 0:case 2:case 15:return e=Kb(e.type,!1),e;case 11:return e=Kb(e.type.render,!1),e;case 1:return e=Kb(e.type,!0),e;default:return""}}function Vw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Np:return"Fragment";case Ip:return"Portal";case $w:return"Profiler";case W9:return"StrictMode";case Hw:return"Suspense";case Ww:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case HO:return(e.displayName||"Context")+".Consumer";case $O:return(e._context.displayName||"Context")+".Provider";case V9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U9:return t=e.displayName||null,t!==null?t:Vw(e.type)||"Memo";case Ec:t=e._payload,e=e._init;try{return Vw(e(t))}catch{}}return null}function zq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Vw(t);case 8:return t===W9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function VO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fq(e){var t=VO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ry(e){e._valueTracker||(e._valueTracker=Fq(e))}function UO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=VO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function r5(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Uw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jc(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function GO(e,t){t=t.checked,t!=null&&H9(e,"checked",t,!1)}function Gw(e,t){GO(e,t);var n=Jc(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jw(e,t.type,n):t.hasOwnProperty("defaultValue")&&jw(e,t.type,Jc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function jw(e,t,n){(t!=="number"||r5(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jg=Array.isArray;function t0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=iy.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Bq=["Webkit","ms","Moz","O"];Object.keys(vm).forEach(function(e){Bq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vm[t]=vm[e]})});function KO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||vm.hasOwnProperty(e)&&vm[e]?(""+t).trim():t+"px"}function XO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=KO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var $q=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Kw(e,t){if(t){if($q[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Re(62))}}function Xw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zw=null;function G9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qw=null,n0=null,r0=null;function _E(e){if(e=$v(e)){if(typeof Qw!="function")throw Error(Re(280));var t=e.stateNode;t&&(t=_4(t),Qw(e.stateNode,e.type,t))}}function ZO(e){n0?r0?r0.push(e):r0=[e]:n0=e}function QO(){if(n0){var e=n0,t=r0;if(r0=n0=null,_E(e),t)for(e=0;e>>=0,e===0?32:31-(Zq(e)/Qq|0)|0}var oy=64,ay=4194304;function em(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function s5(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=em(s):(o&=a,o!==0&&(r=em(o)))}else a=n&~i,a!==0?r=em(a):o!==0&&(r=em(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Fv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ys(t),e[t]=n}function nK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Sm),RE=String.fromCharCode(32),IE=!1;function yR(e,t){switch(e){case"keyup":return LK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dp=!1;function OK(e,t){switch(e){case"compositionend":return SR(t);case"keypress":return t.which!==32?null:(IE=!0,RE);case"textInput":return e=t.data,e===RE&&IE?null:e;default:return null}}function RK(e,t){if(Dp)return e==="compositionend"||!J9&&yR(e,t)?(e=mR(),v3=X9=Ic=null,Dp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=FE(n)}}function CR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?CR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _R(){for(var e=window,t=r5();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=r5(e.document)}return t}function e7(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WK(e){var t=_R(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&CR(n.ownerDocument.documentElement,n)){if(r!==null&&e7(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=BE(n,o);var a=BE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,zp=null,i6=null,xm=null,o6=!1;function $E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;o6||zp==null||zp!==r5(r)||(r=zp,"selectionStart"in r&&e7(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xm&&ev(xm,r)||(xm=r,r=c5(i6,"onSelect"),0$p||(e.current=d6[$p],d6[$p]=null,$p--)}function jn(e,t){$p++,d6[$p]=e.current,e.current=t}var ed={},Wi=ud(ed),To=ud(!1),Yf=ed;function L0(e,t){var n=e.type.contextTypes;if(!n)return ed;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return e=e.childContextTypes,e!=null}function f5(){Zn(To),Zn(Wi)}function YE(e,t,n){if(Wi.current!==ed)throw Error(Re(168));jn(Wi,t),jn(To,n)}function RR(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Re(108,zq(e)||"Unknown",i));return fr({},n,r)}function h5(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ed,Yf=Wi.current,jn(Wi,e),jn(To,To.current),!0}function qE(e,t,n){var r=e.stateNode;if(!r)throw Error(Re(169));n?(e=RR(e,t,Yf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Wi),jn(Wi,e)):Zn(To),jn(To,n)}var su=null,k4=!1,ux=!1;function IR(e){su===null?su=[e]:su.push(e)}function eX(e){k4=!0,IR(e)}function cd(){if(!ux&&su!==null){ux=!0;var e=0,t=Pn;try{var n=su;for(Pn=1;e>=a,i-=a,uu=1<<32-ys(t)+i|n<z?($=N,N=null):$=N.sibling;var H=m(P,N,T[z],M);if(H===null){N===null&&(N=$);break}e&&N&&H.alternate===null&&t(P,N),k=o(H,k,z),I===null?R=H:I.sibling=H,I=H,N=$}if(z===T.length)return n(P,N),nr&&mf(P,z),R;if(N===null){for(;zz?($=N,N=null):$=N.sibling;var q=m(P,N,H.value,M);if(q===null){N===null&&(N=$);break}e&&N&&q.alternate===null&&t(P,N),k=o(q,k,z),I===null?R=q:I.sibling=q,I=q,N=$}if(H.done)return n(P,N),nr&&mf(P,z),R;if(N===null){for(;!H.done;z++,H=T.next())H=p(P,H.value,M),H!==null&&(k=o(H,k,z),I===null?R=H:I.sibling=H,I=H);return nr&&mf(P,z),R}for(N=r(P,N);!H.done;z++,H=T.next())H=v(N,P,z,H.value,M),H!==null&&(e&&H.alternate!==null&&N.delete(H.key===null?z:H.key),k=o(H,k,z),I===null?R=H:I.sibling=H,I=H);return e&&N.forEach(function(de){return t(P,de)}),nr&&mf(P,z),R}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Np&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case ny:e:{for(var R=T.key,I=k;I!==null;){if(I.key===R){if(R=T.type,R===Np){if(I.tag===7){n(P,I.sibling),k=i(I,T.props.children),k.return=P,P=k;break e}}else if(I.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ec&&tP(R)===I.type){n(P,I.sibling),k=i(I,T.props),k.ref=Lg(P,I,T),k.return=P,P=k;break e}n(P,I);break}else t(P,I);I=I.sibling}T.type===Np?(k=Bf(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=k3(T.type,T.key,T.props,null,P.mode,M),M.ref=Lg(P,k,T),M.return=P,P=M)}return a(P);case Ip:e:{for(I=T.key;k!==null;){if(k.key===I)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=vx(T,P.mode,M),k.return=P,P=k}return a(P);case Ec:return I=T._init,E(P,k,I(T._payload),M)}if(Jg(T))return S(P,k,T,M);if(kg(T))return w(P,k,T,M);hy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=mx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var O0=WR(!0),VR=WR(!1),Hv={},bl=ud(Hv),iv=ud(Hv),ov=ud(Hv);function Af(e){if(e===Hv)throw Error(Re(174));return e}function u7(e,t){switch(jn(ov,t),jn(iv,e),jn(bl,Hv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qw(t,e)}Zn(bl),jn(bl,t)}function R0(){Zn(bl),Zn(iv),Zn(ov)}function UR(e){Af(ov.current);var t=Af(bl.current),n=qw(t,e.type);t!==n&&(jn(iv,e),jn(bl,n))}function c7(e){iv.current===e&&(Zn(bl),Zn(iv))}var ur=ud(0);function S5(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var cx=[];function d7(){for(var e=0;en?n:4,e(!0);var r=dx.transition;dx.transition={};try{e(!1),t()}finally{Pn=n,dx.transition=r}}function aI(){return Ba().memoizedState}function iX(e,t,n){var r=Yc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},sI(e))lI(t,n);else if(n=FR(e,t,n,r),n!==null){var i=ro();Ss(n,e,r,i),uI(n,t,r)}}function oX(e,t,n){var r=Yc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(sI(e))lI(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,s7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=FR(e,t,i,r),n!==null&&(i=ro(),Ss(n,e,r,i),uI(n,t,r))}}function sI(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function lI(e,t){wm=b5=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uI(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Y9(e,n)}}var x5={readContext:Fa,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},aX={readContext:Fa,useCallback:function(e,t){return sl().memoizedState=[e,t===void 0?null:t],e},useContext:Fa,useEffect:rP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,x3(4194308,4,tI.bind(null,t,e),n)},useLayoutEffect:function(e,t){return x3(4194308,4,e,t)},useInsertionEffect:function(e,t){return x3(4,2,e,t)},useMemo:function(e,t){var n=sl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=sl();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:m7,useDeferredValue:function(e){return sl().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=rX.bind(null,e[1]),sl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=sl();if(nr){if(n===void 0)throw Error(Re(407));n=n()}else{if(n=t(),di===null)throw Error(Re(349));(Kf&30)!==0||YR(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rP(KR.bind(null,r,o,e),[e]),r.flags|=2048,lv(9,qR.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=sl(),t=di.identifierPrefix;if(nr){var n=cu,r=uu;n=(r&~(1<<32-ys(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=av++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[hl]=t,e[rv]=r,yI(e,t,!1,!1),t.stateNode=e;e:{switch(a=Xw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iN0&&(t.flags|=128,r=!0,Mg(o,!1),t.lanes=4194304)}else{if(!r)if(e=S5(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Mg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Fi(t),null}else 2*Or()-o.renderingStartTime>N0&&n!==1073741824&&(t.flags|=128,r=!0,Mg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=ur.current,jn(ur,r?n&1|2:n&1),t):(Fi(t),null);case 22:case 23:return w7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Fi(t),t.subtreeFlags&6&&(t.flags|=8192)):Fi(t),null;case 24:return null;case 25:return null}throw Error(Re(156,t.tag))}function pX(e,t){switch(n7(t),t.tag){case 1:return Ao(t.type)&&f5(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return R0(),Zn(To),Zn(Wi),d7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return c7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Re(340));M0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return R0(),null;case 10:return a7(t.type._context),null;case 22:case 23:return w7(),null;case 24:return null;default:return null}}var gy=!1,Hi=!1,gX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Up(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function C6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var fP=!1;function mX(e,t){if(a6=l5,e=_R(),e7(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(s6={focusedElem:e,selectionRange:n},l5=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:fs(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=fP,fP=!1,S}function Cm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&C6(t,n,o)}i=i.next}while(i!==r)}}function T4(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function _6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function xI(e){var t=e.alternate;t!==null&&(e.alternate=null,xI(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[rv],delete t[c6],delete t[QK],delete t[JK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wI(e){return e.tag===5||e.tag===3||e.tag===4}function hP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wI(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function k6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=d5));else if(r!==4&&(e=e.child,e!==null))for(k6(e,t,n),e=e.sibling;e!==null;)k6(e,t,n),e=e.sibling}function E6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(E6(e,t,n),e=e.sibling;e!==null;)E6(e,t,n),e=e.sibling}var Ei=null,hs=!1;function Sc(e,t,n){for(n=n.child;n!==null;)CI(e,t,n),n=n.sibling}function CI(e,t,n){if(Sl&&typeof Sl.onCommitFiberUnmount=="function")try{Sl.onCommitFiberUnmount(b4,n)}catch{}switch(n.tag){case 5:Hi||Up(n,t);case 6:var r=Ei,i=hs;Ei=null,Sc(e,t,n),Ei=r,hs=i,Ei!==null&&(hs?(e=Ei,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ei.removeChild(n.stateNode));break;case 18:Ei!==null&&(hs?(e=Ei,n=n.stateNode,e.nodeType===8?lx(e.parentNode,n):e.nodeType===1&&lx(e,n),Qm(e)):lx(Ei,n.stateNode));break;case 4:r=Ei,i=hs,Ei=n.stateNode.containerInfo,hs=!0,Sc(e,t,n),Ei=r,hs=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&C6(n,t,a),i=i.next}while(i!==r)}Sc(e,t,n);break;case 1:if(!Hi&&(Up(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}Sc(e,t,n);break;case 21:Sc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,Sc(e,t,n),Hi=r):Sc(e,t,n);break;default:Sc(e,t,n)}}function pP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gX),t.forEach(function(r){var i=kX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ss(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yX(r/1960))-r,10e?16:e,Nc===null)var r=!1;else{if(e=Nc,Nc=null,_5=0,(on&6)!==0)throw Error(Re(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-b7?Ff(e,0):S7|=n),Lo(e,t)}function MI(e,t){t===0&&((e.mode&1)===0?t=1:(t=ay,ay<<=1,(ay&130023424)===0&&(ay=4194304)));var n=ro();e=mu(e,t),e!==null&&(Fv(e,t,n),Lo(e,n))}function _X(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),MI(e,n)}function kX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Re(314))}r!==null&&r.delete(t),MI(e,n)}var OI;OI=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,fX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&NR(t,g5,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;w3(e,t),e=t.pendingProps;var i=L0(t,Wi.current);o0(t,n),i=h7(null,t,r,e,i,n);var o=p7();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(o=!0,h5(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,l7(t),i.updater=E4,t.stateNode=i,i._reactInternals=t,m6(t,r,e,n),t=S6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&t7(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(w3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=PX(r),e=fs(r,e),i){case 0:t=y6(null,t,r,e,n);break e;case 1:t=uP(null,t,r,e,n);break e;case 11:t=sP(null,t,r,e,n);break e;case 14:t=lP(null,t,r,fs(r.type,e),n);break e}throw Error(Re(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),y6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),uP(e,t,r,i,n);case 3:e:{if(gI(t),e===null)throw Error(Re(387));r=t.pendingProps,o=t.memoizedState,i=o.element,BR(e,t),y5(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=I0(Error(Re(423)),t),t=cP(e,t,r,n,i);break e}else if(r!==i){i=I0(Error(Re(424)),t),t=cP(e,t,r,n,i);break e}else for(oa=Uc(t.stateNode.containerInfo.firstChild),aa=t,nr=!0,gs=null,n=VR(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(M0(),r===i){t=vu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return UR(t),e===null&&h6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,l6(r,i)?a=null:o!==null&&l6(r,o)&&(t.flags|=32),pI(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&h6(t),null;case 13:return mI(e,t,n);case 4:return u7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=O0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),sP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,jn(m5,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!To.current){t=vu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),p6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Re(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),p6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,o0(t,n),i=Fa(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=fs(r,t.pendingProps),i=fs(r.type,i),lP(e,t,r,i,n);case 15:return fI(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fs(r,i),w3(e,t),t.tag=1,Ao(r)?(e=!0,h5(t)):e=!1,o0(t,n),HR(t,r,i),m6(t,r,i,n),S6(null,t,r,!0,e,n);case 19:return vI(e,t,n);case 22:return hI(e,t,n)}throw Error(Re(156,t.tag))};function RI(e,t){return oR(e,t)}function EX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ia(e,t,n,r){return new EX(e,t,n,r)}function _7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PX(e){if(typeof e=="function")return _7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V9)return 11;if(e===U9)return 14}return 2}function qc(e,t){var n=e.alternate;return n===null?(n=Ia(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function k3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")_7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Np:return Bf(n.children,i,o,t);case W9:a=8,i|=8;break;case $w:return e=Ia(12,n,t,i|2),e.elementType=$w,e.lanes=o,e;case Hw:return e=Ia(13,n,t,i),e.elementType=Hw,e.lanes=o,e;case Ww:return e=Ia(19,n,t,i),e.elementType=Ww,e.lanes=o,e;case WO:return L4(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $O:a=10;break e;case HO:a=9;break e;case V9:a=11;break e;case U9:a=14;break e;case Ec:a=16,r=null;break e}throw Error(Re(130,e==null?e:typeof e,""))}return t=Ia(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Bf(e,t,n,r){return e=Ia(7,e,r,t),e.lanes=n,e}function L4(e,t,n,r){return e=Ia(22,e,r,t),e.elementType=WO,e.lanes=n,e.stateNode={isHidden:!1},e}function mx(e,t,n){return e=Ia(6,e,null,t),e.lanes=n,e}function vx(e,t,n){return t=Ia(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TX(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zb(0),this.expirationTimes=Zb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function k7(e,t,n,r,i,o,a,s,l){return e=new TX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Ia(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},l7(o),e}function AX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=ha})(Ol);const yy=I9(Ol.exports);var wP=Ol.exports;Fw.createRoot=wP.createRoot,Fw.hydrateRoot=wP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,N4={exports:{}},D4={};/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var IX=C.exports,NX=Symbol.for("react.element"),DX=Symbol.for("react.fragment"),zX=Object.prototype.hasOwnProperty,FX=IX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,BX={key:!0,ref:!0,__self:!0,__source:!0};function zI(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)zX.call(t,r)&&!BX.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:NX,type:e,key:o,ref:a,props:i,_owner:FX.current}}D4.Fragment=DX;D4.jsx=zI;D4.jsxs=zI;(function(e){e.exports=D4})(N4);const Tn=N4.exports.Fragment,x=N4.exports.jsx,re=N4.exports.jsxs;var A7=C.exports.createContext({});A7.displayName="ColorModeContext";function Wv(){const e=C.exports.useContext(A7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Sy={light:"chakra-ui-light",dark:"chakra-ui-dark"};function $X(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?Sy.dark:Sy.light),document.body.classList.remove(r?Sy.light:Sy.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var HX="chakra-ui-color-mode";function WX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var VX=WX(HX),CP=()=>{};function _P(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function FI(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=VX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>_P(a,s)),[h,p]=C.exports.useState(()=>_P(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>$X({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const R=M==="system"?m():M;u(R),v(R==="dark"),S(R),a.set(R)},[a,m,v,S]);bs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?CP:k,setColorMode:t?CP:P,forced:t!==void 0}),[E,k,P,t]);return x(A7.Provider,{value:T,children:n})}FI.displayName="ColorModeProvider";var M6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",R="[object Set]",I="[object String]",N="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",H="[object DataView]",q="[object Float32Array]",de="[object Float64Array]",V="[object Int8Array]",J="[object Int16Array]",ie="[object Int32Array]",ee="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Q="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,Se={};Se[q]=Se[de]=Se[V]=Se[J]=Se[ie]=Se[ee]=Se[X]=Se[G]=Se[Q]=!0,Se[s]=Se[l]=Se[$]=Se[h]=Se[H]=Se[p]=Se[m]=Se[v]=Se[w]=Se[E]=Se[k]=Se[M]=Se[R]=Se[I]=Se[z]=!1;var xe=typeof ms=="object"&&ms&&ms.Object===Object&&ms,Be=typeof self=="object"&&self&&self.Object===Object&&self,We=xe||Be||Function("return this")(),dt=t&&!t.nodeType&&t,Ye=dt&&!0&&e&&!e.nodeType&&e,rt=Ye&&Ye.exports===dt,Ze=rt&&xe.process,Ke=function(){try{var U=Ye&&Ye.require&&Ye.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Et=Ke&&Ke.isTypedArray;function bt(U,ne,pe){switch(pe.length){case 0:return U.call(ne);case 1:return U.call(ne,pe[0]);case 2:return U.call(ne,pe[0],pe[1]);case 3:return U.call(ne,pe[0],pe[1],pe[2])}return U.apply(ne,pe)}function Ae(U,ne){for(var pe=-1,qe=Array(U);++pe-1}function x1(U,ne){var pe=this.__data__,qe=Ya(pe,U);return qe<0?(++this.size,pe.push([U,ne])):pe[qe][1]=ne,this}Io.prototype.clear=kd,Io.prototype.delete=b1,Io.prototype.get=Iu,Io.prototype.has=Ed,Io.prototype.set=x1;function Os(U){var ne=-1,pe=U==null?0:U.length;for(this.clear();++ne1?pe[zt-1]:void 0,vt=zt>2?pe[2]:void 0;for(cn=U.length>3&&typeof cn=="function"?(zt--,cn):void 0,vt&&kh(pe[0],pe[1],vt)&&(cn=zt<3?void 0:cn,zt=1),ne=Object(ne);++qe-1&&U%1==0&&U0){if(++ne>=i)return arguments[0]}else ne=0;return U.apply(void 0,arguments)}}function Bu(U){if(U!=null){try{return _n.call(U)}catch{}try{return U+""}catch{}}return""}function ya(U,ne){return U===ne||U!==U&&ne!==ne}var Md=Fl(function(){return arguments}())?Fl:function(U){return Wn(U)&&mn.call(U,"callee")&&!$e.call(U,"callee")},Hl=Array.isArray;function Ht(U){return U!=null&&Ph(U.length)&&!Hu(U)}function Eh(U){return Wn(U)&&Ht(U)}var $u=Zt||I1;function Hu(U){if(!Fo(U))return!1;var ne=Is(U);return ne==v||ne==S||ne==u||ne==T}function Ph(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Fo(U){var ne=typeof U;return U!=null&&(ne=="object"||ne=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Is(U)!=k)return!1;var ne=an(U);if(ne===null)return!0;var pe=mn.call(ne,"constructor")&&ne.constructor;return typeof pe=="function"&&pe instanceof pe&&_n.call(pe)==Xt}var Th=Et?it(Et):Du;function Rd(U){return Gr(U,Ah(U))}function Ah(U){return Ht(U)?M1(U,!0):Ns(U)}var sn=qa(function(U,ne,pe,qe){No(U,ne,pe,qe)});function Wt(U){return function(){return U}}function Lh(U){return U}function I1(){return!1}e.exports=sn})(M6,M6.exports);const vl=M6.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Lf(e,...t){return UX(e)?e(...t):e}var UX=e=>typeof e=="function",GX=e=>/!(important)?$/.test(e),kP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,O6=(e,t)=>n=>{const r=String(t),i=GX(r),o=kP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=kP(s),i?`${s} !important`:s};function cv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=O6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var by=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ls(e,t){return n=>{const r={property:n,scale:e};return r.transform=cv({scale:e,transform:t}),r}}var jX=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function YX(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:jX(t),transform:n?cv({scale:n,compose:r}):r}}var BI=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function qX(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...BI].join(" ")}function KX(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...BI].join(" ")}var XX={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},ZX={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function QX(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var JX={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},$I="& > :not(style) ~ :not(style)",eZ={[$I]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},tZ={[$I]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},R6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},nZ=new Set(Object.values(R6)),HI=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),rZ=e=>e.trim();function iZ(e,t){var n;if(e==null||HI.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(rZ).filter(Boolean);if(l?.length===0)return e;const u=s in R6?R6[s]:s;l.unshift(u);const h=l.map(p=>{if(nZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=WI(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var WI=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),oZ=(e,t)=>iZ(e,t??{});function aZ(e){return/^var\(--.+\)$/.test(e)}var sZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},rl=e=>t=>`${e}(${t})`,nn={filter(e){return e!=="auto"?e:XX},backdropFilter(e){return e!=="auto"?e:ZX},ring(e){return QX(nn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?qX():e==="auto-gpu"?KX():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=sZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(aZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:oZ,blur:rl("blur"),opacity:rl("opacity"),brightness:rl("brightness"),contrast:rl("contrast"),dropShadow:rl("drop-shadow"),grayscale:rl("grayscale"),hueRotate:rl("hue-rotate"),invert:rl("invert"),saturate:rl("saturate"),sepia:rl("sepia"),bgImage(e){return e==null||WI(e)||HI.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=JX[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:ls("borderWidths"),borderStyles:ls("borderStyles"),colors:ls("colors"),borders:ls("borders"),radii:ls("radii",nn.px),space:ls("space",by(nn.vh,nn.px)),spaceT:ls("space",by(nn.vh,nn.px)),degreeT(e){return{property:e,transform:nn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:cv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ls("sizes",by(nn.vh,nn.px)),sizesT:ls("sizes",by(nn.vh,nn.fraction)),shadows:ls("shadows"),logical:YX,blur:ls("blur",nn.blur)},E3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",nn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:nn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",nn.gradient),bgClip:{transform:nn.bgClip}};Object.assign(E3,{bgImage:E3.backgroundImage,bgImg:E3.backgroundImage});var fn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(fn,{rounded:fn.borderRadius,roundedTop:fn.borderTopRadius,roundedTopLeft:fn.borderTopLeftRadius,roundedTopRight:fn.borderTopRightRadius,roundedTopStart:fn.borderStartStartRadius,roundedTopEnd:fn.borderStartEndRadius,roundedBottom:fn.borderBottomRadius,roundedBottomLeft:fn.borderBottomLeftRadius,roundedBottomRight:fn.borderBottomRightRadius,roundedBottomStart:fn.borderEndStartRadius,roundedBottomEnd:fn.borderEndEndRadius,roundedLeft:fn.borderLeftRadius,roundedRight:fn.borderRightRadius,roundedStart:fn.borderInlineStartRadius,roundedEnd:fn.borderInlineEndRadius,borderStart:fn.borderInlineStart,borderEnd:fn.borderInlineEnd,borderTopStartRadius:fn.borderStartStartRadius,borderTopEndRadius:fn.borderStartEndRadius,borderBottomStartRadius:fn.borderEndStartRadius,borderBottomEndRadius:fn.borderEndEndRadius,borderStartRadius:fn.borderInlineStartRadius,borderEndRadius:fn.borderInlineEndRadius,borderStartWidth:fn.borderInlineStartWidth,borderEndWidth:fn.borderInlineEndWidth,borderStartColor:fn.borderInlineStartColor,borderEndColor:fn.borderInlineEndColor,borderStartStyle:fn.borderInlineStartStyle,borderEndStyle:fn.borderInlineEndStyle});var lZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},I6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(I6,{shadow:I6.boxShadow});var uZ={filter:{transform:nn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",nn.brightness),contrast:ae.propT("--chakra-contrast",nn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",nn.invert),saturate:ae.propT("--chakra-saturate",nn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",nn.dropShadow),backdropFilter:{transform:nn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",nn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",nn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",nn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",nn.saturate)},P5={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:nn.flexDirection},experimental_spaceX:{static:eZ,transform:cv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:tZ,transform:cv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(P5,{flexDir:P5.flexDirection});var VI={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},cZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:nn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Ta={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",nn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Ta,{w:Ta.width,h:Ta.height,minW:Ta.minWidth,maxW:Ta.maxWidth,minH:Ta.minHeight,maxH:Ta.maxHeight,overscroll:Ta.overscrollBehavior,overscrollX:Ta.overscrollBehaviorX,overscrollY:Ta.overscrollBehaviorY});var dZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function fZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},pZ=hZ(fZ),gZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},mZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},yx=(e,t,n)=>{const r={},i=pZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},vZ={srOnly:{transform(e){return e===!0?gZ:e==="focusable"?mZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>yx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>yx(t,e,n)}},Em={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Em,{insetStart:Em.insetInlineStart,insetEnd:Em.insetInlineEnd});var yZ={ring:{transform:nn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var SZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},bZ={clipPath:!0,transform:ae.propT("transform",nn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},xZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},wZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",nn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},CZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function UI(e){return xs(e)&&e.reference?e.reference:String(e)}var z4=(e,...t)=>t.map(UI).join(` ${e} `).replace(/calc/g,""),EP=(...e)=>`calc(${z4("+",...e)})`,PP=(...e)=>`calc(${z4("-",...e)})`,N6=(...e)=>`calc(${z4("*",...e)})`,TP=(...e)=>`calc(${z4("/",...e)})`,AP=e=>{const t=UI(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:N6(t,-1)},Cf=Object.assign(e=>({add:(...t)=>Cf(EP(e,...t)),subtract:(...t)=>Cf(PP(e,...t)),multiply:(...t)=>Cf(N6(e,...t)),divide:(...t)=>Cf(TP(e,...t)),negate:()=>Cf(AP(e)),toString:()=>e.toString()}),{add:EP,subtract:PP,multiply:N6,divide:TP,negate:AP});function _Z(e,t="-"){return e.replace(/\s+/g,t)}function kZ(e){const t=_Z(e.toString());return PZ(EZ(t))}function EZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function PZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function TZ(e,t=""){return[t,e].filter(Boolean).join("-")}function AZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function LZ(e,t=""){return kZ(`--${TZ(e,t)}`)}function ei(e,t,n){const r=LZ(e,n);return{variable:r,reference:AZ(r,t)}}function MZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function OZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function D6(e){if(e==null)return e;const{unitless:t}=OZ(e);return t||typeof e=="number"?`${e}px`:e}var GI=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,L7=e=>Object.fromEntries(Object.entries(e).sort(GI));function LP(e){const t=L7(e);return Object.assign(Object.values(t),t)}function RZ(e){const t=Object.keys(L7(e));return new Set(t)}function MP(e){if(!e)return e;e=D6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function nm(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${D6(e)})`),t&&n.push("and",`(max-width: ${D6(t)})`),n.join(" ")}function IZ(e){if(!e)return null;e.base=e.base??"0px";const t=LP(e),n=Object.entries(e).sort(GI).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?MP(u):void 0,{_minW:MP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:nm(null,u),minWQuery:nm(a),minMaxQuery:nm(a,u)}}),r=RZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:L7(e),asArray:LP(e),details:n,media:[null,...t.map(o=>nm(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;MZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var Ci={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>jI(t=>e(t,"&"),"[role=group]","[data-group]",".group"),tu=e=>jI(t=>e(t,"~ &"),"[data-peer]",".peer"),jI=(e,...t)=>t.map(e).join(", "),F4={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(Ci.hover),_peerHover:tu(Ci.hover),_groupFocus:bc(Ci.focus),_peerFocus:tu(Ci.focus),_groupFocusVisible:bc(Ci.focusVisible),_peerFocusVisible:tu(Ci.focusVisible),_groupActive:bc(Ci.active),_peerActive:tu(Ci.active),_groupDisabled:bc(Ci.disabled),_peerDisabled:tu(Ci.disabled),_groupInvalid:bc(Ci.invalid),_peerInvalid:tu(Ci.invalid),_groupChecked:bc(Ci.checked),_peerChecked:tu(Ci.checked),_groupFocusWithin:bc(Ci.focusWithin),_peerFocusWithin:tu(Ci.focusWithin),_peerPlaceholderShown:tu(Ci.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},NZ=Object.keys(F4);function OP(e,t){return ei(String(e).replace(/\./g,"-"),void 0,t)}function DZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=OP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Cf.negate(s),P=Cf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=OP(S,t?.cssVarPrefix);return E},p=xs(s)?s:{default:s};n=vl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=F4)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function zZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function FZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var BZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function $Z(e){return FZ(e,BZ)}function HZ(e){return e.semanticTokens}function WZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function VZ({tokens:e,semanticTokens:t}){const n=Object.entries(z6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(z6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function z6(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(z6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function UZ(e){var t;const n=WZ(e),r=$Z(n),i=HZ(n),o=VZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=DZ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:IZ(n.breakpoints)}),n}var M7=vl({},E3,fn,lZ,P5,Ta,uZ,yZ,cZ,VI,vZ,Em,I6,Xn,CZ,wZ,SZ,bZ,dZ,xZ),GZ=Object.assign({},Xn,Ta,P5,VI,Em),jZ=Object.keys(GZ),YZ=[...Object.keys(M7),...NZ],qZ={...M7,...F4},KZ=e=>e in qZ,XZ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Lf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!QZ(t),eQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=ZZ(t);return t=n(i)??r(o)??r(t),t};function tQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Lf(o,r),u=XZ(l)(r);let h={};for(let p in u){const m=u[p];let v=Lf(m,r);p in n&&(p=n[p]),JZ(p,v)&&(v=eQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),xs(v)){h[p]=h[p]??{},h[p]=vl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const E=Lf(S?.property,r);if(!a&&S?.static){const P=Lf(S.static,r);h=vl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=vl({},h,w):h[E]=w;continue}if(xs(w)){h=vl({},h,w);continue}h[p]=w}return h};return i}var YI=e=>t=>tQ({theme:t,pseudos:F4,configs:M7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function nQ(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function rQ(e,t){for(let n=t+1;n{vl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?vl(u,k):u[P]=k;continue}u[P]=k}}return u}}function oQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=iQ(i);return vl({},Lf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function aQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function gn(e){return zZ(e,["styleConfig","size","variant","colorScheme"])}function sQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Pi(t1,--Ro):0,D0--,$r===10&&(D0=1,$4--),$r}function sa(){return $r=Ro2||fv($r)>3?"":" "}function SQ(e,t){for(;--t&&sa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Vv(e,P3()+(t<6&&xl()==32&&sa()==32))}function B6(e){for(;sa();)switch($r){case e:return Ro;case 34:case 39:e!==34&&e!==39&&B6($r);break;case 40:e===41&&B6(e);break;case 92:sa();break}return Ro}function bQ(e,t){for(;sa()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Vv(t,Ro-1)+"*"+B4(e===47?e:sa())}function xQ(e){for(;!fv(xl());)sa();return Vv(e,Ro)}function wQ(e){return JI(A3("",null,null,null,[""],e=QI(e),0,[0],e))}function A3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,E=1,P=1,k=0,T="",M=i,R=o,I=r,N=T;E;)switch(S=k,k=sa()){case 40:if(S!=108&&Pi(N,p-1)==58){F6(N+=bn(T3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=T3(k);break;case 9:case 10:case 13:case 32:N+=yQ(S);break;case 92:N+=SQ(P3()-1,7);continue;case 47:switch(xl()){case 42:case 47:xy(CQ(bQ(sa(),P3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=cl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(N)-p&&xy(v>32?IP(N+";",r,n,p-1):IP(bn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(xy(I=RP(N,t,n,u,h,i,s,T,M=[],R=[],p),o),k===123)if(h===0)A3(N,t,I,I,M,o,p,s,R);else switch(m===99&&Pi(N,3)===110?100:m){case 100:case 109:case 115:A3(e,I,I,r&&xy(RP(e,I,I,0,0,i,s,T,i,M=[],p),R),i,R,p,s,r?M:R);break;default:A3(N,I,I,I,[""],R,0,s,R)}}u=h=v=0,w=P=1,T=N="",p=a;break;case 58:p=1+cl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&vQ()==125)continue}switch(N+=B4(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(cl(N)-1)*P,P=1;break;case 64:xl()===45&&(N+=T3(sa())),m=xl(),h=p=cl(T=N+=xQ(P3())),k++;break;case 45:S===45&&cl(N)==2&&(w=0)}}return o}function RP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=I7(m),S=0,w=0,E=0;S0?m[P]+" "+k:bn(k,/&\f/g,m[P])))&&(l[E++]=T);return H4(e,t,n,i===0?O7:s,l,u,h)}function CQ(e,t,n){return H4(e,t,n,qI,B4(mQ()),dv(e,2,-2),0)}function IP(e,t,n,r){return H4(e,t,n,R7,dv(e,0,r),dv(e,r+1,-1),r)}function s0(e,t){for(var n="",r=I7(e),i=0;i6)switch(Pi(e,t+1)){case 109:if(Pi(e,t+4)!==45)break;case 102:return bn(e,/(.+:)(.+)-([^]+)/,"$1"+hn+"$2-$3$1"+T5+(Pi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~F6(e,"stretch")?tN(bn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Pi(e,t+1)!==115)break;case 6444:switch(Pi(e,cl(e)-3-(~F6(e,"!important")&&10))){case 107:return bn(e,":",":"+hn)+e;case 101:return bn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+hn+(Pi(e,14)===45?"inline-":"")+"box$3$1"+hn+"$2$3$1"+Bi+"$2box$3")+e}break;case 5936:switch(Pi(e,t+11)){case 114:return hn+e+Bi+bn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return hn+e+Bi+bn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return hn+e+Bi+bn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return hn+e+Bi+e+e}return e}var OQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case R7:t.return=tN(t.value,t.length);break;case KI:return s0([Rg(t,{value:bn(t.value,"@","@"+hn)})],i);case O7:if(t.length)return gQ(t.props,function(o){switch(pQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return s0([Rg(t,{props:[bn(o,/:(read-\w+)/,":"+T5+"$1")]})],i);case"::placeholder":return s0([Rg(t,{props:[bn(o,/:(plac\w+)/,":"+hn+"input-$1")]}),Rg(t,{props:[bn(o,/:(plac\w+)/,":"+T5+"$1")]}),Rg(t,{props:[bn(o,/:(plac\w+)/,Bi+"input-$1")]})],i)}return""})}},RQ=[OQ],nN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||RQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var UQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},GQ=/[A-Z]|^ms/g,jQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uN=function(t){return t.charCodeAt(1)===45},zP=function(t){return t!=null&&typeof t!="boolean"},Sx=eN(function(e){return uN(e)?e:e.replace(GQ,"-$&").toLowerCase()}),FP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return UQ[t]!==1&&!uN(t)&&typeof n=="number"&&n!==0?n+"px":n};function hv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return YQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,hv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function YQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function cJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},mN=dJ(cJ);function vN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var yN=e=>vN(e,t=>t!=null);function fJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var hJ=fJ();function SN(e,...t){return lJ(e)?e(...t):e}function pJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function gJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var mJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,vJ=eN(function(e){return mJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),yJ=vJ,SJ=function(t){return t!=="theme"},WP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?yJ:SJ},VP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},bJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return sN(n,r,i),KQ(function(){return lN(n,r,i)}),null},xJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=VP(t,n,r),l=s||WP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var CJ=Ln("accordion").parts("root","container","button","panel").extend("icon"),_J=Ln("alert").parts("title","description","container").extend("icon","spinner"),kJ=Ln("avatar").parts("label","badge","container").extend("excessLabel","group"),EJ=Ln("breadcrumb").parts("link","item","container").extend("separator");Ln("button").parts();var PJ=Ln("checkbox").parts("control","icon","container").extend("label");Ln("progress").parts("track","filledTrack").extend("label");var TJ=Ln("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),AJ=Ln("editable").parts("preview","input","textarea"),LJ=Ln("form").parts("container","requiredIndicator","helperText"),MJ=Ln("formError").parts("text","icon"),OJ=Ln("input").parts("addon","field","element"),RJ=Ln("list").parts("container","item","icon"),IJ=Ln("menu").parts("button","list","item").extend("groupTitle","command","divider"),NJ=Ln("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),DJ=Ln("numberinput").parts("root","field","stepperGroup","stepper");Ln("pininput").parts("field");var zJ=Ln("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),FJ=Ln("progress").parts("label","filledTrack","track"),BJ=Ln("radio").parts("container","control","label"),$J=Ln("select").parts("field","icon"),HJ=Ln("slider").parts("container","track","thumb","filledTrack","mark"),WJ=Ln("stat").parts("container","label","helpText","number","icon"),VJ=Ln("switch").parts("container","track","thumb"),UJ=Ln("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),GJ=Ln("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),jJ=Ln("tag").parts("container","label","closeButton");function Li(e,t){YJ(e)&&(e="100%");var n=qJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function wy(e){return Math.min(1,Math.max(0,e))}function YJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function qJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function bN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Cy(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function KJ(e,t,n){return{r:Li(e,255)*255,g:Li(t,255)*255,b:Li(n,255)*255}}function UP(e,t,n){e=Li(e,255),t=Li(t,255),n=Li(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function XJ(e,t,n){var r,i,o;if(e=Li(e,360),t=Li(t,100),n=Li(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=bx(s,a,e+1/3),i=bx(s,a,e),o=bx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function GP(e,t,n){e=Li(e,255),t=Li(t,255),n=Li(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var V6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function tee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=iee(e)),typeof e=="object"&&(nu(e.r)&&nu(e.g)&&nu(e.b)?(t=KJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):nu(e.h)&&nu(e.s)&&nu(e.v)?(r=Cy(e.s),i=Cy(e.v),t=ZJ(e.h,r,i),a=!0,s="hsv"):nu(e.h)&&nu(e.s)&&nu(e.l)&&(r=Cy(e.s),o=Cy(e.l),t=XJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=bN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var nee="[-\\+]?\\d+%?",ree="[-\\+]?\\d*\\.\\d+%?",Dc="(?:".concat(ree,")|(?:").concat(nee,")"),xx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),wx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),ds={CSS_UNIT:new RegExp(Dc),rgb:new RegExp("rgb"+xx),rgba:new RegExp("rgba"+wx),hsl:new RegExp("hsl"+xx),hsla:new RegExp("hsla"+wx),hsv:new RegExp("hsv"+xx),hsva:new RegExp("hsva"+wx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function iee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(V6[e])e=V6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=ds.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=ds.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=ds.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=ds.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=ds.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=ds.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=ds.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:YP(n[4]),format:t?"name":"hex8"}:(n=ds.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=ds.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:YP(n[4]+n[4]),format:t?"name":"hex8"}:(n=ds.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function nu(e){return Boolean(ds.CSS_UNIT.exec(String(e)))}var Uv=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=eee(t)),this.originalInput=t;var i=tee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=bN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=GP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=GP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=UP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=UP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),jP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),QJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Li(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Li(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jP(this.r,this.g,this.b,!1),n=0,r=Object.entries(V6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=wy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=wy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=wy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=wy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(xN(e));return e.count=t,n}var r=oee(e.hue,e.seed),i=aee(r,e),o=see(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Uv(a)}function oee(e,t){var n=uee(e),r=A5(n,t);return r<0&&(r=360+r),r}function aee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return A5([0,100],t.seed);var n=wN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return A5([r,i],t.seed)}function see(e,t,n){var r=lee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return A5([r,i],n.seed)}function lee(e,t){for(var n=wN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function uee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=_N.find(function(a){return a.name===e});if(n){var r=CN(n);if(r.hueRange)return r.hueRange}var i=new Uv(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function wN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=_N;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function A5(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function CN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var _N=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function cee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Ti=(e,t,n)=>{const r=cee(e,`colors.${t}`,t),{isValid:i}=new Uv(r);return i?r:n},fee=e=>t=>{const n=Ti(t,e);return new Uv(n).isDark()?"dark":"light"},hee=e=>t=>fee(e)(t)==="dark",z0=(e,t)=>n=>{const r=Ti(n,e);return new Uv(r).setAlpha(t).toRgbString()};function qP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( + 45deg, + ${t} 25%, + transparent 25%, + transparent 50%, + ${t} 50%, + ${t} 75%, + transparent 75%, + transparent + )`,backgroundSize:`${e} ${e}`}}function pee(e){const t=xN().toHexString();return!e||dee(e)?t:e.string&&e.colors?mee(e.string,e.colors):e.string&&!e.colors?gee(e.string):e.colors&&!e.string?vee(e.colors):t}function gee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function mee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function $7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function yee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function kN(e){return yee(e)&&e.reference?e.reference:String(e)}var eS=(e,...t)=>t.map(kN).join(` ${e} `).replace(/calc/g,""),KP=(...e)=>`calc(${eS("+",...e)})`,XP=(...e)=>`calc(${eS("-",...e)})`,U6=(...e)=>`calc(${eS("*",...e)})`,ZP=(...e)=>`calc(${eS("/",...e)})`,QP=e=>{const t=kN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:U6(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(KP(e,...t)),subtract:(...t)=>lu(XP(e,...t)),multiply:(...t)=>lu(U6(e,...t)),divide:(...t)=>lu(ZP(e,...t)),negate:()=>lu(QP(e)),toString:()=>e.toString()}),{add:KP,subtract:XP,multiply:U6,divide:ZP,negate:QP});function See(e){return!Number.isInteger(parseFloat(e.toString()))}function bee(e,t="-"){return e.replace(/\s+/g,t)}function EN(e){const t=bee(e.toString());return t.includes("\\.")?e:See(e)?t.replace(".","\\."):e}function xee(e,t=""){return[t,EN(e)].filter(Boolean).join("-")}function wee(e,t){return`var(${EN(e)}${t?`, ${t}`:""})`}function Cee(e,t=""){return`--${xee(e,t)}`}function Vi(e,t){const n=Cee(e,t?.prefix);return{variable:n,reference:wee(n,_ee(t?.fallback))}}function _ee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:kee,defineMultiStyleConfig:Eee}=rr(CJ.keys),Pee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Aee={pt:"2",px:"4",pb:"5"},Lee={fontSize:"1.25em"},Mee=kee({container:Pee,button:Tee,panel:Aee,icon:Lee}),Oee=Eee({baseStyle:Mee}),{definePartsStyle:Gv,defineMultiStyleConfig:Ree}=rr(_J.keys),la=ei("alert-fg"),yu=ei("alert-bg"),Iee=Gv({container:{bg:yu.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:la.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function H7(e){const{theme:t,colorScheme:n}=e,r=z0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Nee=Gv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[yu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[yu.variable]:n.dark}}}}),Dee=Gv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[yu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[yu.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:la.reference}}}),zee=Gv(e=>{const{colorScheme:t}=e,n=H7(e);return{container:{[la.variable]:`colors.${t}.500`,[yu.variable]:n.light,_dark:{[la.variable]:`colors.${t}.200`,[yu.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:la.reference}}}),Fee=Gv(e=>{const{colorScheme:t}=e;return{container:{[la.variable]:"colors.white",[yu.variable]:`colors.${t}.500`,_dark:{[la.variable]:"colors.gray.900",[yu.variable]:`colors.${t}.200`},color:la.reference}}}),Bee={subtle:Nee,"left-accent":Dee,"top-accent":zee,solid:Fee},$ee=Ree({baseStyle:Iee,variants:Bee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),PN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Hee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Wee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Vee={...PN,...Hee,container:Wee},TN=Vee,Uee=e=>typeof e=="function";function fi(e,...t){return Uee(e)?e(...t):e}var{definePartsStyle:AN,defineMultiStyleConfig:Gee}=rr(kJ.keys),l0=ei("avatar-border-color"),Cx=ei("avatar-bg"),jee={borderRadius:"full",border:"0.2em solid",[l0.variable]:"white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference},Yee={[Cx.variable]:"colors.gray.200",_dark:{[Cx.variable]:"colors.whiteAlpha.400"},bgColor:Cx.reference},JP=ei("avatar-background"),qee=e=>{const{name:t,theme:n}=e,r=t?pee({string:t}):"colors.gray.400",i=hee(r)(n);let o="white";return i||(o="gray.800"),{bg:JP.reference,"&:not([data-loaded])":{[JP.variable]:r},color:o,[l0.variable]:"colors.white",_dark:{[l0.variable]:"colors.gray.800"},borderColor:l0.reference,verticalAlign:"top"}},Kee=AN(e=>({badge:fi(jee,e),excessLabel:fi(Yee,e),container:fi(qee,e)}));function xc(e){const t=e!=="100%"?TN[e]:void 0;return AN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Xee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},Zee=Gee({baseStyle:Kee,sizes:Xee,defaultProps:{size:"md"}}),Qee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},u0=ei("badge-bg"),yl=ei("badge-color"),Jee=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.500`,.6)(n);return{[u0.variable]:`colors.${t}.500`,[yl.variable]:"colors.white",_dark:{[u0.variable]:r,[yl.variable]:"colors.whiteAlpha.800"},bg:u0.reference,color:yl.reference}},ete=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.16)(n);return{[u0.variable]:`colors.${t}.100`,[yl.variable]:`colors.${t}.800`,_dark:{[u0.variable]:r,[yl.variable]:`colors.${t}.200`},bg:u0.reference,color:yl.reference}},tte=e=>{const{colorScheme:t,theme:n}=e,r=z0(`${t}.200`,.8)(n);return{[yl.variable]:`colors.${t}.500`,_dark:{[yl.variable]:r},color:yl.reference,boxShadow:`inset 0 0 0px 1px ${yl.reference}`}},nte={solid:Jee,subtle:ete,outline:tte},Tm={baseStyle:Qee,variants:nte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:rte,definePartsStyle:ite}=rr(EJ.keys),ote={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},ate=ite({link:ote}),ste=rte({baseStyle:ate}),lte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},LN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=z0(`${t}.200`,.12)(n),i=z0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},ute=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...fi(LN,e)}},cte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},dte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=cte[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},fte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},hte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},pte={ghost:LN,outline:ute,solid:dte,link:fte,unstyled:hte},gte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},mte={baseStyle:lte,variants:pte,sizes:gte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:L3,defineMultiStyleConfig:vte}=rr(PJ.keys),Am=ei("checkbox-size"),yte=e=>{const{colorScheme:t}=e;return{w:Am.reference,h:Am.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Ste={_disabled:{cursor:"not-allowed"}},bte={userSelect:"none",_disabled:{opacity:.4}},xte={transitionProperty:"transform",transitionDuration:"normal"},wte=L3(e=>({icon:xte,container:Ste,control:fi(yte,e),label:bte})),Cte={sm:L3({control:{[Am.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:L3({control:{[Am.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:L3({control:{[Am.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},L5=vte({baseStyle:wte,sizes:Cte,defaultProps:{size:"md",colorScheme:"blue"}}),Lm=Vi("close-button-size"),Ig=Vi("close-button-bg"),_te={w:[Lm.reference],h:[Lm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Ig.variable]:"colors.blackAlpha.100",_dark:{[Ig.variable]:"colors.whiteAlpha.100"}},_active:{[Ig.variable]:"colors.blackAlpha.200",_dark:{[Ig.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Ig.reference},kte={lg:{[Lm.variable]:"sizes.10",fontSize:"md"},md:{[Lm.variable]:"sizes.8",fontSize:"xs"},sm:{[Lm.variable]:"sizes.6",fontSize:"2xs"}},Ete={baseStyle:_te,sizes:kte,defaultProps:{size:"md"}},{variants:Pte,defaultProps:Tte}=Tm,Ate={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Lte={baseStyle:Ate,variants:Pte,defaultProps:Tte},Mte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Ote={baseStyle:Mte},Rte={opacity:.6,borderColor:"inherit"},Ite={borderStyle:"solid"},Nte={borderStyle:"dashed"},Dte={solid:Ite,dashed:Nte},zte={baseStyle:Rte,variants:Dte,defaultProps:{variant:"solid"}},{definePartsStyle:G6,defineMultiStyleConfig:Fte}=rr(TJ.keys),_x=ei("drawer-bg"),kx=ei("drawer-box-shadow");function vp(e){return G6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Bte={bg:"blackAlpha.600",zIndex:"overlay"},$te={display:"flex",zIndex:"modal",justifyContent:"center"},Hte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[_x.variable]:"colors.white",[kx.variable]:"shadows.lg",_dark:{[_x.variable]:"colors.gray.700",[kx.variable]:"shadows.dark-lg"},bg:_x.reference,boxShadow:kx.reference}},Wte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Vte={position:"absolute",top:"2",insetEnd:"3"},Ute={px:"6",py:"2",flex:"1",overflow:"auto"},Gte={px:"6",py:"4"},jte=G6(e=>({overlay:Bte,dialogContainer:$te,dialog:fi(Hte,e),header:Wte,closeButton:Vte,body:Ute,footer:Gte})),Yte={xs:vp("xs"),sm:vp("md"),md:vp("lg"),lg:vp("2xl"),xl:vp("4xl"),full:vp("full")},qte=Fte({baseStyle:jte,sizes:Yte,defaultProps:{size:"xs"}}),{definePartsStyle:Kte,defineMultiStyleConfig:Xte}=rr(AJ.keys),Zte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Qte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Jte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},ene=Kte({preview:Zte,input:Qte,textarea:Jte}),tne=Xte({baseStyle:ene}),{definePartsStyle:nne,defineMultiStyleConfig:rne}=rr(LJ.keys),c0=ei("form-control-color"),ine={marginStart:"1",[c0.variable]:"colors.red.500",_dark:{[c0.variable]:"colors.red.300"},color:c0.reference},one={mt:"2",[c0.variable]:"colors.gray.600",_dark:{[c0.variable]:"colors.whiteAlpha.600"},color:c0.reference,lineHeight:"normal",fontSize:"sm"},ane=nne({container:{width:"100%",position:"relative"},requiredIndicator:ine,helperText:one}),sne=rne({baseStyle:ane}),{definePartsStyle:lne,defineMultiStyleConfig:une}=rr(MJ.keys),d0=ei("form-error-color"),cne={[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},dne={marginEnd:"0.5em",[d0.variable]:"colors.red.500",_dark:{[d0.variable]:"colors.red.300"},color:d0.reference},fne=lne({text:cne,icon:dne}),hne=une({baseStyle:fne}),pne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},gne={baseStyle:pne},mne={fontFamily:"heading",fontWeight:"bold"},vne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},yne={baseStyle:mne,sizes:vne,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Sne}=rr(OJ.keys),bne=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),wc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},xne={lg:du({field:wc.lg,addon:wc.lg}),md:du({field:wc.md,addon:wc.md}),sm:du({field:wc.sm,addon:wc.sm}),xs:du({field:wc.xs,addon:wc.xs})};function W7(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var wne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ti(t,r),boxShadow:`0 0 0 1px ${Ti(t,r)}`},_focusVisible:{zIndex:1,borderColor:Ti(t,n),boxShadow:`0 0 0 1px ${Ti(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Cne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ti(t,r)},_focusVisible:{bg:"transparent",borderColor:Ti(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),_ne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=W7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Ti(t,r),boxShadow:`0px 1px 0px 0px ${Ti(t,r)}`},_focusVisible:{borderColor:Ti(t,n),boxShadow:`0px 1px 0px 0px ${Ti(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),kne=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Ene={outline:wne,filled:Cne,flushed:_ne,unstyled:kne},pn=Sne({baseStyle:bne,sizes:xne,variants:Ene,defaultProps:{size:"md",variant:"outline"}}),Pne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Tne={baseStyle:Pne},Ane={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Lne={baseStyle:Ane},{defineMultiStyleConfig:Mne,definePartsStyle:One}=rr(RJ.keys),Rne={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Ine=One({icon:Rne}),Nne=Mne({baseStyle:Ine}),{defineMultiStyleConfig:Dne,definePartsStyle:zne}=rr(IJ.keys),Fne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Bne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),$ne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Hne={opacity:.6},Wne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Vne={transitionProperty:"common",transitionDuration:"normal"},Une=zne(e=>({button:Vne,list:fi(Fne,e),item:fi(Bne,e),groupTitle:$ne,command:Hne,divider:Wne})),Gne=Dne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:j6}=rr(NJ.keys),Yne={bg:"blackAlpha.600",zIndex:"modal"},qne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Kne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},Xne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Zne={position:"absolute",top:"2",insetEnd:"3"},Qne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Jne={px:"6",py:"4"},ere=j6(e=>({overlay:Yne,dialogContainer:fi(qne,e),dialog:fi(Kne,e),header:Xne,closeButton:Zne,body:fi(Qne,e),footer:Jne}));function us(e){return j6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var tre={xs:us("xs"),sm:us("sm"),md:us("md"),lg:us("lg"),xl:us("xl"),"2xl":us("2xl"),"3xl":us("3xl"),"4xl":us("4xl"),"5xl":us("5xl"),"6xl":us("6xl"),full:us("full")},nre=jne({baseStyle:ere,sizes:tre,defaultProps:{size:"md"}}),rre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},MN=rre,{defineMultiStyleConfig:ire,definePartsStyle:ON}=rr(DJ.keys),V7=Vi("number-input-stepper-width"),RN=Vi("number-input-input-padding"),ore=lu(V7).add("0.5rem").toString(),are={[V7.variable]:"sizes.6",[RN.variable]:ore},sre=e=>{var t;return((t=fi(pn.baseStyle,e))==null?void 0:t.field)??{}},lre={width:[V7.reference]},ure=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),cre=ON(e=>({root:are,field:fi(sre,e)??{},stepperGroup:lre,stepper:fi(ure,e)??{}}));function _y(e){var t,n;const r=(t=pn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=MN.fontSizes[o];return ON({field:{...r.field,paddingInlineEnd:RN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var dre={xs:_y("xs"),sm:_y("sm"),md:_y("md"),lg:_y("lg")},fre=ire({baseStyle:cre,sizes:dre,variants:pn.variants,defaultProps:pn.defaultProps}),eT,hre={...(eT=pn.baseStyle)==null?void 0:eT.field,textAlign:"center"},pre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},tT,gre={outline:e=>{var t,n;return((n=fi((t=pn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=fi((t=pn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=fi((t=pn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((tT=pn.variants)==null?void 0:tT.unstyled.field)??{}},mre={baseStyle:hre,sizes:pre,variants:gre,defaultProps:pn.defaultProps},{defineMultiStyleConfig:vre,definePartsStyle:yre}=rr(zJ.keys),ky=Vi("popper-bg"),Sre=Vi("popper-arrow-bg"),nT=Vi("popper-arrow-shadow-color"),bre={zIndex:10},xre={[ky.variable]:"colors.white",bg:ky.reference,[Sre.variable]:ky.reference,[nT.variable]:"colors.gray.200",_dark:{[ky.variable]:"colors.gray.700",[nT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},wre={px:3,py:2,borderBottomWidth:"1px"},Cre={px:3,py:2},_re={px:3,py:2,borderTopWidth:"1px"},kre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Ere=yre({popper:bre,content:xre,header:wre,body:Cre,footer:_re,closeButton:kre}),Pre=vre({baseStyle:Ere}),{defineMultiStyleConfig:Tre,definePartsStyle:rm}=rr(FJ.keys),Are=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(qP(),qP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( + to right, + transparent 0%, + ${Ti(n,a)} 50%, + transparent 100% + )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Lre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Mre=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),Ore=e=>({transitionProperty:"common",transitionDuration:"slow",...Are(e)}),Rre=rm(e=>({label:Lre,filledTrack:Ore(e),track:Mre(e)})),Ire={xs:rm({track:{h:"1"}}),sm:rm({track:{h:"2"}}),md:rm({track:{h:"3"}}),lg:rm({track:{h:"4"}})},Nre=Tre({sizes:Ire,baseStyle:Rre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Dre,definePartsStyle:M3}=rr(BJ.keys),zre=e=>{var t;const n=(t=fi(L5.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Fre=M3(e=>{var t,n,r,i;return{label:(n=(t=L5).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=L5).baseStyle)==null?void 0:i.call(r,e).container,control:zre(e)}}),Bre={md:M3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:M3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:M3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},$re=Dre({baseStyle:Fre,sizes:Bre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Hre,definePartsStyle:Wre}=rr($J.keys),Vre=e=>{var t;return{...(t=pn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},Ure={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Gre=Wre(e=>({field:Vre(e),icon:Ure})),Ey={paddingInlineEnd:"8"},rT,iT,oT,aT,sT,lT,uT,cT,jre={lg:{...(rT=pn.sizes)==null?void 0:rT.lg,field:{...(iT=pn.sizes)==null?void 0:iT.lg.field,...Ey}},md:{...(oT=pn.sizes)==null?void 0:oT.md,field:{...(aT=pn.sizes)==null?void 0:aT.md.field,...Ey}},sm:{...(sT=pn.sizes)==null?void 0:sT.sm,field:{...(lT=pn.sizes)==null?void 0:lT.sm.field,...Ey}},xs:{...(uT=pn.sizes)==null?void 0:uT.xs,field:{...(cT=pn.sizes)==null?void 0:cT.xs.field,...Ey},icon:{insetEnd:"1"}}},Yre=Hre({baseStyle:Gre,sizes:jre,variants:pn.variants,defaultProps:pn.defaultProps}),qre=ei("skeleton-start-color"),Kre=ei("skeleton-end-color"),Xre=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Ti(o,r),s=Ti(o,i);return{[qre.variable]:a,[Kre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Zre={baseStyle:Xre},Ex=ei("skip-link-bg"),Qre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Ex.variable]:"colors.white",_dark:{[Ex.variable]:"colors.gray.700"},bg:Ex.reference}},Jre={baseStyle:Qre},{defineMultiStyleConfig:eie,definePartsStyle:tS}=rr(HJ.keys),mv=ei("slider-thumb-size"),vv=ei("slider-track-size"),Mc=ei("slider-bg"),tie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...$7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},nie=e=>({...$7({orientation:e.orientation,horizontal:{h:vv.reference},vertical:{w:vv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),rie=e=>{const{orientation:t}=e;return{...$7({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:mv.reference,h:mv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},iie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},oie=tS(e=>({container:tie(e),track:nie(e),thumb:rie(e),filledTrack:iie(e)})),aie=tS({container:{[mv.variable]:"sizes.4",[vv.variable]:"sizes.1"}}),sie=tS({container:{[mv.variable]:"sizes.3.5",[vv.variable]:"sizes.1"}}),lie=tS({container:{[mv.variable]:"sizes.2.5",[vv.variable]:"sizes.0.5"}}),uie={lg:aie,md:sie,sm:lie},cie=eie({baseStyle:oie,sizes:uie,defaultProps:{size:"md",colorScheme:"blue"}}),_f=Vi("spinner-size"),die={width:[_f.reference],height:[_f.reference]},fie={xs:{[_f.variable]:"sizes.3"},sm:{[_f.variable]:"sizes.4"},md:{[_f.variable]:"sizes.6"},lg:{[_f.variable]:"sizes.8"},xl:{[_f.variable]:"sizes.12"}},hie={baseStyle:die,sizes:fie,defaultProps:{size:"md"}},{defineMultiStyleConfig:pie,definePartsStyle:IN}=rr(WJ.keys),gie={fontWeight:"medium"},mie={opacity:.8,marginBottom:"2"},vie={verticalAlign:"baseline",fontWeight:"semibold"},yie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Sie=IN({container:{},label:gie,helpText:mie,number:vie,icon:yie}),bie={md:IN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},xie=pie({baseStyle:Sie,sizes:bie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:wie,definePartsStyle:O3}=rr(VJ.keys),Mm=Vi("switch-track-width"),$f=Vi("switch-track-height"),Px=Vi("switch-track-diff"),Cie=lu.subtract(Mm,$f),Y6=Vi("switch-thumb-x"),Ng=Vi("switch-bg"),_ie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Mm.reference],height:[$f.reference],transitionProperty:"common",transitionDuration:"fast",[Ng.variable]:"colors.gray.300",_dark:{[Ng.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Ng.variable]:`colors.${t}.500`,_dark:{[Ng.variable]:`colors.${t}.200`}},bg:Ng.reference}},kie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[$f.reference],height:[$f.reference],_checked:{transform:`translateX(${Y6.reference})`}},Eie=O3(e=>({container:{[Px.variable]:Cie,[Y6.variable]:Px.reference,_rtl:{[Y6.variable]:lu(Px).negate().toString()}},track:_ie(e),thumb:kie})),Pie={sm:O3({container:{[Mm.variable]:"1.375rem",[$f.variable]:"sizes.3"}}),md:O3({container:{[Mm.variable]:"1.875rem",[$f.variable]:"sizes.4"}}),lg:O3({container:{[Mm.variable]:"2.875rem",[$f.variable]:"sizes.6"}})},Tie=wie({baseStyle:Eie,sizes:Pie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Aie,definePartsStyle:f0}=rr(UJ.keys),Lie=f0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),M5={"&[data-is-numeric=true]":{textAlign:"end"}},Mie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Oie=f0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...M5},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Rie={simple:Mie,striped:Oie,unstyled:{}},Iie={sm:f0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:f0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:f0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Nie=Aie({baseStyle:Lie,variants:Rie,sizes:Iie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:Die,definePartsStyle:wl}=rr(GJ.keys),zie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Fie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Bie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},$ie={p:4},Hie=wl(e=>({root:zie(e),tab:Fie(e),tablist:Bie(e),tabpanel:$ie})),Wie={sm:wl({tab:{py:1,px:4,fontSize:"sm"}}),md:wl({tab:{fontSize:"md",py:2,px:4}}),lg:wl({tab:{fontSize:"lg",py:3,px:4}})},Vie=wl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),Uie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Gie=wl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),jie=wl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Ti(n,`${t}.700`),bg:Ti(n,`${t}.100`)}}}}),Yie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),qie=wl({}),Kie={line:Vie,enclosed:Uie,"enclosed-colored":Gie,"soft-rounded":jie,"solid-rounded":Yie,unstyled:qie},Xie=Die({baseStyle:Hie,sizes:Wie,variants:Kie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Zie,definePartsStyle:Hf}=rr(jJ.keys),Qie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Jie={lineHeight:1.2,overflow:"visible"},eoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},toe=Hf({container:Qie,label:Jie,closeButton:eoe}),noe={sm:Hf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Hf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},roe={subtle:Hf(e=>{var t;return{container:(t=Tm.variants)==null?void 0:t.subtle(e)}}),solid:Hf(e=>{var t;return{container:(t=Tm.variants)==null?void 0:t.solid(e)}}),outline:Hf(e=>{var t;return{container:(t=Tm.variants)==null?void 0:t.outline(e)}})},ioe=Zie({variants:roe,baseStyle:toe,sizes:noe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),dT,ooe={...(dT=pn.baseStyle)==null?void 0:dT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},fT,aoe={outline:e=>{var t;return((t=pn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=pn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=pn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((fT=pn.variants)==null?void 0:fT.unstyled.field)??{}},hT,pT,gT,mT,soe={xs:((hT=pn.sizes)==null?void 0:hT.xs.field)??{},sm:((pT=pn.sizes)==null?void 0:pT.sm.field)??{},md:((gT=pn.sizes)==null?void 0:gT.md.field)??{},lg:((mT=pn.sizes)==null?void 0:mT.lg.field)??{}},loe={baseStyle:ooe,sizes:soe,variants:aoe,defaultProps:{size:"md",variant:"outline"}},Py=Vi("tooltip-bg"),Tx=Vi("tooltip-fg"),uoe=Vi("popper-arrow-bg"),coe={bg:Py.reference,color:Tx.reference,[Py.variable]:"colors.gray.700",[Tx.variable]:"colors.whiteAlpha.900",_dark:{[Py.variable]:"colors.gray.300",[Tx.variable]:"colors.gray.900"},[uoe.variable]:Py.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},doe={baseStyle:coe},foe={Accordion:Oee,Alert:$ee,Avatar:Zee,Badge:Tm,Breadcrumb:ste,Button:mte,Checkbox:L5,CloseButton:Ete,Code:Lte,Container:Ote,Divider:zte,Drawer:qte,Editable:tne,Form:sne,FormError:hne,FormLabel:gne,Heading:yne,Input:pn,Kbd:Tne,Link:Lne,List:Nne,Menu:Gne,Modal:nre,NumberInput:fre,PinInput:mre,Popover:Pre,Progress:Nre,Radio:$re,Select:Yre,Skeleton:Zre,SkipLink:Jre,Slider:cie,Spinner:hie,Stat:xie,Switch:Tie,Table:Nie,Tabs:Xie,Tag:ioe,Textarea:loe,Tooltip:doe},hoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},poe=hoe,goe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},moe=goe,voe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},yoe=voe,Soe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},boe=Soe,xoe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},woe=xoe,Coe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},_oe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},koe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Eoe={property:Coe,easing:_oe,duration:koe},Poe=Eoe,Toe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Aoe=Toe,Loe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Moe=Loe,Ooe={breakpoints:moe,zIndices:Aoe,radii:boe,blur:Moe,colors:yoe,...MN,sizes:TN,shadows:woe,space:PN,borders:poe,transition:Poe},Roe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Ioe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Noe="ltr",Doe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},zoe={semanticTokens:Roe,direction:Noe,...Ooe,components:foe,styles:Ioe,config:Doe},Foe=typeof Element<"u",Boe=typeof Map=="function",$oe=typeof Set=="function",Hoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function R3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!R3(e[r],t[r]))return!1;return!0}var o;if(Boe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!R3(r.value[1],t.get(r.value[0])))return!1;return!0}if($oe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Hoe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(Foe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!R3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Woe=function(t,n){try{return R3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function n1(){const e=C.exports.useContext(pv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function NN(){const e=Wv(),t=n1();return{...e,theme:t}}function Voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Uoe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Goe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Voe(o,l,a[u]??l);const h=`${e}.${l}`;return Uoe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function joe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>UZ(n),[n]);return re(JQ,{theme:i,children:[x(Yoe,{root:t}),r]})}function Yoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Q4,{styles:n=>({[t]:n.__cssVars})})}gJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function qoe(){const{colorMode:e}=Wv();return x(Q4,{styles:t=>{const n=mN(t,"styles.global"),r=SN(n,{theme:t,colorMode:e});return r?YI(r)(t):void 0}})}var Koe=new Set([...YZ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Xoe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Zoe(e){return Xoe.has(e)||!Koe.has(e)}var Qoe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=vN(a,(p,m)=>KZ(m)),l=SN(e,t),u=Object.assign({},i,l,yN(s),o),h=YI(u)(t.theme);return r?[h,r]:h};function Ax(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Zoe);const i=Qoe({baseStyle:n}),o=W6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Wv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function DN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=NN(),a=e?mN(i,`components.${e}`):void 0,s=n||a,l=vl({theme:i,colorMode:o},s?.defaultProps??{},yN(uJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=oQ(s)(l);Woe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return DN(e,t)}function Ri(e,t={}){return DN(e,t)}function Joe(){const e=new Map;return new Proxy(Ax,{apply(t,n,r){return Ax(...r)},get(t,n){return e.has(n)||e.set(n,Ax(n)),e.get(n)}})}var we=Joe();function eae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??eae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function tae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function Bn(...e){return t=>{e.forEach(n=>{tae(n,t)})}}function nae(...e){return C.exports.useMemo(()=>Bn(...e),e)}function vT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var rae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function yT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function ST(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var q6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,O5=e=>e,iae=class{descendants=new Map;register=e=>{if(e!=null)return rae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=vT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=yT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=yT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=ST(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=ST(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=vT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function oae(){const e=C.exports.useRef(new iae);return q6(()=>()=>e.current.destroy()),e.current}var[aae,zN]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function sae(e){const t=zN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);q6(()=>()=>{!i.current||t.unregister(i.current)},[]),q6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=O5(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:Bn(o,i)}}function FN(){return[O5(aae),()=>O5(zN()),()=>oae(),i=>sae(i)]}var Rr=(...e)=>e.filter(Boolean).join(" "),bT={path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ma=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Rr("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??bT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??bT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ma.displayName="Icon";function ut(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ma,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function nS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const U7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),rS=C.exports.createContext({});function lae(){return C.exports.useContext(rS).visualElement}const r1=C.exports.createContext(null),ah=typeof document<"u",R5=ah?C.exports.useLayoutEffect:C.exports.useEffect,BN=C.exports.createContext({strict:!1});function uae(e,t,n,r){const i=lae(),o=C.exports.useContext(BN),a=C.exports.useContext(r1),s=C.exports.useContext(U7).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return R5(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),R5(()=>()=>u&&u.notifyUnmount(),[]),u}function jp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):jp(n)&&(n.current=r))},[t])}function yv(e){return typeof e=="string"||Array.isArray(e)}function iS(e){return typeof e=="object"&&typeof e.start=="function"}const dae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function oS(e){return iS(e.animate)||dae.some(t=>yv(e[t]))}function $N(e){return Boolean(oS(e)||e.variants)}function fae(e,t){if(oS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||yv(n)?n:void 0,animate:yv(r)?r:void 0}}return e.inherit!==!1?t:{}}function hae(e){const{initial:t,animate:n}=fae(e,C.exports.useContext(rS));return C.exports.useMemo(()=>({initial:t,animate:n}),[xT(t),xT(n)])}function xT(e){return Array.isArray(e)?e.join(" "):e}const ru=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Sv={measureLayout:ru(["layout","layoutId","drag"]),animation:ru(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ru(["exit"]),drag:ru(["drag","dragControls"]),focus:ru(["whileFocus"]),hover:ru(["whileHover","onHoverStart","onHoverEnd"]),tap:ru(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ru(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ru(["whileInView","onViewportEnter","onViewportLeave"])};function pae(e){for(const t in e)t==="projectionNodeConstructor"?Sv.projectionNodeConstructor=e[t]:Sv[t].Component=e[t]}function aS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Om={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let gae=1;function mae(){return aS(()=>{if(Om.hasEverUpdated)return gae++})}const G7=C.exports.createContext({});class vae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const HN=C.exports.createContext({}),yae=Symbol.for("motionComponentSymbol");function Sae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&pae(e);function a(l,u){const h={...C.exports.useContext(U7),...l,layoutId:bae(l)},{isStatic:p}=h;let m=null;const v=hae(l),S=p?void 0:mae(),w=i(l,p);if(!p&&ah){v.visualElement=uae(o,w,h,t);const E=C.exports.useContext(BN).strict,P=C.exports.useContext(HN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||Sv.projectionNodeConstructor,P))}return re(vae,{visualElement:v.visualElement,props:h,children:[m,x(rS.Provider,{value:v,children:r(o,l,S,cae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[yae]=o,s}function bae({layoutId:e}){const t=C.exports.useContext(G7).id;return t&&e!==void 0?t+"-"+e:e}function xae(e){function t(r,i={}){return Sae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const wae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function j7(e){return typeof e!="string"||e.includes("-")?!1:!!(wae.indexOf(e)>-1||/[A-Z]/.test(e))}const I5={};function Cae(e){Object.assign(I5,e)}const N5=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jv=new Set(N5);function WN(e,{layout:t,layoutId:n}){return jv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!I5[e]||e==="opacity")}const ws=e=>!!e?.getVelocity,_ae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kae=(e,t)=>N5.indexOf(e)-N5.indexOf(t);function Eae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(kae);for(const s of t)a+=`${_ae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function VN(e){return e.startsWith("--")}const Pae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,UN=(e,t)=>n=>Math.max(Math.min(n,t),e),Rm=e=>e%1?Number(e.toFixed(5)):e,bv=/(-)?([\d]*\.?[\d])+/g,K6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Yv(e){return typeof e=="string"}const sh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Im=Object.assign(Object.assign({},sh),{transform:UN(0,1)}),Ty=Object.assign(Object.assign({},sh),{default:1}),qv=e=>({test:t=>Yv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=qv("deg"),Cl=qv("%"),wt=qv("px"),Aae=qv("vh"),Lae=qv("vw"),wT=Object.assign(Object.assign({},Cl),{parse:e=>Cl.parse(e)/100,transform:e=>Cl.transform(e*100)}),Y7=(e,t)=>n=>Boolean(Yv(n)&&Tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),GN=(e,t,n)=>r=>{if(!Yv(r))return r;const[i,o,a,s]=r.match(bv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:Y7("hsl","hue"),parse:GN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cl.transform(Rm(t))+", "+Cl.transform(Rm(n))+", "+Rm(Im.transform(r))+")"},Mae=UN(0,255),Lx=Object.assign(Object.assign({},sh),{transform:e=>Math.round(Mae(e))}),zc={test:Y7("rgb","red"),parse:GN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Lx.transform(e)+", "+Lx.transform(t)+", "+Lx.transform(n)+", "+Rm(Im.transform(r))+")"};function Oae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const X6={test:Y7("#"),parse:Oae,transform:zc.transform},Ji={test:e=>zc.test(e)||X6.test(e)||Of.test(e),parse:e=>zc.test(e)?zc.parse(e):Of.test(e)?Of.parse(e):X6.parse(e),transform:e=>Yv(e)?e:e.hasOwnProperty("red")?zc.transform(e):Of.transform(e)},jN="${c}",YN="${n}";function Rae(e){var t,n,r,i;return isNaN(e)&&Yv(e)&&((n=(t=e.match(bv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(K6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function qN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(K6);r&&(n=r.length,e=e.replace(K6,jN),t.push(...r.map(Ji.parse)));const i=e.match(bv);return i&&(e=e.replace(bv,YN),t.push(...i.map(sh.parse))),{values:t,numColors:n,tokenised:e}}function KN(e){return qN(e).values}function XN(e){const{values:t,numColors:n,tokenised:r}=qN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Nae(e){const t=KN(e);return XN(e)(t.map(Iae))}const Su={test:Rae,parse:KN,createTransformer:XN,getAnimatableNone:Nae},Dae=new Set(["brightness","contrast","saturate","opacity"]);function zae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(bv)||[];if(!r)return e;const i=n.replace(r,"");let o=Dae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Fae=/([a-z-]*)\(.*?\)/g,Z6=Object.assign(Object.assign({},Su),{getAnimatableNone:e=>{const t=e.match(Fae);return t?t.map(zae).join(" "):e}}),CT={...sh,transform:Math.round},ZN={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:Ty,scaleX:Ty,scaleY:Ty,scaleZ:Ty,skew:Cc,skewX:Cc,skewY:Cc,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Im,originX:wT,originY:wT,originZ:wt,zIndex:CT,fillOpacity:Im,strokeOpacity:Im,numOctaves:CT};function q7(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(VN(m)){o[m]=v;continue}const S=ZN[m],w=Pae(v,S);if(jv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Eae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const K7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function QN(e,t,n){for(const r in t)!ws(t[r])&&!WN(r,n)&&(e[r]=t[r])}function Bae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=K7();return q7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function $ae(e,t,n){const r=e.style||{},i={};return QN(i,r,e),Object.assign(i,Bae(e,t,n)),e.transformValues?e.transformValues(i):i}function Hae(e,t,n){const r={},i=$ae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Wae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Vae=["whileTap","onTap","onTapStart","onTapCancel"],Uae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Gae=["whileInView","onViewportEnter","onViewportLeave","viewport"],jae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Gae,...Vae,...Wae,...Uae]);function D5(e){return jae.has(e)}let JN=e=>!D5(e);function Yae(e){!e||(JN=t=>t.startsWith("on")?!D5(t):e(t))}try{Yae(require("@emotion/is-prop-valid").default)}catch{}function qae(e,t,n){const r={};for(const i in e)(JN(i)||n===!0&&D5(i)||!t&&!D5(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function _T(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Kae(e,t,n){const r=_T(t,e.x,e.width),i=_T(n,e.y,e.height);return`${r} ${i}`}const Xae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zae={offset:"strokeDashoffset",array:"strokeDasharray"};function Qae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Xae:Zae;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function X7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){q7(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Kae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&Qae(p,o,a,s,!1)}const eD=()=>({...K7(),attrs:{}});function Jae(e,t){const n=C.exports.useMemo(()=>{const r=eD();return X7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};QN(r,e.style,e),n.style={...r,...n.style}}return n}function ese(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(j7(n)?Jae:Hae)(r,a,s),p={...qae(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const tD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function nD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const rD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function iD(e,t,n,r){nD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(rD.has(i)?i:tD(i),t.attrs[i])}function Z7(e){const{style:t}=e,n={};for(const r in t)(ws(t[r])||WN(r,e))&&(n[r]=t[r]);return n}function oD(e){const t=Z7(e);for(const n in e)if(ws(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function Q7(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const xv=e=>Array.isArray(e),tse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),aD=e=>xv(e)?e[e.length-1]||0:e;function I3(e){const t=ws(e)?e.get():e;return tse(t)?t.toValue():t}function nse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:rse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const sD=e=>(t,n)=>{const r=C.exports.useContext(rS),i=C.exports.useContext(r1),o=()=>nse(e,t,r,i);return n?o():aS(o)};function rse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=I3(o[m]);let{initial:a,animate:s}=e;const l=oS(e),u=$N(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!iS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=Q7(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const ise={useVisualState:sD({scrapeMotionValuesFromProps:oD,createRenderState:eD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}X7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),iD(t,n)}})},ose={useVisualState:sD({scrapeMotionValuesFromProps:Z7,createRenderState:K7})};function ase(e,{forwardMotionProps:t=!1},n,r,i){return{...j7(e)?ise:ose,preloadedFeatures:n,useRender:ese(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function sS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Q6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return sS(i,t,n,r)},[e,t,n,r])}function sse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};Q6(t,"focus",e?r:void 0),Q6(t,"blur",e?i:void 0)}function lD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function uD(e){return!!e.touches}function lse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const use={pageX:0,pageY:0};function cse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||use;return{x:r[t+"X"],y:r[t+"Y"]}}function dse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function J7(e,t="page"){return{point:uD(e)?cse(e,t):dse(e,t)}}const cD=(e,t=!1)=>{const n=r=>e(r,J7(r));return t?lse(n):n},fse=()=>ah&&window.onpointerdown===null,hse=()=>ah&&window.ontouchstart===null,pse=()=>ah&&window.onmousedown===null,gse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},mse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function dD(e){return fse()?e:hse()?mse[e]:pse()?gse[e]:e}function h0(e,t,n,r){return sS(e,dD(t),cD(n,t==="pointerdown"),r)}function z5(e,t,n,r){return Q6(e,dD(t),n&&cD(n,t==="pointerdown"),r)}function fD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kT=fD("dragHorizontal"),ET=fD("dragVertical");function hD(e){let t=!1;if(e==="y")t=ET();else if(e==="x")t=kT();else{const n=kT(),r=ET();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function pD(){const e=hD(!0);return e?(e(),!1):!0}function PT(e,t,n){return(r,i)=>{!lD(r)||pD()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function vse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){z5(r,"pointerenter",e||n?PT(r,!0,e):void 0,{passive:!e}),z5(r,"pointerleave",t||n?PT(r,!1,t):void 0,{passive:!t})}const gD=(e,t)=>t?e===t?!0:gD(e,t.parentElement):!1;function e8(e){return C.exports.useEffect(()=>()=>e(),[])}function mD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Mx=.001,Sse=.01,TT=10,bse=.05,xse=1;function wse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yse(e<=TT*1e3);let a=1-t;a=B5(bse,xse,a),e=B5(Sse,TT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=J6(u,a),S=Math.exp(-p);return Mx-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=J6(Math.pow(u,2),a);return(-i(u)+Mx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Mx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=_se(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Cse=12;function _se(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Pse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!AT(e,Ese)&&AT(e,kse)){const n=wse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function t8(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=mD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=Pse(o),v=LT,S=LT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=J6(T,k);v=R=>{const I=Math.exp(-k*T*R);return n-I*((E+k*T*P)/M*Math.sin(M*R)+P*Math.cos(M*R))},S=R=>{const I=Math.exp(-k*T*R);return k*T*I*(Math.sin(M*R)*(E+k*T*P)/M+P*Math.cos(M*R))-I*(Math.cos(M*R)*(E+k*T*P)-M*P*Math.sin(M*R))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=R=>{const I=Math.exp(-k*T*R),N=Math.min(M*R,300);return n-I*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=p;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}t8.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const LT=e=>0,wv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ox(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Ox(l,s,e+1/3),o=Ox(l,s,e),a=Ox(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Ase=[X6,zc,Of],OT=e=>Ase.find(t=>t.test(e)),vD=(e,t)=>{let n=OT(e),r=OT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=MT(i),n=zc),r===Of&&(o=MT(o),r=zc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Tse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},eC=e=>typeof e=="number",Lse=(e,t)=>n=>t(e(n)),lS=(...e)=>e.reduce(Lse);function yD(e,t){return eC(e)?n=>wr(e,t,n):Ji.test(e)?vD(e,t):bD(e,t)}const SD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>yD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=yD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function RT(e){const t=Su.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=Su.createTransformer(t),r=RT(e),i=RT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?lS(SD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Ose=(e,t)=>n=>wr(e,t,n);function Rse(e){if(typeof e=="number")return Ose;if(typeof e=="string")return Ji.test(e)?vD:bD;if(Array.isArray(e))return SD;if(typeof e=="object")return Mse}function Ise(e,t,n){const r=[],i=n||Rse(e[0]),o=e.length-1;for(let a=0;an(wv(e,t,r))}function Dse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=wv(e[o],e[o+1],i);return t[o](s)}}function xD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;F5(o===t.length),F5(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Ise(t,r,i),s=o===2?Nse(e,a):Dse(e,a);return n?l=>s(B5(e[0],e[o-1],l)):s}const uS=e=>t=>1-e(1-t),n8=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zse=e=>t=>Math.pow(t,e),wD=e=>t=>t*t*((e+1)*t-e),Fse=e=>{const t=wD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},CD=1.525,Bse=4/11,$se=8/11,Hse=9/10,r8=e=>e,i8=zse(2),Wse=uS(i8),_D=n8(i8),kD=e=>1-Math.sin(Math.acos(e)),o8=uS(kD),Vse=n8(o8),a8=wD(CD),Use=uS(a8),Gse=n8(a8),jse=Fse(CD),Yse=4356/361,qse=35442/1805,Kse=16061/1805,$5=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-$5(1-e*2)):.5*$5(e*2-1)+.5;function Qse(e,t){return e.map(()=>t||_D).splice(0,e.length-1)}function Jse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function ele(e,t){return e.map(n=>n*t)}function N3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=ele(r&&r.length===a.length?r:Jse(a),i);function l(){return xD(s,a,{ease:Array.isArray(n)?n:Qse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function tle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const IT={keyframes:N3,spring:t8,decay:tle};function nle(e){if(Array.isArray(e.to))return N3;if(IT[e.type])return IT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?N3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?t8:N3}const ED=1/60*1e3,rle=typeof performance<"u"?()=>performance.now():()=>Date.now(),PD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(rle()),ED);function ile(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ile(()=>Cv=!0),e),{}),ale=Kv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(Cv||ule(),n.schedule(r,i,o)),e},{}),sle=Kv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{});Kv.reduce((e,t)=>(e[t]=()=>cS[t].process(p0),e),{});const lle=e=>cS[e].process(p0),TD=e=>{Cv=!1,p0.delta=tC?ED:Math.max(Math.min(e-p0.timestamp,ole),1),p0.timestamp=e,nC=!0,Kv.forEach(lle),nC=!1,Cv&&(tC=!1,PD(TD))},ule=()=>{Cv=!0,tC=!0,nC||PD(TD)},cle=()=>p0;function AD(e,t,n=0){return e-t-n}function dle(e,t,n=0,r=!0){return r?AD(t+-e,t,n):t-(e-t)+n}function fle(e,t,n,r){return r?e>=t+n:e<=-n}const hle=e=>{const t=({delta:n})=>e(n);return{start:()=>ale.update(t,!0),stop:()=>sle.update(t)}};function LD(e){var t,n,{from:r,autoplay:i=!0,driver:o=hle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=mD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,R=!1,I=!0,N;const z=nle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=xD([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function H(){k++,l==="reverse"?(I=k%2===0,a=dle(a,T,u,I)):(a=AD(a,T,u),l==="mirror"&&$.flipTarget()),R=!1,v&&v()}function q(){P.stop(),m&&m()}function de(J){if(I||(J=-J),a+=J,!R){const ie=$.next(Math.max(0,a));M=ie.value,N&&(M=N(M)),R=I?ie.done:a<=0}S?.(M),R&&(k===0&&(T??(T=a)),k{p?.(),P.stop()}}}function MD(e,t){return t?e*(1e3/t):0}function ple({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var R;p?.(M),(R=T.onUpdate)===null||R===void 0||R.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),R=M===n?-1:1;let I,N;const z=$=>{I=N,N=$,t=MD($-I,cle().delta),(R===1&&$>M||R===-1&&$S?.stop()}}const rC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),NT=e=>rC(e)&&e.hasOwnProperty("z"),Ay=(e,t)=>Math.abs(e-t);function s8(e,t){if(eC(e)&&eC(t))return Ay(e,t);if(rC(e)&&rC(t)){const n=Ay(e.x,t.x),r=Ay(e.y,t.y),i=NT(e)&&NT(t)?Ay(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const OD=(e,t)=>1-3*t+3*e,RD=(e,t)=>3*t-6*e,ID=e=>3*e,H5=(e,t,n)=>((OD(t,n)*e+RD(t,n))*e+ID(t))*e,ND=(e,t,n)=>3*OD(t,n)*e*e+2*RD(t,n)*e+ID(t),gle=1e-7,mle=10;function vle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=H5(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>gle&&++s=Sle?ble(a,p,e,n):m===0?p:vle(a,s,s+Ly,e,n)}return a=>a===0||a===1?a:H5(o(a),t,r)}function wle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Gn.Tap,!1),!pD()}function p(S,w){!h()||(gD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=lS(h0(window,"pointerup",p,l),h0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(S,w))}z5(i,"pointerdown",o?v:void 0,l),e8(u)}const Cle="production",DD=typeof process>"u"||process.env===void 0?Cle:"production",DT=new Set;function zD(e,t,n){e||DT.has(t)||(console.warn(t),n&&console.warn(n),DT.add(t))}const iC=new WeakMap,Rx=new WeakMap,_le=e=>{const t=iC.get(e.target);t&&t(e)},kle=e=>{e.forEach(_le)};function Ele({root:e,...t}){const n=e||document;Rx.has(n)||Rx.set(n,{});const r=Rx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kle,{root:e,...t})),r[i]}function Ple(e,t,n){const r=Ele(t);return iC.set(e,n),r.observe(e),()=>{iC.delete(e),r.unobserve(e)}}function Tle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Mle:Lle)(a,o.current,e,i)}const Ale={some:0,all:1};function Lle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Ale[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Gn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return Ple(n.getInstance(),s,l)},[e,r,i,o])}function Mle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(DD!=="production"&&zD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Gn.InView,!0)}))},[e])}const Fc=e=>t=>(e(t),null),Ole={inView:Fc(Tle),tap:Fc(wle),focus:Fc(sse),hover:Fc(vse)};function l8(){const e=C.exports.useContext(r1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Rle(){return Ile(C.exports.useContext(r1))}function Ile(e){return e===null?!0:e.isPresent}function FD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Nle={linear:r8,easeIn:i8,easeInOut:_D,easeOut:Wse,circIn:kD,circInOut:Vse,circOut:o8,backIn:a8,backInOut:Gse,backOut:Use,anticipate:jse,bounceIn:Xse,bounceInOut:Zse,bounceOut:$5},zT=e=>{if(Array.isArray(e)){F5(e.length===4);const[t,n,r,i]=e;return xle(t,n,r,i)}else if(typeof e=="string")return Nle[e];return e},Dle=e=>Array.isArray(e)&&typeof e[0]!="number",FT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Su.test(t)&&!t.startsWith("url(")),ff=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),My=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ix=()=>({type:"keyframes",ease:"linear",duration:.3}),zle=e=>({type:"keyframes",duration:.8,values:e}),BT={x:ff,y:ff,z:ff,rotate:ff,rotateX:ff,rotateY:ff,rotateZ:ff,scaleX:My,scaleY:My,scale:My,opacity:Ix,backgroundColor:Ix,color:Ix,default:My},Fle=(e,t)=>{let n;return xv(t)?n=zle:n=BT[e]||BT.default,{to:t,...n(t)}},Ble={...ZN,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:Z6,WebkitFilter:Z6},u8=e=>Ble[e];function c8(e,t){var n;let r=u8(e);return r!==Z6&&(r=Su),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const $le={current:!1},BD=1/60*1e3,Hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),$D=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Hle()),BD);function Wle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Wle(()=>_v=!0),e),{}),Cs=Xv.reduce((e,t)=>{const n=dS[t];return e[t]=(r,i=!1,o=!1)=>(_v||Gle(),n.schedule(r,i,o)),e},{}),Qf=Xv.reduce((e,t)=>(e[t]=dS[t].cancel,e),{}),Nx=Xv.reduce((e,t)=>(e[t]=()=>dS[t].process(g0),e),{}),Ule=e=>dS[e].process(g0),HD=e=>{_v=!1,g0.delta=oC?BD:Math.max(Math.min(e-g0.timestamp,Vle),1),g0.timestamp=e,aC=!0,Xv.forEach(Ule),aC=!1,_v&&(oC=!1,$D(HD))},Gle=()=>{_v=!0,oC=!0,aC||$D(HD)},sC=()=>g0;function WD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Qf.read(r),e(o-t))};return Cs.read(r,!0),()=>Qf.read(r)}function jle({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Yle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=W5(o.duration)),o.repeatDelay&&(a.repeatDelay=W5(o.repeatDelay)),e&&(a.ease=Dle(e)?e.map(zT):zT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function qle(e,t){var n,r;return(r=(n=(d8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Kle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Xle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Kle(t),jle(e)||(e={...e,...Fle(n,t.to)}),{...t,...Yle(e)}}function Zle(e,t,n,r,i){const o=d8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=FT(e,n);a==="none"&&s&&typeof n=="string"?a=c8(e,n):$T(a)&&typeof n=="string"?a=HT(n):!Array.isArray(n)&&$T(n)&&typeof a=="string"&&(n=HT(a));const l=FT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?ple({...p,...o}):LD({...Xle(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=aD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function $T(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function HT(e){return typeof e=="number"?0:c8("",e)}function d8(e,t){return e[t]||e.default||e}function f8(e,t,n,r={}){return $le.current&&(r={type:!1}),t.start(i=>{let o;const a=Zle(e,t,n,r,i),s=qle(r,e),l=()=>o=a();let u;return s?u=WD(l,W5(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Qle=e=>/^\-?\d*\.?\d+$/.test(e),Jle=e=>/^0[^.\s]+$/.test(e);function h8(e,t){e.indexOf(t)===-1&&e.push(t)}function p8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Nm{constructor(){this.subscriptions=[]}add(t){return h8(this.subscriptions,t),()=>p8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class tue{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Nm,this.velocityUpdateSubscribers=new Nm,this.renderSubscribers=new Nm,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=sC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Cs.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Cs.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=eue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?MD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function F0(e){return new tue(e)}const VD=e=>t=>t.test(e),nue={test:e=>e==="auto",parse:e=>e},UD=[sh,wt,Cl,Cc,Lae,Aae,nue],Dg=e=>UD.find(VD(e)),rue=[...UD,Ji,Su],iue=e=>rue.find(VD(e));function oue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function aue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function fS(e,t,n){const r=e.getProps();return Q7(r,t,n!==void 0?n:r.custom,oue(e),aue(e))}function sue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,F0(n))}function lue(e,t){const n=fS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=aD(o[a]);sue(e,a,s)}}function uue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;slC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=lC(e,t,n);else{const i=typeof t=="function"?fS(e,t,n.custom):t;r=GD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function lC(e,t,n={}){var r;const i=fS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>GD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return hue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function GD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&gue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&jv.has(m)&&(w={...w,type:!1,delay:0});let E=f8(m,v,S,w);V5(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&lue(e,s)})}function hue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(pue).forEach((u,h)=>{a.push(lC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function pue(e,t){return e.sortNodePosition(t)}function gue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const g8=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],mue=[...g8].reverse(),vue=g8.length;function yue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fue(e,n,r)))}function Sue(e){let t=yue(e);const n=xue();let r=!0;const i=(l,u)=>{const h=fS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let k=0;kE&&I;const q=Array.isArray(R)?R:[R];let de=q.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:V={}}=M,J={...V,...de},ie=ee=>{H=!0,S.delete(ee),M.needsAnimating[ee]=!0};for(const ee in J){const X=de[ee],G=V[ee];w.hasOwnProperty(ee)||(X!==G?xv(X)&&xv(G)?!FD(X,G)||$?ie(ee):M.protectedKeys[ee]=!0:X!==void 0?ie(ee):S.add(ee):X!==void 0&&S.has(ee)?ie(ee):M.protectedKeys[ee]=!0)}M.prevProp=R,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(H=!1),H&&!z&&v.push(...q.map(ee=>({animation:ee,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function bue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!FD(t,e):!1}function hf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xue(){return{[Gn.Animate]:hf(!0),[Gn.InView]:hf(),[Gn.Hover]:hf(),[Gn.Tap]:hf(),[Gn.Drag]:hf(),[Gn.Focus]:hf(),[Gn.Exit]:hf()}}const wue={animation:Fc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Sue(e)),iS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Fc(e=>{const{custom:t,visualElement:n}=e,[r,i]=l8(),o=C.exports.useContext(r1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class jD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=zx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=s8(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=sC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Dx(h,this.transformPagePoint),lD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Cs.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=zx(Dx(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},uD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=J7(t),o=Dx(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=sC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,zx(o,this.history)),this.removeListeners=lS(h0(window,"pointermove",this.handlePointerMove),h0(window,"pointerup",this.handlePointerUp),h0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Qf.update(this.updatePoint)}}function Dx(e,t){return t?{point:t(e.point)}:e}function WT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function zx({point:e},t){return{point:e,delta:WT(e,YD(t)),offset:WT(e,Cue(t)),velocity:_ue(t,.1)}}function Cue(e){return e[0]}function YD(e){return e[e.length-1]}function _ue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=YD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>W5(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function da(e){return e.max-e.min}function VT(e,t=0,n=.01){return s8(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function YT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Pue(e,{top:t,left:n,bottom:r,right:i}){return{x:YT(e.x,n,i),y:YT(e.y,t,r)}}function qT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=wv(t.min,t.max-r,e.min):r>i&&(n=wv(e.min,e.max-i,t.min)),B5(0,1,n)}function Lue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const uC=.35;function Mue(e=uC){return e===!1?e=0:e===!0&&(e=uC),{x:KT(e,"left","right"),y:KT(e,"top","bottom")}}function KT(e,t,n){return{min:XT(e,t),max:XT(e,n)}}function XT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const ZT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fm=()=>({x:ZT(),y:ZT()}),QT=()=>({min:0,max:0}),ki=()=>({x:QT(),y:QT()});function ll(e){return[e("x"),e("y")]}function qD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Rue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fx(e){return e===void 0||e===1}function cC({scale:e,scaleX:t,scaleY:n}){return!Fx(e)||!Fx(t)||!Fx(n)}function yf(e){return cC(e)||KD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function KD(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function U5(e,t,n){const r=e-n,i=t*r;return n+i}function eA(e,t,n,r,i){return i!==void 0&&(e=U5(e,i,r)),U5(e,n,r)+t}function dC(e,t=0,n=1,r,i){e.min=eA(e.min,t,n,r,i),e.max=eA(e.max,t,n,r,i)}function XD(e,{x:t,y:n}){dC(e.x,t.translate,t.scale,t.originPoint),dC(e.y,n.translate,n.scale,n.originPoint)}function Iue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(J7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=hD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ll(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Cl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=da(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=$ue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new jD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Oy(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Eue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&jp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Pue(r.actual,t):this.constraints=!1,this.elastic=Mue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ll(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Lue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!jp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=zue(r,i.root,this.visualElement.getTransformPagePoint());let a=Tue(i.layout.actual,o);if(n){const s=n(Oue(a));this.hasMutatedConstraints=!!s,s&&(a=qD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ll(h=>{var p;if(!Oy(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return f8(t,r,0,n)}stopAnimation(){ll(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){ll(n=>{const{drag:r}=this.getProps();if(!Oy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!jp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ll(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Aue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ll(s=>{if(!Oy(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;Fue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=h0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();jp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=sS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ll(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=uC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Oy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $ue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Hue(e){const{dragControls:t,visualElement:n}=e,r=aS(()=>new Bue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Wue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(U7),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new jD(h,l,{transformPagePoint:s})}z5(i,"pointerdown",o&&u),e8(()=>a.current&&a.current.end())}const Vue={pan:Fc(Wue),drag:Fc(Hue)},fC={current:null},QD={current:!1};function Uue(){if(QD.current=!0,!!ah)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fC.current=e.matches;e.addListener(t),t()}else fC.current=!1}const Ry=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Gue(){const e=Ry.map(()=>new Nm),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Ry.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Ry[i]]=o=>r.add(o),n["notify"+Ry[i]]=(...o)=>r.notify(...o)}),n}function jue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ws(o))e.addValue(i,o),V5(r)&&r.add(i);else if(ws(a))e.addValue(i,F0(o)),V5(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,F0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const JD=Object.keys(Sv),Yue=JD.length,ez=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:T}=S;let M;const R=Gue(),I=new Map,N=new Map;let z={};const $={...k},H=p.initial?{...k}:{};let q;function de(){!M||!P||(V(),o(M,T,p.style,j.projection))}function V(){t(j,T,k,E,p)}function J(){R.notifyUpdate(k)}function ie(Z,me){const Se=me.onChange(Be=>{k[Z]=Be,p.onUpdate&&Cs.update(J,!1,!0)}),xe=me.onRenderRequest(j.scheduleRender);N.set(Z,()=>{Se(),xe()})}const{willChange:ee,...X}=u(p);for(const Z in X){const me=X[Z];k[Z]!==void 0&&ws(me)&&(me.set(k[Z],!1),V5(ee)&&ee.add(Z))}if(p.values)for(const Z in p.values){const me=p.values[Z];k[Z]!==void 0&&ws(me)&&me.set(k[Z])}const G=oS(p),Q=$N(p),j={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(Z){P=!0,M=j.current=Z,j.projection&&j.projection.mount(Z),Q&&h&&!G&&(q=h?.addVariantChild(j)),I.forEach((me,Se)=>ie(Se,me)),QD.current||Uue(),j.shouldReduceMotion=w==="never"?!1:w==="always"?!0:fC.current,h?.children.add(j),j.setProps(p)},unmount(){var Z;(Z=j.projection)===null||Z===void 0||Z.unmount(),Qf.update(J),Qf.render(de),N.forEach(me=>me()),q?.(),h?.children.delete(j),R.clearAllListeners(),M=void 0,P=!1},loadFeatures(Z,me,Se,xe,Be,We){const dt=[];for(let Ye=0;Yej.scheduleRender(),animationType:typeof rt=="string"?rt:"both",initialPromotionConfig:We,layoutScroll:Et})}return dt},addVariantChild(Z){var me;const Se=j.getClosestVariantNode();if(Se)return(me=Se.variantChildren)===null||me===void 0||me.add(Z),()=>Se.variantChildren.delete(Z)},sortNodePosition(Z){return!l||e!==Z.treeType?0:l(j.getInstance(),Z.getInstance())},getClosestVariantNode:()=>Q?j:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:Z=>k[Z],setStaticValue:(Z,me)=>k[Z]=me,getLatestValues:()=>k,setVisibility(Z){j.isVisible!==Z&&(j.isVisible=Z,j.scheduleRender())},makeTargetAnimatable(Z,me=!0){return r(j,Z,p,me)},measureViewportBox(){return i(M,p)},addValue(Z,me){j.hasValue(Z)&&j.removeValue(Z),I.set(Z,me),k[Z]=me.get(),ie(Z,me)},removeValue(Z){var me;I.delete(Z),(me=N.get(Z))===null||me===void 0||me(),N.delete(Z),delete k[Z],s(Z,T)},hasValue:Z=>I.has(Z),getValue(Z,me){if(p.values&&p.values[Z])return p.values[Z];let Se=I.get(Z);return Se===void 0&&me!==void 0&&(Se=F0(me),j.addValue(Z,Se)),Se},forEachValue:Z=>I.forEach(Z),readValue:Z=>k[Z]!==void 0?k[Z]:a(M,Z,E),setBaseTarget(Z,me){$[Z]=me},getBaseTarget(Z){var me;const{initial:Se}=p,xe=typeof Se=="string"||typeof Se=="object"?(me=Q7(p,Se))===null||me===void 0?void 0:me[Z]:void 0;if(Se&&xe!==void 0)return xe;if(n){const Be=n(p,Z);if(Be!==void 0&&!ws(Be))return Be}return H[Z]!==void 0&&xe===void 0?void 0:$[Z]},...R,build(){return V(),T},scheduleRender(){Cs.render(de,!1,!0)},syncRender:de,setProps(Z){(Z.transformTemplate||p.transformTemplate)&&j.scheduleRender(),p=Z,R.updatePropListeners(Z),z=jue(j,u(p),z)},getProps:()=>p,getVariant:Z=>{var me;return(me=p.variants)===null||me===void 0?void 0:me[Z]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(Z=!1){if(Z)return h?.getVariantContext();if(!G){const Se=h?.getVariantContext()||{};return p.initial!==void 0&&(Se.initial=p.initial),Se}const me={};for(let Se=0;Se{const o=i.get();if(!hC(o))return;const a=pC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!hC(o))continue;const a=pC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Zue=new Set(["width","height","top","left","right","bottom","x","y"]),rz=e=>Zue.has(e),Que=e=>Object.keys(e).some(rz),iz=(e,t)=>{e.set(t,!1),e.set(t)},nA=e=>e===sh||e===wt;var rA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(rA||(rA={}));const iA=(e,t)=>parseFloat(e.split(", ")[t]),oA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return iA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?iA(o[1],e):0}},Jue=new Set(["x","y","z"]),ece=N5.filter(e=>!Jue.has(e));function tce(e){const t=[];return ece.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const aA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:oA(4,13),y:oA(5,14)},nce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=aA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);iz(h,s[u]),e[u]=aA[u](l,o)}),e},rce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(rz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Dg(h);const m=t[l];let v;if(xv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Dg(h);for(let E=w;E=0?window.pageYOffset:null,u=nce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),ah&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function ice(e,t,n,r){return Que(t)?rce(e,t,n,r):{target:t,transitionEnd:r}}const oce=(e,t,n,r)=>{const i=Xue(e,t,r);return t=i.target,r=i.transitionEnd,ice(e,t,n,r)};function ace(e){return window.getComputedStyle(e)}const oz={treeType:"dom",readValueFromInstance(e,t){if(jv.has(t)){const n=u8(t);return n&&n.default||0}else{const n=ace(e),r=(VN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return ZD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=due(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){uue(e,r,a);const s=oce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:Z7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),q7(t,n,r,i.transformTemplate)},render:nD},sce=ez(oz),lce=ez({...oz,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return jv.has(t)?((n=u8(t))===null||n===void 0?void 0:n.default)||0:(t=rD.has(t)?t:tD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:oD,build(e,t,n,r,i){X7(t,n,r,i.transformTemplate)},render:iD}),uce=(e,t)=>j7(e)?lce(t,{enableHardwareAcceleration:!1}):sce(t,{enableHardwareAcceleration:!0});function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const zg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=sA(e,t.target.x),r=sA(e,t.target.y);return`${n}% ${r}%`}},lA="_$css",cce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(nz,v=>(o.push(v),lA)));const a=Su.parse(e);if(a.length>5)return r;const s=Su.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(lA,()=>{const S=o[v];return v++,S})}return m}};class dce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Cae(hce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Om.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Cs.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function fce(e){const[t,n]=l8(),r=C.exports.useContext(G7);return x(dce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(HN),isPresent:t,safeToRemove:n})}const hce={borderRadius:{...zg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zg,borderTopRightRadius:zg,borderBottomLeftRadius:zg,borderBottomRightRadius:zg,boxShadow:cce},pce={measureLayout:fce};function gce(e,t,n={}){const r=ws(e)?e:F0(e);return f8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const az=["TopLeft","TopRight","BottomLeft","BottomRight"],mce=az.length,uA=e=>typeof e=="string"?parseFloat(e):e,cA=e=>typeof e=="number"||wt.test(e);function vce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,yce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Sce(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(wv(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function cs(e,t){fA(e.x,t.x),fA(e.y,t.y)}function hA(e,t,n,r,i){return e-=t,e=U5(e,1/n,r),i!==void 0&&(e=U5(e,1/i,r)),e}function bce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Cl.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=hA(e.min,t,n,s,i),e.max=hA(e.max,t,n,s,i)}function pA(e,t,[n,r,i],o,a){bce(e,t[n],t[r],t[i],t.scale,o,a)}const xce=["x","scaleX","originX"],wce=["y","scaleY","originY"];function gA(e,t,n,r){pA(e.x,t,xce,n?.x,r?.x),pA(e.y,t,wce,n?.y,r?.y)}function mA(e){return e.translate===0&&e.scale===1}function lz(e){return mA(e.x)&&mA(e.y)}function uz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function vA(e){return da(e.x)/da(e.y)}function Cce(e,t,n=.1){return s8(e,t)<=n}class _ce{constructor(){this.members=[]}add(t){h8(this.members,t),t.scheduleRender()}remove(t){if(p8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const kce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function yA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===kce?"none":o}const Ece=(e,t)=>e.depth-t.depth;class Pce{constructor(){this.children=[],this.isDirty=!1}add(t){h8(this.children,t),this.isDirty=!0}remove(t){p8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ece),this.isDirty=!1,this.children.forEach(t)}}const SA=["","X","Y","Z"],bA=1e3;function cz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Oce),this.nodes.forEach(Rce)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=WD(v,250),Om.hasAnimatedSinceResize&&(Om.hasAnimatedSinceResize=!1,this.nodes.forEach(wA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const R=(P=(E=this.options.transition)!==null&&E!==void 0?E:p.getDefaultTransition())!==null&&P!==void 0?P:Fce,{onLayoutAnimationStart:I,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!uz(this.targetLayout,w)||S,$=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const H={...d8(R,"layout"),onPlay:I,onComplete:N};p.shouldReduceMotion&&(H.delay=0,H.type=!1),this.startAnimation(H)}else!v&&this.animationProgress===0&&wA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Qf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Ice))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));EA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const T=P/1e3;CA(m.x,a.x,T),CA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(zm(v,this.layout.actual,this.relativeParent.layout.actual),Dce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,vce(p,h,this.latestValues,T,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Qf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Cs.update(()=>{Om.hasAnimatedSinceResize=!0,this.currentAnimation=gce(0,bA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,bA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&dz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||ki();const p=da(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=da(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}cs(s,l),Yp(s,h),Dm(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new _ce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xA),this.root.sharedNodes.clear()}}}function Tce(e){e.updateLayout()}function Ace(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(v);v.min=o[m].min,v.max=v.min+S}):dz(s,i.layout,o)&&ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=da(o[m]);v.max=v.min+S});const l=Fm();Dm(l,o,i.layout);const u=Fm();i.isShared?Dm(u,e.applyTransform(a,!0),i.measured):Dm(u,o,i.layout);const h=!lz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=ki();zm(S,i.layout,m.layout);const w=ki();zm(w,o,v.actual),uz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function Lce(e){e.clearSnapshot()}function xA(e){e.clearMeasurements()}function Mce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function wA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Oce(e){e.resolveTargetDelta()}function Rce(e){e.calcProjection()}function Ice(e){e.resetRotation()}function Nce(e){e.removeLeadSnapshot()}function CA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _A(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function Dce(e,t,n,r){_A(e.x,t.x,n.x,r),_A(e.y,t.y,n.y,r)}function zce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Fce={duration:.45,ease:[.4,0,.1,1]};function Bce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function kA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function EA(e){kA(e.x),kA(e.y)}function dz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Cce(vA(t),vA(n),.2)}const $ce=cz({attachResizeListener:(e,t)=>sS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bx={current:void 0},Hce=cz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bx.current){const e=new $ce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Bx.current=e}return Bx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Wce={...wue,...Ole,...Vue,...pce},Rl=xae((e,t)=>ase(e,t,Wce,uce,Hce));function fz(){const e=C.exports.useRef(!1);return R5(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Vce(){const e=fz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Cs.postRender(r),[r]),t]}class Uce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Gce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${o}px !important; + height: ${a}px !important; + top: ${s}px !important; + left: ${l}px !important; + } + `),()=>{document.head.removeChild(u)}},[t]),x(Uce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const $x=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=aS(jce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Gce,{isPresent:n,children:e})),x(r1.Provider,{value:u,children:e})};function jce(){return new Map}const Op=e=>e.key||"";function Yce(e,t){e.forEach(n=>{const r=Op(n);t.set(r,n)})}function qce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const fd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",zD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Vce();const l=C.exports.useContext(G7).forceRender;l&&(s=l);const u=fz(),h=qce(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(R5(()=>{w.current=!1,Yce(h,S),v.current=p}),e8(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Tn,{children:p.map(T=>x($x,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Op(T)))});p=[...p];const E=v.current.map(Op),P=h.map(Op),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const R=E.indexOf(T),I=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(R,0,x($x,{isPresent:!1,onExitComplete:I,custom:t,presenceAffectsLayout:o,mode:a,children:M},Op(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x($x,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Op(T))}),DD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Tn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var pl=function(){return pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function gC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Kce(){return!1}var Xce=e=>{const{condition:t,message:n}=e;t&&Kce()&&console.warn(n)},Rf={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Fg={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function mC(e){switch(e?.direction??"right"){case"right":return Fg.slideRight;case"left":return Fg.slideLeft;case"bottom":return Fg.slideDown;case"top":return Fg.slideUp;default:return Fg.slideRight}}var Wf={enter:{duration:.2,ease:Rf.easeOut},exit:{duration:.1,ease:Rf.easeIn}},_s={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Zce=e=>e!=null&&parseInt(e.toString(),10)>0,TA={exit:{height:{duration:.2,ease:Rf.ease},opacity:{duration:.3,ease:Rf.ease}},enter:{height:{duration:.3,ease:Rf.ease},opacity:{duration:.4,ease:Rf.ease}}},Qce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Zce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??_s.exit(TA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??_s.enter(TA.enter,i)})},pz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Xce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(fd,{initial:!1,custom:w,children:E&&le.createElement(Rl.div,{ref:t,...p,className:Zv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Qce,initial:r?"exit":!1,animate:P,exit:"exit"})})});pz.displayName="Collapse";var Jce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??_s.exit(Wf.exit,n),transitionEnd:t?.exit})},gz={initial:"exit",animate:"enter",exit:"exit",variants:Jce},ede=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(fd,{custom:m,children:p&&le.createElement(Rl.div,{ref:n,className:Zv("chakra-fade",o),custom:m,...gz,animate:h,...u})})});ede.displayName="Fade";var tde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??_s.exit(Wf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??_s.enter(Wf.enter,n),transitionEnd:e?.enter})},mz={initial:"exit",animate:"enter",exit:"exit",variants:tde},nde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(fd,{custom:S,children:m&&le.createElement(Rl.div,{ref:n,className:Zv("chakra-offset-slide",s),...mz,animate:v,custom:S,...p})})});nde.displayName="ScaleFade";var AA={exit:{duration:.15,ease:Rf.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},rde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=mC({direction:e});return{...i,transition:t?.exit??_s.exit(AA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=mC({direction:e});return{...i,transition:n?.enter??_s.enter(AA.enter,r),transitionEnd:t?.enter}}},vz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=mC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(fd,{custom:P,children:w&&le.createElement(Rl.div,{...m,ref:n,initial:"exit",className:Zv("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:rde,style:S,...p})})});vz.displayName="Slide";var ide={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??_s.exit(Wf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??_s.exit(Wf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},vC={initial:"initial",animate:"enter",exit:"exit",variants:ide},ode=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(fd,{custom:w,children:v&&le.createElement(Rl.div,{ref:n,className:Zv("chakra-offset-slide",a),custom:w,...vC,animate:S,...m})})});ode.displayName="SlideFade";var Qv=(...e)=>e.filter(Boolean).join(" ");function ade(){return!1}var hS=e=>{const{condition:t,message:n}=e;t&&ade()&&console.warn(n)};function Hx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,pS]=xn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[lde,m8]=xn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[ude,LPe,cde,dde]=FN(),If=Pe(function(t,n){const{getButtonProps:r}=m8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...pS().button};return le.createElement(we.button,{...i,className:Qv("chakra-accordion__button",t.className),__css:a})});If.displayName="AccordionButton";function fde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;gde(e),mde(e);const s=cde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=nS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);p(P)}else E?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[hde,v8]=xn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function pde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=v8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;vde(e);const{register:m,index:v,descendants:S}=dde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);yde({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const H={ArrowDown:()=>{const q=S.nextEnabled(v);q?.node.focus()},ArrowUp:()=>{const q=S.prevEnabled(v);q?.node.focus()},Home:()=>{const q=S.firstEnabled();q?.node.focus()},End:()=>{const q=S.lastEnabled();q?.node.focus()}}[z.key];H&&(z.preventDefault(),H(z))},[S,v]),R=C.exports.useCallback(()=>{a(v)},[a,v]),I=C.exports.useCallback(function($={},H=null){return{...$,type:"button",ref:Bn(m,s,H),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Hx($.onClick,T),onFocus:Hx($.onFocus,R),onKeyDown:Hx($.onKeyDown,M)}},[h,t,w,T,R,M,p,m]),N=C.exports.useCallback(function($={},H=null){return{...$,ref:H,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:I,getPanelProps:N,htmlProps:i}}function gde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;hS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function mde(e){hS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function vde(e){hS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. + `})}function yde(e){hS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Nf(e){const{isOpen:t,isDisabled:n}=m8(),{reduceMotion:r}=v8(),i=Qv("chakra-accordion__icon",e.className),o=pS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ma,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Nf.displayName="AccordionIcon";var Df=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=pde(t),l={...pS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(lde,{value:u},le.createElement(we.div,{ref:n,...o,className:Qv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Df.displayName="AccordionItem";var zf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=v8(),{getPanelProps:s,isOpen:l}=m8(),u=s(o,n),h=Qv("chakra-accordion__panel",r),p=pS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(pz,{in:l,...i,children:m})});zf.displayName="AccordionPanel";var gS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ri("Accordion",r),a=gn(r),{htmlProps:s,descendants:l,...u}=fde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(ude,{value:l},le.createElement(hde,{value:h},le.createElement(sde,{value:o},le.createElement(we.div,{ref:i,...s,className:Qv("chakra-accordion",r.className),__css:o.root},t))))});gS.displayName="Accordion";var Sde=(...e)=>e.filter(Boolean).join(" "),bde=dd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Jv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=gn(e),u=Sde("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${bde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Jv.displayName="Spinner";var mS=(...e)=>e.filter(Boolean).join(" ");function xde(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function wde(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function LA(e){return x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Cde,_de]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[kde,y8]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),yz={info:{icon:wde,colorScheme:"blue"},warning:{icon:LA,colorScheme:"orange"},success:{icon:xde,colorScheme:"green"},error:{icon:LA,colorScheme:"red"},loading:{icon:Jv,colorScheme:"blue"}};function Ede(e){return yz[e].colorScheme}function Pde(e){return yz[e].icon}var Sz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=gn(t),a=t.colorScheme??Ede(r),s=Ri("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Cde,{value:{status:r}},le.createElement(kde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:mS("chakra-alert",t.className),__css:l})))});Sz.displayName="Alert";var bz=Pe(function(t,n){const i={display:"inline",...y8().description};return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__desc",t.className),__css:i})});bz.displayName="AlertDescription";function xz(e){const{status:t}=_de(),n=Pde(t),r=y8(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:mS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}xz.displayName="AlertIcon";var wz=Pe(function(t,n){const r=y8();return le.createElement(we.div,{ref:n,...t,className:mS("chakra-alert__title",t.className),__css:r.title})});wz.displayName="AlertTitle";function Tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ade(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var Lde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",G5=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});G5.displayName="NativeImage";var vS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=Ade({...t,ignoreFallback:E}),k=Lde(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:Tde(S,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:G5,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:G5,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});vS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:G5,className:"chakra-image",...e}));function yS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var SS=(...e)=>e.filter(Boolean).join(" "),MA=e=>e?"":void 0,[Mde,Ode]=xn({strict:!1,name:"ButtonGroupContext"});function yC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=SS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}yC.displayName="ButtonIcon";function SC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Jv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=SS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}SC.displayName="ButtonSpinner";function Rde(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var $a=Pe((e,t)=>{const n=Ode(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=gn(e),k=C.exports.useMemo(()=>{const I={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:I}}},[r,n]),{ref:T,type:M}=Rde(E),R={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:nae(t,T),as:E,type:m??M,"data-active":MA(a),"data-loading":MA(o),__css:k,className:SS("chakra-button",w),...P},o&&S==="start"&&x(SC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(OA,{...R})):x(OA,{...R}),o&&S==="end"&&x(SC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});$a.displayName="Button";function OA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return re(Tn,{children:[t&&x(yC,{marginEnd:i,children:t}),r,n&&x(yC,{marginStart:i,children:n})]})}var ra=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=SS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Mde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});ra.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x($a,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var a1=(...e)=>e.filter(Boolean).join(" "),Iy=e=>e?"":void 0,Wx=e=>e?!0:void 0;function RA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Ide,Cz]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Nde,s1]=xn({strict:!1,name:"FormControlContext"});function Dde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:Bn(z,$=>{!$||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":Iy(E),"data-disabled":Iy(i),"data-invalid":Iy(r),"data-readonly":Iy(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:Bn(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),R=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),I=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:R,getLabelProps:T,getRequiredIndicatorProps:I}}var hd=Pe(function(t,n){const r=Ri("Form",t),i=gn(t),{getRootProps:o,htmlProps:a,...s}=Dde(i),l=a1("chakra-form-control",t.className);return le.createElement(Nde,{value:s},le.createElement(Ide,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});hd.displayName="FormControl";var zde=Pe(function(t,n){const r=s1(),i=Cz(),o=a1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});zde.displayName="FormHelperText";function S8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=b8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Wx(n),"aria-required":Wx(i),"aria-readonly":Wx(r)}}function b8(e){const t=s1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:RA(t?.onFocus,h),onBlur:RA(t?.onBlur,p)}}var[Fde,Bde]=xn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),$de=Pe((e,t)=>{const n=Ri("FormError",e),r=gn(e),i=s1();return i?.isInvalid?le.createElement(Fde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:a1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});$de.displayName="FormErrorMessage";var Hde=Pe((e,t)=>{const n=Bde(),r=s1();if(!r?.isInvalid)return null;const i=a1("chakra-form__error-icon",e.className);return x(ma,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Hde.displayName="FormErrorIcon";var lh=Pe(function(t,n){const r=so("FormLabel",t),i=gn(t),{className:o,children:a,requiredIndicator:s=x(_z,{}),optionalIndicator:l=null,...u}=i,h=s1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:a1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});lh.displayName="FormLabel";var _z=Pe(function(t,n){const r=s1(),i=Cz();if(!r?.isRequired)return null;const o=a1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});_z.displayName="RequiredIndicator";function td(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var x8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Wde=we("span",{baseStyle:x8});Wde.displayName="VisuallyHidden";var Vde=we("input",{baseStyle:x8});Vde.displayName="VisuallyHiddenInput";var IA=!1,bS=null,B0=!1,bC=new Set,Ude=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Gde(e){return!(e.metaKey||!Ude&&e.altKey||e.ctrlKey)}function w8(e,t){bC.forEach(n=>n(e,t))}function NA(e){B0=!0,Gde(e)&&(bS="keyboard",w8("keyboard",e))}function yp(e){bS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(B0=!0,w8("pointer",e))}function jde(e){e.target===window||e.target===document||(B0||(bS="keyboard",w8("keyboard",e)),B0=!1)}function Yde(){B0=!1}function DA(){return bS!=="pointer"}function qde(){if(typeof window>"u"||IA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){B0=!0,e.apply(this,n)},document.addEventListener("keydown",NA,!0),document.addEventListener("keyup",NA,!0),window.addEventListener("focus",jde,!0),window.addEventListener("blur",Yde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",yp,!0),document.addEventListener("pointermove",yp,!0),document.addEventListener("pointerup",yp,!0)):(document.addEventListener("mousedown",yp,!0),document.addEventListener("mousemove",yp,!0),document.addEventListener("mouseup",yp,!0)),IA=!0}function Kde(e){qde(),e(DA());const t=()=>e(DA());return bC.add(t),()=>{bC.delete(t)}}var[MPe,Xde]=xn({name:"CheckboxGroupContext",strict:!1}),Zde=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function Pa(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Qde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Jde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function efe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function tfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?efe:Jde;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function nfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function kz(e={}){const t=b8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...R}=e,I=nfe(R,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),$=cr(l),[H,q]=C.exports.useState(!1),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),[ee,X]=C.exports.useState(!1);C.exports.useEffect(()=>Kde(q),[]);const G=C.exports.useRef(null),[Q,j]=C.exports.useState(!0),[Z,me]=C.exports.useState(!!h),Se=p!==void 0,xe=Se?p:Z,Be=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}Se||me(xe?Ae.target.checked:S?!0:Ae.target.checked),N?.(Ae)},[r,n,xe,Se,S,N]);bs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),td(()=>{n&&V(!1)},[n,V]),bs(()=>{const Ae=G.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const We=n&&!m,dt=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!0)},[X]),Ye=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!1)},[X]);bs(()=>{if(!G.current)return;G.current.checked!==xe&&me(G.current.checked)},[G.current]);const rt=C.exports.useCallback((Ae={},it=null)=>{const Ot=lt=>{de&<.preventDefault(),X(!0)};return{...Ae,ref:it,"data-active":Qi(ee),"data-hover":Qi(J),"data-checked":Qi(xe),"data-focus":Qi(de),"data-focus-visible":Qi(de&&H),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:Pa(Ae.onMouseDown,Ot),onMouseUp:Pa(Ae.onMouseUp,()=>X(!1)),onMouseEnter:Pa(Ae.onMouseEnter,()=>ie(!0)),onMouseLeave:Pa(Ae.onMouseLeave,()=>ie(!1))}},[ee,xe,n,de,H,J,S,o,r]),Ze=C.exports.useCallback((Ae={},it=null)=>({...I,...Ae,ref:Bn(it,Ot=>{!Ot||j(Ot.tagName==="LABEL")}),onClick:Pa(Ae.onClick,()=>{var Ot;Q||((Ot=G.current)==null||Ot.click(),requestAnimationFrame(()=>{var lt;(lt=G.current)==null||lt.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[I,n,xe,o,Q]),Ke=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:Bn(G,it),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Pa(Ae.onChange,Be),onBlur:Pa(Ae.onBlur,z,()=>V(!1)),onFocus:Pa(Ae.onFocus,$,()=>V(!0)),onKeyDown:Pa(Ae.onKeyDown,dt),onKeyUp:Pa(Ae.onKeyUp,Ye),required:i,checked:xe,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:x8}),[w,E,a,Be,z,$,dt,Ye,i,xe,We,r,k,T,M,o,u,n,P]),Et=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:it,onMouseDown:Pa(Ae.onMouseDown,zA),onTouchStart:Pa(Ae.onTouchStart,zA),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[xe,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:xe,isActive:ee,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:rt,getInputProps:Ke,getLabelProps:Et,htmlProps:I}}function zA(e){e.preventDefault(),e.stopPropagation()}var rfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},ife={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},ofe=dd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),afe=dd({from:{opacity:0},to:{opacity:1}}),sfe=dd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Ez=Pe(function(t,n){const r=Xde(),i={...r,...t},o=Ri("Checkbox",i),a=gn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(tfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Qde(r.onChange,w));const{state:M,getInputProps:R,getCheckboxProps:I,getLabelProps:N,getRootProps:z}=kz({...P,isDisabled:S,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${afe} 20ms linear, ${sfe} 200ms linear`:`${ofe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),H=C.exports.cloneElement(m,{__css:$,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...ife,...o.container},className:Zde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...R(E,n)}),le.createElement(we.span,{__css:{...rfe,...o.control},className:"chakra-checkbox__control",...I()},H),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Ez.displayName="Checkbox";function lfe(e){return x(ma,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var xS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=gn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(lfe,{width:"1em",height:"1em"}))});xS.displayName="CloseButton";function ufe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function C8(e,t){let n=ufe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function xC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function j5(e,t,n){return(e-t)*100/(n-t)}function Pz(e,t,n){return(n-t)*e+t}function wC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=xC(n);return C8(r,i)}function m0(e,t,n){return e==null?e:(nr==null?"":Vx(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Tz(_c(v),o),w=n??S,E=C.exports.useCallback(H=>{H!==v&&(m||p(H.toString()),u?.(H.toString(),_c(H)))},[u,m,v]),P=C.exports.useCallback(H=>{let q=H;return l&&(q=m0(q,a,s)),C8(q,w)},[w,l,s,a]),k=C.exports.useCallback((H=o)=>{let q;v===""?q=_c(H):q=_c(v)+H,q=P(q),E(q)},[P,o,E,v]),T=C.exports.useCallback((H=o)=>{let q;v===""?q=_c(-H):q=_c(v)-H,q=P(q),E(q)},[P,o,E,v]),M=C.exports.useCallback(()=>{let H;r==null?H="":H=Vx(r,o,n)??a,E(H)},[r,n,o,E,a]),R=C.exports.useCallback(H=>{const q=Vx(H,o,w)??a;E(q)},[w,o,E,a]),I=_c(v);return{isOutOfRange:I>s||Ix(Q4,{styles:Az}),ffe=()=>x(Q4,{styles:` + html { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + font-family: system-ui, sans-serif; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + touch-action: manipulation; + } + + body { + position: relative; + min-height: 100%; + font-feature-settings: 'kern'; + } + + *, + *::before, + *::after { + border-width: 0; + border-style: solid; + box-sizing: border-box; + } + + main { + display: block; + } + + hr { + border-top-width: 1px; + box-sizing: content-box; + height: 0; + overflow: visible; + } + + pre, + code, + kbd, + samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; + font-size: 1em; + } + + a { + background-color: transparent; + color: inherit; + text-decoration: inherit; + } + + abbr[title] { + border-bottom: none; + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + + b, + strong { + font-weight: bold; + } + + small { + font-size: 80%; + } + + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + img { + border-style: none; + } + + button, + input, + optgroup, + select, + textarea { + font-family: inherit; + font-size: 100%; + line-height: 1.15; + margin: 0; + } + + button, + input { + overflow: visible; + } + + button, + select { + text-transform: none; + } + + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; + } + + fieldset { + padding: 0.35em 0.75em 0.625em; + } + + legend { + box-sizing: border-box; + color: inherit; + display: table; + max-width: 100%; + padding: 0; + white-space: normal; + } + + progress { + vertical-align: baseline; + } + + textarea { + overflow: auto; + } + + [type="checkbox"], + [type="radio"] { + box-sizing: border-box; + padding: 0; + } + + [type="number"]::-webkit-inner-spin-button, + [type="number"]::-webkit-outer-spin-button { + -webkit-appearance: none !important; + } + + input[type="number"] { + -moz-appearance: textfield; + } + + [type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; + } + + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none !important; + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; + font: inherit; + } + + details { + display: block; + } + + summary { + display: list-item; + } + + template { + display: none; + } + + [hidden] { + display: none !important; + } + + body, + blockquote, + dl, + dd, + h1, + h2, + h3, + h4, + h5, + h6, + hr, + figure, + p, + pre { + margin: 0; + } + + button { + background: transparent; + padding: 0; + } + + fieldset { + margin: 0; + padding: 0; + } + + ol, + ul { + margin: 0; + padding: 0; + } + + textarea { + resize: vertical; + } + + button, + [role="button"] { + cursor: pointer; + } + + button::-moz-focus-inner { + border: 0 !important; + } + + table { + border-collapse: collapse; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + font-size: inherit; + font-weight: inherit; + } + + button, + input, + optgroup, + select, + textarea { + padding: 0; + line-height: inherit; + color: inherit; + } + + img, + svg, + video, + canvas, + audio, + iframe, + embed, + object { + display: block; + } + + img, + video { + max-width: 100%; + height: auto; + } + + [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { + outline: none; + box-shadow: none; + } + + select::-ms-expand { + display: none; + } + + ${Az} + `});function Vf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function hfe(e){return"current"in e}var Lz=()=>typeof window<"u";function pfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var gfe=e=>Lz()&&e.test(navigator.vendor),mfe=e=>Lz()&&e.test(pfe()),vfe=()=>mfe(/mac|iphone|ipad|ipod/i),yfe=()=>vfe()&&gfe(/apple/i);function Sfe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Vf(i,"pointerdown",o=>{if(!yfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=hfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var bfe=hJ?C.exports.useLayoutEffect:C.exports.useEffect;function FA(e,t=[]){const n=C.exports.useRef(e);return bfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function xfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function wfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function kv(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=FA(n),a=FA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=xfe(r,s),p=wfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:pJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function _8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var k8=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ri("Input",i),a=gn(i),s=S8(a),l=Rr("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});k8.displayName="Input";k8.id="Input";var[Cfe,Mz]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Pe(function(t,n){const r=Ri("Input",t),{children:i,className:o,...a}=gn(t),s=Rr("chakra-input__group",o),l={},u=yS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=_8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Cfe,{value:r,children:p}))});_fe.displayName="InputGroup";var kfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Efe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),E8=Pe(function(t,n){const{placement:r="left",...i}=t,o=kfe[r]??{},a=Mz();return x(Efe,{ref:n,...i,__css:{...a.addon,...o}})});E8.displayName="InputAddon";var Oz=Pe(function(t,n){return x(E8,{ref:n,placement:"left",...t,className:Rr("chakra-input__left-addon",t.className)})});Oz.displayName="InputLeftAddon";Oz.id="InputLeftAddon";var Rz=Pe(function(t,n){return x(E8,{ref:n,placement:"right",...t,className:Rr("chakra-input__right-addon",t.className)})});Rz.displayName="InputRightAddon";Rz.id="InputRightAddon";var Pfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),wS=Pe(function(t,n){const{placement:r="left",...i}=t,o=Mz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(Pfe,{ref:n,__css:l,...i})});wS.id="InputElement";wS.displayName="InputElement";var Iz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__left-element",r);return x(wS,{ref:n,placement:"left",className:o,...i})});Iz.id="InputLeftElement";Iz.displayName="InputLeftElement";var Nz=Pe(function(t,n){const{className:r,...i}=t,o=Rr("chakra-input__right-element",r);return x(wS,{ref:n,placement:"right",className:o,...i})});Nz.id="InputRightElement";Nz.displayName="InputRightElement";function Tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function nd(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Afe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Rr("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:nd(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Afe.displayName="AspectRatio";var Lfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=gn(t);return le.createElement(we.span,{ref:n,className:Rr("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Lfe.displayName="Badge";var pd=we("div");pd.displayName="Box";var Dz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(pd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});Dz.displayName="Square";var Mfe=Pe(function(t,n){const{size:r,...i}=t;return x(Dz,{size:r,ref:n,borderRadius:"9999px",...i})});Mfe.displayName="Circle";var zz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});zz.displayName="Center";var Ofe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Ofe[r],...i,position:"absolute"})});var Rfe=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=gn(t);return le.createElement(we.code,{ref:n,className:Rr("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Rfe.displayName="Code";var Ife=Pe(function(t,n){const{className:r,centerContent:i,...o}=gn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Rr("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Ife.displayName="Container";var Nfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=gn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Rr("chakra-divider",p)})});Nfe.displayName="Divider";var rn=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});rn.displayName="Flex";var Fz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Fz.displayName="Grid";function BA(e){return nd(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Dfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=_8({gridArea:r,gridColumn:BA(i),gridRow:BA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});Dfe.displayName="GridItem";var Uf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=gn(t);return le.createElement(we.h2,{ref:n,className:Rr("chakra-heading",t.className),...o,__css:r})});Uf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=gn(t);return x(pd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var zfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=gn(t);return le.createElement(we.kbd,{ref:n,className:Rr("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});zfe.displayName="Kbd";var Gf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=gn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Rr("chakra-link",i),...a,__css:r})});Gf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Rr("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Rr("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[Ffe,Bz]=xn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),P8=Pe(function(t,n){const r=Ri("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=gn(t),u=yS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(Ffe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});P8.displayName="List";var Bfe=Pe((e,t)=>{const{as:n,...r}=e;return x(P8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Bfe.displayName="OrderedList";var $fe=Pe(function(t,n){const{as:r,...i}=t;return x(P8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});$fe.displayName="UnorderedList";var Hfe=Pe(function(t,n){const r=Bz();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Hfe.displayName="ListItem";var Wfe=Pe(function(t,n){const r=Bz();return x(ma,{ref:n,role:"presentation",...t,__css:r.icon})});Wfe.displayName="ListIcon";var Vfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=n1(),h=s?Gfe(s,u):jfe(r);return x(Fz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Vfe.displayName="SimpleGrid";function Ufe(e){return typeof e=="number"?`${e}px`:e}function Gfe(e,t){return nd(e,n=>{const r=Goe("sizes",n,Ufe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function jfe(e){return nd(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var $z=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});$z.displayName="Spacer";var CC="& > *:not(style) ~ *:not(style)";function Yfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[CC]:nd(n,i=>r[i])}}function qfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":nd(n,i=>r[i])}}var Hz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Hz.displayName="StackItem";var T8=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>Yfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>qfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!p&&!E,k=C.exports.useMemo(()=>{const M=yS(l);return P?M:M.map((R,I)=>{const N=typeof R.key<"u"?R.key:I,z=I+1===M.length,H=p?x(Hz,{children:R},N):R;if(!E)return H;const q=C.exports.cloneElement(u,{__css:w}),de=z?null:q;return re(C.exports.Fragment,{children:[H,de]},N)})},[u,w,E,P,p,l]),T=Rr("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[CC]:S[CC]},...m},k)});T8.displayName="Stack";var Wz=Pe((e,t)=>x(T8,{align:"center",...e,direction:"row",ref:t}));Wz.displayName="HStack";var Vz=Pe((e,t)=>x(T8,{align:"center",...e,direction:"column",ref:t}));Vz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=gn(t),u=_8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Rr("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function $A(e){return typeof e=="number"?`${e}px`:e}var Kfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>nd(w,k=>$A(O6("space",k)(P))),"--chakra-wrap-y-spacing":P=>nd(E,k=>$A(O6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,E)=>x(Uz,{children:w},E)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Rr("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});Kfe.displayName="Wrap";var Uz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Rr("chakra-wrap__listitem",r),...i})});Uz.displayName="WrapItem";var Xfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},Gz=Xfe,Sp=()=>{},Zfe={document:Gz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Sp,removeEventListener:Sp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Sp,removeListener:Sp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:Sp,setInterval:()=>0,clearInterval:Sp},Qfe=Zfe,Jfe={window:Qfe,document:Gz},jz=typeof window<"u"?{window,document}:Jfe,Yz=C.exports.createContext(jz);Yz.displayName="EnvironmentContext";function qz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:jz},[r,n]);return re(Yz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}qz.displayName="EnvironmentProvider";var ehe=e=>e?"":void 0;function the(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Ux(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function nhe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=the(),M=X=>{!X||X.tagName!=="BUTTON"&&E(!1)},R=w?p:p||0,I=n&&!r,N=C.exports.useCallback(X=>{if(n){X.stopPropagation(),X.preventDefault();return}X.currentTarget.focus(),l?.(X)},[n,l]),z=C.exports.useCallback(X=>{P&&Ux(X)&&(X.preventDefault(),X.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),$=C.exports.useCallback(X=>{if(u?.(X),n||X.defaultPrevented||X.metaKey||!Ux(X.nativeEvent)||w)return;const G=i&&X.key==="Enter";o&&X.key===" "&&(X.preventDefault(),k(!0)),G&&(X.preventDefault(),X.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),H=C.exports.useCallback(X=>{if(h?.(X),n||X.defaultPrevented||X.metaKey||!Ux(X.nativeEvent)||w)return;o&&X.key===" "&&(X.preventDefault(),k(!1),X.currentTarget.click())},[o,w,n,h]),q=C.exports.useCallback(X=>{X.button===0&&(k(!1),T.remove(document,"mouseup",q,!1))},[T]),de=C.exports.useCallback(X=>{if(X.button!==0)return;if(n){X.stopPropagation(),X.preventDefault();return}w||k(!0),X.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",q,!1),a?.(X)},[n,w,a,T,q]),V=C.exports.useCallback(X=>{X.button===0&&(w||k(!1),s?.(X))},[s,w]),J=C.exports.useCallback(X=>{if(n){X.preventDefault();return}m?.(X)},[n,m]),ie=C.exports.useCallback(X=>{P&&(X.preventDefault(),k(!1)),v?.(X)},[P,v]),ee=Bn(t,M);return w?{...S,ref:ee,type:"button","aria-disabled":I?void 0:n,disabled:I,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:ee,role:"button","data-active":ehe(P),"aria-disabled":n?"true":void 0,tabIndex:I?void 0:R,onClick:N,onMouseDown:de,onMouseUp:V,onKeyUp:H,onKeyDown:$,onMouseOver:J,onMouseLeave:ie}}function Kz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Xz(e){if(!Kz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function rhe(e){var t;return((t=Zz(e))==null?void 0:t.defaultView)??window}function Zz(e){return Kz(e)?e.ownerDocument:document}function ihe(e){return Zz(e).activeElement}var Qz=e=>e.hasAttribute("tabindex"),ohe=e=>Qz(e)&&e.tabIndex===-1;function ahe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function Jz(e){return e.parentElement&&Jz(e.parentElement)?!0:e.hidden}function she(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function eF(e){if(!Xz(e)||Jz(e)||ahe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():she(e)?!0:Qz(e)}function lhe(e){return e?Xz(e)&&eF(e)&&!ohe(e):!1}var uhe=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],che=uhe.join(),dhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function tF(e){const t=Array.from(e.querySelectorAll(che));return t.unshift(e),t.filter(n=>eF(n)&&dhe(n))}function fhe(e){const t=e.current;if(!t)return!1;const n=ihe(t);return!n||t.contains(n)?!1:!!lhe(n)}function hhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;td(()=>{if(!o||fhe(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var phe={preventScroll:!0,shouldFocus:!1};function ghe(e,t=phe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=mhe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=tF(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);td(()=>{h()},[h]),Vf(a,"transitionend",h)}function mhe(e){return"current"in e}var Mo="top",Ha="bottom",Wa="right",Oo="left",A8="auto",e2=[Mo,Ha,Wa,Oo],$0="start",Ev="end",vhe="clippingParents",nF="viewport",Bg="popper",yhe="reference",HA=e2.reduce(function(e,t){return e.concat([t+"-"+$0,t+"-"+Ev])},[]),rF=[].concat(e2,[A8]).reduce(function(e,t){return e.concat([t,t+"-"+$0,t+"-"+Ev])},[]),She="beforeRead",bhe="read",xhe="afterRead",whe="beforeMain",Che="main",_he="afterMain",khe="beforeWrite",Ehe="write",Phe="afterWrite",The=[She,bhe,xhe,whe,Che,_he,khe,Ehe,Phe];function Tl(e){return e?(e.nodeName||"").toLowerCase():null}function Ua(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jf(e){var t=Ua(e).Element;return e instanceof t||e instanceof Element}function za(e){var t=Ua(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function L8(e){if(typeof ShadowRoot>"u")return!1;var t=Ua(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Ahe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!za(o)||!Tl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function Lhe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!za(i)||!Tl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Mhe={name:"applyStyles",enabled:!0,phase:"write",fn:Ahe,effect:Lhe,requires:["computeStyles"]};function _l(e){return e.split("-")[0]}var jf=Math.max,Y5=Math.min,H0=Math.round;function _C(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function iF(){return!/^((?!chrome|android).)*safari/i.test(_C())}function W0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&za(e)&&(i=e.offsetWidth>0&&H0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&H0(r.height)/e.offsetHeight||1);var a=Jf(e)?Ua(e):window,s=a.visualViewport,l=!iF()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function M8(e){var t=W0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function oF(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&L8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function bu(e){return Ua(e).getComputedStyle(e)}function Ohe(e){return["table","td","th"].indexOf(Tl(e))>=0}function gd(e){return((Jf(e)?e.ownerDocument:e.document)||window.document).documentElement}function CS(e){return Tl(e)==="html"?e:e.assignedSlot||e.parentNode||(L8(e)?e.host:null)||gd(e)}function WA(e){return!za(e)||bu(e).position==="fixed"?null:e.offsetParent}function Rhe(e){var t=/firefox/i.test(_C()),n=/Trident/i.test(_C());if(n&&za(e)){var r=bu(e);if(r.position==="fixed")return null}var i=CS(e);for(L8(i)&&(i=i.host);za(i)&&["html","body"].indexOf(Tl(i))<0;){var o=bu(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 t2(e){for(var t=Ua(e),n=WA(e);n&&Ohe(n)&&bu(n).position==="static";)n=WA(n);return n&&(Tl(n)==="html"||Tl(n)==="body"&&bu(n).position==="static")?t:n||Rhe(e)||t}function O8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Bm(e,t,n){return jf(e,Y5(t,n))}function Ihe(e,t,n){var r=Bm(e,t,n);return r>n?n:r}function aF(){return{top:0,right:0,bottom:0,left:0}}function sF(e){return Object.assign({},aF(),e)}function lF(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Nhe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,sF(typeof t!="number"?t:lF(t,e2))};function Dhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=_l(n.placement),l=O8(s),u=[Oo,Wa].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Nhe(i.padding,n),m=M8(o),v=l==="y"?Mo:Oo,S=l==="y"?Ha:Wa,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=t2(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=p[v],R=k-m[h]-p[S],I=k/2-m[h]/2+T,N=Bm(M,I,R),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-I,t)}}function zhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!oF(t.elements.popper,i)||(t.elements.arrow=i))}const Fhe={name:"arrow",enabled:!0,phase:"main",fn:Dhe,effect:zhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function V0(e){return e.split("-")[1]}var Bhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $he(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:H0(t*i)/i||0,y:H0(n*i)/i||0}}function VA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Mo,R=window;if(u){var I=t2(n),N="clientHeight",z="clientWidth";if(I===Ua(n)&&(I=gd(n),bu(I).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),I=I,i===Mo||(i===Oo||i===Wa)&&o===Ev){M=Ha;var $=p&&I===R&&R.visualViewport?R.visualViewport.height:I[N];w-=$-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===Ha)&&o===Ev){T=Wa;var H=p&&I===R&&R.visualViewport?R.visualViewport.width:I[z];v-=H-r.width,v*=l?1:-1}}var q=Object.assign({position:s},u&&Bhe),de=h===!0?$he({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var V;return Object.assign({},q,(V={},V[M]=k?"0":"",V[T]=P?"0":"",V.transform=(R.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",V))}return Object.assign({},q,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Hhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:_l(t.placement),variation:V0(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,VA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,VA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Whe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hhe,data:{}};var Ny={passive:!0};function Vhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Ua(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Ny)}),s&&l.addEventListener("resize",n.update,Ny),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Ny)}),s&&l.removeEventListener("resize",n.update,Ny)}}const Uhe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vhe,data:{}};var Ghe={left:"right",right:"left",bottom:"top",top:"bottom"};function z3(e){return e.replace(/left|right|bottom|top/g,function(t){return Ghe[t]})}var jhe={start:"end",end:"start"};function UA(e){return e.replace(/start|end/g,function(t){return jhe[t]})}function R8(e){var t=Ua(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function I8(e){return W0(gd(e)).left+R8(e).scrollLeft}function Yhe(e,t){var n=Ua(e),r=gd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=iF();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+I8(e),y:l}}function qhe(e){var t,n=gd(e),r=R8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=jf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+I8(e),l=-r.scrollTop;return bu(i||n).direction==="rtl"&&(s+=jf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function N8(e){var t=bu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function uF(e){return["html","body","#document"].indexOf(Tl(e))>=0?e.ownerDocument.body:za(e)&&N8(e)?e:uF(CS(e))}function $m(e,t){var n;t===void 0&&(t=[]);var r=uF(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ua(r),a=i?[o].concat(o.visualViewport||[],N8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat($m(CS(a)))}function kC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Khe(e,t){var n=W0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function GA(e,t,n){return t===nF?kC(Yhe(e,n)):Jf(t)?Khe(t,n):kC(qhe(gd(e)))}function Xhe(e){var t=$m(CS(e)),n=["absolute","fixed"].indexOf(bu(e).position)>=0,r=n&&za(e)?t2(e):e;return Jf(r)?t.filter(function(i){return Jf(i)&&oF(i,r)&&Tl(i)!=="body"}):[]}function Zhe(e,t,n,r){var i=t==="clippingParents"?Xhe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=GA(e,u,r);return l.top=jf(h.top,l.top),l.right=Y5(h.right,l.right),l.bottom=Y5(h.bottom,l.bottom),l.left=jf(h.left,l.left),l},GA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function cF(e){var t=e.reference,n=e.element,r=e.placement,i=r?_l(r):null,o=r?V0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case Ha:l={x:a,y:t.y+t.height};break;case Wa:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?O8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case $0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case Ev:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Pv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?vhe:s,u=n.rootBoundary,h=u===void 0?nF:u,p=n.elementContext,m=p===void 0?Bg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=sF(typeof E!="number"?E:lF(E,e2)),k=m===Bg?yhe:Bg,T=e.rects.popper,M=e.elements[S?k:m],R=Zhe(Jf(M)?M:M.contextElement||gd(e.elements.popper),l,h,a),I=W0(e.elements.reference),N=cF({reference:I,element:T,strategy:"absolute",placement:i}),z=kC(Object.assign({},T,N)),$=m===Bg?z:I,H={top:R.top-$.top+P.top,bottom:$.bottom-R.bottom+P.bottom,left:R.left-$.left+P.left,right:$.right-R.right+P.right},q=e.modifiersData.offset;if(m===Bg&&q){var de=q[i];Object.keys(H).forEach(function(V){var J=[Wa,Ha].indexOf(V)>=0?1:-1,ie=[Mo,Ha].indexOf(V)>=0?"y":"x";H[V]+=de[ie]*J})}return H}function Qhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?rF:l,h=V0(r),p=h?s?HA:HA.filter(function(S){return V0(S)===h}):e2,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Pv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[_l(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function Jhe(e){if(_l(e)===A8)return[];var t=z3(e);return[UA(e),t,UA(t)]}function epe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=_l(E),k=P===E,T=l||(k||!S?[z3(E)]:Jhe(E)),M=[E].concat(T).reduce(function(xe,Be){return xe.concat(_l(Be)===A8?Qhe(t,{placement:Be,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):Be)},[]),R=t.rects.reference,I=t.rects.popper,N=new Map,z=!0,$=M[0],H=0;H=0,ie=J?"width":"height",ee=Pv(t,{placement:q,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),X=J?V?Wa:Oo:V?Ha:Mo;R[ie]>I[ie]&&(X=z3(X));var G=z3(X),Q=[];if(o&&Q.push(ee[de]<=0),s&&Q.push(ee[X]<=0,ee[G]<=0),Q.every(function(xe){return xe})){$=q,z=!1;break}N.set(q,Q)}if(z)for(var j=S?3:1,Z=function(Be){var We=M.find(function(dt){var Ye=N.get(dt);if(Ye)return Ye.slice(0,Be).every(function(rt){return rt})});if(We)return $=We,"break"},me=j;me>0;me--){var Se=Z(me);if(Se==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const tpe={name:"flip",enabled:!0,phase:"main",fn:epe,requiresIfExists:["offset"],data:{_skip:!1}};function jA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function YA(e){return[Mo,Wa,Ha,Oo].some(function(t){return e[t]>=0})}function npe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Pv(t,{elementContext:"reference"}),s=Pv(t,{altBoundary:!0}),l=jA(a,r),u=jA(s,i,o),h=YA(l),p=YA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const rpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:npe};function ipe(e,t,n){var r=_l(e),i=[Oo,Mo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Wa].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function ope(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=rF.reduce(function(h,p){return h[p]=ipe(p,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const ape={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ope};function spe(e){var t=e.state,n=e.name;t.modifiersData[n]=cF({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const lpe={name:"popperOffsets",enabled:!0,phase:"read",fn:spe,data:{}};function upe(e){return e==="x"?"y":"x"}function cpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=Pv(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),P=_l(t.placement),k=V0(t.placement),T=!k,M=O8(P),R=upe(M),I=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,H=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!I){if(o){var V,J=M==="y"?Mo:Oo,ie=M==="y"?Ha:Wa,ee=M==="y"?"height":"width",X=I[M],G=X+E[J],Q=X-E[ie],j=v?-z[ee]/2:0,Z=k===$0?N[ee]:z[ee],me=k===$0?-z[ee]:-N[ee],Se=t.elements.arrow,xe=v&&Se?M8(Se):{width:0,height:0},Be=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:aF(),We=Be[J],dt=Be[ie],Ye=Bm(0,N[ee],xe[ee]),rt=T?N[ee]/2-j-Ye-We-H.mainAxis:Z-Ye-We-H.mainAxis,Ze=T?-N[ee]/2+j+Ye+dt+H.mainAxis:me+Ye+dt+H.mainAxis,Ke=t.elements.arrow&&t2(t.elements.arrow),Et=Ke?M==="y"?Ke.clientTop||0:Ke.clientLeft||0:0,bt=(V=q?.[M])!=null?V:0,Ae=X+rt-bt-Et,it=X+Ze-bt,Ot=Bm(v?Y5(G,Ae):G,X,v?jf(Q,it):Q);I[M]=Ot,de[M]=Ot-X}if(s){var lt,xt=M==="x"?Mo:Oo,Cn=M==="x"?Ha:Wa,Pt=I[R],Kt=R==="y"?"height":"width",_n=Pt+E[xt],mn=Pt-E[Cn],Oe=[Mo,Oo].indexOf(P)!==-1,Je=(lt=q?.[R])!=null?lt:0,Xt=Oe?_n:Pt-N[Kt]-z[Kt]-Je+H.altAxis,jt=Oe?Pt+N[Kt]+z[Kt]-Je-H.altAxis:mn,ke=v&&Oe?Ihe(Xt,Pt,jt):Bm(v?Xt:_n,Pt,v?jt:mn);I[R]=ke,de[R]=ke-Pt}t.modifiersData[r]=de}}const dpe={name:"preventOverflow",enabled:!0,phase:"main",fn:cpe,requiresIfExists:["offset"]};function fpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function hpe(e){return e===Ua(e)||!za(e)?R8(e):fpe(e)}function ppe(e){var t=e.getBoundingClientRect(),n=H0(t.width)/e.offsetWidth||1,r=H0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function gpe(e,t,n){n===void 0&&(n=!1);var r=za(t),i=za(t)&&ppe(t),o=gd(t),a=W0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Tl(t)!=="body"||N8(o))&&(s=hpe(t)),za(t)?(l=W0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=I8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function mpe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function vpe(e){var t=mpe(e);return The.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function ype(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Spe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var qA={placement:"bottom",modifiers:[],strategy:"absolute"};function KA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:bp("--popper-arrow-shadow-color"),arrowSize:bp("--popper-arrow-size","8px"),arrowSizeHalf:bp("--popper-arrow-size-half"),arrowBg:bp("--popper-arrow-bg"),transformOrigin:bp("--popper-transform-origin"),arrowOffset:bp("--popper-arrow-offset")};function Cpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var _pe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},kpe=e=>_pe[e],XA={scroll:!0,resize:!0};function Epe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XA,...e}}:t={enabled:e,options:XA},t}var Ppe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Tpe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZA(e)},effect:({state:e})=>()=>{ZA(e)}},ZA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,kpe(e.placement))},Ape={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{Lpe(e)}},Lpe=e=>{var t;if(!e.placement)return;const n=Mpe(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Mpe=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Ope={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{QA(e)},effect:({state:e})=>()=>{QA(e)}},QA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:Cpe(e.placement)})},Rpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Ipe={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Npe(e,t="ltr"){var n;const r=((n=Rpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Ipe[e]??r}function dF(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=Npe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var H;!t||!S.current||!w.current||((H=k.current)==null||H.call(k),E.current=wpe(S.current,w.current,{placement:P,modifiers:[Ope,Ape,Tpe,{...Ppe,enabled:!!m},{name:"eventListeners",...Epe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var H;!S.current&&!w.current&&((H=E.current)==null||H.destroy(),E.current=null)},[]);const M=C.exports.useCallback(H=>{S.current=H,T()},[T]),R=C.exports.useCallback((H={},q=null)=>({...H,ref:Bn(M,q)}),[M]),I=C.exports.useCallback(H=>{w.current=H,T()},[T]),N=C.exports.useCallback((H={},q=null)=>({...H,ref:Bn(I,q),style:{...H.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,I,m]),z=C.exports.useCallback((H={},q=null)=>{const{size:de,shadowColor:V,bg:J,style:ie,...ee}=H;return{...ee,ref:q,"data-popper-arrow":"",style:Dpe(H)}},[]),$=C.exports.useCallback((H={},q=null)=>({...H,ref:q,"data-popper-arrow-inner":""}),[]);return{update(){var H;(H=E.current)==null||H.update()},forceUpdate(){var H;(H=E.current)==null||H.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:I,getPopperProps:N,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:R}}function Dpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function fF(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function zpe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Vf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=rhe(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function hF(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[Fpe,Bpe]=xn({strict:!1,name:"PortalManagerContext"});function pF(e){const{children:t,zIndex:n}=e;return x(Fpe,{value:{zIndex:n},children:t})}pF.displayName="PortalManager";var[gF,$pe]=xn({strict:!1,name:"PortalContext"}),D8="chakra-portal",Hpe=".chakra-portal",Wpe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Vpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=$pe(),l=Bpe();bs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=D8,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x(Wpe,{zIndex:l?.zIndex,children:n}):n;return o.current?Ol.exports.createPortal(x(gF,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},Upe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=D8),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Ol.exports.createPortal(x(gF,{value:r?a:null,children:t}),a):null};function uh(e){const{containerRef:t,...n}=e;return t?x(Upe,{containerRef:t,...n}):x(Vpe,{...n})}uh.defaultProps={appendToParentPortal:!0};uh.className=D8;uh.selector=Hpe;uh.displayName="Portal";var Gpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xp=new WeakMap,Dy=new WeakMap,zy={},Gx=0,jpe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];zy[n]||(zy[n]=new WeakMap);var o=zy[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(xp.get(m)||0)+1,E=(o.get(m)||0)+1;xp.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Dy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Gx++,function(){a.forEach(function(p){var m=xp.get(p)-1,v=o.get(p)-1;xp.set(p,m),o.set(p,v),m||(Dy.has(p)||p.removeAttribute(r),Dy.delete(p)),v||p.removeAttribute(n)}),Gx--,Gx||(xp=new WeakMap,xp=new WeakMap,Dy=new WeakMap,zy={})}},mF=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Gpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),jpe(r,i,n,"aria-hidden")):function(){return null}};function z8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Rn={exports:{}},Ype="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",qpe=Ype,Kpe=qpe;function vF(){}function yF(){}yF.resetWarningCache=vF;var Xpe=function(){function e(r,i,o,a,s,l){if(l!==Kpe){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:yF,resetWarningCache:vF};return n.PropTypes=n,n};Rn.exports=Xpe();var EC="data-focus-lock",SF="data-focus-lock-disabled",Zpe="data-no-focus-lock",Qpe="data-autofocus-inside",Jpe="data-no-autofocus";function e0e(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function t0e(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function bF(e,t){return t0e(t||null,function(n){return e.forEach(function(r){return e0e(r,n)})})}var jx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function xF(e){return e}function wF(e,t){t===void 0&&(t=xF);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function F8(e,t){return t===void 0&&(t=xF),wF(e,t)}function CF(e){e===void 0&&(e={});var t=wF(null);return t.options=pl({async:!0,ssr:!1},e),t}var _F=function(e){var t=e.sideCar,n=hz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...pl({},n)})};_F.isSideCarExport=!0;function n0e(e,t){return e.useMedium(t),_F}var kF=F8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),EF=F8(),r0e=F8(),i0e=CF({async:!0}),o0e=[],B8=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,R=M===void 0?o0e:M,I=t.as,N=I===void 0?"div":I,z=t.lockProps,$=z===void 0?{}:z,H=t.sideCar,q=t.returnFocus,de=t.focusOptions,V=t.onActivation,J=t.onDeactivation,ie=C.exports.useState({}),ee=ie[0],X=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Q=C.exports.useCallback(function(dt){var Ye=u.current;if(Ye&&Ye.focus){var rt=typeof q=="function"?q(Ye):q;if(rt){var Ze=typeof rt=="object"?rt:void 0;u.current=null,dt?Promise.resolve().then(function(){return Ye.focus(Ze)}):Ye.focus(Ze)}}},[q]),j=C.exports.useCallback(function(dt){l.current&&kF.useMedium(dt)},[]),Z=EF.useMedium,me=C.exports.useCallback(function(dt){s.current!==dt&&(s.current=dt,a(dt))},[]),Se=An((r={},r[SF]=p&&"disabled",r[EC]=E,r),$),xe=m!==!0,Be=xe&&m!=="tail",We=bF([n,me]);return re(Tn,{children:[xe&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:jx},"guard-nearest"):null],!p&&x(H,{id:ee,sideCar:i0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:R,onActivation:X,onDeactivation:G,returnFocus:Q,focusOptions:de}),x(N,{ref:We,...Se,className:P,onBlur:Z,onFocus:j,children:h}),Be&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:jx})]})});B8.propTypes={};B8.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const PF=B8;function PC(e,t){return PC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PC(e,t)}function $8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,PC(e,t)}function TF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){$8(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return TF(l,"displayName","SideEffect("+n(i)+")"),l}}var Il=function(e){for(var t=Array(e.length),n=0;n=0}).sort(p0e)},g0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],W8=g0e.join(","),m0e="".concat(W8,", [data-focus-guard]"),zF=function(e,t){var n;return Il(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?m0e:W8)?[i]:[],zF(i))},[])},V8=function(e,t){return e.reduce(function(n,r){return n.concat(zF(r,t),r.parentNode?Il(r.parentNode.querySelectorAll(W8)).filter(function(i){return i===r}):[])},[])},v0e=function(e){var t=e.querySelectorAll("[".concat(Qpe,"]"));return Il(t).map(function(n){return V8([n])}).reduce(function(n,r){return n.concat(r)},[])},U8=function(e,t){return Il(e).filter(function(n){return MF(t,n)}).filter(function(n){return d0e(n)})},JA=function(e,t){return t===void 0&&(t=new Map),Il(e).filter(function(n){return OF(t,n)})},AC=function(e,t,n){return DF(U8(V8(e,n),t),!0,n)},eL=function(e,t){return DF(U8(V8(e),t),!1)},y0e=function(e,t){return U8(v0e(e),t)},Tv=function(e,t){return e.shadowRoot?Tv(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Il(e.children).some(function(n){return Tv(n,t)})},S0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},FF=function(e){return e.parentNode?FF(e.parentNode):e},G8=function(e){var t=TC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(EC);return n.push.apply(n,i?S0e(Il(FF(r).querySelectorAll("[".concat(EC,'="').concat(i,'"]:not([').concat(SF,'="disabled"])')))):[r]),n},[])},BF=function(e){return e.activeElement?e.activeElement.shadowRoot?BF(e.activeElement.shadowRoot):e.activeElement:void 0},j8=function(){return document.activeElement?document.activeElement.shadowRoot?BF(document.activeElement.shadowRoot):document.activeElement:void 0},b0e=function(e){return e===document.activeElement},x0e=function(e){return Boolean(Il(e.querySelectorAll("iframe")).some(function(t){return b0e(t)}))},$F=function(e){var t=document&&j8();return!t||t.dataset&&t.dataset.focusGuard?!1:G8(e).some(function(n){return Tv(n,t)||x0e(n)})},w0e=function(){var e=document&&j8();return e?Il(document.querySelectorAll("[".concat(Zpe,"]"))).some(function(t){return Tv(t,e)}):!1},C0e=function(e,t){return t.filter(NF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},Y8=function(e,t){return NF(e)&&e.name?C0e(e,t):e},_0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(Y8(n,e))}),e.filter(function(n){return t.has(n)})},tL=function(e){return e[0]&&e.length>1?Y8(e[0],e):e[0]},nL=function(e,t){return e.length>1?e.indexOf(Y8(e[t],e)):t},HF="NEW_FOCUS",k0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=H8(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=_0e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=nL(e,0),k=nL(e,i-1);if(l===-1||h===-1)return HF;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return k;if(l>=v&&s&&Math.abs(p)>1)return P;if(p&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},E0e=function(e){return function(t){var n,r=(n=RF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},P0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=JA(r.filter(E0e(n)));return i&&i.length?tL(i):tL(JA(t))},LC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&LC(e.parentNode.host||e.parentNode,t),t},Yx=function(e,t){for(var n=LC(e),r=LC(t),i=0;i=0)return o}return!1},WF=function(e,t,n){var r=TC(e),i=TC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Yx(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Yx(o,l);u&&(!a||Tv(u,a)?a=u:a=Yx(u,a))})}),a},T0e=function(e,t){return e.reduce(function(n,r){return n.concat(y0e(r,t))},[])},A0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(h0e)},L0e=function(e,t){var n=document&&j8(),r=G8(e).filter(q5),i=WF(n||e,e,r),o=new Map,a=eL(r,o),s=AC(r,o).filter(function(m){var v=m.node;return q5(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=eL([i],o).map(function(m){var v=m.node;return v}),u=A0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=k0e(h,l,n,t);return p===HF?{node:P0e(a,h,T0e(r,o))}:p===void 0?p:u[p]}},M0e=function(e){var t=G8(e).filter(q5),n=WF(e,e,t),r=new Map,i=AC([n],r,!0),o=AC(t,r).filter(function(a){var s=a.node;return q5(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:H8(s)}})},O0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},qx=0,Kx=!1,R0e=function(e,t,n){n===void 0&&(n={});var r=L0e(e,t);if(!Kx&&r){if(qx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),Kx=!0,setTimeout(function(){Kx=!1},1);return}qx++,O0e(r.node,n.focusOptions),qx--}};const VF=R0e;function UF(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var I0e=function(){return document&&document.activeElement===document.body},N0e=function(){return I0e()||w0e()},v0=null,qp=null,y0=null,Av=!1,D0e=function(){return!0},z0e=function(t){return(v0.whiteList||D0e)(t)},F0e=function(t,n){y0={observerNode:t,portaledElement:n}},B0e=function(t){return y0&&y0.portaledElement===t};function rL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var $0e=function(t){return t&&"current"in t?t.current:t},H0e=function(t){return t?Boolean(Av):Av==="meanwhile"},W0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},V0e=function(t,n){return n.some(function(r){return W0e(t,r,r)})},K5=function(){var t=!1;if(v0){var n=v0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||y0&&y0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map($0e).filter(Boolean));if((!h||z0e(h))&&(i||H0e(s)||!N0e()||!qp&&o)&&(u&&!($F(p)||h&&V0e(h,p)||B0e(h))&&(document&&!qp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=VF(p,qp,{focusOptions:l}),y0={})),Av=!1,qp=document&&document.activeElement),document){var m=document&&document.activeElement,v=M0e(p),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),rL(S,v.length,1,v),rL(S,-1,-1,v))}}}return t},GF=function(t){K5()&&t&&(t.stopPropagation(),t.preventDefault())},q8=function(){return UF(K5)},U0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||F0e(r,n)},G0e=function(){return null},jF=function(){Av="just",setTimeout(function(){Av="meanwhile"},0)},j0e=function(){document.addEventListener("focusin",GF),document.addEventListener("focusout",q8),window.addEventListener("blur",jF)},Y0e=function(){document.removeEventListener("focusin",GF),document.removeEventListener("focusout",q8),window.removeEventListener("blur",jF)};function q0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function K0e(e){var t=e.slice(-1)[0];t&&!v0&&j0e();var n=v0,r=n&&t&&t.id===n.id;v0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(qp=null,(!r||n.observed!==t.observed)&&t.onActivation(),K5(),UF(K5)):(Y0e(),qp=null)}kF.assignSyncMedium(U0e);EF.assignMedium(q8);r0e.assignMedium(function(e){return e({moveFocusInside:VF,focusInside:$F})});const X0e=a0e(q0e,K0e)(G0e);var YF=C.exports.forwardRef(function(t,n){return x(PF,{sideCar:X0e,ref:n,...t})}),qF=PF.propTypes||{};qF.sideCar;z8(qF,["sideCar"]);YF.propTypes={};const Z0e=YF;var KF=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&tF(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(Z0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};KF.displayName="FocusLock";var F3="right-scroll-bar-position",B3="width-before-scroll-bar",Q0e="with-scroll-bars-hidden",J0e="--removed-body-scroll-bar-size",XF=CF(),Xx=function(){},_S=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Xx,onWheelCapture:Xx,onTouchMoveCapture:Xx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=hz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=bF([n,t]),R=pl(pl({},k),i);return re(Tn,{children:[h&&x(T,{sideCar:XF,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},R),{ref:M})):x(P,{...pl({},R,{className:l,ref:M}),children:s})]})});_S.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_S.classNames={fullWidth:B3,zeroRight:F3};var e1e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function t1e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=e1e();return t&&e.setAttribute("nonce",t),e}function n1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function r1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var i1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=t1e())&&(n1e(t,n),r1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},o1e=function(){var e=i1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ZF=function(){var e=o1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},a1e={left:0,top:0,right:0,gap:0},Zx=function(e){return parseInt(e||"",10)||0},s1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Zx(n),Zx(r),Zx(i)]},l1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return a1e;var t=s1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},u1e=ZF(),c1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + .`.concat(Q0e,` { + overflow: hidden `).concat(r,`; + padding-right: `).concat(s,"px ").concat(r,`; + } + body { + overflow: hidden `).concat(r,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(o,`px; + padding-right: `).concat(a,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(s,"px ").concat(r,`; + `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` + } + + .`).concat(F3,` { + right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(B3,` { + margin-right: `).concat(s,"px ").concat(r,`; + } + + .`).concat(F3," .").concat(F3,` { + right: 0 `).concat(r,`; + } + + .`).concat(B3," .").concat(B3,` { + margin-right: 0 `).concat(r,`; + } + + body { + `).concat(J0e,": ").concat(s,`px; + } +`)},d1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return l1e(i)},[i]);return x(u1e,{styles:c1e(o,!t,i,n?"":"!important")})},MC=!1;if(typeof window<"u")try{var Fy=Object.defineProperty({},"passive",{get:function(){return MC=!0,!0}});window.addEventListener("test",Fy,Fy),window.removeEventListener("test",Fy,Fy)}catch{MC=!1}var wp=MC?{passive:!1}:!1,f1e=function(e){return e.tagName==="TEXTAREA"},QF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!f1e(e)&&n[t]==="visible")},h1e=function(e){return QF(e,"overflowY")},p1e=function(e){return QF(e,"overflowX")},iL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=JF(e,n);if(r){var i=eB(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},g1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},m1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},JF=function(e,t){return e==="v"?h1e(t):p1e(t)},eB=function(e,t){return e==="v"?g1e(t):m1e(t)},v1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},y1e=function(e,t,n,r,i){var o=v1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=eB(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&JF(e,s)&&(p+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},By=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oL=function(e){return[e.deltaX,e.deltaY]},aL=function(e){return e&&"current"in e?e.current:e},S1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},b1e=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},x1e=0,Cp=[];function w1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(x1e++)[0],o=C.exports.useState(function(){return ZF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=gC([e.lockRef.current],(e.shards||[]).map(aL),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=By(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],R,I=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&I.type==="range")return!1;var z=iL(N,I);if(!z)return!0;if(z?R=N:(R=N==="v"?"h":"v",z=iL(N,I)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=R),!R)return!0;var $=r.current||R;return y1e($,E,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!Cp.length||Cp[Cp.length-1]!==o)){var P="deltaY"in E?oL(E):By(E),k=t.current.filter(function(R){return R.name===E.type&&R.target===E.target&&S1e(R.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(aL).filter(Boolean).filter(function(R){return R.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=By(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,oL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,By(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return Cp.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,wp),document.addEventListener("touchmove",l,wp),document.addEventListener("touchstart",h,wp),function(){Cp=Cp.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,wp),document.removeEventListener("touchmove",l,wp),document.removeEventListener("touchstart",h,wp)}},[]);var v=e.removeScrollBar,S=e.inert;return re(Tn,{children:[S?x(o,{styles:b1e(i)}):null,v?x(d1e,{gapMode:"margin"}):null]})}const C1e=n0e(XF,w1e);var tB=C.exports.forwardRef(function(e,t){return x(_S,{...pl({},e,{ref:t,sideCar:C1e})})});tB.classNames=_S.classNames;const nB=tB;var ch=(...e)=>e.filter(Boolean).join(" ");function im(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var _1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},OC=new _1e;function k1e(e,t){C.exports.useEffect(()=>(t&&OC.add(e),()=>{OC.remove(e)}),[t,e])}function E1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=T1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");P1e(u,t&&a),k1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),R=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:Bn($,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:im(z.onClick,H=>H.stopPropagation())}),[v,T,p,m,P]),I=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!OC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},$=null)=>({...z,ref:Bn($,h),onClick:im(z.onClick,I),onKeyDown:im(z.onKeyDown,E),onMouseDown:im(z.onMouseDown,w)}),[E,w,I]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:R,getDialogContainerProps:N}}function P1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return mF(e.current)},[t,e,n])}function T1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[A1e,dh]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[L1e,rd]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),U0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ri("Modal",e),E={...E1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x(L1e,{value:E,children:x(A1e,{value:S,children:x(fd,{onExitComplete:v,children:E.isOpen&&x(uh,{...t,children:n})})})})};U0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};U0.displayName="Modal";var Lv=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=rd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__body",n),s=dh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});Lv.displayName="ModalBody";var K8=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=rd(),a=ch("chakra-modal__close-btn",r),s=dh();return x(xS,{ref:t,__css:s.closeButton,className:a,onClick:im(n,l=>{l.stopPropagation(),o()}),...i})});K8.displayName="ModalCloseButton";function rB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=rd(),[p,m]=l8();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(KF,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(nB,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var M1e={slideInBottom:{...vC,custom:{offsetY:16,reverse:!0}},slideInRight:{...vC,custom:{offsetX:16,reverse:!0}},scale:{...mz,custom:{initialScale:.95,reverse:!0}},none:{}},O1e=we(Rl.section),R1e=e=>M1e[e||"none"],iB=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=R1e(n),...i}=e;return x(O1e,{ref:t,...r,...i})});iB.displayName="ModalTransition";var Mv=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=rd(),u=s(a,t),h=l(i),p=ch("chakra-modal__content",n),m=dh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=rd();return le.createElement(rB,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(iB,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Mv.displayName="ModalContent";var kS=Pe((e,t)=>{const{className:n,...r}=e,i=ch("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...dh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});kS.displayName="ModalFooter";var ES=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=rd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__header",n),l={flex:0,...dh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});ES.displayName="ModalHeader";var I1e=we(Rl.div),G0=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ch("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...dh().overlay},{motionPreset:u}=rd();return x(I1e,{...i||(u==="none"?{}:gz),__css:l,ref:t,className:a,...o})});G0.displayName="ModalOverlay";function oB(e){const{leastDestructiveRef:t,...n}=e;return x(U0,{...n,initialFocusRef:t})}var aB=Pe((e,t)=>x(Mv,{ref:t,role:"alertdialog",...e})),[OPe,N1e]=xn(),D1e=we(vz),z1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=rd(),h=s(a,t),p=l(o),m=ch("chakra-modal__content",n),v=dh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=N1e();return le.createElement(rB,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(D1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});z1e.displayName="DrawerContent";function F1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var sB=(...e)=>e.filter(Boolean).join(" "),Qx=e=>e?!0:void 0;function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var B1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),$1e=e=>x(ma,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function sL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var H1e=50,lL=300;function W1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);F1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?H1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},lL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},lL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var V1e=/^[Ee0-9+\-.]$/;function U1e(e){return V1e.test(e)}function G1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function j1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:R,onBlur:I,onInvalid:N,getAriaValueText:z,isValidCharacter:$,format:H,parse:q,...de}=e,V=cr(R),J=cr(I),ie=cr(N),ee=cr($??U1e),X=cr(z),G=cfe(e),{update:Q,increment:j,decrement:Z}=G,[me,Se]=C.exports.useState(!1),xe=!(s||l),Be=C.exports.useRef(null),We=C.exports.useRef(null),dt=C.exports.useRef(null),Ye=C.exports.useRef(null),rt=C.exports.useCallback(ke=>ke.split("").filter(ee).join(""),[ee]),Ze=C.exports.useCallback(ke=>q?.(ke)??ke,[q]),Ke=C.exports.useCallback(ke=>(H?.(ke)??ke).toString(),[H]);td(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Be.current)return;if(Be.current.value!=G.value){const Mt=Ze(Be.current.value);G.setValue(rt(Mt))}},[Ze,rt]);const Et=C.exports.useCallback((ke=a)=>{xe&&j(ke)},[j,xe,a]),bt=C.exports.useCallback((ke=a)=>{xe&&Z(ke)},[Z,xe,a]),Ae=W1e(Et,bt);sL(dt,"disabled",Ae.stop,Ae.isSpinning),sL(Ye,"disabled",Ae.stop,Ae.isSpinning);const it=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;const Ne=Ze(ke.currentTarget.value);Q(rt(Ne)),We.current={start:ke.currentTarget.selectionStart,end:ke.currentTarget.selectionEnd}},[Q,rt,Ze]),Ot=C.exports.useCallback(ke=>{var Mt;V?.(ke),We.current&&(ke.target.selectionStart=We.current.start??((Mt=ke.currentTarget.value)==null?void 0:Mt.length),ke.currentTarget.selectionEnd=We.current.end??ke.currentTarget.selectionStart)},[V]),lt=C.exports.useCallback(ke=>{if(ke.nativeEvent.isComposing)return;G1e(ke,ee)||ke.preventDefault();const Mt=xt(ke)*a,Ne=ke.key,an={ArrowUp:()=>Et(Mt),ArrowDown:()=>bt(Mt),Home:()=>Q(i),End:()=>Q(o)}[Ne];an&&(ke.preventDefault(),an(ke))},[ee,a,Et,bt,Q,i,o]),xt=ke=>{let Mt=1;return(ke.metaKey||ke.ctrlKey)&&(Mt=.1),ke.shiftKey&&(Mt=10),Mt},Cn=C.exports.useMemo(()=>{const ke=X?.(G.value);if(ke!=null)return ke;const Mt=G.value.toString();return Mt||void 0},[G.value,X]),Pt=C.exports.useCallback(()=>{let ke=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(ke=o),G.cast(ke))},[G,o,i]),Kt=C.exports.useCallback(()=>{Se(!1),n&&Pt()},[n,Se,Pt]),_n=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var ke;(ke=Be.current)==null||ke.focus()})},[t]),mn=C.exports.useCallback(ke=>{ke.preventDefault(),Ae.up(),_n()},[_n,Ae]),Oe=C.exports.useCallback(ke=>{ke.preventDefault(),Ae.down(),_n()},[_n,Ae]);Vf(()=>Be.current,"wheel",ke=>{var Mt;const at=(((Mt=Be.current)==null?void 0:Mt.ownerDocument)??document).activeElement===Be.current;if(!v||!at)return;ke.preventDefault();const an=xt(ke)*a,Nn=Math.sign(ke.deltaY);Nn===-1?Et(an):Nn===1&&bt(an)},{passive:!1});const Je=C.exports.useCallback((ke={},Mt=null)=>{const Ne=l||r&&G.isAtMax;return{...ke,ref:Bn(Mt,dt),role:"button",tabIndex:-1,onPointerDown:il(ke.onPointerDown,at=>{at.button!==0||Ne||mn(at)}),onPointerLeave:il(ke.onPointerLeave,Ae.stop),onPointerUp:il(ke.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMax,r,mn,Ae.stop,l]),Xt=C.exports.useCallback((ke={},Mt=null)=>{const Ne=l||r&&G.isAtMin;return{...ke,ref:Bn(Mt,Ye),role:"button",tabIndex:-1,onPointerDown:il(ke.onPointerDown,at=>{at.button!==0||Ne||Oe(at)}),onPointerLeave:il(ke.onPointerLeave,Ae.stop),onPointerUp:il(ke.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Qx(Ne)}},[G.isAtMin,r,Oe,Ae.stop,l]),jt=C.exports.useCallback((ke={},Mt=null)=>({name:P,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...ke,readOnly:ke.readOnly??s,"aria-readonly":ke.readOnly??s,"aria-required":ke.required??u,required:ke.required??u,ref:Bn(Be,Mt),value:Ke(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Qx(h??G.isOutOfRange),"aria-valuetext":Cn,autoComplete:"off",autoCorrect:"off",onChange:il(ke.onChange,it),onKeyDown:il(ke.onKeyDown,lt),onFocus:il(ke.onFocus,Ot,()=>Se(!0)),onBlur:il(ke.onBlur,J,Kt)}),[P,m,p,M,T,Ke,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,Cn,it,lt,Ot,J,Kt]);return{value:Ke(G.value),valueAsNumber:G.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:jt,htmlProps:de}}var[Y1e,PS]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[q1e,X8]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),Z8=Pe(function(t,n){const r=Ri("NumberInput",t),i=gn(t),o=b8(i),{htmlProps:a,...s}=j1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(q1e,{value:l},le.createElement(Y1e,{value:r},le.createElement(we.div,{...a,ref:n,className:sB("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});Z8.displayName="NumberInput";var lB=Pe(function(t,n){const r=PS();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});lB.displayName="NumberInputStepper";var Q8=Pe(function(t,n){const{getInputProps:r}=X8(),i=r(t,n),o=PS();return le.createElement(we.input,{...i,className:sB("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Q8.displayName="NumberInputField";var uB=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),J8=Pe(function(t,n){const r=PS(),{getDecrementButtonProps:i}=X8(),o=i(t,n);return x(uB,{...o,__css:r.stepper,children:t.children??x(B1e,{})})});J8.displayName="NumberDecrementStepper";var e_=Pe(function(t,n){const{getIncrementButtonProps:r}=X8(),i=r(t,n),o=PS();return x(uB,{...i,__css:o.stepper,children:t.children??x($1e,{})})});e_.displayName="NumberIncrementStepper";var n2=(...e)=>e.filter(Boolean).join(" ");function K1e(e,...t){return X1e(e)?e(...t):e}var X1e=e=>typeof e=="function";function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Z1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Q1e,fh]=xn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[J1e,r2]=xn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_p={click:"click",hover:"hover"};function ege(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=_p.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=fF(e),M=C.exports.useRef(null),R=C.exports.useRef(null),I=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,H]=C.exports.useState(!1),[q,de]=C.exports.useState(!1),V=C.exports.useId(),J=i??V,[ie,ee,X,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(it=>`${it}-${J}`),{referenceRef:Q,getArrowProps:j,getPopperProps:Z,getArrowInnerProps:me,forceUpdate:Se}=dF({...w,enabled:E||!!S}),xe=zpe({isOpen:E,ref:I});Sfe({enabled:E,ref:R}),hhe(I,{focusRef:R,visible:E,shouldFocus:o&&u===_p.click}),ghe(I,{focusRef:r,visible:E,shouldFocus:a&&u===_p.click});const Be=hF({wasSelected:z.current,enabled:m,mode:v,isSelected:xe.present}),We=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,style:{...it.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:Bn(I,Ot),children:Be?it.children:null,id:ee,tabIndex:-1,role:"dialog",onKeyDown:ol(it.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:ol(it.onBlur,xt=>{const Cn=uL(xt),Pt=Jx(I.current,Cn),Kt=Jx(R.current,Cn);E&&t&&(!Pt&&!Kt)&&P()}),"aria-labelledby":$?X:void 0,"aria-describedby":q?G:void 0};return u===_p.hover&&(lt.role="tooltip",lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0}),lt.onMouseLeave=ol(it.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),p))})),lt},[Be,ee,$,X,q,G,u,n,P,E,t,p,l,s]),dt=C.exports.useCallback((it={},Ot=null)=>Z({...it,style:{visibility:E?"visible":"hidden",...it.style}},Ot),[E,Z]),Ye=C.exports.useCallback((it,Ot=null)=>({...it,ref:Bn(Ot,M,Q)}),[M,Q]),rt=C.exports.useRef(),Ze=C.exports.useRef(),Ke=C.exports.useCallback(it=>{M.current==null&&Q(it)},[Q]),Et=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,ref:Bn(R,Ot,Ke),id:ie,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":ee};return u===_p.click&&(lt.onClick=ol(it.onClick,T)),u===_p.hover&&(lt.onFocus=ol(it.onFocus,()=>{rt.current===void 0&&k()}),lt.onBlur=ol(it.onBlur,xt=>{const Cn=uL(xt),Pt=!Jx(I.current,Cn);E&&t&&Pt&&P()}),lt.onKeyDown=ol(it.onKeyDown,xt=>{xt.key==="Escape"&&P()}),lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0,rt.current=window.setTimeout(()=>k(),h)}),lt.onMouseLeave=ol(it.onMouseLeave,()=>{N.current=!1,rt.current&&(clearTimeout(rt.current),rt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&P()},p)})),lt},[ie,E,ee,u,Ke,T,k,t,P,h,p]);C.exports.useEffect(()=>()=>{rt.current&&clearTimeout(rt.current),Ze.current&&clearTimeout(Ze.current)},[]);const bt=C.exports.useCallback((it={},Ot=null)=>({...it,id:X,ref:Bn(Ot,lt=>{H(!!lt)})}),[X]),Ae=C.exports.useCallback((it={},Ot=null)=>({...it,id:G,ref:Bn(Ot,lt=>{de(!!lt)})}),[G]);return{forceUpdate:Se,isOpen:E,onAnimationComplete:xe.onComplete,onClose:P,getAnchorProps:Ye,getArrowProps:j,getArrowInnerProps:me,getPopoverPositionerProps:dt,getPopoverProps:We,getTriggerProps:Et,getHeaderProps:bt,getBodyProps:Ae}}function Jx(e,t){return e===t||e?.contains(t)}function uL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function t_(e){const t=Ri("Popover",e),{children:n,...r}=gn(e),i=n1(),o=ege({...r,direction:i.direction});return x(Q1e,{value:o,children:x(J1e,{value:t,children:K1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}t_.displayName="Popover";function n_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=fh(),a=r2(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:n2("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}n_.displayName="PopoverArrow";var tge=Pe(function(t,n){const{getBodyProps:r}=fh(),i=r2();return le.createElement(we.div,{...r(t,n),className:n2("chakra-popover__body",t.className),__css:i.body})});tge.displayName="PopoverBody";var nge=Pe(function(t,n){const{onClose:r}=fh(),i=r2();return x(xS,{size:"sm",onClick:r,className:n2("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});nge.displayName="PopoverCloseButton";function rge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var ige={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},oge=we(Rl.section),cB=Pe(function(t,n){const{variants:r=ige,...i}=t,{isOpen:o}=fh();return le.createElement(oge,{ref:n,variants:rge(r),initial:!1,animate:o?"enter":"exit",...i})});cB.displayName="PopoverTransition";var r_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=fh(),u=r2(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(cB,{...i,...a(o,n),onAnimationComplete:Z1e(l,o.onAnimationComplete),className:n2("chakra-popover__content",t.className),__css:h}))});r_.displayName="PopoverContent";var age=Pe(function(t,n){const{getHeaderProps:r}=fh(),i=r2();return le.createElement(we.header,{...r(t,n),className:n2("chakra-popover__header",t.className),__css:i.header})});age.displayName="PopoverHeader";function i_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=fh();return C.exports.cloneElement(t,n(t.props,t.ref))}i_.displayName="PopoverTrigger";function sge(e,t,n){return(e-t)*100/(n-t)}var lge=dd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),uge=dd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),cge=dd({"0%":{left:"-40%"},"100%":{left:"100%"}}),dge=dd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function dB(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=sge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var fB=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${uge} 2s linear infinite`:void 0},...r})};fB.displayName="Shape";var RC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});RC.displayName="Circle";var fge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=dB({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${lge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},re(fB,{size:n,isIndeterminate:v,children:[x(RC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(RC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});fge.displayName="CircularProgress";var[hge,pge]=xn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),gge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=dB({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...pge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),hB=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=gn(e),E=Ri("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${dge} 1s linear infinite`},R={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${cge} 1s ease infinite normal none running`}},I={overflow:"hidden",position:"relative",...E.track};return le.createElement(we.div,{ref:t,borderRadius:P,__css:I,...w},re(hge,{value:E,children:[x(gge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:R,borderRadius:P,title:v,role:S}),l]}))});hB.displayName="Progress";var mge=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});mge.displayName="CircularProgressLabel";var vge=(...e)=>e.filter(Boolean).join(" "),yge=e=>e?"":void 0;function Sge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var pB=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:vge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});pB.displayName="SelectField";var gB=Pe((e,t)=>{var n;const r=Ri("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=gn(e),[w,E]=Sge(S,jZ),P=S8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(pB,{ref:t,height:u??l,minH:h??p,placeholder:o,...P,__css:T,children:e.children}),x(mB,{"data-disabled":yge(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});gB.displayName="Select";var bge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),xge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),mB=e=>{const{children:t=x(bge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(xge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};mB.displayName="SelectIcon";function wge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cge(e){const t=kge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function vB(e){return!!e.touches}function _ge(e){return vB(e)&&e.touches.length>1}function kge(e){return e.view??window}function Ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function Pge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function yB(e,t="page"){return vB(e)?Ege(e,t):Pge(e,t)}function Tge(e){return t=>{const n=Cge(t);(!n||n&&t.button===0)&&e(t)}}function Age(e,t=!1){function n(i){e(i,{point:yB(i)})}return t?Tge(n):n}function $3(e,t,n,r){return wge(e,t,Age(n,t==="pointerdown"),r)}function SB(e){const t=C.exports.useRef(null);return t.current=e,t}var Lge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,_ge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:yB(e)},{timestamp:i}=HP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,ew(r,this.history)),this.removeListeners=Rge($3(this.win,"pointermove",this.onPointerMove),$3(this.win,"pointerup",this.onPointerUp),$3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=ew(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Ige(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=HP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,iJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=ew(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),oJ.update(this.updatePoint)}};function cL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ew(e,t){return{point:e.point,delta:cL(e.point,t[t.length-1]),offset:cL(e.point,t[0]),velocity:Oge(t,.1)}}var Mge=e=>e*1e3;function Oge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Mge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Rge(...e){return t=>e.reduce((n,r)=>r(n),t)}function tw(e,t){return Math.abs(e-t)}function dL(e){return"x"in e&&"y"in e}function Ige(e,t){if(typeof e=="number"&&typeof t=="number")return tw(e,t);if(dL(e)&&dL(t)){const n=tw(e.x,t.x),r=tw(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function bB(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=SB({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new Lge(v,h.current,s)}return $3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Nge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var Dge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function zge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function xB({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return Dge(()=>{const a=e(),s=a.map((l,u)=>Nge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(zge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Fge(e){return typeof e=="object"&&e!==null&&"current"in e}function Bge(e){const[t]=xB({observeMutation:!1,getNodes(){return[Fge(e)?e.current:e]}});return t}var $ge=Object.getOwnPropertyNames,Hge=(e,t)=>function(){return e&&(t=(0,e[$ge(e)[0]])(e=0)),t},md=Hge({"../../../react-shim.js"(){}});md();md();md();var Oa=e=>e?"":void 0,S0=e=>e?!0:void 0,vd=(...e)=>e.filter(Boolean).join(" ");md();function b0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}md();md();function Wge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function om(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var H3={width:0,height:0},$y=e=>e||H3;function wB(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??H3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...om({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>$y(w).height>$y(E).height?w:E,H3):r.reduce((w,E)=>$y(w).width>$y(E).width?w:E,H3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...om({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...om({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...om({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function CB(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Vge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:R=0,...I}=e,N=cr(m),z=cr(v),$=cr(w),H=CB({isReversed:a,direction:s,orientation:l}),[q,de]=nS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(q))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof q}\``);const[V,J]=C.exports.useState(!1),[ie,ee]=C.exports.useState(!1),[X,G]=C.exports.useState(-1),Q=!(h||p),j=C.exports.useRef(q),Z=q.map($e=>m0($e,t,n)),me=R*S,Se=Uge(Z,t,n,me),xe=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});xe.current.value=Z,xe.current.valueBounds=Se;const Be=Z.map($e=>n-$e+t),dt=(H?Be:Z).map($e=>j5($e,t,n)),Ye=l==="vertical",rt=C.exports.useRef(null),Ze=C.exports.useRef(null),Ke=xB({getNodes(){const $e=Ze.current,ft=$e?.querySelectorAll("[role=slider]");return ft?Array.from(ft):[]}}),Et=C.exports.useId(),Ae=Wge(u??Et),it=C.exports.useCallback($e=>{var ft;if(!rt.current)return;xe.current.eventSource="pointer";const tt=rt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((ft=$e.touches)==null?void 0:ft[0])??$e,Qn=Ye?tt.bottom-Zt:Nt-tt.left,lo=Ye?tt.height:tt.width;let pi=Qn/lo;return H&&(pi=1-pi),Pz(pi,t,n)},[Ye,H,n,t]),Ot=(n-t)/10,lt=S||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,ft){if(!Q)return;const tt=xe.current.valueBounds[$e];ft=parseFloat(wC(ft,tt.min,lt)),ft=m0(ft,tt.min,tt.max);const Nt=[...xe.current.value];Nt[$e]=ft,de(Nt)},setActiveIndex:G,stepUp($e,ft=lt){const tt=xe.current.value[$e],Nt=H?tt-ft:tt+ft;xt.setValueAtIndex($e,Nt)},stepDown($e,ft=lt){const tt=xe.current.value[$e],Nt=H?tt+ft:tt-ft;xt.setValueAtIndex($e,Nt)},reset(){de(j.current)}}),[lt,H,de,Q]),Cn=C.exports.useCallback($e=>{const ft=$e.key,Nt={ArrowRight:()=>xt.stepUp(X),ArrowUp:()=>xt.stepUp(X),ArrowLeft:()=>xt.stepDown(X),ArrowDown:()=>xt.stepDown(X),PageUp:()=>xt.stepUp(X,Ot),PageDown:()=>xt.stepDown(X,Ot),Home:()=>{const{min:Zt}=Se[X];xt.setValueAtIndex(X,Zt)},End:()=>{const{max:Zt}=Se[X];xt.setValueAtIndex(X,Zt)}}[ft];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),xe.current.eventSource="keyboard")},[xt,X,Ot,Se]),{getThumbStyle:Pt,rootStyle:Kt,trackStyle:_n,innerTrackStyle:mn}=C.exports.useMemo(()=>wB({isReversed:H,orientation:l,thumbRects:Ke,thumbPercents:dt}),[H,l,dt,Ke]),Oe=C.exports.useCallback($e=>{var ft;const tt=$e??X;if(tt!==-1&&M){const Nt=Ae.getThumb(tt),Zt=(ft=Ze.current)==null?void 0:ft.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,X,Ae]);td(()=>{xe.current.eventSource==="keyboard"&&z?.(xe.current.value)},[Z,z]);const Je=$e=>{const ft=it($e)||0,tt=xe.current.value.map(pi=>Math.abs(pi-ft)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const Qn=tt.filter(pi=>pi===Nt);Qn.length>1&&ft>xe.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),xt.setValueAtIndex(Zt,ft),Oe(Zt)},Xt=$e=>{if(X==-1)return;const ft=it($e)||0;G(X),xt.setValueAtIndex(X,ft),Oe(X)};bB(Ze,{onPanSessionStart($e){!Q||(J(!0),Je($e),N?.(xe.current.value))},onPanSessionEnd(){!Q||(J(!1),z?.(xe.current.value))},onPan($e){!Q||Xt($e)}});const jt=C.exports.useCallback(($e={},ft=null)=>({...$e,...I,id:Ae.root,ref:Bn(ft,Ze),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Oa(ie),style:{...$e.style,...Kt}}),[I,h,ie,Kt,Ae]),ke=C.exports.useCallback(($e={},ft=null)=>({...$e,ref:Bn(ft,rt),id:Ae.track,"data-disabled":Oa(h),style:{...$e.style,..._n}}),[h,_n,Ae]),Mt=C.exports.useCallback(($e={},ft=null)=>({...$e,ref:ft,id:Ae.innerTrack,style:{...$e.style,...mn}}),[mn,Ae]),Ne=C.exports.useCallback(($e,ft=null)=>{const{index:tt,...Nt}=$e,Zt=Z[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${Z.length}`);const Qn=Se[tt];return{...Nt,ref:ft,role:"slider",tabIndex:Q?0:void 0,id:Ae.getThumb(tt),"data-active":Oa(V&&X===tt),"aria-valuetext":$?.(Zt)??E?.[tt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...$e.style,...Pt(tt)},onKeyDown:b0($e.onKeyDown,Cn),onFocus:b0($e.onFocus,()=>{ee(!0),G(tt)}),onBlur:b0($e.onBlur,()=>{ee(!1),G(-1)})}},[Ae,Z,Se,Q,V,X,$,E,l,h,p,P,k,Pt,Cn,ee]),at=C.exports.useCallback(($e={},ft=null)=>({...$e,ref:ft,id:Ae.output,htmlFor:Z.map((tt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,Z]),an=C.exports.useCallback(($e,ft=null)=>{const{value:tt,...Nt}=$e,Zt=!(ttn),Qn=tt>=Z[0]&&tt<=Z[Z.length-1];let lo=j5(tt,t,n);lo=H?100-lo:lo;const pi={position:"absolute",pointerEvents:"none",...om({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:ft,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!Zt),"data-highlighted":Oa(Qn),style:{...$e.style,...pi}}},[h,H,n,t,l,Z,Ae]),Nn=C.exports.useCallback(($e,ft=null)=>{const{index:tt,...Nt}=$e;return{...Nt,ref:ft,id:Ae.getInput(tt),type:"hidden",value:Z[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,Z,Ae]);return{state:{value:Z,isFocused:ie,isDragging:V,getThumbPercent:$e=>dt[$e],getThumbMinValue:$e=>Se[$e].min,getThumbMaxValue:$e=>Se[$e].max},actions:xt,getRootProps:jt,getTrackProps:ke,getInnerTrackProps:Mt,getThumbProps:Ne,getMarkerProps:an,getInputProps:Nn,getOutputProps:at}}function Uge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Gge,TS]=xn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[jge,o_]=xn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_B=Pe(function(t,n){const r=Ri("Slider",t),i=gn(t),{direction:o}=n1();i.direction=o;const{getRootProps:a,...s}=Vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(Gge,{value:l},le.createElement(jge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});_B.defaultProps={orientation:"horizontal"};_B.displayName="RangeSlider";var Yge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=TS(),a=o_(),s=r(t,n);return le.createElement(we.div,{...s,className:vd("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Yge.displayName="RangeSliderThumb";var qge=Pe(function(t,n){const{getTrackProps:r}=TS(),i=o_(),o=r(t,n);return le.createElement(we.div,{...o,className:vd("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});qge.displayName="RangeSliderTrack";var Kge=Pe(function(t,n){const{getInnerTrackProps:r}=TS(),i=o_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Kge.displayName="RangeSliderFilledTrack";var Xge=Pe(function(t,n){const{getMarkerProps:r}=TS(),i=r(t,n);return le.createElement(we.div,{...i,className:vd("chakra-slider__marker",t.className)})});Xge.displayName="RangeSliderMark";md();md();function Zge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...R}=e,I=cr(m),N=cr(v),z=cr(w),$=CB({isReversed:a,direction:s,orientation:l}),[H,q]=nS({value:i,defaultValue:o??Jge(t,n),onChange:r}),[de,V]=C.exports.useState(!1),[J,ie]=C.exports.useState(!1),ee=!(h||p),X=(n-t)/10,G=S||(n-t)/100,Q=m0(H,t,n),j=n-Q+t,me=j5($?j:Q,t,n),Se=l==="vertical",xe=SB({min:t,max:n,step:S,isDisabled:h,value:Q,isInteractive:ee,isReversed:$,isVertical:Se,eventSource:null,focusThumbOnChange:M,orientation:l}),Be=C.exports.useRef(null),We=C.exports.useRef(null),dt=C.exports.useRef(null),Ye=C.exports.useId(),rt=u??Ye,[Ze,Ke]=[`slider-thumb-${rt}`,`slider-track-${rt}`],Et=C.exports.useCallback(Ne=>{var at;if(!Be.current)return;const an=xe.current;an.eventSource="pointer";const Nn=Be.current.getBoundingClientRect(),{clientX:$e,clientY:ft}=((at=Ne.touches)==null?void 0:at[0])??Ne,tt=Se?Nn.bottom-ft:$e-Nn.left,Nt=Se?Nn.height:Nn.width;let Zt=tt/Nt;$&&(Zt=1-Zt);let Qn=Pz(Zt,an.min,an.max);return an.step&&(Qn=parseFloat(wC(Qn,an.min,an.step))),Qn=m0(Qn,an.min,an.max),Qn},[Se,$,xe]),bt=C.exports.useCallback(Ne=>{const at=xe.current;!at.isInteractive||(Ne=parseFloat(wC(Ne,at.min,G)),Ne=m0(Ne,at.min,at.max),q(Ne))},[G,q,xe]),Ae=C.exports.useMemo(()=>({stepUp(Ne=G){const at=$?Q-Ne:Q+Ne;bt(at)},stepDown(Ne=G){const at=$?Q+Ne:Q-Ne;bt(at)},reset(){bt(o||0)},stepTo(Ne){bt(Ne)}}),[bt,$,Q,G,o]),it=C.exports.useCallback(Ne=>{const at=xe.current,Nn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(X),PageDown:()=>Ae.stepDown(X),Home:()=>bt(at.min),End:()=>bt(at.max)}[Ne.key];Nn&&(Ne.preventDefault(),Ne.stopPropagation(),Nn(Ne),at.eventSource="keyboard")},[Ae,bt,X,xe]),Ot=z?.(Q)??E,lt=Bge(We),{getThumbStyle:xt,rootStyle:Cn,trackStyle:Pt,innerTrackStyle:Kt}=C.exports.useMemo(()=>{const Ne=xe.current,at=lt??{width:0,height:0};return wB({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,lt,me,xe]),_n=C.exports.useCallback(()=>{xe.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=We.current)==null?void 0:at.focus()})},[xe]);td(()=>{const Ne=xe.current;_n(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Q,N]);function mn(Ne){const at=Et(Ne);at!=null&&at!==xe.current.value&&q(at)}bB(dt,{onPanSessionStart(Ne){const at=xe.current;!at.isInteractive||(V(!0),_n(),mn(Ne),I?.(at.value))},onPanSessionEnd(){const Ne=xe.current;!Ne.isInteractive||(V(!1),N?.(Ne.value))},onPan(Ne){!xe.current.isInteractive||mn(Ne)}});const Oe=C.exports.useCallback((Ne={},at=null)=>({...Ne,...R,ref:Bn(at,dt),tabIndex:-1,"aria-disabled":S0(h),"data-focused":Oa(J),style:{...Ne.style,...Cn}}),[R,h,J,Cn]),Je=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:Bn(at,Be),id:Ke,"data-disabled":Oa(h),style:{...Ne.style,...Pt}}),[h,Ke,Pt]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Kt}}),[Kt]),jt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:Bn(at,We),role:"slider",tabIndex:ee?0:void 0,id:Ze,"data-active":Oa(de),"aria-valuetext":Ot,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":S0(h),"aria-readonly":S0(p),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:b0(Ne.onKeyDown,it),onFocus:b0(Ne.onFocus,()=>ie(!0)),onBlur:b0(Ne.onBlur,()=>ie(!1))}),[ee,Ze,de,Ot,t,n,Q,l,h,p,P,k,xt,it]),ke=C.exports.useCallback((Ne,at=null)=>{const an=!(Ne.valuen),Nn=Q>=Ne.value,$e=j5(Ne.value,t,n),ft={position:"absolute",pointerEvents:"none",...Qge({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":Oa(h),"data-invalid":Oa(!an),"data-highlighted":Oa(Nn),style:{...Ne.style,...ft}}},[h,$,n,t,l,Q]),Mt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:Q,name:T}),[T,Q]);return{state:{value:Q,isFocused:J,isDragging:de},actions:Ae,getRootProps:Oe,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:jt,getMarkerProps:ke,getInputProps:Mt}}function Qge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Jge(e,t){return t"}),[tme,LS]=xn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),a_=Pe((e,t)=>{const n=Ri("Slider",e),r=gn(e),{direction:i}=n1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Zge(r),l=a(),u=o({},t);return le.createElement(eme,{value:s},le.createElement(tme,{value:n},le.createElement(we.div,{...l,className:vd("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});a_.defaultProps={orientation:"horizontal"};a_.displayName="Slider";var kB=Pe((e,t)=>{const{getThumbProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__thumb",e.className),__css:r.thumb})});kB.displayName="SliderThumb";var EB=Pe((e,t)=>{const{getTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__track",e.className),__css:r.track})});EB.displayName="SliderTrack";var PB=Pe((e,t)=>{const{getInnerTrackProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__filled-track",e.className),__css:r.filledTrack})});PB.displayName="SliderFilledTrack";var IC=Pe((e,t)=>{const{getMarkerProps:n}=AS(),r=LS(),i=n(e,t);return le.createElement(we.div,{...i,className:vd("chakra-slider__marker",e.className),__css:r.mark})});IC.displayName="SliderMark";var nme=(...e)=>e.filter(Boolean).join(" "),fL=e=>e?"":void 0,s_=Pe(function(t,n){const r=Ri("Switch",t),{spacing:i="0.5rem",children:o,...a}=gn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=kz(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:nme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":fL(s.isChecked),"data-hover":fL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});s_.displayName="Switch";var l1=(...e)=>e.filter(Boolean).join(" ");function NC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[rme,TB,ime,ome]=FN();function ame(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=nS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=ime(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[sme,i2]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function lme(e){const{focusedIndex:t,orientation:n,direction:r}=i2(),i=TB(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:NC(e.onKeyDown,o)}}function ume(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=i2(),{index:u,register:h}=ome({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=nhe({...r,ref:Bn(h,e.ref),isDisabled:t,isFocusable:n,onClick:NC(e.onClick,m)}),w="button";return{...S,id:AB(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":LB(a,u),onFocus:t?void 0:NC(e.onFocus,v)}}var[cme,dme]=xn({});function fme(e){const t=i2(),{id:n,selectedIndex:r}=t,o=yS(e.children).map((a,s)=>C.exports.createElement(cme,{key:s,value:{isSelected:s===r,id:LB(n,s),tabId:AB(n,s),selectedIndex:r}},a));return{...e,children:o}}function hme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=i2(),{isSelected:o,id:a,tabId:s}=dme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=hF({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function pme(){const e=i2(),t=TB(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function AB(e,t){return`${e}--tab-${t}`}function LB(e,t){return`${e}--tabpanel-${t}`}var[gme,o2]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),MB=Pe(function(t,n){const r=Ri("Tabs",t),{children:i,className:o,...a}=gn(t),{htmlProps:s,descendants:l,...u}=ame(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(rme,{value:l},le.createElement(sme,{value:h},le.createElement(gme,{value:r},le.createElement(we.div,{className:l1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});MB.displayName="Tabs";var mme=Pe(function(t,n){const r=pme(),i={...t.style,...r},o=o2();return le.createElement(we.div,{ref:n,...t,className:l1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});mme.displayName="TabIndicator";var vme=Pe(function(t,n){const r=lme({...t,ref:n}),o={display:"flex",...o2().tablist};return le.createElement(we.div,{...r,className:l1("chakra-tabs__tablist",t.className),__css:o})});vme.displayName="TabList";var OB=Pe(function(t,n){const r=hme({...t,ref:n}),i=o2();return le.createElement(we.div,{outline:"0",...r,className:l1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});OB.displayName="TabPanel";var RB=Pe(function(t,n){const r=fme(t),i=o2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:l1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});RB.displayName="TabPanels";var IB=Pe(function(t,n){const r=o2(),i=ume({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:l1("chakra-tabs__tab",t.className),__css:o})});IB.displayName="Tab";var yme=(...e)=>e.filter(Boolean).join(" ");function Sme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var bme=["h","minH","height","minHeight"],NB=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=gn(e),a=S8(o),s=i?Sme(n,bme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:yme("chakra-textarea",r),__css:s})});NB.displayName="Textarea";function xme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function DC(e,...t){return wme(e)?e(...t):e}var wme=e=>typeof e=="function";function Cme(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var _me=(e,t)=>e.find(n=>n.id===t);function hL(e,t){const n=DB(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function DB(e,t){for(const[n,r]of Object.entries(e))if(_me(r,t))return n}function kme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Eme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var Pme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=Tme(Pme);function Tme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Ame(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=hL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:zB(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=DB(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(hL(gl.getState(),i).position)}}var pL=0;function Ame(e,t={}){pL+=1;const n=t.id??pL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Lme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(Sz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(xz,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(wz,{id:u?.title,children:i}),s&&x(bz,{id:u?.description,display:"block",children:s})),o&&x(xS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function zB(e={}){const{render:t,toastComponent:n=Lme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Mme(e,t){const n=i=>({...t,...i,position:Cme(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=zB(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...DC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...DC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function u1(e){const{theme:t}=NN();return C.exports.useMemo(()=>Mme(t.direction,e),[e,t.direction])}var Ome={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},FB=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Ome,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Rle();td(()=>{v||r?.()},[v]),td(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),xme(E,p);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>kme(a),[a]);return le.createElement(Rl.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},DC(n,{id:t,onClose:E})))});FB.displayName="ToastComponent";var Rme=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=FB,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Eme(l),children:x(fd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return re(Tn,{children:[n,x(uh,{...o,children:s})]})};function Ime(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Nme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Dme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function $g(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var X5=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},zC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function zme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:R,...I}=e,{isOpen:N,onOpen:z,onClose:$}=fF({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:H,getPopperProps:q,getArrowInnerProps:de,getArrowProps:V}=dF({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:R}),J=C.exports.useId(),ee=`tooltip-${p??J}`,X=C.exports.useRef(null),G=C.exports.useRef(),Q=C.exports.useRef(),j=C.exports.useCallback(()=>{Q.current&&(clearTimeout(Q.current),Q.current=void 0),$()},[$]),Z=Fme(X,j),me=C.exports.useCallback(()=>{if(!k&&!G.current){Z();const Ze=zC(X);G.current=Ze.setTimeout(z,t)}},[Z,k,z,t]),Se=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=zC(X);Q.current=Ze.setTimeout(j,n)},[n,j]),xe=C.exports.useCallback(()=>{N&&r&&Se()},[r,Se,N]),Be=C.exports.useCallback(()=>{N&&a&&Se()},[a,Se,N]),We=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&Se()},[N,Se]);Vf(()=>X5(X),"keydown",s?We:void 0),Vf(()=>X5(X),"scroll",()=>{N&&o&&j()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Q.current)},[]),Vf(()=>X.current,"pointerleave",Se);const dt=C.exports.useCallback((Ze={},Ke=null)=>({...Ze,ref:Bn(X,Ke,H),onPointerEnter:$g(Ze.onPointerEnter,bt=>{bt.pointerType!=="touch"&&me()}),onClick:$g(Ze.onClick,xe),onPointerDown:$g(Ze.onPointerDown,Be),onFocus:$g(Ze.onFocus,me),onBlur:$g(Ze.onBlur,Se),"aria-describedby":N?ee:void 0}),[me,Se,Be,N,ee,xe,H]),Ye=C.exports.useCallback((Ze={},Ke=null)=>q({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},Ke),[q,S,w]),rt=C.exports.useCallback((Ze={},Ke=null)=>{const Et={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:Ke,...I,...Ze,id:ee,role:"tooltip",style:Et}},[I,ee]);return{isOpen:N,show:me,hide:Se,getTriggerProps:dt,getTooltipProps:rt,getTooltipPositionerProps:Ye,getArrowProps:V,getArrowInnerProps:de}}var nw="chakra-ui:close-tooltip";function Fme(e,t){return C.exports.useEffect(()=>{const n=X5(e);return n.addEventListener(nw,t),()=>n.removeEventListener(nw,t)},[t,e]),()=>{const n=X5(e),r=zC(e);n.dispatchEvent(new r.CustomEvent(nw))}}var Bme=we(Rl.div),Oi=Pe((e,t)=>{const n=so("Tooltip",e),r=gn(e),i=n1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=m??v??h??S;if(P){n.bg=P;const $=aQ(i,"colors",P);n[Hr.arrowBg.var]=$}const k=zme({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);M=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const R=!!l,I=k.getTooltipProps({},t),N=R?Ime(I,["role","id"]):I,z=Nme(I,["role","id"]);return a?re(Tn,{children:[M,x(fd,{children:k.isOpen&&le.createElement(uh,{...p},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},re(Bme,{variants:Dme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,R&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Tn,{children:o})});Oi.displayName="Tooltip";var $me=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(qz,{environment:a,children:t});return x(joe,{theme:o,cssVarsRoot:s,children:re(FI,{colorModeManager:n,options:o.config,children:[i?x(ffe,{}):x(dfe,{}),x(qoe,{}),r?x(pF,{zIndex:r,children:l}):l]})})};function Hme({children:e,theme:t=zoe,toastOptions:n,...r}){return re($me,{theme:t,...r,children:[e,x(Rme,{...n})]})}function vs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:l_(e)?2:u_(e)?3:0}function x0(e,t){return c1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wme(e,t){return c1(e)===2?e.get(t):e[t]}function BB(e,t,n){var r=c1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function $B(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function l_(e){return qme&&e instanceof Map}function u_(e){return Kme&&e instanceof Set}function Sf(e){return e.o||e.t}function c_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=WB(e);delete t[tr];for(var n=w0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Vme),Object.freeze(e),t&&eh(e,function(n,r){return d_(r,!0)},!0)),e}function Vme(){vs(2)}function f_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function kl(e){var t=HC[e];return t||vs(18,e),t}function Ume(e,t){HC[e]||(HC[e]=t)}function FC(){return Ov}function rw(e,t){t&&(kl("Patches"),e.u=[],e.s=[],e.v=t)}function Z5(e){BC(e),e.p.forEach(Gme),e.p=null}function BC(e){e===Ov&&(Ov=e.l)}function gL(e){return Ov={p:[],l:Ov,h:e,m:!0,_:0}}function Gme(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function iw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||kl("ES5").S(t,e,r),r?(n[tr].P&&(Z5(t),vs(4)),xu(e)&&(e=Q5(t,e),t.l||J5(t,e)),t.u&&kl("Patches").M(n[tr].t,e,t.u,t.s)):e=Q5(t,n,[]),Z5(t),t.u&&t.v(t.u,t.s),e!==HB?e:void 0}function Q5(e,t,n){if(f_(t))return t;var r=t[tr];if(!r)return eh(t,function(o,a){return mL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return J5(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=c_(r.k):r.o;eh(r.i===3?new Set(i):i,function(o,a){return mL(e,r,i,o,a,n)}),J5(e,i,!1),n&&e.u&&kl("Patches").R(r,n,e.u,e.s)}return r.o}function mL(e,t,n,r,i,o){if(id(i)){var a=Q5(e,i,o&&t&&t.i!==3&&!x0(t.D,r)?o.concat(r):void 0);if(BB(n,r,a),!id(a))return;e.m=!1}if(xu(i)&&!f_(i)){if(!e.h.F&&e._<1)return;Q5(e,i),t&&t.A.l||J5(e,i)}}function J5(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&d_(t,n)}function ow(e,t){var n=e[tr];return(n?Sf(n):e)[t]}function vL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Oc(e){e.P||(e.P=!0,e.l&&Oc(e.l))}function aw(e){e.o||(e.o=c_(e.t))}function $C(e,t,n){var r=l_(t)?kl("MapSet").N(t,n):u_(t)?kl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:FC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Rv;a&&(l=[s],u=am);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):kl("ES5").J(t,n);return(n?n.A:FC()).p.push(r),r}function jme(e){return id(e)||vs(22,e),function t(n){if(!xu(n))return n;var r,i=n[tr],o=c1(n);if(i){if(!i.P&&(i.i<4||!kl("ES5").K(i)))return i.t;i.I=!0,r=yL(n,o),i.I=!1}else r=yL(n,o);return eh(r,function(a,s){i&&Wme(i.t,a)===s||BB(r,a,t(s))}),o===3?new Set(r):r}(e)}function yL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return c_(e)}function Yme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[tr];return Rv.get(l,o)},set:function(l){var u=this[tr];Rv.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Oc(s);break;case 4:n(s)&&Oc(s)}}}function n(o){for(var a=o.t,s=o.k,l=w0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!x0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!$B(m,p))return!0}}var S=!!a[tr];return l.length!==w0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=kl("Patches").$;return id(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),fa=new Zme,VB=fa.produce;fa.produceWithPatches.bind(fa);fa.setAutoFreeze.bind(fa);fa.setUseProxies.bind(fa);fa.applyPatches.bind(fa);fa.createDraft.bind(fa);fa.finishDraft.bind(fa);function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(p_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Qme(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:e4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function UB(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function t4(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return n4}function i(s,l){r(s)===n4&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var rve=function(t,n){return t===n};function ive(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$ve:Bve;KB.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Hve;(function(e){e.exports=KB})(qB);var XB={exports:{}},ZB={};/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var OS=C.exports,Wve=qB.exports;function Vve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uve=typeof Object.is=="function"?Object.is:Vve,Gve=Wve.useSyncExternalStore,jve=OS.useRef,Yve=OS.useEffect,qve=OS.useMemo,Kve=OS.useDebugValue;ZB.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=jve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=qve(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,Uve(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Gve(e,o[0],o[1]);return Yve(function(){a.hasValue=!0,a.value=s},[s]),Kve(s),s};(function(e){e.exports=ZB})(XB);function Xve(e){e()}let QB=Xve;const Zve=e=>QB=e,Qve=()=>QB,od=C.exports.createContext(null);function JB(){return C.exports.useContext(od)}const Jve=()=>{throw new Error("uSES not initialized!")};let e$=Jve;const e2e=e=>{e$=e},t2e=(e,t)=>e===t;function n2e(e=od){const t=e===od?JB:()=>C.exports.useContext(e);return function(r,i=t2e){const{store:o,subscription:a,getServerState:s}=t(),l=e$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const r2e=n2e();var i2e={exports:{}},On={};/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var m_=Symbol.for("react.element"),v_=Symbol.for("react.portal"),RS=Symbol.for("react.fragment"),IS=Symbol.for("react.strict_mode"),NS=Symbol.for("react.profiler"),DS=Symbol.for("react.provider"),zS=Symbol.for("react.context"),o2e=Symbol.for("react.server_context"),FS=Symbol.for("react.forward_ref"),BS=Symbol.for("react.suspense"),$S=Symbol.for("react.suspense_list"),HS=Symbol.for("react.memo"),WS=Symbol.for("react.lazy"),a2e=Symbol.for("react.offscreen"),t$;t$=Symbol.for("react.module.reference");function Ga(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case m_:switch(e=e.type,e){case RS:case NS:case IS:case BS:case $S:return e;default:switch(e=e&&e.$$typeof,e){case o2e:case zS:case FS:case WS:case HS:case DS:return e;default:return t}}case v_:return t}}}On.ContextConsumer=zS;On.ContextProvider=DS;On.Element=m_;On.ForwardRef=FS;On.Fragment=RS;On.Lazy=WS;On.Memo=HS;On.Portal=v_;On.Profiler=NS;On.StrictMode=IS;On.Suspense=BS;On.SuspenseList=$S;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Ga(e)===zS};On.isContextProvider=function(e){return Ga(e)===DS};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m_};On.isForwardRef=function(e){return Ga(e)===FS};On.isFragment=function(e){return Ga(e)===RS};On.isLazy=function(e){return Ga(e)===WS};On.isMemo=function(e){return Ga(e)===HS};On.isPortal=function(e){return Ga(e)===v_};On.isProfiler=function(e){return Ga(e)===NS};On.isStrictMode=function(e){return Ga(e)===IS};On.isSuspense=function(e){return Ga(e)===BS};On.isSuspenseList=function(e){return Ga(e)===$S};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===RS||e===NS||e===IS||e===BS||e===$S||e===a2e||typeof e=="object"&&e!==null&&(e.$$typeof===WS||e.$$typeof===HS||e.$$typeof===DS||e.$$typeof===zS||e.$$typeof===FS||e.$$typeof===t$||e.getModuleId!==void 0)};On.typeOf=Ga;(function(e){e.exports=On})(i2e);function s2e(){const e=Qve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const LL={notify(){},get:()=>[]};function l2e(e,t){let n,r=LL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=s2e())}function u(){n&&(n(),n=void 0,r.clear(),r=LL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const u2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",c2e=u2e?C.exports.useLayoutEffect:C.exports.useEffect;function d2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=l2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return c2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||od).Provider,{value:i,children:n})}function n$(e=od){const t=e===od?JB:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const f2e=n$();function h2e(e=od){const t=e===od?f2e:n$(e);return function(){return t().dispatch}}const p2e=h2e();e2e(XB.exports.useSyncExternalStoreWithSelector);Zve(Ol.exports.unstable_batchedUpdates);var y_="persist:",r$="persist/FLUSH",S_="persist/REHYDRATE",i$="persist/PAUSE",o$="persist/PERSIST",a$="persist/PURGE",s$="persist/REGISTER",g2e=-1;function W3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W3=function(n){return typeof n}:W3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},W3(e)}function ML(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m2e(e){for(var t=1;t{Object.keys(I).forEach(function(N){!T(N)||h[N]!==I[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){I[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=I},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var I=m.shift(),N=r.reduce(function(z,$){return $.in(z,I,h)},h[I]);if(N!==void 0)try{p[I]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[I];m.length===0&&k()}function k(){Object.keys(p).forEach(function(I){h[I]===void 0&&delete p[I]}),S=s.setItem(a,l(p)).catch(M)}function T(I){return!(n&&n.indexOf(I)===-1&&I!=="_persist"||t&&t.indexOf(I)!==-1)}function M(I){u&&u(I)}var R=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:R}}function b2e(e){return JSON.stringify(e)}function x2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=w2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function w2e(e){return JSON.parse(e)}function C2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:y_).concat(e.key);return t.removeItem(n,_2e)}function _2e(e){}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function P2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var T2e=5e3;function A2e(e,t){var n=e.version!==void 0?e.version:g2e;e.debug;var r=e.stateReconciler===void 0?y2e:e.stateReconciler,i=e.getStoredState||x2e,o=e.timeout!==void 0?e.timeout:T2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=E2e(m,["_persist"]),w=S;if(p.type===o$){var E=!1,P=function(z,$){E||(p.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=S2e(e)),v)return iu({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function($,H){return Promise.resolve($)};z(N,n).then(function($){P($)},function($){P(void 0,$)})},function(N){P(void 0,N)}),iu({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===a$)return s=!0,p.result(C2e(e)),iu({},t(w,p),{_persist:v});if(p.type===r$)return p.result(a&&a.flush()),iu({},t(w,p),{_persist:v});if(p.type===i$)l=!0;else if(p.type===S_){if(s)return iu({},w,{_persist:iu({},v,{rehydrated:!0})});if(p.key===e.key){var k=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,R=iu({},M,{_persist:iu({},v,{rehydrated:!0})});return u(R)}}}if(!v)return t(h,p);var I=t(w,p);return I===w?h:u(iu({},I,{_persist:v}))}}function RL(e){return O2e(e)||M2e(e)||L2e()}function L2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function M2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function O2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:l$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case s$:return VC({},t,{registry:[].concat(RL(t.registry),[n.key])});case S_:var r=t.registry.indexOf(n.key),i=RL(t.registry);return i.splice(r,1),VC({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function N2e(e,t,n){var r=n||!1,i=p_(I2e,l$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:s$,key:u})},a=function(u,h,p){var m={type:S_,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=VC({},i,{purge:function(){var u=[];return e.dispatch({type:a$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:r$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:i$})},persist:function(){e.dispatch({type:o$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var b_={},x_={};x_.__esModule=!0;x_.default=F2e;function V3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V3=function(n){return typeof n}:V3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},V3(e)}function dw(){}var D2e={getItem:dw,setItem:dw,removeItem:dw};function z2e(e){if((typeof self>"u"?"undefined":V3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function F2e(e){var t="".concat(e,"Storage");return z2e(t)?self[t]:D2e}b_.__esModule=!0;b_.default=H2e;var B2e=$2e(x_);function $2e(e){return e&&e.__esModule?e:{default:e}}function H2e(e){var t=(0,B2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var u$=void 0,W2e=V2e(b_);function V2e(e){return e&&e.__esModule?e:{default:e}}var U2e=(0,W2e.default)("local");u$=U2e;var c$={},d$={},th={};Object.defineProperty(th,"__esModule",{value:!0});th.PLACEHOLDER_UNDEFINED=th.PACKAGE_NAME=void 0;th.PACKAGE_NAME="redux-deep-persist";th.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var w_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(w_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=th,n=w_,r=function(V){return typeof V=="object"&&V!==null};e.isObjectLike=r;const i=function(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(V){return(0,e.isLength)(V&&V.length)&&Object.prototype.toString.call(V)==="[object Array]"};const o=function(V){return!!V&&typeof V=="object"&&!(0,e.isArray)(V)};e.isPlainObject=o;const a=function(V){return String(~~V)===V&&Number(V)>=0};e.isIntegerString=a;const s=function(V){return Object.prototype.toString.call(V)==="[object String]"};e.isString=s;const l=function(V){return Object.prototype.toString.call(V)==="[object Date]"};e.isDate=l;const u=function(V){return Object.keys(V).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(V,J,ie){ie||(ie=new Set([V])),J||(J="");for(const ee in V){const X=J?`${J}.${ee}`:ee,G=V[ee];if((0,e.isObjectLike)(G))return ie.has(G)?`${J}.${ee}:`:(ie.add(G),(0,e.getCircularPath)(G,X,ie))}return null};e.getCircularPath=p;const m=function(V){if(!(0,e.isObjectLike)(V))return V;if((0,e.isDate)(V))return new Date(+V);const J=(0,e.isArray)(V)?[]:{};for(const ie in V){const ee=V[ie];J[ie]=(0,e._cloneDeep)(ee)}return J};e._cloneDeep=m;const v=function(V){const J=(0,e.getCircularPath)(V);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${V}`);return(0,e._cloneDeep)(V)};e.cloneDeep=v;const S=function(V,J){if(V===J)return{};if(!(0,e.isObjectLike)(V)||!(0,e.isObjectLike)(J))return J;const ie=(0,e.cloneDeep)(V),ee=(0,e.cloneDeep)(J),X=Object.keys(ie).reduce((Q,j)=>(h.call(ee,j)||(Q[j]=void 0),Q),{});if((0,e.isDate)(ie)||(0,e.isDate)(ee))return ie.valueOf()===ee.valueOf()?{}:ee;const G=Object.keys(ee).reduce((Q,j)=>{if(!h.call(ie,j))return Q[j]=ee[j],Q;const Z=(0,e.difference)(ie[j],ee[j]);return(0,e.isObjectLike)(Z)&&(0,e.isEmpty)(Z)&&!(0,e.isDate)(Z)?(0,e.isArray)(ie)&&!(0,e.isArray)(ee)||!(0,e.isArray)(ie)&&(0,e.isArray)(ee)?ee:Q:(Q[j]=Z,Q)},X);return delete G._persist,G};e.difference=S;const w=function(V,J){return J.reduce((ie,ee)=>{if(ie){const X=parseInt(ee,10),G=(0,e.isIntegerString)(ee)&&X<0?ie.length+X:ee;return(0,e.isString)(ie)?ie.charAt(G):ie[G]}},V)};e.path=w;const E=function(V,J){return[...V].reverse().reduce((X,G,Q)=>{const j=(0,e.isIntegerString)(G)?[]:{};return j[G]=Q===0?J:X,j},{})};e.assocPath=E;const P=function(V,J){const ie=(0,e.cloneDeep)(V);return J.reduce((ee,X,G)=>(G===J.length-1&&ee&&(0,e.isObjectLike)(ee)&&delete ee[X],ee&&ee[X]),ie),ie};e.dissocPath=P;const k=function(V,J,...ie){if(!ie||!ie.length)return J;const ee=ie.shift(),{preservePlaceholder:X,preserveUndefined:G}=V;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(ee))for(const Q in ee)if((0,e.isObjectLike)(ee[Q])&&(0,e.isObjectLike)(J[Q]))J[Q]||(J[Q]={}),k(V,J[Q],ee[Q]);else if((0,e.isArray)(J)){let j=ee[Q];const Z=X?t.PLACEHOLDER_UNDEFINED:void 0;G||(j=typeof j<"u"?j:J[parseInt(Q,10)]),j=j!==t.PLACEHOLDER_UNDEFINED?j:Z,J[parseInt(Q,10)]=j}else{const j=ee[Q]!==t.PLACEHOLDER_UNDEFINED?ee[Q]:void 0;J[Q]=j}return k(V,J,...ie)},T=function(V,J,ie){return k({preservePlaceholder:ie?.preservePlaceholder,preserveUndefined:ie?.preserveUndefined},(0,e.cloneDeep)(V),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(V,J=[],ie,ee,X){if(!(0,e.isObjectLike)(V))return V;for(const G in V){const Q=V[G],j=(0,e.isArray)(V),Z=ee?ee+"."+G:G;Q===null&&(ie===n.ConfigType.WHITELIST&&J.indexOf(Z)===-1||ie===n.ConfigType.BLACKLIST&&J.indexOf(Z)!==-1)&&j&&(V[parseInt(G,10)]=void 0),Q===void 0&&X&&ie===n.ConfigType.BLACKLIST&&J.indexOf(Z)===-1&&j&&(V[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Q,J,ie,Z,X)}},R=function(V,J,ie,ee){const X=(0,e.cloneDeep)(V);return M(X,J,ie,"",ee),X};e.preserveUndefined=R;const I=function(V,J,ie){return ie.indexOf(V)===J};e.unique=I;const N=function(V){return V.reduce((J,ie)=>{const ee=V.filter(me=>me===ie),X=V.filter(me=>(ie+".").indexOf(me+".")===0),{duplicates:G,subsets:Q}=J,j=ee.length>1&&G.indexOf(ie)===-1,Z=X.length>1;return{duplicates:[...G,...j?ee:[]],subsets:[...Q,...Z?X:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(V,J,ie){const ee=ie===n.ConfigType.WHITELIST?"whitelist":"blacklist",X=`${t.PACKAGE_NAME}: incorrect ${ee} configuration.`,G=`Check your create${ie===n.ConfigType.WHITELIST?"White":"Black"}list arguments. + +`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${X} Name (key) of reducer is required. ${G}`);if(!V||!V.length)return;const{duplicates:Q,subsets:j}=(0,e.findDuplicatesAndSubsets)(V);if(Q.length>1)throw new Error(`${X} Duplicated paths. + + ${JSON.stringify(Q)} + + ${G}`);if(j.length>1)throw new Error(`${X} You are trying to persist an entire property and also some of its subset. + +${JSON.stringify(j)} + + ${G}`)};e.singleTransformValidator=z;const $=function(V){if(!(0,e.isArray)(V))return;const J=V?.map(ie=>ie.deepPersistKey).filter(ie=>ie)||[];if(J.length){const ie=J.filter((ee,X)=>J.indexOf(ee)!==X);if(ie.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. + + Duplicates: ${JSON.stringify(ie)}`)}};e.transformsValidator=$;const H=function({whitelist:V,blacklist:J}){if(V&&V.length&&J&&J.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(V){const{duplicates:ie,subsets:ee}=(0,e.findDuplicatesAndSubsets)(V);(0,e.throwError)({duplicates:ie,subsets:ee},"whitelist")}if(J){const{duplicates:ie,subsets:ee}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:ie,subsets:ee},"blacklist")}};e.configValidator=H;const q=function({duplicates:V,subsets:J},ie){if(V.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${ie}. + + ${JSON.stringify(V)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${ie}. You must decide if you want to persist an entire path or its specific subset. + + ${JSON.stringify(J)}`)};e.throwError=q;const de=function(V){return(0,e.isArray)(V)?V.filter(e.unique).reduce((J,ie)=>{const ee=ie.split("."),X=ee[0],G=ee.slice(1).join(".")||void 0,Q=J.filter(Z=>Object.keys(Z)[0]===X)[0],j=Q?Object.values(Q)[0]:void 0;return Q||J.push({[X]:G?[G]:void 0}),Q&&!j&&G&&(Q[X]=[G]),Q&&j&&G&&j.push(G),J},[]):[]};e.getRootKeysGroup=de})(d$);(function(e){var t=ms&&ms.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!E(k)&&p?p(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(R=>{if(R!=="_persist"){if((0,n.isObjectLike)(k[R])){k[R]=(0,n.mergeDeep)(k[R],T[R]);return}k[R]=T[R]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=p,k=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),R=Object.keys(P(void 0,{type:""})),I=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=R.filter(de=>I.indexOf(de)===-1&&N.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),H=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),q=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...H,...q,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(c$);const U3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),G2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return C_(r)?r:!1},C_=e=>Boolean(typeof e=="string"?G2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),i4=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),j2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */(function(e,t){(function(){var n,r="4.17.21",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`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,E=1,P=2,k=4,T=8,M=16,R=32,I=64,N=128,z=256,$=512,H=30,q="...",de=800,V=16,J=1,ie=2,ee=3,X=1/0,G=9007199254740991,Q=17976931348623157e292,j=0/0,Z=4294967295,me=Z-1,Se=Z>>>1,xe=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",$],["partial",R],["partialRight",I],["rearg",z]],Be="[object Arguments]",We="[object Array]",dt="[object AsyncFunction]",Ye="[object Boolean]",rt="[object Date]",Ze="[object DOMException]",Ke="[object Error]",Et="[object Function]",bt="[object GeneratorFunction]",Ae="[object Map]",it="[object Number]",Ot="[object Null]",lt="[object Object]",xt="[object Promise]",Cn="[object Proxy]",Pt="[object RegExp]",Kt="[object Set]",_n="[object String]",mn="[object Symbol]",Oe="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",jt="[object ArrayBuffer]",ke="[object DataView]",Mt="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",an="[object Int16Array]",Nn="[object Int32Array]",$e="[object Uint8Array]",ft="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,pi=/&(?:amp|lt|gt|quot|#39);/g,Ms=/[&<>"']/g,y1=RegExp(pi.source),va=RegExp(Ms.source),bh=/<%-([\s\S]+?)%>/g,S1=/<%([\s\S]+?)%>/g,Ru=/<%=([\s\S]+?)%>/g,xh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wh=/^\w*$/,Io=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kd=/[\\^$.*+?()[\]{}|]/g,b1=RegExp(kd.source),Iu=/^\s+/,Ed=/\s/,x1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Nu=/,? & /,w1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,C1=/[()=,{}\[\]\/\s]/,_1=/\\(\\)?/g,k1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ja=/\w*$/,E1=/^[-+]0x[0-9a-f]+$/i,P1=/^0b[01]+$/i,T1=/^\[object .+?Constructor\]$/,A1=/^0o[0-7]+$/i,L1=/^(?:0|[1-9]\d*)$/,M1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rs=/($^)/,O1=/['\n\r\u2028\u2029\\]/g,Ya="\\ud800-\\udfff",Dl="\\u0300-\\u036f",zl="\\ufe20-\\ufe2f",Is="\\u20d0-\\u20ff",Fl=Dl+zl+Is,Ch="\\u2700-\\u27bf",Du="a-z\\xdf-\\xf6\\xf8-\\xff",Ns="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",kn="\\u2000-\\u206f",vn=" \\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",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",Cr="\\ufe0e\\ufe0f",Ur=Ns+No+kn+vn,zo="['\u2019]",Ds="["+Ya+"]",Gr="["+Ur+"]",qa="["+Fl+"]",Pd="\\d+",Bl="["+Ch+"]",Ka="["+Du+"]",Td="[^"+Ya+Ur+Pd+Ch+Du+Do+"]",gi="\\ud83c[\\udffb-\\udfff]",_h="(?:"+qa+"|"+gi+")",kh="[^"+Ya+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",zs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Fs="\\u200d",$l="(?:"+Ka+"|"+Td+")",R1="(?:"+uo+"|"+Td+")",zu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Fu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Ld=_h+"?",Bu="["+Cr+"]?",ya="(?:"+Fs+"(?:"+[kh,Ad,zs].join("|")+")"+Bu+Ld+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Bu+Ld+ya,Eh="(?:"+[Bl,Ad,zs].join("|")+")"+Ht,$u="(?:"+[kh+qa+"?",qa,Ad,zs,Ds].join("|")+")",Hu=RegExp(zo,"g"),Ph=RegExp(qa,"g"),Fo=RegExp(gi+"(?="+gi+")|"+$u+Ht,"g"),Wn=RegExp([uo+"?"+Ka+"+"+zu+"(?="+[Gr,uo,"$"].join("|")+")",R1+"+"+Fu+"(?="+[Gr,uo+$l,"$"].join("|")+")",uo+"?"+$l+"+"+zu,uo+"+"+Fu,Hl,Md,Pd,Eh].join("|"),"g"),Od=RegExp("["+Fs+Ya+Fl+Cr+"]"),Th=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rd=["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"],Ah=-1,sn={};sn[Mt]=sn[Ne]=sn[at]=sn[an]=sn[Nn]=sn[$e]=sn[ft]=sn[tt]=sn[Nt]=!0,sn[Be]=sn[We]=sn[jt]=sn[Ye]=sn[ke]=sn[rt]=sn[Ke]=sn[Et]=sn[Ae]=sn[it]=sn[lt]=sn[Pt]=sn[Kt]=sn[_n]=sn[Je]=!1;var Wt={};Wt[Be]=Wt[We]=Wt[jt]=Wt[ke]=Wt[Ye]=Wt[rt]=Wt[Mt]=Wt[Ne]=Wt[at]=Wt[an]=Wt[Nn]=Wt[Ae]=Wt[it]=Wt[lt]=Wt[Pt]=Wt[Kt]=Wt[_n]=Wt[mn]=Wt[$e]=Wt[ft]=Wt[tt]=Wt[Nt]=!0,Wt[Ke]=Wt[Et]=Wt[Je]=!1;var Lh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},I1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},ne={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,qe=parseInt,zt=typeof ms=="object"&&ms&&ms.Object===Object&&ms,cn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||cn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Tt,gr=Nr&&zt.process,dn=function(){try{var oe=Vt&&Vt.require&&Vt.require("util").types;return oe||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=dn&&dn.isArrayBuffer,co=dn&&dn.isDate,Ui=dn&&dn.isMap,Sa=dn&&dn.isRegExp,Bs=dn&&dn.isSet,N1=dn&&dn.isTypedArray;function mi(oe,be,ve){switch(ve.length){case 0:return oe.call(be);case 1:return oe.call(be,ve[0]);case 2:return oe.call(be,ve[0],ve[1]);case 3:return oe.call(be,ve[0],ve[1],ve[2])}return oe.apply(be,ve)}function D1(oe,be,ve,Ge){for(var _t=-1,Qt=oe==null?0:oe.length;++_t-1}function Mh(oe,be,ve){for(var Ge=-1,_t=oe==null?0:oe.length;++Ge<_t;)if(ve(be,oe[Ge]))return!0;return!1}function zn(oe,be){for(var ve=-1,Ge=oe==null?0:oe.length,_t=Array(Ge);++ve-1;);return ve}function Xa(oe,be){for(var ve=oe.length;ve--&&Uu(be,oe[ve],0)>-1;);return ve}function F1(oe,be){for(var ve=oe.length,Ge=0;ve--;)oe[ve]===be&&++Ge;return Ge}var y2=zd(Lh),Za=zd(I1);function Hs(oe){return"\\"+ne[oe]}function Rh(oe,be){return oe==null?n:oe[be]}function Vl(oe){return Od.test(oe)}function Ih(oe){return Th.test(oe)}function S2(oe){for(var be,ve=[];!(be=oe.next()).done;)ve.push(be.value);return ve}function Nh(oe){var be=-1,ve=Array(oe.size);return oe.forEach(function(Ge,_t){ve[++be]=[_t,Ge]}),ve}function Dh(oe,be){return function(ve){return oe(be(ve))}}function Ho(oe,be){for(var ve=-1,Ge=oe.length,_t=0,Qt=[];++ve-1}function F2(c,g){var b=this.__data__,L=kr(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=D2,Wo.prototype.delete=z2,Wo.prototype.get=J1,Wo.prototype.has=eg,Wo.prototype.set=F2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ii(c,g,b,L,D,B){var Y,te=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,B):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=It(c);if(_e){if(Y=GV(c),!te)return wi(c,Y)}else{var Le=si(c),Ue=Le==Et||Le==bt;if(yc(c))return Qs(c,te);if(Le==lt||Le==Be||Ue&&!D){if(Y=ce||Ue?{}:_k(c),!te)return ce?yg(c,lc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Le])return D?c:{};Y=jV(c,Le,te)}}B||(B=new vr);var ct=B.get(c);if(ct)return ct;B.set(c,Y),Jk(c)?c.forEach(function(St){Y.add(ii(St,g,b,St,c,B))}):Zk(c)&&c.forEach(function(St,Gt){Y.set(Gt,ii(St,g,b,Gt,c,B))});var yt=Ce?ce?ge:qo:ce?bo:li,$t=_e?n:yt(c);return Vn($t||c,function(St,Gt){$t&&(Gt=St,St=c[Gt]),Us(Y,Gt,ii(St,g,b,Gt,c,B))}),Y}function Uh(c){var g=li(c);return function(b){return Gh(b,c,g)}}function Gh(c,g,b){var L=b.length;if(c==null)return!L;for(c=ln(c);L--;){var D=b[L],B=g[D],Y=c[D];if(Y===n&&!(D in c)||!B(Y))return!1}return!0}function ig(c,g,b){if(typeof c!="function")throw new vi(a);return Cg(function(){c.apply(n,b)},g)}function uc(c,g,b,L){var D=-1,B=Ii,Y=!0,te=c.length,ce=[],Ce=g.length;if(!te)return ce;b&&(g=zn(g,_r(b))),L?(B=Mh,Y=!1):g.length>=i&&(B=ju,Y=!1,g=new Ca(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:tE(L);b0&&b(te)?g>1?Er(te,g-1,b,L,D):ba(D,te):L||(D[D.length]=te)}return D}var Yh=Js(),go=Js(!0);function Yo(c,g){return c&&Yh(c,g,li)}function mo(c,g){return c&&go(c,g,li)}function qh(c,g){return ho(g,function(b){return Ql(c[b])})}function Gs(c,g){g=Zs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Xh(c,g){return c!=null&&en.call(c,g)}function Zh(c,g){return c!=null&&g in ln(c)}function Qh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new Ca(Y&&_e):n}_e=c[0];var Le=-1,Ue=te[0];e:for(;++Le-1;)te!==c&&Gd.call(te,ce,1),Gd.call(c,ce,1);return c}function ef(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==B){var B=D;Zl(D)?Gd.call(c,D,1):lp(c,D)}}return c}function tf(c,g){return c+Gl(Y1()*(g-c+1))}function Ks(c,g,b,L){for(var D=-1,B=mr(qd((g-c)/(b||1)),0),Y=ve(B);B--;)Y[L?B:++D]=c,c+=b;return Y}function gc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Gl(g/2),g&&(c+=c);while(g);return b}function Ct(c,g){return Lb(Pk(c,g,xo),c+"")}function rp(c){return sc(gp(c))}function nf(c,g){var b=gp(c);return j2(b,Yl(g,0,b.length))}function Kl(c,g,b,L){if(!sr(c))return c;g=Zs(g,c);for(var D=-1,B=g.length,Y=B-1,te=c;te!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var B=ve(D);++L>>1,Y=c[B];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:W(c);if(Ce)return Hd(Ce);Y=!1,D=ju,ce=new Ca}else ce=g?[]:te;e:for(;++L=L?c:Tr(c,g,b)}var pg=_2||function(c){return vt.clearTimeout(c)};function Qs(c,g){if(g)return c.slice();var b=c.length,L=Zu?Zu(b):new c.constructor(b);return c.copy(L),L}function gg(c){var g=new c.constructor(c.byteLength);return new yi(g).set(new yi(c)),g}function Xl(c,g){var b=g?gg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function W2(c){var g=new c.constructor(c.source,ja.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Xd?ln(Xd.call(c)):{}}function V2(c,g){var b=g?gg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function mg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,B=Ko(c),Y=g!==n,te=g===null,ce=g===g,Ce=Ko(g);if(!te&&!Ce&&!B&&c>g||B&&Y&&ce&&!te&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!B&&!Ce&&c=te)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function U2(c,g,b,L){for(var D=-1,B=c.length,Y=b.length,te=-1,ce=g.length,Ce=mr(B-Y,0),_e=ve(ce+Ce),Le=!L;++te1?b[D-1]:n,Y=D>2?b[2]:n;for(B=c.length>3&&typeof B=="function"?(D--,B):n,Y&&Xi(b[0],b[1],Y)&&(B=D<3?n:B,D=1),g=ln(g);++L-1?D[B?g[Y]:Y]:n}}function bg(c){return er(function(g){var b=g.length,L=b,D=ji.prototype.thru;for(c&&g.reverse();L--;){var B=g[L];if(typeof B!="function")throw new vi(a);if(D&&!Y&&ye(B)=="wrapper")var Y=new ji([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&cete))return!1;var Ce=B.get(c),_e=B.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Le=-1,Ue=!0,ct=b&w?new Ca:n;for(B.set(c,g),B.set(g,c);++Le1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(x1,`{ +/* [wrapped with `+g+`] */ +`)}function qV(c){return It(c)||df(c)||!!(G1&&c&&c[G1])}function Zl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&L1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function j2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Bk(c,b)});function $k(c){var g=F(c);return g.__chain__=!0,g}function oG(c,g){return g(c),c}function Y2(c,g){return g(c)}var aG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(B){return Vh(B,c)};return g>1||this.__actions__.length||!(L instanceof Ut)||!Zl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:Y2,args:[D],thisArg:n}),new ji(L,this.__chain__).thru(function(B){return g&&!B.length&&B.push(n),B}))});function sG(){return $k(this)}function lG(){return new ji(this.value(),this.__chain__)}function uG(){this.__values__===n&&(this.__values__=eE(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function cG(){return this}function dG(c){for(var g,b=this;b instanceof Zd;){var L=Rk(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function fG(){var c=this.__wrapped__;if(c instanceof Ut){var g=c;return this.__actions__.length&&(g=new Ut(this)),g=g.reverse(),g.__actions__.push({func:Y2,args:[Mb],thisArg:n}),new ji(g,this.__chain__)}return this.thru(Mb)}function hG(){return Xs(this.__wrapped__,this.__actions__)}var pG=cp(function(c,g,b){en.call(c,b)?++c[b]:Uo(c,b,1)});function gG(c,g,b){var L=It(c)?Dn:og;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}function mG(c,g){var b=It(c)?ho:jo;return b(c,Te(g,3))}var vG=Sg(Ik),yG=Sg(Nk);function SG(c,g){return Er(q2(c,g),1)}function bG(c,g){return Er(q2(c,g),X)}function xG(c,g,b){return b=b===n?1:Dt(b),Er(q2(c,g),b)}function Hk(c,g){var b=It(c)?Vn:es;return b(c,Te(g,3))}function Wk(c,g){var b=It(c)?fo:jh;return b(c,Te(g,3))}var wG=cp(function(c,g,b){en.call(c,b)?c[b].push(g):Uo(c,b,[g])});function CG(c,g,b,L){c=So(c)?c:gp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),J2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Uu(c,g,b)>-1}var _G=Ct(function(c,g,b){var L=-1,D=typeof g=="function",B=So(c)?ve(c.length):[];return es(c,function(Y){B[++L]=D?mi(g,Y,b):ts(Y,g,b)}),B}),kG=cp(function(c,g,b){Uo(c,b,g)});function q2(c,g){var b=It(c)?zn:Sr;return b(c,Te(g,3))}function EG(c,g,b,L){return c==null?[]:(It(g)||(g=g==null?[]:[g]),b=L?n:b,It(b)||(b=b==null?[]:[b]),bi(c,g,b))}var PG=cp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function TG(c,g,b){var L=It(c)?Id:Oh,D=arguments.length<3;return L(c,Te(g,4),b,D,es)}function AG(c,g,b){var L=It(c)?p2:Oh,D=arguments.length<3;return L(c,Te(g,4),b,D,jh)}function LG(c,g){var b=It(c)?ho:jo;return b(c,Z2(Te(g,3)))}function MG(c){var g=It(c)?sc:rp;return g(c)}function OG(c,g,b){(b?Xi(c,g,b):g===n)?g=1:g=Dt(g);var L=It(c)?ri:nf;return L(c,g)}function RG(c){var g=It(c)?wb:ai;return g(c)}function IG(c){if(c==null)return 0;if(So(c))return J2(c)?xa(c):c.length;var g=si(c);return g==Ae||g==Kt?c.size:Pr(c).length}function NG(c,g,b){var L=It(c)?Wu:vo;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}var DG=Ct(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Xi(c,g[0],g[1])?g=[]:b>2&&Xi(g[0],g[1],g[2])&&(g=[g[0]]),bi(c,Er(g,1),[])}),K2=k2||function(){return vt.Date.now()};function zG(c,g){if(typeof g!="function")throw new vi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function Vk(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,he(c,N,n,n,n,n,g)}function Uk(c,g){var b;if(typeof g!="function")throw new vi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Rb=Ct(function(c,g,b){var L=E;if(b.length){var D=Ho(b,He(Rb));L|=R}return he(c,L,g,b,D)}),Gk=Ct(function(c,g,b){var L=E|P;if(b.length){var D=Ho(b,He(Gk));L|=R}return he(g,L,c,b,D)});function jk(c,g,b){g=b?n:g;var L=he(c,T,n,n,n,n,n,g);return L.placeholder=jk.placeholder,L}function Yk(c,g,b){g=b?n:g;var L=he(c,M,n,n,n,n,n,g);return L.placeholder=Yk.placeholder,L}function qk(c,g,b){var L,D,B,Y,te,ce,Ce=0,_e=!1,Le=!1,Ue=!0;if(typeof c!="function")throw new vi(a);g=Ea(g)||0,sr(b)&&(_e=!!b.leading,Le="maxWait"in b,B=Le?mr(Ea(b.maxWait)||0,g):B,Ue="trailing"in b?!!b.trailing:Ue);function ct(Lr){var as=L,eu=D;return L=D=n,Ce=Lr,Y=c.apply(eu,as),Y}function yt(Lr){return Ce=Lr,te=Cg(Gt,g),_e?ct(Lr):Y}function $t(Lr){var as=Lr-ce,eu=Lr-Ce,hE=g-as;return Le?qr(hE,B-eu):hE}function St(Lr){var as=Lr-ce,eu=Lr-Ce;return ce===n||as>=g||as<0||Le&&eu>=B}function Gt(){var Lr=K2();if(St(Lr))return Jt(Lr);te=Cg(Gt,$t(Lr))}function Jt(Lr){return te=n,Ue&&L?ct(Lr):(L=D=n,Y)}function Xo(){te!==n&&pg(te),Ce=0,L=ce=D=te=n}function Zi(){return te===n?Y:Jt(K2())}function Zo(){var Lr=K2(),as=St(Lr);if(L=arguments,D=this,ce=Lr,as){if(te===n)return yt(ce);if(Le)return pg(te),te=Cg(Gt,g),ct(ce)}return te===n&&(te=Cg(Gt,g)),Y}return Zo.cancel=Xo,Zo.flush=Zi,Zo}var FG=Ct(function(c,g){return ig(c,1,g)}),BG=Ct(function(c,g,b){return ig(c,Ea(g)||0,b)});function $G(c){return he(c,$)}function X2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new vi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],B=b.cache;if(B.has(D))return B.get(D);var Y=c.apply(this,L);return b.cache=B.set(D,Y)||B,Y};return b.cache=new(X2.Cache||Vo),b}X2.Cache=Vo;function Z2(c){if(typeof c!="function")throw new vi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function HG(c){return Uk(2,c)}var WG=kb(function(c,g){g=g.length==1&&It(g[0])?zn(g[0],_r(Te())):zn(Er(g,1),_r(Te()));var b=g.length;return Ct(function(L){for(var D=-1,B=qr(L.length,b);++D=g}),df=ep(function(){return arguments}())?ep:function(c){return br(c)&&en.call(c,"callee")&&!U1.call(c,"callee")},It=ve.isArray,rj=jr?_r(jr):sg;function So(c){return c!=null&&Q2(c.length)&&!Ql(c)}function Ar(c){return br(c)&&So(c)}function ij(c){return c===!0||c===!1||br(c)&&oi(c)==Ye}var yc=E2||Gb,oj=co?_r(co):lg;function aj(c){return br(c)&&c.nodeType===1&&!_g(c)}function sj(c){if(c==null)return!0;if(So(c)&&(It(c)||typeof c=="string"||typeof c.splice=="function"||yc(c)||pp(c)||df(c)))return!c.length;var g=si(c);if(g==Ae||g==Kt)return!c.size;if(wg(c))return!Pr(c).length;for(var b in c)if(en.call(c,b))return!1;return!0}function lj(c,g){return dc(c,g)}function uj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?dc(c,g,n,b):!!L}function Nb(c){if(!br(c))return!1;var g=oi(c);return g==Ke||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!_g(c)}function cj(c){return typeof c=="number"&&Bh(c)}function Ql(c){if(!sr(c))return!1;var g=oi(c);return g==Et||g==bt||g==dt||g==Cn}function Xk(c){return typeof c=="number"&&c==Dt(c)}function Q2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var Zk=Ui?_r(Ui):_b;function dj(c,g){return c===g||fc(c,g,kt(g))}function fj(c,g,b){return b=typeof b=="function"?b:n,fc(c,g,kt(g),b)}function hj(c){return Qk(c)&&c!=+c}function pj(c){if(ZV(c))throw new _t(o);return tp(c)}function gj(c){return c===null}function mj(c){return c==null}function Qk(c){return typeof c=="number"||br(c)&&oi(c)==it}function _g(c){if(!br(c)||oi(c)!=lt)return!1;var g=Qu(c);if(g===null)return!0;var b=en.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ni}var Db=Sa?_r(Sa):or;function vj(c){return Xk(c)&&c>=-G&&c<=G}var Jk=Bs?_r(Bs):Ft;function J2(c){return typeof c=="string"||!It(c)&&br(c)&&oi(c)==_n}function Ko(c){return typeof c=="symbol"||br(c)&&oi(c)==mn}var pp=N1?_r(N1):Dr;function yj(c){return c===n}function Sj(c){return br(c)&&si(c)==Je}function bj(c){return br(c)&&oi(c)==Xt}var xj=_(js),wj=_(function(c,g){return c<=g});function eE(c){if(!c)return[];if(So(c))return J2(c)?Ni(c):wi(c);if(Ju&&c[Ju])return S2(c[Ju]());var g=si(c),b=g==Ae?Nh:g==Kt?Hd:gp;return b(c)}function Jl(c){if(!c)return c===0?c:0;if(c=Ea(c),c===X||c===-X){var g=c<0?-1:1;return g*Q}return c===c?c:0}function Dt(c){var g=Jl(c),b=g%1;return g===g?b?g-b:g:0}function tE(c){return c?Yl(Dt(c),0,Z):0}function Ea(c){if(typeof c=="number")return c;if(Ko(c))return j;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=P1.test(c);return b||A1.test(c)?qe(c.slice(2),b?2:8):E1.test(c)?j:+c}function nE(c){return _a(c,bo(c))}function Cj(c){return c?Yl(Dt(c),-G,G):c===0?c:0}function Sn(c){return c==null?"":qi(c)}var _j=Ki(function(c,g){if(wg(g)||So(g)){_a(g,li(g),c);return}for(var b in g)en.call(g,b)&&Us(c,b,g[b])}),rE=Ki(function(c,g){_a(g,bo(g),c)}),ey=Ki(function(c,g,b,L){_a(g,bo(g),c,L)}),kj=Ki(function(c,g,b,L){_a(g,li(g),c,L)}),Ej=er(Vh);function Pj(c,g){var b=jl(c);return g==null?b:Qe(b,g)}var Tj=Ct(function(c,g){c=ln(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Xi(g[0],g[1],D)&&(L=1);++b1),B}),_a(c,ge(c),b),L&&(b=ii(b,p|m|v,At));for(var D=g.length;D--;)lp(b,g[D]);return b});function jj(c,g){return oE(c,Z2(Te(g)))}var Yj=er(function(c,g){return c==null?{}:dg(c,g)});function oE(c,g){if(c==null)return{};var b=zn(ge(c),function(L){return[L]});return g=Te(g),np(c,b,function(L,D){return g(L,D[0])})}function qj(c,g,b){g=Zs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=Y1();return qr(c+D*(g-c+pe("1e-"+((D+"").length-1))),g)}return tf(c,g)}var oY=el(function(c,g,b){return g=g.toLowerCase(),c+(b?lE(g):g)});function lE(c){return Bb(Sn(c).toLowerCase())}function uE(c){return c=Sn(c),c&&c.replace(M1,y2).replace(Ph,"")}function aY(c,g,b){c=Sn(c),g=qi(g);var L=c.length;b=b===n?L:Yl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function sY(c){return c=Sn(c),c&&va.test(c)?c.replace(Ms,Za):c}function lY(c){return c=Sn(c),c&&b1.test(c)?c.replace(kd,"\\$&"):c}var uY=el(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),cY=el(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),dY=fp("toLowerCase");function fY(c,g,b){c=Sn(c),g=Dt(g);var L=g?xa(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Gl(D),b)+c+d(qd(D),b)}function hY(c,g,b){c=Sn(c),g=Dt(g);var L=g?xa(c):0;return g&&L>>0,b?(c=Sn(c),c&&(typeof g=="string"||g!=null&&!Db(g))&&(g=qi(g),!g&&Vl(c))?rs(Ni(c),0,b):c.split(g,b)):[]}var bY=el(function(c,g,b){return c+(b?" ":"")+Bb(g)});function xY(c,g,b){return c=Sn(c),b=b==null?0:Yl(Dt(b),0,c.length),g=qi(g),c.slice(b,b+g.length)==g}function wY(c,g,b){var L=F.templateSettings;b&&Xi(c,g,b)&&(g=n),c=Sn(c),g=ey({},g,L,Ie);var D=ey({},g.imports,L.imports,Ie),B=li(D),Y=$d(D,B),te,ce,Ce=0,_e=g.interpolate||Rs,Le="__p += '",Ue=Vd((g.escape||Rs).source+"|"+_e.source+"|"+(_e===Ru?k1:Rs).source+"|"+(g.evaluate||Rs).source+"|$","g"),ct="//# sourceURL="+(en.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ah+"]")+` +`;c.replace(Ue,function(St,Gt,Jt,Xo,Zi,Zo){return Jt||(Jt=Xo),Le+=c.slice(Ce,Zo).replace(O1,Hs),Gt&&(te=!0,Le+=`' + +__e(`+Gt+`) + +'`),Zi&&(ce=!0,Le+=`'; +`+Zi+`; +__p += '`),Jt&&(Le+=`' + +((__t = (`+Jt+`)) == null ? '' : __t) + +'`),Ce=Zo+St.length,St}),Le+=`'; +`;var yt=en.call(g,"variable")&&g.variable;if(!yt)Le=`with (obj) { +`+Le+` +} +`;else if(C1.test(yt))throw new _t(s);Le=(ce?Le.replace(Zt,""):Le).replace(Qn,"$1").replace(lo,"$1;"),Le="function("+(yt||"obj")+`) { +`+(yt?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(te?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Le+`return __p +}`;var $t=dE(function(){return Qt(B,ct+"return "+Le).apply(n,Y)});if($t.source=Le,Nb($t))throw $t;return $t}function CY(c){return Sn(c).toLowerCase()}function _Y(c){return Sn(c).toUpperCase()}function kY(c,g,b){if(c=Sn(c),c&&(b||g===n))return Gi(c);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ni(g),B=$o(L,D),Y=Xa(L,D)+1;return rs(L,B,Y).join("")}function EY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.slice(0,$1(c)+1);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Xa(L,Ni(g))+1;return rs(L,0,D).join("")}function PY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.replace(Iu,"");if(!c||!(g=qi(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return rs(L,D).join("")}function TY(c,g){var b=H,L=q;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?qi(g.omission):L}c=Sn(c);var B=c.length;if(Vl(c)){var Y=Ni(c);B=Y.length}if(b>=B)return c;var te=b-xa(L);if(te<1)return L;var ce=Y?rs(Y,0,te).join(""):c.slice(0,te);if(D===n)return ce+L;if(Y&&(te+=ce.length-te),Db(D)){if(c.slice(te).search(D)){var Ce,_e=ce;for(D.global||(D=Vd(D.source,Sn(ja.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Le=Ce.index;ce=ce.slice(0,Le===n?te:Le)}}else if(c.indexOf(qi(D),te)!=te){var Ue=ce.lastIndexOf(D);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+L}function AY(c){return c=Sn(c),c&&y1.test(c)?c.replace(pi,w2):c}var LY=el(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Bb=fp("toUpperCase");function cE(c,g,b){return c=Sn(c),g=b?n:g,g===n?Ih(c)?Wd(c):z1(c):c.match(g)||[]}var dE=Ct(function(c,g){try{return mi(c,n,g)}catch(b){return Nb(b)?b:new _t(b)}}),MY=er(function(c,g){return Vn(g,function(b){b=tl(b),Uo(c,b,Rb(c[b],c))}),c});function OY(c){var g=c==null?0:c.length,b=Te();return c=g?zn(c,function(L){if(typeof L[1]!="function")throw new vi(a);return[b(L[0]),L[1]]}):[],Ct(function(L){for(var D=-1;++DG)return[];var b=Z,L=qr(c,Z);g=Te(g),c-=Z;for(var D=Bd(L,g);++b0||g<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(Z)},Yo(Ut.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=F[L?"take"+(g=="last"?"Right":""):g],B=L||/^find/.test(g);!D||(F.prototype[g]=function(){var Y=this.__wrapped__,te=L?[1]:arguments,ce=Y instanceof Ut,Ce=te[0],_e=ce||It(Y),Le=function(Gt){var Jt=D.apply(F,ba([Gt],te));return L&&Ue?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ue=this.__chain__,ct=!!this.__actions__.length,yt=B&&!Ue,$t=ce&&!ct;if(!B&&_e){Y=$t?Y:new Ut(this);var St=c.apply(Y,te);return St.__actions__.push({func:Y2,args:[Le],thisArg:n}),new ji(St,Ue)}return yt&&$t?c.apply(this,te):(St=this.thru(Le),yt?L?St.value()[0]:St.value():St)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=qu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);F.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var B=this.value();return g.apply(It(B)?B:[],D)}return this[b](function(Y){return g.apply(It(Y)?Y:[],D)})}}),Yo(Ut.prototype,function(c,g){var b=F[g];if(b){var L=b.name+"";en.call(Qa,L)||(Qa[L]=[]),Qa[L].push({name:g,func:b})}}),Qa[lf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=Si,Ut.prototype.value=M2,F.prototype.at=aG,F.prototype.chain=sG,F.prototype.commit=lG,F.prototype.next=uG,F.prototype.plant=dG,F.prototype.reverse=fG,F.prototype.toJSON=F.prototype.valueOf=F.prototype.value=hG,F.prototype.first=F.prototype.head,Ju&&(F.prototype[Ju]=cG),F},wa=po();Vt?((Vt.exports=wa)._=wa,Tt._=wa):vt._=wa}).call(ms)})(Zr,Zr.exports);const st=Zr.exports;var Y2e=Object.create,f$=Object.defineProperty,q2e=Object.getOwnPropertyDescriptor,K2e=Object.getOwnPropertyNames,X2e=Object.getPrototypeOf,Z2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Q2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of K2e(t))!Z2e.call(e,i)&&i!==n&&f$(e,i,{get:()=>t[i],enumerable:!(r=q2e(t,i))||r.enumerable});return e},h$=(e,t,n)=>(n=e!=null?Y2e(X2e(e)):{},Q2e(t||!e||!e.__esModule?f$(n,"default",{value:e,enumerable:!0}):n,e)),J2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),p$=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),VS=De((e,t)=>{var n=p$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),eye=De((e,t)=>{var n=VS(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),tye=De((e,t)=>{var n=VS();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),nye=De((e,t)=>{var n=VS();function r(i){return n(this.__data__,i)>-1}t.exports=r}),rye=De((e,t)=>{var n=VS();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),US=De((e,t)=>{var n=J2e(),r=eye(),i=tye(),o=nye(),a=rye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US();function r(){this.__data__=new n,this.size=0}t.exports=r}),oye=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),aye=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),sye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),g$=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Eu=De((e,t)=>{var n=g$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),__=De((e,t)=>{var n=Eu(),r=n.Symbol;t.exports=r}),lye=De((e,t)=>{var n=__(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),uye=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),GS=De((e,t)=>{var n=__(),r=lye(),i=uye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),m$=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),v$=De((e,t)=>{var n=GS(),r=m$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),cye=De((e,t)=>{var n=Eu(),r=n["__core-js_shared__"];t.exports=r}),dye=De((e,t)=>{var n=cye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),y$=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),fye=De((e,t)=>{var n=v$(),r=dye(),i=m$(),o=y$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),hye=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),d1=De((e,t)=>{var n=fye(),r=hye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),k_=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"Map");t.exports=i}),jS=De((e,t)=>{var n=d1(),r=n(Object,"create");t.exports=r}),pye=De((e,t)=>{var n=jS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),gye=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),mye=De((e,t)=>{var n=jS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),vye=De((e,t)=>{var n=jS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),yye=De((e,t)=>{var n=jS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Sye=De((e,t)=>{var n=pye(),r=gye(),i=mye(),o=vye(),a=yye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Sye(),r=US(),i=k_();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),xye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),YS=De((e,t)=>{var n=xye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),wye=De((e,t)=>{var n=YS();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Cye=De((e,t)=>{var n=YS();function r(i){return n(this,i).get(i)}t.exports=r}),_ye=De((e,t)=>{var n=YS();function r(i){return n(this,i).has(i)}t.exports=r}),kye=De((e,t)=>{var n=YS();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),S$=De((e,t)=>{var n=bye(),r=wye(),i=Cye(),o=_ye(),a=kye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=US(),r=k_(),i=S$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=US(),r=iye(),i=oye(),o=aye(),a=sye(),s=Eye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Tye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Aye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Lye=De((e,t)=>{var n=S$(),r=Tye(),i=Aye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),b$=De((e,t)=>{var n=Lye(),r=Mye(),i=Oye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,R=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Eu(),r=n.Uint8Array;t.exports=r}),Iye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Nye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),Dye=De((e,t)=>{var n=__(),r=Rye(),i=p$(),o=b$(),a=Iye(),s=Nye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",R=n?n.prototype:void 0,I=R?R.valueOf:void 0;function N(z,$,H,q,de,V,J){switch(H){case M:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!V(new r(z),new r($)));case h:case p:case S:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var ie=a;case E:var ee=q&l;if(ie||(ie=s),z.size!=$.size&&!ee)return!1;var X=J.get(z);if(X)return X==$;q|=u,J.set(z,$);var G=o(ie(z),ie($),q,de,V,J);return J.delete(z),G;case k:if(I)return I.call(z)==I.call($)}return!1}t.exports=N}),zye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),Fye=De((e,t)=>{var n=zye(),r=E_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Bye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Hye=De((e,t)=>{var n=Bye(),r=$ye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),Wye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Vye=De((e,t)=>{var n=GS(),r=qS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Uye=De((e,t)=>{var n=Vye(),r=qS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Gye=De((e,t)=>{function n(){return!1}t.exports=n}),x$=De((e,t)=>{var n=Eu(),r=Gye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),jye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Yye=De((e,t)=>{var n=GS(),r=w$(),i=qS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",R="[object Float64Array]",I="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",H="[object Uint8ClampedArray]",q="[object Uint16Array]",de="[object Uint32Array]",V={};V[M]=V[R]=V[I]=V[N]=V[z]=V[$]=V[H]=V[q]=V[de]=!0,V[o]=V[a]=V[k]=V[s]=V[T]=V[l]=V[u]=V[h]=V[p]=V[m]=V[v]=V[S]=V[w]=V[E]=V[P]=!1;function J(ie){return i(ie)&&r(ie.length)&&!!V[n(ie)]}t.exports=J}),qye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Kye=De((e,t)=>{var n=g$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),C$=De((e,t)=>{var n=Yye(),r=qye(),i=Kye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Xye=De((e,t)=>{var n=Wye(),r=Uye(),i=E_(),o=x$(),a=jye(),s=C$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),E=!v&&!S&&!w&&s(p),P=v||S||w||E,k=P?n(p.length,String):[],T=k.length;for(var M in p)(m||u.call(p,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),Zye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Qye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Jye=De((e,t)=>{var n=Qye(),r=n(Object.keys,Object);t.exports=r}),e3e=De((e,t)=>{var n=Zye(),r=Jye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),t3e=De((e,t)=>{var n=v$(),r=w$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),n3e=De((e,t)=>{var n=Xye(),r=e3e(),i=t3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),r3e=De((e,t)=>{var n=Fye(),r=Hye(),i=n3e();function o(a){return n(a,i,r)}t.exports=o}),i3e=De((e,t)=>{var n=r3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),R=m.get(l);if(M&&R)return M==l&&R==s;var I=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=d1(),r=Eu(),i=n(r,"DataView");t.exports=i}),a3e=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"Promise");t.exports=i}),s3e=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"Set");t.exports=i}),l3e=De((e,t)=>{var n=d1(),r=Eu(),i=n(r,"WeakMap");t.exports=i}),u3e=De((e,t)=>{var n=o3e(),r=k_(),i=a3e(),o=s3e(),a=l3e(),s=GS(),l=y$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(R){var I=s(R),N=I==h?R.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case E:return u;case P:return p;case k:return m;case T:return v}return I}),t.exports=M}),c3e=De((e,t)=>{var n=Pye(),r=b$(),i=Dye(),o=i3e(),a=u3e(),s=E_(),l=x$(),u=C$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,R,I){var N=s(P),z=s(k),$=N?m:a(P),H=z?m:a(k);$=$==p?v:$,H=H==p?v:H;var q=$==v,de=H==v,V=$==H;if(V&&l(P)){if(!l(k))return!1;N=!0,q=!1}if(V&&!q)return I||(I=new n),N||u(P)?r(P,k,T,M,R,I):i(P,k,$,T,M,R,I);if(!(T&h)){var J=q&&w.call(P,"__wrapped__"),ie=de&&w.call(k,"__wrapped__");if(J||ie){var ee=J?P.value():P,X=ie?k.value():k;return I||(I=new n),R(ee,X,T,M,I)}}return V?(I||(I=new n),o(P,k,T,M,R,I)):!1}t.exports=E}),d3e=De((e,t)=>{var n=c3e(),r=qS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),_$=De((e,t)=>{var n=d3e();function r(i,o){return n(i,o)}t.exports=r}),f3e=["ctrl","shift","alt","meta","mod"],h3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function fw(e,t=","){return typeof e=="string"?e.split(t):e}function Hm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>h3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!f3e.includes(o));return{...r,keys:i}}function p3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function g3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function m3e(e){return k$(e,["input","textarea","select"])}function k$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function v3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var y3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},S3e=C.exports.createContext(void 0),b3e=()=>C.exports.useContext(S3e),x3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),w3e=()=>C.exports.useContext(x3e),C3e=h$(_$());function _3e(e){let t=C.exports.useRef(void 0);return(0,C3e.default)(t.current,e)||(t.current=e),t.current}var NL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function mt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=_3e(a),{enabledScopes:h}=w3e(),p=b3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!v3e(h,u?.scopes))return;let m=w=>{if(!(m3e(w)&&!k$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){NL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||fw(e,u?.splitKey).forEach(E=>{let P=Hm(E,u?.combinationKey);if(y3e(w,P,o)||P.keys?.includes("*")){if(p3e(w,P,u?.preventDefault),!g3e(w,P,u?.enabled)){NL(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.addHotkey(Hm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&fw(e,u?.splitKey).forEach(w=>p.removeHotkey(Hm(w,u?.combinationKey)))}},[e,l,u,h]),i}h$(_$());var UC=new Set;function k3e(e){(Array.isArray(e)?e:[e]).forEach(t=>UC.add(Hm(t)))}function E3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Hm(t);for(let r of UC)r.keys?.every(i=>n.keys?.includes(i))&&UC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{k3e(e.key)}),document.addEventListener("keyup",e=>{E3e(e.key)})});function P3e(){return re("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const T3e=()=>re("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),A3e=ut({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),L3e=ut({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),M3e=ut({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),O3e=ut({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var to=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(to||{});const R3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},ks=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(hd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:re(lh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(s_,{className:"invokeai__switch-root",...s})]})})};function P_(){const e=Ee(i=>i.system.isGFPGANAvailable),t=Ee(i=>i.options.shouldRunFacetool),n=Xe();return re(rn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(F_e(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,Ts=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,R]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(DL)&&u!==Number(M)&&R(String(u))},[u,M]);const I=z=>{R(z),z.match(DL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const $=st.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);R(String($)),h($)};return x(Oi,{...k,children:re(hd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(lh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),re(Z8,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:I,onBlur:N,width:a,...T,children:[x(Q8,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&re("div",{className:"invokeai__number-input-stepper",children:[x(e_,{...P,className:"invokeai__number-input-stepper-button"}),x(J8,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},yd=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return x(Oi,{label:i,...o,children:re(hd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(lh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(gB,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})]})})},I3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],N3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],D3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],z3e=[{key:"2x",value:2},{key:"4x",value:4}],T_=0,A_=4294967295,F3e=["gfpgan","codeformer"],B3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],$3e=pt(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),H3e=pt(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),KS=()=>{const e=Xe(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=Ee($3e),{isGFPGANAvailable:i}=Ee(H3e),o=l=>e(K3(l)),a=l=>e(sV(l)),s=l=>e(X3(l.target.value));return re(rn,{direction:"column",gap:2,children:[x(yd,{label:"Type",validValues:F3e.concat(),value:n,onChange:s}),x(Ts,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(Ts,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function W3e(){const e=Xe(),t=Ee(r=>r.options.shouldFitToWidthHeight);return x(ks,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(uV(r.target.checked))})}var E$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zL=le.createContext&&le.createContext(E$),Xc=globalThis&&globalThis.__assign||function(){return Xc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Oi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function Y0(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:R,isInputDisabled:I,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:H,sliderTrackProps:q,sliderThumbProps:de,sliderNumberInputProps:V,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:ie,sliderTooltipProps:ee,sliderIAIIconButtonProps:X,...G}=e,[Q,j]=C.exports.useState(String(i)),Z=C.exports.useMemo(()=>V?.max?V.max:a,[a,V?.max]);C.exports.useEffect(()=>{String(i)!==Q&&Q!==""&&j(String(i))},[i,Q,j]);const me=Be=>{const We=st.clamp(S?Math.floor(Number(Be.target.value)):Number(Be.target.value),o,Z);j(String(We)),l(We)},Se=Be=>{j(Be),l(Number(Be))},xe=()=>{!T||T()};return re(hd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(lh,{className:"invokeai__slider-component-label",...$,children:r}),re(Wz,{w:"100%",gap:2,children:[re(a_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:Se,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:R,...G,children:[h&&re(Tn,{children:[x(IC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...H,children:o}),x(IC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...H,children:a})]}),x(EB,{className:"invokeai__slider_track",...q,children:x(PB,{className:"invokeai__slider_track-filled"})}),x(Oi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...ee,children:x(kB,{className:"invokeai__slider-thumb",...de})})]}),v&&re(Z8,{min:o,max:Z,step:s,value:Q,onChange:Se,onBlur:me,className:"invokeai__slider-number-field",isDisabled:I,...V,children:[x(Q8,{className:"invokeai__slider-number-input",width:w,readOnly:E,...J}),re(lB,{...ie,children:[x(e_,{className:"invokeai__slider-number-stepper"}),x(J8,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(L_,{}),onClick:xe,isDisabled:M,...X})]})]})}function T$(e){const{label:t="Strength",styleClass:n}=e,r=Ee(s=>s.options.img2imgStrength),i=Xe();return x(Y0,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(S9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(S9(.5))}})}const A$=()=>x(pd,{flex:"1",textAlign:"left",children:"Other Options"}),X3e=()=>{const e=Xe(),t=Ee(r=>r.options.hiresFix);return x(rn,{gap:2,direction:"column",children:x(ks,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(aV(r.target.checked))})})},Z3e=()=>{const e=Xe(),t=Ee(r=>r.options.seamless);return x(rn,{gap:2,direction:"column",children:x(ks,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(oV(r.target.checked))})})},L$=()=>re(rn,{gap:2,direction:"column",children:[x(Z3e,{}),x(X3e,{})]}),M_=()=>x(pd,{flex:"1",textAlign:"left",children:"Seed"});function Q3e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x(ks,{label:"Randomize Seed",isChecked:t,onChange:r=>e($_e(r.target.checked))})}function J3e(){const e=Ee(o=>o.options.seed),t=Ee(o=>o.options.shouldRandomizeSeed),n=Ee(o=>o.options.shouldGenerateVariations),r=Xe(),i=o=>r(d2(o));return x(Ts,{label:"Seed",step:1,precision:0,flexGrow:1,min:T_,max:A_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const M$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function e5e(){const e=Xe(),t=Ee(r=>r.options.shouldRandomizeSeed);return x($a,{size:"sm",isDisabled:t,onClick:()=>e(d2(M$(T_,A_))),children:x("p",{children:"Shuffle"})})}function t5e(){const e=Xe(),t=Ee(r=>r.options.threshold);return x(Ts,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e(R_e(r)),value:t,isInteger:!1})}function n5e(){const e=Xe(),t=Ee(r=>r.options.perlin);return x(Ts,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(I_e(r)),value:t,isInteger:!1})}const O_=()=>re(rn,{gap:2,direction:"column",children:[x(Q3e,{}),re(rn,{gap:2,children:[x(J3e,{}),x(e5e,{})]}),x(rn,{gap:2,children:x(t5e,{})}),x(rn,{gap:2,children:x(n5e,{})})]});function R_(){const e=Ee(i=>i.system.isESRGANAvailable),t=Ee(i=>i.options.shouldRunESRGAN),n=Xe();return re(rn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(B_e(i.target.checked))})]})}const r5e=pt(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),i5e=pt(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),XS=()=>{const e=Xe(),{upscalingLevel:t,upscalingStrength:n}=Ee(r5e),{isESRGANAvailable:r}=Ee(i5e);return re("div",{className:"upscale-options",children:[x(yd,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(b9(Number(a.target.value))),validValues:z3e}),x(Ts,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(x9(a)),value:n,isInteger:!1})]})};function o5e(){const e=Ee(r=>r.options.shouldGenerateVariations),t=Xe();return x(ks,{isChecked:e,width:"auto",onChange:r=>t(N_e(r.target.checked))})}function I_(){return re(rn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(o5e,{})]})}function a5e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return re(hd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(lh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(k8,{...s,className:"input-entry",size:"sm",width:o})]})}function s5e(){const e=Ee(i=>i.options.seedWeights),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe(),r=i=>n(cV(i.target.value));return x(a5e,{label:"Seed Weights",value:e,isInvalid:t&&!(C_(e)||e===""),isDisabled:!t,onChange:r})}function l5e(){const e=Ee(i=>i.options.variationAmount),t=Ee(i=>i.options.shouldGenerateVariations),n=Xe();return x(Ts,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(D_e(i)),isInteger:!1})}const N_=()=>re(rn,{gap:2,direction:"column",children:[x(l5e,{}),x(s5e,{})]}),Aa=e=>{const{label:t,styleClass:n,...r}=e;return x(Ez,{className:`invokeai__checkbox ${n}`,...r,children:t})};function D_(){const e=Ee(r=>r.options.showAdvancedOptions),t=Xe();return x(Aa,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(H_e(r.target.checked)),isChecked:e})}function u5e(){const e=Xe(),t=Ee(r=>r.options.cfgScale);return x(Ts,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(tV(r)),value:t,width:z_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Ir=pt(e=>e.options,e=>pb[e.activeTab],{memoizeOptions:{equalityCheck:st.isEqual}}),c5e=pt(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function d5e(){const e=Ee(i=>i.options.height),t=Ee(Ir),n=Xe();return x(yd,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(nV(Number(i.target.value))),validValues:D3e,styleClass:"main-option-block"})}const f5e=pt([e=>e.options,c5e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function h5e(){const e=Xe(),{iterations:t,mayGenerateMultipleImages:n}=Ee(f5e);return x(Ts,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(O_e(i)),value:t,width:z_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function p5e(){const e=Ee(r=>r.options.sampler),t=Xe();return x(yd,{label:"Sampler",value:e,onChange:r=>t(iV(r.target.value)),validValues:I3e,styleClass:"main-option-block"})}function g5e(){const e=Xe(),t=Ee(r=>r.options.steps);return x(Ts,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(eV(r)),value:t,width:z_,styleClass:"main-option-block",textAlign:"center"})}function m5e(){const e=Ee(i=>i.options.width),t=Ee(Ir),n=Xe();return x(yd,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(rV(Number(i.target.value))),validValues:N3e,styleClass:"main-option-block"})}const z_="auto";function F_(){return x("div",{className:"main-options",children:re("div",{className:"main-options-list",children:[re("div",{className:"main-options-row",children:[x(h5e,{}),x(g5e,{}),x(u5e,{})]}),re("div",{className:"main-options-row",children:[x(m5e,{}),x(d5e,{}),x(p5e,{})]})]})})}const v5e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},O$=MS({name:"system",initialState:v5e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:y5e,setIsProcessing:hu,addLogEntry:Co,setShouldShowLogViewer:hw,setIsConnected:FL,setSocketId:RPe,setShouldConfirmOnDelete:R$,setOpenAccordions:S5e,setSystemStatus:b5e,setCurrentStatus:G3,setSystemConfig:x5e,setShouldDisplayGuides:w5e,processingCanceled:C5e,errorOccurred:BL,errorSeen:I$,setModelList:$L,setIsCancelable:Kp,modelChangeRequested:_5e,setSaveIntermediatesInterval:k5e,setEnableImageDebugging:E5e,generationRequested:P5e,addToast:sm,clearToastQueue:T5e,setProcessingIndeterminateTask:A5e}=O$.actions,L5e=O$.reducer;function M5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function O5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function N$(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function R5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function I5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const N5e=pt(e=>e.system,e=>e.shouldDisplayGuides),D5e=({children:e,feature:t})=>{const n=Ee(N5e),{text:r}=R3e[t];return n?re(t_,{trigger:"hover",children:[x(i_,{children:x(pd,{children:e})}),re(r_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(n_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},z5e=Pe(({feature:e,icon:t=M5e},n)=>x(D5e,{feature:e,children:x(pd,{ref:n,children:x(ma,{as:t})})}));function F5e(e){const{header:t,feature:n,options:r}=e;return re(Df,{className:"advanced-settings-item",children:[x("h2",{children:re(If,{className:"advanced-settings-header",children:[t,x(z5e,{feature:n}),x(Nf,{})]})}),x(zf,{className:"advanced-settings-panel",children:r})]})}const B_=e=>{const{accordionInfo:t}=e,n=Ee(a=>a.system.openAccordions),r=Xe();return x(gS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(S5e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x(F5e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function B5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function $5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function H5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function D$(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function z$(e){return ht({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function W5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function V5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function U5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function G5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function j5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function $_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function F$(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function H_(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function Y5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function B$(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function q5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function K5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function X5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function Z5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function Q5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function J5e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function e4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function t4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function n4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function r4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function i4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function o4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function a4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function s4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function l4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function u4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function $$(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function c4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function d4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function HL(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function f4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function h4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function f1(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function p4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function W_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function g4e(e){return ht({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function V_(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const m4e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],U_=e=>e.kind==="line"&&e.layer==="mask",v4e=e=>e.kind==="line"&&e.layer==="base",o4=e=>e.kind==="image"&&e.layer==="base",y4e=e=>e.kind==="line",$n=e=>e.canvas,Pu=e=>e.canvas.layerState.stagingArea.images.length>0,H$=e=>e.canvas.layerState.objects.find(o4),W$=pt([e=>e.options,e=>e.system,H$,Ir],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(C_(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:st.isEqual,resultEqualityCheck:st.isEqual}}),GC=Jr("socketio/generateImage"),S4e=Jr("socketio/runESRGAN"),b4e=Jr("socketio/runFacetool"),x4e=Jr("socketio/deleteImage"),jC=Jr("socketio/requestImages"),WL=Jr("socketio/requestNewImages"),w4e=Jr("socketio/cancelProcessing"),C4e=Jr("socketio/requestSystemConfig"),V$=Jr("socketio/requestModelChange"),_4e=Jr("socketio/saveStagingAreaImageToGallery"),k4e=Jr("socketio/requestEmptyTempFolder"),ta=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Oi,{label:r,...i,children:x($a,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})});function U$(e){const{iconButton:t=!1,...n}=e,r=Xe(),{isReady:i,reasonsWhyNotReady:o}=Ee(W$),a=Ee(Ir),s=()=>{r(GC(a))};return mt(["ctrl+enter","meta+enter"],()=>{i&&r(GC(a))},[i,a]),x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(a4e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(ta,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})})}const E4e=pt(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:st.isEqual}});function G$(e){const{...t}=e,n=Xe(),{isProcessing:r,isConnected:i,isCancelable:o}=Ee(E4e),a=()=>n(w4e());return mt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(I5e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const P4e=pt(e=>e.options,e=>e.shouldLoopback),j$=()=>{const e=Xe(),t=Ee(P4e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(l4e,{}),onClick:()=>{e(q_e(!t))}})},G_=()=>re("div",{className:"process-buttons",children:[x(U$,{}),x(j$,{}),x(G$,{})]}),T4e=pt([e=>e.options,Ir],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),j_=()=>{const e=Xe(),{prompt:t,activeTabName:n}=Ee(T4e),{isReady:r}=Ee(W$),i=C.exports.useRef(null),o=s=>{e(gb(s.target.value))};mt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(GC(n)))};return x("div",{className:"prompt-bar",children:x(hd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(NB,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function Y$(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function q$(e){return ht({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function A4e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function L4e(e,t){e.classList?e.classList.add(t):A4e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function VL(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function M4e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=VL(e.className,t):e.setAttribute("class",VL(e.className&&e.className.baseVal||"",t))}const UL={disabled:!1},K$=le.createContext(null);var X$=function(t){return t.scrollTop},lm="unmounted",bf="exited",xf="entering",Rp="entered",YC="exiting",Tu=function(e){$8(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=bf,o.appearStatus=xf):l=Rp:r.unmountOnExit||r.mountOnEnter?l=lm:l=bf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===lm?{status:bf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==xf&&a!==Rp&&(o=xf):(a===xf||a===Rp)&&(o=YC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===xf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this);a&&X$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bf&&this.setState({status:lm})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[yy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||UL.disabled){this.safeSetState({status:Rp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:xf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Rp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:yy.findDOMNode(this);if(!o||UL.disabled){this.safeSetState({status:bf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:YC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:bf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:yy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===lm)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=z8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(K$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Tu.contextType=K$;Tu.propTypes={};function kp(){}Tu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:kp,onEntering:kp,onEntered:kp,onExit:kp,onExiting:kp,onExited:kp};Tu.UNMOUNTED=lm;Tu.EXITED=bf;Tu.ENTERING=xf;Tu.ENTERED=Rp;Tu.EXITING=YC;const O4e=Tu;var R4e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return L4e(t,r)})},pw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return M4e(t,r)})},Y_=function(e){$8(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Bc=(e,t)=>Math.round(e/t)*t,Ep=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Pp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},GL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),I4e=e=>({width:Bc(e.width,64),height:Bc(e.height,64)}),N4e=.999,D4e=.1,z4e=20,Hg=.95,um={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},F4e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:um,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldCropToBoundingBoxOnSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},Q$=MS({name:"canvas",initialState:F4e,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!U_(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:fl(st.clamp(n.width,64,512),64),height:fl(st.clamp(n.height,64,512),64)},o={x:Bc(n.width/2-i.width/2,64),y:Bc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...um,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Ep(r.width,r.height,n.width,n.height,Hg),s=Pp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=fl(st.clamp(i,64,n/e.stageScale),64),s=fl(st.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=I4e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=GL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},clearCanvasHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea={...um.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(y4e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=um,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(o4),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Ep(i.width,i.height,512,512,Hg),p=Pp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Ep(t,n,o,a,.95),u=Pp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=GL(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(o4)){const i=Ep(r.width,r.height,512,512,Hg),o=Pp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Ep(r,i,s,l,Hg),h=Pp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Ep(r,i,512,512,Hg),h=Pp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...um.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:fl(st.clamp(o,64,512),64),height:fl(st.clamp(a,64,512),64)},l={x:Bc(o/2-s.width/2,64),y:Bc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setShouldCropToBoundingBoxOnSave:(e,t)=>{e.shouldCropToBoundingBoxOnSave=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:B4e,addLine:J$,addPointToCurrentLine:eH,clearMask:$4e,commitStagingAreaImage:H4e,discardStagedImages:W4e,fitBoundingBoxToStage:IPe,nextStagingAreaImage:V4e,prevStagingAreaImage:U4e,redo:G4e,resetCanvas:tH,resetCanvasInteractionState:j4e,resetCanvasView:Y4e,resizeAndScaleCanvas:nH,resizeCanvas:q4e,setBoundingBoxCoordinates:gw,setBoundingBoxDimensions:cm,setBoundingBoxPreviewFill:NPe,setBrushColor:K4e,setBrushSize:mw,setCanvasContainerDimensions:X4e,clearCanvasHistory:rH,setCursorPosition:iH,setDoesCanvasNeedScaling:io,setInitialCanvasImage:q_,setInpaintReplace:jL,setIsDrawing:ZS,setIsMaskEnabled:Z4e,setIsMouseOverBoundingBox:Hy,setIsMoveBoundingBoxKeyHeld:DPe,setIsMoveStageKeyHeld:zPe,setIsMovingBoundingBox:YL,setIsMovingStage:a4,setIsTransformingBoundingBox:vw,setLayer:qL,setMaskColor:Q4e,setMergedCanvas:J4e,setShouldAutoSave:eSe,setShouldCropToBoundingBoxOnSave:tSe,setShouldDarkenOutsideBoundingBox:nSe,setShouldLockBoundingBox:FPe,setShouldPreserveMaskedArea:rSe,setShouldShowBoundingBox:iSe,setShouldShowBrush:BPe,setShouldShowBrushPreview:$Pe,setShouldShowCanvasDebugInfo:oSe,setShouldShowCheckboardTransparency:HPe,setShouldShowGrid:aSe,setShouldShowIntermediates:sSe,setShouldShowStagingImage:lSe,setShouldShowStagingOutline:KL,setShouldSnapToGrid:uSe,setShouldUseInpaintReplace:cSe,setStageCoordinates:oH,setStageDimensions:WPe,setStageScale:dSe,setTool:C0,toggleShouldLockBoundingBox:VPe,toggleTool:UPe,undo:fSe}=Q$.actions,hSe=Q$.reducer,aH=""+new URL("logo.13003d72.png",import.meta.url).href,pSe=pt(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),K_=e=>{const t=Xe(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=Ee(pSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;mt("o",()=>{t(T0(!n)),i&&setTimeout(()=>t(io(!0)),400)},[n,i]),mt("esc",()=>{t(T0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),mt("shift+o",()=>{m(),t(io(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(j_e(a.current?a.current.scrollTop:0)),t(T0(!1)),t(Y_e(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(G_e(!i)),t(io(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(Z$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,style:{borderRight:i?"":"0.3rem solid var(--tab-list-text-inactive)"},children:x("div",{className:"options-panel-margin",children:re("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(Oi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(Y$,{}):x(q$,{})})}),!i&&re("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function gSe(){const e=Ee(n=>n.options.showAdvancedOptions),t={seed:{header:x(M_,{}),feature:to.SEED,options:x(O_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(N_,{})},face_restore:{header:x(P_,{}),feature:to.FACE_CORRECTION,options:x(KS,{})},upscale:{header:x(R_,{}),feature:to.UPSCALE,options:x(XS,{})},other:{header:x(A$,{}),feature:to.OTHER,options:x(L$,{})}};return re(K_,{children:[x(j_,{}),x(G_,{}),x(F_,{}),x(T$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(W3e,{}),x(D_,{}),e?x(B_,{accordionInfo:t}):null]})}const X_=C.exports.createContext(null),mSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(X_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:re("div",{className:"image-upload-button",children:[x(W_,{}),x(Uf,{size:"lg",children:"Click or Drag and Drop"})]})})},vSe=pt(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),qC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=kv(),a=Xe(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=Ee(vSe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(x4e(e)),o()};mt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(R$(!S.target.checked));return re(Tn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(oB,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(G0,{children:re(aB,{children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(Lv,{children:re(rn,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(hd,{children:re(rn,{alignItems:"center",children:[x(lh,{mb:0,children:"Don't ask me again"}),x(s_,{checked:!s,onChange:v})]})})]})}),re(kS,{children:[x($a,{ref:h,onClick:o,children:"Cancel"}),x($a,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),Zc=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return re(t_,{...o,children:[x(i_,{children:t}),re(r_,{className:`invokeai__popover-content ${r}`,children:[i&&x(n_,{className:"invokeai__popover-arrow"}),n]})]})},ySe=pt([e=>e.system,e=>e.options,e=>e.gallery,Ir],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),sH=()=>{const e=Xe(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=Ee(ySe),m=u1(),v=()=>{!u||(h&&e(sd(!1)),e(f2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};mt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(z_e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};mt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(d2(u.metadata.image.seed))};mt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(gb(u.metadata.image.prompt));mt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(S4e(u))};mt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(b4e(u))};mt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(dV(!l)),R=()=>{!u||(h&&e(sd(!1)),e(q_(u)),e(io(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return mt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),re("div",{className:"current-image-options",children:[x(ra,{isAttached:!0,children:x(Zc,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(d4e,{})}),children:re("div",{className:"current-image-send-to-popover",children:[x(ta,{size:"sm",onClick:v,leftIcon:x(HL,{}),children:"Send to Image to Image"}),x(ta,{size:"sm",onClick:R,leftIcon:x(HL,{}),children:"Send to Unified Canvas"}),x(ta,{size:"sm",onClick:S,leftIcon:x(H_,{}),children:"Copy Link to Image"}),x(ta,{leftIcon:x(B$,{}),size:"sm",children:x(Gf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),re(ra,{isAttached:!0,children:[x(gt,{icon:x(s4e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(c4e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(G5e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),re(ra,{isAttached:!0,children:[x(Zc,{trigger:"hover",triggerComponent:x(gt,{icon:x(Q5e,{}),"aria-label":"Restore Faces"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(KS,{}),x(ta,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(Zc,{trigger:"hover",triggerComponent:x(gt,{icon:x(K5e,{}),"aria-label":"Upscale"}),children:re("div",{className:"current-image-postprocessing-popover",children:[x(XS,{}),x(ta,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(F$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(qC,{image:u,children:x(gt,{icon:x(f1,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},SSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},lH=MS({name:"gallery",initialState:SSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Xp,clearIntermediateImage:yw,removeImage:uH,setCurrentImage:bSe,addGalleryImages:xSe,setIntermediateImage:wSe,selectNextImage:Z_,selectPrevImage:Q_,setShouldPinGallery:CSe,setShouldShowGallery:_0,setGalleryScrollPosition:_Se,setGalleryImageMinimumWidth:Tp,setGalleryImageObjectFit:kSe,setShouldHoldGalleryOpen:cH,setShouldAutoSwitchToNewImages:ESe,setCurrentCategory:Wy,setGalleryWidth:Vy}=lH.actions,PSe=lH.reducer;ut({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});ut({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});ut({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});ut({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});ut({displayName:"SunIcon",path:re("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ut({d:"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",displayName:"AddIcon"});ut({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});ut({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});ut({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});ut({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});ut({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});ut({displayName:"ViewIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ut({displayName:"ViewOffIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});ut({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});ut({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});ut({displayName:"RepeatIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});ut({displayName:"RepeatClockIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});ut({displayName:"EditIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ut({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ut({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ut({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ut({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ut({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ut({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ut({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ut({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});ut({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var dH=ut({displayName:"ExternalLinkIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ut({displayName:"LinkIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});ut({displayName:"PlusSquareIcon",path:re("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ut({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});ut({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});ut({displayName:"TimeIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});ut({displayName:"ArrowRightIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});ut({displayName:"ArrowLeftIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});ut({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});ut({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});ut({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});ut({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});ut({displayName:"EmailIcon",path:re("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});ut({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});ut({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});ut({displayName:"SpinnerIcon",path:re(Tn,{children:[x("defs",{children:re("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),re("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ut({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});ut({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});ut({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});ut({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});ut({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});ut({displayName:"InfoOutlineIcon",path:re("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ut({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});ut({displayName:"QuestionOutlineIcon",path:re("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ut({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});ut({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});ut({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ut({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ut({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function TSe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const qn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>re(rn,{gap:2,children:[n&&x(Oi,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(TSe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),re(rn,{direction:i?"column":"row",children:[re(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?re(Gf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(dH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),ASe=(e,t)=>e.image.uuid===t.image.uuid,fH=C.exports.memo(({image:e,styleClass:t})=>{const n=Xe();mt("esc",()=>{n(dV(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:p,seamless:m,hires_fix:v,width:S,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:T,orig_path:M,scale:R}=r,I=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:re(rn,{gap:1,direction:"column",width:"100%",children:[re(rn,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),re(Gf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(dH,{mx:"2px"})]})]}),Object.keys(r).length>0?re(Tn,{children:[i&&x(qn,{label:"Generation type",value:i}),e.metadata?.model_weights&&x(qn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(i)&&x(qn,{label:"Original image",value:M}),i==="gfpgan"&&E!==void 0&&x(qn,{label:"Fix faces strength",value:E,onClick:()=>n(K3(E))}),i==="esrgan"&&R!==void 0&&x(qn,{label:"Upscaling scale",value:R,onClick:()=>n(b9(R))}),i==="esrgan"&&E!==void 0&&x(qn,{label:"Upscaling strength",value:E,onClick:()=>n(x9(E))}),s&&x(qn,{label:"Prompt",labelPosition:"top",value:U3(s),onClick:()=>n(gb(s))}),l!==void 0&&x(qn,{label:"Seed",value:l,onClick:()=>n(d2(l))}),a&&x(qn,{label:"Sampler",value:a,onClick:()=>n(iV(a))}),h&&x(qn,{label:"Steps",value:h,onClick:()=>n(eV(h))}),p!==void 0&&x(qn,{label:"CFG scale",value:p,onClick:()=>n(tV(p))}),u&&u.length>0&&x(qn,{label:"Seed-weight pairs",value:i4(u),onClick:()=>n(cV(i4(u)))}),m&&x(qn,{label:"Seamless",value:m,onClick:()=>n(oV(m))}),v&&x(qn,{label:"High Resolution Optimization",value:v,onClick:()=>n(aV(v))}),S&&x(qn,{label:"Width",value:S,onClick:()=>n(rV(S))}),w&&x(qn,{label:"Height",value:w,onClick:()=>n(nV(w))}),k&&x(qn,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(f2(k))}),T&&x(qn,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(lV(T))}),i==="img2img"&&E&&x(qn,{label:"Image to image strength",value:E,onClick:()=>n(S9(E))}),P&&x(qn,{label:"Image to image fit",value:P,onClick:()=>n(uV(P))}),o&&o.length>0&&re(Tn,{children:[x(Uf,{size:"sm",children:"Postprocessing"}),o.map((N,z)=>{if(N.type==="esrgan"){const{scale:$,strength:H}=N;return re(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(qn,{label:"Scale",value:$,onClick:()=>n(b9($))}),x(qn,{label:"Strength",value:H,onClick:()=>n(x9(H))})]},z)}else if(N.type==="gfpgan"){const{strength:$}=N;return re(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("gfpgan"))}})]},z)}else if(N.type==="codeformer"){const{strength:$,fidelity:H}=N;return re(rn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(K3($)),n(X3("codeformer"))}}),H&&x(qn,{label:"Fidelity",value:H,onClick:()=>{n(sV(H)),n(X3("codeformer"))}})]},z)}})]}),re(rn,{gap:2,direction:"column",children:[re(rn,{gap:2,children:[x(Oi,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x(H_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(I)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:I})})]})]}):x(zz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},ASe),hH=pt([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function LSe(){const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=Ee(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())},m=()=>{e(sd(!0))};return re("div",{className:"current-image-preview",children:[i&&x(vS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(D$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ps,{"aria-label":"Next image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(fH,{image:i,styleClass:"current-image-metadata"})]})}const MSe=pt([e=>e.gallery,e=>e.options,Ir],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),pH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=Ee(MSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?re(Tn,{children:[x(sH,{}),x(LSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(R5e,{})})})},OSe=()=>{const e=C.exports.useContext(X_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(W_,{}),onClick:e||void 0})};function RSe(){const e=Ee(i=>i.options.initialImage),t=Xe(),n=u1(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(fV())};return re(Tn,{children:[re("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(OSe,{})]}),e&&x("div",{className:"init-image-preview",children:x(vS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const ISe=()=>{const e=Ee(r=>r.options.initialImage),{currentImage:t}=Ee(r=>r.gallery);return re("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(RSe,{})}):x(mSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(pH,{})})]})};function NSe(e){return ht({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var DSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=globalThis&&globalThis.__assign||function(){return Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},VSe=["as","style","className","grid","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"],eM="__resizable_base__",gH=function(e){BSe(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(eM):o.className+=eM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,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},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}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||$Se},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=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"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return Sw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?Sw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Sw(r.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 n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),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 n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Ap("left",o),s=i&&Ap("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=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 l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,E),R=Math.min(p,P),I=Math.max(m,k),N=Math.min(v,T);n=Gy(n,M,R),r=Gy(r,I,N)}else n=Gy(n,h,p),r=Gy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&HSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&jy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,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,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&jy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=jy(n)?n.touches[0].clientX:n.clientX,h=jy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,E=this.getParentSize(),P=WSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,R=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=JL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=JL(T,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(M,T,{width:R.maxWidth,height:R.maxHeight},{width:s,height:l});if(M=I.newWidth,T=I.newHeight,this.props.grid){var N=QL(M,this.props.grid[0]),z=QL(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(N-M)<=$?N:M,T=$===0||Math.abs(z-T)<=$?z:T}var H={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var q=M/E.width*100;M=q+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var V=M/this.window.innerHeight*100;M=V+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var q=T/E.height*100;T=q+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var V=T/this.window.innerHeight*100;T=V+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Ol.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,H)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(FSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return VSe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ul(ul(ul({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 re(o,{...ul({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("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],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Yn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function a2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,USe(i,...t)]}function USe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function GSe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mH(...e){return t=>e.forEach(n=>GSe(n,t))}function Va(...e){return C.exports.useCallback(mH(...e),e)}const Iv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(YSe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(KC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(KC,An({},r,{ref:t}),n)});Iv.displayName="Slot";const KC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...qSe(r,n.props),ref:mH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});KC.displayName="SlotClone";const jSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function YSe(e){return C.exports.isValidElement(e)&&e.type===jSe}function qSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const KSe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],wu=KSe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Iv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vH(e,t){e&&Ol.exports.flushSync(()=>e.dispatchEvent(t))}function yH(e){const t=e+"CollectionProvider",[n,r]=a2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=le.useRef(null),P=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=Va(S,P.collectionRef);return le.createElement(Iv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=le.useRef(null),T=Va(S,k),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),le.createElement(Iv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,R)=>P.indexOf(M.ref.current)-P.indexOf(R.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const XSe=C.exports.createContext(void 0);function SH(e){const t=C.exports.useContext(XSe);return e||t||"ltr"}function Al(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function ZSe(e,t=globalThis?.document){const n=Al(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const XC="dismissableLayer.update",QSe="dismissableLayer.pointerDownOutside",JSe="dismissableLayer.focusOutside";let tM;const ebe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(ebe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Va(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=p?E.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,R=T>=k,I=nbe(z=>{const $=z.target,H=[...h.branches].some(q=>q.contains($));!R||H||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=rbe(z=>{const $=z.target;[...h.branches].some(q=>q.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return ZSe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(tM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),nM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=tM)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),nM())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(XC,z),()=>document.removeEventListener(XC,z)},[]),C.exports.createElement(wu.div,An({},u,{ref:w,style:{pointerEvents:M?R?"auto":"none":void 0,...e.style},onFocusCapture:Yn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Yn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Yn(e.onPointerDownCapture,I.onPointerDownCapture)}))});function nbe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){bH(QSe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function rbe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&bH(JSe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nM(){const e=new CustomEvent(XC);document.dispatchEvent(e)}function bH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?vH(i,o):i.dispatchEvent(o)}let bw=0;function ibe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:rM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:rM()),bw++,()=>{bw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),bw--}},[])}function rM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const xw="focusScope.autoFocusOnMount",ww="focusScope.autoFocusOnUnmount",iM={bubbles:!1,cancelable:!0},obe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Al(i),h=Al(o),p=C.exports.useRef(null),m=Va(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?p.current=k:wf(p.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||wf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){aM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(xw,iM);s.addEventListener(xw,u),s.dispatchEvent(P),P.defaultPrevented||(abe(dbe(xH(s)),{select:!0}),document.activeElement===w&&wf(s))}return()=>{s.removeEventListener(xw,u),setTimeout(()=>{const P=new CustomEvent(ww,iM);s.addEventListener(ww,h),s.dispatchEvent(P),P.defaultPrevented||wf(w??document.body,{select:!0}),s.removeEventListener(ww,h),aM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=sbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&wf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&wf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(wu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function abe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wf(r,{select:t}),document.activeElement!==n)return}function sbe(e){const t=xH(e),n=oM(t,e),r=oM(t.reverse(),e);return[n,r]}function xH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oM(e,t){for(const n of e)if(!lbe(n,{upTo:t}))return n}function lbe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ube(e){return e instanceof HTMLInputElement&&"select"in e}function wf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ube(e)&&t&&e.select()}}const aM=cbe();function cbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=sM(e,t),e.unshift(t)},remove(t){var n;e=sM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function sM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function dbe(e){return e.filter(t=>t.tagName!=="A")}const q0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},fbe=zw["useId".toString()]||(()=>{});let hbe=0;function pbe(e){const[t,n]=C.exports.useState(fbe());return q0(()=>{e||n(r=>r??String(hbe++))},[e]),e||(t?`radix-${t}`:"")}function h1(e){return e.split("-")[0]}function QS(e){return e.split("-")[1]}function p1(e){return["top","bottom"].includes(h1(e))?"x":"y"}function J_(e){return e==="y"?"height":"width"}function lM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=p1(t),l=J_(s),u=r[l]/2-i[l]/2,h=h1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(QS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const gbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=lM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=wH(r),h={x:i,y:o},p=p1(a),m=QS(a),v=J_(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",E=p==="y"?"bottom":"right",P=s.reference[v]+s.reference[p]-h[p]-s.floating[v],k=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const R=P/2-k/2,I=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+R,$=ZC(I,z,N),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zSbe[t])}function bbe(e,t,n){n===void 0&&(n=!1);const r=QS(e),i=p1(e),o=J_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=u4(a)),{main:a,cross:u4(a)}}const xbe={start:"end",end:"start"};function cM(e){return e.replace(/start|end/g,t=>xbe[t])}const wbe=["top","right","bottom","left"];function Cbe(e){const t=u4(e);return[cM(e),t,cM(t)]}const _be=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=h1(r),P=p||(w===a||!v?[u4(a)]:Cbe(a)),k=[a,...P],T=await l4(t,S),M=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:H}=bbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[H])}if(R=[...R,{placement:r,overflows:M}],!M.every($=>$<=0)){var I,N;const $=((I=(N=i.flip)==null?void 0:N.index)!=null?I:0)+1,H=k[$];if(H)return{data:{index:$,overflows:R},reset:{placement:H}};let q="bottom";switch(m){case"bestFit":{var z;const de=(z=R.map(V=>[V,V.overflows.filter(J=>J>0).reduce((J,ie)=>J+ie,0)]).sort((V,J)=>V[1]-J[1])[0])==null?void 0:z[0].placement;de&&(q=de);break}case"initialPlacement":q=a;break}if(r!==q)return{reset:{placement:q}}}return{}}}};function dM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fM(e){return wbe.some(t=>e[t]>=0)}const kbe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await l4(r,{...n,elementContext:"reference"}),a=dM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:fM(a)}}}case"escaped":{const o=await l4(r,{...n,altBoundary:!0}),a=dM(o,i.floating);return{data:{escapedOffsets:a,escaped:fM(a)}}}default:return{}}}}};async function Ebe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=h1(n),s=QS(n),l=p1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Pbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Ebe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function CH(e){return e==="x"?"y":"x"}const Tbe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await l4(t,l),p=p1(h1(i)),m=CH(p);let v=u[p],S=u[m];if(o){const E=p==="y"?"top":"left",P=p==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=ZC(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=ZC(k,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Abe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=p1(i),m=CH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const R=p==="y"?"height":"width",I=o.reference[p]-o.floating[R]+E.mainAxis,N=o.reference[p]+o.reference[R]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const R=p==="y"?"width":"height",I=["top","left"].includes(h1(i)),N=o.reference[m]-o.floating[R]+(I&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(I?0:E.crossAxis),z=o.reference[m]+o.reference[R]+(I?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(I?E.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function _H(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Au(e){if(e==null)return window;if(!_H(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function s2(e){return Au(e).getComputedStyle(e)}function Cu(e){return _H(e)?"":e?(e.nodeName||"").toLowerCase():""}function kH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Au(e).HTMLElement}function ad(e){return e instanceof Au(e).Element}function Lbe(e){return e instanceof Au(e).Node}function ek(e){if(typeof ShadowRoot>"u")return!1;const t=Au(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function JS(e){const{overflow:t,overflowX:n,overflowY:r}=s2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Mbe(e){return["table","td","th"].includes(Cu(e))}function EH(e){const t=/firefox/i.test(kH()),n=s2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function PH(){return!/^((?!chrome|android).)*safari/i.test(kH())}const hM=Math.min,Wm=Math.max,c4=Math.round;function _u(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&c4(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&c4(s.height)/e.offsetHeight||1);const h=ad(e)?Au(e):window,p=!PH()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function Sd(e){return((Lbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function eb(e){return ad(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function TH(e){return _u(Sd(e)).left+eb(e).scrollLeft}function Obe(e){const t=_u(e);return c4(t.width)!==e.offsetWidth||c4(t.height)!==e.offsetHeight}function Rbe(e,t,n){const r=Ll(t),i=Sd(t),o=_u(e,r&&Obe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((Cu(t)!=="body"||JS(i))&&(a=eb(t)),Ll(t)){const l=_u(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=TH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function AH(e){return Cu(e)==="html"?e:e.assignedSlot||e.parentNode||(ek(e)?e.host:null)||Sd(e)}function pM(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Ibe(e){let t=AH(e);for(ek(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(Cu(t));){if(EH(t))return t;t=t.parentNode}return null}function QC(e){const t=Au(e);let n=pM(e);for(;n&&Mbe(n)&&getComputedStyle(n).position==="static";)n=pM(n);return n&&(Cu(n)==="html"||Cu(n)==="body"&&getComputedStyle(n).position==="static"&&!EH(n))?t:n||Ibe(e)||t}function gM(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=_u(e);return{width:t.width,height:t.height}}function Nbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=Sd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((Cu(n)!=="body"||JS(o))&&(a=eb(n)),Ll(n))){const l=_u(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function Dbe(e,t){const n=Au(e),r=Sd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=PH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function zbe(e){var t;const n=Sd(e),r=eb(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Wm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Wm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+TH(e);const l=-r.scrollTop;return s2(i||n).direction==="rtl"&&(s+=Wm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function LH(e){const t=AH(e);return["html","body","#document"].includes(Cu(t))?e.ownerDocument.body:Ll(t)&&JS(t)?t:LH(t)}function d4(e,t){var n;t===void 0&&(t=[]);const r=LH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Au(r),a=i?[o].concat(o.visualViewport||[],JS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(d4(a))}function Fbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ek(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Bbe(e,t){const n=_u(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function mM(e,t,n){return t==="viewport"?s4(Dbe(e,n)):ad(t)?Bbe(t,n):s4(zbe(Sd(e)))}function $be(e){const t=d4(e),r=["absolute","fixed"].includes(s2(e).position)&&Ll(e)?QC(e):e;return ad(r)?t.filter(i=>ad(i)&&Fbe(i,r)&&Cu(i)!=="body"):[]}function Hbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?$be(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=mM(t,h,i);return u.top=Wm(p.top,u.top),u.right=hM(p.right,u.right),u.bottom=hM(p.bottom,u.bottom),u.left=Wm(p.left,u.left),u},mM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Wbe={getClippingRect:Hbe,convertOffsetParentRelativeRectToViewportRelativeRect:Nbe,isElement:ad,getDimensions:gM,getOffsetParent:QC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Rbe(t,QC(n),r),floating:{...gM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>s2(e).direction==="rtl"};function Vbe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...ad(e)?d4(e):[],...d4(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),ad(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?_u(e):null;s&&S();function S(){const w=_u(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Ube=(e,t,n)=>gbe(e,t,{platform:Wbe,...n});var JC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function e9(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 n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!e9(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!e9(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Gbe(e){const t=C.exports.useRef(e);return JC(()=>{t.current=e}),t}function jbe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=Gbe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);e9(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Ube(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Ol.exports.flushSync(()=>{h(T)})})},[p,n,r]);JC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);JC(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const Ybe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?uM({element:t.current,padding:n}).fn(i):{}:t?uM({element:t,padding:n}).fn(i):{}}}};function qbe(e){const[t,n]=C.exports.useState(void 0);return q0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const MH="Popper",[tk,OH]=a2(MH),[Kbe,RH]=tk(MH),Xbe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Kbe,{scope:t,anchor:r,onAnchorChange:i},n)},Zbe="PopperAnchor",Qbe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=RH(Zbe,n),a=C.exports.useRef(null),s=Va(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(wu.div,An({},i,{ref:s}))}),f4="PopperContent",[Jbe,GPe]=tk(f4),[exe,txe]=tk(f4,{hasParent:!1,positionUpdateFns:new Set}),nxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...R}=e,I=RH(f4,h),[N,z]=C.exports.useState(null),$=Va(t,Pt=>z(Pt)),[H,q]=C.exports.useState(null),de=qbe(H),V=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,ie=p+(v!=="center"?"-"+v:""),ee=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},X=Array.isArray(E)?E:[E],G=X.length>0,Q={padding:ee,boundary:X.filter(ixe),altBoundary:G},{reference:j,floating:Z,strategy:me,x:Se,y:xe,placement:Be,middlewareData:We,update:dt}=jbe({strategy:"fixed",placement:ie,whileElementsMounted:Vbe,middleware:[Pbe({mainAxis:m+J,alignmentAxis:S}),M?Tbe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Abe():void 0,...Q}):void 0,H?Ybe({element:H,padding:w}):void 0,M?_be({...Q}):void 0,oxe({arrowWidth:V,arrowHeight:J}),T?kbe({strategy:"referenceHidden"}):void 0].filter(rxe)});q0(()=>{j(I.anchor)},[j,I.anchor]);const Ye=Se!==null&&xe!==null,[rt,Ze]=IH(Be),Ke=(i=We.arrow)===null||i===void 0?void 0:i.x,Et=(o=We.arrow)===null||o===void 0?void 0:o.y,bt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,it]=C.exports.useState();q0(()=>{N&&it(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Ot,positionUpdateFns:lt}=txe(f4,h),xt=!Ot;C.exports.useLayoutEffect(()=>{if(!xt)return lt.add(dt),()=>{lt.delete(dt)}},[xt,lt,dt]),C.exports.useLayoutEffect(()=>{xt&&Ye&&Array.from(lt).reverse().forEach(Pt=>requestAnimationFrame(Pt))},[xt,Ye,lt]);const Cn={"data-side":rt,"data-align":Ze,...R,ref:$,style:{...R.style,animation:Ye?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:Ye?`translate3d(${Math.round(Se)}px, ${Math.round(xe)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(Jbe,{scope:h,placedSide:rt,onArrowChange:q,arrowX:Ke,arrowY:Et,shouldHideArrow:bt},xt?C.exports.createElement(exe,{scope:h,hasParent:!0,positionUpdateFns:lt},C.exports.createElement(wu.div,Cn)):C.exports.createElement(wu.div,Cn)))});function rxe(e){return e!==void 0}function ixe(e){return e!==null}const oxe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=IH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?E:`${P}px`,M=`${-v}px`):S==="top"?(T=p?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?E:`${k}px`),{data:{x:T,y:M}}}});function IH(e){const[t,n="center"]=e.split("-");return[t,n]}const axe=Xbe,sxe=Qbe,lxe=nxe;function uxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const NH=e=>{const{present:t,children:n}=e,r=cxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Va(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};NH.displayName="Presence";function cxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=uxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=qy(r.current);o.current=s==="mounted"?u:"none"},[s]),q0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=qy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),q0(()=>{if(t){const u=p=>{const v=qy(r.current).includes(p.animationName);p.target===t&&v&&Ol.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=qy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function qy(e){return e?.animationName||"none"}function dxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=fxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Al(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function fxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Al(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const Cw="rovingFocusGroup.onEntryFocus",hxe={bubbles:!1,cancelable:!0},nk="RovingFocusGroup",[t9,DH,pxe]=yH(nk),[gxe,zH]=a2(nk,[pxe]),[mxe,vxe]=gxe(nk),yxe=C.exports.forwardRef((e,t)=>C.exports.createElement(t9.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(t9.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(Sxe,An({},e,{ref:t}))))),Sxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Va(t,p),v=SH(o),[S=null,w]=dxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Al(u),T=DH(n),M=C.exports.useRef(!1),[R,I]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(Cw,k),()=>N.removeEventListener(Cw,k)},[k]),C.exports.createElement(mxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>I(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>I(N=>N-1),[])},C.exports.createElement(wu.div,An({tabIndex:E||R===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Yn(e.onMouseDown,()=>{M.current=!0}),onFocus:Yn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const $=new CustomEvent(Cw,hxe);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const H=T().filter(ie=>ie.focusable),q=H.find(ie=>ie.active),de=H.find(ie=>ie.id===S),J=[q,de,...H].filter(Boolean).map(ie=>ie.ref.current);FH(J)}}M.current=!1}),onBlur:Yn(e.onBlur,()=>P(!1))})))}),bxe="RovingFocusGroupItem",xxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=pbe(),s=vxe(bxe,n),l=s.currentTabStopId===a,u=DH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(t9.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(wu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Yn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Yn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Yn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=_xe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?kxe(w,E+1):w.slice(E+1)}setTimeout(()=>FH(w))}})})))}),wxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Cxe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _xe(e,t,n){const r=Cxe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return wxe[r]}function FH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function kxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Exe=yxe,Pxe=xxe,Txe=["Enter"," "],Axe=["ArrowDown","PageUp","Home"],BH=["ArrowUp","PageDown","End"],Lxe=[...Axe,...BH],tb="Menu",[n9,Mxe,Oxe]=yH(tb),[hh,$H]=a2(tb,[Oxe,OH,zH]),rk=OH(),HH=zH(),[Rxe,nb]=hh(tb),[Ixe,ik]=hh(tb),Nxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=rk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Al(o),m=SH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(axe,s,C.exports.createElement(Rxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Ixe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},Dxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=rk(n);return C.exports.createElement(sxe,An({},i,r,{ref:t}))}),zxe="MenuPortal",[jPe,Fxe]=hh(zxe,{forceMount:void 0}),Qc="MenuContent",[Bxe,WH]=hh(Qc),$xe=C.exports.forwardRef((e,t)=>{const n=Fxe(Qc,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=nb(Qc,e.__scopeMenu),a=ik(Qc,e.__scopeMenu);return C.exports.createElement(n9.Provider,{scope:e.__scopeMenu},C.exports.createElement(NH,{present:r||o.open},C.exports.createElement(n9.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Hxe,An({},i,{ref:t})):C.exports.createElement(Wxe,An({},i,{ref:t})))))}),Hxe=C.exports.forwardRef((e,t)=>{const n=nb(Qc,e.__scopeMenu),r=C.exports.useRef(null),i=Va(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return mF(o)},[]),C.exports.createElement(VH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Yn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Wxe=C.exports.forwardRef((e,t)=>{const n=nb(Qc,e.__scopeMenu);return C.exports.createElement(VH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),VH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=nb(Qc,n),E=ik(Qc,n),P=rk(n),k=HH(n),T=Mxe(n),[M,R]=C.exports.useState(null),I=C.exports.useRef(null),N=Va(t,I,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),H=C.exports.useRef(0),q=C.exports.useRef(null),de=C.exports.useRef("right"),V=C.exports.useRef(0),J=v?nB:C.exports.Fragment,ie=v?{as:Iv,allowPinchZoom:!0}:void 0,ee=G=>{var Q,j;const Z=$.current+G,me=T().filter(Ye=>!Ye.disabled),Se=document.activeElement,xe=(Q=me.find(Ye=>Ye.ref.current===Se))===null||Q===void 0?void 0:Q.textValue,Be=me.map(Ye=>Ye.textValue),We=Zxe(Be,Z,xe),dt=(j=me.find(Ye=>Ye.textValue===We))===null||j===void 0?void 0:j.ref.current;(function Ye(rt){$.current=rt,window.clearTimeout(z.current),rt!==""&&(z.current=window.setTimeout(()=>Ye(""),1e3))})(Z),dt&&setTimeout(()=>dt.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),ibe();const X=C.exports.useCallback(G=>{var Q,j;return de.current===((Q=q.current)===null||Q===void 0?void 0:Q.side)&&Jxe(G,(j=q.current)===null||j===void 0?void 0:j.area)},[]);return C.exports.createElement(Bxe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),onItemLeave:C.exports.useCallback(G=>{var Q;X(G)||((Q=I.current)===null||Q===void 0||Q.focus(),R(null))},[X]),onTriggerLeave:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),pointerGraceTimerRef:H,onPointerGraceIntentChange:C.exports.useCallback(G=>{q.current=G},[])},C.exports.createElement(J,ie,C.exports.createElement(obe,{asChild:!0,trapped:i,onMountAutoFocus:Yn(o,G=>{var Q;G.preventDefault(),(Q=I.current)===null||Q===void 0||Q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(tbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Exe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:R,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(lxe,An({role:"menu","aria-orientation":"vertical","data-state":qxe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Yn(S.onKeyDown,G=>{const j=G.target.closest("[data-radix-menu-content]")===G.currentTarget,Z=G.ctrlKey||G.altKey||G.metaKey,me=G.key.length===1;j&&(G.key==="Tab"&&G.preventDefault(),!Z&&me&&ee(G.key));const Se=I.current;if(G.target!==Se||!Lxe.includes(G.key))return;G.preventDefault();const Be=T().filter(We=>!We.disabled).map(We=>We.ref.current);BH.includes(G.key)&&Be.reverse(),Kxe(Be)}),onBlur:Yn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Yn(e.onPointerMove,i9(G=>{const Q=G.target,j=V.current!==G.clientX;if(G.currentTarget.contains(Q)&&j){const Z=G.clientX>V.current?"right":"left";de.current=Z,V.current=G.clientX}}))})))))))}),r9="MenuItem",vM="menu.itemSelect",Vxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=ik(r9,e.__scopeMenu),s=WH(r9,e.__scopeMenu),l=Va(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(vM,{bubbles:!0,cancelable:!0});p.addEventListener(vM,v=>r?.(v),{once:!0}),vH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Uxe,An({},i,{ref:l,disabled:n,onClick:Yn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:Yn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Yn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Txe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),Uxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=WH(r9,n),s=HH(n),l=C.exports.useRef(null),u=Va(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(n9.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Pxe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(wu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Yn(e.onPointerMove,i9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Yn(e.onPointerLeave,i9(S=>a.onItemLeave(S))),onFocus:Yn(e.onFocus,()=>p(!0)),onBlur:Yn(e.onBlur,()=>p(!1))}))))}),Gxe="MenuRadioGroup";hh(Gxe,{value:void 0,onValueChange:()=>{}});const jxe="MenuItemIndicator";hh(jxe,{checked:!1});const Yxe="MenuSub";hh(Yxe);function qxe(e){return e?"open":"closed"}function Kxe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Zxe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Xxe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Qxe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function Jxe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Qxe(n,t)}function i9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const ewe=Nxe,twe=Dxe,nwe=$xe,rwe=Vxe,UH="ContextMenu",[iwe,YPe]=a2(UH,[$H]),rb=$H(),[owe,GH]=iwe(UH),awe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=rb(t),u=Al(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(owe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(ewe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},swe="ContextMenuTrigger",lwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(swe,n),o=rb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(twe,An({},o,{virtualRef:s})),C.exports.createElement(wu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Yn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:Yn(e.onPointerDown,Ky(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:Yn(e.onPointerMove,Ky(u)),onPointerCancel:Yn(e.onPointerCancel,Ky(u)),onPointerUp:Yn(e.onPointerUp,Ky(u))})))}),uwe="ContextMenuContent",cwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(uwe,n),o=rb(n),a=C.exports.useRef(!1);return C.exports.createElement(nwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),dwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=rb(n);return C.exports.createElement(rwe,An({},i,r,{ref:t}))});function Ky(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const fwe=awe,hwe=lwe,pwe=cwe,pf=dwe,gwe=pt([e=>e.gallery,e=>e.options,Pu,Ir],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),mwe=pt([e=>e.options,e=>e.gallery,e=>e.system,Ir],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),vwe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,ywe=C.exports.memo(e=>{const t=Xe(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=Ee(mwe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=u1(),E=()=>S(!0),P=()=>S(!1),k=()=>{s.metadata&&t(gb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(d2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(sd(!1)),t(f2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},R=()=>{a&&t(sd(!1)),t(q_(s)),t(nH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},I=()=>{m&&t(W_e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(V_e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return re(fwe,{onOpenChange:$=>{t(cH($))},children:[x(hwe,{children:re(pd,{position:"relative",className:"hoverable-image",onMouseOver:E,onMouseOut:P,userSelect:"none",children:[x(vS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(bSe(s)),children:l&&x(ma,{width:"50%",height:"50%",as:$_,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Oi,{label:"Delete image",hasArrow:!0,children:x(qC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(h4e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),re(pwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(pf,{onClickCapture:k,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(pf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(pf,{onClickCapture:I,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Oi,{label:"Load initial image used for this generation",children:x(pf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(pf,{onClickCapture:M,children:"Send to Image To Image"}),x(pf,{onClickCapture:R,children:"Send to Unified Canvas"}),x(qC,{image:s,children:x(pf,{"data-warning":!0,children:"Delete Image"})})]})]})},vwe),Swe=320;function jH(){const e=Xe(),t=u1(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:S,galleryWidth:w,isLightBoxOpen:E,isStaging:P}=Ee(gwe),[k,T]=C.exports.useState(300),[M,R]=C.exports.useState(590),[I,N]=C.exports.useState(w>=Swe);C.exports.useLayoutEffect(()=>{if(!!o){if(E){e(Vy(400)),T(400),R(400);return}h==="unifiedCanvas"?(T(190),R(190),e(io(!0))):h==="img2img"?(e(Vy(Math.min(Math.max(Number(w),0),490))),R(490)):(e(Vy(Math.min(Math.max(Number(w),0),590))),R(590))}},[e,h,o,w,E]),C.exports.useLayoutEffect(()=>{o||R(window.innerWidth)},[o,E]);const z=C.exports.useRef(null),$=C.exports.useRef(null),H=C.exports.useRef(null),q=()=>{e(CSe(!o)),e(io(!0))},de=()=>{a?J():V()},V=()=>{e(_0(!0)),o&&e(io(!0))},J=C.exports.useCallback(()=>{e(_0(!1)),e(cH(!1)),e(_Se($.current?$.current.scrollTop:0))},[e]),ie=()=>{e(jC(r))},ee=j=>{e(Tp(j))},X=()=>{m||(H.current=window.setTimeout(()=>J(),500))},G=()=>{H.current&&window.clearTimeout(H.current)};mt("g",()=>{de()},[a,o]),mt("left",()=>{e(Q_())},{enabled:!P},[P]),mt("right",()=>{e(Z_())},{enabled:!P},[P]),mt("shift+g",()=>{q()},[o]),mt("esc",()=>{e(_0(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Q=32;return mt("shift+up",()=>{if(!(l>=256)&&l<256){const j=l+Q;j<=256?(e(Tp(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Tp(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),mt("shift+down",()=>{if(!(l<=32)&&l>32){const j=l-Q;j>32?(e(Tp(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Tp(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),C.exports.useEffect(()=>{!$.current||($.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),C.exports.useEffect(()=>{function j(Z){!o&&z.current&&!z.current.contains(Z.target)&&J()}return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[J,o]),x(Z$,{nodeRef:z,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:z,onMouseLeave:o?void 0:X,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:re(gH,{minWidth:k,maxWidth:M,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{left:!0},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(j,Z,me,Se)=>{e(Vy(st.clamp(Number(w)+Se.width,0,Number(M)))),me.removeAttribute("data-resize-alert")},onResize:(j,Z,me,Se)=>{const xe=st.clamp(Number(w)+Se.width,0,Number(M));xe>=315&&!I?N(!0):xe<315&&I&&N(!1),xe>=M?me.setAttribute("data-resize-alert","true"):me.removeAttribute("data-resize-alert")},children:[re("div",{className:"image-gallery-header",children:[x(ra,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:I?re(Tn,{children:[x(ta,{size:"sm","data-selected":r==="result",onClick:()=>e(Wy("result")),children:"Generations"}),x(ta,{size:"sm","data-selected":r==="user",onClick:()=>e(Wy("user")),children:"Uploads"})]}):re(Tn,{children:[x(gt,{"aria-label":"Show Generations",tooltip:"Show Generations","data-selected":r==="result",icon:x(J5e,{}),onClick:()=>e(Wy("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(g4e,{}),onClick:()=>e(Wy("user"))})]})}),re("div",{className:"image-gallery-header-right-icons",children:[x(Zc,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(V_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:re("div",{className:"image-gallery-settings-popover",children:[re("div",{children:[x(Y0,{value:l,onChange:ee,min:32,max:256,hideTooltip:!0,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Tp(64)),icon:x(L_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(Aa,{label:"Maintain Aspect Ratio",isChecked:p==="contain",onChange:()=>e(kSe(p==="contain"?"cover":"contain"))})}),x("div",{children:x(Aa,{label:"Auto-Switch to New Images",isChecked:v,onChange:j=>e(ESe(j.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:q,icon:o?x(Y$,{}):x(q$,{})})]})]}),x("div",{className:"image-gallery-container",ref:$,children:n.length||S?re(Tn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(j=>{const{uuid:Z}=j;return x(ywe,{image:j,isSelected:i===Z},Z)})}),x($a,{onClick:ie,isDisabled:!S,className:"image-gallery-load-more-btn",children:S?"Load More":"All Images Loaded"})]}):re("div",{className:"image-gallery-container-placeholder",children:[x(N$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const bwe=pt([e=>e.options,Ir],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ok=e=>{const t=Xe(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=Ee(bwe),l=()=>{t(U_e(!o)),t(io(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:re("div",{className:"workarea-main",children:[n,re("div",{className:"workarea-children-wrapper",children:[r,s&&x(Oi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(NSe,{})})})]}),!a&&x(jH,{})]})})};function xwe(){return x(ok,{optionsPanel:x(gSe,{}),children:x(ISe,{})})}function wwe(){const e=Ee(n=>n.options.showAdvancedOptions),t={seed:{header:x(M_,{}),feature:to.SEED,options:x(O_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(N_,{})},face_restore:{header:x(P_,{}),feature:to.FACE_CORRECTION,options:x(KS,{})},upscale:{header:x(R_,{}),feature:to.UPSCALE,options:x(XS,{})},other:{header:x(A$,{}),feature:to.OTHER,options:x(L$,{})}};return re(K_,{children:[x(j_,{}),x(G_,{}),x(F_,{}),x(D_,{}),e?x(B_,{accordionInfo:t}):null]})}const Cwe=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(pH,{})})});function _we(){return x(ok,{optionsPanel:x(wwe,{}),children:x(Cwe,{})})}var o9=function(e,t){return o9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},o9(e,t)};function kwe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var El=function(){return El=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function bd(e,t,n,r){var i=Hwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):KH(e,r,n,function(v){var S=s+h*v,w=l+p*v,E=u+m*v;o(S,w,E)})}}function Hwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Wwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Vwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},ak=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=Wwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Vwe(a,l,u,s,h,p,Boolean(i));return m},K0=function(e,t){var n=ak(e,t);return e.bounds=n,n};function ib(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=a9(e,s-p,u+p,r),S=a9(t,l-m,h+m,r);return{x:v,y:S}}var a9=function(e,t,n,r){return r?en?Na(n,2):Na(e,2):Na(e,2)};function ob(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=ib(p,m,i,o,0,0,null);return v}function l2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var SM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=ab(o,n);return!l},bM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Uwe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},Gwe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function jwe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=ob(e,P,k,i,e.bounds,s||l),M=T.x,R=T.y;return{scale:i,positionX:w?M:n,positionY:E?R:r}}}function Ywe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=ib(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var qwe=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},h4=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},Kwe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},Xwe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function Zwe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function xM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:a9(e,o,a,i)}function Qwe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function Jwe(e,t){var n=Kwe(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=Qwe(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function e6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=Xwe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,R=S.sizeY,I=S.velocityAlignmentTime,N=I,z=Zwe(e,l),$=Math.max(z,N),H=h4(e,M),q=h4(e,R),de=H*i.offsetWidth/100,V=q*i.offsetHeight/100,J=u+de,ie=h-de,ee=p+V,X=m-V,G=e.transformState,Q=new Date().getTime();KH(e,T,$,function(j){var Z=e.transformState,me=Z.scale,Se=Z.positionX,xe=Z.positionY,Be=new Date().getTime()-Q,We=Be/N,dt=YH[S.animationType],Ye=1-dt(Math.min(1,We)),rt=1-j,Ze=Se+a*rt,Ke=xe+s*rt,Et=xM(Ze,G.positionX,Se,k,v,h,u,ie,J,Ye),bt=xM(Ke,G.positionY,xe,P,v,m,p,X,ee,Ye);(Se!==Ze||xe!==Ke)&&e.setTransformState(me,Et,bt)})}}function wM(e,t){var n=e.transformState.scale;ml(e),K0(e,n),t.touches?Gwe(e,t):Uwe(e,t)}function CM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=qwe(e,t,n),u=l.x,h=l.y,p=h4(e,a),m=h4(e,s);Jwe(e,{x:u,y:h}),Ywe(e,u,h,p,m)}}function t6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?e6e(e):XH(e)}}function XH(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&XH(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=sk(e,a,v,S);w&&bd(e,w,h,p)}}function sk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=l2(Na(t,2),o,a,0,!1),u=K0(e,l),h=ob(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Zp={previousScale:1,scale:1,positionX:0,positionY:0},n6e=El(El({},Zp),{setComponents:function(){},contextInstance:null}),Wg={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},QH=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Zp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Zp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Zp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Zp.positionY}},_M=function(e){var t=El({},Wg);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof Wg[n]<"u";if(i&&r){var o=Object.prototype.toString.call(Wg[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=El(El({},Wg[n]),e[n]):s?t[n]=yM(yM([],Wg[n]),e[n]):t[n]=e[n]}}),t},JH=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=l2(Na(h,3),s,a,u,!1);return p};function eW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=JH(e,t,n),w=sk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,w,r,i)}function tW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=QH(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ak(e,a.scale),m=ib(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||bd(e,v,t,n)}}function r6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Zp;var l=r.getBoundingClientRect(),u=i6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=l2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-p)*E+k,R=ak(e,E),I=ib(T,M,R,o,0,0,r),N=I.x,z=I.y;return{positionX:N,positionY:z,scale:E}}function i6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function o6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var a6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,1,t,n,r)}},s6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,-1,t,n,r)}},l6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};bd(e,v,i,o)}}},u6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),tW(e,t,n)}},c6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=nW(t||i.scale,o,a);bd(e,s,n,r)}}},d6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),ml(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&o6e(a)&&a&&o.contains(a)){var s=r6e(e,a,n);bd(e,s,r,i)}}},Br=function(e){return{instance:e,state:e.transformState,zoomIn:a6e(e),zoomOut:s6e(e),setTransform:l6e(e),resetTransform:u6e(e),centerView:c6e(e),zoomToElement:d6e(e)}},_w=!1;function kw(){try{var e={get passive(){return _w=!0,!1}};return e}catch{return _w=!1,_w}}var ab=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},kM=function(e){e&&clearTimeout(e)},f6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},nW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},h6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=ab(u,a);return!p};function p6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Ewe(t,n);return r}function rW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var g6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=l2(Na(v,3),u,l,p,S);return w},m6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},v6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=ab(a,i);return!l},y6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},S6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Na(i[0].clientX-r.left,5),a=Na(i[0].clientY-r.top,5),s=Na(i[1].clientX-r.left,5),l=Na(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},iW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},b6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return l2(Na(p,2),a,o,l,!u)},x6e=160,w6e=100,C6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(ml(e),ui(Br(e),t,r),ui(Br(e),t,i))},_6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=p6e(t,null),P=g6e(e,E,w,!t.ctrlKey);if(l!==P){var k=K0(e,P),T=rW(t,o,l),M=S||v===0||h,R=u&&M,I=ob(e,T.x,T.y,P,k,R),N=I.x,z=I.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),ui(Br(e),t,r),ui(Br(e),t,i)}},k6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;kM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(ZH(e,t.x,t.y),e.wheelAnimationTimer=null)},w6e);var o=m6e(e,t);o&&(kM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,ui(Br(e),t,r),ui(Br(e),t,i))},x6e))},E6e=function(e,t){var n=iW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,ml(e)},P6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=S6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=iW(t),v=b6e(e,m);if(v!==i){var S=K0(e,v),w=u||h===0||s,E=a&&w,P=ob(e,p.x,p.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,k,T)}}}},T6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,ZH(e,t?.x,t?.y)};function A6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return tW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=JH(e,h,o),m=rW(t,u,l),v=sk(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,v,a,s)}}var L6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=ab(l,s);return!(p||!h)},oW=le.createContext(n6e),M6e=function(e){kwe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=QH(n.props),n.setup=_M(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=kw();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=h6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(C6e(n,r),_6e(n,r),k6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),ml(n),wM(n,r),ui(Br(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=bM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),CM(n,r.clientX,r.clientY),ui(Br(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(t6e(n),ui(Br(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=v6e(n,r);!l||(E6e(n,r),ml(n),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=y6e(n);!l||(r.preventDefault(),r.stopPropagation(),P6e(n,r),ui(Br(n),r,a),ui(Br(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(T6e(n),ui(Br(n),r,o),ui(Br(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,ml(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(ml(n),wM(n,r),ui(Br(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=bM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];CM(n,s.clientX,s.clientY),ui(Br(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=L6e(n,r);!o||A6e(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,K0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,ui(Br(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=nW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=f6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Br(n))},n}return t.prototype.componentDidMount=function(){var n=kw();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=kw();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),ml(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(K0(this,this.transformState.scale),this.setup=_M(this.props))},t.prototype.render=function(){var n=Br(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(oW.Provider,{value:El(El({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),O6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(M6e,{...El({},e,{setRef:i})})});function R6e(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var I6e=`.transform-component-module_wrapper__1_Fgj { + position: relative; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + overflow: hidden; + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; + margin: 0; + padding: 0; +} +.transform-component-module_content__2jYgh { + display: flex; + flex-wrap: wrap; + width: -moz-fit-content; + width: fit-content; + height: -moz-fit-content; + height: fit-content; + margin: 0; + padding: 0; + transform-origin: 0% 0%; +} +.transform-component-module_content__2jYgh img { + pointer-events: none; +} +`,EM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};R6e(I6e);var N6e=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(oW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+EM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+EM.content+" "+o,style:s,children:t})})};function D6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(O6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>re(Tn,{children:[re("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(q3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(gt,{icon:x(K3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(j3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(Y3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(O5e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(L_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(N6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})})]})})}function z6e(){const e=Xe(),t=Ee(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=Ee(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())};return mt("Esc",()=>{t&&e(sd(!1))},[t]),re("div",{className:"lightbox-container",children:[x(gt,{icon:x(G3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(sd(!1))},fontSize:20}),re("div",{className:"lightbox-display-container",children:[re("div",{className:"lightbox-preview-wrapper",children:[x(sH,{}),!r&&re("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(D$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&re(Tn,{children:[x(D6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(fH,{image:n})]})]}),x(jH,{})]})]})}const F6e=pt($n,e=>{const{boundingBoxDimensions:t}=e;return{boundingBoxDimensions:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),B6e=()=>{const e=Xe(),{boundingBoxDimensions:t}=Ee(F6e),n=a=>{e(cm({...t,width:Math.floor(a)}))},r=a=>{e(cm({...t,height:Math.floor(a)}))},i=()=>{e(cm({...t,width:Math.floor(512)}))},o=()=>{e(cm({...t,height:Math.floor(512)}))};return re("div",{className:"inpainting-bounding-box-settings",children:[x("div",{className:"inpainting-bounding-box-header",children:x("p",{children:"Canvas Bounding Box"})}),re("div",{className:"inpainting-bounding-box-settings-items",children:[x(Y0,{label:"Width",min:64,max:1024,step:64,value:t.width,onChange:n,handleReset:i,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0}),x(Y0,{label:"Height",min:64,max:1024,step:64,value:t.height,onChange:r,handleReset:o,sliderNumberInputProps:{max:4096},withSliderMarks:!0,withInput:!0,withReset:!0})]})]})},$6e=pt($n,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function H6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=Ee($6e),n=Xe();return re(rn,{alignItems:"center",columnGap:"1rem",children:[x(Y0,{label:"Inpaint Replace",value:e,onChange:r=>{n(jL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(jL(1)),isResetDisabled:!t}),x(ks,{isChecked:t,onChange:r=>n(cSe(r.target.checked))})]})}function W6e(){return re(Tn,{children:[x(H6e,{}),x(B6e,{})]})}function V6e(){const e=Ee(n=>n.options.showAdvancedOptions),t={seed:{header:x(M_,{}),feature:to.SEED,options:x(O_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(N_,{})},face_restore:{header:x(P_,{}),feature:to.FACE_CORRECTION,options:x(KS,{})},upscale:{header:x(R_,{}),feature:to.UPSCALE,options:x(XS,{})}};return re(K_,{children:[x(j_,{}),x(G_,{}),x(F_,{}),x(T$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(W6e,{}),x(D_,{}),e&&x(B_,{accordionInfo:t})]})}const U6e=pt($n,H$,Ir,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),G6e=()=>{const e=Xe(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=Ee(U6e),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(X4e({width:a,height:s})),e(q4e()),e(io(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Jv,{thickness:"2px",speed:"1s",size:"xl"})})};var j6e=Math.PI/180;function Y6e(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const k0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:k0,version:"8.3.13",isBrowser:Y6e(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*j6e:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:k0.document,_injectGlobal(e){k0.Konva=e}},pr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ia{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ia(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var q6e="[object Array]",K6e="[object Number]",X6e="[object String]",Z6e="[object Boolean]",Q6e=Math.PI/180,J6e=180/Math.PI,Ew="#",eCe="",tCe="0",nCe="Konva warning: ",PM="Konva error: ",rCe="rgb(",Pw={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},iCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Xy=[];const oCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===q6e},_isNumber(e){return Object.prototype.toString.call(e)===K6e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===X6e},_isBoolean(e){return Object.prototype.toString.call(e)===Z6e},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Xy.push(e),Xy.length===1&&oCe(function(){const t=Xy;Xy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Ew,eCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=tCe+e;return Ew+e},getRGB(e){var t;return e in Pw?(t=Pw[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Ew?this._hexToRgb(e.substring(1)):e.substr(0,4)===rCe?(t=iCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=Pw[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function sW(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function lk(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function g1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function lW(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function aCe(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function As(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function sCe(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Vg="get",Ug="set";const K={addGetterSetter(e,t,n,r,i){K.addGetter(e,t,n),K.addSetter(e,t,r,i),K.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Vg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Ug+fe._capitalize(t);e.prototype[i]||K.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Ug+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Vg+a(t),l=Ug+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},K.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Ug+n,i=Vg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Vg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},K.addSetter(e,t,r,function(){fe.error(o)}),K.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Vg+fe._capitalize(n),a=Ug+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function lCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=uCe+u.join(TM)+cCe)):(o+=s.property,t||(o+=gCe+s.val)),o+=hCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=vCe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=AM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=lCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return un._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];un._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];un._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(un.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){un._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&un._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",un._endDragBefore,!0),window.addEventListener("touchend",un._endDragBefore,!0),window.addEventListener("mousemove",un._drag),window.addEventListener("touchmove",un._drag),window.addEventListener("mouseup",un._endDragAfter,!1),window.addEventListener("touchend",un._endDragAfter,!1));var j3="absoluteOpacity",Qy="allEventListeners",ou="absoluteTransform",LM="absoluteScale",Gg="canvas",xCe="Change",wCe="children",CCe="konva",s9="listening",MM="mouseenter",OM="mouseleave",RM="set",IM="Shape",Y3=" ",NM="stage",kc="transform",_Ce="Stage",l9="visible",kCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Y3);let ECe=1;class Fe{constructor(t){this._id=ECe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===ou)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===ou,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(Y3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Gg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ou&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Gg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new E0({pixelRatio:a,width:i,height:o}),v=new E0({pixelRatio:a,width:0,height:0}),S=new uk({pixelRatio:p,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Gg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(j3),this._clearSelfAndDescendantCache(LM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Gg,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Gg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==wCe&&(r=RM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(s9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(l9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;un._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==_Ce&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(ou)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ia,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(ou),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(j3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;un._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=un._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&un._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Fe.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Fe.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Fe.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lp=e=>{const t=pm(e);if(t==="pointer")return ot.pointerEventsEnabled&&Aw.pointer;if(t==="touch")return Aw.touch;if(t==="mouse")return Aw.mouse};function zM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const RCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",q3=[];class ub extends ua{constructor(t){super(zM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),q3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{zM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===TCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&q3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(RCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new E0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+DM,this.content.style.height=n+DM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;rMCe&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){Vm(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||OCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Lp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Lp(t.type),r=pm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!un.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Lp(t.type),r=pm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(un.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Lp(t.type),r=pm(t.type);if(!n)return;un.isDragging&&un.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!un.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Lp(t.type),r=pm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=Tw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):un.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(u9,{evt:t}):this._fire(u9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(c9,{evt:t}):this._fire(c9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=Tw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(Qp,ck(t)),Vm(t.pointerId)}_lostpointercapture(t){Vm(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new E0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new uk({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ub.prototype.nodeType=PCe;pr(ub);K.addGetterSetter(ub,"container");var wW="hasShadow",CW="shadowRGBA",_W="patternImage",kW="linearGradient",EW="radialGradient";let r3;function Lw(){return r3||(r3=fe.createCanvasElement().getContext("2d"),r3)}const Um={};function ICe(e){e.fill()}function NCe(e){e.stroke()}function DCe(e){e.fill()}function zCe(e){e.stroke()}function FCe(){this._clearCache(wW)}function BCe(){this._clearCache(CW)}function $Ce(){this._clearCache(_W)}function HCe(){this._clearCache(kW)}function WCe(){this._clearCache(EW)}class Me extends Fe{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Um)););this.colorKey=n,Um[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(wW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(_W,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Lw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ia;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(kW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Lw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Fe.prototype.destroy.call(this),delete Um[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){Vm(t)}}Me.prototype._fillFunc=ICe;Me.prototype._strokeFunc=NCe;Me.prototype._fillFuncHit=DCe;Me.prototype._strokeFuncHit=zCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",FCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",BCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",$Ce);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",HCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",WCe);K.addGetterSetter(Me,"stroke",void 0,lW());K.addGetterSetter(Me,"strokeWidth",2,ze());K.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);K.addGetterSetter(Me,"hitStrokeWidth","auto",lk());K.addGetterSetter(Me,"strokeHitEnabled",!0,As());K.addGetterSetter(Me,"perfectDrawEnabled",!0,As());K.addGetterSetter(Me,"shadowForStrokeEnabled",!0,As());K.addGetterSetter(Me,"lineJoin");K.addGetterSetter(Me,"lineCap");K.addGetterSetter(Me,"sceneFunc");K.addGetterSetter(Me,"hitFunc");K.addGetterSetter(Me,"dash");K.addGetterSetter(Me,"dashOffset",0,ze());K.addGetterSetter(Me,"shadowColor",void 0,g1());K.addGetterSetter(Me,"shadowBlur",0,ze());K.addGetterSetter(Me,"shadowOpacity",1,ze());K.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);K.addGetterSetter(Me,"shadowOffsetX",0,ze());K.addGetterSetter(Me,"shadowOffsetY",0,ze());K.addGetterSetter(Me,"fillPatternImage");K.addGetterSetter(Me,"fill",void 0,lW());K.addGetterSetter(Me,"fillPatternX",0,ze());K.addGetterSetter(Me,"fillPatternY",0,ze());K.addGetterSetter(Me,"fillLinearGradientColorStops");K.addGetterSetter(Me,"strokeLinearGradientColorStops");K.addGetterSetter(Me,"fillRadialGradientStartRadius",0);K.addGetterSetter(Me,"fillRadialGradientEndRadius",0);K.addGetterSetter(Me,"fillRadialGradientColorStops");K.addGetterSetter(Me,"fillPatternRepeat","repeat");K.addGetterSetter(Me,"fillEnabled",!0);K.addGetterSetter(Me,"strokeEnabled",!0);K.addGetterSetter(Me,"shadowEnabled",!0);K.addGetterSetter(Me,"dashEnabled",!0);K.addGetterSetter(Me,"strokeScaleEnabled",!0);K.addGetterSetter(Me,"fillPriority","color");K.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);K.addGetterSetter(Me,"fillPatternOffsetX",0,ze());K.addGetterSetter(Me,"fillPatternOffsetY",0,ze());K.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);K.addGetterSetter(Me,"fillPatternScaleX",1,ze());K.addGetterSetter(Me,"fillPatternScaleY",1,ze());K.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientStartPointX",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);K.addGetterSetter(Me,"fillLinearGradientStartPointY",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientEndPointX",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);K.addGetterSetter(Me,"fillLinearGradientEndPointY",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientStartPointX",0);K.addGetterSetter(Me,"fillRadialGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientEndPointX",0);K.addGetterSetter(Me,"fillRadialGradientEndPointY",0);K.addGetterSetter(Me,"fillPatternRotation",0);K.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var VCe="#",UCe="beforeDraw",GCe="draw",PW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],jCe=PW.length;class ph extends ua{constructor(t){super(t),this.canvas=new E0,this.hitCanvas=new uk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(UCe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ua.prototype.drawScene.call(this,i,n),this._fire(GCe,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),ua.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}ph.prototype.nodeType="Layer";pr(ph);K.addGetterSetter(ph,"imageSmoothingEnabled",!0);K.addGetterSetter(ph,"clearBeforeDraw",!0);K.addGetterSetter(ph,"hitGraphEnabled",!0,As());class dk extends ph{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}dk.prototype.nodeType="FastLayer";pr(dk);class X0 extends ua{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}X0.prototype.nodeType="Group";pr(X0);var Mw=function(){return k0.performance&&k0.performance.now?function(){return k0.performance.now()}:function(){return new Date().getTime()}}();class Ra{constructor(t,n){this.id=Ra.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Mw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=FM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=BM,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===FM?this.setTime(t):this.state===BM&&this.setTime(this.duration-t)}pause(){this.state=qCe,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Mr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Gm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=KCe++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ra(function(){n.tween.onEnterFrame()},u),this.tween=new XCe(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Mr.attrs[i]||(Mr.attrs[i]={}),Mr.attrs[i][this._id]||(Mr.attrs[i][this._id]={}),Mr.tweens[i]||(Mr.tweens[i]={});for(l in t)YCe[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,p,m;if(s=Mr.tweens[i][t],s&&delete Mr.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Mr.tweens[t],i;this.pause();for(i in r)delete Mr.tweens[t][i];delete Mr.attrs[t][n]}}Mr.attrs={};Mr.tweens={};Fe.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Mr(e);n.play()};const Gm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Lu);K.addGetterSetter(Lu,"innerRadius",0,ze());K.addGetterSetter(Lu,"outerRadius",0,ze());K.addGetterSetter(Lu,"angle",0,ze());K.addGetterSetter(Lu,"clockwise",!1,As());function d9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function HM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,p,p+m,1-S),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=In.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return In.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return In.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return In.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,In.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var k=null,T=[],M=l,R=u,I,N,z,$,H,q,de,V,J,ie;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var ee=S.shift(),X=S.shift();if(l+=ee,u+=X,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+ee,u=a[G].points[1]+X;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,I=a[a.length-1],I.command==="C"&&(N=l+(l-I.points[2]),z=u+(u-I.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,I=a[a.length-1],I.command==="C"&&(N=l+(l-I.points[2]),z=u+(u-I.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,I=a[a.length-1],I.command==="Q"&&(N=l+(l-I.points[0]),z=u+(u-I.points[1])),l=S.shift(),u=S.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,I=a[a.length-1],I.command==="Q"&&(N=l+(l-I.points[0]),z=u+(u-I.points[1])),l+=S.shift(),u+=S.shift(),k="Q",T.push(N,z,l,u);break;case"A":$=S.shift(),H=S.shift(),q=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,H,q);break;case"a":$=S.shift(),H=S.shift(),q=S.shift(),de=S.shift(),V=S.shift(),J=l,ie=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,ie,l,u,de,V,$,H,q);break}a.push({command:k||v,points:T,start:{x:M,y:R},pathLength:this.calcLength(M,R,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=In;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*p/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function(H){return Math.sqrt(H[0]*H[0]+H[1]*H[1])},M=function(H,q){return(H[0]*q[0]+H[1]*q[1])/(T(H)*T(q))},R=function(H,q){return(H[0]*q[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,I,$,h,a]}}In.prototype.className="Path";In.prototype._attrsAffectingSize=["data"];pr(In);K.addGetterSetter(In,"data");class gh extends Mu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=In.calcLength(i[i.length-4],i[i.length-3],"C",m),S=In.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}gh.prototype.className="Arrow";pr(gh);K.addGetterSetter(gh,"pointerLength",10,ze());K.addGetterSetter(gh,"pointerWidth",10,ze());K.addGetterSetter(gh,"pointerAtBeginning",!1);K.addGetterSetter(gh,"pointerAtEnding",!0);class m1 extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}m1.prototype._centroid=!0;m1.prototype.className="Circle";m1.prototype._attrsAffectingSize=["radius"];pr(m1);K.addGetterSetter(m1,"radius",0,ze());class wd extends Me{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}wd.prototype.className="Ellipse";wd.prototype._centroid=!0;wd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(wd);K.addComponentsGetterSetter(wd,"radius",["x","y"]);K.addGetterSetter(wd,"radiusX",0,ze());K.addGetterSetter(wd,"radiusY",0,ze());class Ls extends Me{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";pr(Ls);K.addGetterSetter(Ls,"image");K.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);K.addGetterSetter(Ls,"cropX",0,ze());K.addGetterSetter(Ls,"cropY",0,ze());K.addGetterSetter(Ls,"cropWidth",0,ze());K.addGetterSetter(Ls,"cropHeight",0,ze());var TW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],ZCe="Change.konva",QCe="none",f9="up",h9="right",p9="down",g9="left",JCe=TW.length;class fk extends X0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}vh.prototype.className="RegularPolygon";vh.prototype._centroid=!0;vh.prototype._attrsAffectingSize=["radius"];pr(vh);K.addGetterSetter(vh,"radius",0,ze());K.addGetterSetter(vh,"sides",0,ze());var WM=Math.PI*2;class yh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,WM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),WM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}yh.prototype.className="Ring";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(yh);K.addGetterSetter(yh,"innerRadius",0,ze());K.addGetterSetter(yh,"outerRadius",0,ze());class Nl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Ra(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var o3;function Rw(){return o3||(o3=fe.createCanvasElement().getContext(n9e),o3)}function h9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function p9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function g9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(g9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(r9e,n),this}getWidth(){var t=this.attrs.width===Mp||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Mp||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Rw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+i3+this.fontVariant()+i3+(this.fontSize()+s9e)+f9e(this.fontFamily())}_addTextLine(t){this.align()===jg&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Rw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` +`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Mp&&o!==void 0,l=a!==Mp&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==GM,w=v!==c9e&&S,E=this.ellipsis();this.textArr=[],Rw().font=this._getContextFont();for(var P=E?this._getTextWidth(Ow):0,k=0,T=t.length;kh)for(;M.length>0;){for(var I=0,N=M.length,z="",$=0;I>>1,q=M.slice(0,H+1),de=this._getTextWidth(q)+P;de<=h?(I=H+1,z=q,$=de):N=H}if(z){if(w){var V,J=M[z.length],ie=J===i3||J===VM;ie&&$<=h?V=z.length:V=Math.max(z.lastIndexOf(i3),z.lastIndexOf(VM))+1,V>0&&(I=V,z=z.slice(0,I),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var ee=this._shouldHandleEllipsis(m);if(ee){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(I),M=M.trimLeft(),M.length>0&&(R=this._getTextWidth(M),R<=h)){this._addTextLine(M),m+=i,r=Math.max(r,R);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,R),this._shouldHandleEllipsis(m)&&kp)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Mp&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==GM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Mp&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Ow)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=AW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,V=w+1;V0)return w=V,de[V];de[V].command==="M"&&(m={x:de[V].points[0],y:de[V].points[1]})}return{}},k=function(de){var V=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(V+=(s-a)/p);var J=0,ie=0;for(v=void 0;Math.abs(V-J)/V>.01&&ie<20;){ie++;for(var ee=J;S===void 0;)S=P(),S&&ee+S.pathLengthV?v=In.getPointOnLine(V,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Q=S.points[5],j=S.points[4]+Q;E===0?E=G+1e-8:V>J?E+=Math.PI/180*Q/Math.abs(Q):E-=Math.PI/360*Q/Math.abs(Q),(Q<0&&E=0&&E>j)&&(E=j,X=!0),v=In.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?V>S.pathLength?E=1e-8:E=V/S.pathLength:V>J?E+=(V-J)/S.pathLength/2:E=Math.max(E-(J-V)/S.pathLength/2,0),E>1&&(E=1,X=!0),v=In.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=V/S.pathLength:V>J?E+=(V-J)/S.pathLength:E-=(J-V)/S.pathLength,E>1&&(E=1,X=!0),v=In.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=In.getLineLength(m.x,m.y,v.x,v.y)),X&&(X=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,R=u/M-1,I=0;Ie+`.${DW}`).join(" "),jM="nodesRect",y9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],S9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const b9e="ontouchstart"in ot._global;function x9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(S9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var p4=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],YM=1e8;function w9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function zW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function C9e(e,t){const n=w9e(e);return zW(e,t,n)}function _9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(y9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(jM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(jM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return zW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-YM,y:-YM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ia;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),p4.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new u2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:b9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=x9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Me({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const V=m+de,J=ot.getAngle(this.rotationSnapTolerance()),ee=_9e(this.rotationSnaps(),V,J)-p.rotation,X=C9e(p,ee);this._fitNodesInto(X,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ia;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ia;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ia;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ia;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();p.setAttrs(E),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),X0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Fe.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function k9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){p4.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+p4.join(", "))}),e||[]}wn.prototype.className="Transformer";pr(wn);K.addGetterSetter(wn,"enabledAnchors",p4,k9e);K.addGetterSetter(wn,"flipEnabled",!0,As());K.addGetterSetter(wn,"resizeEnabled",!0);K.addGetterSetter(wn,"anchorSize",10,ze());K.addGetterSetter(wn,"rotateEnabled",!0);K.addGetterSetter(wn,"rotationSnaps",[]);K.addGetterSetter(wn,"rotateAnchorOffset",50,ze());K.addGetterSetter(wn,"rotationSnapTolerance",5,ze());K.addGetterSetter(wn,"borderEnabled",!0);K.addGetterSetter(wn,"anchorStroke","rgb(0, 161, 255)");K.addGetterSetter(wn,"anchorStrokeWidth",1,ze());K.addGetterSetter(wn,"anchorFill","white");K.addGetterSetter(wn,"anchorCornerRadius",0,ze());K.addGetterSetter(wn,"borderStroke","rgb(0, 161, 255)");K.addGetterSetter(wn,"borderStrokeWidth",1,ze());K.addGetterSetter(wn,"borderDash");K.addGetterSetter(wn,"keepRatio",!0);K.addGetterSetter(wn,"centeredScaling",!1);K.addGetterSetter(wn,"ignoreStroke",!1);K.addGetterSetter(wn,"padding",0,ze());K.addGetterSetter(wn,"node");K.addGetterSetter(wn,"nodes");K.addGetterSetter(wn,"boundBoxFunc");K.addGetterSetter(wn,"anchorDragBoundFunc");K.addGetterSetter(wn,"shouldOverdrawWholeArea",!1);K.addGetterSetter(wn,"useSingleNodeRotation",!0);K.backCompat(wn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ou extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ou.prototype.className="Wedge";Ou.prototype._centroid=!0;Ou.prototype._attrsAffectingSize=["radius"];pr(Ou);K.addGetterSetter(Ou,"radius",0,ze());K.addGetterSetter(Ou,"angle",0,ze());K.addGetterSetter(Ou,"clockwise",!1);K.backCompat(Ou,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function qM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var E9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],P9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function T9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,E,P,k,T,M,R,I,N,z,$,H,q,de,V=t+t+1,J=r-1,ie=i-1,ee=t+1,X=ee*(ee+1)/2,G=new qM,Q=null,j=G,Z=null,me=null,Se=E9e[t],xe=P9e[t];for(s=1;s>xe,q!==0?(q=255/q,n[h]=(m*Se>>xe)*q,n[h+1]=(v*Se>>xe)*q,n[h+2]=(S*Se>>xe)*q):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=p+((l=o+t+1)>xe,q>0?(q=255/q,n[l]=(m*Se>>xe)*q,n[l+1]=(v*Se>>xe)*q,n[l+2]=(S*Se>>xe)*q):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=o+((l=a+ee)0&&T9e(t,n)};K.addGetterSetter(Fe,"blurRadius",0,ze(),K.afterSetFilter);const L9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};K.addGetterSetter(Fe,"contrast",0,ze(),K.afterSetFilter);const O9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],R=s[E+2]-s[k+2],I=T,N=I>0?I:-I,z=M>0?M:-M,$=R>0?R:-R;if(z>N&&(I=M),$>N&&(I=R),I*=t,i){var H=s[E]+I,q=s[E+1]+I,de=s[E+2]+I;s[E]=H>255?255:H<0?0:H,s[E+1]=q>255?255:q<0?0:q,s[E+2]=de>255?255:de<0?0:de}else{var V=n-I;V<0?V=0:V>255&&(V=255),s[E]=s[E+1]=s[E+2]=V}}while(--w)}while(--p)};K.addGetterSetter(Fe,"embossStrength",.5,ze(),K.afterSetFilter);K.addGetterSetter(Fe,"embossWhiteLevel",.5,ze(),K.afterSetFilter);K.addGetterSetter(Fe,"embossDirection","top-left",null,K.afterSetFilter);K.addGetterSetter(Fe,"embossBlend",!1,null,K.afterSetFilter);function Iw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const R9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,k,T,M,R,I;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),R=h+v*(255-h),I=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,R=h+v*(h-M),I=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,R,I=360/T*Math.PI/180,N,z;for(R=0;RT?k:T;var M=a,R=o,I,N,z=n.polarRotation||0,$,H;for(h=0;ht&&(M=T,R=0,I=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function j9e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};K.addGetterSetter(Fe,"pixelSize",8,ze(),K.afterSetFilter);const X9e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"blue",0,aW,K.afterSetFilter);const Q9e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Fe,"blue",0,aW,K.afterSetFilter);K.addGetterSetter(Fe,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const J9e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},t7e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[W]!==O[se]){var he=` +`+A[W].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=W&&0<=se);break}}}finally{Is=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?zl(d):""}var Ch=Object.prototype.hasOwnProperty,Du=[],Ns=-1;function No(d){return{current:d}}function kn(d){0>Ns||(d.current=Du[Ns],Du[Ns]=null,Ns--)}function vn(d,f){Ns++,Du[Ns]=d.current,d.current=f}var Do={},Cr=No(Do),Ur=No(!1),zo=Do;function Ds(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function qa(){kn(Ur),kn(Cr)}function Pd(d,f,y){if(Cr.current!==Do)throw Error(a(168));vn(Cr,f),vn(Ur,y)}function Bl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var A in _)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,_)}function Ka(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=Cr.current,vn(Cr,d),vn(Ur,Ur.current),!0}function Td(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Bl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,kn(Ur),kn(Cr),vn(Cr,d)):kn(Ur),vn(Ur,y)}var gi=Math.clz32?Math.clz32:Ad,_h=Math.log,kh=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(_h(d)/kh|0)|0}var zs=64,uo=4194304;function Fs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function $l(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,A=d.suspendedLanes,O=d.pingedLanes,W=y&268435455;if(W!==0){var se=W&~A;se!==0?_=Fs(se):(O&=W,O!==0&&(_=Fs(O)))}else W=y&~A,W!==0?_=Fs(W):O!==0&&(_=Fs(O));if(_===0)return 0;if(f!==0&&f!==_&&(f&A)===0&&(A=_&-_,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function ya(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-gi(f),d[f]=y}function Md(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=W,A-=W,Ui=1<<32-gi(f)+A|y<Bt?(zr=kt,kt=null):zr=kt.sibling;var Yt=je(ge,kt,ye[Bt],He);if(Yt===null){kt===null&&(kt=zr);break}d&&kt&&Yt.alternate===null&&f(ge,kt),ue=O(Yt,ue,Bt),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt,kt=zr}if(Bt===ye.length)return y(ge,kt),Dn&&Bs(ge,Bt),Te;if(kt===null){for(;BtBt?(zr=kt,kt=null):zr=kt.sibling;var is=je(ge,kt,Yt.value,He);if(is===null){kt===null&&(kt=zr);break}d&&kt&&is.alternate===null&&f(ge,kt),ue=O(is,ue,Bt),Lt===null?Te=is:Lt.sibling=is,Lt=is,kt=zr}if(Yt.done)return y(ge,kt),Dn&&Bs(ge,Bt),Te;if(kt===null){for(;!Yt.done;Bt++,Yt=ye.next())Yt=At(ge,Yt.value,He),Yt!==null&&(ue=O(Yt,ue,Bt),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return Dn&&Bs(ge,Bt),Te}for(kt=_(ge,kt);!Yt.done;Bt++,Yt=ye.next())Yt=Fn(kt,ge,Bt,Yt.value,He),Yt!==null&&(d&&Yt.alternate!==null&&kt.delete(Yt.key===null?Bt:Yt.key),ue=O(Yt,ue,Bt),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return d&&kt.forEach(function(si){return f(ge,si)}),Dn&&Bs(ge,Bt),Te}function qo(ge,ue,ye,He){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:e:{for(var Te=ye.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=ye.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=A(Lt,ye.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&$1(Te)===Lt.type){y(ge,Lt.sibling),ue=A(Lt,ye.props),ue.ref=xa(ge,Lt,ye),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}ye.type===h?(ue=Js(ye.props.children,ge.mode,He,ye.key),ue.return=ge,ge=ue):(He=af(ye.type,ye.key,ye.props,null,ge.mode,He),He.ref=xa(ge,ue,ye),He.return=ge,ge=He)}return W(ge);case u:e:{for(Lt=ye.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===ye.containerInfo&&ue.stateNode.implementation===ye.implementation){y(ge,ue.sibling),ue=A(ue,ye.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=el(ye,ge.mode,He),ue.return=ge,ge=ue}return W(ge);case T:return Lt=ye._init,qo(ge,ue,Lt(ye._payload),He)}if(ie(ye))return En(ge,ue,ye,He);if(I(ye))return er(ge,ue,ye,He);Ni(ge,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=A(ue,ye),ue.return=ge,ge=ue):(y(ge,ue),ue=fp(ye,ge.mode,He),ue.return=ge,ge=ue),W(ge)):y(ge,ue)}return qo}var Yu=w2(!0),C2=w2(!1),Wd={},po=No(Wd),wa=No(Wd),oe=No(Wd);function be(d){if(d===Wd)throw Error(a(174));return d}function ve(d,f){vn(oe,f),vn(wa,d),vn(po,Wd),d=X(f),kn(po),vn(po,d)}function Ge(){kn(po),kn(wa),kn(oe)}function _t(d){var f=be(oe.current),y=be(po.current);f=G(y,d.type,f),y!==f&&(vn(wa,d),vn(po,f))}function Qt(d){wa.current===d&&(kn(po),kn(wa))}var Rt=No(0);function ln(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Iu(y)||Ed(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Vd=[];function H1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function tc(){return yi().memoizedState}function K1(d,f,y){var _=Tr(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},rc(d))ic(f,y);else if(y=ju(d,f,y,_),y!==null){var A=ai();vo(y,d,_,A),Kd(y,f,_)}}function nc(d,f,y){var _=Tr(d),A={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(rc(d))ic(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var W=f.lastRenderedState,se=O(W,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,W)){var he=f.interleaved;he===null?(A.next=A,$d(f)):(A.next=he.next,he.next=A),f.interleaved=A;return}}catch{}finally{}y=ju(d,f,A,_),y!==null&&(A=ai(),vo(y,d,_,A),Kd(y,f,_))}}function rc(d){var f=d.alternate;return d===yn||f!==null&&f===yn}function ic(d,f){Ud=en=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Kd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Hl(d,y)}}var Qa={readContext:Gi,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},vb={readContext:Gi,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:E2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Gl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Gl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Gl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=Yr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=K1.bind(null,yn,d),[_.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:k2,useDebugValue:j1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=k2(!1),f=d[0];return d=q1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=yn,A=Yr();if(Dn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(Ul&30)!==0||G1(_,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,E2(Ws.bind(null,_,O,d),[d]),_.flags|=2048,Yd(9,Ju.bind(null,_,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(Dn){var y=Sa,_=Ui;y=(_&~(1<<32-gi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0np&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304)}else{if(!_)if(d=ln(O),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),sc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!Dn)return ri(f),null}else 2*Wn()-A.renderingStartTime>np&&y!==1073741824&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Wn(),f.sibling=null,d=Rt.current,vn(Rt,_?d&1|2:d&1),f):(ri(f),null);case 22:case 23:return mc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ri(f),Ke&&f.subtreeFlags&6&&(f.flags|=8192)):ri(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function rg(d,f){switch(D1(f),f.tag){case 1:return Gr(f.type)&&qa(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),kn(Ur),kn(Cr),H1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(kn(Rt),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Vu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return kn(Rt),null;case 4:return Ge(),null;case 10:return Fd(f.type._context),null;case 22:case 23:return mc(),null;case 24:return null;default:return null}}var Us=!1,kr=!1,Cb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function lc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Vh=!1;function Yl(d,f){for(Q(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,A=y.memoizedState,O=d.stateNode,W=O.getSnapshotBeforeUpdate(d.elementType===d.type?_:Bo(d.type,_),A);O.__reactInternalSnapshotBeforeUpdate=W}break;case 3:Ke&&Ms(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Vh,Vh=!1,y}function ii(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var A=_=_.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==_)}}function Uh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function Gh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=ee(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function ig(d){var f=d.alternate;f!==null&&(d.alternate=null,ig(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&<(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function uc(d){return d.tag===5||d.tag===3||d.tag===4}function es(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||uc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function jh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):Mt(y,d);else if(_!==4&&(d=d.child,d!==null))for(jh(d,f,y),d=d.sibling;d!==null;)jh(d,f,y),d=d.sibling}function og(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Nn(y,d,f):ke(y,d);else if(_!==4&&(d=d.child,d!==null))for(og(d,f,y),d=d.sibling;d!==null;)og(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Er(d,f,y),y=y.sibling}function Er(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(sn,y)}catch{}switch(y.tag){case 5:kr||lc(y,f);case 6:if(Ke){var _=yr,A=Go;yr=null,jo(d,f,y),yr=_,Go=A,yr!==null&&(Go?tt(yr,y.stateNode):ft(yr,y.stateNode))}else jo(d,f,y);break;case 18:Ke&&yr!==null&&(Go?M1(yr,y.stateNode):L1(yr,y.stateNode));break;case 4:Ke?(_=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=_,Go=A):(Et&&(_=y.stateNode.containerInfo,A=va(_),Ru(_,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!kr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){A=_=_.next;do{var O=A,W=O.destroy;O=O.tag,W!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,W),A=A.next}while(A!==_)}jo(d,f,y);break;case 1:if(!kr&&(lc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(kr=(_=kr)||y.memoizedState!==null,jo(d,f,y),kr=_):jo(d,f,y);break;default:jo(d,f,y)}}function Yh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new Cb),f.forEach(function(_){var A=U2.bind(null,d,_);y.has(_)||(y.add(_),_.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Zh:return":has("+(lg(d)||"")+")";case Qh:return'[role="'+d.value+'"]';case Jh:return'"'+d.value+'"';case cc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function dc(d,f){var y=[];d=[d,0];for(var _=0;_A&&(A=W),_&=~O}if(_=A,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*_b(_/1960))-_,10<_){d.timeoutHandle=dt(Qs.bind(null,d,bi,ns),_);break}Qs(d,bi,ns);break;case 5:Qs(d,bi,ns);break;default:throw Error(a(329))}}}return Kr(d,Wn()),d.callbackNode===y?op.bind(null,d):null}function ap(d,f){var y=pc;return d.current.memoizedState.isDehydrated&&(Xs(d,f).flags|=256),d=vc(d,f),d!==2&&(f=bi,bi=y,f!==null&&sp(f)),d}function sp(d){bi===null?bi=d:bi.push.apply(bi,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,rp=0,(Ft&6)!==0)throw Error(a(331));var A=Ft;for(Ft|=4,Qe=d.current;Qe!==null;){var O=Qe,W=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var he=0;heWn()-dg?Xs(d,0):cg|=y),Kr(d,f)}function mg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=ai();d=$o(d,f),d!==null&&(ya(d,f,y),Kr(d,y))}function Eb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),mg(d,y)}function U2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),mg(d,y)}var vg;vg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,xb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,Dn&&(f.flags&1048576)!==0&&N1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;Ca(d,f),d=f.pendingProps;var A=Ds(f,Cr.current);Gu(f,y),A=V1(null,f,_,d,A,y);var O=Xu();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(_)?(O=!0,Ka(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,F1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,B1(f,_,d,y),f=Wo(null,f,_,!0,O,y)):(f.tag=0,Dn&&O&&mi(f),Si(null,f,A,y),f=f.child),f;case 16:_=f.elementType;e:{switch(Ca(d,f),d=f.pendingProps,A=_._init,_=A(_._payload),f.type=_,A=f.tag=cp(_),d=Bo(_,d),A){case 0:f=Q1(null,f,_,d,y);break e;case 1:f=N2(null,f,_,d,y);break e;case 11:f=M2(null,f,_,d,y);break e;case 14:f=Vs(null,f,_,Bo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),Q1(d,f,_,A,y);case 1:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),N2(d,f,_,A,y);case 3:e:{if(D2(f),d===null)throw Error(a(387));_=f.pendingProps,O=f.memoizedState,A=O.element,y2(d,f),Ih(f,_,null,y);var W=f.memoizedState;if(_=W.element,bt&&O.isDehydrated)if(O={element:_,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=oc(Error(a(423)),f),f=z2(d,f,_,y,A);break e}else if(_!==A){A=oc(Error(a(424)),f),f=z2(d,f,_,y,A);break e}else for(bt&&(fo=C1(f.stateNode.containerInfo),Vn=f,Dn=!0,Ii=null,ho=!1),y=C2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Vu(),_===A){f=Ja(d,f,y);break e}Si(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Id(f),_=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,W=A.children,Be(_,A)?W=null:O!==null&&Be(_,O)&&(f.flags|=32),I2(d,f),Si(d,f,W,y),f.child;case 6:return d===null&&Id(f),null;case 13:return F2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Yu(f,null,_,y):Si(d,f,_,y),f.child;case 11:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),M2(d,f,_,A,y);case 7:return Si(d,f,f.pendingProps,y),f.child;case 8:return Si(d,f,f.pendingProps.children,y),f.child;case 12:return Si(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,A=f.pendingProps,O=f.memoizedProps,W=A.value,v2(f,_,W),O!==null)if(U(O.value,W)){if(O.children===A.children&&!Ur.current){f=Ja(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){W=O.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(O.tag===1){he=Za(-1,y&-y),he.tag=2;var Ie=O.updateQueue;if(Ie!==null){Ie=Ie.shared;var et=Ie.pending;et===null?he.next=he:(he.next=et.next,et.next=he),Ie.pending=he}}O.lanes|=y,he=O.alternate,he!==null&&(he.lanes|=y),Bd(O.return,y,f),se.lanes|=y;break}he=he.next}}else if(O.tag===10)W=O.type===f.type?null:O.child;else if(O.tag===18){if(W=O.return,W===null)throw Error(a(341));W.lanes|=y,se=W.alternate,se!==null&&(se.lanes|=y),Bd(W,y,f),W=O.sibling}else W=O.child;if(W!==null)W.return=O;else for(W=O;W!==null;){if(W===f){W=null;break}if(O=W.sibling,O!==null){O.return=W.return,W=O;break}W=W.return}O=W}Si(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,_=f.pendingProps.children,Gu(f,y),A=Gi(A),_=_(A),f.flags|=1,Si(d,f,_,y),f.child;case 14:return _=f.type,A=Bo(_,f.pendingProps),A=Bo(_.type,A),Vs(d,f,_,A,y);case 15:return O2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Bo(_,A),Ca(d,f),f.tag=1,Gr(_)?(d=!0,Ka(f)):d=!1,Gu(f,y),b2(f,_,A),B1(f,_,A,y),Wo(null,f,_,!0,d,y);case 19:return $2(d,f,y);case 22:return R2(d,f,y)}throw Error(a(156,f.tag))};function wi(d,f){return $u(d,f)}function _a(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new _a(d,f,y,_)}function yg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function cp(d){if(typeof d=="function")return yg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function af(d,f,y,_,A,O){var W=2;if(_=d,typeof d=="function")yg(d)&&(W=1);else if(typeof d=="string")W=5;else e:switch(d){case h:return Js(y.children,A,O,f);case p:W=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case E:return d=yo(13,y,f,A),d.elementType=E,d.lanes=O,d;case P:return d=yo(19,y,f,A),d.elementType=P,d.lanes=O,d;case M:return dp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:W=10;break e;case S:W=9;break e;case w:W=11;break e;case k:W=14;break e;case T:W=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(W,y,f,A),f.elementType=d,f.type=_,f.lanes=O,f}function Js(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function dp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function fp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function el(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function sf(d,f,y,_,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bu(0),this.expirationTimes=Bu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.identifierPrefix=_,this.onRecoverableError=A,bt&&(this.mutableSourceEagerHydrationData=null)}function G2(d,f,y,_,A,O,W,se,he){return d=new sf(d,f,y,se,he),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},F1(O),d}function Sg(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return Bl(d,y,f)}return f}function bg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function lf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Ie&&O>=At&&A<=et&&W<=je){d.splice(f,1);break}else if(_!==Ie||y.width!==he.width||jeW){if(!(O!==At||y.height!==he.height||et<_||Ie>A)){Ie>_&&(he.width+=Ie-_,he.x=_),etO&&(he.height+=At-O,he.y=O),jey&&(y=W)),W ")+` + +No matching component was found for: + `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return ee(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:hp,findFiberByHostInstance:d.findFiberByHostInstance||xg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{sn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Pt)throw Error(a(363));d=ug(d,f);var A=jt(d,y,_).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var A=f.current,O=ai(),W=Tr(A);return y=Sg(y),f.context===null?f.context=y:f.pendingContext=y,f=Za(O,W),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Hs(A,f,W),d!==null&&(vo(d,A,W,O),Rh(d,A,W)),W},n};(function(e){e.exports=n7e})(FW);const r7e=I9(FW.exports);var hk={exports:{}},Sh={};/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */Sh.ConcurrentRoot=1;Sh.ContinuousEventPriority=4;Sh.DefaultEventPriority=16;Sh.DiscreteEventPriority=1;Sh.IdleEventPriority=536870912;Sh.LegacyRoot=0;(function(e){e.exports=Sh})(hk);const KM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let XM=!1,ZM=!1;const pk=".react-konva-event",i7e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. +Position of a node will be changed during drag&drop, so you should update state of the react app as well. +Consider to add onDragMove or onDragEnd events. +For more info see: https://github.com/konvajs/react-konva/issues/256 +`,o7e=`ReactKonva: You are using "zIndex" attribute for a Konva node. +react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. +For more info see: https://github.com/konvajs/react-konva/issues/194 +`,a7e={};function cb(e,t,n=a7e){if(!XM&&"zIndex"in t&&(console.warn(o7e),XM=!0),!ZM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(i7e),ZM=!0)}for(var o in n)if(!KM[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!KM[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),_d(e));for(var l in v)e.on(l+pk,v[l])}function _d(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const BW={},s7e={};nh.Node.prototype._applyProps=cb;function l7e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),_d(e)}function u7e(e,t,n){let r=nh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=nh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return cb(l,o),l}function c7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function d7e(e,t,n){return!1}function f7e(e){return e}function h7e(){return null}function p7e(){return null}function g7e(e,t,n,r){return s7e}function m7e(){}function v7e(e){}function y7e(e,t){return!1}function S7e(){return BW}function b7e(){return BW}const x7e=setTimeout,w7e=clearTimeout,C7e=-1;function _7e(e,t){return!1}const k7e=!1,E7e=!0,P7e=!0;function T7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function A7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function $W(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),_d(e)}function L7e(e,t,n){$W(e,t,n)}function M7e(e,t){t.destroy(),t.off(pk),_d(e)}function O7e(e,t){t.destroy(),t.off(pk),_d(e)}function R7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function I7e(e,t,n){}function N7e(e,t,n,r,i){cb(e,i,r)}function D7e(e){e.hide(),_d(e)}function z7e(e){}function F7e(e,t){(t.visible==null||t.visible)&&e.show()}function B7e(e,t){}function $7e(e){}function H7e(){}const W7e=()=>hk.exports.DefaultEventPriority,V7e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:l7e,createInstance:u7e,createTextInstance:c7e,finalizeInitialChildren:d7e,getPublicInstance:f7e,prepareForCommit:h7e,preparePortalMount:p7e,prepareUpdate:g7e,resetAfterCommit:m7e,resetTextContent:v7e,shouldDeprioritizeSubtree:y7e,getRootHostContext:S7e,getChildHostContext:b7e,scheduleTimeout:x7e,cancelTimeout:w7e,noTimeout:C7e,shouldSetTextContent:_7e,isPrimaryRenderer:k7e,warnsIfNotActing:E7e,supportsMutation:P7e,appendChild:T7e,appendChildToContainer:A7e,insertBefore:$W,insertInContainerBefore:L7e,removeChild:M7e,removeChildFromContainer:O7e,commitTextUpdate:R7e,commitMount:I7e,commitUpdate:N7e,hideInstance:D7e,hideTextInstance:z7e,unhideInstance:F7e,unhideTextInstance:B7e,clearContainer:$7e,detachDeletedInstance:H7e,getCurrentEventPriority:W7e,now:e0.exports.unstable_now,idlePriority:e0.exports.unstable_IdlePriority,run:e0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var U7e=Object.defineProperty,G7e=Object.defineProperties,j7e=Object.getOwnPropertyDescriptors,QM=Object.getOwnPropertySymbols,Y7e=Object.prototype.hasOwnProperty,q7e=Object.prototype.propertyIsEnumerable,JM=(e,t,n)=>t in e?U7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eO=(e,t)=>{for(var n in t||(t={}))Y7e.call(t,n)&&JM(e,n,t[n]);if(QM)for(var n of QM(t))q7e.call(t,n)&&JM(e,n,t[n]);return e},K7e=(e,t)=>G7e(e,j7e(t));function gk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=gk(r,t,n);if(i)return i;r=t?null:r.sibling}}function HW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const mk=HW(C.exports.createContext(null));class WW extends C.exports.Component{render(){return x(mk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:X7e,ReactCurrentDispatcher:Z7e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Q7e(){const e=C.exports.useContext(mk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=X7e.current)!=null?r:gk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Kg=[],tO=new WeakMap;function J7e(){var e;const t=Q7e();Kg.splice(0,Kg.length),gk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==mk&&Kg.push(HW(i))});for(const n of Kg){const r=(e=Z7e.current)==null?void 0:e.readContext(n);tO.set(n,r)}return C.exports.useMemo(()=>Kg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,K7e(eO({},i),{value:tO.get(r)}))),n=>x(WW,{...eO({},n)})),[])}function e8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const t8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=e8e(e),o=J7e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new nh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=gm.createContainer(n.current,hk.exports.LegacyRoot,!1,null),gm.updateContainer(x(o,{children:e.children}),r.current),()=>{!nh.isBrowser||(a(null),gm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),cb(n.current,e,i),gm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},s3="Layer",rh="Group",P0="Rect",Xg="Circle",g4="Line",VW="Image",n8e="Transformer",gm=r7e(V7e);gm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const r8e=le.forwardRef((e,t)=>x(WW,{children:x(t8e,{...e,forwardedRef:t})})),i8e=pt([$n],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),o8e=e=>{const{...t}=e,{objects:n}=Ee(i8e);return x(rh,{listening:!1,...t,children:n.filter(U_).map((r,i)=>x(g4,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},c2=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},a8e=pt($n,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:c2(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),s8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=Ee(a8e);return l?re(rh,{listening:!1,...t,children:[x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(Xg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},l8e=pt($n,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),u8e=e=>{const{...t}=e,n=Xe(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=Ee(l8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(V=>{if(!v){n(gw({x:Math.floor(V.target.x()),y:Math.floor(V.target.y())}));return}const J=V.target.x(),ie=V.target.y(),ee=Bc(J,64),X=Bc(ie,64);V.target.x(ee),V.target.y(X),n(gw({x:ee,y:X}))},[n,v]),R=C.exports.useCallback(()=>{if(!k.current)return;const V=k.current,J=V.scaleX(),ie=V.scaleY(),ee=Math.round(V.width()*J),X=Math.round(V.height()*ie),G=Math.round(V.x()),Q=Math.round(V.y());n(cm({width:ee,height:X})),n(gw({x:v?fl(G,64):G,y:v?fl(Q,64):Q})),V.scaleX(1),V.scaleY(1)},[n,v]),I=C.exports.useCallback((V,J,ie)=>{const ee=V.x%T,X=V.y%T;return{x:fl(J.x,T)+ee,y:fl(J.y,T)+X}},[T]),N=()=>{n(vw(!0))},z=()=>{n(vw(!1)),n(Hy(!1))},$=()=>{n(YL(!0))},H=()=>{n(vw(!1)),n(YL(!1)),n(Hy(!1))},q=()=>{n(Hy(!0))},de=()=>{!u&&!l&&n(Hy(!1))};return re(rh,{...t,children:[x(P0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(P0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(P0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:H,onDragMove:M,onMouseDown:$,onMouseOut:de,onMouseOver:q,onMouseUp:H,onTransform:R,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(n8e,{anchorCornerRadius:3,anchorDragBoundFunc:I,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:H,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let UW=null,GW=null;const c8e=e=>{UW=e},m4=()=>UW,d8e=e=>{GW=e},f8e=()=>GW,h8e=pt([$n,Ir],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),p8e=()=>{const e=Xe(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=Ee(h8e),i=C.exports.useRef(null),o=f8e();mt("esc",()=>{e(j4e())},{enabled:()=>!0,preventDefault:!0}),mt("shift+h",()=>{e(iSe(!n))},{preventDefault:!0},[t,n]),mt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(C0("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(C0(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},g8e=pt($n,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:c2(t)}}),nO=e=>`data:image/svg+xml;utf8, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`.replaceAll("black",e),m8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=Ee(g8e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=nO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=nO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(P0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},v8e=pt([$n],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),y8e=e=>{const t=Xe(),{isMoveStageKeyHeld:n,stageScale:r}=Ee(v8e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=st.clamp(r*N4e**s,D4e,z4e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(dSe(l)),t(oH(u))},[e,n,r,t])},db=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},S8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),b8e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(S8e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(a4(!0));return}const o=db(e.current);!o||(i.evt.preventDefault(),t(ZS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},x8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),w8e=(e,t)=>{const n=Xe(),{tool:r,isDrawing:i,isStaging:o}=Ee(x8e);return C.exports.useCallback(()=>{if(r==="move"||o){n(a4(!1));return}if(!t.current&&i&&e.current){const a=db(e.current);if(!a)return;n(eH([a.x,a.y]))}else t.current=!1;n(ZS(!1))},[t,n,i,o,e,r])},C8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),_8e=(e,t,n)=>{const r=Xe(),{isDrawing:i,tool:o,isStaging:a}=Ee(C8e);return C.exports.useCallback(()=>{if(!e.current)return;const s=db(e.current);!s||(r(iH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(eH([s.x,s.y]))))},[t,r,i,a,n,e,o])},k8e=pt([Ir,$n,Pu],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),E8e=e=>{const t=Xe(),{tool:n,isStaging:r}=Ee(k8e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=db(e.current);!o||n==="move"||r||(t(ZS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},P8e=()=>{const e=Xe();return C.exports.useCallback(()=>{e(iH(null)),e(ZS(!1))},[e])},T8e=pt([$n,Pu],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),A8e=()=>{const e=Xe(),{tool:t,isStaging:n}=Ee(T8e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(a4(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(oH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(a4(!1))},[e,n,t])}};var gf=C.exports,L8e=function(t,n,r){const i=gf.useRef("loading"),o=gf.useRef(),[a,s]=gf.useState(0),l=gf.useRef(),u=gf.useRef(),h=gf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),gf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const jW=e=>{const{url:t,x:n,y:r}=e,[i]=L8e(t);return x(VW,{x:n,y:r,image:i,listening:!1})},M8e=pt([$n],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),O8e=()=>{const{objects:e}=Ee(M8e);return e?x(rh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(o4(t))return x(jW,{x:t.x,y:t.y,url:t.image.url},n);if(v4e(t))return x(g4,{points:t.points,stroke:t.color?c2(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},R8e=pt([$n],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),I8e={dark:"rgba(255, 255, 255, 0.2)",green:"rgba(255, 255, 255, 0.2)",light:"rgba(0, 0, 0, 0.2)"},N8e=()=>{const{colorMode:e}=Wv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=Ee(R8e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=I8e[e],{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,R=st.range(0,T).map(N=>x(g4,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),I=st.range(0,M).map(N=>x(g4,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(R.concat(I))},[t,n,r,e,a]),x(rh,{children:i})},D8e=pt([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:st.isEqual}}),z8e=e=>{const{...t}=e,n=Ee(D8e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(VW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},l3=e=>Math.round(e*100)/100,F8e=pt([$n],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h,shouldShowCanvasDebugInfo:p,layer:m}=e,{cursorX:v,cursorY:S}=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{activeLayerColor:m==="mask"?"var(--status-working-color)":"inherit",activeLayerString:m.charAt(0).toUpperCase()+m.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${l3(s)}, ${l3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${l3(r)}\xD7${l3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(h*100),cursorCoordinatesString:`(${v}, ${S})`,shouldShowCanvasDebugInfo:p}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),B8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,cursorCoordinatesString:l,shouldShowCanvasDebugInfo:u}=Ee(F8e);return re("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),u&&re(Tn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x("div",{children:`Cursor Position: ${l}`})]})]})},$8e=pt([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),H8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=Ee($8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return re(rh,{...t,children:[r&&x(jW,{url:u,x:o,y:a}),i&&re(rh,{children:[x(P0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(P0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},W8e=pt([$n],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),V8e=()=>{const e=Xe(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=Ee(W8e),o=C.exports.useCallback(()=>{e(KL(!1))},[e]),a=C.exports.useCallback(()=>{e(KL(!0))},[e]);mt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),mt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),mt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(U4e()),l=()=>e(V4e()),u=()=>e(H4e());return r?x(rn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:re(ra,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(W5e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(V5e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x($_,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(Z5e,{}):x(X5e,{}),onClick:()=>e(lSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Save to Gallery","aria-label":"Save to Gallery",icon:x($$,{}),onClick:()=>e(_4e(r.image.url)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(f1,{}),onClick:()=>e(W4e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},U8e=pt([$n,Pu],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),G8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=Ee(U8e);p8e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(H=>{d8e(H),p.current=H},[]),S=C.exports.useCallback(H=>{c8e(H),m.current=H},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=y8e(p),k=b8e(p),T=w8e(p,E),M=_8e(p,E,w),R=E8e(p),I=P8e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:$}=A8e();return x("div",{className:"inpainting-canvas-container",children:re("div",{className:"inpainting-canvas-wrapper",children:[re(r8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:R,onMouseLeave:I,onMouseMove:M,onMouseOut:I,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:$,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(s3,{id:"grid",visible:r,children:x(N8e,{})}),x(s3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(O8e,{})}),re(s3,{id:"mask",visible:e,listening:!1,children:[x(o8e,{visible:!0,listening:!1}),x(m8e,{listening:!1})]}),re(s3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(s8e,{visible:l!=="move",listening:!1}),x(H8e,{visible:u}),h&&x(z8e,{}),x(u8e,{visible:n&&!u})]})]}),x(B8e,{}),x(V8e,{})]})})},j8e=pt([$n,Ir],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function Y8e(){const e=Xe(),{canUndo:t,activeTabName:n}=Ee(j8e),r=()=>{e(fSe())};return mt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(p4e,{}),onClick:r,isDisabled:!t})}const q8e=pt([$n,Ir],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function K8e(){const e=Xe(),{canRedo:t,activeTabName:n}=Ee(q8e),r=()=>{e(G4e())};return mt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(u4e,{}),onClick:r,isDisabled:!t})}const X8e=()=>{const e=Xe(),{isOpen:t,onOpen:n,onClose:r}=kv(),i=C.exports.useRef(null);return re(Tn,{children:[x(ta,{leftIcon:x(f1,{}),size:"sm",onClick:n,children:"Clear Temp Image Folder"}),x(oB,{isOpen:t,leastDestructiveRef:i,onClose:r,children:x(G0,{children:re(aB,{children:[x(ES,{fontSize:"lg",fontWeight:"bold",children:"Clear Temp Image Folder"}),re(Lv,{children:[x("p",{children:"Clearing the temp image folder also fully resets the Unified Canvas. This includes all undo/redo history, images in the staging area, and the canvas base layer."}),x("br",{}),x("p",{children:"Are you sure you want to clear the temp folder?"})]}),re(kS,{children:[x($a,{ref:i,onClick:r,children:"Cancel"}),x($a,{colorScheme:"red",onClick:()=>{e(k4e()),e(rH()),e(tH()),r()},ml:3,children:"Clear"})]})]})})})]})},Z8e=pt([$n],e=>{const{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=e;return{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),Q8e=()=>{const e=Xe(),{shouldAutoSave:t,shouldCropToBoundingBoxOnSave:n,shouldDarkenOutsideBoundingBox:r,shouldShowCanvasDebugInfo:i,shouldShowGrid:o,shouldShowIntermediates:a,shouldSnapToGrid:s}=Ee(Z8e);return x(Zc,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(V_,{})}),children:re(rn,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Show Intermediates",isChecked:a,onChange:l=>e(sSe(l.target.checked))}),x(Aa,{label:"Show Grid",isChecked:o,onChange:l=>e(aSe(l.target.checked))}),x(Aa,{label:"Snap to Grid",isChecked:s,onChange:l=>e(uSe(l.target.checked))}),x(Aa,{label:"Darken Outside Selection",isChecked:r,onChange:l=>e(nSe(l.target.checked))}),x(Aa,{label:"Auto Save to Gallery",isChecked:t,onChange:l=>e(eSe(l.target.checked))}),x(Aa,{label:"Save Box Region Only",isChecked:n,onChange:l=>e(tSe(l.target.checked))}),x(Aa,{label:"Show Canvas Debug Info",isChecked:i,onChange:l=>e(oSe(l.target.checked))}),x(ta,{size:"sm",leftIcon:x(f1,{}),onClick:()=>e(rH()),children:"Clear Canvas History"}),x(X8e,{})]})})};function fb(){return(fb=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function m9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Z0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(rO(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=v9(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(iO(P),!function(M,R){return R&&!jm(M)}(P,l.current)&&k)){if(jm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(rO(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...fb({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),hb=function(e){return e.filter(Boolean).join(" ")},yk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=hb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},qW=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},y9=function(e){var t=qW(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Nw=function(e){var t=qW(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},J8e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},e_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},t_e=le.memo(function(e){var t=e.hue,n=e.onChange,r=hb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(vk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Z0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(yk,{className:"react-colorful__hue-pointer",left:t/360,color:y9({h:t,s:100,v:100,a:1})})))}),n_e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:y9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(vk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Z0(t.s+100*i.left,0,100),v:Z0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},le.createElement(yk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:y9(t)})))}),KW=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function r_e(e,t,n){var r=m9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;KW(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var i_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,o_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oO=new Map,a_e=function(e){i_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oO.set(t,n);var r=o_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},s_e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Nw(Object.assign({},n,{a:0}))+", "+Nw(Object.assign({},n,{a:1}))+")"},o=hb(["react-colorful__alpha",t]),a=no(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(vk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:Z0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(yk,{className:"react-colorful__alpha-pointer",left:n.a,color:Nw(n)})))},l_e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=YW(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);a_e(s);var l=r_e(n,i,o),u=l[0],h=l[1],p=hb(["react-colorful",t]);return le.createElement("div",fb({},a,{ref:s,className:p}),x(n_e,{hsva:u,onChange:h}),x(t_e,{hue:u.h,onChange:h}),le.createElement(s_e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},u_e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:e_e,fromHsva:J8e,equal:KW},c_e=function(e){return le.createElement(l_e,fb({},e,{colorModel:u_e}))};const XW=e=>{const{styleClass:t,...n}=e;return x(c_e,{className:`invokeai__color-picker ${t}`,...n})},d_e=pt([$n],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:c2(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),f_e=()=>{const e=Xe(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=Ee(d_e);mt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(qL(t==="mask"?"base":"mask"))},a=()=>e($4e()),s=()=>e(Z4e(!r));return re(Tn,{children:[x(yd,{label:"Layer (Q)",tooltipProps:{hasArrow:!0,placement:"top"},value:t,validValues:m4e,onChange:l=>e(qL(l.target.value))}),x(Zc,{isOpen:t!=="mask"?!1:void 0,trigger:"hover",triggerComponent:x(ra,{children:x(gt,{"aria-label":"Masking Options",tooltip:"Masking Options",icon:x(n4e,{}),isDisabled:t!=="mask"})}),children:re(rn,{direction:"column",gap:"0.5rem",children:[x(Aa,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(Aa,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(rSe(l.target.checked))}),x(XW,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(Q4e(l))}),x(ta,{size:"sm",leftIcon:x(f1,{}),onClick:a,children:"Clear Mask (Shift+C)"})]})})]})};let u3;const h_e=new Uint8Array(16);function p_e(){if(!u3&&(u3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!u3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u3(h_e)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function g_e(e,t=0){return(_i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]).toLowerCase()}const m_e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),aO={randomUUID:m_e};function Jp(e,t,n){if(aO.randomUUID&&!t&&!e)return aO.randomUUID();e=e||{};const r=e.random||(e.rng||p_e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return g_e(r)}const v_e=(e,t,n,r)=>{const i=e.scale(),o=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:a,y:s,width:l,height:u}=e.getClientRect(),h=r?{x:Math.round(r.x+n.x),y:Math.round(r.y+n.y),width:Math.round(r.width),height:Math.round(r.height)}:{x:Math.round(a),y:Math.round(s),width:Math.round(l),height:Math.round(u)},p=e.toDataURL(h);return e.scale(i),{dataURL:p,boundingBox:{x:Math.round(o.x),y:Math.round(o.y),width:Math.round(l),height:Math.round(u)}}},y_e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},S_e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},b_e={cropVisible:!1,cropToBoundingBox:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},c3=(e=b_e)=>async(t,n)=>{const{cropVisible:r,cropToBoundingBox:i,shouldSaveToGallery:o,shouldDownload:a,shouldCopy:s,shouldSetAsInitialImage:l}=e;t(A5e("Exporting Image")),t(Kp(!1));const u=n(),{stageScale:h,boundingBoxCoordinates:p,boundingBoxDimensions:m,stageCoordinates:v}=u.canvas,S=m4();if(!S){t(hu(!1)),t(Kp(!0));return}const{dataURL:w,boundingBox:E}=v_e(S,h,v,i?{...p,...m}:void 0);if(!w){t(hu(!1)),t(Kp(!0));return}const P=new FormData;P.append("data",JSON.stringify({dataURL:w,filename:"merged_canvas.png",kind:o?"result":"temp",cropVisible:r}));const T=await(await fetch(window.location.origin+"/upload",{method:"POST",body:P})).json(),{url:M,width:R,height:I}=T,N={uuid:Jp(),category:o?"result":"user",...T};a&&(y_e(M),t(sm({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),s&&(S_e(M,R,I),t(sm({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),o&&(t(Xp({image:N,category:"result"})),t(sm({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),l&&(t(J4e({kind:"image",layer:"base",...E,image:N})),t(sm({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(hu(!1)),t(G3("Connected")),t(Kp(!0))},Sk=e=>e.system,x_e=e=>e.system.toastQueue,w_e=pt([$n,Pu,Sk],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushColorString:c2(o),brushSize:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),C_e=()=>{const e=Xe(),{tool:t,brushColor:n,brushSize:r,brushColorString:i,isStaging:o}=Ee(w_e);mt(["b"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["e"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["["],()=>{e(mw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),mt(["]"],()=>{e(mw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const a=()=>e(C0("brush")),s=()=>e(C0("eraser"));return re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(i4e,{}),"data-selected":t==="brush"&&!o,onClick:a,isDisabled:o}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(q5e,{}),"data-selected":t==="eraser"&&!o,isDisabled:o,onClick:()=>e(C0("eraser"))}),x(Zc,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Brush Options",tooltip:"Brush Options",icon:x(f4e,{})}),children:re(rn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(rn,{gap:"1rem",justifyContent:"space-between",children:x(Y0,{label:"Size",value:r,withInput:!0,onChange:l=>e(mw(l)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(XW,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(K4e(l))})]})})]})};let sO;const ZW=()=>({setOpenUploader:e=>{e&&(sO=e)},openUploader:sO}),__e=pt([Sk,$n,Pu],(e,t,n)=>{const{isProcessing:r}=e,{tool:i,shouldCropToBoundingBoxOnSave:o}=t;return{isProcessing:r,isStaging:n,tool:i,shouldCropToBoundingBoxOnSave:o}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),k_e=()=>{const e=Xe(),{isProcessing:t,isStaging:n,tool:r,shouldCropToBoundingBoxOnSave:i}=Ee(__e),o=m4(),{openUploader:a}=ZW();mt(["v"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[]),mt(["r"],()=>{l()},{enabled:()=>!0,preventDefault:!0},[o]),mt(["shift+m"],()=>{h()},{enabled:()=>!t,preventDefault:!0},[o,t]),mt(["shift+s"],()=>{p()},{enabled:()=>!t,preventDefault:!0},[o,t]),mt(["meta+c","ctrl+c"],()=>{m()},{enabled:()=>!t,preventDefault:!0},[o,t]),mt(["shift+d"],()=>{v()},{enabled:()=>!t,preventDefault:!0},[o,t]);const s=()=>e(C0("move")),l=()=>{const S=m4();if(!S)return;const w=S.getClientRect({skipTransform:!0});e(Y4e({contentRect:w}))},u=()=>{e(tH()),e(nH())},h=()=>{e(c3({cropVisible:!1,shouldSetAsInitialImage:!0}))},p=()=>{e(c3({cropVisible:!i,cropToBoundingBox:i,shouldSaveToGallery:!0}))},m=()=>{e(c3({cropVisible:!i,cropToBoundingBox:i,shouldCopy:!0}))},v=()=>{e(c3({cropVisible:!i,cropToBoundingBox:i,shouldDownload:!0}))};return re("div",{className:"inpainting-settings",children:[x(f_e,{}),x(C_e,{}),re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(U5e,{}),"data-selected":r==="move"||n,onClick:s}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(Y5e,{}),onClick:l})]}),re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(t4e,{}),onClick:h,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x($$,{}),onClick:p,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x(H_,{}),onClick:m,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x(B$,{}),onClick:v,isDisabled:t})]}),re(ra,{isAttached:!0,children:[x(Y8e,{}),x(K8e,{})]}),re(ra,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(W_,{}),onClick:a}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(f1,{}),onClick:u,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(ra,{isAttached:!0,children:x(Q8e,{})})]})},E_e=pt([$n],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),P_e=()=>{const e=Xe(),{doesCanvasNeedScaling:t}=Ee(E_e);return C.exports.useLayoutEffect(()=>{const n=st.debounce(()=>{e(io(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:re("div",{className:"inpainting-main-area",children:[x(k_e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(G6e,{}):x(G8e,{})})]})})})};function T_e(){const e=Xe();return C.exports.useEffect(()=>{e(io(!0))},[e]),x(ok,{optionsPanel:x(V6e,{}),styleClass:"inpainting-workarea-overrides",children:x(P_e,{})})}const A_e=ut({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),kf={txt2img:{title:x(O3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(_we,{}),tooltip:"Text To Image"},img2img:{title:x(A3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(xwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(A_e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T_e,{}),tooltip:"Unified Canvas"},nodes:{title:x(L3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(P3e,{}),tooltip:"Nodes"},postprocess:{title:x(M3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T3e,{}),tooltip:"Post Processing"}},pb=st.map(kf,(e,t)=>t);[...pb];function L_e(){const e=Ee(u=>u.options.activeTab),t=Ee(u=>u.options.isLightBoxOpen),n=Ee(u=>u.gallery.shouldShowGallery),r=Ee(u=>u.options.shouldShowOptionsPanel),i=Ee(u=>u.gallery.shouldPinGallery),o=Ee(u=>u.options.shouldPinOptionsPanel),a=Xe();mt("1",()=>{a(na(0))}),mt("2",()=>{a(na(1))}),mt("3",()=>{a(na(2))}),mt("4",()=>{a(na(3))}),mt("5",()=>{a(na(4))}),mt("z",()=>{a(sd(!t))},[t]),mt("f",()=>{n||r?(a(T0(!1)),a(_0(!1))):(a(T0(!0)),a(_0(!0))),(i||o)&&setTimeout(()=>a(io(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(Oi,{hasArrow:!0,label:kf[h].tooltip,placement:"right",children:x(IB,{children:kf[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(OB,{className:"app-tabs-panel",children:kf[h].workarea},h))}),u};return re(MB,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(io(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(RB,{className:"app-tabs-panels",children:t?x(z6e,{}):l()})]})}const QW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},M_e=QW,JW=MS({name:"options",initialState:M_e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=U3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=i4(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=U3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=i4(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=U3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...QW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=pb.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:gb,setIterations:O_e,setSteps:eV,setCfgScale:tV,setThreshold:R_e,setPerlin:I_e,setHeight:nV,setWidth:rV,setSampler:iV,setSeed:d2,setSeamless:oV,setHiresFix:aV,setImg2imgStrength:S9,setFacetoolStrength:K3,setFacetoolType:X3,setCodeformerFidelity:sV,setUpscalingLevel:b9,setUpscalingStrength:x9,setMaskPath:lV,resetSeed:qPe,resetOptionsState:KPe,setShouldFitToWidthHeight:uV,setParameter:XPe,setShouldGenerateVariations:N_e,setSeedWeights:cV,setVariationAmount:D_e,setAllParameters:z_e,setShouldRunFacetool:F_e,setShouldRunESRGAN:B_e,setShouldRandomizeSeed:$_e,setShowAdvancedOptions:H_e,setActiveTab:na,setShouldShowImageDetails:dV,setAllTextToImageParameters:W_e,setAllImageToImageParameters:V_e,setShowDualDisplay:U_e,setInitialImage:f2,clearInitialImage:fV,setShouldShowOptionsPanel:T0,setShouldPinOptionsPanel:G_e,setOptionsPanelScrollPosition:j_e,setShouldHoldOptionsPanelOpen:Y_e,setShouldLoopback:q_e,setCurrentTheme:K_e,setIsLightBoxOpen:sd}=JW.actions,X_e=JW.reducer,Ml=Object.create(null);Ml.open="0";Ml.close="1";Ml.ping="2";Ml.pong="3";Ml.message="4";Ml.upgrade="5";Ml.noop="6";const Z3=Object.create(null);Object.keys(Ml).forEach(e=>{Z3[Ml[e]]=e});const Z_e={type:"error",data:"parser error"},Q_e=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",J_e=typeof ArrayBuffer=="function",eke=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hV=({type:e,data:t},n,r)=>Q_e&&t instanceof Blob?n?r(t):lO(t,r):J_e&&(t instanceof ArrayBuffer||eke(t))?n?r(t):lO(new Blob([t]),r):r(Ml[e]+(t||"")),lO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},uO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},nke=typeof ArrayBuffer=="function",pV=(e,t)=>{if(typeof e!="string")return{type:"message",data:gV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:rke(e.substring(1),t)}:Z3[n]?e.length>1?{type:Z3[n],data:e.substring(1)}:{type:Z3[n]}:Z_e},rke=(e,t)=>{if(nke){const n=tke(e);return gV(n,t)}else return{base64:!0,data:e}},gV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},mV=String.fromCharCode(30),ike=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{hV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(mV))})})},oke=(e,t)=>{const n=e.split(mV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function yV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const ske=setTimeout,lke=clearTimeout;function mb(e,t){t.useNativeTimers?(e.setTimeoutFn=ske.bind($c),e.clearTimeoutFn=lke.bind($c)):(e.setTimeoutFn=setTimeout.bind($c),e.clearTimeoutFn=clearTimeout.bind($c))}const uke=1.33;function cke(e){return typeof e=="string"?dke(e):Math.ceil((e.byteLength||e.size)*uke)}function dke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class fke extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class SV extends Vr{constructor(t){super(),this.writable=!1,mb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new fke(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=pV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const bV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),w9=64,hke={};let cO=0,d3=0,dO;function fO(e){let t="";do t=bV[e%w9]+t,e=Math.floor(e/w9);while(e>0);return t}function xV(){const e=fO(+new Date);return e!==dO?(cO=0,dO=e):e+"."+fO(cO++)}for(;d3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};oke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,ike(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=xV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Pl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pl extends Vr{constructor(t,n){super(),mb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=yV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new _V(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Pl.requestsCount++,Pl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=mke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Pl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Pl.requestsCount=0;Pl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",hO);else if(typeof addEventListener=="function"){const e="onpagehide"in $c?"pagehide":"unload";addEventListener(e,hO,!1)}}function hO(){for(let e in Pl.requests)Pl.requests.hasOwnProperty(e)&&Pl.requests[e].abort()}const kV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),f3=$c.WebSocket||$c.MozWebSocket,pO=!0,Ske="arraybuffer",gO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class bke extends SV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=gO?{}:yV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=pO&&!gO?n?new f3(t,n):new f3(t):new f3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Ske,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{pO&&this.ws.send(o)}catch{}i&&kV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=xV()),this.supportsBinary||(t.b64=1);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!f3}}const xke={websocket:bke,polling:yke},wke=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Cke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function C9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=wke.exec(e||""),o={},a=14;for(;a--;)o[Cke[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=_ke(o,o.path),o.queryKey=kke(o,o.query),o}function _ke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function kke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Rc extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=C9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=C9(n.host).host),mb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=pke(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=vV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new xke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Rc.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Rc.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Rc.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Rc.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Rc.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,EV=Object.prototype.toString,Ake=typeof Blob=="function"||typeof Blob<"u"&&EV.call(Blob)==="[object BlobConstructor]",Lke=typeof File=="function"||typeof File<"u"&&EV.call(File)==="[object FileConstructor]";function bk(e){return Pke&&(e instanceof ArrayBuffer||Tke(e))||Ake&&e instanceof Blob||Lke&&e instanceof File}function Q3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case tn.ACK:case tn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Nke{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Oke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Dke=Object.freeze(Object.defineProperty({__proto__:null,protocol:Rke,get PacketType(){return tn},Encoder:Ike,Decoder:xk},Symbol.toStringTag,{value:"Module"}));function ps(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const zke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class PV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ps(t,"open",this.onopen.bind(this)),ps(t,"packet",this.onpacket.bind(this)),ps(t,"error",this.onerror.bind(this)),ps(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(zke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:tn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:tn.CONNECT,data:t})}):this.packet({type:tn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tn.EVENT:case tn.BINARY_EVENT:this.onevent(t);break;case tn.ACK:case tn.BINARY_ACK:this.onack(t);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:tn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}v1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};v1.prototype.reset=function(){this.attempts=0};v1.prototype.setMin=function(e){this.ms=e};v1.prototype.setMax=function(e){this.max=e};v1.prototype.setJitter=function(e){this.jitter=e};class E9 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,mb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new v1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Dke;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Rc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ps(n,"open",function(){r.onopen(),t&&t()}),o=ps(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ps(t,"ping",this.onping.bind(this)),ps(t,"data",this.ondata.bind(this)),ps(t,"error",this.onerror.bind(this)),ps(t,"close",this.onclose.bind(this)),ps(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){kV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new PV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Zg={};function J3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Eke(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Zg[i]&&o in Zg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new E9(r,t):(Zg[i]||(Zg[i]=new E9(r,t)),l=Zg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(J3,{Manager:E9,Socket:PV,io:J3,connect:J3});var Fke=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,Bke=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,$ke=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(mO[t]||t||mO.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return Hke(e)},E=function(){return Wke(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return vO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return vO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Vke(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(Fke,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var mO={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},vO=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},Hke=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},Wke=function(t){var n=t.getDay();return n===0&&(n=7),n},Vke=function(t){return(String(t).match(Bke)||[""]).pop().replace($ke,"").replace(/GMT\+0000/g,"UTC")};const Uke=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(FL(!0)),t(G3("Connected")),t(C4e());const r=n().gallery;r.categories.user.latest_mtime?t(WL("user")):t(jC("user")),r.categories.result.latest_mtime?t(WL("result")):t(jC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(FL(!1)),t(G3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:Jp(),...u};if(["txt2img","img2img"].includes(l)&&t(Xp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t(B4e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Xp({image:{...h,category:"result"},category:"result"}))}if(o)switch(pb[a]){case"img2img":{t(f2(h));break}}t(yw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(wSe({uuid:Jp(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Xp({category:"result",image:{uuid:Jp(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(hu(!0)),t(b5e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(BL()),t(yw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:Jp(),...l}));t(xSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(C5e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Xp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(yw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(uH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(fV()),a===i&&t(lV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(x5e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(G3("Model Changed")),t(hu(!1)),t(Kp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(hu(!1)),t(Kp(!0)),t(BL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))},onTempFolderEmptied:()=>{t(sm({title:"Temp Folder Emptied",status:"success",duration:2500,isClosable:!0}))}}},Gke=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new qg.Stage({container:i,width:n,height:r}),a=new qg.Layer,s=new qg.Layer;a.add(new qg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new qg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},jke=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},Yke=e=>{const t=m4(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{prompt:s,iterations:l,steps:u,cfgScale:h,threshold:p,perlin:m,height:v,width:S,sampler:w,seed:E,seamless:P,hiresFix:k,img2imgStrength:T,initialImage:M,shouldFitToWidthHeight:R,shouldGenerateVariations:I,variationAmount:N,seedWeights:z,shouldRunESRGAN:$,upscalingLevel:H,upscalingStrength:q,shouldRunFacetool:de,facetoolStrength:V,codeformerFidelity:J,facetoolType:ie,shouldRandomizeSeed:ee}=r,{shouldDisplayInProgressType:X,saveIntermediatesInterval:G,enableImageDebugging:Q}=o,j={prompt:s,iterations:ee||I?l:1,steps:u,cfg_scale:h,threshold:p,perlin:m,height:v,width:S,sampler_name:w,seed:E,progress_images:X==="full-res",progress_latents:X==="latents",save_intermediates:G,generation_mode:n,init_mask:""};if(j.seed=ee?M$(T_,A_):E,["txt2img","img2img"].includes(n)&&(j.seamless=P,j.hires_fix=k),n==="img2img"&&M&&(j.init_img=typeof M=="string"?M:M.url,j.strength=T,j.fit=R),n==="unifiedCanvas"&&t){const{layerState:{objects:Se},boundingBoxCoordinates:xe,boundingBoxDimensions:Be,inpaintReplace:We,shouldUseInpaintReplace:dt,stageScale:Ye,isMaskEnabled:rt,shouldPreserveMaskedArea:Ze}=i,Ke={...xe,...Be},Et=Gke(rt?Se.filter(U_):[],Ke);j.init_mask=Et,j.fit=!1,j.init_img=a,j.strength=T,j.invert_mask=Ze,dt&&(j.inpaint_replace=We),j.bounding_box=Ke;const bt=t.scale();t.scale({x:1/Ye,y:1/Ye});const Ae=t.getAbsolutePosition(),it=t.toDataURL({x:Ke.x+Ae.x,y:Ke.y+Ae.y,width:Ke.width,height:Ke.height});Q&&jke([{base64:Et,caption:"mask sent as init_mask"},{base64:it,caption:"image sent as init_img"}]),t.scale(bt),j.init_img=it,j.progress_images=!1,j.seam_size=96,j.seam_blur=16,j.seam_strength=.7,j.seam_steps=10,j.tile_size=32,j.force_outpaint=!1}I?(j.variation_amount=N,z&&(j.with_variations=j2e(z))):j.variation_amount=0;let Z=!1,me=!1;return $&&(Z={level:H,strength:q}),de&&(me={type:ie,strength:V},ie==="codeformer"&&(me.codeformer_fidelity=J)),Q&&(j.enable_image_debugging=Q),{generationParameters:j,esrganParameters:Z,facetoolParameters:me}},qke=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(hu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(P5e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=Yke(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(hu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(hu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(uH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(_5e()),t.emit("requestModelChange",i)},emitSaveStagingAreaImageToGallery:i=>{t.emit("requestSaveStagingAreaImageToGallery",i)},emitRequestEmptyTempFolder:()=>{t.emit("requestEmptyTempFolder")}}},Kke=()=>{const{origin:e}=new URL(window.location.href),t=J3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T,onTempFolderEmptied:M}=Uke(i),{emitGenerateImage:R,emitRunESRGAN:I,emitRunFacetool:N,emitDeleteImage:z,emitRequestImages:$,emitRequestNewImages:H,emitCancelProcessing:q,emitRequestSystemConfig:de,emitRequestModelChange:V,emitSaveStagingAreaImageToGallery:J,emitRequestEmptyTempFolder:ie}=qke(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",ee=>u(ee)),t.on("generationResult",ee=>p(ee)),t.on("postprocessingResult",ee=>h(ee)),t.on("intermediateResult",ee=>m(ee)),t.on("progressUpdate",ee=>v(ee)),t.on("galleryImages",ee=>S(ee)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",ee=>{E(ee)}),t.on("systemConfig",ee=>{P(ee)}),t.on("modelChanged",ee=>{k(ee)}),t.on("modelChangeFailed",ee=>{T(ee)}),t.on("tempFolderEmptied",()=>{M()}),n=!0),a.type){case"socketio/generateImage":{R(a.payload);break}case"socketio/runESRGAN":{I(a.payload);break}case"socketio/runFacetool":{N(a.payload);break}case"socketio/deleteImage":{z(a.payload);break}case"socketio/requestImages":{$(a.payload);break}case"socketio/requestNewImages":{H(a.payload);break}case"socketio/cancelProcessing":{q();break}case"socketio/requestSystemConfig":{de();break}case"socketio/requestModelChange":{V(a.payload);break}case"socketio/saveStagingAreaImageToGallery":{J(a.payload);break}case"socketio/requestEmptyTempFolder":{ie();break}}o(a)}},Xke=["cursorPosition"].map(e=>`canvas.${e}`),Zke=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),Qke=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),TV=UB({options:X_e,gallery:PSe,system:L5e,canvas:hSe}),Jke=c$.getPersistConfig({key:"root",storage:u$,rootReducer:TV,blacklist:[...Xke,...Zke,...Qke],debounce:300}),eEe=A2e(Jke,TV),AV=Cve({reducer:eEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(Kke()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Xe=p2e,Ee=r2e;function e5(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?e5=function(n){return typeof n}:e5=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e5(e)}function tEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yO(e,t){for(var n=0;nx(rn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Jv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),aEe=pt(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),sEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=Ee(aEe),i=t?Math.round(t*100/n):0;return x(hB,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function lEe(e){const{title:t,hotkey:n,description:r}=e;return re("div",{className:"hotkey-modal-item",children:[re("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function uEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=kv(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(lEe,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return re(Tn,{children:[C.exports.cloneElement(e,{onClick:n}),re(U0,{isOpen:t,onClose:r,children:[x(G0,{}),re(Mv,{className:" modal hotkeys-modal",children:[x(K8,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:re(gS,{allowMultiple:!0,children:[re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(i)})]}),re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(o)})]}),re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(a)})]}),re(Df,{children:[re(If,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(s)})]})]})})]})]})]})}const cEe=e=>{const{isProcessing:t,isConnected:n}=Ee(l=>l.system),r=Xe(),{name:i,status:o,description:a}=e,s=()=>{r(V$(i))};return re("div",{className:"model-list-item",children:[x(Oi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x($z,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x($a,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},dEe=pt(e=>e.system,e=>{const t=st.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),fEe=()=>{const{models:e}=Ee(dEe);return x(gS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:re(Df,{children:[x(If,{children:re("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Nf,{})]})}),x(zf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(cEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},hEe=pt(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:st.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),pEe=({children:e})=>{const t=Xe(),n=Ee(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=kv(),{isOpen:a,onOpen:s,onClose:l}=kv(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=Ee(hEe),S=()=>{WV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(k5e(E))};return re(Tn,{children:[C.exports.cloneElement(e,{onClick:i}),re(U0,{isOpen:r,onClose:o,children:[x(G0,{}),re(Mv,{className:"modal settings-modal",children:[x(ES,{className:"settings-modal-header",children:"Settings"}),x(K8,{className:"modal-close-btn"}),re(Lv,{className:"settings-modal-content",children:[re("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(fEe,{})}),re("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(yd,{label:"Display In-Progress Images",validValues:B3e,value:u,onChange:E=>t(y5e(E.target.value))}),u==="full-res"&&x(Ts,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(ks,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(R$(E.target.checked))}),x(ks,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:E=>t(w5e(E.target.checked))})]}),re("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(ks,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(E5e(E.target.checked))})]}),re("div",{className:"settings-modal-reset",children:[x(Uf,{size:"md",children:"Reset Web UI"}),x($a,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(kS,{children:x($a,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),re(U0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(G0,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Mv,{children:x(Lv,{pb:6,pt:6,children:x(rn,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},gEe=pt(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),mEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=Ee(gEe),s=Xe();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Oi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(I$())},className:`status ${l}`,children:u})})},vEe=["dark","light","green"];function yEe(){const{setColorMode:e}=Wv(),t=Xe(),n=Ee(i=>i.options.currentTheme),r=i=>{e(i),t(K_e(i))};return x(Zc,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(o4e,{})}),children:x(Vz,{align:"stretch",children:vEe.map(i=>x(ta,{style:{width:"6rem"},leftIcon:n===i?x($_,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const SEe=pt([Sk],e=>{const{isProcessing:t,model_list:n}=e,r=st.map(n,(o,a)=>a),i=st.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),bEe=()=>{const e=Xe(),{models:t,activeModel:n,isProcessing:r}=Ee(SEe);return x(rn,{style:{paddingLeft:"0.3rem"},children:x(yd,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(V$(o.target.value))}})})},xEe=()=>re("div",{className:"site-header",children:[re("div",{className:"site-header-left-side",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),re("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),re("div",{className:"site-header-right-side",children:[x(mEe,{}),x(bEe,{}),x(uEe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(e4e,{})})}),x(yEe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(j5e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x($5e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(B5e,{})})}),x(pEe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(V_,{})})})]})]}),wEe=pt(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),CEe=pt(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),_Ee=()=>{const e=Xe(),t=Ee(wEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=Ee(CEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(I$()),e(hw(!n))};return mt("`",()=>{e(hw(!n))},[n]),mt("esc",()=>{e(hw(!1))}),re(Tn,{children:[n&&x(gH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return re("div",{className:`console-entry console-${S}-color`,children:[re("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(Oi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(H5e,{}),onClick:()=>a(!o)})}),x(Oi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(r4e,{}):x(F$,{}),onClick:l})})]})};function kEe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var EEe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function h2(e,t){var n=PEe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function PEe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=EEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var TEe=[".DS_Store","Thumbs.db"];function AEe(e){return i1(this,void 0,void 0,function(){return o1(this,function(t){return v4(e)&&LEe(e.dataTransfer)?[2,IEe(e.dataTransfer,e.type)]:MEe(e)?[2,OEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,REe(e)]:[2,[]]})})}function LEe(e){return v4(e)}function MEe(e){return v4(e)&&v4(e.target)}function v4(e){return typeof e=="object"&&e!==null}function OEe(e){return A9(e.target.files).map(function(t){return h2(t)})}function REe(e){return i1(this,void 0,void 0,function(){var t;return o1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return h2(r)})]}})})}function IEe(e,t){return i1(this,void 0,void 0,function(){var n,r;return o1(this,function(i){switch(i.label){case 0:return e.items?(n=A9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(NEe))]):[3,2];case 1:return r=i.sent(),[2,SO(MV(r))];case 2:return[2,SO(A9(e.files).map(function(o){return h2(o)}))]}})})}function SO(e){return e.filter(function(t){return TEe.indexOf(t.name)===-1})}function A9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,_O(n)];if(e.sizen)return[!1,_O(n)]}return[!0,null]}function Ef(e){return e!=null}function ZEe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=NV(l,n),h=Dv(u,1),p=h[0],m=DV(l,r,i),v=Dv(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function y4(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function h3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function EO(e){e.preventDefault()}function QEe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function JEe(e){return e.indexOf("Edge/")!==-1}function ePe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return QEe(e)||JEe(e)}function al(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function vPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wk=C.exports.forwardRef(function(e,t){var n=e.children,r=S4(e,aPe),i=HV(r),o=i.open,a=S4(i,sPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});wk.displayName="Dropzone";var $V={disabled:!1,getFilesFromEvent:AEe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};wk.defaultProps=$V;wk.propTypes={children:Rn.exports.func,accept:Rn.exports.objectOf(Rn.exports.arrayOf(Rn.exports.string)),multiple:Rn.exports.bool,preventDropOnDocument:Rn.exports.bool,noClick:Rn.exports.bool,noKeyboard:Rn.exports.bool,noDrag:Rn.exports.bool,noDragEventsBubbling:Rn.exports.bool,minSize:Rn.exports.number,maxSize:Rn.exports.number,maxFiles:Rn.exports.number,disabled:Rn.exports.bool,getFilesFromEvent:Rn.exports.func,onFileDialogCancel:Rn.exports.func,onFileDialogOpen:Rn.exports.func,useFsAccessApi:Rn.exports.bool,autoFocus:Rn.exports.bool,onDragEnter:Rn.exports.func,onDragLeave:Rn.exports.func,onDragOver:Rn.exports.func,onDrop:Rn.exports.func,onDropAccepted:Rn.exports.func,onDropRejected:Rn.exports.func,onError:Rn.exports.func,validator:Rn.exports.func};var R9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function HV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},$V),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,R=t.noKeyboard,I=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,$=t.validator,H=C.exports.useMemo(function(){return rPe(n)},[n]),q=C.exports.useMemo(function(){return nPe(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:TO},[E]),V=C.exports.useMemo(function(){return typeof w=="function"?w:TO},[w]),J=C.exports.useRef(null),ie=C.exports.useRef(null),ee=C.exports.useReducer(yPe,R9),X=Dw(ee,2),G=X[0],Q=X[1],j=G.isFocused,Z=G.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&tPe()),Se=function(){!me.current&&Z&&setTimeout(function(){if(ie.current){var Je=ie.current.files;Je.length||(Q({type:"closeDialog"}),V())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",Se,!1),function(){window.removeEventListener("focus",Se,!1)}},[ie,Z,V,me]);var xe=C.exports.useRef([]),Be=function(Je){J.current&&J.current.contains(Je.target)||(Je.preventDefault(),xe.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",EO,!1),document.addEventListener("drop",Be,!1)),function(){T&&(document.removeEventListener("dragover",EO),document.removeEventListener("drop",Be))}},[J,T]),C.exports.useEffect(function(){return!r&&k&&J.current&&J.current.focus(),function(){}},[J,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),dt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[].concat(cPe(xe.current),[Oe.target]),h3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){if(!(y4(Oe)&&!N)){var Xt=Je.length,jt=Xt>0&&ZEe({files:Je,accept:H,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),ke=Xt>0&&!jt;Q({isDragAccept:jt,isDragReject:ke,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Je){return We(Je)})},[i,u,We,N,H,a,o,s,l,$]),Ye=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=h3(Oe);if(Je&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Je&&p&&p(Oe),!1},[p,N]),rt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=xe.current.filter(function(jt){return J.current&&J.current.contains(jt)}),Xt=Je.indexOf(Oe.target);Xt!==-1&&Je.splice(Xt,1),xe.current=Je,!(Je.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),h3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,Je){var Xt=[],jt=[];Oe.forEach(function(ke){var Mt=NV(ke,H),Ne=Dw(Mt,2),at=Ne[0],an=Ne[1],Nn=DV(ke,a,o),$e=Dw(Nn,2),ft=$e[0],tt=$e[1],Nt=$?$(ke):null;if(at&&ft&&!Nt)Xt.push(ke);else{var Zt=[an,tt];Nt&&(Zt=Zt.concat(Nt)),jt.push({file:ke,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(ke){jt.push({file:ke,errors:[XEe]})}),Xt.splice(0)),Q({acceptedFiles:Xt,fileRejections:jt,type:"setFiles"}),m&&m(Xt,jt,Je),jt.length>0&&S&&S(jt,Je),Xt.length>0&&v&&v(Xt,Je)},[Q,s,H,a,o,l,m,v,S,$]),Ke=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[],h3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){y4(Oe)&&!N||Ze(Je,Oe)}).catch(function(Je){return We(Je)}),Q({type:"reset"})},[i,Ze,We,N]),Et=C.exports.useCallback(function(){if(me.current){Q({type:"openDialog"}),de();var Oe={multiple:s,types:q};window.showOpenFilePicker(Oe).then(function(Je){return i(Je)}).then(function(Je){Ze(Je,null),Q({type:"closeDialog"})}).catch(function(Je){iPe(Je)?(V(Je),Q({type:"closeDialog"})):oPe(Je)?(me.current=!1,ie.current?(ie.current.value=null,ie.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):We(Je)});return}ie.current&&(Q({type:"openDialog"}),de(),ie.current.value=null,ie.current.click())},[Q,de,V,P,Ze,We,q,s]),bt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Et())},[J,Et]),Ae=C.exports.useCallback(function(){Q({type:"focus"})},[]),it=C.exports.useCallback(function(){Q({type:"blur"})},[]),Ot=C.exports.useCallback(function(){M||(ePe()?setTimeout(Et,0):Et())},[M,Et]),lt=function(Je){return r?null:Je},xt=function(Je){return R?null:lt(Je)},Cn=function(Je){return I?null:lt(Je)},Pt=function(Je){N&&Je.stopPropagation()},Kt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.role,ke=Oe.onKeyDown,Mt=Oe.onFocus,Ne=Oe.onBlur,at=Oe.onClick,an=Oe.onDragEnter,Nn=Oe.onDragOver,$e=Oe.onDragLeave,ft=Oe.onDrop,tt=S4(Oe,lPe);return lr(lr(O9({onKeyDown:xt(al(ke,bt)),onFocus:xt(al(Mt,Ae)),onBlur:xt(al(Ne,it)),onClick:lt(al(at,Ot)),onDragEnter:Cn(al(an,dt)),onDragOver:Cn(al(Nn,Ye)),onDragLeave:Cn(al($e,rt)),onDrop:Cn(al(ft,Ke)),role:typeof jt=="string"&&jt!==""?jt:"presentation"},Xt,J),!r&&!R?{tabIndex:0}:{}),tt)}},[J,bt,Ae,it,Ot,dt,Ye,rt,Ke,R,I,r]),_n=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),mn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.onChange,ke=Oe.onClick,Mt=S4(Oe,uPe),Ne=O9({accept:H,multiple:s,type:"file",style:{display:"none"},onChange:lt(al(jt,Ke)),onClick:lt(al(ke,_n)),tabIndex:-1},Xt,ie);return lr(lr({},Ne),Mt)}},[ie,n,s,Ke,r]);return lr(lr({},G),{},{isFocused:j&&!r,getRootProps:Kt,getInputProps:mn,rootRef:J,inputRef:ie,open:lt(Et)})}function yPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},R9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},R9);default:return e}}function TO(){}const SPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return mt("esc",()=>{i(!1)}),re("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:re(Uf,{size:"lg",children:["Upload Image",r]})}),n&&re("div",{className:"dropzone-overlay is-drag-reject",children:[x(Uf,{size:"lg",children:"Invalid Upload"}),x(Uf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},AO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Ir(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:Jp(),category:"user",...l};t(Xp({image:u,category:"user"})),o==="unifiedCanvas"?t(q_(u)):o==="img2img"&&t(f2(u))},bPe=e=>{const{children:t}=e,n=Xe(),r=Ee(Ir),i=u1({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=ZW(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,R)=>M+` +`+R.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(AO({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=HV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const R=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&R.push(N);if(!R.length)return;if(T.stopImmediatePropagation(),R.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const I=R[0].getAsFile();if(!I){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(AO({imageFile:I}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${kf[r].tooltip}`:"";return x(X_.Provider,{value:E,children:re("div",{...p({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(SPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},xPe=()=>{const e=Xe(),t=Ee(r=>r.gallery.shouldPinGallery);return x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(_0(!0)),t&&e(io(!0))},children:x(N$,{})})};function wPe(e){return ht({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const CPe=pt(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),_Pe=()=>{const e=Xe(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=Ee(CPe);return re("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(T0(!0)),n&&setTimeout(()=>e(io(!0)),400)},children:x(wPe,{})}),t&&re(Tn,{children:[x(U$,{iconButton:!0}),x(j$,{}),x(G$,{})]})]})},kPe=()=>{const e=Xe(),t=Ee(x_e),n=u1();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(T5e())},[e,n,t])};kEe();const EPe=pt([e=>e.gallery,e=>e.options,e=>e.system,Ir],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=st.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),PPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=Ee(EPe);return kPe(),x("div",{className:"App",children:re(bPe,{children:[x(sEe,{}),re("div",{className:"app-content",children:[x(xEe,{}),x(L_e,{})]}),x("div",{className:"app-console",children:x(_Ee,{})}),e&&x(xPe,{}),t&&x(_Pe,{})]})})};const WV=N2e(AV),TPe=nN({key:"invokeai-style-cache",prepend:!0});Fw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(d2e,{store:AV,children:x(LV,{loading:x(oEe,{}),persistor:WV,children:x(XQ,{value:TPe,children:x(Hme,{children:x(PPe,{})})})})})})); diff --git a/frontend/dist/assets/index.c60403ea.js b/frontend/dist/assets/index.c60403ea.js deleted file mode 100644 index 54d755096f..0000000000 --- a/frontend/dist/assets/index.c60403ea.js +++ /dev/null @@ -1,623 +0,0 @@ -function mq(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function M9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},qt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Iv=Symbol.for("react.element"),vq=Symbol.for("react.portal"),yq=Symbol.for("react.fragment"),Sq=Symbol.for("react.strict_mode"),bq=Symbol.for("react.profiler"),xq=Symbol.for("react.provider"),wq=Symbol.for("react.context"),Cq=Symbol.for("react.forward_ref"),_q=Symbol.for("react.suspense"),kq=Symbol.for("react.memo"),Eq=Symbol.for("react.lazy"),pE=Symbol.iterator;function Pq(e){return e===null||typeof e!="object"?null:(e=pE&&e[pE]||e["@@iterator"],typeof e=="function"?e:null)}var MO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},OO=Object.assign,IO={};function Z0(e,t,n){this.props=e,this.context=t,this.refs=IO,this.updater=n||MO}Z0.prototype.isReactComponent={};Z0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Z0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function RO(){}RO.prototype=Z0.prototype;function O9(e,t,n){this.props=e,this.context=t,this.refs=IO,this.updater=n||MO}var I9=O9.prototype=new RO;I9.constructor=O9;OO(I9,Z0.prototype);I9.isPureReactComponent=!0;var gE=Array.isArray,NO=Object.prototype.hasOwnProperty,R9={current:null},DO={key:!0,ref:!0,__self:!0,__source:!0};function zO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)NO.call(t,r)&&!DO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,me=G[Z];if(0>>1;Zi(Fe,j))Wei(ht,Fe)?(G[Z]=ht,G[We]=j,Z=We):(G[Z]=Fe,G[xe]=j,Z=xe);else if(Wei(ht,j))G[Z]=ht,G[We]=j,Z=We;else break e}}return Q}function i(G,Q){var j=G.sortIndex-Q.sortIndex;return j!==0?j:G.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],h=1,p=null,m=3,v=!1,S=!1,w=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(G){for(var Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=G)r(u),Q.sortIndex=Q.expirationTime,t(l,Q);else break;Q=n(u)}}function M(G){if(w=!1,T(G),!S)if(n(l)!==null)S=!0,oe(I);else{var Q=n(u);Q!==null&&X(M,Q.startTime-G)}}function I(G,Q){S=!1,w&&(w=!1,P(z),z=-1),v=!0;var j=m;try{for(T(Q),p=n(l);p!==null&&(!(p.expirationTime>Q)||G&&!q());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,m=p.priorityLevel;var me=Z(p.expirationTime<=Q);Q=e.unstable_now(),typeof me=="function"?p.callback=me:p===n(l)&&r(l),T(Q)}else r(l);p=n(l)}if(p!==null)var Se=!0;else{var xe=n(u);xe!==null&&X(M,xe.startTime-Q),Se=!1}return Se}finally{p=null,m=j,v=!1}}var R=!1,N=null,z=-1,$=5,W=-1;function q(){return!(e.unstable_now()-W<$)}function de(){if(N!==null){var G=e.unstable_now();W=G;var Q=!0;try{Q=N(!0,G)}finally{Q?H():(R=!1,N=null)}}else R=!1}var H;if(typeof k=="function")H=function(){k(de)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,re=J.port2;J.port1.onmessage=de,H=function(){re.postMessage(null)}}else H=function(){E(de,0)};function oe(G){N=G,R||(R=!0,H())}function X(G,Q){z=E(function(){G(e.unstable_now())},Q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(G){G.callback=null},e.unstable_continueExecution=function(){S||v||(S=!0,oe(I))},e.unstable_forceFrameRate=function(G){0>G||125Z?(G.sortIndex=j,t(u,G),n(l)===null&&G===n(u)&&(w?(P(z),z=-1):w=!0,X(M,j-Z))):(G.sortIndex=me,t(l,G),S||v||(S=!0,oe(I))),G},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(G){var Q=m;return function(){var j=m;m=Q;try{return G.apply(this,arguments)}finally{m=j}}}})(BO);(function(e){e.exports=BO})(n0);/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var FO=C.exports,ua=n0.exports;function Ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dw=Object.prototype.hasOwnProperty,Oq=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,vE={},yE={};function Iq(e){return Dw.call(yE,e)?!0:Dw.call(vE,e)?!1:Oq.test(e)?yE[e]=!0:(vE[e]=!0,!1)}function Rq(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Nq(e,t,n,r){if(t===null||typeof t>"u"||Rq(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ao(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Mi[e]=new ao(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Mi[t]=new ao(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Mi[e]=new ao(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Mi[e]=new ao(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Mi[e]=new ao(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Mi[e]=new ao(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Mi[e]=new ao(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Mi[e]=new ao(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Mi[e]=new ao(e,5,!1,e.toLowerCase(),null,!1,!1)});var D9=/[\-:]([a-z])/g;function z9(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(D9,z9);Mi[t]=new ao(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(D9,z9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(D9,z9);Mi[t]=new ao(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!1,!1)});Mi.xlinkHref=new ao("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Mi[e]=new ao(e,1,!1,e.toLowerCase(),null,!0,!0)});function B9(e,t,n,r){var i=Mi.hasOwnProperty(t)?Mi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Gb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xg(e):""}function Dq(e){switch(e.tag){case 5:return Xg(e.type);case 16:return Xg("Lazy");case 13:return Xg("Suspense");case 19:return Xg("SuspenseList");case 0:case 2:case 15:return e=jb(e.type,!1),e;case 11:return e=jb(e.type.render,!1),e;case 1:return e=jb(e.type,!0),e;default:return""}}function $w(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Dp:return"Fragment";case Np:return"Portal";case zw:return"Profiler";case F9:return"StrictMode";case Bw:return"Suspense";case Fw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case WO:return(e.displayName||"Context")+".Consumer";case HO:return(e._context.displayName||"Context")+".Provider";case $9:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H9:return t=e.displayName||null,t!==null?t:$w(e.type)||"Memo";case Ec:t=e._payload,e=e._init;try{return $w(e(t))}catch{}}return null}function zq(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $w(t);case 8:return t===F9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Qc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Bq(e){var t=UO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ey(e){e._valueTracker||(e._valueTracker=Bq(e))}function GO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=UO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function e4(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hw(e,t){var n=t.checked;return fr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function bE(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Qc(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function jO(e,t){t=t.checked,t!=null&&B9(e,"checked",t,!1)}function Ww(e,t){jO(e,t);var n=Qc(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vw(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vw(e,t.type,Qc(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xE(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vw(e,t,n){(t!=="number"||e4(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Zg=Array.isArray;function r0(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ty.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Fq=["Webkit","ms","Moz","O"];Object.keys(pm).forEach(function(e){Fq.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pm[t]=pm[e]})});function XO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||pm.hasOwnProperty(e)&&pm[e]?(""+t).trim():t+"px"}function ZO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=XO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var $q=fr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function jw(e,t){if(t){if($q[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ie(62))}}function Yw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qw=null;function W9(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kw=null,i0=null,o0=null;function _E(e){if(e=Dv(e)){if(typeof Kw!="function")throw Error(Ie(280));var t=e.stateNode;t&&(t=C5(t),Kw(e.stateNode,e.type,t))}}function QO(e){i0?o0?o0.push(e):o0=[e]:i0=e}function JO(){if(i0){var e=i0,t=o0;if(o0=i0=null,_E(e),t)for(e=0;e>>=0,e===0?32:31-(Zq(e)/Qq|0)|0}var ny=64,ry=4194304;function Qg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function i4(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Qg(s):(o&=a,o!==0&&(r=Qg(o)))}else a=n&~i,a!==0?r=Qg(a):o!==0&&(r=Qg(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Rv(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ys(t),e[t]=n}function nK(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=mm),IE=String.fromCharCode(32),RE=!1;function SI(e,t){switch(e){case"keyup":return LK.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zp=!1;function OK(e,t){switch(e){case"compositionend":return bI(t);case"keypress":return t.which!==32?null:(RE=!0,IE);case"textInput":return e=t.data,e===IE&&RE?null:e;default:return null}}function IK(e,t){if(zp)return e==="compositionend"||!X9&&SI(e,t)?(e=vI(),p3=Y9=Rc=null,zp=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=BE(n)}}function _I(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_I(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kI(){for(var e=window,t=e4();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=e4(e.document)}return t}function Z9(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WK(e){var t=kI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&_I(n.ownerDocument.documentElement,n)){if(r!==null&&Z9(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=FE(n,o);var a=FE(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Bp=null,t6=null,ym=null,n6=!1;function $E(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;n6||Bp==null||Bp!==e4(r)||(r=Bp,"selectionStart"in r&&Z9(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ym&&Zm(ym,r)||(ym=r,r=s4(t6,"onSelect"),0Hp||(e.current=l6[Hp],l6[Hp]=null,Hp--)}function jn(e,t){Hp++,l6[Hp]=e.current,e.current=t}var Jc={},Wi=ld(Jc),To=ld(!1),Yf=Jc;function M0(e,t){var n=e.type.contextTypes;if(!n)return Jc;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ao(e){return e=e.childContextTypes,e!=null}function u4(){Zn(To),Zn(Wi)}function YE(e,t,n){if(Wi.current!==Jc)throw Error(Ie(168));jn(Wi,t),jn(To,n)}function RI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Ie(108,zq(e)||"Unknown",i));return fr({},n,r)}function c4(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Jc,Yf=Wi.current,jn(Wi,e),jn(To,To.current),!0}function qE(e,t,n){var r=e.stateNode;if(!r)throw Error(Ie(169));n?(e=RI(e,t,Yf),r.__reactInternalMemoizedMergedChildContext=e,Zn(To),Zn(Wi),jn(Wi,e)):Zn(To),jn(To,n)}var su=null,_5=!1,ax=!1;function NI(e){su===null?su=[e]:su.push(e)}function eX(e){_5=!0,NI(e)}function ud(){if(!ax&&su!==null){ax=!0;var e=0,t=Tn;try{var n=su;for(Tn=1;e>=a,i-=a,uu=1<<32-ys(t)+i|n<z?($=N,N=null):$=N.sibling;var W=m(P,N,T[z],M);if(W===null){N===null&&(N=$);break}e&&N&&W.alternate===null&&t(P,N),k=o(W,k,z),R===null?I=W:R.sibling=W,R=W,N=$}if(z===T.length)return n(P,N),nr&&mf(P,z),I;if(N===null){for(;zz?($=N,N=null):$=N.sibling;var q=m(P,N,W.value,M);if(q===null){N===null&&(N=$);break}e&&N&&q.alternate===null&&t(P,N),k=o(q,k,z),R===null?I=q:R.sibling=q,R=q,N=$}if(W.done)return n(P,N),nr&&mf(P,z),I;if(N===null){for(;!W.done;z++,W=T.next())W=p(P,W.value,M),W!==null&&(k=o(W,k,z),R===null?I=W:R.sibling=W,R=W);return nr&&mf(P,z),I}for(N=r(P,N);!W.done;z++,W=T.next())W=v(N,P,z,W.value,M),W!==null&&(e&&W.alternate!==null&&N.delete(W.key===null?z:W.key),k=o(W,k,z),R===null?I=W:R.sibling=W,R=W);return e&&N.forEach(function(de){return t(P,de)}),nr&&mf(P,z),I}function E(P,k,T,M){if(typeof T=="object"&&T!==null&&T.type===Dp&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case J2:e:{for(var I=T.key,R=k;R!==null;){if(R.key===I){if(I=T.type,I===Dp){if(R.tag===7){n(P,R.sibling),k=i(R,T.props.children),k.return=P,P=k;break e}}else if(R.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===Ec&&tP(I)===R.type){n(P,R.sibling),k=i(R,T.props),k.ref=Pg(P,R,T),k.return=P,P=k;break e}n(P,R);break}else t(P,R);R=R.sibling}T.type===Dp?(k=Ff(T.props.children,P.mode,M,T.key),k.return=P,P=k):(M=w3(T.type,T.key,T.props,null,P.mode,M),M.ref=Pg(P,k,T),M.return=P,P=M)}return a(P);case Np:e:{for(R=T.key;k!==null;){if(k.key===R)if(k.tag===4&&k.stateNode.containerInfo===T.containerInfo&&k.stateNode.implementation===T.implementation){n(P,k.sibling),k=i(k,T.children||[]),k.return=P,P=k;break e}else{n(P,k);break}else t(P,k);k=k.sibling}k=px(T,P.mode,M),k.return=P,P=k}return a(P);case Ec:return R=T._init,E(P,k,R(T._payload),M)}if(Zg(T))return S(P,k,T,M);if(wg(T))return w(P,k,T,M);cy(P,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,k!==null&&k.tag===6?(n(P,k.sibling),k=i(k,T),k.return=P,P=k):(n(P,k),k=hx(T,P.mode,M),k.return=P,P=k),a(P)):n(P,k)}return E}var I0=VI(!0),UI=VI(!1),zv={},bl=ld(zv),tv=ld(zv),nv=ld(zv);function Af(e){if(e===zv)throw Error(Ie(174));return e}function a7(e,t){switch(jn(nv,t),jn(tv,e),jn(bl,zv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gw(t,e)}Zn(bl),jn(bl,t)}function R0(){Zn(bl),Zn(tv),Zn(nv)}function GI(e){Af(nv.current);var t=Af(bl.current),n=Gw(t,e.type);t!==n&&(jn(tv,e),jn(bl,n))}function s7(e){tv.current===e&&(Zn(bl),Zn(tv))}var ur=ld(0);function m4(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var sx=[];function l7(){for(var e=0;en?n:4,e(!0);var r=lx.transition;lx.transition={};try{e(!1),t()}finally{Tn=n,lx.transition=r}}function sR(){return Fa().memoizedState}function iX(e,t,n){var r=Yc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lR(e))uR(t,n);else if(n=FI(e,t,n,r),n!==null){var i=ro();Ss(n,e,r,i),cR(n,t,r)}}function oX(e,t,n){var r=Yc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lR(e))uR(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Es(s,a)){var l=t.interleaved;l===null?(i.next=i,i7(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=FI(e,t,i,r),n!==null&&(i=ro(),Ss(n,e,r,i),cR(n,t,r))}}function lR(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function uR(e,t){Sm=v4=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cR(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,U9(e,n)}}var y4={readContext:Ba,useCallback:zi,useContext:zi,useEffect:zi,useImperativeHandle:zi,useInsertionEffect:zi,useLayoutEffect:zi,useMemo:zi,useReducer:zi,useRef:zi,useState:zi,useDebugValue:zi,useDeferredValue:zi,useTransition:zi,useMutableSource:zi,useSyncExternalStore:zi,useId:zi,unstable_isNewReconciler:!1},aX={readContext:Ba,useCallback:function(e,t){return sl().memoizedState=[e,t===void 0?null:t],e},useContext:Ba,useEffect:rP,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,y3(4194308,4,nR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return y3(4194308,4,e,t)},useInsertionEffect:function(e,t){return y3(4,2,e,t)},useMemo:function(e,t){var n=sl();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sl();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iX.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=sl();return e={current:e},t.memoizedState=e},useState:nP,useDebugValue:h7,useDeferredValue:function(e){return sl().memoizedState=e},useTransition:function(){var e=nP(!1),t=e[0];return e=rX.bind(null,e[1]),sl().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=sl();if(nr){if(n===void 0)throw Error(Ie(407));n=n()}else{if(n=t(),ci===null)throw Error(Ie(349));(Kf&30)!==0||qI(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rP(XI.bind(null,r,o,e),[e]),r.flags|=2048,ov(9,KI.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=sl(),t=ci.identifierPrefix;if(nr){var n=cu,r=uu;n=(r&~(1<<32-ys(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=rv++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[hl]=t,e[ev]=r,SR(e,t,!1,!1),t.stateNode=e;e:{switch(a=Yw(n,r),n){case"dialog":Kn("cancel",e),Kn("close",e),i=r;break;case"iframe":case"object":case"embed":Kn("load",e),i=r;break;case"video":case"audio":for(i=0;iD0&&(t.flags|=128,r=!0,Tg(o,!1),t.lanes=4194304)}else{if(!r)if(e=m4(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tg(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!nr)return Bi(t),null}else 2*Or()-o.renderingStartTime>D0&&n!==1073741824&&(t.flags|=128,r=!0,Tg(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Or(),t.sibling=null,n=ur.current,jn(ur,r?n&1|2:n&1),t):(Bi(t),null);case 22:case 23:return S7(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(ea&1073741824)!==0&&(Bi(t),t.subtreeFlags&6&&(t.flags|=8192)):Bi(t),null;case 24:return null;case 25:return null}throw Error(Ie(156,t.tag))}function pX(e,t){switch(J9(t),t.tag){case 1:return Ao(t.type)&&u4(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return R0(),Zn(To),Zn(Wi),l7(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return s7(t),null;case 13:if(Zn(ur),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ie(340));O0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(ur),null;case 4:return R0(),null;case 10:return r7(t.type._context),null;case 22:case 23:return S7(),null;case 24:return null;default:return null}}var fy=!1,Hi=!1,gX=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Gp(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){xr(e,t,r)}else n.current=null}function b6(e,t,n){try{n()}catch(r){xr(e,t,r)}}var fP=!1;function mX(e,t){if(r6=o4,e=kI(),Z9(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,h=0,p=e,m=null;t:for(;;){for(var v;p!==n||i!==0&&p.nodeType!==3||(s=a+i),p!==o||r!==0&&p.nodeType!==3||(l=a+r),p.nodeType===3&&(a+=p.nodeValue.length),(v=p.firstChild)!==null;)m=p,p=v;for(;;){if(p===e)break t;if(m===n&&++u===i&&(s=a),m===o&&++h===r&&(l=a),(v=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=v}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(i6={focusedElem:e,selectionRange:n},o4=!1,nt=t;nt!==null;)if(t=nt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,nt=e;else for(;nt!==null;){t=nt;try{var S=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,E=S.memoizedState,P=t.stateNode,k=P.getSnapshotBeforeUpdate(t.elementType===t.type?w:ds(t.type,w),E);P.__reactInternalSnapshotBeforeUpdate=k}break;case 3:var T=t.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ie(163))}}catch(M){xr(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,nt=e;break}nt=t.return}return S=fP,fP=!1,S}function bm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&b6(t,n,o)}i=i.next}while(i!==r)}}function P5(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function x6(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wR(e){var t=e.alternate;t!==null&&(e.alternate=null,wR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[hl],delete t[ev],delete t[s6],delete t[QK],delete t[JK])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function CR(e){return e.tag===5||e.tag===3||e.tag===4}function hP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||CR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function w6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=l4));else if(r!==4&&(e=e.child,e!==null))for(w6(e,t,n),e=e.sibling;e!==null;)w6(e,t,n),e=e.sibling}function C6(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(C6(e,t,n),e=e.sibling;e!==null;)C6(e,t,n),e=e.sibling}var ki=null,fs=!1;function Sc(e,t,n){for(n=n.child;n!==null;)_R(e,t,n),n=n.sibling}function _R(e,t,n){if(Sl&&typeof Sl.onCommitFiberUnmount=="function")try{Sl.onCommitFiberUnmount(S5,n)}catch{}switch(n.tag){case 5:Hi||Gp(n,t);case 6:var r=ki,i=fs;ki=null,Sc(e,t,n),ki=r,fs=i,ki!==null&&(fs?(e=ki,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ki.removeChild(n.stateNode));break;case 18:ki!==null&&(fs?(e=ki,n=n.stateNode,e.nodeType===8?ox(e.parentNode,n):e.nodeType===1&&ox(e,n),Km(e)):ox(ki,n.stateNode));break;case 4:r=ki,i=fs,ki=n.stateNode.containerInfo,fs=!0,Sc(e,t,n),ki=r,fs=i;break;case 0:case 11:case 14:case 15:if(!Hi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&b6(n,t,a),i=i.next}while(i!==r)}Sc(e,t,n);break;case 1:if(!Hi&&(Gp(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){xr(n,t,s)}Sc(e,t,n);break;case 21:Sc(e,t,n);break;case 22:n.mode&1?(Hi=(r=Hi)||n.memoizedState!==null,Sc(e,t,n),Hi=r):Sc(e,t,n);break;default:Sc(e,t,n)}}function pP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gX),t.forEach(function(r){var i=kX.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function as(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Or()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yX(r/1960))-r,10e?16:e,Nc===null)var r=!1;else{if(e=Nc,Nc=null,x4=0,(on&6)!==0)throw Error(Ie(331));var i=on;for(on|=4,nt=e.current;nt!==null;){var o=nt,a=o.child;if((nt.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;lOr()-v7?Bf(e,0):m7|=n),Lo(e,t)}function OR(e,t){t===0&&((e.mode&1)===0?t=1:(t=ry,ry<<=1,(ry&130023424)===0&&(ry=4194304)));var n=ro();e=vu(e,t),e!==null&&(Rv(e,t,n),Lo(e,n))}function _X(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),OR(e,n)}function kX(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Ie(314))}r!==null&&r.delete(t),OR(e,n)}var IR;IR=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||To.current)Po=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Po=!1,fX(e,t,n);Po=(e.flags&131072)!==0}else Po=!1,nr&&(t.flags&1048576)!==0&&DI(t,f4,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;S3(e,t),e=t.pendingProps;var i=M0(t,Wi.current);s0(t,n),i=c7(null,t,r,e,i,n);var o=d7();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ao(r)?(o=!0,c4(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,o7(t),i.updater=k5,t.stateNode=i,i._reactInternals=t,h6(t,r,e,n),t=m6(null,t,r,!0,o,n)):(t.tag=0,nr&&o&&Q9(t),eo(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(S3(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=PX(r),e=ds(r,e),i){case 0:t=g6(null,t,r,e,n);break e;case 1:t=uP(null,t,r,e,n);break e;case 11:t=sP(null,t,r,e,n);break e;case 14:t=lP(null,t,r,ds(r.type,e),n);break e}throw Error(Ie(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),g6(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),uP(e,t,r,i,n);case 3:e:{if(mR(t),e===null)throw Error(Ie(387));r=t.pendingProps,o=t.memoizedState,i=o.element,$I(e,t),g4(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=N0(Error(Ie(423)),t),t=cP(e,t,r,n,i);break e}else if(r!==i){i=N0(Error(Ie(424)),t),t=cP(e,t,r,n,i);break e}else for(ia=Uc(t.stateNode.containerInfo.firstChild),oa=t,nr=!0,ps=null,n=UI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(O0(),r===i){t=yu(e,t,n);break e}eo(e,t,r,n)}t=t.child}return t;case 5:return GI(t),e===null&&c6(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,o6(r,i)?a=null:o!==null&&o6(r,o)&&(t.flags|=32),gR(e,t),eo(e,t,a,n),t.child;case 6:return e===null&&c6(t),null;case 13:return vR(e,t,n);case 4:return a7(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=I0(t,null,r,n):eo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),sP(e,t,r,i,n);case 7:return eo(e,t,t.pendingProps,n),t.child;case 8:return eo(e,t,t.pendingProps.children,n),t.child;case 12:return eo(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,jn(h4,r._currentValue),r._currentValue=a,o!==null)if(Es(o.value,a)){if(o.children===i.children&&!To.current){t=yu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=fu(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),d6(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Ie(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),d6(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}eo(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,s0(t,n),i=Ba(i),r=r(i),t.flags|=1,eo(e,t,r,n),t.child;case 14:return r=t.type,i=ds(r,t.pendingProps),i=ds(r.type,i),lP(e,t,r,i,n);case 15:return hR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ds(r,i),S3(e,t),t.tag=1,Ao(r)?(e=!0,c4(t)):e=!1,s0(t,n),WI(t,r,i),h6(t,r,i,n),m6(null,t,r,!0,e,n);case 19:return yR(e,t,n);case 22:return pR(e,t,n)}throw Error(Ie(156,t.tag))};function RR(e,t){return aI(e,t)}function EX(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oa(e,t,n,r){return new EX(e,t,n,r)}function x7(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PX(e){if(typeof e=="function")return x7(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$9)return 11;if(e===H9)return 14}return 2}function qc(e,t){var n=e.alternate;return n===null?(n=Oa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function w3(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")x7(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Dp:return Ff(n.children,i,o,t);case F9:a=8,i|=8;break;case zw:return e=Oa(12,n,t,i|2),e.elementType=zw,e.lanes=o,e;case Bw:return e=Oa(13,n,t,i),e.elementType=Bw,e.lanes=o,e;case Fw:return e=Oa(19,n,t,i),e.elementType=Fw,e.lanes=o,e;case VO:return A5(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case HO:a=10;break e;case WO:a=9;break e;case $9:a=11;break e;case H9:a=14;break e;case Ec:a=16,r=null;break e}throw Error(Ie(130,e==null?e:typeof e,""))}return t=Oa(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ff(e,t,n,r){return e=Oa(7,e,r,t),e.lanes=n,e}function A5(e,t,n,r){return e=Oa(22,e,r,t),e.elementType=VO,e.lanes=n,e.stateNode={isHidden:!1},e}function hx(e,t,n){return e=Oa(6,e,null,t),e.lanes=n,e}function px(e,t,n){return t=Oa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TX(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qb(0),this.expirationTimes=qb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function w7(e,t,n,r,i,o,a,s,l){return e=new TX(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Oa(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},o7(o),e}function AX(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=fa})(Ol);const gy=M9(Ol.exports);var wP=Ol.exports;Nw.createRoot=wP.createRoot,Nw.hydrateRoot=wP.hydrateRoot;var bs=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect,R5={exports:{}},N5={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var RX=C.exports,NX=Symbol.for("react.element"),DX=Symbol.for("react.fragment"),zX=Object.prototype.hasOwnProperty,BX=RX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,FX={key:!0,ref:!0,__self:!0,__source:!0};function BR(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)zX.call(t,r)&&!FX.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:NX,type:e,key:o,ref:a,props:i,_owner:BX.current}}N5.Fragment=DX;N5.jsx=BR;N5.jsxs=BR;(function(e){e.exports=N5})(R5);const Nn=R5.exports.Fragment,x=R5.exports.jsx,ne=R5.exports.jsxs;var E7=C.exports.createContext({});E7.displayName="ColorModeContext";function Bv(){const e=C.exports.useContext(E7);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var my={light:"chakra-ui-light",dark:"chakra-ui-dark"};function $X(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i?.()},setClassName(r){document.body.classList.add(r?my.dark:my.light),document.body.classList.remove(r?my.light:my.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){return n.query().matches??r==="dark"?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var HX="chakra-ui-color-mode";function WX(e){return{ssr:!1,type:"localStorage",get(t){if(!globalThis?.document)return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var VX=WX(HX),CP=()=>{};function _P(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function FR(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=VX}=e,s=i==="dark"?"dark":"light",[l,u]=C.exports.useState(()=>_P(a,s)),[h,p]=C.exports.useState(()=>_P(a)),{getSystemTheme:m,setClassName:v,setDataset:S,addListener:w}=C.exports.useMemo(()=>$X({preventTransition:o}),[o]),E=i==="system"&&!l?h:l,P=C.exports.useCallback(M=>{const I=M==="system"?m():M;u(I),v(I==="dark"),S(I),a.set(I)},[a,m,v,S]);bs(()=>{i==="system"&&p(m())},[]),C.exports.useEffect(()=>{const M=a.get();if(M){P(M);return}if(i==="system"){P("system");return}P(s)},[a,s,i,P]);const k=C.exports.useCallback(()=>{P(E==="dark"?"light":"dark")},[E,P]);C.exports.useEffect(()=>{if(!!r)return w(P)},[r,w,P]);const T=C.exports.useMemo(()=>({colorMode:t??E,toggleColorMode:t?CP:k,setColorMode:t?CP:P,forced:t!==void 0}),[E,k,P,t]);return x(E7.Provider,{value:T,children:n})}FR.displayName="ColorModeProvider";var T6={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Function]",S="[object GeneratorFunction]",w="[object Map]",E="[object Number]",P="[object Null]",k="[object Object]",T="[object Proxy]",M="[object RegExp]",I="[object Set]",R="[object String]",N="[object Undefined]",z="[object WeakMap]",$="[object ArrayBuffer]",W="[object DataView]",q="[object Float32Array]",de="[object Float64Array]",H="[object Int8Array]",J="[object Int16Array]",re="[object Int32Array]",oe="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Q="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,Z=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,Se={};Se[q]=Se[de]=Se[H]=Se[J]=Se[re]=Se[oe]=Se[X]=Se[G]=Se[Q]=!0,Se[s]=Se[l]=Se[$]=Se[h]=Se[W]=Se[p]=Se[m]=Se[v]=Se[w]=Se[E]=Se[k]=Se[M]=Se[I]=Se[R]=Se[z]=!1;var xe=typeof ms=="object"&&ms&&ms.Object===Object&&ms,Fe=typeof self=="object"&&self&&self.Object===Object&&self,We=xe||Fe||Function("return this")(),ht=t&&!t.nodeType&&t,qe=ht&&!0&&e&&!e.nodeType&&e,rt=qe&&qe.exports===ht,Ze=rt&&xe.process,Xe=function(){try{var U=qe&&qe.require&&qe.require("util").types;return U||Ze&&Ze.binding&&Ze.binding("util")}catch{}}(),Et=Xe&&Xe.isTypedArray;function bt(U,te,pe){switch(pe.length){case 0:return U.call(te);case 1:return U.call(te,pe[0]);case 2:return U.call(te,pe[0],pe[1]);case 3:return U.call(te,pe[0],pe[1],pe[2])}return U.apply(te,pe)}function Ae(U,te){for(var pe=-1,Ke=Array(U);++pe-1}function y1(U,te){var pe=this.__data__,Ke=ja(pe,U);return Ke<0?(++this.size,pe.push([U,te])):pe[Ke][1]=te,this}Ro.prototype.clear=kd,Ro.prototype.delete=v1,Ro.prototype.get=Ru,Ro.prototype.has=Ed,Ro.prototype.set=y1;function Os(U){var te=-1,pe=U==null?0:U.length;for(this.clear();++te1?pe[zt-1]:void 0,vt=zt>2?pe[2]:void 0;for(cn=U.length>3&&typeof cn=="function"?(zt--,cn):void 0,vt&&Eh(pe[0],pe[1],vt)&&(cn=zt<3?void 0:cn,zt=1),te=Object(te);++Ke-1&&U%1==0&&U0){if(++te>=i)return arguments[0]}else te=0;return U.apply(void 0,arguments)}}function Fu(U){if(U!=null){try{return kn.call(U)}catch{}try{return U+""}catch{}}return""}function va(U,te){return U===te||U!==U&&te!==te}var Md=Bl(function(){return arguments}())?Bl:function(U){return Wn(U)&&mn.call(U,"callee")&&!$e.call(U,"callee")},Hl=Array.isArray;function Ht(U){return U!=null&&Th(U.length)&&!Hu(U)}function Ph(U){return Wn(U)&&Ht(U)}var $u=Zt||M1;function Hu(U){if(!Bo(U))return!1;var te=Rs(U);return te==v||te==S||te==u||te==T}function Th(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=a}function Bo(U){var te=typeof U;return U!=null&&(te=="object"||te=="function")}function Wn(U){return U!=null&&typeof U=="object"}function Od(U){if(!Wn(U)||Rs(U)!=k)return!1;var te=an(U);if(te===null)return!0;var pe=mn.call(te,"constructor")&&te.constructor;return typeof pe=="function"&&pe instanceof pe&&kn.call(pe)==Xt}var Ah=Et?it(Et):Du;function Id(U){return Gr(U,Lh(U))}function Lh(U){return Ht(U)?T1(U,!0):Ns(U)}var sn=Ya(function(U,te,pe,Ke){No(U,te,pe,Ke)});function Wt(U){return function(){return U}}function Mh(U){return U}function M1(){return!1}e.exports=sn})(T6,T6.exports);const vl=T6.exports;function xs(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Lf(e,...t){return UX(e)?e(...t):e}var UX=e=>typeof e=="function",GX=e=>/!(important)?$/.test(e),kP=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,A6=(e,t)=>n=>{const r=String(t),i=GX(r),o=kP(r),a=e?`${e}.${o}`:o;let s=xs(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=kP(s),i?`${s} !important`:s};function sv(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{const s=A6(t,o)(a);let l=n?.(s,a)??s;return r&&(l=r(l,a)),l}}var vy=(...e)=>t=>e.reduce((n,r)=>r(n),t);function ss(e,t){return n=>{const r={property:n,scale:e};return r.transform=sv({scale:e,transform:t}),r}}var jX=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function YX(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:jX(t),transform:n?sv({scale:n,compose:r}):r}}var $R=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function qX(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...$R].join(" ")}function KX(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...$R].join(" ")}var XX={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},ZX={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function QX(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var JX={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},HR="& > :not(style) ~ :not(style)",eZ={[HR]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},tZ={[HR]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},L6={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},nZ=new Set(Object.values(L6)),WR=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),rZ=e=>e.trim();function iZ(e,t){var n;if(e==null||WR.has(e))return e;const r=/(?^[a-z-A-Z]+)\((?(.*))\)/g,{type:i,values:o}=((n=r.exec(e))==null?void 0:n.groups)??{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(rZ).filter(Boolean);if(l?.length===0)return e;const u=s in L6?L6[s]:s;l.unshift(u);const h=l.map(p=>{if(nZ.has(p))return p;const m=p.indexOf(" "),[v,S]=m!==-1?[p.substr(0,m),p.substr(m+1)]:[p],w=VR(S)?S:S&&S.split(" "),E=`colors.${v}`,P=E in t.__cssMap?t.__cssMap[E].varRef:v;return w?[P,...Array.isArray(w)?w:[w]].join(" "):P});return`${a}(${h.join(", ")})`}var VR=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),oZ=(e,t)=>iZ(e,t??{});function aZ(e){return/^var\(--.+\)$/.test(e)}var sZ=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},rl=e=>t=>`${e}(${t})`,rn={filter(e){return e!=="auto"?e:XX},backdropFilter(e){return e!=="auto"?e:ZX},ring(e){return QX(rn.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?qX():e==="auto-gpu"?KX():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=sZ(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(aZ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:oZ,blur:rl("blur"),opacity:rl("opacity"),brightness:rl("brightness"),contrast:rl("contrast"),dropShadow:rl("drop-shadow"),grayscale:rl("grayscale"),hueRotate:rl("hue-rotate"),invert:rl("invert"),saturate:rl("saturate"),sepia:rl("sepia"),bgImage(e){return e==null||VR(e)||WR.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){const{space:t,divide:n}=JX[e]??{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},ae={borderWidths:ss("borderWidths"),borderStyles:ss("borderStyles"),colors:ss("colors"),borders:ss("borders"),radii:ss("radii",rn.px),space:ss("space",vy(rn.vh,rn.px)),spaceT:ss("space",vy(rn.vh,rn.px)),degreeT(e){return{property:e,transform:rn.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:sv({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:ss("sizes",vy(rn.vh,rn.px)),sizesT:ss("sizes",vy(rn.vh,rn.fraction)),shadows:ss("shadows"),logical:YX,blur:ss("blur",rn.blur)},C3={background:ae.colors("background"),backgroundColor:ae.colors("backgroundColor"),backgroundImage:ae.propT("backgroundImage",rn.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:rn.bgClip},bgSize:ae.prop("backgroundSize"),bgPosition:ae.prop("backgroundPosition"),bg:ae.colors("background"),bgColor:ae.colors("backgroundColor"),bgPos:ae.prop("backgroundPosition"),bgRepeat:ae.prop("backgroundRepeat"),bgAttachment:ae.prop("backgroundAttachment"),bgGradient:ae.propT("backgroundImage",rn.gradient),bgClip:{transform:rn.bgClip}};Object.assign(C3,{bgImage:C3.backgroundImage,bgImg:C3.backgroundImage});var fn={border:ae.borders("border"),borderWidth:ae.borderWidths("borderWidth"),borderStyle:ae.borderStyles("borderStyle"),borderColor:ae.colors("borderColor"),borderRadius:ae.radii("borderRadius"),borderTop:ae.borders("borderTop"),borderBlockStart:ae.borders("borderBlockStart"),borderTopLeftRadius:ae.radii("borderTopLeftRadius"),borderStartStartRadius:ae.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:ae.radii("borderTopRightRadius"),borderStartEndRadius:ae.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:ae.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:ae.borders("borderRight"),borderInlineEnd:ae.borders("borderInlineEnd"),borderBottom:ae.borders("borderBottom"),borderBlockEnd:ae.borders("borderBlockEnd"),borderBottomLeftRadius:ae.radii("borderBottomLeftRadius"),borderBottomRightRadius:ae.radii("borderBottomRightRadius"),borderLeft:ae.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:ae.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:ae.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:ae.borders(["borderLeft","borderRight"]),borderInline:ae.borders("borderInline"),borderY:ae.borders(["borderTop","borderBottom"]),borderBlock:ae.borders("borderBlock"),borderTopWidth:ae.borderWidths("borderTopWidth"),borderBlockStartWidth:ae.borderWidths("borderBlockStartWidth"),borderTopColor:ae.colors("borderTopColor"),borderBlockStartColor:ae.colors("borderBlockStartColor"),borderTopStyle:ae.borderStyles("borderTopStyle"),borderBlockStartStyle:ae.borderStyles("borderBlockStartStyle"),borderBottomWidth:ae.borderWidths("borderBottomWidth"),borderBlockEndWidth:ae.borderWidths("borderBlockEndWidth"),borderBottomColor:ae.colors("borderBottomColor"),borderBlockEndColor:ae.colors("borderBlockEndColor"),borderBottomStyle:ae.borderStyles("borderBottomStyle"),borderBlockEndStyle:ae.borderStyles("borderBlockEndStyle"),borderLeftWidth:ae.borderWidths("borderLeftWidth"),borderInlineStartWidth:ae.borderWidths("borderInlineStartWidth"),borderLeftColor:ae.colors("borderLeftColor"),borderInlineStartColor:ae.colors("borderInlineStartColor"),borderLeftStyle:ae.borderStyles("borderLeftStyle"),borderInlineStartStyle:ae.borderStyles("borderInlineStartStyle"),borderRightWidth:ae.borderWidths("borderRightWidth"),borderInlineEndWidth:ae.borderWidths("borderInlineEndWidth"),borderRightColor:ae.colors("borderRightColor"),borderInlineEndColor:ae.colors("borderInlineEndColor"),borderRightStyle:ae.borderStyles("borderRightStyle"),borderInlineEndStyle:ae.borderStyles("borderInlineEndStyle"),borderTopRadius:ae.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:ae.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:ae.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:ae.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(fn,{rounded:fn.borderRadius,roundedTop:fn.borderTopRadius,roundedTopLeft:fn.borderTopLeftRadius,roundedTopRight:fn.borderTopRightRadius,roundedTopStart:fn.borderStartStartRadius,roundedTopEnd:fn.borderStartEndRadius,roundedBottom:fn.borderBottomRadius,roundedBottomLeft:fn.borderBottomLeftRadius,roundedBottomRight:fn.borderBottomRightRadius,roundedBottomStart:fn.borderEndStartRadius,roundedBottomEnd:fn.borderEndEndRadius,roundedLeft:fn.borderLeftRadius,roundedRight:fn.borderRightRadius,roundedStart:fn.borderInlineStartRadius,roundedEnd:fn.borderInlineEndRadius,borderStart:fn.borderInlineStart,borderEnd:fn.borderInlineEnd,borderTopStartRadius:fn.borderStartStartRadius,borderTopEndRadius:fn.borderStartEndRadius,borderBottomStartRadius:fn.borderEndStartRadius,borderBottomEndRadius:fn.borderEndEndRadius,borderStartRadius:fn.borderInlineStartRadius,borderEndRadius:fn.borderInlineEndRadius,borderStartWidth:fn.borderInlineStartWidth,borderEndWidth:fn.borderInlineEndWidth,borderStartColor:fn.borderInlineStartColor,borderEndColor:fn.borderInlineEndColor,borderStartStyle:fn.borderInlineStartStyle,borderEndStyle:fn.borderInlineEndStyle});var lZ={color:ae.colors("color"),textColor:ae.colors("color"),fill:ae.colors("fill"),stroke:ae.colors("stroke")},M6={boxShadow:ae.shadows("boxShadow"),mixBlendMode:!0,blendMode:ae.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:ae.prop("backgroundBlendMode"),opacity:!0};Object.assign(M6,{shadow:M6.boxShadow});var uZ={filter:{transform:rn.filter},blur:ae.blur("--chakra-blur"),brightness:ae.propT("--chakra-brightness",rn.brightness),contrast:ae.propT("--chakra-contrast",rn.contrast),hueRotate:ae.degreeT("--chakra-hue-rotate"),invert:ae.propT("--chakra-invert",rn.invert),saturate:ae.propT("--chakra-saturate",rn.saturate),dropShadow:ae.propT("--chakra-drop-shadow",rn.dropShadow),backdropFilter:{transform:rn.backdropFilter},backdropBlur:ae.blur("--chakra-backdrop-blur"),backdropBrightness:ae.propT("--chakra-backdrop-brightness",rn.brightness),backdropContrast:ae.propT("--chakra-backdrop-contrast",rn.contrast),backdropHueRotate:ae.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:ae.propT("--chakra-backdrop-invert",rn.invert),backdropSaturate:ae.propT("--chakra-backdrop-saturate",rn.saturate)},_4={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:rn.flexDirection},experimental_spaceX:{static:eZ,transform:sv({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:tZ,transform:sv({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:ae.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:ae.space("gap"),rowGap:ae.space("rowGap"),columnGap:ae.space("columnGap")};Object.assign(_4,{flexDir:_4.flexDirection});var UR={gridGap:ae.space("gridGap"),gridColumnGap:ae.space("gridColumnGap"),gridRowGap:ae.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},cZ={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:rn.outline},outlineOffset:!0,outlineColor:ae.colors("outlineColor")},Pa={width:ae.sizesT("width"),inlineSize:ae.sizesT("inlineSize"),height:ae.sizes("height"),blockSize:ae.sizes("blockSize"),boxSize:ae.sizes(["width","height"]),minWidth:ae.sizes("minWidth"),minInlineSize:ae.sizes("minInlineSize"),minHeight:ae.sizes("minHeight"),minBlockSize:ae.sizes("minBlockSize"),maxWidth:ae.sizes("maxWidth"),maxInlineSize:ae.sizes("maxInlineSize"),maxHeight:ae.sizes("maxHeight"),maxBlockSize:ae.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:ae.propT("float",rn.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Pa,{w:Pa.width,h:Pa.height,minW:Pa.minWidth,maxW:Pa.maxWidth,minH:Pa.minHeight,maxH:Pa.maxHeight,overscroll:Pa.overscrollBehavior,overscrollX:Pa.overscrollBehaviorX,overscrollY:Pa.overscrollBehaviorY});var dZ={listStyleType:!0,listStylePosition:!0,listStylePos:ae.prop("listStylePosition"),listStyleImage:!0,listStyleImg:ae.prop("listStyleImage")};function fZ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},pZ=hZ(fZ),gZ={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},mZ={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},gx=(e,t,n)=>{const r={},i=pZ(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},vZ={srOnly:{transform(e){return e===!0?gZ:e==="focusable"?mZ:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>gx(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>gx(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>gx(t,e,n)}},Cm={position:!0,pos:ae.prop("position"),zIndex:ae.prop("zIndex","zIndices"),inset:ae.spaceT("inset"),insetX:ae.spaceT(["left","right"]),insetInline:ae.spaceT("insetInline"),insetY:ae.spaceT(["top","bottom"]),insetBlock:ae.spaceT("insetBlock"),top:ae.spaceT("top"),insetBlockStart:ae.spaceT("insetBlockStart"),bottom:ae.spaceT("bottom"),insetBlockEnd:ae.spaceT("insetBlockEnd"),left:ae.spaceT("left"),insetInlineStart:ae.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:ae.spaceT("right"),insetInlineEnd:ae.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Cm,{insetStart:Cm.insetInlineStart,insetEnd:Cm.insetInlineEnd});var yZ={ring:{transform:rn.ring},ringColor:ae.colors("--chakra-ring-color"),ringOffset:ae.prop("--chakra-ring-offset-width"),ringOffsetColor:ae.colors("--chakra-ring-offset-color"),ringInset:ae.prop("--chakra-ring-inset")},Xn={margin:ae.spaceT("margin"),marginTop:ae.spaceT("marginTop"),marginBlockStart:ae.spaceT("marginBlockStart"),marginRight:ae.spaceT("marginRight"),marginInlineEnd:ae.spaceT("marginInlineEnd"),marginBottom:ae.spaceT("marginBottom"),marginBlockEnd:ae.spaceT("marginBlockEnd"),marginLeft:ae.spaceT("marginLeft"),marginInlineStart:ae.spaceT("marginInlineStart"),marginX:ae.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:ae.spaceT("marginInline"),marginY:ae.spaceT(["marginTop","marginBottom"]),marginBlock:ae.spaceT("marginBlock"),padding:ae.space("padding"),paddingTop:ae.space("paddingTop"),paddingBlockStart:ae.space("paddingBlockStart"),paddingRight:ae.space("paddingRight"),paddingBottom:ae.space("paddingBottom"),paddingBlockEnd:ae.space("paddingBlockEnd"),paddingLeft:ae.space("paddingLeft"),paddingInlineStart:ae.space("paddingInlineStart"),paddingInlineEnd:ae.space("paddingInlineEnd"),paddingX:ae.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:ae.space("paddingInline"),paddingY:ae.space(["paddingTop","paddingBottom"]),paddingBlock:ae.space("paddingBlock")};Object.assign(Xn,{m:Xn.margin,mt:Xn.marginTop,mr:Xn.marginRight,me:Xn.marginInlineEnd,marginEnd:Xn.marginInlineEnd,mb:Xn.marginBottom,ml:Xn.marginLeft,ms:Xn.marginInlineStart,marginStart:Xn.marginInlineStart,mx:Xn.marginX,my:Xn.marginY,p:Xn.padding,pt:Xn.paddingTop,py:Xn.paddingY,px:Xn.paddingX,pb:Xn.paddingBottom,pl:Xn.paddingLeft,ps:Xn.paddingInlineStart,paddingStart:Xn.paddingInlineStart,pr:Xn.paddingRight,pe:Xn.paddingInlineEnd,paddingEnd:Xn.paddingInlineEnd});var SZ={textDecorationColor:ae.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:ae.shadows("textShadow")},bZ={clipPath:!0,transform:ae.propT("transform",rn.transform),transformOrigin:!0,translateX:ae.spaceT("--chakra-translate-x"),translateY:ae.spaceT("--chakra-translate-y"),skewX:ae.degreeT("--chakra-skew-x"),skewY:ae.degreeT("--chakra-skew-y"),scaleX:ae.prop("--chakra-scale-x"),scaleY:ae.prop("--chakra-scale-y"),scale:ae.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:ae.degreeT("--chakra-rotate")},xZ={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:ae.prop("transitionDuration","transition.duration"),transitionProperty:ae.prop("transitionProperty","transition.property"),transitionTimingFunction:ae.prop("transitionTimingFunction","transition.easing")},wZ={fontFamily:ae.prop("fontFamily","fonts"),fontSize:ae.prop("fontSize","fontSizes",rn.px),fontWeight:ae.prop("fontWeight","fontWeights"),lineHeight:ae.prop("lineHeight","lineHeights"),letterSpacing:ae.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},CZ={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:ae.spaceT("scrollMargin"),scrollMarginTop:ae.spaceT("scrollMarginTop"),scrollMarginBottom:ae.spaceT("scrollMarginBottom"),scrollMarginLeft:ae.spaceT("scrollMarginLeft"),scrollMarginRight:ae.spaceT("scrollMarginRight"),scrollMarginX:ae.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:ae.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:ae.spaceT("scrollPadding"),scrollPaddingTop:ae.spaceT("scrollPaddingTop"),scrollPaddingBottom:ae.spaceT("scrollPaddingBottom"),scrollPaddingLeft:ae.spaceT("scrollPaddingLeft"),scrollPaddingRight:ae.spaceT("scrollPaddingRight"),scrollPaddingX:ae.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:ae.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function GR(e){return xs(e)&&e.reference?e.reference:String(e)}var D5=(e,...t)=>t.map(GR).join(` ${e} `).replace(/calc/g,""),EP=(...e)=>`calc(${D5("+",...e)})`,PP=(...e)=>`calc(${D5("-",...e)})`,O6=(...e)=>`calc(${D5("*",...e)})`,TP=(...e)=>`calc(${D5("/",...e)})`,AP=e=>{const t=GR(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:O6(t,-1)},Cf=Object.assign(e=>({add:(...t)=>Cf(EP(e,...t)),subtract:(...t)=>Cf(PP(e,...t)),multiply:(...t)=>Cf(O6(e,...t)),divide:(...t)=>Cf(TP(e,...t)),negate:()=>Cf(AP(e)),toString:()=>e.toString()}),{add:EP,subtract:PP,multiply:O6,divide:TP,negate:AP});function _Z(e,t="-"){return e.replace(/\s+/g,t)}function kZ(e){const t=_Z(e.toString());return PZ(EZ(t))}function EZ(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function PZ(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function TZ(e,t=""){return[t,e].filter(Boolean).join("-")}function AZ(e,t){return`var(${e}${t?`, ${t}`:""})`}function LZ(e,t=""){return kZ(`--${TZ(e,t)}`)}function Jr(e,t,n){const r=LZ(e,n);return{variable:r,reference:AZ(r,t)}}function MZ(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function OZ(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function I6(e){if(e==null)return e;const{unitless:t}=OZ(e);return t||typeof e=="number"?`${e}px`:e}var jR=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,P7=e=>Object.fromEntries(Object.entries(e).sort(jR));function LP(e){const t=P7(e);return Object.assign(Object.values(t),t)}function IZ(e){const t=Object.keys(P7(e));return new Set(t)}function MP(e){if(!e)return e;e=I6(e)??e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,n=>`${parseFloat(n)+t}`)}function em(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${I6(e)})`),t&&n.push("and",`(max-width: ${I6(t)})`),n.join(" ")}function RZ(e){if(!e)return null;e.base=e.base??"0px";const t=LP(e),n=Object.entries(e).sort(jR).map(([o,a],s,l)=>{let[,u]=l[s+1]??[];return u=parseFloat(u)>0?MP(u):void 0,{_minW:MP(a),breakpoint:o,minW:a,maxW:u,maxWQuery:em(null,u),minWQuery:em(a),minMaxQuery:em(a,u)}}),r=IZ(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(o){const a=Object.keys(o);return a.length>0&&a.every(s=>r.has(s))},asObject:P7(e),asArray:LP(e),details:n,media:[null,...t.map(o=>em(o)).slice(1)],toArrayValue(o){if(!xs(o))throw new Error("toArrayValue: value must be an object");const a=i.map(s=>o[s]??null);for(;MZ(a)===null;)a.pop();return a},toObjectValue(o){if(!Array.isArray(o))throw new Error("toObjectValue: value must be an array");return o.reduce((a,s,l)=>{const u=i[l];return u!=null&&s!=null&&(a[u]=s),a},{})}}}var wi={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},bc=e=>YR(t=>e(t,"&"),"[role=group]","[data-group]",".group"),tu=e=>YR(t=>e(t,"~ &"),"[data-peer]",".peer"),YR=(e,...t)=>t.map(e).join(", "),z5={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:bc(wi.hover),_peerHover:tu(wi.hover),_groupFocus:bc(wi.focus),_peerFocus:tu(wi.focus),_groupFocusVisible:bc(wi.focusVisible),_peerFocusVisible:tu(wi.focusVisible),_groupActive:bc(wi.active),_peerActive:tu(wi.active),_groupDisabled:bc(wi.disabled),_peerDisabled:tu(wi.disabled),_groupInvalid:bc(wi.invalid),_peerInvalid:tu(wi.invalid),_groupChecked:bc(wi.checked),_peerChecked:tu(wi.checked),_groupFocusWithin:bc(wi.focusWithin),_peerFocusWithin:tu(wi.focusWithin),_peerPlaceholderShown:tu(wi.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},NZ=Object.keys(z5);function OP(e,t){return Jr(String(e).replace(/\./g,"-"),void 0,t)}function DZ(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:u}=OP(i,t?.cssVarPrefix);if(!a){if(i.startsWith("space")){const m=i.split("."),[v,...S]=m,w=`${v}.-${S.join(".")}`,E=Cf.negate(s),P=Cf.negate(u);r[w]={value:E,var:l,varRef:P}}n[l]=s,r[i]={value:s,var:l,varRef:u};continue}const h=m=>{const S=[String(i).split(".")[0],m].join(".");if(!e[S])return m;const{reference:E}=OP(S,t?.cssVarPrefix);return E},p=xs(s)?s:{default:s};n=vl(n,Object.entries(p).reduce((m,[v,S])=>{var w;const E=h(S);if(v==="default")return m[l]=E,m;const P=((w=z5)==null?void 0:w[v])??v;return m[P]={[l]:E},m},{})),r[i]={value:u,var:l,varRef:u}}return{cssVars:n,cssMap:r}}function zZ(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function BZ(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var FZ=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function $Z(e){return BZ(e,FZ)}function HZ(e){return e.semanticTokens}function WZ(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function VZ({tokens:e,semanticTokens:t}){const n=Object.entries(R6(e)??{}).map(([i,o])=>[i,{isSemantic:!1,value:o}]),r=Object.entries(R6(t,1)??{}).map(([i,o])=>[i,{isSemantic:!0,value:o}]);return Object.fromEntries([...n,...r])}function R6(e,t=1/0){return!xs(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(xs(i)||Array.isArray(i)?Object.entries(R6(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function UZ(e){var t;const n=WZ(e),r=$Z(n),i=HZ(n),o=VZ({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=DZ(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:RZ(n.breakpoints)}),n}var T7=vl({},C3,fn,lZ,_4,Pa,uZ,yZ,cZ,UR,vZ,Cm,M6,Xn,CZ,wZ,SZ,bZ,dZ,xZ),GZ=Object.assign({},Xn,Pa,_4,UR,Cm),jZ=Object.keys(GZ),YZ=[...Object.keys(T7),...NZ],qZ={...T7,...z5},KZ=e=>e in qZ,XZ=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=Lf(e[a],t);if(s==null)continue;if(s=xs(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let u=0;ue.startsWith("--")&&typeof t=="string"&&!QZ(t),eQ=(e,t)=>{if(t==null)return t;const n=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.varRef},r=a=>n(a)??a,[i,o]=ZZ(t);return t=n(i)??r(o)??r(t),t};function tQ(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var s;const l=Lf(o,r),u=XZ(l)(r);let h={};for(let p in u){const m=u[p];let v=Lf(m,r);p in n&&(p=n[p]),JZ(p,v)&&(v=eQ(r,v));let S=t[p];if(S===!0&&(S={property:p}),xs(v)){h[p]=h[p]??{},h[p]=vl({},h[p],i(v,!0));continue}let w=((s=S?.transform)==null?void 0:s.call(S,v,r,l))??v;w=S?.processResult?i(w,!0):w;const E=Lf(S?.property,r);if(!a&&S?.static){const P=Lf(S.static,r);h=vl({},h,P)}if(E&&Array.isArray(E)){for(const P of E)h[P]=w;continue}if(E){E==="&"&&xs(w)?h=vl({},h,w):h[E]=w;continue}if(xs(w)){h=vl({},h,w);continue}h[p]=w}return h};return i}var qR=e=>t=>tQ({theme:t,pseudos:z5,configs:T7})(e);function rr(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function nQ(e,t){if(Array.isArray(e))return e;if(xs(e))return t(e);if(e!=null)return[e]}function rQ(e,t){for(let n=t+1;n{vl(u,{[T]:m?k[T]:{[P]:k[T]}})});continue}if(!v){m?vl(u,k):u[P]=k;continue}u[P]=k}}return u}}function oQ(e){return t=>{const{variant:n,size:r,theme:i}=t,o=iQ(i);return vl({},Lf(e.baseStyle??{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function aQ(e,t,n){var r,i;return((i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)??n}function gn(e){return zZ(e,["styleConfig","size","variant","colorScheme"])}function sQ(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ei(e1,--Io):0,z0--,$r===10&&(z0=1,F5--),$r}function aa(){return $r=Io2||uv($r)>3?"":" "}function SQ(e,t){for(;--t&&aa()&&!($r<48||$r>102||$r>57&&$r<65||$r>70&&$r<97););return Fv(e,_3()+(t<6&&xl()==32&&aa()==32))}function D6(e){for(;aa();)switch($r){case e:return Io;case 34:case 39:e!==34&&e!==39&&D6($r);break;case 40:e===41&&D6(e);break;case 92:aa();break}return Io}function bQ(e,t){for(;aa()&&e+$r!==47+10;)if(e+$r===42+42&&xl()===47)break;return"/*"+Fv(t,Io-1)+"*"+B5(e===47?e:aa())}function xQ(e){for(;!uv(xl());)aa();return Fv(e,Io)}function wQ(e){return eN(E3("",null,null,null,[""],e=JR(e),0,[0],e))}function E3(e,t,n,r,i,o,a,s,l){for(var u=0,h=0,p=a,m=0,v=0,S=0,w=1,E=1,P=1,k=0,T="",M=i,I=o,R=r,N=T;E;)switch(S=k,k=aa()){case 40:if(S!=108&&Ei(N,p-1)==58){N6(N+=bn(k3(k),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:N+=k3(k);break;case 9:case 10:case 13:case 32:N+=yQ(S);break;case 92:N+=SQ(_3()-1,7);continue;case 47:switch(xl()){case 42:case 47:yy(CQ(bQ(aa(),_3()),t,n),l);break;default:N+="/"}break;case 123*w:s[u++]=cl(N)*P;case 125*w:case 59:case 0:switch(k){case 0:case 125:E=0;case 59+h:v>0&&cl(N)-p&&yy(v>32?RP(N+";",r,n,p-1):RP(bn(N," ","")+";",r,n,p-2),l);break;case 59:N+=";";default:if(yy(R=IP(N,t,n,u,h,i,s,T,M=[],I=[],p),o),k===123)if(h===0)E3(N,t,R,R,M,o,p,s,I);else switch(m===99&&Ei(N,3)===110?100:m){case 100:case 109:case 115:E3(e,R,R,r&&yy(IP(e,R,R,0,0,i,s,T,i,M=[],p),I),i,I,p,s,r?M:I);break;default:E3(N,R,R,R,[""],I,0,s,I)}}u=h=v=0,w=P=1,T=N="",p=a;break;case 58:p=1+cl(N),v=S;default:if(w<1){if(k==123)--w;else if(k==125&&w++==0&&vQ()==125)continue}switch(N+=B5(k),k*w){case 38:P=h>0?1:(N+="\f",-1);break;case 44:s[u++]=(cl(N)-1)*P,P=1;break;case 64:xl()===45&&(N+=k3(aa())),m=xl(),h=p=cl(T=N+=xQ(_3())),k++;break;case 45:S===45&&cl(N)==2&&(w=0)}}return o}function IP(e,t,n,r,i,o,a,s,l,u,h){for(var p=i-1,m=i===0?o:[""],v=M7(m),S=0,w=0,E=0;S0?m[P]+" "+k:bn(k,/&\f/g,m[P])))&&(l[E++]=T);return $5(e,t,n,i===0?A7:s,l,u,h)}function CQ(e,t,n){return $5(e,t,n,KR,B5(mQ()),lv(e,2,-2),0)}function RP(e,t,n,r){return $5(e,t,n,L7,lv(e,0,r),lv(e,r+1,-1),r)}function u0(e,t){for(var n="",r=M7(e),i=0;i6)switch(Ei(e,t+1)){case 109:if(Ei(e,t+4)!==45)break;case 102:return bn(e,/(.+:)(.+)-([^]+)/,"$1"+hn+"$2-$3$1"+k4+(Ei(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~N6(e,"stretch")?nN(bn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ei(e,t+1)!==115)break;case 6444:switch(Ei(e,cl(e)-3-(~N6(e,"!important")&&10))){case 107:return bn(e,":",":"+hn)+e;case 101:return bn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+hn+(Ei(e,14)===45?"inline-":"")+"box$3$1"+hn+"$2$3$1"+Fi+"$2box$3")+e}break;case 5936:switch(Ei(e,t+11)){case 114:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return hn+e+Fi+bn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return hn+e+Fi+e+e}return e}var OQ=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case L7:t.return=nN(t.value,t.length);break;case XR:return u0([Lg(t,{value:bn(t.value,"@","@"+hn)})],i);case A7:if(t.length)return gQ(t.props,function(o){switch(pQ(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return u0([Lg(t,{props:[bn(o,/:(read-\w+)/,":"+k4+"$1")]})],i);case"::placeholder":return u0([Lg(t,{props:[bn(o,/:(plac\w+)/,":"+hn+"input-$1")]}),Lg(t,{props:[bn(o,/:(plac\w+)/,":"+k4+"$1")]}),Lg(t,{props:[bn(o,/:(plac\w+)/,Fi+"input-$1")]})],i)}return""})}},IQ=[OQ],rN=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(w){var E=w.getAttribute("data-emotion");E.indexOf(" ")!==-1&&(document.head.appendChild(w),w.setAttribute("data-s",""))})}var i=t.stylisPlugins||IQ,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(w){for(var E=w.getAttribute("data-emotion").split(" "),P=1;P=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var UQ={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},GQ=/[A-Z]|^ms/g,jQ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,cN=function(t){return t.charCodeAt(1)===45},zP=function(t){return t!=null&&typeof t!="boolean"},mx=tN(function(e){return cN(e)?e:e.replace(GQ,"-$&").toLowerCase()}),BP=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jQ,function(r,i,o){return dl={name:i,styles:o,next:dl},i})}return UQ[t]!==1&&!cN(t)&&typeof n=="number"&&n!==0?n+"px":n};function cv(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return dl={name:n.name,styles:n.styles,next:dl},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)dl={name:r.name,styles:r.styles,next:dl},r=r.next;var i=n.styles+";";return i}return YQ(e,t,n)}case"function":{if(e!==void 0){var o=dl,a=n(e);return dl=o,cv(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function YQ(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i{t.includes(r)||(n[r]=e[r])}),n}function cJ(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},vN=dJ(cJ);function yN(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var SN=e=>yN(e,t=>t!=null);function fJ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var hJ=fJ();function bN(e,...t){return lJ(e)?e(...t):e}function pJ(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}Object.freeze(["base","sm","md","lg","xl","2xl"]);function gJ(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=C.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=C.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var mJ=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,vJ=tN(function(e){return mJ.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),yJ=vJ,SJ=function(t){return t!=="theme"},WP=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?yJ:SJ},VP=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},bJ=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return lN(n,r,i),KQ(function(){return uN(n,r,i)}),null},xJ=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=VP(t,n,r),l=s||WP(i),u=!l("as");return function(){var h=arguments,p=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&p.push("label:"+o+";"),h[0]==null||h[0].raw===void 0)p.push.apply(p,h);else{p.push(h[0][0]);for(var m=h.length,v=1;v[p,m.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([p,m])=>[p,m.className]))}function l(h){const v=`chakra-${(["container","root"].includes(h??"")?[e]:[e,h]).filter(Boolean).join("__")}`;return{className:v,selector:`.${v}`,toString:()=>h}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var CJ=Ln("accordion").parts("root","container","button","panel").extend("icon"),_J=Ln("alert").parts("title","description","container").extend("icon","spinner"),kJ=Ln("avatar").parts("label","badge","container").extend("excessLabel","group"),EJ=Ln("breadcrumb").parts("link","item","container").extend("separator");Ln("button").parts();var PJ=Ln("checkbox").parts("control","icon","container").extend("label");Ln("progress").parts("track","filledTrack").extend("label");var TJ=Ln("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),AJ=Ln("editable").parts("preview","input","textarea"),LJ=Ln("form").parts("container","requiredIndicator","helperText"),MJ=Ln("formError").parts("text","icon"),OJ=Ln("input").parts("addon","field","element"),IJ=Ln("list").parts("container","item","icon"),RJ=Ln("menu").parts("button","list","item").extend("groupTitle","command","divider"),NJ=Ln("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),DJ=Ln("numberinput").parts("root","field","stepperGroup","stepper");Ln("pininput").parts("field");var zJ=Ln("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),BJ=Ln("progress").parts("label","filledTrack","track"),FJ=Ln("radio").parts("container","control","label"),$J=Ln("select").parts("field","icon"),HJ=Ln("slider").parts("container","track","thumb","filledTrack","mark"),WJ=Ln("stat").parts("container","label","helpText","number","icon"),VJ=Ln("switch").parts("container","track","thumb"),UJ=Ln("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),GJ=Ln("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),jJ=Ln("tag").parts("container","label","closeButton");function Ai(e,t){YJ(e)&&(e="100%");var n=qJ(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Sy(e){return Math.min(1,Math.max(0,e))}function YJ(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function qJ(e){return typeof e=="string"&&e.indexOf("%")!==-1}function xN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function by(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Mf(e){return e.length===1?"0"+e:String(e)}function KJ(e,t,n){return{r:Ai(e,255)*255,g:Ai(t,255)*255,b:Ai(n,255)*255}}function UP(e,t,n){e=Ai(e,255),t=Ai(t,255),n=Ai(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function XJ(e,t,n){var r,i,o;if(e=Ai(e,360),t=Ai(t,100),n=Ai(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=vx(s,a,e+1/3),i=vx(s,a,e),o=vx(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function GP(e,t,n){e=Ai(e,255),t=Ai(t,255),n=Ai(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t>16,g:(e&65280)>>8,b:e&255}}var $6={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function tee(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=iee(e)),typeof e=="object"&&(nu(e.r)&&nu(e.g)&&nu(e.b)?(t=KJ(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):nu(e.h)&&nu(e.s)&&nu(e.v)?(r=by(e.s),i=by(e.v),t=ZJ(e.h,r,i),a=!0,s="hsv"):nu(e.h)&&nu(e.s)&&nu(e.l)&&(r=by(e.s),o=by(e.l),t=XJ(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=xN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var nee="[-\\+]?\\d+%?",ree="[-\\+]?\\d*\\.\\d+%?",Dc="(?:".concat(ree,")|(?:").concat(nee,")"),yx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),Sx="[\\s|\\(]+(".concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")[,|\\s]+(").concat(Dc,")\\s*\\)?"),cs={CSS_UNIT:new RegExp(Dc),rgb:new RegExp("rgb"+yx),rgba:new RegExp("rgba"+Sx),hsl:new RegExp("hsl"+yx),hsla:new RegExp("hsla"+Sx),hsv:new RegExp("hsv"+yx),hsva:new RegExp("hsva"+Sx),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function iee(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if($6[e])e=$6[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=cs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=cs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=cs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=cs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=cs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=cs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=cs.hex8.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),a:YP(n[4]),format:t?"name":"hex8"}:(n=cs.hex6.exec(e),n?{r:Jo(n[1]),g:Jo(n[2]),b:Jo(n[3]),format:t?"name":"hex"}:(n=cs.hex4.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),a:YP(n[4]+n[4]),format:t?"name":"hex8"}:(n=cs.hex3.exec(e),n?{r:Jo(n[1]+n[1]),g:Jo(n[2]+n[2]),b:Jo(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function nu(e){return Boolean(cs.CSS_UNIT.exec(String(e)))}var $v=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=eee(t)),this.originalInput=t;var i=tee(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=xN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var t=GP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=GP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=UP(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=UP(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),jP(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),QJ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Ai(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Ai(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+jP(this.r,this.g,this.b,!1),n=0,r=Object.entries($6);n=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Sy(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Sy(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Sy(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Sy(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;an.length;)e.count=null,e.seed&&(e.seed+=1),n.push(wN(e));return e.count=t,n}var r=oee(e.hue,e.seed),i=aee(r,e),o=see(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new $v(a)}function oee(e,t){var n=uee(e),r=E4(n,t);return r<0&&(r=360+r),r}function aee(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return E4([0,100],t.seed);var n=CN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return E4([r,i],t.seed)}function see(e,t,n){var r=lee(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return E4([r,i],n.seed)}function lee(e,t){for(var n=CN(e).lowerBounds,r=0;r=i&&t<=a){var l=(s-o)/(a-i),u=o-l*i;return l*t+u}}return 0}function uee(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=kN.find(function(a){return a.name===e});if(n){var r=_N(n);if(r.hueRange)return r.hueRange}var i=new $v(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function CN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=kN;t=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function E4(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function _N(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var kN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function cee(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;rObject.keys(e).length===0,Pi=(e,t,n)=>{const r=cee(e,`colors.${t}`,t),{isValid:i}=new $v(r);return i?r:n},fee=e=>t=>{const n=Pi(t,e);return new $v(n).isDark()?"dark":"light"},hee=e=>t=>fee(e)(t)==="dark",B0=(e,t)=>n=>{const r=Pi(n,e);return new $v(r).setAlpha(t).toRgbString()};function qP(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient( - 45deg, - ${t} 25%, - transparent 25%, - transparent 50%, - ${t} 50%, - ${t} 75%, - transparent 75%, - transparent - )`,backgroundSize:`${e} ${e}`}}function pee(e){const t=wN().toHexString();return!e||dee(e)?t:e.string&&e.colors?mee(e.string,e.colors):e.string&&!e.colors?gee(e.string):e.colors&&!e.string?vee(e.colors):t}function gee(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function mee(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;rn.colorMode==="dark"?t:e}function z7(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function yee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function EN(e){return yee(e)&&e.reference?e.reference:String(e)}var J5=(e,...t)=>t.map(EN).join(` ${e} `).replace(/calc/g,""),KP=(...e)=>`calc(${J5("+",...e)})`,XP=(...e)=>`calc(${J5("-",...e)})`,H6=(...e)=>`calc(${J5("*",...e)})`,ZP=(...e)=>`calc(${J5("/",...e)})`,QP=e=>{const t=EN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:H6(t,-1)},lu=Object.assign(e=>({add:(...t)=>lu(KP(e,...t)),subtract:(...t)=>lu(XP(e,...t)),multiply:(...t)=>lu(H6(e,...t)),divide:(...t)=>lu(ZP(e,...t)),negate:()=>lu(QP(e)),toString:()=>e.toString()}),{add:KP,subtract:XP,multiply:H6,divide:ZP,negate:QP});function See(e){return!Number.isInteger(parseFloat(e.toString()))}function bee(e,t="-"){return e.replace(/\s+/g,t)}function PN(e){const t=bee(e.toString());return t.includes("\\.")?e:See(e)?t.replace(".","\\."):e}function xee(e,t=""){return[t,PN(e)].filter(Boolean).join("-")}function wee(e,t){return`var(${PN(e)}${t?`, ${t}`:""})`}function Cee(e,t=""){return`--${xee(e,t)}`}function Vi(e,t){const n=Cee(e,t?.prefix);return{variable:n,reference:wee(n,_ee(t?.fallback))}}function _ee(e){return typeof e=="string"?e:e?.reference}var{definePartsStyle:kee,defineMultiStyleConfig:Eee}=rr(CJ.keys),Pee={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Tee={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Aee={pt:"2",px:"4",pb:"5"},Lee={fontSize:"1.25em"},Mee=kee({container:Pee,button:Tee,panel:Aee,icon:Lee}),Oee=Eee({baseStyle:Mee}),{definePartsStyle:Hv,defineMultiStyleConfig:Iee}=rr(_J.keys),sa=Jr("alert-fg"),Su=Jr("alert-bg"),Ree=Hv({container:{bg:Su.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:sa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:sa.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function B7(e){const{theme:t,colorScheme:n}=e,r=B0(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Nee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark}}}}),Dee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:sa.reference}}}),zee=Hv(e=>{const{colorScheme:t}=e,n=B7(e);return{container:{[sa.variable]:`colors.${t}.500`,[Su.variable]:n.light,_dark:{[sa.variable]:`colors.${t}.200`,[Su.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:sa.reference}}}),Bee=Hv(e=>{const{colorScheme:t}=e;return{container:{[sa.variable]:"colors.white",[Su.variable]:`colors.${t}.500`,_dark:{[sa.variable]:"colors.gray.900",[Su.variable]:`colors.${t}.200`},color:sa.reference}}}),Fee={subtle:Nee,"left-accent":Dee,"top-accent":zee,solid:Bee},$ee=Iee({baseStyle:Ree,variants:Fee,defaultProps:{variant:"subtle",colorScheme:"blue"}}),TN={px:"1px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},Hee={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},Wee={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},Vee={...TN,...Hee,container:Wee},AN=Vee,Uee=e=>typeof e=="function";function di(e,...t){return Uee(e)?e(...t):e}var{definePartsStyle:LN,defineMultiStyleConfig:Gee}=rr(kJ.keys),c0=Jr("avatar-border-color"),bx=Jr("avatar-bg"),jee={borderRadius:"full",border:"0.2em solid",[c0.variable]:"white",_dark:{[c0.variable]:"colors.gray.800"},borderColor:c0.reference},Yee={[bx.variable]:"colors.gray.200",_dark:{[bx.variable]:"colors.whiteAlpha.400"},bgColor:bx.reference},JP=Jr("avatar-background"),qee=e=>{const{name:t,theme:n}=e,r=t?pee({string:t}):"colors.gray.400",i=hee(r)(n);let o="white";return i||(o="gray.800"),{bg:JP.reference,"&:not([data-loaded])":{[JP.variable]:r},color:o,[c0.variable]:"colors.white",_dark:{[c0.variable]:"colors.gray.800"},borderColor:c0.reference,verticalAlign:"top"}},Kee=LN(e=>({badge:di(jee,e),excessLabel:di(Yee,e),container:di(qee,e)}));function xc(e){const t=e!=="100%"?AN[e]:void 0;return LN({container:{width:e,height:e,fontSize:`calc(${t??e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t??e} / 2.5)`,lineHeight:e!=="100%"?t??e:void 0}})}var Xee={"2xs":xc(4),xs:xc(6),sm:xc(8),md:xc(12),lg:xc(16),xl:xc(24),"2xl":xc(32),full:xc("100%")},Zee=Gee({baseStyle:Kee,sizes:Xee,defaultProps:{size:"md"}}),Qee={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},d0=Jr("badge-bg"),yl=Jr("badge-color"),Jee=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.500`,.6)(n);return{[d0.variable]:`colors.${t}.500`,[yl.variable]:"colors.white",_dark:{[d0.variable]:r,[yl.variable]:"colors.whiteAlpha.800"},bg:d0.reference,color:yl.reference}},ete=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.200`,.16)(n);return{[d0.variable]:`colors.${t}.100`,[yl.variable]:`colors.${t}.800`,_dark:{[d0.variable]:r,[yl.variable]:`colors.${t}.200`},bg:d0.reference,color:yl.reference}},tte=e=>{const{colorScheme:t,theme:n}=e,r=B0(`${t}.200`,.8)(n);return{[yl.variable]:`colors.${t}.500`,_dark:{[yl.variable]:r},color:yl.reference,boxShadow:`inset 0 0 0px 1px ${yl.reference}`}},nte={solid:Jee,subtle:ete,outline:tte},km={baseStyle:Qee,variants:nte,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:rte,definePartsStyle:ite}=rr(EJ.keys),ote={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},ate=ite({link:ote}),ste=rte({baseStyle:ate}),lte={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},MN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Ve("inherit","whiteAlpha.900")(e),_hover:{bg:Ve("gray.100","whiteAlpha.200")(e)},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)}};const r=B0(`${t}.200`,.12)(n),i=B0(`${t}.200`,.24)(n);return{color:Ve(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Ve(`${t}.50`,r)(e)},_active:{bg:Ve(`${t}.100`,i)(e)}}},ute=e=>{const{colorScheme:t}=e,n=Ve("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...di(MN,e)}},cte={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},dte=e=>{const{colorScheme:t}=e;if(t==="gray"){const s=Ve("gray.100","whiteAlpha.200")(e);return{bg:s,_hover:{bg:Ve("gray.200","whiteAlpha.300")(e),_disabled:{bg:s}},_active:{bg:Ve("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=cte[t]??{},a=Ve(n,`${t}.200`)(e);return{bg:a,color:Ve(r,"gray.800")(e),_hover:{bg:Ve(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:Ve(o,`${t}.400`)(e)}}},fte=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Ve(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Ve(`${t}.700`,`${t}.500`)(e)}}},hte={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},pte={ghost:MN,outline:ute,solid:dte,link:fte,unstyled:hte},gte={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},mte={baseStyle:lte,variants:pte,sizes:gte,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:P3,defineMultiStyleConfig:vte}=rr(PJ.keys),Em=Jr("checkbox-size"),yte=e=>{const{colorScheme:t}=e;return{w:Em.reference,h:Em.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e),_hover:{bg:Ve(`${t}.600`,`${t}.300`)(e),borderColor:Ve(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Ve("gray.200","transparent")(e),bg:Ve("gray.200","whiteAlpha.300")(e),color:Ve("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Ve(`${t}.500`,`${t}.200`)(e),borderColor:Ve(`${t}.500`,`${t}.200`)(e),color:Ve("white","gray.900")(e)},_disabled:{bg:Ve("gray.100","whiteAlpha.100")(e),borderColor:Ve("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Ve("red.500","red.300")(e)}}},Ste={_disabled:{cursor:"not-allowed"}},bte={userSelect:"none",_disabled:{opacity:.4}},xte={transitionProperty:"transform",transitionDuration:"normal"},wte=P3(e=>({icon:xte,container:Ste,control:di(yte,e),label:bte})),Cte={sm:P3({control:{[Em.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:P3({control:{[Em.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:P3({control:{[Em.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},P4=vte({baseStyle:wte,sizes:Cte,defaultProps:{size:"md",colorScheme:"blue"}}),Pm=Vi("close-button-size"),Mg=Vi("close-button-bg"),_te={w:[Pm.reference],h:[Pm.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[Mg.variable]:"colors.blackAlpha.100",_dark:{[Mg.variable]:"colors.whiteAlpha.100"}},_active:{[Mg.variable]:"colors.blackAlpha.200",_dark:{[Mg.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:Mg.reference},kte={lg:{[Pm.variable]:"sizes.10",fontSize:"md"},md:{[Pm.variable]:"sizes.8",fontSize:"xs"},sm:{[Pm.variable]:"sizes.6",fontSize:"2xs"}},Ete={baseStyle:_te,sizes:kte,defaultProps:{size:"md"}},{variants:Pte,defaultProps:Tte}=km,Ate={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},Lte={baseStyle:Ate,variants:Pte,defaultProps:Tte},Mte={w:"100%",mx:"auto",maxW:"prose",px:"4"},Ote={baseStyle:Mte},Ite={opacity:.6,borderColor:"inherit"},Rte={borderStyle:"solid"},Nte={borderStyle:"dashed"},Dte={solid:Rte,dashed:Nte},zte={baseStyle:Ite,variants:Dte,defaultProps:{variant:"solid"}},{definePartsStyle:W6,defineMultiStyleConfig:Bte}=rr(TJ.keys),xx=Jr("drawer-bg"),wx=Jr("drawer-box-shadow");function yp(e){return W6(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Fte={bg:"blackAlpha.600",zIndex:"overlay"},$te={display:"flex",zIndex:"modal",justifyContent:"center"},Hte=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[xx.variable]:"colors.white",[wx.variable]:"shadows.lg",_dark:{[xx.variable]:"colors.gray.700",[wx.variable]:"shadows.dark-lg"},bg:xx.reference,boxShadow:wx.reference}},Wte={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Vte={position:"absolute",top:"2",insetEnd:"3"},Ute={px:"6",py:"2",flex:"1",overflow:"auto"},Gte={px:"6",py:"4"},jte=W6(e=>({overlay:Fte,dialogContainer:$te,dialog:di(Hte,e),header:Wte,closeButton:Vte,body:Ute,footer:Gte})),Yte={xs:yp("xs"),sm:yp("md"),md:yp("lg"),lg:yp("2xl"),xl:yp("4xl"),full:yp("full")},qte=Bte({baseStyle:jte,sizes:Yte,defaultProps:{size:"xs"}}),{definePartsStyle:Kte,defineMultiStyleConfig:Xte}=rr(AJ.keys),Zte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Qte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Jte={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},ene=Kte({preview:Zte,input:Qte,textarea:Jte}),tne=Xte({baseStyle:ene}),{definePartsStyle:nne,defineMultiStyleConfig:rne}=rr(LJ.keys),f0=Jr("form-control-color"),ine={marginStart:"1",[f0.variable]:"colors.red.500",_dark:{[f0.variable]:"colors.red.300"},color:f0.reference},one={mt:"2",[f0.variable]:"colors.gray.600",_dark:{[f0.variable]:"colors.whiteAlpha.600"},color:f0.reference,lineHeight:"normal",fontSize:"sm"},ane=nne({container:{width:"100%",position:"relative"},requiredIndicator:ine,helperText:one}),sne=rne({baseStyle:ane}),{definePartsStyle:lne,defineMultiStyleConfig:une}=rr(MJ.keys),h0=Jr("form-error-color"),cne={[h0.variable]:"colors.red.500",_dark:{[h0.variable]:"colors.red.300"},color:h0.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},dne={marginEnd:"0.5em",[h0.variable]:"colors.red.500",_dark:{[h0.variable]:"colors.red.300"},color:h0.reference},fne=lne({text:cne,icon:dne}),hne=une({baseStyle:fne}),pne={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},gne={baseStyle:pne},mne={fontFamily:"heading",fontWeight:"bold"},vne={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},yne={baseStyle:mne,sizes:vne,defaultProps:{size:"xl"}},{definePartsStyle:du,defineMultiStyleConfig:Sne}=rr(OJ.keys),bne=du({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),wc={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},xne={lg:du({field:wc.lg,addon:wc.lg}),md:du({field:wc.md,addon:wc.md}),sm:du({field:wc.sm,addon:wc.sm}),xs:du({field:wc.xs,addon:wc.xs})};function F7(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Ve("blue.500","blue.300")(e),errorBorderColor:n||Ve("red.500","red.300")(e)}}var wne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Ve("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Pi(t,r),boxShadow:`0 0 0 1px ${Pi(t,r)}`},_focusVisible:{zIndex:1,borderColor:Pi(t,n),boxShadow:`0 0 0 1px ${Pi(t,n)}`}},addon:{border:"1px solid",borderColor:Ve("inherit","whiteAlpha.50")(e),bg:Ve("gray.100","whiteAlpha.300")(e)}}}),Cne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e),_hover:{bg:Ve("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Pi(t,r)},_focusVisible:{bg:"transparent",borderColor:Pi(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Ve("gray.100","whiteAlpha.50")(e)}}}),_ne=du(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=F7(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Pi(t,r),boxShadow:`0px 1px 0px 0px ${Pi(t,r)}`},_focusVisible:{borderColor:Pi(t,n),boxShadow:`0px 1px 0px 0px ${Pi(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),kne=du({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),Ene={outline:wne,filled:Cne,flushed:_ne,unstyled:kne},pn=Sne({baseStyle:bne,sizes:xne,variants:Ene,defaultProps:{size:"md",variant:"outline"}}),Pne=e=>({bg:Ve("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),Tne={baseStyle:Pne},Ane={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},Lne={baseStyle:Ane},{defineMultiStyleConfig:Mne,definePartsStyle:One}=rr(IJ.keys),Ine={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},Rne=One({icon:Ine}),Nne=Mne({baseStyle:Rne}),{defineMultiStyleConfig:Dne,definePartsStyle:zne}=rr(RJ.keys),Bne=e=>({bg:Ve("#fff","gray.700")(e),boxShadow:Ve("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Fne=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:Ve("gray.100","whiteAlpha.100")(e)},_active:{bg:Ve("gray.200","whiteAlpha.200")(e)},_expanded:{bg:Ve("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),$ne={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Hne={opacity:.6},Wne={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Vne={transitionProperty:"common",transitionDuration:"normal"},Une=zne(e=>({button:Vne,list:di(Bne,e),item:di(Fne,e),groupTitle:$ne,command:Hne,divider:Wne})),Gne=Dne({baseStyle:Une}),{defineMultiStyleConfig:jne,definePartsStyle:V6}=rr(NJ.keys),Yne={bg:"blackAlpha.600",zIndex:"modal"},qne=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Kne=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:Ve("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:Ve("lg","dark-lg")(e)}},Xne={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Zne={position:"absolute",top:"2",insetEnd:"3"},Qne=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},Jne={px:"6",py:"4"},ere=V6(e=>({overlay:Yne,dialogContainer:di(qne,e),dialog:di(Kne,e),header:Xne,closeButton:Zne,body:di(Qne,e),footer:Jne}));function ls(e){return V6(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var tre={xs:ls("xs"),sm:ls("sm"),md:ls("md"),lg:ls("lg"),xl:ls("xl"),"2xl":ls("2xl"),"3xl":ls("3xl"),"4xl":ls("4xl"),"5xl":ls("5xl"),"6xl":ls("6xl"),full:ls("full")},nre=jne({baseStyle:ere,sizes:tre,defaultProps:{size:"md"}}),rre={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},ON=rre,{defineMultiStyleConfig:ire,definePartsStyle:IN}=rr(DJ.keys),$7=Vi("number-input-stepper-width"),RN=Vi("number-input-input-padding"),ore=lu($7).add("0.5rem").toString(),are={[$7.variable]:"sizes.6",[RN.variable]:ore},sre=e=>{var t;return((t=di(pn.baseStyle,e))==null?void 0:t.field)??{}},lre={width:[$7.reference]},ure=e=>({borderStart:"1px solid",borderStartColor:Ve("inherit","whiteAlpha.300")(e),color:Ve("inherit","whiteAlpha.800")(e),_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),cre=IN(e=>({root:are,field:di(sre,e)??{},stepperGroup:lre,stepper:di(ure,e)??{}}));function xy(e){var t,n;const r=(t=pn.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=((n=r.field)==null?void 0:n.fontSize)??"md",a=ON.fontSizes[o];return IN({field:{...r.field,paddingInlineEnd:RN.reference,verticalAlign:"top"},stepper:{fontSize:lu(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var dre={xs:xy("xs"),sm:xy("sm"),md:xy("md"),lg:xy("lg")},fre=ire({baseStyle:cre,sizes:dre,variants:pn.variants,defaultProps:pn.defaultProps}),eT,hre={...(eT=pn.baseStyle)==null?void 0:eT.field,textAlign:"center"},pre={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},tT,gre={outline:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.outline,e))==null?void 0:n.field)??{}},flushed:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)??{}},filled:e=>{var t,n;return((n=di((t=pn.variants)==null?void 0:t.filled,e))==null?void 0:n.field)??{}},unstyled:((tT=pn.variants)==null?void 0:tT.unstyled.field)??{}},mre={baseStyle:hre,sizes:pre,variants:gre,defaultProps:pn.defaultProps},{defineMultiStyleConfig:vre,definePartsStyle:yre}=rr(zJ.keys),wy=Vi("popper-bg"),Sre=Vi("popper-arrow-bg"),nT=Vi("popper-arrow-shadow-color"),bre={zIndex:10},xre={[wy.variable]:"colors.white",bg:wy.reference,[Sre.variable]:wy.reference,[nT.variable]:"colors.gray.200",_dark:{[wy.variable]:"colors.gray.700",[nT.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},wre={px:3,py:2,borderBottomWidth:"1px"},Cre={px:3,py:2},_re={px:3,py:2,borderTopWidth:"1px"},kre={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},Ere=yre({popper:bre,content:xre,header:wre,body:Cre,footer:_re,closeButton:kre}),Pre=vre({baseStyle:Ere}),{defineMultiStyleConfig:Tre,definePartsStyle:tm}=rr(BJ.keys),Are=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Ve(qP(),qP("1rem","rgba(0,0,0,0.1)"))(e),a=Ve(`${t}.500`,`${t}.200`)(e),s=`linear-gradient( - to right, - transparent 0%, - ${Pi(n,a)} 50%, - transparent 100% - )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},Lre={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},Mre=e=>({bg:Ve("gray.100","whiteAlpha.300")(e)}),Ore=e=>({transitionProperty:"common",transitionDuration:"slow",...Are(e)}),Ire=tm(e=>({label:Lre,filledTrack:Ore(e),track:Mre(e)})),Rre={xs:tm({track:{h:"1"}}),sm:tm({track:{h:"2"}}),md:tm({track:{h:"3"}}),lg:tm({track:{h:"4"}})},Nre=Tre({sizes:Rre,baseStyle:Ire,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Dre,definePartsStyle:T3}=rr(FJ.keys),zre=e=>{var t;const n=(t=di(P4.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n?._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},Bre=T3(e=>{var t,n,r,i;return{label:(n=(t=P4).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=P4).baseStyle)==null?void 0:i.call(r,e).container,control:zre(e)}}),Fre={md:T3({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:T3({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:T3({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},$re=Dre({baseStyle:Bre,sizes:Fre,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Hre,definePartsStyle:Wre}=rr($J.keys),Vre=e=>{var t;return{...(t=pn.baseStyle)==null?void 0:t.field,bg:Ve("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:Ve("white","gray.700")(e)}}},Ure={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},Gre=Wre(e=>({field:Vre(e),icon:Ure})),Cy={paddingInlineEnd:"8"},rT,iT,oT,aT,sT,lT,uT,cT,jre={lg:{...(rT=pn.sizes)==null?void 0:rT.lg,field:{...(iT=pn.sizes)==null?void 0:iT.lg.field,...Cy}},md:{...(oT=pn.sizes)==null?void 0:oT.md,field:{...(aT=pn.sizes)==null?void 0:aT.md.field,...Cy}},sm:{...(sT=pn.sizes)==null?void 0:sT.sm,field:{...(lT=pn.sizes)==null?void 0:lT.sm.field,...Cy}},xs:{...(uT=pn.sizes)==null?void 0:uT.xs,field:{...(cT=pn.sizes)==null?void 0:cT.xs.field,...Cy},icon:{insetEnd:"1"}}},Yre=Hre({baseStyle:Gre,sizes:jre,variants:pn.variants,defaultProps:pn.defaultProps}),qre=Jr("skeleton-start-color"),Kre=Jr("skeleton-end-color"),Xre=e=>{const t=Ve("gray.100","gray.800")(e),n=Ve("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Pi(o,r),s=Pi(o,i);return{[qre.variable]:a,[Kre.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},Zre={baseStyle:Xre},Cx=Jr("skip-link-bg"),Qre={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[Cx.variable]:"colors.white",_dark:{[Cx.variable]:"colors.gray.700"},bg:Cx.reference}},Jre={baseStyle:Qre},{defineMultiStyleConfig:eie,definePartsStyle:eS}=rr(HJ.keys),hv=Jr("slider-thumb-size"),pv=Jr("slider-track-size"),Mc=Jr("slider-bg"),tie=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...z7({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},nie=e=>({...z7({orientation:e.orientation,horizontal:{h:pv.reference},vertical:{w:pv.reference}}),overflow:"hidden",borderRadius:"sm",[Mc.variable]:"colors.gray.200",_dark:{[Mc.variable]:"colors.whiteAlpha.200"},_disabled:{[Mc.variable]:"colors.gray.300",_dark:{[Mc.variable]:"colors.whiteAlpha.300"}},bg:Mc.reference}),rie=e=>{const{orientation:t}=e;return{...z7({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:hv.reference,h:hv.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},iie=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[Mc.variable]:`colors.${t}.500`,_dark:{[Mc.variable]:`colors.${t}.200`},bg:Mc.reference}},oie=eS(e=>({container:tie(e),track:nie(e),thumb:rie(e),filledTrack:iie(e)})),aie=eS({container:{[hv.variable]:"sizes.4",[pv.variable]:"sizes.1"}}),sie=eS({container:{[hv.variable]:"sizes.3.5",[pv.variable]:"sizes.1"}}),lie=eS({container:{[hv.variable]:"sizes.2.5",[pv.variable]:"sizes.0.5"}}),uie={lg:aie,md:sie,sm:lie},cie=eie({baseStyle:oie,sizes:uie,defaultProps:{size:"md",colorScheme:"blue"}}),_f=Vi("spinner-size"),die={width:[_f.reference],height:[_f.reference]},fie={xs:{[_f.variable]:"sizes.3"},sm:{[_f.variable]:"sizes.4"},md:{[_f.variable]:"sizes.6"},lg:{[_f.variable]:"sizes.8"},xl:{[_f.variable]:"sizes.12"}},hie={baseStyle:die,sizes:fie,defaultProps:{size:"md"}},{defineMultiStyleConfig:pie,definePartsStyle:NN}=rr(WJ.keys),gie={fontWeight:"medium"},mie={opacity:.8,marginBottom:"2"},vie={verticalAlign:"baseline",fontWeight:"semibold"},yie={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},Sie=NN({container:{},label:gie,helpText:mie,number:vie,icon:yie}),bie={md:NN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},xie=pie({baseStyle:Sie,sizes:bie,defaultProps:{size:"md"}}),{defineMultiStyleConfig:wie,definePartsStyle:A3}=rr(VJ.keys),Tm=Vi("switch-track-width"),$f=Vi("switch-track-height"),_x=Vi("switch-track-diff"),Cie=lu.subtract(Tm,$f),U6=Vi("switch-thumb-x"),Og=Vi("switch-bg"),_ie=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Tm.reference],height:[$f.reference],transitionProperty:"common",transitionDuration:"fast",[Og.variable]:"colors.gray.300",_dark:{[Og.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[Og.variable]:`colors.${t}.500`,_dark:{[Og.variable]:`colors.${t}.200`}},bg:Og.reference}},kie={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[$f.reference],height:[$f.reference],_checked:{transform:`translateX(${U6.reference})`}},Eie=A3(e=>({container:{[_x.variable]:Cie,[U6.variable]:_x.reference,_rtl:{[U6.variable]:lu(_x).negate().toString()}},track:_ie(e),thumb:kie})),Pie={sm:A3({container:{[Tm.variable]:"1.375rem",[$f.variable]:"sizes.3"}}),md:A3({container:{[Tm.variable]:"1.875rem",[$f.variable]:"sizes.4"}}),lg:A3({container:{[Tm.variable]:"2.875rem",[$f.variable]:"sizes.6"}})},Tie=wie({baseStyle:Eie,sizes:Pie,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:Aie,definePartsStyle:p0}=rr(UJ.keys),Lie=p0({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),T4={"&[data-is-numeric=true]":{textAlign:"end"}},Mie=p0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},caption:{color:Ve("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Oie=p0(e=>{const{colorScheme:t}=e;return{th:{color:Ve("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},td:{borderBottom:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e),...T4},caption:{color:Ve("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Ve(`${t}.100`,`${t}.700`)(e)},td:{background:Ve(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),Iie={simple:Mie,striped:Oie,unstyled:{}},Rie={sm:p0({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:p0({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:p0({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},Nie=Aie({baseStyle:Lie,variants:Iie,sizes:Rie,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:Die,definePartsStyle:wl}=rr(GJ.keys),zie=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Bie=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},Fie=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},$ie={p:4},Hie=wl(e=>({root:zie(e),tab:Bie(e),tablist:Fie(e),tabpanel:$ie})),Wie={sm:wl({tab:{py:1,px:4,fontSize:"sm"}}),md:wl({tab:{fontSize:"md",py:2,px:4}}),lg:wl({tab:{fontSize:"lg",py:3,px:4}})},Vie=wl(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:Ve("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),Uie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:Ve("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Gie=wl(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:Ve("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:Ve("#fff","gray.800")(e),color:Ve(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),jie=wl(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Pi(n,`${t}.700`),bg:Pi(n,`${t}.100`)}}}}),Yie=wl(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:Ve("gray.600","inherit")(e),_selected:{color:Ve("#fff","gray.800")(e),bg:Ve(`${t}.600`,`${t}.300`)(e)}}}}),qie=wl({}),Kie={line:Vie,enclosed:Uie,"enclosed-colored":Gie,"soft-rounded":jie,"solid-rounded":Yie,unstyled:qie},Xie=Die({baseStyle:Hie,sizes:Wie,variants:Kie,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Zie,definePartsStyle:Hf}=rr(jJ.keys),Qie={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Jie={lineHeight:1.2,overflow:"visible"},eoe={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},toe=Hf({container:Qie,label:Jie,closeButton:eoe}),noe={sm:Hf({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Hf({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:Hf({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},roe={subtle:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.subtle(e)}}),solid:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.solid(e)}}),outline:Hf(e=>{var t;return{container:(t=km.variants)==null?void 0:t.outline(e)}})},ioe=Zie({variants:roe,baseStyle:toe,sizes:noe,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),dT,ooe={...(dT=pn.baseStyle)==null?void 0:dT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},fT,aoe={outline:e=>{var t;return((t=pn.variants)==null?void 0:t.outline(e).field)??{}},flushed:e=>{var t;return((t=pn.variants)==null?void 0:t.flushed(e).field)??{}},filled:e=>{var t;return((t=pn.variants)==null?void 0:t.filled(e).field)??{}},unstyled:((fT=pn.variants)==null?void 0:fT.unstyled.field)??{}},hT,pT,gT,mT,soe={xs:((hT=pn.sizes)==null?void 0:hT.xs.field)??{},sm:((pT=pn.sizes)==null?void 0:pT.sm.field)??{},md:((gT=pn.sizes)==null?void 0:gT.md.field)??{},lg:((mT=pn.sizes)==null?void 0:mT.lg.field)??{}},loe={baseStyle:ooe,sizes:soe,variants:aoe,defaultProps:{size:"md",variant:"outline"}},_y=Vi("tooltip-bg"),kx=Vi("tooltip-fg"),uoe=Vi("popper-arrow-bg"),coe={bg:_y.reference,color:kx.reference,[_y.variable]:"colors.gray.700",[kx.variable]:"colors.whiteAlpha.900",_dark:{[_y.variable]:"colors.gray.300",[kx.variable]:"colors.gray.900"},[uoe.variable]:_y.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},doe={baseStyle:coe},foe={Accordion:Oee,Alert:$ee,Avatar:Zee,Badge:km,Breadcrumb:ste,Button:mte,Checkbox:P4,CloseButton:Ete,Code:Lte,Container:Ote,Divider:zte,Drawer:qte,Editable:tne,Form:sne,FormError:hne,FormLabel:gne,Heading:yne,Input:pn,Kbd:Tne,Link:Lne,List:Nne,Menu:Gne,Modal:nre,NumberInput:fre,PinInput:mre,Popover:Pre,Progress:Nre,Radio:$re,Select:Yre,Skeleton:Zre,SkipLink:Jre,Slider:cie,Spinner:hie,Stat:xie,Switch:Tie,Table:Nie,Tabs:Xie,Tag:ioe,Textarea:loe,Tooltip:doe},hoe={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},poe=hoe,goe={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},moe=goe,voe={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},yoe=voe,Soe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},boe=Soe,xoe={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},woe=xoe,Coe={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},_oe={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},koe={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Eoe={property:Coe,easing:_oe,duration:koe},Poe=Eoe,Toe={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},Aoe=Toe,Loe={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},Moe=Loe,Ooe={breakpoints:moe,zIndices:Aoe,radii:boe,blur:Moe,colors:yoe,...ON,sizes:AN,shadows:woe,space:TN,borders:poe,transition:Poe},Ioe={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},Roe={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}},Noe="ltr",Doe={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},zoe={semanticTokens:Ioe,direction:Noe,...Ooe,components:foe,styles:Roe,config:Doe},Boe=typeof Element<"u",Foe=typeof Map=="function",$oe=typeof Set=="function",Hoe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function L3(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!L3(e[r],t[r]))return!1;return!0}var o;if(Foe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!L3(r.value[1],t.get(r.value[0])))return!1;return!0}if($oe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(Hoe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(Boe&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!L3(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var Woe=function(t,n){try{return L3(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function t1(){const e=C.exports.useContext(dv);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `` or ``");return e}function DN(){const e=Bv(),t=t1();return{...e,theme:t}}function Voe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__breakpoints)==null?void 0:o.asArray)==null?void 0:a[i]};return r(t)??r(n)??n}function Uoe(e,t,n){if(t==null)return t;const r=i=>{var o,a;return(a=(o=e.__cssMap)==null?void 0:o[i])==null?void 0:a.value};return r(t)??r(n)??n}function Goe(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,u)=>{if(e==="breakpoints")return Voe(o,l,a[u]??l);const h=`${e}.${l}`;return Uoe(o,h,a[u]??l)});return Array.isArray(t)?s:s[0]}}function joe(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=C.exports.useMemo(()=>UZ(n),[n]);return ne(JQ,{theme:i,children:[x(Yoe,{root:t}),r]})}function Yoe({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return x(Z5,{styles:n=>({[t]:n.__cssVars})})}gJ({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `` "});function qoe(){const{colorMode:e}=Bv();return x(Z5,{styles:t=>{const n=vN(t,"styles.global"),r=bN(n,{theme:t,colorMode:e});return r?qR(r)(t):void 0}})}var Koe=new Set([...YZ,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Xoe=new Set(["htmlWidth","htmlHeight","htmlSize"]);function Zoe(e){return Xoe.has(e)||!Koe.has(e)}var Qoe=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=yN(a,(p,m)=>KZ(m)),l=bN(e,t),u=Object.assign({},i,l,SN(s),o),h=qR(u)(t.theme);return r?[h,r]:h};function Ex(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=Zoe);const i=Qoe({baseStyle:n}),o=F6(e,r)(i);return le.forwardRef(function(l,u){const{colorMode:h,forced:p}=Bv();return le.createElement(o,{ref:u,"data-theme":p?h:void 0,...l})})}function Pe(e){return C.exports.forwardRef(e)}function zN(e,t={}){const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=DN(),a=e?vN(i,`components.${e}`):void 0,s=n||a,l=vl({theme:i,colorMode:o},s?.defaultProps??{},SN(uJ(r,["children"]))),u=C.exports.useRef({});if(s){const p=oQ(s)(l);Woe(u.current,p)||(u.current=p)}return u.current}function so(e,t={}){return zN(e,t)}function Ii(e,t={}){return zN(e,t)}function Joe(){const e=new Map;return new Proxy(Ex,{apply(t,n,r){return Ex(...r)},get(t,n){return e.has(n)||e.set(n,Ex(n)),e.get(n)}})}var we=Joe();function eae(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function xn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=C.exports.createContext(void 0);a.displayName=t;function s(){var l;const u=C.exports.useContext(a);if(!u&&n){const h=new Error(o??eae(r,i));throw h.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,h,s),h}return u}return[a.Provider,s,a]}function tae(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function $n(...e){return t=>{e.forEach(n=>{tae(n,t)})}}function nae(...e){return C.exports.useMemo(()=>$n(...e),e)}function vT(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var rae=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function yT(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function ST(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var G6=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,A4=e=>e,iae=class{descendants=new Map;register=e=>{if(e!=null)return rae(e)?this.registerNode(e):t=>{this.registerNode(t,e)}};unregister=e=>{this.descendants.delete(e);const t=vT(Array.from(this.descendants.keys()));this.assignIndex(t)};destroy=()=>{this.descendants.clear()};assignIndex=e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})};count=()=>this.descendants.size;enabledCount=()=>this.enabledValues().length;values=()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index);enabledValues=()=>this.values().filter(e=>!e.disabled);item=e=>{if(this.count()!==0)return this.values()[e]};enabledItem=e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]};first=()=>this.item(0);firstEnabled=()=>this.enabledItem(0);last=()=>this.item(this.descendants.size-1);lastEnabled=()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)};indexOf=e=>{var t;return e?((t=this.descendants.get(e))==null?void 0:t.index)??-1:-1};enabledIndexOf=e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e));next=(e,t=!0)=>{const n=yT(e,this.count(),t);return this.item(n)};nextEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=yT(r,this.enabledCount(),t);return this.enabledItem(i)};prev=(e,t=!0)=>{const n=ST(e,this.count()-1,t);return this.item(n)};prevEnabled=(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=ST(r,this.enabledCount()-1,t);return this.enabledItem(i)};registerNode=(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=vT(n);t?.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)}};function oae(){const e=C.exports.useRef(new iae);return G6(()=>()=>e.current.destroy()),e.current}var[aae,BN]=xn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function sae(e){const t=BN(),[n,r]=C.exports.useState(-1),i=C.exports.useRef(null);G6(()=>()=>{!i.current||t.unregister(i.current)},[]),G6(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=A4(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:$n(o,i)}}function FN(){return[A4(aae),()=>A4(BN()),()=>oae(),i=>sae(i)]}var Ir=(...e)=>e.filter(Boolean).join(" "),bT={path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},ga=Pe((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...u}=e,h=Ir("chakra-icon",s),p={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},m={ref:t,focusable:o,className:h,__css:p},v=r??bT.viewBox;if(n&&typeof n!="string")return le.createElement(we.svg,{as:n,...m,...u});const S=a??bT.path;return le.createElement(we.svg,{verticalAlign:"middle",viewBox:v,...m,...u},S)});ga.displayName="Icon";function ut(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=C.exports.Children.toArray(e.path),a=Pe((s,l)=>x(ga,{ref:l,viewBox:t,...i,...s,children:o.length?o:x("path",{fill:"currentColor",d:n})}));return a.displayName=r,a}function cr(e,t=[]){const n=C.exports.useRef(e);return C.exports.useEffect(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function tS(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(m,v)=>m!==v}=e,o=cr(r),a=cr(i),[s,l]=C.exports.useState(n),u=t!==void 0,h=u?t:s,p=cr(m=>{const S=typeof m=="function"?m(h):m;!a(h,S)||(u||l(S),o(S))},[u,o,h,a]);return[h,p]}const H7=C.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nS=C.exports.createContext({});function lae(){return C.exports.useContext(nS).visualElement}const n1=C.exports.createContext(null),ah=typeof document<"u",L4=ah?C.exports.useLayoutEffect:C.exports.useEffect,$N=C.exports.createContext({strict:!1});function uae(e,t,n,r){const i=lae(),o=C.exports.useContext($N),a=C.exports.useContext(n1),s=C.exports.useContext(H7).reducedMotion,l=C.exports.useRef(void 0);r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const u=l.current;return L4(()=>{u&&u.syncRender()}),C.exports.useEffect(()=>{u&&u.animationState&&u.animationState.animateChanges()}),L4(()=>()=>u&&u.notifyUnmount(),[]),u}function Yp(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cae(e,t,n){return C.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Yp(n)&&(n.current=r))},[t])}function gv(e){return typeof e=="string"||Array.isArray(e)}function rS(e){return typeof e=="object"&&typeof e.start=="function"}const dae=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function iS(e){return rS(e.animate)||dae.some(t=>gv(e[t]))}function HN(e){return Boolean(iS(e)||e.variants)}function fae(e,t){if(iS(e)){const{initial:n,animate:r}=e;return{initial:n===!1||gv(n)?n:void 0,animate:gv(r)?r:void 0}}return e.inherit!==!1?t:{}}function hae(e){const{initial:t,animate:n}=fae(e,C.exports.useContext(nS));return C.exports.useMemo(()=>({initial:t,animate:n}),[xT(t),xT(n)])}function xT(e){return Array.isArray(e)?e.join(" "):e}const ru=e=>({isEnabled:t=>e.some(n=>!!t[n])}),mv={measureLayout:ru(["layout","layoutId","drag"]),animation:ru(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:ru(["exit"]),drag:ru(["drag","dragControls"]),focus:ru(["whileFocus"]),hover:ru(["whileHover","onHoverStart","onHoverEnd"]),tap:ru(["whileTap","onTap","onTapStart","onTapCancel"]),pan:ru(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:ru(["whileInView","onViewportEnter","onViewportLeave"])};function pae(e){for(const t in e)t==="projectionNodeConstructor"?mv.projectionNodeConstructor=e[t]:mv[t].Component=e[t]}function oS(e){const t=C.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const Am={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let gae=1;function mae(){return oS(()=>{if(Am.hasEverUpdated)return gae++})}const W7=C.exports.createContext({});class vae extends le.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const WN=C.exports.createContext({}),yae=Symbol.for("motionComponentSymbol");function Sae({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&pae(e);function a(l,u){const h={...C.exports.useContext(H7),...l,layoutId:bae(l)},{isStatic:p}=h;let m=null;const v=hae(l),S=p?void 0:mae(),w=i(l,p);if(!p&&ah){v.visualElement=uae(o,w,h,t);const E=C.exports.useContext($N).strict,P=C.exports.useContext(WN);v.visualElement&&(m=v.visualElement.loadFeatures(h,E,e,S,n||mv.projectionNodeConstructor,P))}return ne(vae,{visualElement:v.visualElement,props:h,children:[m,x(nS.Provider,{value:v,children:r(o,l,S,cae(w,v.visualElement,u),w,p,v.visualElement)})]})}const s=C.exports.forwardRef(a);return s[yae]=o,s}function bae({layoutId:e}){const t=C.exports.useContext(W7).id;return t&&e!==void 0?t+"-"+e:e}function xae(e){function t(r,i={}){return Sae(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const wae=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function V7(e){return typeof e!="string"||e.includes("-")?!1:!!(wae.indexOf(e)>-1||/[A-Z]/.test(e))}const M4={};function Cae(e){Object.assign(M4,e)}const O4=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wv=new Set(O4);function VN(e,{layout:t,layoutId:n}){return Wv.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!M4[e]||e==="opacity")}const ws=e=>!!e?.getVelocity,_ae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},kae=(e,t)=>O4.indexOf(e)-O4.indexOf(t);function Eae({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(kae);for(const s of t)a+=`${_ae[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function UN(e){return e.startsWith("--")}const Pae=(e,t)=>t&&typeof e=="number"?t.transform(e):e,GN=(e,t)=>n=>Math.max(Math.min(n,t),e),Lm=e=>e%1?Number(e.toFixed(5)):e,vv=/(-)?([\d]*\.?[\d])+/g,j6=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Tae=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Vv(e){return typeof e=="string"}const sh={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Mm=Object.assign(Object.assign({},sh),{transform:GN(0,1)}),ky=Object.assign(Object.assign({},sh),{default:1}),Uv=e=>({test:t=>Vv(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Cc=Uv("deg"),Cl=Uv("%"),wt=Uv("px"),Aae=Uv("vh"),Lae=Uv("vw"),wT=Object.assign(Object.assign({},Cl),{parse:e=>Cl.parse(e)/100,transform:e=>Cl.transform(e*100)}),U7=(e,t)=>n=>Boolean(Vv(n)&&Tae.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),jN=(e,t,n)=>r=>{if(!Vv(r))return r;const[i,o,a,s]=r.match(vv);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Of={test:U7("hsl","hue"),parse:jN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Cl.transform(Lm(t))+", "+Cl.transform(Lm(n))+", "+Lm(Mm.transform(r))+")"},Mae=GN(0,255),Px=Object.assign(Object.assign({},sh),{transform:e=>Math.round(Mae(e))}),zc={test:U7("rgb","red"),parse:jN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Px.transform(e)+", "+Px.transform(t)+", "+Px.transform(n)+", "+Lm(Mm.transform(r))+")"};function Oae(e){let t="",n="",r="",i="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Y6={test:U7("#"),parse:Oae,transform:zc.transform},Ji={test:e=>zc.test(e)||Y6.test(e)||Of.test(e),parse:e=>zc.test(e)?zc.parse(e):Of.test(e)?Of.parse(e):Y6.parse(e),transform:e=>Vv(e)?e:e.hasOwnProperty("red")?zc.transform(e):Of.transform(e)},YN="${c}",qN="${n}";function Iae(e){var t,n,r,i;return isNaN(e)&&Vv(e)&&((n=(t=e.match(vv))===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+((i=(r=e.match(j6))===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0)>0}function KN(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0;const r=e.match(j6);r&&(n=r.length,e=e.replace(j6,YN),t.push(...r.map(Ji.parse)));const i=e.match(vv);return i&&(e=e.replace(vv,qN),t.push(...i.map(sh.parse))),{values:t,numColors:n,tokenised:e}}function XN(e){return KN(e).values}function ZN(e){const{values:t,numColors:n,tokenised:r}=KN(e),i=t.length;return o=>{let a=r;for(let s=0;stypeof e=="number"?0:e;function Nae(e){const t=XN(e);return ZN(e)(t.map(Rae))}const bu={test:Iae,parse:XN,createTransformer:ZN,getAnimatableNone:Nae},Dae=new Set(["brightness","contrast","saturate","opacity"]);function zae(e){let[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(vv)||[];if(!r)return e;const i=n.replace(r,"");let o=Dae.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Bae=/([a-z-]*)\(.*?\)/g,q6=Object.assign(Object.assign({},bu),{getAnimatableNone:e=>{const t=e.match(Bae);return t?t.map(zae).join(" "):e}}),CT={...sh,transform:Math.round},QN={borderWidth:wt,borderTopWidth:wt,borderRightWidth:wt,borderBottomWidth:wt,borderLeftWidth:wt,borderRadius:wt,radius:wt,borderTopLeftRadius:wt,borderTopRightRadius:wt,borderBottomRightRadius:wt,borderBottomLeftRadius:wt,width:wt,maxWidth:wt,height:wt,maxHeight:wt,size:wt,top:wt,right:wt,bottom:wt,left:wt,padding:wt,paddingTop:wt,paddingRight:wt,paddingBottom:wt,paddingLeft:wt,margin:wt,marginTop:wt,marginRight:wt,marginBottom:wt,marginLeft:wt,rotate:Cc,rotateX:Cc,rotateY:Cc,rotateZ:Cc,scale:ky,scaleX:ky,scaleY:ky,scaleZ:ky,skew:Cc,skewX:Cc,skewY:Cc,distance:wt,translateX:wt,translateY:wt,translateZ:wt,x:wt,y:wt,z:wt,perspective:wt,transformPerspective:wt,opacity:Mm,originX:wT,originY:wT,originZ:wt,zIndex:CT,fillOpacity:Mm,strokeOpacity:Mm,numOctaves:CT};function G7(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let u=!1,h=!1,p=!0;for(const m in t){const v=t[m];if(UN(m)){o[m]=v;continue}const S=QN[m],w=Pae(v,S);if(Wv.has(m)){if(u=!0,a[m]=w,s.push(m),!p)continue;v!==(S.default||0)&&(p=!1)}else m.startsWith("origin")?(h=!0,l[m]=w):i[m]=w}if(t.transform||(u||r?i.transform=Eae(e,n,p,r):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:v="50%",originZ:S=0}=l;i.transformOrigin=`${m} ${v} ${S}`}}const j7=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function JN(e,t,n){for(const r in t)!ws(t[r])&&!VN(r,n)&&(e[r]=t[r])}function Fae({transformTemplate:e},t,n){return C.exports.useMemo(()=>{const r=j7();return G7(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function $ae(e,t,n){const r=e.style||{},i={};return JN(i,r,e),Object.assign(i,Fae(e,t,n)),e.transformValues?e.transformValues(i):i}function Hae(e,t,n){const r={},i=$ae(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Wae=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Vae=["whileTap","onTap","onTapStart","onTapCancel"],Uae=["onPan","onPanStart","onPanSessionStart","onPanEnd"],Gae=["whileInView","onViewportEnter","onViewportLeave","viewport"],jae=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...Gae,...Vae,...Wae,...Uae]);function I4(e){return jae.has(e)}let eD=e=>!I4(e);function Yae(e){!e||(eD=t=>t.startsWith("on")?!I4(t):e(t))}try{Yae(require("@emotion/is-prop-valid").default)}catch{}function qae(e,t,n){const r={};for(const i in e)(eD(i)||n===!0&&I4(i)||!t&&!I4(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function _T(e,t,n){return typeof e=="string"?e:wt.transform(t+n*e)}function Kae(e,t,n){const r=_T(t,e.x,e.width),i=_T(n,e.y,e.height);return`${r} ${i}`}const Xae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zae={offset:"strokeDashoffset",array:"strokeDasharray"};function Qae(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?Xae:Zae;e[o.offset]=wt.transform(-r);const a=wt.transform(t),s=wt.transform(n);e[o.array]=`${a} ${s}`}function Y7(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},u,h){G7(e,l,u,h),e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:v}=e;p.transform&&(v&&(m.transform=p.transform),delete p.transform),v&&(r!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=Kae(v,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),o!==void 0&&Qae(p,o,a,s,!1)}const tD=()=>({...j7(),attrs:{}});function Jae(e,t){const n=C.exports.useMemo(()=>{const r=tD();return Y7(r,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};JN(r,e.style,e),n.style={...r,...n.style}}return n}function ese(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const u=(V7(n)?Jae:Hae)(r,a,s),p={...qae(r,typeof n=="string",e),...u,ref:o};return i&&(p["data-projection-id"]=i),C.exports.createElement(n,p)}}const nD=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function rD(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const iD=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function oD(e,t,n,r){rD(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(iD.has(i)?i:nD(i),t.attrs[i])}function q7(e){const{style:t}=e,n={};for(const r in t)(ws(t[r])||VN(r,e))&&(n[r]=t[r]);return n}function aD(e){const t=q7(e);for(const n in e)if(ws(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function K7(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const yv=e=>Array.isArray(e),tse=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),sD=e=>yv(e)?e[e.length-1]||0:e;function M3(e){const t=ws(e)?e.get():e;return tse(t)?t.toValue():t}function nse({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:rse(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const lD=e=>(t,n)=>{const r=C.exports.useContext(nS),i=C.exports.useContext(n1),o=()=>nse(e,t,r,i);return n?o():oS(o)};function rse(e,t,n,r){const i={},o=r(e);for(const m in o)i[m]=M3(o[m]);let{initial:a,animate:s}=e;const l=iS(e),u=HN(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const p=h?s:a;return p&&typeof p!="boolean"&&!rS(p)&&(Array.isArray(p)?p:[p]).forEach(v=>{const S=K7(e,v);if(!S)return;const{transitionEnd:w,transition:E,...P}=S;for(const k in P){let T=P[k];if(Array.isArray(T)){const M=h?T.length-1:0;T=T[M]}T!==null&&(i[k]=T)}for(const k in w)i[k]=w[k]}),i}const ise={useVisualState:lD({scrapeMotionValuesFromProps:aD,createRenderState:tD,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Y7(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),oD(t,n)}})},ose={useVisualState:lD({scrapeMotionValuesFromProps:q7,createRenderState:j7})};function ase(e,{forwardMotionProps:t=!1},n,r,i){return{...V7(e)?ise:ose,preloadedFeatures:n,useRender:ese(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var Gn;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(Gn||(Gn={}));function aS(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function K6(e,t,n,r){C.exports.useEffect(()=>{const i=e.current;if(n&&i)return aS(i,t,n,r)},[e,t,n,r])}function sse({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(Gn.Focus,!0)},i=()=>{n&&n.setActive(Gn.Focus,!1)};K6(t,"focus",e?r:void 0),K6(t,"blur",e?i:void 0)}function uD(e){return typeof PointerEvent<"u"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function cD(e){return!!e.touches}function lse(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const use={pageX:0,pageY:0};function cse(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||use;return{x:r[t+"X"],y:r[t+"Y"]}}function dse(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function X7(e,t="page"){return{point:cD(e)?cse(e,t):dse(e,t)}}const dD=(e,t=!1)=>{const n=r=>e(r,X7(r));return t?lse(n):n},fse=()=>ah&&window.onpointerdown===null,hse=()=>ah&&window.ontouchstart===null,pse=()=>ah&&window.onmousedown===null,gse={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},mse={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function fD(e){return fse()?e:hse()?mse[e]:pse()?gse[e]:e}function g0(e,t,n,r){return aS(e,fD(t),dD(n,t==="pointerdown"),r)}function R4(e,t,n,r){return K6(e,fD(t),n&&dD(n,t==="pointerdown"),r)}function hD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const kT=hD("dragHorizontal"),ET=hD("dragVertical");function pD(e){let t=!1;if(e==="y")t=ET();else if(e==="x")t=kT();else{const n=kT(),r=ET();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function gD(){const e=pD(!0);return e?(e(),!1):!0}function PT(e,t,n){return(r,i)=>{!uD(r)||gD()||(e.animationState&&e.animationState.setActive(Gn.Hover,t),n&&n(r,i))}}function vse({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){R4(r,"pointerenter",e||n?PT(r,!0,e):void 0,{passive:!e}),R4(r,"pointerleave",t||n?PT(r,!1,t):void 0,{passive:!t})}const mD=(e,t)=>t?e===t?!0:mD(e,t.parentElement):!1;function Z7(e){return C.exports.useEffect(()=>()=>e(),[])}function vD(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),Tx=.001,Sse=.01,TT=10,bse=.05,xse=1;function wse({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yse(e<=TT*1e3);let a=1-t;a=D4(bse,xse,a),e=D4(Sse,TT,e/1e3),a<1?(i=u=>{const h=u*a,p=h*e,m=h-n,v=X6(u,a),S=Math.exp(-p);return Tx-m/v*S},o=u=>{const p=u*a*e,m=p*n+n,v=Math.pow(a,2)*Math.pow(u,2)*e,S=Math.exp(-p),w=X6(Math.pow(u,2),a);return(-i(u)+Tx>0?-1:1)*((m-v)*S)/w}):(i=u=>{const h=Math.exp(-u*e),p=(u-n)*e+1;return-Tx+h*p},o=u=>{const h=Math.exp(-u*e),p=(n-u)*(e*e);return h*p});const s=5/e,l=_se(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const Cse=12;function _se(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function Pse(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!AT(e,Ese)&&AT(e,kse)){const n=wse(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Q7(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,o=vD(e,["from","to","restSpeed","restDelta"]);const a={done:!1,value:t};let{stiffness:s,damping:l,mass:u,velocity:h,duration:p,isResolvedFromDuration:m}=Pse(o),v=LT,S=LT;function w(){const E=h?-(h/1e3):0,P=n-t,k=l/(2*Math.sqrt(s*u)),T=Math.sqrt(s/u)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),k<1){const M=X6(T,k);v=I=>{const R=Math.exp(-k*T*I);return n-R*((E+k*T*P)/M*Math.sin(M*I)+P*Math.cos(M*I))},S=I=>{const R=Math.exp(-k*T*I);return k*T*R*(Math.sin(M*I)*(E+k*T*P)/M+P*Math.cos(M*I))-R*(Math.cos(M*I)*(E+k*T*P)-M*P*Math.sin(M*I))}}else if(k===1)v=M=>n-Math.exp(-T*M)*(P+(E+T*P)*M);else{const M=T*Math.sqrt(k*k-1);v=I=>{const R=Math.exp(-k*T*I),N=Math.min(M*I,300);return n-R*((E+k*T*P)*Math.sinh(N)+M*P*Math.cosh(N))/M}}}return w(),{next:E=>{const P=v(E);if(m)a.done=E>=p;else{const k=S(E)*1e3,T=Math.abs(k)<=r,M=Math.abs(n-P)<=i;a.done=T&&M}return a.value=a.done?n:P,a},flipTarget:()=>{h=-h,[t,n]=[n,t],w()}}}Q7.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const LT=e=>0,Sv=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},wr=(e,t,n)=>-n*e+n*t+e;function Ax(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function MT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Ax(l,s,e+1/3),o=Ax(l,s,e),a=Ax(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Tse=(e,t,n)=>{const r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},Ase=[Y6,zc,Of],OT=e=>Ase.find(t=>t.test(e)),yD=(e,t)=>{let n=OT(e),r=OT(t),i=n.parse(e),o=r.parse(t);n===Of&&(i=MT(i),n=zc),r===Of&&(o=MT(o),r=zc);const a=Object.assign({},i);return s=>{for(const l in a)l!=="alpha"&&(a[l]=Tse(i[l],o[l],s));return a.alpha=wr(i.alpha,o.alpha,s),n.transform(a)}},Z6=e=>typeof e=="number",Lse=(e,t)=>n=>t(e(n)),sS=(...e)=>e.reduce(Lse);function SD(e,t){return Z6(e)?n=>wr(e,t,n):Ji.test(e)?yD(e,t):xD(e,t)}const bD=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>SD(o,t[a]));return o=>{for(let a=0;a{const n=Object.assign(Object.assign({},e),t),r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=SD(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}};function IT(e){const t=bu.parse(e),n=t.length;let r=0,i=0,o=0;for(let a=0;a{const n=bu.createTransformer(t),r=IT(e),i=IT(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?sS(bD(r.parsed,i.parsed),n):a=>`${a>0?t:e}`},Ose=(e,t)=>n=>wr(e,t,n);function Ise(e){if(typeof e=="number")return Ose;if(typeof e=="string")return Ji.test(e)?yD:xD;if(Array.isArray(e))return bD;if(typeof e=="object")return Mse}function Rse(e,t,n){const r=[],i=n||Ise(e[0]),o=e.length-1;for(let a=0;an(Sv(e,t,r))}function Dse(e,t){const n=e.length,r=n-1;return i=>{let o=0,a=!1;if(i<=e[0]?a=!0:i>=e[r]&&(o=r-1,a=!0),!a){let l=1;for(;li||l===r);l++);o=l-1}const s=Sv(e[o],e[o+1],i);return t[o](s)}}function wD(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;N4(o===t.length),N4(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());const a=Rse(t,r,i),s=o===2?Nse(e,a):Dse(e,a);return n?l=>s(D4(e[0],e[o-1],l)):s}const lS=e=>t=>1-e(1-t),J7=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zse=e=>t=>Math.pow(t,e),CD=e=>t=>t*t*((e+1)*t-e),Bse=e=>{const t=CD(e);return n=>(n*=2)<1?.5*t(n):.5*(2-Math.pow(2,-10*(n-1)))},_D=1.525,Fse=4/11,$se=8/11,Hse=9/10,e8=e=>e,t8=zse(2),Wse=lS(t8),kD=J7(t8),ED=e=>1-Math.sin(Math.acos(e)),n8=lS(ED),Vse=J7(n8),r8=CD(_D),Use=lS(r8),Gse=J7(r8),jse=Bse(_D),Yse=4356/361,qse=35442/1805,Kse=16061/1805,z4=e=>{if(e===1||e===0)return e;const t=e*e;return ee<.5?.5*(1-z4(1-e*2)):.5*z4(e*2-1)+.5;function Qse(e,t){return e.map(()=>t||kD).splice(0,e.length-1)}function Jse(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function ele(e,t){return e.map(n=>n*t)}function O3({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){const o={done:!1,value:e},a=Array.isArray(t)?t:[e,t],s=ele(r&&r.length===a.length?r:Jse(a),i);function l(){return wD(s,a,{ease:Array.isArray(n)?n:Qse(a,n)})}let u=l();return{next:h=>(o.value=u(h),o.done=h>=i,o),flipTarget:()=>{a.reverse(),u=l()}}}function tle({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a={done:!1,value:t};let s=n*e;const l=t+s,u=o===void 0?l:o(l);return u!==l&&(s=u-t),{next:h=>{const p=-s*Math.exp(-h/r);return a.done=!(p>i||p<-i),a.value=a.done?u:u+p,a},flipTarget:()=>{}}}const RT={keyframes:O3,spring:Q7,decay:tle};function nle(e){if(Array.isArray(e.to))return O3;if(RT[e.type])return RT[e.type];const t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?O3:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Q7:O3}const PD=1/60*1e3,rle=typeof performance<"u"?()=>performance.now():()=>Date.now(),TD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(rle()),PD);function ile(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=ile(()=>bv=!0),e),{}),ale=Gv.reduce((e,t)=>{const n=uS[t];return e[t]=(r,i=!1,o=!1)=>(bv||ule(),n.schedule(r,i,o)),e},{}),sle=Gv.reduce((e,t)=>(e[t]=uS[t].cancel,e),{});Gv.reduce((e,t)=>(e[t]=()=>uS[t].process(m0),e),{});const lle=e=>uS[e].process(m0),AD=e=>{bv=!1,m0.delta=Q6?PD:Math.max(Math.min(e-m0.timestamp,ole),1),m0.timestamp=e,J6=!0,Gv.forEach(lle),J6=!1,bv&&(Q6=!1,TD(AD))},ule=()=>{bv=!0,Q6=!0,J6||TD(AD)},cle=()=>m0;function LD(e,t,n=0){return e-t-n}function dle(e,t,n=0,r=!0){return r?LD(t+-e,t,n):t-(e-t)+n}function fle(e,t,n,r){return r?e>=t+n:e<=-n}const hle=e=>{const t=({delta:n})=>e(n);return{start:()=>ale.update(t,!0),stop:()=>sle.update(t)}};function MD(e){var t,n,{from:r,autoplay:i=!0,driver:o=hle,elapsed:a=0,repeat:s=0,repeatType:l="loop",repeatDelay:u=0,onPlay:h,onStop:p,onComplete:m,onRepeat:v,onUpdate:S}=e,w=vD(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:E}=w,P,k=0,T=w.duration,M,I=!1,R=!0,N;const z=nle(w);!((n=(t=z).needsInterpolation)===null||n===void 0)&&n.call(t,r,E)&&(N=wD([0,100],[r,E],{clamp:!1}),r=0,E=100);const $=z(Object.assign(Object.assign({},w),{from:r,to:E}));function W(){k++,l==="reverse"?(R=k%2===0,a=dle(a,T,u,R)):(a=LD(a,T,u),l==="mirror"&&$.flipTarget()),I=!1,v&&v()}function q(){P.stop(),m&&m()}function de(J){if(R||(J=-J),a+=J,!I){const re=$.next(Math.max(0,a));M=re.value,N&&(M=N(M)),I=R?re.done:a<=0}S?.(M),I&&(k===0&&(T??(T=a)),k{p?.(),P.stop()}}}function OD(e,t){return t?e*(1e3/t):0}function ple({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:p,onComplete:m,onStop:v}){let S;function w(T){return n!==void 0&&Tr}function E(T){return n===void 0?r:r===void 0||Math.abs(n-T){var I;p?.(M),(I=T.onUpdate)===null||I===void 0||I.call(T,M)},onComplete:m,onStop:v}))}function k(T){P(Object.assign({type:"spring",stiffness:a,damping:s,restDelta:l},T))}if(w(e))k({from:e,velocity:t,to:E(e)});else{let T=i*t+e;typeof u<"u"&&(T=u(T));const M=E(T),I=M===n?-1:1;let R,N;const z=$=>{R=N,N=$,t=OD($-R,cle().delta),(I===1&&$>M||I===-1&&$S?.stop()}}const eC=e=>e.hasOwnProperty("x")&&e.hasOwnProperty("y"),NT=e=>eC(e)&&e.hasOwnProperty("z"),Ey=(e,t)=>Math.abs(e-t);function i8(e,t){if(Z6(e)&&Z6(t))return Ey(e,t);if(eC(e)&&eC(t)){const n=Ey(e.x,t.x),r=Ey(e.y,t.y),i=NT(e)&&NT(t)?Ey(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}const ID=(e,t)=>1-3*t+3*e,RD=(e,t)=>3*t-6*e,ND=e=>3*e,B4=(e,t,n)=>((ID(t,n)*e+RD(t,n))*e+ND(t))*e,DD=(e,t,n)=>3*ID(t,n)*e*e+2*RD(t,n)*e+ND(t),gle=1e-7,mle=10;function vle(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=B4(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>gle&&++s=Sle?ble(a,p,e,n):m===0?p:vle(a,s,s+Py,e,n)}return a=>a===0||a===1?a:B4(o(a),t,r)}function wle({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(!1),s=C.exports.useRef(null),l={passive:!(t||e||n||v)};function u(){s.current&&s.current(),s.current=null}function h(){return u(),a.current=!1,i.animationState&&i.animationState.setActive(Gn.Tap,!1),!gD()}function p(S,w){!h()||(mD(i.getInstance(),S.target)?e&&e(S,w):n&&n(S,w))}function m(S,w){!h()||n&&n(S,w)}function v(S,w){u(),!a.current&&(a.current=!0,s.current=sS(g0(window,"pointerup",p,l),g0(window,"pointercancel",m,l)),i.animationState&&i.animationState.setActive(Gn.Tap,!0),t&&t(S,w))}R4(i,"pointerdown",o?v:void 0,l),Z7(u)}const Cle="production",zD=typeof process>"u"||process.env===void 0?Cle:"production",DT=new Set;function BD(e,t,n){e||DT.has(t)||(console.warn(t),n&&console.warn(n),DT.add(t))}const tC=new WeakMap,Lx=new WeakMap,_le=e=>{const t=tC.get(e.target);t&&t(e)},kle=e=>{e.forEach(_le)};function Ele({root:e,...t}){const n=e||document;Lx.has(n)||Lx.set(n,{});const r=Lx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(kle,{root:e,...t})),r[i]}function Ple(e,t,n){const r=Ele(t);return tC.set(e,n),r.observe(e),()=>{tC.delete(e),r.unobserve(e)}}function Tle({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=C.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver>"u"?Mle:Lle)(a,o.current,e,i)}const Ale={some:0,all:1};function Lle(e,t,n,{root:r,margin:i,amount:o="some",once:a}){C.exports.useEffect(()=>{if(!e)return;const s={root:r?.current,rootMargin:i,threshold:typeof o=="number"?o:Ale[o]},l=u=>{const{isIntersecting:h}=u;if(t.isInView===h||(t.isInView=h,a&&!h&&t.hasEnteredView))return;h&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(Gn.InView,h);const p=n.getProps(),m=h?p.onViewportEnter:p.onViewportLeave;m&&m(u)};return Ple(n.getInstance(),s,l)},[e,r,i,o])}function Mle(e,t,n,{fallback:r=!0}){C.exports.useEffect(()=>{!e||!r||(zD!=="production"&&BD(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(Gn.InView,!0)}))},[e])}const Bc=e=>t=>(e(t),null),Ole={inView:Bc(Tle),tap:Bc(wle),focus:Bc(sse),hover:Bc(vse)};function o8(){const e=C.exports.useContext(n1);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=C.exports.useId();return C.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Ile(){return Rle(C.exports.useContext(n1))}function Rle(e){return e===null?!0:e.isPresent}function FD(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;re*1e3,Nle={linear:e8,easeIn:t8,easeInOut:kD,easeOut:Wse,circIn:ED,circInOut:Vse,circOut:n8,backIn:r8,backInOut:Gse,backOut:Use,anticipate:jse,bounceIn:Xse,bounceInOut:Zse,bounceOut:z4},zT=e=>{if(Array.isArray(e)){N4(e.length===4);const[t,n,r,i]=e;return xle(t,n,r,i)}else if(typeof e=="string")return Nle[e];return e},Dle=e=>Array.isArray(e)&&typeof e[0]!="number",BT=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&bu.test(t)&&!t.startsWith("url(")),ff=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),Ty=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Mx=()=>({type:"keyframes",ease:"linear",duration:.3}),zle=e=>({type:"keyframes",duration:.8,values:e}),FT={x:ff,y:ff,z:ff,rotate:ff,rotateX:ff,rotateY:ff,rotateZ:ff,scaleX:Ty,scaleY:Ty,scale:Ty,opacity:Mx,backgroundColor:Mx,color:Mx,default:Ty},Ble=(e,t)=>{let n;return yv(t)?n=zle:n=FT[e]||FT.default,{to:t,...n(t)}},Fle={...QN,color:Ji,backgroundColor:Ji,outlineColor:Ji,fill:Ji,stroke:Ji,borderColor:Ji,borderTopColor:Ji,borderRightColor:Ji,borderBottomColor:Ji,borderLeftColor:Ji,filter:q6,WebkitFilter:q6},a8=e=>Fle[e];function s8(e,t){var n;let r=a8(e);return r!==q6&&(r=bu),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const $le={current:!1},$D=1/60*1e3,Hle=typeof performance<"u"?()=>performance.now():()=>Date.now(),HD=typeof window<"u"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Hle()),$D);function Wle(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,u=!1,h=!1)=>{const p=h&&i,m=p?t:n;return u&&a.add(l),m.indexOf(l)===-1&&(m.push(l),p&&i&&(r=t.length)),l},cancel:l=>{const u=n.indexOf(l);u!==-1&&n.splice(u,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let u=0;u(e[t]=Wle(()=>xv=!0),e),{}),Cs=jv.reduce((e,t)=>{const n=cS[t];return e[t]=(r,i=!1,o=!1)=>(xv||Gle(),n.schedule(r,i,o)),e},{}),Qf=jv.reduce((e,t)=>(e[t]=cS[t].cancel,e),{}),Ox=jv.reduce((e,t)=>(e[t]=()=>cS[t].process(v0),e),{}),Ule=e=>cS[e].process(v0),WD=e=>{xv=!1,v0.delta=nC?$D:Math.max(Math.min(e-v0.timestamp,Vle),1),v0.timestamp=e,rC=!0,jv.forEach(Ule),rC=!1,xv&&(nC=!1,HD(WD))},Gle=()=>{xv=!0,nC=!0,rC||HD(WD)},iC=()=>v0;function VD(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Qf.read(r),e(o-t))};return Cs.read(r,!0),()=>Qf.read(r)}function jle({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...u}){return!!Object.keys(u).length}function Yle({ease:e,times:t,yoyo:n,flip:r,loop:i,...o}){const a={...o};return t&&(a.offset=t),o.duration&&(a.duration=F4(o.duration)),o.repeatDelay&&(a.repeatDelay=F4(o.repeatDelay)),e&&(a.ease=Dle(e)?e.map(zT):zT(e)),o.type==="tween"&&(a.type="keyframes"),(n||i||r)&&(n?a.repeatType="reverse":i?a.repeatType="loop":r&&(a.repeatType="mirror"),a.repeat=i||n||r||o.repeat),o.type!=="spring"&&(a.type="keyframes"),a}function qle(e,t){var n,r;return(r=(n=(l8(e,t)||{}).delay)!==null&&n!==void 0?n:e.delay)!==null&&r!==void 0?r:0}function Kle(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Xle(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),Kle(t),jle(e)||(e={...e,...Ble(n,t.to)}),{...t,...Yle(e)}}function Zle(e,t,n,r,i){const o=l8(r,e)||{};let a=o.from!==void 0?o.from:t.get();const s=BT(e,n);a==="none"&&s&&typeof n=="string"?a=s8(e,n):$T(a)&&typeof n=="string"?a=HT(n):!Array.isArray(n)&&$T(n)&&typeof a=="string"&&(n=HT(a));const l=BT(e,a);function u(){const p={from:a,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:m=>t.set(m)};return o.type==="inertia"||o.type==="decay"?ple({...p,...o}):MD({...Xle(o,p,e),onUpdate:m=>{p.onUpdate(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{p.onComplete(),o.onComplete&&o.onComplete()}})}function h(){const p=sD(n);return t.set(p),i(),o.onUpdate&&o.onUpdate(p),o.onComplete&&o.onComplete(),{stop:()=>{}}}return!l||!s||o.type===!1?h:u}function $T(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function HT(e){return typeof e=="number"?0:s8("",e)}function l8(e,t){return e[t]||e.default||e}function u8(e,t,n,r={}){return $le.current&&(r={type:!1}),t.start(i=>{let o;const a=Zle(e,t,n,r,i),s=qle(r,e),l=()=>o=a();let u;return s?u=VD(l,F4(s)):l(),()=>{u&&u(),o&&o.stop()}})}const Qle=e=>/^\-?\d*\.?\d+$/.test(e),Jle=e=>/^0[^.\s]+$/.test(e);function c8(e,t){e.indexOf(t)===-1&&e.push(t)}function d8(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Om{constructor(){this.subscriptions=[]}add(t){return c8(this.subscriptions,t),()=>d8(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class tue{constructor(t){this.version="7.6.4",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Om,this.velocityUpdateSubscribers=new Om,this.renderSubscribers=new Om,this.canTrackVelocity=!1,this.updateAndNotify=(n,r=!0)=>{this.prev=this.current,this.current=n;const{delta:i,timestamp:o}=iC();this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Cs.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),r&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>Cs.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=eue(this.current)}onChange(t){return this.updateSubscribers.add(t)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(t){return t(this.get()),this.renderSubscribers.add(t)}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?OD(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}function F0(e){return new tue(e)}const UD=e=>t=>t.test(e),nue={test:e=>e==="auto",parse:e=>e},GD=[sh,wt,Cl,Cc,Lae,Aae,nue],Ig=e=>GD.find(UD(e)),rue=[...GD,Ji,bu],iue=e=>rue.find(UD(e));function oue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.get()),t}function aue(e){const t={};return e.forEachValue((n,r)=>t[r]=n.getVelocity()),t}function dS(e,t,n){const r=e.getProps();return K7(r,t,n!==void 0?n:r.custom,oue(e),aue(e))}function sue(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,F0(n))}function lue(e,t){const n=dS(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=sD(o[a]);sue(e,a,s)}}function uue(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;soC(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=oC(e,t,n);else{const i=typeof t=="function"?dS(e,t,n.custom):t;r=jD(e,i,n)}return r.then(()=>e.notifyAnimationComplete(t))}function oC(e,t,n={}){var r;const i=dS(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>jD(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:p,staggerDirection:m}=o;return hue(e,t,h+u,p,m,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,h]=l==="beforeChildren"?[a,s]:[s,a];return u().then(h)}else return Promise.all([a(),s(n.delay)])}function jD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(a=r);const h=[],p=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const m in l){const v=e.getValue(m),S=l[m];if(!v||S===void 0||p&&gue(p,m))continue;let w={delay:n,...a};e.shouldReduceMotion&&Wv.has(m)&&(w={...w,type:!1,delay:0});let E=u8(m,v,S,w);$4(u)&&(u.add(m),E=E.then(()=>u.remove(m))),h.push(E)}return Promise.all(h).then(()=>{s&&lue(e,s)})}function hue(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(pue).forEach((u,h)=>{a.push(oC(u,t,{...o,delay:n+l(h)}).then(()=>u.notifyAnimationComplete(t)))}),Promise.all(a)}function pue(e,t){return e.sortNodePosition(t)}function gue({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const f8=[Gn.Animate,Gn.InView,Gn.Focus,Gn.Hover,Gn.Tap,Gn.Drag,Gn.Exit],mue=[...f8].reverse(),vue=f8.length;function yue(e){return t=>Promise.all(t.map(({animation:n,options:r})=>fue(e,n,r)))}function Sue(e){let t=yue(e);const n=xue();let r=!0;const i=(l,u)=>{const h=dS(e,u);if(h){const{transition:p,transitionEnd:m,...v}=h;l={...l,...v,...m}}return l};function o(l){t=l(e)}function a(l,u){var h;const p=e.getProps(),m=e.getVariantContext(!0)||{},v=[],S=new Set;let w={},E=1/0;for(let k=0;kE&&R;const q=Array.isArray(I)?I:[I];let de=q.reduce(i,{});N===!1&&(de={});const{prevResolvedValues:H={}}=M,J={...H,...de},re=oe=>{W=!0,S.delete(oe),M.needsAnimating[oe]=!0};for(const oe in J){const X=de[oe],G=H[oe];w.hasOwnProperty(oe)||(X!==G?yv(X)&&yv(G)?!FD(X,G)||$?re(oe):M.protectedKeys[oe]=!0:X!==void 0?re(oe):S.add(oe):X!==void 0&&S.has(oe)?re(oe):M.protectedKeys[oe]=!0)}M.prevProp=I,M.prevResolvedValues=de,M.isActive&&(w={...w,...de}),r&&e.blockInitialAnimation&&(W=!1),W&&!z&&v.push(...q.map(oe=>({animation:oe,options:{type:T,...l}})))}if(S.size){const k={};S.forEach(T=>{const M=e.getBaseTarget(T);M!==void 0&&(k[T]=M)}),v.push({animation:k})}let P=Boolean(v.length);return r&&p.initial===!1&&!e.manuallyAnimateOnMount&&(P=!1),r=!1,P?t(v):Promise.resolve()}function s(l,u,h){var p;if(n[l].isActive===u)return Promise.resolve();(p=e.variantChildren)===null||p===void 0||p.forEach(v=>{var S;return(S=v.animationState)===null||S===void 0?void 0:S.setActive(l,u)}),n[l].isActive=u;const m=a(h,l);for(const v in n)n[v].protectedKeys={};return m}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function bue(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!FD(t,e):!1}function hf(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xue(){return{[Gn.Animate]:hf(!0),[Gn.InView]:hf(),[Gn.Hover]:hf(),[Gn.Tap]:hf(),[Gn.Drag]:hf(),[Gn.Focus]:hf(),[Gn.Exit]:hf()}}const wue={animation:Bc(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Sue(e)),rS(t)&&C.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Bc(e=>{const{custom:t,visualElement:n}=e,[r,i]=o8(),o=C.exports.useContext(n1);C.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(Gn.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})};class YD{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Rx(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=i8(u.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:m}=u,{timestamp:v}=iC();this.history.push({...m,timestamp:v});const{onStart:S,onMove:w}=this.handlers;h||(S&&S(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{if(this.lastMoveEvent=u,this.lastMoveEventInfo=Ix(h,this.transformPagePoint),uD(u)&&u.buttons===0){this.handlePointerUp(u,h);return}Cs.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:p,onSessionEnd:m}=this.handlers,v=Rx(Ix(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(u,v),m&&m(u,v)},cD(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=X7(t),o=Ix(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=iC();this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Rx(o,this.history)),this.removeListeners=sS(g0(window,"pointermove",this.handlePointerMove),g0(window,"pointerup",this.handlePointerUp),g0(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Qf.update(this.updatePoint)}}function Ix(e,t){return t?{point:t(e.point)}:e}function WT(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rx({point:e},t){return{point:e,delta:WT(e,qD(t)),offset:WT(e,Cue(t)),velocity:_ue(t,.1)}}function Cue(e){return e[0]}function qD(e){return e[e.length-1]}function _ue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=qD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>F4(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ca(e){return e.max-e.min}function VT(e,t=0,n=.01){return i8(e,t)n&&(e=r?wr(n,e,r.max):Math.min(e,n)),e}function YT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Pue(e,{top:t,left:n,bottom:r,right:i}){return{x:YT(e.x,n,i),y:YT(e.y,t,r)}}function qT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Sv(t.min,t.max-r,e.min):r>i&&(n=Sv(e.min,e.max-i,t.min)),D4(0,1,n)}function Lue(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const aC=.35;function Mue(e=aC){return e===!1?e=0:e===!0&&(e=aC),{x:KT(e,"left","right"),y:KT(e,"top","bottom")}}function KT(e,t,n){return{min:XT(e,t),max:XT(e,n)}}function XT(e,t){var n;return typeof e=="number"?e:(n=e[t])!==null&&n!==void 0?n:0}const ZT=()=>({translate:0,scale:1,origin:0,originPoint:0}),Nm=()=>({x:ZT(),y:ZT()}),QT=()=>({min:0,max:0}),_i=()=>({x:QT(),y:QT()});function ll(e){return[e("x"),e("y")]}function KD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Oue({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Iue(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Nx(e){return e===void 0||e===1}function sC({scale:e,scaleX:t,scaleY:n}){return!Nx(e)||!Nx(t)||!Nx(n)}function yf(e){return sC(e)||XD(e)||e.z||e.rotate||e.rotateX||e.rotateY}function XD(e){return JT(e.x)||JT(e.y)}function JT(e){return e&&e!=="0%"}function H4(e,t,n){const r=e-n,i=t*r;return n+i}function eA(e,t,n,r,i){return i!==void 0&&(e=H4(e,i,r)),H4(e,n,r)+t}function lC(e,t=0,n=1,r,i){e.min=eA(e.min,t,n,r,i),e.max=eA(e.max,t,n,r,i)}function ZD(e,{x:t,y:n}){lC(e.x,t.translate,t.scale,t.originPoint),lC(e.y,n.translate,n.scale,n.originPoint)}function Rue(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let u=0;u{this.stopAnimation(),n&&this.snapToCursor(X7(s,"page").point)},i=(s,l)=>{var u;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=pD(h),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ll(v=>{var S,w;let E=this.getAxisMotionValue(v).get()||0;if(Cl.test(E)){const P=(w=(S=this.visualElement.projection)===null||S===void 0?void 0:S.layout)===null||w===void 0?void 0:w.actual[v];P&&(E=ca(P)*(parseFloat(E)/100))}this.originPoint[v]=E}),m?.(s,l),(u=this.visualElement.animationState)===null||u===void 0||u.setActive(Gn.Drag,!0))},o=(s,l)=>{const{dragPropagation:u,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:v}=l;if(h&&this.currentDirection===null){this.currentDirection=$ue(v),this.currentDirection!==null&&p?.(this.currentDirection);return}this.updateAxis("x",l.point,v),this.updateAxis("y",l.point,v),this.visualElement.syncRender(),m?.(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new YD(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o?.(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(Gn.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ay(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Eue(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Yp(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Pue(r.actual,t):this.constraints=!1,this.elastic=Mue(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ll(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Lue(r.actual[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Yp(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=zue(r,i.root,this.visualElement.getTransformPagePoint());let a=Tue(i.layout.actual,o);if(n){const s=n(Oue(a));this.hasMutatedConstraints=!!s,s&&(a=KD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=ll(h=>{var p;if(!Ay(h,n,this.currentDirection))return;let m=(p=l?.[h])!==null&&p!==void 0?p:{};a&&(m={min:0,max:0});const v=i?200:1e6,S=i?40:1e7,w={type:"inertia",velocity:r?t[h]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,w)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return u8(t,r,0,n)}stopAnimation(){ll(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n,r;const i="_drag"+t.toUpperCase(),o=this.visualElement.getProps()[i];return o||this.visualElement.getValue(t,(r=(n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:0)}snapToCursor(t){ll(n=>{const{drag:r}=this.getProps();if(!Ay(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.actual[n];o.set(t[n]-wr(a,s,.5))}})}scalePositionWithinConstraints(){var t;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!Yp(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};ll(s=>{const l=this.getAxisMotionValue(s);if(l){const u=l.get();o[s]=Aue({min:u,max:u},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.getInstance().style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),ll(s=>{if(!Ay(s,n,null))return;const l=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];l.set(wr(u,h,o[s]))})}addListeners(){var t;Bue.set(this.visualElement,this);const n=this.visualElement.getInstance(),r=g0(n,"pointerdown",u=>{const{drag:h,dragListener:p=!0}=this.getProps();h&&p&&this.start(u)}),i=()=>{const{dragConstraints:u}=this.getProps();Yp(u)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=aS(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(ll(p=>{const m=this.getAxisMotionValue(p);!m||(this.originPoint[p]+=u[p].translate,m.set(m.get()+u[p].translate))}),this.visualElement.syncRender())});return()=>{s(),r(),a(),l?.()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=aC,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function Ay(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $ue(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Hue(e){const{dragControls:t,visualElement:n}=e,r=oS(()=>new Fue(n));C.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),C.exports.useEffect(()=>r.addListeners(),[r])}function Wue({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=C.exports.useRef(null),{transformPagePoint:s}=C.exports.useContext(H7),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(h,p)=>{a.current=null,n&&n(h,p)}};C.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function u(h){a.current=new YD(h,l,{transformPagePoint:s})}R4(i,"pointerdown",o&&u),Z7(()=>a.current&&a.current.end())}const Vue={pan:Bc(Wue),drag:Bc(Hue)},uC={current:null},JD={current:!1};function Uue(){if(JD.current=!0,!!ah)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uC.current=e.matches;e.addListener(t),t()}else uC.current=!1}const Ly=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];function Gue(){const e=Ly.map(()=>new Om),t={},n={clearAllListeners:()=>e.forEach(r=>r.clear()),updatePropListeners:r=>{Ly.forEach(i=>{var o;const a="on"+i,s=r[a];(o=t[i])===null||o===void 0||o.call(t),s&&(t[i]=n[a](s))})}};return e.forEach((r,i)=>{n["on"+Ly[i]]=o=>r.add(o),n["notify"+Ly[i]]=(...o)=>r.notify(...o)}),n}function jue(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(ws(o))e.addValue(i,o),$4(r)&&r.add(i);else if(ws(a))e.addValue(i,F0(o)),$4(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,F0(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const ez=Object.keys(mv),Yue=ez.length,tz=({treeType:e="",build:t,getBaseTarget:n,makeTargetAnimatable:r,measureViewportBox:i,render:o,readValueFromInstance:a,removeValueFromRenderState:s,sortNodePosition:l,scrapeMotionValuesFromProps:u})=>({parent:h,props:p,presenceId:m,blockInitialAnimation:v,visualState:S,reducedMotionConfig:w},E={})=>{let P=!1;const{latestValues:k,renderState:T}=S;let M;const I=Gue(),R=new Map,N=new Map;let z={};const $={...k},W=p.initial?{...k}:{};let q;function de(){!M||!P||(H(),o(M,T,p.style,j.projection))}function H(){t(j,T,k,E,p)}function J(){I.notifyUpdate(k)}function re(Z,me){const Se=me.onChange(Fe=>{k[Z]=Fe,p.onUpdate&&Cs.update(J,!1,!0)}),xe=me.onRenderRequest(j.scheduleRender);N.set(Z,()=>{Se(),xe()})}const{willChange:oe,...X}=u(p);for(const Z in X){const me=X[Z];k[Z]!==void 0&&ws(me)&&(me.set(k[Z],!1),$4(oe)&&oe.add(Z))}if(p.values)for(const Z in p.values){const me=p.values[Z];k[Z]!==void 0&&ws(me)&&me.set(k[Z])}const G=iS(p),Q=HN(p),j={treeType:e,current:null,depth:h?h.depth+1:0,parent:h,children:new Set,presenceId:m,shouldReduceMotion:null,variantChildren:Q?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(h?.isMounted()),blockInitialAnimation:v,isMounted:()=>Boolean(M),mount(Z){P=!0,M=j.current=Z,j.projection&&j.projection.mount(Z),Q&&h&&!G&&(q=h?.addVariantChild(j)),R.forEach((me,Se)=>re(Se,me)),JD.current||Uue(),j.shouldReduceMotion=w==="never"?!1:w==="always"?!0:uC.current,h?.children.add(j),j.setProps(p)},unmount(){var Z;(Z=j.projection)===null||Z===void 0||Z.unmount(),Qf.update(J),Qf.render(de),N.forEach(me=>me()),q?.(),h?.children.delete(j),I.clearAllListeners(),M=void 0,P=!1},loadFeatures(Z,me,Se,xe,Fe,We){const ht=[];for(let qe=0;qej.scheduleRender(),animationType:typeof rt=="string"?rt:"both",initialPromotionConfig:We,layoutScroll:Et})}return ht},addVariantChild(Z){var me;const Se=j.getClosestVariantNode();if(Se)return(me=Se.variantChildren)===null||me===void 0||me.add(Z),()=>Se.variantChildren.delete(Z)},sortNodePosition(Z){return!l||e!==Z.treeType?0:l(j.getInstance(),Z.getInstance())},getClosestVariantNode:()=>Q?j:h?.getClosestVariantNode(),getLayoutId:()=>p.layoutId,getInstance:()=>M,getStaticValue:Z=>k[Z],setStaticValue:(Z,me)=>k[Z]=me,getLatestValues:()=>k,setVisibility(Z){j.isVisible!==Z&&(j.isVisible=Z,j.scheduleRender())},makeTargetAnimatable(Z,me=!0){return r(j,Z,p,me)},measureViewportBox(){return i(M,p)},addValue(Z,me){j.hasValue(Z)&&j.removeValue(Z),R.set(Z,me),k[Z]=me.get(),re(Z,me)},removeValue(Z){var me;R.delete(Z),(me=N.get(Z))===null||me===void 0||me(),N.delete(Z),delete k[Z],s(Z,T)},hasValue:Z=>R.has(Z),getValue(Z,me){if(p.values&&p.values[Z])return p.values[Z];let Se=R.get(Z);return Se===void 0&&me!==void 0&&(Se=F0(me),j.addValue(Z,Se)),Se},forEachValue:Z=>R.forEach(Z),readValue:Z=>k[Z]!==void 0?k[Z]:a(M,Z,E),setBaseTarget(Z,me){$[Z]=me},getBaseTarget(Z){var me;const{initial:Se}=p,xe=typeof Se=="string"||typeof Se=="object"?(me=K7(p,Se))===null||me===void 0?void 0:me[Z]:void 0;if(Se&&xe!==void 0)return xe;if(n){const Fe=n(p,Z);if(Fe!==void 0&&!ws(Fe))return Fe}return W[Z]!==void 0&&xe===void 0?void 0:$[Z]},...I,build(){return H(),T},scheduleRender(){Cs.render(de,!1,!0)},syncRender:de,setProps(Z){(Z.transformTemplate||p.transformTemplate)&&j.scheduleRender(),p=Z,I.updatePropListeners(Z),z=jue(j,u(p),z)},getProps:()=>p,getVariant:Z=>{var me;return(me=p.variants)===null||me===void 0?void 0:me[Z]},getDefaultTransition:()=>p.transition,getTransformPagePoint:()=>p.transformPagePoint,getVariantContext(Z=!1){if(Z)return h?.getVariantContext();if(!G){const Se=h?.getVariantContext()||{};return p.initial!==void 0&&(Se.initial=p.initial),Se}const me={};for(let Se=0;Se{const o=i.get();if(!cC(o))return;const a=dC(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!cC(o))continue;const a=dC(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Zue=new Set(["width","height","top","left","right","bottom","x","y"]),iz=e=>Zue.has(e),Que=e=>Object.keys(e).some(iz),oz=(e,t)=>{e.set(t,!1),e.set(t)},nA=e=>e===sh||e===wt;var rA;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(rA||(rA={}));const iA=(e,t)=>parseFloat(e.split(", ")[t]),oA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return iA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?iA(o[1],e):0}},Jue=new Set(["x","y","z"]),ece=O4.filter(e=>!Jue.has(e));function tce(e){const t=[];return ece.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.syncRender(),t}const aA={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:oA(4,13),y:oA(5,14)},nce=(e,t,n)=>{const r=t.measureViewportBox(),i=t.getInstance(),o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{s[u]=aA[u](r,o)}),t.syncRender();const l=t.measureViewportBox();return n.forEach(u=>{const h=t.getValue(u);oz(h,s[u]),e[u]=aA[u](l,o)}),e},rce=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(iz);let o=[],a=!1;const s=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let h=n[l],p=Ig(h);const m=t[l];let v;if(yv(m)){const S=m.length,w=m[0]===null?1:0;h=m[w],p=Ig(h);for(let E=w;E=0?window.pageYOffset:null,u=nce(t,e,s);return o.length&&o.forEach(([h,p])=>{e.getValue(h).set(p)}),e.syncRender(),ah&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function ice(e,t,n,r){return Que(t)?rce(e,t,n,r):{target:t,transitionEnd:r}}const oce=(e,t,n,r)=>{const i=Xue(e,t,r);return t=i.target,r=i.transitionEnd,ice(e,t,n,r)};function ace(e){return window.getComputedStyle(e)}const az={treeType:"dom",readValueFromInstance(e,t){if(Wv.has(t)){const n=a8(t);return n&&n.default||0}else{const n=ace(e),r=(UN(t)?n.getPropertyValue(t):n[t])||0;return typeof r=="string"?r.trim():r}},sortNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1},getBaseTarget(e,t){var n;return(n=e.style)===null||n===void 0?void 0:n[t]},measureViewportBox(e,{transformPagePoint:t}){return QD(e,t)},resetTransform(e,t,n){const{transformTemplate:r}=n;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform(e,t){e.style.transform=t.style.transform},removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]},makeTargetAnimatable(e,{transition:t,transitionEnd:n,...r},{transformValues:i},o=!0){let a=due(r,t||{},e);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){uue(e,r,a);const s=oce(e,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}},scrapeMotionValuesFromProps:q7,build(e,t,n,r,i){e.isVisible!==void 0&&(t.style.visibility=e.isVisible?"visible":"hidden"),G7(t,n,r,i.transformTemplate)},render:rD},sce=tz(az),lce=tz({...az,getBaseTarget(e,t){return e[t]},readValueFromInstance(e,t){var n;return Wv.has(t)?((n=a8(t))===null||n===void 0?void 0:n.default)||0:(t=iD.has(t)?t:nD(t),e.getAttribute(t))},scrapeMotionValuesFromProps:aD,build(e,t,n,r,i){Y7(t,n,r,i.transformTemplate)},render:oD}),uce=(e,t)=>V7(e)?lce(t,{enableHardwareAcceleration:!1}):sce(t,{enableHardwareAcceleration:!0});function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Rg={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(wt.test(e))e=parseFloat(e);else return e;const n=sA(e,t.target.x),r=sA(e,t.target.y);return`${n}% ${r}%`}},lA="_$css",cce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(rz,v=>(o.push(v),lA)));const a=bu.parse(e);if(a.length>5)return r;const s=bu.createTransformer(e),l=typeof a[0]!="number"?1:0,u=n.x.scale*t.x,h=n.y.scale*t.y;a[0+l]/=u,a[1+l]/=h;const p=wr(u,h,.5);typeof a[2+l]=="number"&&(a[2+l]/=p),typeof a[3+l]=="number"&&(a[3+l]/=p);let m=s(a);if(i){let v=0;m=m.replace(lA,()=>{const S=o[v];return v++,S})}return m}};class dce extends le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;Cae(hce),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Am.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||Cs.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n?.group&&n.group.remove(i),r?.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t?.()}render(){return null}}function fce(e){const[t,n]=o8(),r=C.exports.useContext(W7);return x(dce,{...e,layoutGroup:r,switchLayoutGroup:C.exports.useContext(WN),isPresent:t,safeToRemove:n})}const hce={borderRadius:{...Rg,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Rg,borderTopRightRadius:Rg,borderBottomLeftRadius:Rg,borderBottomRightRadius:Rg,boxShadow:cce},pce={measureLayout:fce};function gce(e,t,n={}){const r=ws(e)?e:F0(e);return u8("",r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const sz=["TopLeft","TopRight","BottomLeft","BottomRight"],mce=sz.length,uA=e=>typeof e=="string"?parseFloat(e):e,cA=e=>typeof e=="number"||wt.test(e);function vce(e,t,n,r,i,o){var a,s,l,u;i?(e.opacity=wr(0,(a=n.opacity)!==null&&a!==void 0?a:1,yce(r)),e.opacityExit=wr((s=t.opacity)!==null&&s!==void 0?s:1,0,Sce(r))):o&&(e.opacity=wr((l=t.opacity)!==null&&l!==void 0?l:1,(u=n.opacity)!==null&&u!==void 0?u:1,r));for(let h=0;hrt?1:n(Sv(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function us(e,t){fA(e.x,t.x),fA(e.y,t.y)}function hA(e,t,n,r,i){return e-=t,e=H4(e,1/n,r),i!==void 0&&(e=H4(e,1/i,r)),e}function bce(e,t=0,n=1,r=.5,i,o=e,a=e){if(Cl.test(t)&&(t=parseFloat(t),t=wr(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=wr(o.min,o.max,r);e===o&&(s-=t),e.min=hA(e.min,t,n,s,i),e.max=hA(e.max,t,n,s,i)}function pA(e,t,[n,r,i],o,a){bce(e,t[n],t[r],t[i],t.scale,o,a)}const xce=["x","scaleX","originX"],wce=["y","scaleY","originY"];function gA(e,t,n,r){pA(e.x,t,xce,n?.x,r?.x),pA(e.y,t,wce,n?.y,r?.y)}function mA(e){return e.translate===0&&e.scale===1}function uz(e){return mA(e.x)&&mA(e.y)}function cz(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function vA(e){return ca(e.x)/ca(e.y)}function Cce(e,t,n=.1){return i8(e,t)<=n}class _ce{constructor(){this.members=[]}add(t){c8(this.members,t),t.scheduleRender()}remove(t){if(d8(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues,t.snapshot.isShared=!0),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const kce="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function yA(e,t,n){const r=e.x.translate/t.x,i=e.y.translate/t.y;let o=`translate3d(${r}px, ${i}px, 0) `;if(o+=`scale(${1/t.x}, ${1/t.y}) `,n){const{rotate:l,rotateX:u,rotateY:h}=n;l&&(o+=`rotate(${l}deg) `),u&&(o+=`rotateX(${u}deg) `),h&&(o+=`rotateY(${h}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return o+=`scale(${a}, ${s})`,o===kce?"none":o}const Ece=(e,t)=>e.depth-t.depth;class Pce{constructor(){this.children=[],this.isDirty=!1}add(t){c8(this.children,t),this.isDirty=!0}remove(t){d8(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ece),this.isDirty=!1,this.children.forEach(t)}}const SA=["","X","Y","Z"],bA=1e3;function dz({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t?.()){this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Oce),this.nodes.forEach(Ice)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let u=0;uthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=VD(v,250),Am.hasAnimatedSinceResize&&(Am.hasAnimatedSinceResize=!1,this.nodes.forEach(wA))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&p&&(u||h)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:v,hasRelativeTargetChanged:S,layout:w})=>{var E,P,k,T,M;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const I=(P=(E=this.options.transition)!==null&&E!==void 0?E:p.getDefaultTransition())!==null&&P!==void 0?P:Bce,{onLayoutAnimationStart:R,onLayoutAnimationComplete:N}=p.getProps(),z=!this.targetLayout||!cz(this.targetLayout,w)||S,$=!v&&S;if(((k=this.resumeFrom)===null||k===void 0?void 0:k.instance)||$||v&&(z||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,$);const W={...l8(I,"layout"),onPlay:R,onComplete:N};p.shouldReduceMotion&&(W.delay=0,W.type=!1),this.startAnimation(W)}else!v&&this.animationProgress===0&&wA(this),this.isLead()&&((M=(T=this.options).onExitComplete)===null||M===void 0||M.call(T));this.targetLayout=w})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Qf.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Rce))}willUpdate(a=!0){var s,l,u;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){if(this.snapshot||!this.instance)return;const a=this.measure(),s=this.removeTransform(this.removeElementScroll(a));EA(s),this.snapshot={measured:a,layout:s,latestValues:{}}}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u{var k;const T=P/1e3;CA(m.x,a.x,T),CA(m.y,a.y,T),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((k=this.relativeParent)===null||k===void 0?void 0:k.layout)&&(Rm(v,this.layout.actual,this.relativeParent.layout.actual),Dce(this.relativeTarget,this.relativeTargetOrigin,v,T)),S&&(this.animationValues=p,vce(p,h,this.latestValues,T,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Qf.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Cs.update(()=>{Am.hasAnimatedSinceResize=!0,this.currentAnimation=gce(0,bA,{...a,onUpdate:u=>{var h;this.mixTargetDelta(u),(h=a.onUpdate)===null||h===void 0||h.call(a,u)},onComplete:()=>{var u;(u=a.onComplete)===null||u===void 0||u.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,bA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:h}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&fz(this.options.animationType,this.layout.actual,u.actual)){l=this.target||_i();const p=ca(this.layout.actual.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const m=ca(this.layout.actual.y);l.y.min=a.target.y.min,l.y.max=l.y.min+m}us(s,l),qp(s,h),Im(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(a,s){var l,u,h;this.sharedNodes.has(a)||this.sharedNodes.set(a,new _ce),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(h=(u=s.options.initialPromotionConfig)===null||u===void 0?void 0:u.shouldPreserveFollowOpacity)===null||h===void 0?void 0:h.call(u,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const l={};for(let u=0;u{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(xA),this.root.sharedNodes.clear()}}}function Tce(e){e.updateLayout()}function Ace(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{actual:o,measured:a}=e.layout,{animationType:s}=e.options;s==="size"?ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=ca(v);v.min=o[m].min,v.max=v.min+S}):fz(s,i.layout,o)&&ll(m=>{const v=i.isShared?i.measured[m]:i.layout[m],S=ca(o[m]);v.max=v.min+S});const l=Nm();Im(l,o,i.layout);const u=Nm();i.isShared?Im(u,e.applyTransform(a,!0),i.measured):Im(u,o,i.layout);const h=!uz(l);let p=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){const{snapshot:m,layout:v}=e.relativeParent;if(m&&v){const S=_i();Rm(S,i.layout,m.layout);const w=_i();Rm(w,o,v.actual),cz(S,w)||(p=!0)}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:l,hasLayoutChanged:h,hasRelativeTargetChanged:p})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function Lce(e){e.clearSnapshot()}function xA(e){e.clearMeasurements()}function Mce(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function wA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Oce(e){e.resolveTargetDelta()}function Ice(e){e.calcProjection()}function Rce(e){e.resetRotation()}function Nce(e){e.removeLeadSnapshot()}function CA(e,t,n){e.translate=wr(t.translate,0,n),e.scale=wr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function _A(e,t,n,r){e.min=wr(t.min,n.min,r),e.max=wr(t.max,n.max,r)}function Dce(e,t,n,r){_A(e.x,t.x,n.x,r),_A(e.y,t.y,n.y,r)}function zce(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Bce={duration:.45,ease:[.4,0,.1,1]};function Fce(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function kA(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function EA(e){kA(e.x),kA(e.y)}function fz(e,t,n){return e==="position"||e==="preserve-aspect"&&!Cce(vA(t),vA(n),.2)}const $ce=dz({attachResizeListener:(e,t)=>aS(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Dx={current:void 0},Hce=dz({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Dx.current){const e=new $ce(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Dx.current=e}return Dx.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Wce={...wue,...Ole,...Vue,...pce},Il=xae((e,t)=>ase(e,t,Wce,uce,Hce));function hz(){const e=C.exports.useRef(!1);return L4(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Vce(){const e=hz(),[t,n]=C.exports.useState(0),r=C.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[C.exports.useCallback(()=>Cs.postRender(r),[r]),t]}class Uce extends C.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Gce({children:e,isPresent:t}){const n=C.exports.useId(),r=C.exports.useRef(null),i=C.exports.useRef({width:0,height:0,top:0,left:0});return C.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${a}px !important; - top: ${s}px !important; - left: ${l}px !important; - } - `),()=>{document.head.removeChild(u)}},[t]),x(Uce,{isPresent:t,childRef:r,sizeRef:i,children:C.exports.cloneElement(e,{ref:r})})}const zx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=oS(jce),l=C.exports.useId(),u=C.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:h=>{s.set(h,!0);for(const p of s.values())if(!p)return;r&&r()},register:h=>(s.set(h,!1),()=>s.delete(h))}),o?void 0:[n]);return C.exports.useMemo(()=>{s.forEach((h,p)=>s.set(p,!1))},[n]),C.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=x(Gce,{isPresent:n,children:e})),x(n1.Provider,{value:u,children:e})};function jce(){return new Map}const Ip=e=>e.key||"";function Yce(e,t){e.forEach(n=>{const r=Ip(n);t.set(r,n)})}function qce(e){const t=[];return C.exports.Children.forEach(e,n=>{C.exports.isValidElement(n)&&t.push(n)}),t}const dd=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",BD(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Vce();const l=C.exports.useContext(W7).forceRender;l&&(s=l);const u=hz(),h=qce(e);let p=h;const m=new Set,v=C.exports.useRef(p),S=C.exports.useRef(new Map).current,w=C.exports.useRef(!0);if(L4(()=>{w.current=!1,Yce(h,S),v.current=p}),Z7(()=>{w.current=!0,S.clear(),m.clear()}),w.current)return x(Nn,{children:p.map(T=>x(zx,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a,children:T},Ip(T)))});p=[...p];const E=v.current.map(Ip),P=h.map(Ip),k=E.length;for(let T=0;T{if(P.indexOf(T)!==-1)return;const M=S.get(T);if(!M)return;const I=E.indexOf(T),R=()=>{S.delete(T),m.delete(T);const N=v.current.findIndex(z=>z.key===T);if(v.current.splice(N,1),!m.size){if(v.current=h,u.current===!1)return;s(),r&&r()}};p.splice(I,0,x(zx,{isPresent:!1,onExitComplete:R,custom:t,presenceAffectsLayout:o,mode:a,children:M},Ip(M)))}),p=p.map(T=>{const M=T.key;return m.has(M)?T:x(zx,{isPresent:!0,presenceAffectsLayout:o,mode:a,children:T},Ip(T))}),zD!=="production"&&a==="wait"&&p.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),x(Nn,{children:m.size?p:p.map(T=>C.exports.cloneElement(T))})};var pl=function(){return pl=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function fC(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;re.filter(Boolean).join(" ");function Kce(){return!1}var Xce=e=>{const{condition:t,message:n}=e;t&&Kce()&&console.warn(n)},If={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Ng={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function hC(e){switch(e?.direction??"right"){case"right":return Ng.slideRight;case"left":return Ng.slideLeft;case"bottom":return Ng.slideDown;case"top":return Ng.slideUp;default:return Ng.slideRight}}var Wf={enter:{duration:.2,ease:If.easeOut},exit:{duration:.1,ease:If.easeIn}},_s={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t?.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t?.exit})},Zce=e=>e!=null&&parseInt(e.toString(),10)>0,TA={exit:{height:{duration:.2,ease:If.ease},opacity:{duration:.3,ease:If.ease}},enter:{height:{duration:.3,ease:If.ease},opacity:{duration:.4,ease:If.ease}}},Qce={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:Zce(t)?1:0},height:t,transitionEnd:r?.exit,transition:n?.exit??_s.exit(TA.exit,i)}),enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>({...e&&{opacity:1},height:t,transitionEnd:r?.enter,transition:n?.enter??_s.enter(TA.enter,i)})},gz=C.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:u,transitionEnd:h,...p}=e,[m,v]=C.exports.useState(!1);C.exports.useEffect(()=>{const k=setTimeout(()=>{v(!0)});return()=>clearTimeout(k)},[]),Xce({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const S=parseFloat(o.toString())>0,w={startingHeight:o,endingHeight:a,animateOpacity:i,transition:m?u:{enter:{duration:0}},transitionEnd:{enter:h?.enter,exit:r?h?.exit:{...h?.exit,display:S?"block":"none"}}},E=r?n:!0,P=n||r?"enter":"exit";return x(dd,{initial:!1,custom:w,children:E&&le.createElement(Il.div,{ref:t,...p,className:Yv("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:w,variants:Qce,initial:r?"exit":!1,animate:P,exit:"exit"})})});gz.displayName="Collapse";var Jce={enter:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:1,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({transition:e,transitionEnd:t,delay:n}={})=>({opacity:0,transition:e?.exit??_s.exit(Wf.exit,n),transitionEnd:t?.exit})},mz={initial:"exit",animate:"enter",exit:"exit",variants:Jce},ede=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...u}=t,h=i||r?"enter":"exit",p=r?i&&r:!0,m={transition:a,transitionEnd:s,delay:l};return x(dd,{custom:m,children:p&&le.createElement(Il.div,{ref:n,className:Yv("chakra-fade",o),custom:m,...mz,animate:h,...u})})});ede.displayName="Fade";var tde={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,...e?{scale:t,transitionEnd:r?.exit}:{transitionEnd:{scale:t,...r?.exit}},transition:n?.exit??_s.exit(Wf.exit,i)}),enter:({transitionEnd:e,transition:t,delay:n})=>({opacity:1,scale:1,transition:t?.enter??_s.enter(Wf.enter,n),transitionEnd:e?.enter})},vz={initial:"exit",animate:"enter",exit:"exit",variants:tde},nde=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:u,delay:h,...p}=t,m=r?i&&r:!0,v=i||r?"enter":"exit",S={initialScale:a,reverse:o,transition:l,transitionEnd:u,delay:h};return x(dd,{custom:S,children:m&&le.createElement(Il.div,{ref:n,className:Yv("chakra-offset-slide",s),...vz,animate:v,custom:S,...p})})});nde.displayName="ScaleFade";var AA={exit:{duration:.15,ease:If.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},rde={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{const{exit:i}=hC({direction:e});return{...i,transition:t?.exit??_s.exit(AA.exit,r),transitionEnd:n?.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{const{enter:i}=hC({direction:e});return{...i,transition:n?.enter??_s.enter(AA.enter,r),transitionEnd:t?.enter}}},yz=C.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:u,delay:h,motionProps:p,...m}=t,v=hC({direction:r}),S=Object.assign({position:"fixed"},v.position,i),w=o?a&&o:!0,E=a||o?"enter":"exit",P={transitionEnd:u,transition:l,direction:r,delay:h};return x(dd,{custom:P,children:w&&le.createElement(Il.div,{...m,ref:n,initial:"exit",className:Yv("chakra-slide",s),animate:E,exit:"exit",custom:P,variants:rde,style:S,...p})})});yz.displayName="Slide";var ide={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>({opacity:0,x:e,y:t,transition:n?.exit??_s.exit(Wf.exit,i),transitionEnd:r?.exit}),enter:({transition:e,transitionEnd:t,delay:n})=>({opacity:1,x:0,y:0,transition:e?.enter??_s.enter(Wf.enter,n),transitionEnd:t?.enter}),exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{const a={x:t,y:e};return{opacity:0,transition:n?.exit??_s.exit(Wf.exit,o),...i?{...a,transitionEnd:r?.exit}:{transitionEnd:{...a,...r?.exit}}}}},pC={initial:"initial",animate:"enter",exit:"exit",variants:ide},ode=C.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:u,transitionEnd:h,delay:p,...m}=t,v=r?i&&r:!0,S=i||r?"enter":"exit",w={offsetX:s,offsetY:l,reverse:o,transition:u,transitionEnd:h,delay:p};return x(dd,{custom:w,children:v&&le.createElement(Il.div,{ref:n,className:Yv("chakra-offset-slide",a),custom:w,...pC,animate:S,...m})})});ode.displayName="SlideFade";var qv=(...e)=>e.filter(Boolean).join(" ");function ade(){return!1}var fS=e=>{const{condition:t,message:n}=e;t&&ade()&&console.warn(n)};function Bx(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[sde,hS]=xn({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),[lde,h8]=xn({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),[ude,zPe,cde,dde]=FN(),Rf=Pe(function(t,n){const{getButtonProps:r}=h8(),i=r(t,n),a={display:"flex",alignItems:"center",width:"100%",outline:0,...hS().button};return le.createElement(we.button,{...i,className:qv("chakra-accordion__button",t.className),__css:a})});Rf.displayName="AccordionButton";function fde(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;gde(e),mde(e);const s=cde(),[l,u]=C.exports.useState(-1);C.exports.useEffect(()=>()=>{u(-1)},[]);const[h,p]=tS({value:r,defaultValue(){return i?n??[]:n??-1},onChange:t});return{index:h,setIndex:p,htmlProps:a,getAccordionItemProps:v=>{let S=!1;return v!==null&&(S=Array.isArray(h)?h.includes(v):h===v),{isOpen:S,onChange:E=>{if(v!==null)if(i&&Array.isArray(h)){const P=E?h.concat(v):h.filter(k=>k!==v);p(P)}else E?p(v):o&&p(-1)}}},focusedIndex:l,setFocusedIndex:u,descendants:s}}var[hde,p8]=xn({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function pde(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=p8(),s=C.exports.useRef(null),l=C.exports.useId(),u=r??l,h=`accordion-button-${u}`,p=`accordion-panel-${u}`;vde(e);const{register:m,index:v,descendants:S}=dde({disabled:t&&!n}),{isOpen:w,onChange:E}=o(v===-1?null:v);yde({isOpen:w,isDisabled:t});const P=()=>{E?.(!0)},k=()=>{E?.(!1)},T=C.exports.useCallback(()=>{E?.(!w),a(v)},[v,a,w,E]),M=C.exports.useCallback(z=>{const W={ArrowDown:()=>{const q=S.nextEnabled(v);q?.node.focus()},ArrowUp:()=>{const q=S.prevEnabled(v);q?.node.focus()},Home:()=>{const q=S.firstEnabled();q?.node.focus()},End:()=>{const q=S.lastEnabled();q?.node.focus()}}[z.key];W&&(z.preventDefault(),W(z))},[S,v]),I=C.exports.useCallback(()=>{a(v)},[a,v]),R=C.exports.useCallback(function($={},W=null){return{...$,type:"button",ref:$n(m,s,W),id:h,disabled:!!t,"aria-expanded":!!w,"aria-controls":p,onClick:Bx($.onClick,T),onFocus:Bx($.onFocus,I),onKeyDown:Bx($.onKeyDown,M)}},[h,t,w,T,I,M,p,m]),N=C.exports.useCallback(function($={},W=null){return{...$,ref:W,role:"region",id:p,"aria-labelledby":h,hidden:!w}},[h,w,p]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:P,onClose:k,getButtonProps:R,getPanelProps:N,htmlProps:i}}function gde(e){const t=e.index||e.defaultIndex,n=t!=null&&!Array.isArray(t)&&e.allowMultiple;fS({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function mde(e){fS({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function vde(e){fS({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well. - `})}function yde(e){fS({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}function Nf(e){const{isOpen:t,isDisabled:n}=h8(),{reduceMotion:r}=p8(),i=qv("chakra-accordion__icon",e.className),o=hS(),a={opacity:n?.4:1,transform:t?"rotate(-180deg)":void 0,transition:r?void 0:"transform 0.2s",transformOrigin:"center",...o.icon};return x(ga,{viewBox:"0 0 24 24","aria-hidden":!0,className:i,__css:a,...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})})}Nf.displayName="AccordionIcon";var Df=Pe(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=pde(t),l={...hS().container,overflowAnchor:"none"},u=C.exports.useMemo(()=>a,[a]);return le.createElement(lde,{value:u},le.createElement(we.div,{ref:n,...o,className:qv("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});Df.displayName="AccordionItem";var zf=Pe(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=p8(),{getPanelProps:s,isOpen:l}=h8(),u=s(o,n),h=qv("chakra-accordion__panel",r),p=hS();a||delete u.hidden;const m=le.createElement(we.div,{...u,__css:p.panel,className:h});return a?m:x(gz,{in:l,...i,children:m})});zf.displayName="AccordionPanel";var pS=Pe(function({children:t,reduceMotion:n,...r},i){const o=Ii("Accordion",r),a=gn(r),{htmlProps:s,descendants:l,...u}=fde(a),h=C.exports.useMemo(()=>({...u,reduceMotion:!!n}),[u,n]);return le.createElement(ude,{value:l},le.createElement(hde,{value:h},le.createElement(sde,{value:o},le.createElement(we.div,{ref:i,...s,className:qv("chakra-accordion",r.className),__css:o.root},t))))});pS.displayName="Accordion";var Sde=(...e)=>e.filter(Boolean).join(" "),bde=cd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Kv=Pe((e,t)=>{const n=so("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=gn(e),u=Sde("chakra-spinner",s),h={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${bde} ${o} linear infinite`,...n};return le.createElement(we.div,{ref:t,__css:h,className:u,...l},r&&le.createElement(we.span,{srOnly:!0},r))});Kv.displayName="Spinner";var gS=(...e)=>e.filter(Boolean).join(" ");function xde(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})})}function wde(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})})}function LA(e){return x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})}var[Cde,_de]=xn({name:"AlertContext",hookName:"useAlertContext",providerName:""}),[kde,g8]=xn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),Sz={info:{icon:wde,colorScheme:"blue"},warning:{icon:LA,colorScheme:"orange"},success:{icon:xde,colorScheme:"green"},error:{icon:LA,colorScheme:"red"},loading:{icon:Kv,colorScheme:"blue"}};function Ede(e){return Sz[e].colorScheme}function Pde(e){return Sz[e].icon}var bz=Pe(function(t,n){const{status:r="info",addRole:i=!0,...o}=gn(t),a=t.colorScheme??Ede(r),s=Ii("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return le.createElement(Cde,{value:{status:r}},le.createElement(kde,{value:s},le.createElement(we.div,{role:i?"alert":void 0,ref:n,...o,className:gS("chakra-alert",t.className),__css:l})))});bz.displayName="Alert";var xz=Pe(function(t,n){const i={display:"inline",...g8().description};return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__desc",t.className),__css:i})});xz.displayName="AlertDescription";function wz(e){const{status:t}=_de(),n=Pde(t),r=g8(),i=t==="loading"?r.spinner:r.icon;return le.createElement(we.span,{display:"inherit",...e,className:gS("chakra-alert__icon",e.className),__css:i},e.children||x(n,{h:"100%",w:"100%"}))}wz.displayName="AlertIcon";var Cz=Pe(function(t,n){const r=g8();return le.createElement(we.div,{ref:n,...t,className:gS("chakra-alert__title",t.className),__css:r.title})});Cz.displayName="AlertTitle";function Tde(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ade(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[u,h]=C.exports.useState("pending");C.exports.useEffect(()=>{h(n?"loading":"pending")},[n]);const p=C.exports.useRef(),m=C.exports.useCallback(()=>{if(!n)return;v();const S=new Image;S.src=n,a&&(S.crossOrigin=a),r&&(S.srcset=r),s&&(S.sizes=s),t&&(S.loading=t),S.onload=w=>{v(),h("loaded"),i?.(w)},S.onerror=w=>{v(),h("failed"),o?.(w)},p.current=S},[n,a,r,s,i,o,t]),v=()=>{p.current&&(p.current.onload=null,p.current.onerror=null,p.current=null)};return bs(()=>{if(!l)return u==="loading"&&m(),()=>{v()}},[u,m,l]),l?"loaded":u}var Lde=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",W4=Pe(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return x("img",{width:r,height:i,ref:n,alt:o,...a})});W4.displayName="NativeImage";var mS=Pe(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:u,ignoreFallback:h,crossOrigin:p,fallbackStrategy:m="beforeLoadOrError",referrerPolicy:v,...S}=t,w=r!==void 0||i!==void 0,E=u!=null||h||!w,P=Ade({...t,ignoreFallback:E}),k=Lde(P,m),T={ref:n,objectFit:l,objectPosition:s,...E?S:Tde(S,["onError","onLoad"])};return k?i||le.createElement(we.img,{as:W4,className:"chakra-image__placeholder",src:r,...T}):le.createElement(we.img,{as:W4,src:o,srcSet:a,crossOrigin:p,loading:u,referrerPolicy:v,className:"chakra-image",...T})});mS.displayName="Image";Pe((e,t)=>le.createElement(we.img,{ref:t,as:W4,className:"chakra-image",...e}));function vS(e){return C.exports.Children.toArray(e).filter(t=>C.exports.isValidElement(t))}var yS=(...e)=>e.filter(Boolean).join(" "),MA=e=>e?"":void 0,[Mde,Ode]=xn({strict:!1,name:"ButtonGroupContext"});function gC(e){const{children:t,className:n,...r}=e,i=C.exports.isValidElement(t)?C.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=yS("chakra-button__icon",n);return le.createElement(we.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}gC.displayName="ButtonIcon";function mC(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=x(Kv,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=yS("chakra-button__spinner",o),u=n==="start"?"marginEnd":"marginStart",h=C.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[u]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,u,r]);return le.createElement(we.div,{className:l,...s,__css:h},i)}mC.displayName="ButtonSpinner";function Ide(e){const[t,n]=C.exports.useState(!e);return{ref:C.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Da=Pe((e,t)=>{const n=Ode(),r=so("Button",{...n,...e}),{isDisabled:i=n?.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:u,loadingText:h,iconSpacing:p="0.5rem",type:m,spinner:v,spinnerPlacement:S="start",className:w,as:E,...P}=gn(e),k=C.exports.useMemo(()=>{const R={...r?._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:R}}},[r,n]),{ref:T,type:M}=Ide(E),I={rightIcon:u,leftIcon:l,iconSpacing:p,children:s};return le.createElement(we.button,{disabled:i||o,ref:nae(t,T),as:E,type:m??M,"data-active":MA(a),"data-loading":MA(o),__css:k,className:yS("chakra-button",w),...P},o&&S==="start"&&x(mC,{className:"chakra-button__spinner--start",label:h,placement:"start",spacing:p,children:v}),o?h||le.createElement(we.span,{opacity:0},x(OA,{...I})):x(OA,{...I}),o&&S==="end"&&x(mC,{className:"chakra-button__spinner--end",label:h,placement:"end",spacing:p,children:v}))});Da.displayName="Button";function OA(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return ne(Nn,{children:[t&&x(gC,{marginEnd:i,children:t}),r,n&&x(gC,{marginStart:i,children:n})]})}var Ia=Pe(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:u,...h}=t,p=yS("chakra-button__group",a),m=C.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:u}),[r,i,o,u]);let v={display:"inline-flex"};return l?v={...v,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:v={...v,"& > *:not(style) ~ *:not(style)":{marginStart:s}},le.createElement(Mde,{value:m},le.createElement(we.div,{ref:n,role:"group",__css:v,className:p,"data-attached":l?"":void 0,...h}))});Ia.displayName="ButtonGroup";var Ps=Pe((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=C.exports.isValidElement(s)?C.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return x(Da,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a,children:l})});Ps.displayName="IconButton";var o1=(...e)=>e.filter(Boolean).join(" "),My=e=>e?"":void 0,Fx=e=>e?!0:void 0;function IA(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[Rde,_z]=xn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[Nde,a1]=xn({strict:!1,name:"FormControlContext"});function Dde(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=C.exports.useId(),l=t||`field-${s}`,u=`${l}-label`,h=`${l}-feedback`,p=`${l}-helptext`,[m,v]=C.exports.useState(!1),[S,w]=C.exports.useState(!1),[E,P]=C.exports.useState(!1),k=C.exports.useCallback((N={},z=null)=>({id:p,...N,ref:$n(z,$=>{!$||w(!0)})}),[p]),T=C.exports.useCallback((N={},z=null)=>({...N,ref:z,"data-focus":My(E),"data-disabled":My(i),"data-invalid":My(r),"data-readonly":My(o),id:N.id??u,htmlFor:N.htmlFor??l}),[l,i,E,r,o,u]),M=C.exports.useCallback((N={},z=null)=>({id:h,...N,ref:$n(z,$=>{!$||v(!0)}),"aria-live":"polite"}),[h]),I=C.exports.useCallback((N={},z=null)=>({...N,...a,ref:z,role:"group"}),[a]),R=C.exports.useCallback((N={},z=null)=>({...N,ref:z,role:"presentation","aria-hidden":!0,children:N.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!E,onFocus:()=>P(!0),onBlur:()=>P(!1),hasFeedbackText:m,setHasFeedbackText:v,hasHelpText:S,setHasHelpText:w,id:l,labelId:u,feedbackId:h,helpTextId:p,htmlProps:a,getHelpTextProps:k,getErrorMessageProps:M,getRootProps:I,getLabelProps:T,getRequiredIndicatorProps:R}}var fd=Pe(function(t,n){const r=Ii("Form",t),i=gn(t),{getRootProps:o,htmlProps:a,...s}=Dde(i),l=o1("chakra-form-control",t.className);return le.createElement(Nde,{value:s},le.createElement(Rde,{value:r},le.createElement(we.div,{...o({},n),className:l,__css:r.container})))});fd.displayName="FormControl";var zde=Pe(function(t,n){const r=a1(),i=_z(),o=o1("chakra-form__helper-text",t.className);return le.createElement(we.div,{...r?.getHelpTextProps(t,n),__css:i.helperText,className:o})});zde.displayName="FormHelperText";function m8(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=v8(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Fx(n),"aria-required":Fx(i),"aria-readonly":Fx(r)}}function v8(e){const t=a1(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:u,onFocus:h,onBlur:p,...m}=e,v=e["aria-describedby"]?[e["aria-describedby"]]:[];return t?.hasFeedbackText&&t?.isInvalid&&v.push(t.feedbackId),t?.hasHelpText&&v.push(t.helpTextId),{...m,"aria-describedby":v.join(" ")||void 0,id:n??t?.id,isDisabled:r??u??t?.isDisabled,isReadOnly:i??l??t?.isReadOnly,isRequired:o??a??t?.isRequired,isInvalid:s??t?.isInvalid,onFocus:IA(t?.onFocus,h),onBlur:IA(t?.onBlur,p)}}var[Bde,Fde]=xn({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),$de=Pe((e,t)=>{const n=Ii("FormError",e),r=gn(e),i=a1();return i?.isInvalid?le.createElement(Bde,{value:n},le.createElement(we.div,{...i?.getErrorMessageProps(r,t),className:o1("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});$de.displayName="FormErrorMessage";var Hde=Pe((e,t)=>{const n=Fde(),r=a1();if(!r?.isInvalid)return null;const i=o1("chakra-form__error-icon",e.className);return x(ga,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i,children:x("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})})});Hde.displayName="FormErrorIcon";var lh=Pe(function(t,n){const r=so("FormLabel",t),i=gn(t),{className:o,children:a,requiredIndicator:s=x(kz,{}),optionalIndicator:l=null,...u}=i,h=a1(),p=h?.getLabelProps(u,n)??{ref:n,...u};return le.createElement(we.label,{...p,className:o1("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,h?.isRequired?s:l)});lh.displayName="FormLabel";var kz=Pe(function(t,n){const r=a1(),i=_z();if(!r?.isRequired)return null;const o=o1("chakra-form__required-indicator",t.className);return le.createElement(we.span,{...r?.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});kz.displayName="RequiredIndicator";function ed(e,t){const n=C.exports.useRef(!1),r=C.exports.useRef(!1);C.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),C.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}var y8={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},Wde=we("span",{baseStyle:y8});Wde.displayName="VisuallyHidden";var Vde=we("input",{baseStyle:y8});Vde.displayName="VisuallyHiddenInput";var RA=!1,SS=null,$0=!1,vC=new Set,Ude=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function Gde(e){return!(e.metaKey||!Ude&&e.altKey||e.ctrlKey)}function S8(e,t){vC.forEach(n=>n(e,t))}function NA(e){$0=!0,Gde(e)&&(SS="keyboard",S8("keyboard",e))}function Sp(e){SS="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&($0=!0,S8("pointer",e))}function jde(e){e.target===window||e.target===document||($0||(SS="keyboard",S8("keyboard",e)),$0=!1)}function Yde(){$0=!1}function DA(){return SS!=="pointer"}function qde(){if(typeof window>"u"||RA)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){$0=!0,e.apply(this,n)},document.addEventListener("keydown",NA,!0),document.addEventListener("keyup",NA,!0),window.addEventListener("focus",jde,!0),window.addEventListener("blur",Yde,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",Sp,!0),document.addEventListener("pointermove",Sp,!0),document.addEventListener("pointerup",Sp,!0)):(document.addEventListener("mousedown",Sp,!0),document.addEventListener("mousemove",Sp,!0),document.addEventListener("mouseup",Sp,!0)),RA=!0}function Kde(e){qde(),e(DA());const t=()=>e(DA());return vC.add(t),()=>{vC.delete(t)}}var[BPe,Xde]=xn({name:"CheckboxGroupContext",strict:!1}),Zde=(...e)=>e.filter(Boolean).join(" "),Qi=e=>e?"":void 0;function Ea(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Qde(...e){return function(n){e.forEach(r=>{r?.(n)})}}function Jde(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e},x("polyline",{points:"1.5 6 4.5 9 10.5 1"}))}function efe(e){return le.createElement(we.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e},x("line",{x1:"21",x2:"3",y1:"12",y2:"12"}))}function tfe(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?efe:Jde;return n||t?le.createElement(we.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"}},x(i,{...r})):null}function nfe(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ez(e={}){const t=v8(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:a,onBlur:s,onFocus:l,"aria-describedby":u}=t,{defaultChecked:h,isChecked:p,isFocusable:m,onChange:v,isIndeterminate:S,name:w,value:E,tabIndex:P=void 0,"aria-label":k,"aria-labelledby":T,"aria-invalid":M,...I}=e,R=nfe(I,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),N=cr(v),z=cr(s),$=cr(l),[W,q]=C.exports.useState(!1),[de,H]=C.exports.useState(!1),[J,re]=C.exports.useState(!1),[oe,X]=C.exports.useState(!1);C.exports.useEffect(()=>Kde(q),[]);const G=C.exports.useRef(null),[Q,j]=C.exports.useState(!0),[Z,me]=C.exports.useState(!!h),Se=p!==void 0,xe=Se?p:Z,Fe=C.exports.useCallback(Ae=>{if(r||n){Ae.preventDefault();return}Se||me(xe?Ae.target.checked:S?!0:Ae.target.checked),N?.(Ae)},[r,n,xe,Se,S,N]);bs(()=>{G.current&&(G.current.indeterminate=Boolean(S))},[S]),ed(()=>{n&&H(!1)},[n,H]),bs(()=>{const Ae=G.current;!Ae?.form||(Ae.form.onreset=()=>{me(!!h)})},[]);const We=n&&!m,ht=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!0)},[X]),qe=C.exports.useCallback(Ae=>{Ae.key===" "&&X(!1)},[X]);bs(()=>{if(!G.current)return;G.current.checked!==xe&&me(G.current.checked)},[G.current]);const rt=C.exports.useCallback((Ae={},it=null)=>{const Ot=lt=>{de&<.preventDefault(),X(!0)};return{...Ae,ref:it,"data-active":Qi(oe),"data-hover":Qi(J),"data-checked":Qi(xe),"data-focus":Qi(de),"data-focus-visible":Qi(de&&W),"data-indeterminate":Qi(S),"data-disabled":Qi(n),"data-invalid":Qi(o),"data-readonly":Qi(r),"aria-hidden":!0,onMouseDown:Ea(Ae.onMouseDown,Ot),onMouseUp:Ea(Ae.onMouseUp,()=>X(!1)),onMouseEnter:Ea(Ae.onMouseEnter,()=>re(!0)),onMouseLeave:Ea(Ae.onMouseLeave,()=>re(!1))}},[oe,xe,n,de,W,J,S,o,r]),Ze=C.exports.useCallback((Ae={},it=null)=>({...R,...Ae,ref:$n(it,Ot=>{!Ot||j(Ot.tagName==="LABEL")}),onClick:Ea(Ae.onClick,()=>{var Ot;Q||((Ot=G.current)==null||Ot.click(),requestAnimationFrame(()=>{var lt;(lt=G.current)==null||lt.focus()}))}),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[R,n,xe,o,Q]),Xe=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:$n(G,it),type:"checkbox",name:w,value:E,id:a,tabIndex:P,onChange:Ea(Ae.onChange,Fe),onBlur:Ea(Ae.onBlur,z,()=>H(!1)),onFocus:Ea(Ae.onFocus,$,()=>H(!0)),onKeyDown:Ea(Ae.onKeyDown,ht),onKeyUp:Ea(Ae.onKeyUp,qe),required:i,checked:xe,disabled:We,readOnly:r,"aria-label":k,"aria-labelledby":T,"aria-invalid":M?Boolean(M):o,"aria-describedby":u,"aria-disabled":n,style:y8}),[w,E,a,Fe,z,$,ht,qe,i,xe,We,r,k,T,M,o,u,n,P]),Et=C.exports.useCallback((Ae={},it=null)=>({...Ae,ref:it,onMouseDown:Ea(Ae.onMouseDown,zA),onTouchStart:Ea(Ae.onTouchStart,zA),"data-disabled":Qi(n),"data-checked":Qi(xe),"data-invalid":Qi(o)}),[xe,n,o]);return{state:{isInvalid:o,isFocused:de,isChecked:xe,isActive:oe,isHovered:J,isIndeterminate:S,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:Ze,getCheckboxProps:rt,getInputProps:Xe,getLabelProps:Et,htmlProps:R}}function zA(e){e.preventDefault(),e.stopPropagation()}var rfe={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},ife={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},ofe=cd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),afe=cd({from:{opacity:0},to:{opacity:1}}),sfe=cd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Pz=Pe(function(t,n){const r=Xde(),i={...r,...t},o=Ii("Checkbox",i),a=gn(t),{spacing:s="0.5rem",className:l,children:u,iconColor:h,iconSize:p,icon:m=x(tfe,{}),isChecked:v,isDisabled:S=r?.isDisabled,onChange:w,inputProps:E,...P}=a;let k=v;r?.value&&a.value&&(k=r.value.includes(a.value));let T=w;r?.onChange&&a.value&&(T=Qde(r.onChange,w));const{state:M,getInputProps:I,getCheckboxProps:R,getLabelProps:N,getRootProps:z}=Ez({...P,isDisabled:S,isChecked:k,onChange:T}),$=C.exports.useMemo(()=>({animation:M.isIndeterminate?`${afe} 20ms linear, ${sfe} 200ms linear`:`${ofe} 200ms linear`,fontSize:p,color:h,...o.icon}),[h,p,,M.isIndeterminate,o.icon]),W=C.exports.cloneElement(m,{__css:$,isIndeterminate:M.isIndeterminate,isChecked:M.isChecked});return le.createElement(we.label,{__css:{...ife,...o.container},className:Zde("chakra-checkbox",l),...z()},x("input",{className:"chakra-checkbox__input",...I(E,n)}),le.createElement(we.span,{__css:{...rfe,...o.control},className:"chakra-checkbox__control",...R()},W),u&&le.createElement(we.span,{className:"chakra-checkbox__label",...N(),__css:{marginStart:s,...o.label}},u))});Pz.displayName="Checkbox";function lfe(e){return x(ga,{focusable:"false","aria-hidden":!0,...e,children:x("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})})}var bS=Pe(function(t,n){const r=so("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=gn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return le.createElement(we.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||x(lfe,{width:"1em",height:"1em"}))});bS.displayName="CloseButton";function ufe(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function b8(e,t){let n=ufe(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function yC(e){if(!Number.isFinite(e))return 0;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n+=1;return n}function V4(e,t,n){return(e-t)*100/(n-t)}function Tz(e,t,n){return(n-t)*e+t}function SC(e,t,n){const r=Math.round((e-t)/n)*n+t,i=yC(n);return b8(r,i)}function y0(e,t,n){return e==null?e:(nr==null?"":$x(r,o,n)??""),m=typeof i<"u",v=m?i:h,S=Az(_c(v),o),w=n??S,E=C.exports.useCallback(W=>{W!==v&&(m||p(W.toString()),u?.(W.toString(),_c(W)))},[u,m,v]),P=C.exports.useCallback(W=>{let q=W;return l&&(q=y0(q,a,s)),b8(q,w)},[w,l,s,a]),k=C.exports.useCallback((W=o)=>{let q;v===""?q=_c(W):q=_c(v)+W,q=P(q),E(q)},[P,o,E,v]),T=C.exports.useCallback((W=o)=>{let q;v===""?q=_c(-W):q=_c(v)-W,q=P(q),E(q)},[P,o,E,v]),M=C.exports.useCallback(()=>{let W;r==null?W="":W=$x(r,o,n)??a,E(W)},[r,n,o,E,a]),I=C.exports.useCallback(W=>{const q=$x(W,o,w)??a;E(q)},[w,o,E,a]),R=_c(v);return{isOutOfRange:R>s||Rx(Z5,{styles:Lz}),ffe=()=>x(Z5,{styles:` - html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: system-ui, sans-serif; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - -moz-osx-font-smoothing: grayscale; - touch-action: manipulation; - } - - body { - position: relative; - min-height: 100%; - font-feature-settings: 'kern'; - } - - *, - *::before, - *::after { - border-width: 0; - border-style: solid; - box-sizing: border-box; - } - - main { - display: block; - } - - hr { - border-top-width: 1px; - box-sizing: content-box; - height: 0; - overflow: visible; - } - - pre, - code, - kbd, - samp { - font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace; - font-size: 1em; - } - - a { - background-color: transparent; - color: inherit; - text-decoration: inherit; - } - - abbr[title] { - border-bottom: none; - text-decoration: underline; - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; - } - - b, - strong { - font-weight: bold; - } - - small { - font-size: 80%; - } - - sub, - sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; - } - - sub { - bottom: -0.25em; - } - - sup { - top: -0.5em; - } - - img { - border-style: none; - } - - button, - input, - optgroup, - select, - textarea { - font-family: inherit; - font-size: 100%; - line-height: 1.15; - margin: 0; - } - - button, - input { - overflow: visible; - } - - button, - select { - text-transform: none; - } - - button::-moz-focus-inner, - [type="button"]::-moz-focus-inner, - [type="reset"]::-moz-focus-inner, - [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; - } - - fieldset { - padding: 0.35em 0.75em 0.625em; - } - - legend { - box-sizing: border-box; - color: inherit; - display: table; - max-width: 100%; - padding: 0; - white-space: normal; - } - - progress { - vertical-align: baseline; - } - - textarea { - overflow: auto; - } - - [type="checkbox"], - [type="radio"] { - box-sizing: border-box; - padding: 0; - } - - [type="number"]::-webkit-inner-spin-button, - [type="number"]::-webkit-outer-spin-button { - -webkit-appearance: none !important; - } - - input[type="number"] { - -moz-appearance: textfield; - } - - [type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; - } - - [type="search"]::-webkit-search-decoration { - -webkit-appearance: none !important; - } - - ::-webkit-file-upload-button { - -webkit-appearance: button; - font: inherit; - } - - details { - display: block; - } - - summary { - display: list-item; - } - - template { - display: none; - } - - [hidden] { - display: none !important; - } - - body, - blockquote, - dl, - dd, - h1, - h2, - h3, - h4, - h5, - h6, - hr, - figure, - p, - pre { - margin: 0; - } - - button { - background: transparent; - padding: 0; - } - - fieldset { - margin: 0; - padding: 0; - } - - ol, - ul { - margin: 0; - padding: 0; - } - - textarea { - resize: vertical; - } - - button, - [role="button"] { - cursor: pointer; - } - - button::-moz-focus-inner { - border: 0 !important; - } - - table { - border-collapse: collapse; - } - - h1, - h2, - h3, - h4, - h5, - h6 { - font-size: inherit; - font-weight: inherit; - } - - button, - input, - optgroup, - select, - textarea { - padding: 0; - line-height: inherit; - color: inherit; - } - - img, - svg, - video, - canvas, - audio, - iframe, - embed, - object { - display: block; - } - - img, - video { - max-width: 100%; - height: auto; - } - - [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) { - outline: none; - box-shadow: none; - } - - select::-ms-expand { - display: none; - } - - ${Lz} - `});function Vf(e,t,n,r){const i=cr(n);return C.exports.useEffect(()=>{const o=typeof e=="function"?e():e??document;if(!(!n||!o))return o.addEventListener(t,i,r),()=>{o.removeEventListener(t,i,r)}},[t,e,r,i,n]),()=>{const o=typeof e=="function"?e():e??document;o?.removeEventListener(t,i,r)}}function hfe(e){return"current"in e}var Mz=()=>typeof window<"u";function pfe(){const e=navigator.userAgentData;return e?.platform??navigator.platform}var gfe=e=>Mz()&&e.test(navigator.vendor),mfe=e=>Mz()&&e.test(pfe()),vfe=()=>mfe(/mac|iphone|ipad|ipod/i),yfe=()=>vfe()&&gfe(/apple/i);function Sfe(e){const{ref:t,elements:n,enabled:r}=e,i=()=>{var o;return((o=t.current)==null?void 0:o.ownerDocument)??document};Vf(i,"pointerdown",o=>{if(!yfe()||!r)return;const a=o.target,l=(n??[t]).some(u=>{const h=hfe(u)?u.current:u;return h?.contains(a)||h===a});i().activeElement!==a&&l&&(o.preventDefault(),a.focus())})}var bfe=hJ?C.exports.useLayoutEffect:C.exports.useEffect;function BA(e,t=[]){const n=C.exports.useRef(e);return bfe(()=>{n.current=e}),C.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function xfe(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function wfe(e,t){const n=C.exports.useId();return C.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function U4(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=BA(n),a=BA(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),[u,h]=xfe(r,s),p=wfe(i,"disclosure"),m=C.exports.useCallback(()=>{u||l(!1),a?.()},[u,a]),v=C.exports.useCallback(()=>{u||l(!0),o?.()},[u,o]),S=C.exports.useCallback(()=>{(h?m:v)()},[h,v,m]);return{isOpen:!!h,onOpen:v,onClose:m,onToggle:S,isControlled:u,getButtonProps:(w={})=>({...w,"aria-expanded":h,"aria-controls":p,onClick:pJ(w.onClick,S)}),getDisclosureProps:(w={})=>({...w,hidden:!h,id:p})}}function x8(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var w8=Pe(function(t,n){const{htmlSize:r,...i}=t,o=Ii("Input",i),a=gn(i),s=m8(a),l=Ir("chakra-input",t.className);return le.createElement(we.input,{size:r,...s,__css:o.field,ref:n,className:l})});w8.displayName="Input";w8.id="Input";var[Cfe,Oz]=xn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_fe=Pe(function(t,n){const r=Ii("Input",t),{children:i,className:o,...a}=gn(t),s=Ir("chakra-input__group",o),l={},u=vS(i),h=r.field;u.forEach(m=>{!r||(h&&m.type.id==="InputLeftElement"&&(l.paddingStart=h.height??h.h),h&&m.type.id==="InputRightElement"&&(l.paddingEnd=h.height??h.h),m.type.id==="InputRightAddon"&&(l.borderEndRadius=0),m.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const p=u.map(m=>{var v,S;const w=x8({size:((v=m.props)==null?void 0:v.size)||t.size,variant:((S=m.props)==null?void 0:S.variant)||t.variant});return m.type.id!=="Input"?C.exports.cloneElement(m,w):C.exports.cloneElement(m,Object.assign(w,l,m.props))});return le.createElement(we.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},x(Cfe,{value:r,children:p}))});_fe.displayName="InputGroup";var kfe={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},Efe=we("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),C8=Pe(function(t,n){const{placement:r="left",...i}=t,o=kfe[r]??{},a=Oz();return x(Efe,{ref:n,...i,__css:{...a.addon,...o}})});C8.displayName="InputAddon";var Iz=Pe(function(t,n){return x(C8,{ref:n,placement:"left",...t,className:Ir("chakra-input__left-addon",t.className)})});Iz.displayName="InputLeftAddon";Iz.id="InputLeftAddon";var Rz=Pe(function(t,n){return x(C8,{ref:n,placement:"right",...t,className:Ir("chakra-input__right-addon",t.className)})});Rz.displayName="InputRightAddon";Rz.id="InputRightAddon";var Pfe=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),xS=Pe(function(t,n){const{placement:r="left",...i}=t,o=Oz(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:a?.height??a?.h,height:a?.height??a?.h,fontSize:a?.fontSize,...o.element};return x(Pfe,{ref:n,__css:l,...i})});xS.id="InputElement";xS.displayName="InputElement";var Nz=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__left-element",r);return x(xS,{ref:n,placement:"left",className:o,...i})});Nz.id="InputLeftElement";Nz.displayName="InputLeftElement";var Dz=Pe(function(t,n){const{className:r,...i}=t,o=Ir("chakra-input__right-element",r);return x(xS,{ref:n,placement:"right",className:o,...i})});Dz.id="InputRightElement";Dz.displayName="InputRightElement";function Tfe(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function td(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Tfe(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Afe=Pe(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=C.exports.Children.only(r),s=Ir("chakra-aspect-ratio",i);return le.createElement(we.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:td(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Afe.displayName="AspectRatio";var Lfe=Pe(function(t,n){const r=so("Badge",t),{className:i,...o}=gn(t);return le.createElement(we.span,{ref:n,className:Ir("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Lfe.displayName="Badge";var hd=we("div");hd.displayName="Box";var zz=Pe(function(t,n){const{size:r,centerContent:i=!0,...o}=t;return x(hd,{ref:n,boxSize:r,__css:{...i?{display:"flex",alignItems:"center",justifyContent:"center"}:{},flexShrink:0,flexGrow:0},...o})});zz.displayName="Square";var Mfe=Pe(function(t,n){const{size:r,...i}=t;return x(zz,{size:r,ref:n,borderRadius:"9999px",...i})});Mfe.displayName="Circle";var Bz=we("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Bz.displayName="Center";var Ofe={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};Pe(function(t,n){const{axis:r="both",...i}=t;return le.createElement(we.div,{ref:n,__css:Ofe[r],...i,position:"absolute"})});var Ife=Pe(function(t,n){const r=so("Code",t),{className:i,...o}=gn(t);return le.createElement(we.code,{ref:n,className:Ir("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});Ife.displayName="Code";var Rfe=Pe(function(t,n){const{className:r,centerContent:i,...o}=gn(t),a=so("Container",t);return le.createElement(we.div,{ref:n,className:Ir("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Rfe.displayName="Container";var Nfe=Pe(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:u,...h}=so("Divider",t),{className:p,orientation:m="horizontal",__css:v,...S}=gn(t),w={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return le.createElement(we.hr,{ref:n,"aria-orientation":m,...S,__css:{...h,border:"0",borderColor:u,borderStyle:l,...w[m],...v},className:Ir("chakra-divider",p)})});Nfe.displayName="Divider";var nn=Pe(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:u,...h}=t,p={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:u};return le.createElement(we.div,{ref:n,__css:p,...h})});nn.displayName="Flex";var Fz=Pe(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:u,autoRows:h,templateRows:p,autoColumns:m,templateColumns:v,...S}=t,w={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:m,gridColumn:s,gridRow:l,gridAutoFlow:u,gridAutoRows:h,gridTemplateRows:p,gridTemplateColumns:v};return le.createElement(we.div,{ref:n,__css:w,...S})});Fz.displayName="Grid";function FA(e){return td(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Dfe=Pe(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:u,...h}=t,p=x8({gridArea:r,gridColumn:FA(i),gridRow:FA(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:u,gridRowEnd:s});return le.createElement(we.div,{ref:n,__css:p,...h})});Dfe.displayName="GridItem";var Uf=Pe(function(t,n){const r=so("Heading",t),{className:i,...o}=gn(t);return le.createElement(we.h2,{ref:n,className:Ir("chakra-heading",t.className),...o,__css:r})});Uf.displayName="Heading";Pe(function(t,n){const r=so("Mark",t),i=gn(t);return x(hd,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var zfe=Pe(function(t,n){const r=so("Kbd",t),{className:i,...o}=gn(t);return le.createElement(we.kbd,{ref:n,className:Ir("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});zfe.displayName="Kbd";var Gf=Pe(function(t,n){const r=so("Link",t),{className:i,isExternal:o,...a}=gn(t);return le.createElement(we.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:Ir("chakra-link",i),...a,__css:r})});Gf.displayName="Link";Pe(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return le.createElement(we.a,{...s,ref:n,className:Ir("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.div,{ref:n,position:"relative",...i,className:Ir("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[Bfe,$z]=xn({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),_8=Pe(function(t,n){const r=Ii("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=gn(t),u=vS(i),p=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return le.createElement(Bfe,{value:r},le.createElement(we.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...p},...l},u))});_8.displayName="List";var Ffe=Pe((e,t)=>{const{as:n,...r}=e;return x(_8,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});Ffe.displayName="OrderedList";var Hz=Pe(function(t,n){const{as:r,...i}=t;return x(_8,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});Hz.displayName="UnorderedList";var Wz=Pe(function(t,n){const r=$z();return le.createElement(we.li,{ref:n,...t,__css:r.item})});Wz.displayName="ListItem";var $fe=Pe(function(t,n){const r=$z();return x(ga,{ref:n,role:"presentation",...t,__css:r.icon})});$fe.displayName="ListIcon";var Hfe=Pe(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,u=t1(),h=s?Vfe(s,u):Ufe(r);return x(Fz,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:h,...l})});Hfe.displayName="SimpleGrid";function Wfe(e){return typeof e=="number"?`${e}px`:e}function Vfe(e,t){return td(e,n=>{const r=Goe("sizes",n,Wfe(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function Ufe(e){return td(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var Vz=we("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});Vz.displayName="Spacer";var bC="& > *:not(style) ~ *:not(style)";function Gfe(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[bC]:td(n,i=>r[i])}}function jfe(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":td(n,i=>r[i])}}var Uz=e=>le.createElement(we.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});Uz.displayName="StackItem";var k8=Pe((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:u,className:h,shouldWrapChildren:p,...m}=e,v=n?"row":r??"column",S=C.exports.useMemo(()=>Gfe({direction:v,spacing:a}),[v,a]),w=C.exports.useMemo(()=>jfe({spacing:a,direction:v}),[a,v]),E=!!u,P=!p&&!E,k=C.exports.useMemo(()=>{const M=vS(l);return P?M:M.map((I,R)=>{const N=typeof I.key<"u"?I.key:R,z=R+1===M.length,W=p?x(Uz,{children:I},N):I;if(!E)return W;const q=C.exports.cloneElement(u,{__css:w}),de=z?null:q;return ne(C.exports.Fragment,{children:[W,de]},N)})},[u,w,E,P,p,l]),T=Ir("chakra-stack",h);return le.createElement(we.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:S.flexDirection,flexWrap:s,className:T,__css:E?{}:{[bC]:S[bC]},...m},k)});k8.displayName="Stack";var Gz=Pe((e,t)=>x(k8,{align:"center",...e,direction:"row",ref:t}));Gz.displayName="HStack";var jz=Pe((e,t)=>x(k8,{align:"center",...e,direction:"column",ref:t}));jz.displayName="VStack";var Eo=Pe(function(t,n){const r=so("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=gn(t),u=x8({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return le.createElement(we.p,{ref:n,className:Ir("chakra-text",t.className),...u,...l,__css:r})});Eo.displayName="Text";function $A(e){return typeof e=="number"?`${e}px`:e}var Yfe=Pe(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:u,className:h,shouldWrapChildren:p,...m}=t,v=C.exports.useMemo(()=>{const{spacingX:w=r,spacingY:E=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":P=>td(w,k=>$A(A6("space",k)(P))),"--chakra-wrap-y-spacing":P=>td(E,k=>$A(A6("space",k)(P))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:u,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,u,l]),S=C.exports.useMemo(()=>p?C.exports.Children.map(a,(w,E)=>x(Yz,{children:w},E)):a,[a,p]);return le.createElement(we.div,{ref:n,className:Ir("chakra-wrap",h),overflow:"hidden",...m},le.createElement(we.ul,{className:"chakra-wrap__list",__css:v},S))});Yfe.displayName="Wrap";var Yz=Pe(function(t,n){const{className:r,...i}=t;return le.createElement(we.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:Ir("chakra-wrap__listitem",r),...i})});Yz.displayName="WrapItem";var qfe={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},qz=qfe,bp=()=>{},Kfe={document:qz,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:bp,removeEventListener:bp,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:bp,removeListener:bp}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)},setTimeout:()=>0,clearTimeout:bp,setInterval:()=>0,clearInterval:bp},Xfe=Kfe,Zfe={window:Xfe,document:qz},Kz=typeof window<"u"?{window,document}:Zfe,Xz=C.exports.createContext(Kz);Xz.displayName="EnvironmentContext";function Zz(e){const{children:t,environment:n}=e,[r,i]=C.exports.useState(null),[o,a]=C.exports.useState(!1);C.exports.useEffect(()=>a(!0),[]);const s=C.exports.useMemo(()=>{if(n)return n;const l=r?.ownerDocument,u=r?.ownerDocument.defaultView;return l?{document:l,window:u}:Kz},[r,n]);return ne(Xz.Provider,{value:s,children:[t,!n&&o&&x("span",{id:"__chakra_env",hidden:!0,ref:l=>{C.exports.startTransition(()=>{l&&i(l)})}})]})}Zz.displayName="EnvironmentProvider";var Qfe=e=>e?"":void 0;function Jfe(){const e=C.exports.useRef(new Map),t=e.current,n=C.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=C.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return C.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Hx(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function ehe(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:u,onKeyUp:h,tabIndex:p,onMouseOver:m,onMouseLeave:v,...S}=e,[w,E]=C.exports.useState(!0),[P,k]=C.exports.useState(!1),T=Jfe(),M=X=>{!X||X.tagName!=="BUTTON"&&E(!1)},I=w?p:p||0,R=n&&!r,N=C.exports.useCallback(X=>{if(n){X.stopPropagation(),X.preventDefault();return}X.currentTarget.focus(),l?.(X)},[n,l]),z=C.exports.useCallback(X=>{P&&Hx(X)&&(X.preventDefault(),X.stopPropagation(),k(!1),T.remove(document,"keyup",z,!1))},[P,T]),$=C.exports.useCallback(X=>{if(u?.(X),n||X.defaultPrevented||X.metaKey||!Hx(X.nativeEvent)||w)return;const G=i&&X.key==="Enter";o&&X.key===" "&&(X.preventDefault(),k(!0)),G&&(X.preventDefault(),X.currentTarget.click()),T.add(document,"keyup",z,!1)},[n,w,u,i,o,T,z]),W=C.exports.useCallback(X=>{if(h?.(X),n||X.defaultPrevented||X.metaKey||!Hx(X.nativeEvent)||w)return;o&&X.key===" "&&(X.preventDefault(),k(!1),X.currentTarget.click())},[o,w,n,h]),q=C.exports.useCallback(X=>{X.button===0&&(k(!1),T.remove(document,"mouseup",q,!1))},[T]),de=C.exports.useCallback(X=>{if(X.button!==0)return;if(n){X.stopPropagation(),X.preventDefault();return}w||k(!0),X.currentTarget.focus({preventScroll:!0}),T.add(document,"mouseup",q,!1),a?.(X)},[n,w,a,T,q]),H=C.exports.useCallback(X=>{X.button===0&&(w||k(!1),s?.(X))},[s,w]),J=C.exports.useCallback(X=>{if(n){X.preventDefault();return}m?.(X)},[n,m]),re=C.exports.useCallback(X=>{P&&(X.preventDefault(),k(!1)),v?.(X)},[P,v]),oe=$n(t,M);return w?{...S,ref:oe,type:"button","aria-disabled":R?void 0:n,disabled:R,onClick:N,onMouseDown:a,onMouseUp:s,onKeyUp:h,onKeyDown:u,onMouseOver:m,onMouseLeave:v}:{...S,ref:oe,role:"button","data-active":Qfe(P),"aria-disabled":n?"true":void 0,tabIndex:R?void 0:I,onClick:N,onMouseDown:de,onMouseUp:H,onKeyUp:W,onKeyDown:$,onMouseOver:J,onMouseLeave:re}}function Qz(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Jz(e){if(!Qz(e))return!1;const t=e.ownerDocument.defaultView??window;return e instanceof t.HTMLElement}function the(e){var t;return((t=eB(e))==null?void 0:t.defaultView)??window}function eB(e){return Qz(e)?e.ownerDocument:document}function nhe(e){return eB(e).activeElement}var tB=e=>e.hasAttribute("tabindex"),rhe=e=>tB(e)&&e.tabIndex===-1;function ihe(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function nB(e){return e.parentElement&&nB(e.parentElement)?!0:e.hidden}function ohe(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function rB(e){if(!Jz(e)||nB(e)||ihe(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():ohe(e)?!0:tB(e)}function ahe(e){return e?Jz(e)&&rB(e)&&!rhe(e):!1}var she=["input:not(:disabled):not([disabled])","select:not(:disabled):not([disabled])","textarea:not(:disabled):not([disabled])","embed","iframe","object","a[href]","area[href]","button:not(:disabled):not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],lhe=she.join(),uhe=e=>e.offsetWidth>0&&e.offsetHeight>0;function iB(e){const t=Array.from(e.querySelectorAll(lhe));return t.unshift(e),t.filter(n=>rB(n)&&uhe(n))}function che(e){const t=e.current;if(!t)return!1;const n=nhe(t);return!n||t.contains(n)?!1:!!ahe(n)}function dhe(e,t){const{shouldFocus:n,visible:r,focusRef:i}=t,o=n&&!r;ed(()=>{if(!o||che(e))return;const a=i?.current||e.current;a&&requestAnimationFrame(()=>{a.focus()})},[o,e,i])}var fhe={preventScroll:!0,shouldFocus:!1};function hhe(e,t=fhe){const{focusRef:n,preventScroll:r,shouldFocus:i,visible:o}=t,a=phe(e)?e.current:e,s=i&&o,l=C.exports.useRef(s),u=C.exports.useRef(o);bs(()=>{!u.current&&o&&(l.current=s),u.current=o},[o,s]);const h=C.exports.useCallback(()=>{if(!(!o||!a||!l.current)&&(l.current=!1,!a.contains(document.activeElement)))if(n?.current)requestAnimationFrame(()=>{var p;(p=n.current)==null||p.focus({preventScroll:r})});else{const p=iB(a);p.length>0&&requestAnimationFrame(()=>{p[0].focus({preventScroll:r})})}},[o,r,a,n]);ed(()=>{h()},[h]),Vf(a,"transitionend",h)}function phe(e){return"current"in e}var Mo="top",$a="bottom",Ha="right",Oo="left",E8="auto",Xv=[Mo,$a,Ha,Oo],H0="start",wv="end",ghe="clippingParents",oB="viewport",Dg="popper",mhe="reference",HA=Xv.reduce(function(e,t){return e.concat([t+"-"+H0,t+"-"+wv])},[]),aB=[].concat(Xv,[E8]).reduce(function(e,t){return e.concat([t,t+"-"+H0,t+"-"+wv])},[]),vhe="beforeRead",yhe="read",She="afterRead",bhe="beforeMain",xhe="main",whe="afterMain",Che="beforeWrite",_he="write",khe="afterWrite",Ehe=[vhe,yhe,She,bhe,xhe,whe,Che,_he,khe];function Tl(e){return e?(e.nodeName||"").toLowerCase():null}function Va(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jf(e){var t=Va(e).Element;return e instanceof t||e instanceof Element}function za(e){var t=Va(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function P8(e){if(typeof ShadowRoot>"u")return!1;var t=Va(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Phe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!za(o)||!Tl(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function The(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!za(i)||!Tl(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const Ahe={name:"applyStyles",enabled:!0,phase:"write",fn:Phe,effect:The,requires:["computeStyles"]};function _l(e){return e.split("-")[0]}var jf=Math.max,G4=Math.min,W0=Math.round;function xC(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sB(){return!/^((?!chrome|android).)*safari/i.test(xC())}function V0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&za(e)&&(i=e.offsetWidth>0&&W0(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&W0(r.height)/e.offsetHeight||1);var a=Jf(e)?Va(e):window,s=a.visualViewport,l=!sB()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/i,h=(r.top+(l&&s?s.offsetTop:0))/o,p=r.width/i,m=r.height/o;return{width:p,height:m,top:h,right:u+p,bottom:h+m,left:u,x:u,y:h}}function T8(e){var t=V0(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function lB(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&P8(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function xu(e){return Va(e).getComputedStyle(e)}function Lhe(e){return["table","td","th"].indexOf(Tl(e))>=0}function pd(e){return((Jf(e)?e.ownerDocument:e.document)||window.document).documentElement}function wS(e){return Tl(e)==="html"?e:e.assignedSlot||e.parentNode||(P8(e)?e.host:null)||pd(e)}function WA(e){return!za(e)||xu(e).position==="fixed"?null:e.offsetParent}function Mhe(e){var t=/firefox/i.test(xC()),n=/Trident/i.test(xC());if(n&&za(e)){var r=xu(e);if(r.position==="fixed")return null}var i=wS(e);for(P8(i)&&(i=i.host);za(i)&&["html","body"].indexOf(Tl(i))<0;){var o=xu(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 Zv(e){for(var t=Va(e),n=WA(e);n&&Lhe(n)&&xu(n).position==="static";)n=WA(n);return n&&(Tl(n)==="html"||Tl(n)==="body"&&xu(n).position==="static")?t:n||Mhe(e)||t}function A8(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dm(e,t,n){return jf(e,G4(t,n))}function Ohe(e,t,n){var r=Dm(e,t,n);return r>n?n:r}function uB(){return{top:0,right:0,bottom:0,left:0}}function cB(e){return Object.assign({},uB(),e)}function dB(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ihe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,cB(typeof t!="number"?t:dB(t,Xv))};function Rhe(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=_l(n.placement),l=A8(s),u=[Oo,Ha].indexOf(s)>=0,h=u?"height":"width";if(!(!o||!a)){var p=Ihe(i.padding,n),m=T8(o),v=l==="y"?Mo:Oo,S=l==="y"?$a:Ha,w=n.rects.reference[h]+n.rects.reference[l]-a[l]-n.rects.popper[h],E=a[l]-n.rects.reference[l],P=Zv(o),k=P?l==="y"?P.clientHeight||0:P.clientWidth||0:0,T=w/2-E/2,M=p[v],I=k-m[h]-p[S],R=k/2-m[h]/2+T,N=Dm(M,R,I),z=l;n.modifiersData[r]=(t={},t[z]=N,t.centerOffset=N-R,t)}}function Nhe(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!lB(t.elements.popper,i)||(t.elements.arrow=i))}const Dhe={name:"arrow",enabled:!0,phase:"main",fn:Rhe,effect:Nhe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function U0(e){return e.split("-")[1]}var zhe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bhe(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:W0(t*i)/i||0,y:W0(n*i)/i||0}}function VA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,h=e.roundOffsets,p=e.isFixed,m=a.x,v=m===void 0?0:m,S=a.y,w=S===void 0?0:S,E=typeof h=="function"?h({x:v,y:w}):{x:v,y:w};v=E.x,w=E.y;var P=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),T=Oo,M=Mo,I=window;if(u){var R=Zv(n),N="clientHeight",z="clientWidth";if(R===Va(n)&&(R=pd(n),xu(R).position!=="static"&&s==="absolute"&&(N="scrollHeight",z="scrollWidth")),R=R,i===Mo||(i===Oo||i===Ha)&&o===wv){M=$a;var $=p&&R===I&&I.visualViewport?I.visualViewport.height:R[N];w-=$-r.height,w*=l?1:-1}if(i===Oo||(i===Mo||i===$a)&&o===wv){T=Ha;var W=p&&R===I&&I.visualViewport?I.visualViewport.width:R[z];v-=W-r.width,v*=l?1:-1}}var q=Object.assign({position:s},u&&zhe),de=h===!0?Bhe({x:v,y:w}):{x:v,y:w};if(v=de.x,w=de.y,l){var H;return Object.assign({},q,(H={},H[M]=k?"0":"",H[T]=P?"0":"",H.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",H))}return Object.assign({},q,(t={},t[M]=k?w+"px":"",t[T]=P?v+"px":"",t.transform="",t))}function Fhe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:_l(t.placement),variation:U0(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,VA(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,VA(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const $he={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fhe,data:{}};var Oy={passive:!0};function Hhe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Va(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(h){h.addEventListener("scroll",n.update,Oy)}),s&&l.addEventListener("resize",n.update,Oy),function(){o&&u.forEach(function(h){h.removeEventListener("scroll",n.update,Oy)}),s&&l.removeEventListener("resize",n.update,Oy)}}const Whe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Hhe,data:{}};var Vhe={left:"right",right:"left",bottom:"top",top:"bottom"};function R3(e){return e.replace(/left|right|bottom|top/g,function(t){return Vhe[t]})}var Uhe={start:"end",end:"start"};function UA(e){return e.replace(/start|end/g,function(t){return Uhe[t]})}function L8(e){var t=Va(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function M8(e){return V0(pd(e)).left+L8(e).scrollLeft}function Ghe(e,t){var n=Va(e),r=pd(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=sB();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+M8(e),y:l}}function jhe(e){var t,n=pd(e),r=L8(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=jf(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=jf(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+M8(e),l=-r.scrollTop;return xu(i||n).direction==="rtl"&&(s+=jf(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function O8(e){var t=xu(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fB(e){return["html","body","#document"].indexOf(Tl(e))>=0?e.ownerDocument.body:za(e)&&O8(e)?e:fB(wS(e))}function zm(e,t){var n;t===void 0&&(t=[]);var r=fB(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Va(r),a=i?[o].concat(o.visualViewport||[],O8(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(zm(wS(a)))}function wC(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Yhe(e,t){var n=V0(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function GA(e,t,n){return t===oB?wC(Ghe(e,n)):Jf(t)?Yhe(t,n):wC(jhe(pd(e)))}function qhe(e){var t=zm(wS(e)),n=["absolute","fixed"].indexOf(xu(e).position)>=0,r=n&&za(e)?Zv(e):e;return Jf(r)?t.filter(function(i){return Jf(i)&&lB(i,r)&&Tl(i)!=="body"}):[]}function Khe(e,t,n,r){var i=t==="clippingParents"?qhe(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,u){var h=GA(e,u,r);return l.top=jf(h.top,l.top),l.right=G4(h.right,l.right),l.bottom=G4(h.bottom,l.bottom),l.left=jf(h.left,l.left),l},GA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function hB(e){var t=e.reference,n=e.element,r=e.placement,i=r?_l(r):null,o=r?U0(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Mo:l={x:a,y:t.y-n.height};break;case $a:l={x:a,y:t.y+t.height};break;case Ha:l={x:t.x+t.width,y:s};break;case Oo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=i?A8(i):null;if(u!=null){var h=u==="y"?"height":"width";switch(o){case H0:l[u]=l[u]-(t[h]/2-n[h]/2);break;case wv:l[u]=l[u]+(t[h]/2-n[h]/2);break}}return l}function Cv(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?ghe:s,u=n.rootBoundary,h=u===void 0?oB:u,p=n.elementContext,m=p===void 0?Dg:p,v=n.altBoundary,S=v===void 0?!1:v,w=n.padding,E=w===void 0?0:w,P=cB(typeof E!="number"?E:dB(E,Xv)),k=m===Dg?mhe:Dg,T=e.rects.popper,M=e.elements[S?k:m],I=Khe(Jf(M)?M:M.contextElement||pd(e.elements.popper),l,h,a),R=V0(e.elements.reference),N=hB({reference:R,element:T,strategy:"absolute",placement:i}),z=wC(Object.assign({},T,N)),$=m===Dg?z:R,W={top:I.top-$.top+P.top,bottom:$.bottom-I.bottom+P.bottom,left:I.left-$.left+P.left,right:$.right-I.right+P.right},q=e.modifiersData.offset;if(m===Dg&&q){var de=q[i];Object.keys(W).forEach(function(H){var J=[Ha,$a].indexOf(H)>=0?1:-1,re=[Mo,$a].indexOf(H)>=0?"y":"x";W[H]+=de[re]*J})}return W}function Xhe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?aB:l,h=U0(r),p=h?s?HA:HA.filter(function(S){return U0(S)===h}):Xv,m=p.filter(function(S){return u.indexOf(S)>=0});m.length===0&&(m=p);var v=m.reduce(function(S,w){return S[w]=Cv(e,{placement:w,boundary:i,rootBoundary:o,padding:a})[_l(w)],S},{});return Object.keys(v).sort(function(S,w){return v[S]-v[w]})}function Zhe(e){if(_l(e)===E8)return[];var t=R3(e);return[UA(e),t,UA(t)]}function Qhe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,h=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,S=v===void 0?!0:v,w=n.allowedAutoPlacements,E=t.options.placement,P=_l(E),k=P===E,T=l||(k||!S?[R3(E)]:Zhe(E)),M=[E].concat(T).reduce(function(xe,Fe){return xe.concat(_l(Fe)===E8?Xhe(t,{placement:Fe,boundary:h,rootBoundary:p,padding:u,flipVariations:S,allowedAutoPlacements:w}):Fe)},[]),I=t.rects.reference,R=t.rects.popper,N=new Map,z=!0,$=M[0],W=0;W=0,re=J?"width":"height",oe=Cv(t,{placement:q,boundary:h,rootBoundary:p,altBoundary:m,padding:u}),X=J?H?Ha:Oo:H?$a:Mo;I[re]>R[re]&&(X=R3(X));var G=R3(X),Q=[];if(o&&Q.push(oe[de]<=0),s&&Q.push(oe[X]<=0,oe[G]<=0),Q.every(function(xe){return xe})){$=q,z=!1;break}N.set(q,Q)}if(z)for(var j=S?3:1,Z=function(Fe){var We=M.find(function(ht){var qe=N.get(ht);if(qe)return qe.slice(0,Fe).every(function(rt){return rt})});if(We)return $=We,"break"},me=j;me>0;me--){var Se=Z(me);if(Se==="break")break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const Jhe={name:"flip",enabled:!0,phase:"main",fn:Qhe,requiresIfExists:["offset"],data:{_skip:!1}};function jA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function YA(e){return[Mo,Ha,$a,Oo].some(function(t){return e[t]>=0})}function epe(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Cv(t,{elementContext:"reference"}),s=Cv(t,{altBoundary:!0}),l=jA(a,r),u=jA(s,i,o),h=YA(l),p=YA(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const tpe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:epe};function npe(e,t,n){var r=_l(e),i=[Oo,Mo].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Oo,Ha].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function rpe(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=aB.reduce(function(h,p){return h[p]=npe(p,t.rects,o),h},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const ipe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rpe};function ope(e){var t=e.state,n=e.name;t.modifiersData[n]=hB({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ape={name:"popperOffsets",enabled:!0,phase:"read",fn:ope,data:{}};function spe(e){return e==="x"?"y":"x"}function lpe(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,h=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,S=n.tetherOffset,w=S===void 0?0:S,E=Cv(t,{boundary:l,rootBoundary:u,padding:p,altBoundary:h}),P=_l(t.placement),k=U0(t.placement),T=!k,M=A8(P),I=spe(M),R=t.modifiersData.popperOffsets,N=t.rects.reference,z=t.rects.popper,$=typeof w=="function"?w(Object.assign({},t.rects,{placement:t.placement})):w,W=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,de={x:0,y:0};if(!!R){if(o){var H,J=M==="y"?Mo:Oo,re=M==="y"?$a:Ha,oe=M==="y"?"height":"width",X=R[M],G=X+E[J],Q=X-E[re],j=v?-z[oe]/2:0,Z=k===H0?N[oe]:z[oe],me=k===H0?-z[oe]:-N[oe],Se=t.elements.arrow,xe=v&&Se?T8(Se):{width:0,height:0},Fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uB(),We=Fe[J],ht=Fe[re],qe=Dm(0,N[oe],xe[oe]),rt=T?N[oe]/2-j-qe-We-W.mainAxis:Z-qe-We-W.mainAxis,Ze=T?-N[oe]/2+j+qe+ht+W.mainAxis:me+qe+ht+W.mainAxis,Xe=t.elements.arrow&&Zv(t.elements.arrow),Et=Xe?M==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,bt=(H=q?.[M])!=null?H:0,Ae=X+rt-bt-Et,it=X+Ze-bt,Ot=Dm(v?G4(G,Ae):G,X,v?jf(Q,it):Q);R[M]=Ot,de[M]=Ot-X}if(s){var lt,xt=M==="x"?Mo:Oo,_n=M==="x"?$a:Ha,Pt=R[I],Kt=I==="y"?"height":"width",kn=Pt+E[xt],mn=Pt-E[_n],Oe=[Mo,Oo].indexOf(P)!==-1,Je=(lt=q?.[I])!=null?lt:0,Xt=Oe?kn:Pt-N[Kt]-z[Kt]-Je+W.altAxis,jt=Oe?Pt+N[Kt]+z[Kt]-Je-W.altAxis:mn,Ee=v&&Oe?Ohe(Xt,Pt,jt):Dm(v?Xt:kn,Pt,v?jt:mn);R[I]=Ee,de[I]=Ee-Pt}t.modifiersData[r]=de}}const upe={name:"preventOverflow",enabled:!0,phase:"main",fn:lpe,requiresIfExists:["offset"]};function cpe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function dpe(e){return e===Va(e)||!za(e)?L8(e):cpe(e)}function fpe(e){var t=e.getBoundingClientRect(),n=W0(t.width)/e.offsetWidth||1,r=W0(t.height)/e.offsetHeight||1;return n!==1||r!==1}function hpe(e,t,n){n===void 0&&(n=!1);var r=za(t),i=za(t)&&fpe(t),o=pd(t),a=V0(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Tl(t)!=="body"||O8(o))&&(s=dpe(t)),za(t)?(l=V0(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=M8(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function ppe(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function gpe(e){var t=ppe(e);return Ehe.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function mpe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function vpe(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var qA={placement:"bottom",modifiers:[],strategy:"absolute"};function KA(){for(var e=arguments.length,t=new Array(e),n=0;n({var:e,varRef:t?`var(${e}, ${t})`:`var(${e})`}),Hr={arrowShadowColor:xp("--popper-arrow-shadow-color"),arrowSize:xp("--popper-arrow-size","8px"),arrowSizeHalf:xp("--popper-arrow-size-half"),arrowBg:xp("--popper-arrow-bg"),transformOrigin:xp("--popper-transform-origin"),arrowOffset:xp("--popper-arrow-offset")};function xpe(e){if(e.includes("top"))return"1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("bottom"))return"-1px -1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("right"))return"-1px 1px 1px 0 var(--popper-arrow-shadow-color)";if(e.includes("left"))return"1px -1px 1px 0 var(--popper-arrow-shadow-color)"}var wpe={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},Cpe=e=>wpe[e],XA={scroll:!0,resize:!0};function _pe(e){let t;return typeof e=="object"?t={enabled:!0,options:{...XA,...e}}:t={enabled:e,options:XA},t}var kpe={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:e})=>{e.styles.popper.width=`${e.rects.reference.width}px`},effect:({state:e})=>()=>{const t=e.elements.reference;e.elements.popper.style.width=`${t.offsetWidth}px`}},Epe={name:"transformOrigin",enabled:!0,phase:"write",fn:({state:e})=>{ZA(e)},effect:({state:e})=>()=>{ZA(e)}},ZA=e=>{e.elements.popper.style.setProperty(Hr.transformOrigin.var,Cpe(e.placement))},Ppe={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:({state:e})=>{Tpe(e)}},Tpe=e=>{var t;if(!e.placement)return;const n=Ape(e.placement);if(((t=e.elements)==null?void 0:t.arrow)&&n){Object.assign(e.elements.arrow.style,{[n.property]:n.value,width:Hr.arrowSize.varRef,height:Hr.arrowSize.varRef,zIndex:-1});const r={[Hr.arrowSizeHalf.var]:`calc(${Hr.arrowSize.varRef} / 2)`,[Hr.arrowOffset.var]:`calc(${Hr.arrowSizeHalf.varRef} * -1)`};for(const i in r)e.elements.arrow.style.setProperty(i,r[i])}},Ape=e=>{if(e.startsWith("top"))return{property:"bottom",value:Hr.arrowOffset.varRef};if(e.startsWith("bottom"))return{property:"top",value:Hr.arrowOffset.varRef};if(e.startsWith("left"))return{property:"right",value:Hr.arrowOffset.varRef};if(e.startsWith("right"))return{property:"left",value:Hr.arrowOffset.varRef}},Lpe={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:({state:e})=>{QA(e)},effect:({state:e})=>()=>{QA(e)}},QA=e=>{if(!e.elements.arrow)return;const t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");!t||Object.assign(t.style,{transform:"rotate(45deg)",background:Hr.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:xpe(e.placement)})},Mpe={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Ope={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Ipe(e,t="ltr"){var n;const r=((n=Mpe[e])==null?void 0:n[t])||e;return t==="ltr"?r:Ope[e]??r}function pB(e={}){const{enabled:t=!0,modifiers:n,placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:a=!0,offset:s,gutter:l=8,flip:u=!0,boundary:h="clippingParents",preventOverflow:p=!0,matchWidth:m,direction:v="ltr"}=e,S=C.exports.useRef(null),w=C.exports.useRef(null),E=C.exports.useRef(null),P=Ipe(r,v),k=C.exports.useRef(()=>{}),T=C.exports.useCallback(()=>{var W;!t||!S.current||!w.current||((W=k.current)==null||W.call(k),E.current=bpe(S.current,w.current,{placement:P,modifiers:[Lpe,Ppe,Epe,{...kpe,enabled:!!m},{name:"eventListeners",..._pe(a)},{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:s??[0,l]}},{name:"flip",enabled:!!u,options:{padding:8}},{name:"preventOverflow",enabled:!!p,options:{boundary:h}},...n??[]],strategy:i}),E.current.forceUpdate(),k.current=E.current.destroy)},[P,t,n,m,a,o,s,l,u,p,h,i]);C.exports.useEffect(()=>()=>{var W;!S.current&&!w.current&&((W=E.current)==null||W.destroy(),E.current=null)},[]);const M=C.exports.useCallback(W=>{S.current=W,T()},[T]),I=C.exports.useCallback((W={},q=null)=>({...W,ref:$n(M,q)}),[M]),R=C.exports.useCallback(W=>{w.current=W,T()},[T]),N=C.exports.useCallback((W={},q=null)=>({...W,ref:$n(R,q),style:{...W.style,position:i,minWidth:m?void 0:"max-content",inset:"0 auto auto 0"}}),[i,R,m]),z=C.exports.useCallback((W={},q=null)=>{const{size:de,shadowColor:H,bg:J,style:re,...oe}=W;return{...oe,ref:q,"data-popper-arrow":"",style:Rpe(W)}},[]),$=C.exports.useCallback((W={},q=null)=>({...W,ref:q,"data-popper-arrow-inner":""}),[]);return{update(){var W;(W=E.current)==null||W.update()},forceUpdate(){var W;(W=E.current)==null||W.forceUpdate()},transformOrigin:Hr.transformOrigin.varRef,referenceRef:M,popperRef:R,getPopperProps:N,getArrowProps:z,getArrowInnerProps:$,getReferenceProps:I}}function Rpe(e){const{size:t,shadowColor:n,bg:r,style:i}=e,o={...i,position:"absolute"};return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}function gB(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=cr(n),a=cr(t),[s,l]=C.exports.useState(e.defaultIsOpen||!1),u=r!==void 0?r:s,h=r!==void 0,p=C.exports.useId(),m=i??`disclosure-${p}`,v=C.exports.useCallback(()=>{h||l(!1),a?.()},[h,a]),S=C.exports.useCallback(()=>{h||l(!0),o?.()},[h,o]),w=C.exports.useCallback(()=>{u?v():S()},[u,S,v]);function E(k={}){return{...k,"aria-expanded":u,"aria-controls":m,onClick(T){var M;(M=k.onClick)==null||M.call(k,T),w()}}}function P(k={}){return{...k,hidden:!u,id:m}}return{isOpen:u,onOpen:S,onClose:v,onToggle:w,isControlled:h,getButtonProps:E,getDisclosureProps:P}}function Npe(e){const{isOpen:t,ref:n}=e,[r,i]=C.exports.useState(t),[o,a]=C.exports.useState(!1);return C.exports.useEffect(()=>{o||(i(t),a(!0))},[t,o,r]),Vf(()=>n.current,"animationend",()=>{i(t)}),{present:!(t?!1:!r),onComplete(){var l;const u=the(n.current),h=new u.CustomEvent("animationend",{bubbles:!0});(l=n.current)==null||l.dispatchEvent(h)}}}function mB(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var[Dpe,zpe]=xn({strict:!1,name:"PortalManagerContext"});function vB(e){const{children:t,zIndex:n}=e;return x(Dpe,{value:{zIndex:n},children:t})}vB.displayName="PortalManager";var[yB,Bpe]=xn({strict:!1,name:"PortalContext"}),I8="chakra-portal",Fpe=".chakra-portal",$pe=e=>x("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),Hpe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=C.exports.useState(null),o=C.exports.useRef(null),[,a]=C.exports.useState({});C.exports.useEffect(()=>a({}),[]);const s=Bpe(),l=zpe();bs(()=>{if(!r)return;const h=r.ownerDocument,p=t?s??h.body:h.body;if(!p)return;o.current=h.createElement("div"),o.current.className=I8,p.appendChild(o.current),a({});const m=o.current;return()=>{p.contains(m)&&p.removeChild(m)}},[r]);const u=l?.zIndex?x($pe,{zIndex:l?.zIndex,children:n}):n;return o.current?Ol.exports.createPortal(x(yB,{value:o.current,children:u}),o.current):x("span",{ref:h=>{h&&i(h)}})},Wpe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),a=C.exports.useMemo(()=>{const l=i?.ownerDocument.createElement("div");return l&&(l.className=I8),l},[i]),[,s]=C.exports.useState({});return bs(()=>s({}),[]),bs(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?Ol.exports.createPortal(x(yB,{value:r?a:null,children:t}),a):null};function uh(e){const{containerRef:t,...n}=e;return t?x(Wpe,{containerRef:t,...n}):x(Hpe,{...n})}uh.defaultProps={appendToParentPortal:!0};uh.className=I8;uh.selector=Fpe;uh.displayName="Portal";var Vpe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wp=new WeakMap,Iy=new WeakMap,Ry={},Wx=0,Upe=function(e,t,n,r){var i=Array.isArray(e)?e:[e];Ry[n]||(Ry[n]=new WeakMap);var o=Ry[n],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var h=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(m){if(s.has(m))h(m);else{var v=m.getAttribute(r),S=v!==null&&v!=="false",w=(wp.get(m)||0)+1,E=(o.get(m)||0)+1;wp.set(m,w),o.set(m,E),a.push(m),w===1&&S&&Iy.set(m,!0),E===1&&m.setAttribute(n,"true"),S||m.setAttribute(r,"true")}})};return h(t),s.clear(),Wx++,function(){a.forEach(function(p){var m=wp.get(p)-1,v=o.get(p)-1;wp.set(p,m),o.set(p,v),m||(Iy.has(p)||p.removeAttribute(r),Iy.delete(p)),v||p.removeAttribute(n)}),Wx--,Wx||(wp=new WeakMap,wp=new WeakMap,Iy=new WeakMap,Ry={})}},SB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Vpe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Upe(r,i,n,"aria-hidden")):function(){return null}};function R8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var In={exports:{}},Gpe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",jpe=Gpe,Ype=jpe;function bB(){}function xB(){}xB.resetWarningCache=bB;var qpe=function(){function e(r,i,o,a,s,l){if(l!==Ype){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:xB,resetWarningCache:bB};return n.PropTypes=n,n};In.exports=qpe();var CC="data-focus-lock",wB="data-focus-lock-disabled",Kpe="data-no-focus-lock",Xpe="data-autofocus-inside",Zpe="data-no-autofocus";function Qpe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jpe(e,t){var n=C.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function CB(e,t){return Jpe(t||null,function(n){return e.forEach(function(r){return Qpe(r,n)})})}var Vx={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function _B(e){return e}function kB(e,t){t===void 0&&(t=_B);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var h=a;a=[],h.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(h){a.push(h),u()},filter:function(h){return a=a.filter(h),n}}}};return i}function N8(e,t){return t===void 0&&(t=_B),kB(e,t)}function EB(e){e===void 0&&(e={});var t=kB(null);return t.options=pl({async:!0,ssr:!1},e),t}var PB=function(e){var t=e.sideCar,n=pz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x(r,{...pl({},n)})};PB.isSideCarExport=!0;function e0e(e,t){return e.useMedium(t),PB}var TB=N8({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),AB=N8(),t0e=N8(),n0e=EB({async:!0}),r0e=[],D8=C.exports.forwardRef(function(t,n){var r,i=C.exports.useState(),o=i[0],a=i[1],s=C.exports.useRef(),l=C.exports.useRef(!1),u=C.exports.useRef(null),h=t.children,p=t.disabled,m=t.noFocusGuards,v=t.persistentFocus,S=t.crossFrame,w=t.autoFocus;t.allowTextSelection;var E=t.group,P=t.className,k=t.whiteList,T=t.hasPositiveIndices,M=t.shards,I=M===void 0?r0e:M,R=t.as,N=R===void 0?"div":R,z=t.lockProps,$=z===void 0?{}:z,W=t.sideCar,q=t.returnFocus,de=t.focusOptions,H=t.onActivation,J=t.onDeactivation,re=C.exports.useState({}),oe=re[0],X=C.exports.useCallback(function(){u.current=u.current||document&&document.activeElement,s.current&&H&&H(s.current),l.current=!0},[H]),G=C.exports.useCallback(function(){l.current=!1,J&&J(s.current)},[J]);C.exports.useEffect(function(){p||(u.current=null)},[]);var Q=C.exports.useCallback(function(ht){var qe=u.current;if(qe&&qe.focus){var rt=typeof q=="function"?q(qe):q;if(rt){var Ze=typeof rt=="object"?rt:void 0;u.current=null,ht?Promise.resolve().then(function(){return qe.focus(Ze)}):qe.focus(Ze)}}},[q]),j=C.exports.useCallback(function(ht){l.current&&TB.useMedium(ht)},[]),Z=AB.useMedium,me=C.exports.useCallback(function(ht){s.current!==ht&&(s.current=ht,a(ht))},[]),Se=An((r={},r[wB]=p&&"disabled",r[CC]=E,r),$),xe=m!==!0,Fe=xe&&m!=="tail",We=CB([n,me]);return ne(Nn,{children:[xe&&[x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Vx},"guard-first"),T?x("div",{"data-focus-guard":!0,tabIndex:p?-1:1,style:Vx},"guard-nearest"):null],!p&&x(W,{id:oe,sideCar:n0e,observed:o,disabled:p,persistentFocus:v,crossFrame:S,autoFocus:w,whiteList:k,shards:I,onActivation:X,onDeactivation:G,returnFocus:Q,focusOptions:de}),x(N,{ref:We,...Se,className:P,onBlur:Z,onFocus:j,children:h}),Fe&&x("div",{"data-focus-guard":!0,tabIndex:p?-1:0,style:Vx})]})});D8.propTypes={};D8.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};const LB=D8;function _C(e,t){return _C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_C(e,t)}function z8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_C(e,t)}function MB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i0e(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(u){return u.props})),t(a)}var l=function(u){z8(h,u);function h(){return u.apply(this,arguments)||this}h.peek=function(){return a};var p=h.prototype;return p.componentDidMount=function(){o.push(this),s()},p.componentDidUpdate=function(){s()},p.componentWillUnmount=function(){var v=o.indexOf(this);o.splice(v,1),s()},p.render=function(){return x(i,{...this.props})},h}(C.exports.PureComponent);return MB(l,"displayName","SideEffect("+n(i)+")"),l}}var Rl=function(e){for(var t=Array(e.length),n=0;n=0}).sort(f0e)},h0e=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],F8=h0e.join(","),p0e="".concat(F8,", [data-focus-guard]"),$B=function(e,t){var n;return Rl(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?p0e:F8)?[i]:[],$B(i))},[])},$8=function(e,t){return e.reduce(function(n,r){return n.concat($B(r,t),r.parentNode?Rl(r.parentNode.querySelectorAll(F8)).filter(function(i){return i===r}):[])},[])},g0e=function(e){var t=e.querySelectorAll("[".concat(Xpe,"]"));return Rl(t).map(function(n){return $8([n])}).reduce(function(n,r){return n.concat(r)},[])},H8=function(e,t){return Rl(e).filter(function(n){return RB(t,n)}).filter(function(n){return u0e(n)})},JA=function(e,t){return t===void 0&&(t=new Map),Rl(e).filter(function(n){return NB(t,n)})},EC=function(e,t,n){return FB(H8($8(e,n),t),!0,n)},eL=function(e,t){return FB(H8($8(e),t),!1)},m0e=function(e,t){return H8(g0e(e),t)},_v=function(e,t){return e.shadowRoot?_v(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Rl(e.children).some(function(n){return _v(n,t)})},v0e=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},HB=function(e){return e.parentNode?HB(e.parentNode):e},W8=function(e){var t=kC(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(CC);return n.push.apply(n,i?v0e(Rl(HB(r).querySelectorAll("[".concat(CC,'="').concat(i,'"]:not([').concat(wB,'="disabled"])')))):[r]),n},[])},WB=function(e){return e.activeElement?e.activeElement.shadowRoot?WB(e.activeElement.shadowRoot):e.activeElement:void 0},V8=function(){return document.activeElement?document.activeElement.shadowRoot?WB(document.activeElement.shadowRoot):document.activeElement:void 0},y0e=function(e){return e===document.activeElement},S0e=function(e){return Boolean(Rl(e.querySelectorAll("iframe")).some(function(t){return y0e(t)}))},VB=function(e){var t=document&&V8();return!t||t.dataset&&t.dataset.focusGuard?!1:W8(e).some(function(n){return _v(n,t)||S0e(n)})},b0e=function(){var e=document&&V8();return e?Rl(document.querySelectorAll("[".concat(Kpe,"]"))).some(function(t){return _v(t,e)}):!1},x0e=function(e,t){return t.filter(BB).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},U8=function(e,t){return BB(e)&&e.name?x0e(e,t):e},w0e=function(e){var t=new Set;return e.forEach(function(n){return t.add(U8(n,e))}),e.filter(function(n){return t.has(n)})},tL=function(e){return e[0]&&e.length>1?U8(e[0],e):e[0]},nL=function(e,t){return e.length>1?e.indexOf(U8(e[t],e)):t},UB="NEW_FOCUS",C0e=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=B8(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,u=r?t.indexOf(r):l,h=r?e.indexOf(r):-1,p=l-u,m=t.indexOf(o),v=t.indexOf(a),S=w0e(t),w=n!==void 0?S.indexOf(n):-1,E=w-(r?S.indexOf(r):l),P=nL(e,0),k=nL(e,i-1);if(l===-1||h===-1)return UB;if(!p&&h>=0)return h;if(l<=m&&s&&Math.abs(p)>1)return k;if(l>=v&&s&&Math.abs(p)>1)return P;if(p&&Math.abs(E)>1)return h;if(l<=m)return k;if(l>v)return P;if(p)return Math.abs(p)>1?h:(i+h+p)%i}},_0e=function(e){return function(t){var n,r=(n=DB(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},k0e=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=JA(r.filter(_0e(n)));return i&&i.length?tL(i):tL(JA(t))},PC=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&PC(e.parentNode.host||e.parentNode,t),t},Ux=function(e,t){for(var n=PC(e),r=PC(t),i=0;i=0)return o}return!1},GB=function(e,t,n){var r=kC(e),i=kC(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=Ux(a||s,s)||a,n.filter(Boolean).forEach(function(l){var u=Ux(o,l);u&&(!a||_v(u,a)?a=u:a=Ux(u,a))})}),a},E0e=function(e,t){return e.reduce(function(n,r){return n.concat(m0e(r,t))},[])},P0e=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(d0e)},T0e=function(e,t){var n=document&&V8(),r=W8(e).filter(j4),i=GB(n||e,e,r),o=new Map,a=eL(r,o),s=EC(r,o).filter(function(m){var v=m.node;return j4(v)});if(!(!s[0]&&(s=a,!s[0]))){var l=eL([i],o).map(function(m){var v=m.node;return v}),u=P0e(l,s),h=u.map(function(m){var v=m.node;return v}),p=C0e(h,l,n,t);return p===UB?{node:k0e(a,h,E0e(r,o))}:p===void 0?p:u[p]}},A0e=function(e){var t=W8(e).filter(j4),n=GB(e,e,t),r=new Map,i=EC([n],r,!0),o=EC(t,r).filter(function(a){var s=a.node;return j4(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:B8(s)}})},L0e=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Gx=0,jx=!1,M0e=function(e,t,n){n===void 0&&(n={});var r=T0e(e,t);if(!jx&&r){if(Gx>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),jx=!0,setTimeout(function(){jx=!1},1);return}Gx++,L0e(r.node,n.focusOptions),Gx--}};const jB=M0e;function YB(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var O0e=function(){return document&&document.activeElement===document.body},I0e=function(){return O0e()||b0e()},S0=null,Kp=null,b0=null,kv=!1,R0e=function(){return!0},N0e=function(t){return(S0.whiteList||R0e)(t)},D0e=function(t,n){b0={observerNode:t,portaledElement:n}},z0e=function(t){return b0&&b0.portaledElement===t};function rL(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var B0e=function(t){return t&&"current"in t?t.current:t},F0e=function(t){return t?Boolean(kv):kv==="meanwhile"},$0e=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},H0e=function(t,n){return n.some(function(r){return $0e(t,r,r)})},Y4=function(){var t=!1;if(S0){var n=S0,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,u=r||b0&&b0.portaledElement,h=document&&document.activeElement;if(u){var p=[u].concat(a.map(B0e).filter(Boolean));if((!h||N0e(h))&&(i||F0e(s)||!I0e()||!Kp&&o)&&(u&&!(VB(p)||h&&H0e(h,p)||z0e(h))&&(document&&!Kp&&h&&!o?(h.blur&&h.blur(),document.body.focus()):(t=jB(p,Kp,{focusOptions:l}),b0={})),kv=!1,Kp=document&&document.activeElement),document){var m=document&&document.activeElement,v=A0e(p),S=v.map(function(w){var E=w.node;return E}).indexOf(m);S>-1&&(v.filter(function(w){var E=w.guard,P=w.node;return E&&P.dataset.focusAutoGuard}).forEach(function(w){var E=w.node;return E.removeAttribute("tabIndex")}),rL(S,v.length,1,v),rL(S,-1,-1,v))}}}return t},qB=function(t){Y4()&&t&&(t.stopPropagation(),t.preventDefault())},G8=function(){return YB(Y4)},W0e=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||D0e(r,n)},V0e=function(){return null},KB=function(){kv="just",setTimeout(function(){kv="meanwhile"},0)},U0e=function(){document.addEventListener("focusin",qB),document.addEventListener("focusout",G8),window.addEventListener("blur",KB)},G0e=function(){document.removeEventListener("focusin",qB),document.removeEventListener("focusout",G8),window.removeEventListener("blur",KB)};function j0e(e){return e.filter(function(t){var n=t.disabled;return!n})}function Y0e(e){var t=e.slice(-1)[0];t&&!S0&&U0e();var n=S0,r=n&&t&&t.id===n.id;S0=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Kp=null,(!r||n.observed!==t.observed)&&t.onActivation(),Y4(),YB(Y4)):(G0e(),Kp=null)}TB.assignSyncMedium(W0e);AB.assignMedium(G8);t0e.assignMedium(function(e){return e({moveFocusInside:jB,focusInside:VB})});const q0e=i0e(j0e,Y0e)(V0e);var XB=C.exports.forwardRef(function(t,n){return x(LB,{sideCar:q0e,ref:n,...t})}),ZB=LB.propTypes||{};ZB.sideCar;R8(ZB,["sideCar"]);XB.propTypes={};const K0e=XB;var QB=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:u}=e,h=C.exports.useCallback(()=>{t?.current?t.current.focus():r?.current&&iB(r.current).length===0&&requestAnimationFrame(()=>{var S;(S=r.current)==null||S.focus()})},[t,r]),p=C.exports.useCallback(()=>{var v;(v=n?.current)==null||v.focus()},[n]);return x(K0e,{crossFrame:u,persistentFocus:l,autoFocus:s,disabled:a,onActivation:h,onDeactivation:p,returnFocus:i&&!n,children:o})};QB.displayName="FocusLock";var N3="right-scroll-bar-position",D3="width-before-scroll-bar",X0e="with-scroll-bars-hidden",Z0e="--removed-body-scroll-bar-size",JB=EB(),Yx=function(){},CS=C.exports.forwardRef(function(e,t){var n=C.exports.useRef(null),r=C.exports.useState({onScrollCapture:Yx,onWheelCapture:Yx,onTouchMoveCapture:Yx}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,h=e.enabled,p=e.shards,m=e.sideCar,v=e.noIsolation,S=e.inert,w=e.allowPinchZoom,E=e.as,P=E===void 0?"div":E,k=pz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),T=m,M=CB([n,t]),I=pl(pl({},k),i);return ne(Nn,{children:[h&&x(T,{sideCar:JB,removeScrollBar:u,shards:p,noIsolation:v,inert:S,setCallbacks:o,allowPinchZoom:!!w,lockRef:n}),a?C.exports.cloneElement(C.exports.Children.only(s),pl(pl({},I),{ref:M})):x(P,{...pl({},I,{className:l,ref:M}),children:s})]})});CS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};CS.classNames={fullWidth:D3,zeroRight:N3};var Q0e=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function J0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Q0e();return t&&e.setAttribute("nonce",t),e}function e1e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function t1e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var n1e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=J0e())&&(e1e(t,n),t1e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},r1e=function(){var e=n1e();return function(t,n){C.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eF=function(){var e=r1e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},i1e={left:0,top:0,right:0,gap:0},qx=function(e){return parseInt(e||"",10)||0},o1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[qx(n),qx(r),qx(i)]},a1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return i1e;var t=o1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},s1e=eF(),l1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(X0e,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(o,`px; - padding-right: `).concat(a,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(N3,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(D3,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(N3," .").concat(N3,` { - right: 0 `).concat(r,`; - } - - .`).concat(D3," .").concat(D3,` { - margin-right: 0 `).concat(r,`; - } - - body { - `).concat(Z0e,": ").concat(s,`px; - } -`)},u1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=C.exports.useMemo(function(){return a1e(i)},[i]);return x(s1e,{styles:l1e(o,!t,i,n?"":"!important")})},TC=!1;if(typeof window<"u")try{var Ny=Object.defineProperty({},"passive",{get:function(){return TC=!0,!0}});window.addEventListener("test",Ny,Ny),window.removeEventListener("test",Ny,Ny)}catch{TC=!1}var Cp=TC?{passive:!1}:!1,c1e=function(e){return e.tagName==="TEXTAREA"},tF=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!c1e(e)&&n[t]==="visible")},d1e=function(e){return tF(e,"overflowY")},f1e=function(e){return tF(e,"overflowX")},iL=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=nF(e,n);if(r){var i=rF(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},h1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},p1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},nF=function(e,t){return e==="v"?d1e(t):f1e(t)},rF=function(e,t){return e==="v"?h1e(t):p1e(t)},g1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},m1e=function(e,t,n,r,i){var o=g1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),u=!1,h=a>0,p=0,m=0;do{var v=rF(e,s),S=v[0],w=v[1],E=v[2],P=w-E-o*S;(S||P)&&nF(e,s)&&(p+=P,m+=S),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(h&&(i&&p===0||!i&&a>p)||!h&&(i&&m===0||!i&&-a>m))&&(u=!0),u},Dy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oL=function(e){return[e.deltaX,e.deltaY]},aL=function(e){return e&&"current"in e?e.current:e},v1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},y1e=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},S1e=0,_p=[];function b1e(e){var t=C.exports.useRef([]),n=C.exports.useRef([0,0]),r=C.exports.useRef(),i=C.exports.useState(S1e++)[0],o=C.exports.useState(function(){return eF()})[0],a=C.exports.useRef(e);C.exports.useEffect(function(){a.current=e},[e]),C.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=fC([e.lockRef.current],(e.shards||[]).map(aL),!0).filter(Boolean);return w.forEach(function(E){return E.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.exports.useCallback(function(w,E){if("touches"in w&&w.touches.length===2)return!a.current.allowPinchZoom;var P=Dy(w),k=n.current,T="deltaX"in w?w.deltaX:k[0]-P[0],M="deltaY"in w?w.deltaY:k[1]-P[1],I,R=w.target,N=Math.abs(T)>Math.abs(M)?"h":"v";if("touches"in w&&N==="h"&&R.type==="range")return!1;var z=iL(N,R);if(!z)return!0;if(z?I=N:(I=N==="v"?"h":"v",z=iL(N,R)),!z)return!1;if(!r.current&&"changedTouches"in w&&(T||M)&&(r.current=I),!I)return!0;var $=r.current||I;return m1e($,E,w,$==="h"?T:M,!0)},[]),l=C.exports.useCallback(function(w){var E=w;if(!(!_p.length||_p[_p.length-1]!==o)){var P="deltaY"in E?oL(E):Dy(E),k=t.current.filter(function(I){return I.name===E.type&&I.target===E.target&&v1e(I.delta,P)})[0];if(k&&k.should){E.cancelable&&E.preventDefault();return}if(!k){var T=(a.current.shards||[]).map(aL).filter(Boolean).filter(function(I){return I.contains(E.target)}),M=T.length>0?s(E,T[0]):!a.current.noIsolation;M&&E.cancelable&&E.preventDefault()}}},[]),u=C.exports.useCallback(function(w,E,P,k){var T={name:w,delta:E,target:P,should:k};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(M){return M!==T})},1)},[]),h=C.exports.useCallback(function(w){n.current=Dy(w),r.current=void 0},[]),p=C.exports.useCallback(function(w){u(w.type,oL(w),w.target,s(w,e.lockRef.current))},[]),m=C.exports.useCallback(function(w){u(w.type,Dy(w),w.target,s(w,e.lockRef.current))},[]);C.exports.useEffect(function(){return _p.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",l,Cp),document.addEventListener("touchmove",l,Cp),document.addEventListener("touchstart",h,Cp),function(){_p=_p.filter(function(w){return w!==o}),document.removeEventListener("wheel",l,Cp),document.removeEventListener("touchmove",l,Cp),document.removeEventListener("touchstart",h,Cp)}},[]);var v=e.removeScrollBar,S=e.inert;return ne(Nn,{children:[S?x(o,{styles:y1e(i)}):null,v?x(u1e,{gapMode:"margin"}):null]})}const x1e=e0e(JB,b1e);var iF=C.exports.forwardRef(function(e,t){return x(CS,{...pl({},e,{ref:t,sideCar:x1e})})});iF.classNames=CS.classNames;const oF=iF;var ch=(...e)=>e.filter(Boolean).join(" ");function nm(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var w1e=class{modals;constructor(){this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},AC=new w1e;function C1e(e,t){C.exports.useEffect(()=>(t&&AC.add(e),()=>{AC.remove(e)}),[t,e])}function _1e(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,u=C.exports.useRef(null),h=C.exports.useRef(null),[p,m,v]=E1e(r,"chakra-modal","chakra-modal--header","chakra-modal--body");k1e(u,t&&a),C1e(u,t);const S=C.exports.useRef(null),w=C.exports.useCallback(z=>{S.current=z.target},[]),E=C.exports.useCallback(z=>{z.key==="Escape"&&(z.stopPropagation(),o&&n?.(),l?.())},[o,n,l]),[P,k]=C.exports.useState(!1),[T,M]=C.exports.useState(!1),I=C.exports.useCallback((z={},$=null)=>({role:"dialog",...z,ref:$n($,u),id:p,tabIndex:-1,"aria-modal":!0,"aria-labelledby":P?m:void 0,"aria-describedby":T?v:void 0,onClick:nm(z.onClick,W=>W.stopPropagation())}),[v,T,p,m,P]),R=C.exports.useCallback(z=>{z.stopPropagation(),S.current===z.target&&(!AC.isTopModal(u)||(i&&n?.(),s?.()))},[n,i,s]),N=C.exports.useCallback((z={},$=null)=>({...z,ref:$n($,h),onClick:nm(z.onClick,R),onKeyDown:nm(z.onKeyDown,E),onMouseDown:nm(z.onMouseDown,w)}),[E,w,R]);return{isOpen:t,onClose:n,headerId:m,bodyId:v,setBodyMounted:M,setHeaderMounted:k,dialogRef:u,overlayRef:h,getDialogProps:I,getDialogContainerProps:N}}function k1e(e,t){const n=e.current;C.exports.useEffect(()=>{if(!(!e.current||!t))return SB(e.current)},[t,e,n])}function E1e(e,...t){const n=C.exports.useId(),r=e||n;return C.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[P1e,dh]=xn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[T1e,nd]=xn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in ``"}),G0=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m,onCloseComplete:v}=e,S=Ii("Modal",e),E={..._1e(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:u,preserveScrollBarGap:h,motionPreset:p,lockFocusAcrossFrames:m};return x(T1e,{value:E,children:x(P1e,{value:S,children:x(dd,{onExitComplete:v,children:E.isOpen&&x(uh,{...t,children:n})})})})};G0.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};G0.displayName="Modal";var q4=Pe((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=nd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__body",n),s=dh();return le.createElement(we.div,{ref:t,className:a,id:i,...r,__css:s.body})});q4.displayName="ModalBody";var j8=Pe((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=nd(),a=ch("chakra-modal__close-btn",r),s=dh();return x(bS,{ref:t,__css:s.closeButton,className:a,onClick:nm(n,l=>{l.stopPropagation(),o()}),...i})});j8.displayName="ModalCloseButton";function aF(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:h}=nd(),[p,m]=o8();return C.exports.useEffect(()=>{!p&&m&&setTimeout(m)},[p,m]),x(QB,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:h,children:x(oF,{removeScrollBar:!u,allowPinchZoom:a,enabled:o,forwardProps:!0,children:e.children})})}var A1e={slideInBottom:{...pC,custom:{offsetY:16,reverse:!0}},slideInRight:{...pC,custom:{offsetX:16,reverse:!0}},scale:{...vz,custom:{initialScale:.95,reverse:!0}},none:{}},L1e=we(Il.section),M1e=e=>A1e[e||"none"],sF=C.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=M1e(n),...i}=e;return x(L1e,{ref:t,...r,...i})});sF.displayName="ModalTransition";var Ev=Pe((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=nd(),u=s(a,t),h=l(i),p=ch("chakra-modal__content",n),m=dh(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...m.dialog},S={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...m.dialogContainer},{motionPreset:w}=nd();return le.createElement(aF,null,le.createElement(we.div,{...h,className:"chakra-modal__content-container",tabIndex:-1,__css:S},x(sF,{preset:w,motionProps:o,className:p,...u,__css:v,children:r})))});Ev.displayName="ModalContent";var Y8=Pe((e,t)=>{const{className:n,...r}=e,i=ch("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...dh().footer};return le.createElement(we.footer,{ref:t,...r,__css:a,className:i})});Y8.displayName="ModalFooter";var q8=Pe((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=nd();C.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=ch("chakra-modal__header",n),l={flex:0,...dh().header};return le.createElement(we.header,{ref:t,className:a,id:i,...r,__css:l})});q8.displayName="ModalHeader";var O1e=we(Il.div),Pv=Pe((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=ch("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...dh().overlay},{motionPreset:u}=nd();return x(O1e,{...i||(u==="none"?{}:mz),__css:l,ref:t,className:a,...o})});Pv.displayName="ModalOverlay";function I1e(e){const{leastDestructiveRef:t,...n}=e;return x(G0,{...n,initialFocusRef:t})}var R1e=Pe((e,t)=>x(Ev,{ref:t,role:"alertdialog",...e})),[FPe,N1e]=xn(),D1e=we(yz),z1e=Pe((e,t)=>{const{className:n,children:r,motionProps:i,containerProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=nd(),h=s(a,t),p=l(o),m=ch("chakra-modal__content",n),v=dh(),S={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...v.dialog},w={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...v.dialogContainer},{placement:E}=N1e();return le.createElement(aF,null,le.createElement(we.div,{...p,className:"chakra-modal__content-container",__css:w},x(D1e,{motionProps:i,direction:E,in:u,className:m,...h,__css:S,children:r})))});z1e.displayName="DrawerContent";function B1e(e,t){const n=cr(e);C.exports.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var lF=(...e)=>e.filter(Boolean).join(" "),Kx=e=>e?!0:void 0;function il(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var F1e=e=>x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z"})}),$1e=e=>x(ga,{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z"})});function sL(e,t,n,r){C.exports.useEffect(()=>{if(!e.current||!r)return;const i=e.current.ownerDocument.defaultView??window,o=Array.isArray(t)?t:[t],a=new i.MutationObserver(s=>{for(const l of s)l.type==="attributes"&&l.attributeName&&o.includes(l.attributeName)&&n(l)});return a.observe(e.current,{attributes:!0,attributeFilter:o}),()=>a.disconnect()})}var H1e=50,lL=300;function W1e(e,t){const[n,r]=C.exports.useState(!1),[i,o]=C.exports.useState(null),[a,s]=C.exports.useState(!0),l=C.exports.useRef(null),u=()=>clearTimeout(l.current);B1e(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?H1e:null);const h=C.exports.useCallback(()=>{a&&e(),l.current=setTimeout(()=>{s(!1),r(!0),o("increment")},lL)},[e,a]),p=C.exports.useCallback(()=>{a&&t(),l.current=setTimeout(()=>{s(!1),r(!0),o("decrement")},lL)},[t,a]),m=C.exports.useCallback(()=>{s(!0),r(!1),u()},[]);return C.exports.useEffect(()=>()=>u(),[]),{up:h,down:p,stop:m,isSpinning:n}}var V1e=/^[Ee0-9+\-.]$/;function U1e(e){return V1e.test(e)}function G1e(e,t){if(e.key==null)return!0;const n=e.ctrlKey||e.altKey||e.metaKey;return!(e.key.length===1)||n?!0:t(e.key)}function j1e(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:a=1,isReadOnly:s,isDisabled:l,isRequired:u,isInvalid:h,pattern:p="[0-9]*(.[0-9]+)?",inputMode:m="decimal",allowMouseWheel:v,id:S,onChange:w,precision:E,name:P,"aria-describedby":k,"aria-label":T,"aria-labelledby":M,onFocus:I,onBlur:R,onInvalid:N,getAriaValueText:z,isValidCharacter:$,format:W,parse:q,...de}=e,H=cr(I),J=cr(R),re=cr(N),oe=cr($??U1e),X=cr(z),G=cfe(e),{update:Q,increment:j,decrement:Z}=G,[me,Se]=C.exports.useState(!1),xe=!(s||l),Fe=C.exports.useRef(null),We=C.exports.useRef(null),ht=C.exports.useRef(null),qe=C.exports.useRef(null),rt=C.exports.useCallback(Ee=>Ee.split("").filter(oe).join(""),[oe]),Ze=C.exports.useCallback(Ee=>q?.(Ee)??Ee,[q]),Xe=C.exports.useCallback(Ee=>(W?.(Ee)??Ee).toString(),[W]);ed(()=>{(G.valueAsNumber>o||G.valueAsNumber{if(!Fe.current)return;if(Fe.current.value!=G.value){const Mt=Ze(Fe.current.value);G.setValue(rt(Mt))}},[Ze,rt]);const Et=C.exports.useCallback((Ee=a)=>{xe&&j(Ee)},[j,xe,a]),bt=C.exports.useCallback((Ee=a)=>{xe&&Z(Ee)},[Z,xe,a]),Ae=W1e(Et,bt);sL(ht,"disabled",Ae.stop,Ae.isSpinning),sL(qe,"disabled",Ae.stop,Ae.isSpinning);const it=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;const Ne=Ze(Ee.currentTarget.value);Q(rt(Ne)),We.current={start:Ee.currentTarget.selectionStart,end:Ee.currentTarget.selectionEnd}},[Q,rt,Ze]),Ot=C.exports.useCallback(Ee=>{var Mt;H?.(Ee),We.current&&(Ee.target.selectionStart=We.current.start??((Mt=Ee.currentTarget.value)==null?void 0:Mt.length),Ee.currentTarget.selectionEnd=We.current.end??Ee.currentTarget.selectionStart)},[H]),lt=C.exports.useCallback(Ee=>{if(Ee.nativeEvent.isComposing)return;G1e(Ee,oe)||Ee.preventDefault();const Mt=xt(Ee)*a,Ne=Ee.key,an={ArrowUp:()=>Et(Mt),ArrowDown:()=>bt(Mt),Home:()=>Q(i),End:()=>Q(o)}[Ne];an&&(Ee.preventDefault(),an(Ee))},[oe,a,Et,bt,Q,i,o]),xt=Ee=>{let Mt=1;return(Ee.metaKey||Ee.ctrlKey)&&(Mt=.1),Ee.shiftKey&&(Mt=10),Mt},_n=C.exports.useMemo(()=>{const Ee=X?.(G.value);if(Ee!=null)return Ee;const Mt=G.value.toString();return Mt||void 0},[G.value,X]),Pt=C.exports.useCallback(()=>{let Ee=G.value;if(G.value==="")return;/^[eE]/.test(G.value.toString())?G.setValue(""):(G.valueAsNumbero&&(Ee=o),G.cast(Ee))},[G,o,i]),Kt=C.exports.useCallback(()=>{Se(!1),n&&Pt()},[n,Se,Pt]),kn=C.exports.useCallback(()=>{t&&requestAnimationFrame(()=>{var Ee;(Ee=Fe.current)==null||Ee.focus()})},[t]),mn=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.up(),kn()},[kn,Ae]),Oe=C.exports.useCallback(Ee=>{Ee.preventDefault(),Ae.down(),kn()},[kn,Ae]);Vf(()=>Fe.current,"wheel",Ee=>{var Mt;const at=(((Mt=Fe.current)==null?void 0:Mt.ownerDocument)??document).activeElement===Fe.current;if(!v||!at)return;Ee.preventDefault();const an=xt(Ee)*a,Dn=Math.sign(Ee.deltaY);Dn===-1?Et(an):Dn===1&&bt(an)},{passive:!1});const Je=C.exports.useCallback((Ee={},Mt=null)=>{const Ne=l||r&&G.isAtMax;return{...Ee,ref:$n(Mt,ht),role:"button",tabIndex:-1,onPointerDown:il(Ee.onPointerDown,at=>{at.button!==0||Ne||mn(at)}),onPointerLeave:il(Ee.onPointerLeave,Ae.stop),onPointerUp:il(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Kx(Ne)}},[G.isAtMax,r,mn,Ae.stop,l]),Xt=C.exports.useCallback((Ee={},Mt=null)=>{const Ne=l||r&&G.isAtMin;return{...Ee,ref:$n(Mt,qe),role:"button",tabIndex:-1,onPointerDown:il(Ee.onPointerDown,at=>{at.button!==0||Ne||Oe(at)}),onPointerLeave:il(Ee.onPointerLeave,Ae.stop),onPointerUp:il(Ee.onPointerUp,Ae.stop),disabled:Ne,"aria-disabled":Kx(Ne)}},[G.isAtMin,r,Oe,Ae.stop,l]),jt=C.exports.useCallback((Ee={},Mt=null)=>({name:P,inputMode:m,type:"text",pattern:p,"aria-labelledby":M,"aria-label":T,"aria-describedby":k,id:S,disabled:l,...Ee,readOnly:Ee.readOnly??s,"aria-readonly":Ee.readOnly??s,"aria-required":Ee.required??u,required:Ee.required??u,ref:$n(Fe,Mt),value:Xe(G.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(G.valueAsNumber)?void 0:G.valueAsNumber,"aria-invalid":Kx(h??G.isOutOfRange),"aria-valuetext":_n,autoComplete:"off",autoCorrect:"off",onChange:il(Ee.onChange,it),onKeyDown:il(Ee.onKeyDown,lt),onFocus:il(Ee.onFocus,Ot,()=>Se(!0)),onBlur:il(Ee.onBlur,J,Kt)}),[P,m,p,M,T,Xe,k,S,l,u,s,h,G.value,G.valueAsNumber,G.isOutOfRange,i,o,_n,it,lt,Ot,J,Kt]);return{value:Xe(G.value),valueAsNumber:G.valueAsNumber,isFocused:me,isDisabled:l,isReadOnly:s,getIncrementButtonProps:Je,getDecrementButtonProps:Xt,getInputProps:jt,htmlProps:de}}var[Y1e,_S]=xn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),[q1e,K8]=xn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within "}),X8=Pe(function(t,n){const r=Ii("NumberInput",t),i=gn(t),o=v8(i),{htmlProps:a,...s}=j1e(o),l=C.exports.useMemo(()=>s,[s]);return le.createElement(q1e,{value:l},le.createElement(Y1e,{value:r},le.createElement(we.div,{...a,ref:n,className:lF("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})))});X8.displayName="NumberInput";var uF=Pe(function(t,n){const r=_S();return le.createElement(we.div,{"aria-hidden":!0,ref:n,...t,__css:{display:"flex",flexDirection:"column",position:"absolute",top:"0",insetEnd:"0px",margin:"1px",height:"calc(100% - 2px)",zIndex:1,...r.stepperGroup}})});uF.displayName="NumberInputStepper";var Z8=Pe(function(t,n){const{getInputProps:r}=K8(),i=r(t,n),o=_S();return le.createElement(we.input,{...i,className:lF("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Z8.displayName="NumberInputField";var cF=we("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Q8=Pe(function(t,n){const r=_S(),{getDecrementButtonProps:i}=K8(),o=i(t,n);return x(cF,{...o,__css:r.stepper,children:t.children??x(F1e,{})})});Q8.displayName="NumberDecrementStepper";var J8=Pe(function(t,n){const{getIncrementButtonProps:r}=K8(),i=r(t,n),o=_S();return x(cF,{...i,__css:o.stepper,children:t.children??x($1e,{})})});J8.displayName="NumberIncrementStepper";var Qv=(...e)=>e.filter(Boolean).join(" ");function K1e(e,...t){return X1e(e)?e(...t):e}var X1e=e=>typeof e=="function";function ol(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}function Z1e(...e){return function(n){e.forEach(r=>{r?.(n)})}}var[Q1e,fh]=xn({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within ``"}),[J1e,Jv]=xn({name:"PopoverStylesContext",errorMessage:`usePopoverStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kp={click:"click",hover:"hover"};function ege(e={}){const{closeOnBlur:t=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:o=!0,autoFocus:a=!0,arrowSize:s,arrowShadowColor:l,trigger:u=kp.click,openDelay:h=200,closeDelay:p=200,isLazy:m,lazyBehavior:v="unmount",computePositionOnMount:S,...w}=e,{isOpen:E,onClose:P,onOpen:k,onToggle:T}=gB(e),M=C.exports.useRef(null),I=C.exports.useRef(null),R=C.exports.useRef(null),N=C.exports.useRef(!1),z=C.exports.useRef(!1);E&&(z.current=!0);const[$,W]=C.exports.useState(!1),[q,de]=C.exports.useState(!1),H=C.exports.useId(),J=i??H,[re,oe,X,G]=["popover-trigger","popover-content","popover-header","popover-body"].map(it=>`${it}-${J}`),{referenceRef:Q,getArrowProps:j,getPopperProps:Z,getArrowInnerProps:me,forceUpdate:Se}=pB({...w,enabled:E||!!S}),xe=Npe({isOpen:E,ref:R});Sfe({enabled:E,ref:I}),dhe(R,{focusRef:I,visible:E,shouldFocus:o&&u===kp.click}),hhe(R,{focusRef:r,visible:E,shouldFocus:a&&u===kp.click});const Fe=mB({wasSelected:z.current,enabled:m,mode:v,isSelected:xe.present}),We=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,style:{...it.style,transformOrigin:Hr.transformOrigin.varRef,[Hr.arrowSize.var]:s?`${s}px`:void 0,[Hr.arrowShadowColor.var]:l},ref:$n(R,Ot),children:Fe?it.children:null,id:oe,tabIndex:-1,role:"dialog",onKeyDown:ol(it.onKeyDown,xt=>{n&&xt.key==="Escape"&&P()}),onBlur:ol(it.onBlur,xt=>{const _n=uL(xt),Pt=Xx(R.current,_n),Kt=Xx(I.current,_n);E&&t&&(!Pt&&!Kt)&&P()}),"aria-labelledby":$?X:void 0,"aria-describedby":q?G:void 0};return u===kp.hover&&(lt.role="tooltip",lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0}),lt.onMouseLeave=ol(it.onMouseLeave,xt=>{xt.nativeEvent.relatedTarget!==null&&(N.current=!1,setTimeout(()=>P(),p))})),lt},[Fe,oe,$,X,q,G,u,n,P,E,t,p,l,s]),ht=C.exports.useCallback((it={},Ot=null)=>Z({...it,style:{visibility:E?"visible":"hidden",...it.style}},Ot),[E,Z]),qe=C.exports.useCallback((it,Ot=null)=>({...it,ref:$n(Ot,M,Q)}),[M,Q]),rt=C.exports.useRef(),Ze=C.exports.useRef(),Xe=C.exports.useCallback(it=>{M.current==null&&Q(it)},[Q]),Et=C.exports.useCallback((it={},Ot=null)=>{const lt={...it,ref:$n(I,Ot,Xe),id:re,"aria-haspopup":"dialog","aria-expanded":E,"aria-controls":oe};return u===kp.click&&(lt.onClick=ol(it.onClick,T)),u===kp.hover&&(lt.onFocus=ol(it.onFocus,()=>{rt.current===void 0&&k()}),lt.onBlur=ol(it.onBlur,xt=>{const _n=uL(xt),Pt=!Xx(R.current,_n);E&&t&&Pt&&P()}),lt.onKeyDown=ol(it.onKeyDown,xt=>{xt.key==="Escape"&&P()}),lt.onMouseEnter=ol(it.onMouseEnter,()=>{N.current=!0,rt.current=window.setTimeout(()=>k(),h)}),lt.onMouseLeave=ol(it.onMouseLeave,()=>{N.current=!1,rt.current&&(clearTimeout(rt.current),rt.current=void 0),Ze.current=window.setTimeout(()=>{N.current===!1&&P()},p)})),lt},[re,E,oe,u,Xe,T,k,t,P,h,p]);C.exports.useEffect(()=>()=>{rt.current&&clearTimeout(rt.current),Ze.current&&clearTimeout(Ze.current)},[]);const bt=C.exports.useCallback((it={},Ot=null)=>({...it,id:X,ref:$n(Ot,lt=>{W(!!lt)})}),[X]),Ae=C.exports.useCallback((it={},Ot=null)=>({...it,id:G,ref:$n(Ot,lt=>{de(!!lt)})}),[G]);return{forceUpdate:Se,isOpen:E,onAnimationComplete:xe.onComplete,onClose:P,getAnchorProps:qe,getArrowProps:j,getArrowInnerProps:me,getPopoverPositionerProps:ht,getPopoverProps:We,getTriggerProps:Et,getHeaderProps:bt,getBodyProps:Ae}}function Xx(e,t){return e===t||e?.contains(t)}function uL(e){const t=e.currentTarget.ownerDocument.activeElement;return e.relatedTarget??t}function e_(e){const t=Ii("Popover",e),{children:n,...r}=gn(e),i=t1(),o=ege({...r,direction:i.direction});return x(Q1e,{value:o,children:x(J1e,{value:t,children:K1e(n,{isOpen:o.isOpen,onClose:o.onClose,forceUpdate:o.forceUpdate})})})}e_.displayName="Popover";function t_(e){const{bg:t,bgColor:n,backgroundColor:r}=e,{getArrowProps:i,getArrowInnerProps:o}=fh(),a=Jv(),s=t??n??r;return le.createElement(we.div,{...i(),className:"chakra-popover__arrow-positioner"},le.createElement(we.div,{className:Qv("chakra-popover__arrow",e.className),...o(e),__css:{...a.arrow,"--popper-arrow-bg":s?`colors.${s}, ${s}`:void 0}}))}t_.displayName="PopoverArrow";var tge=Pe(function(t,n){const{getBodyProps:r}=fh(),i=Jv();return le.createElement(we.div,{...r(t,n),className:Qv("chakra-popover__body",t.className),__css:i.body})});tge.displayName="PopoverBody";var nge=Pe(function(t,n){const{onClose:r}=fh(),i=Jv();return x(bS,{size:"sm",onClick:r,className:Qv("chakra-popover__close-btn",t.className),__css:i.closeButton,ref:n,...t})});nge.displayName="PopoverCloseButton";function rge(e){if(!!e)return{enter:{...e.enter,visibility:"visible"},exit:{...e.exit,transitionEnd:{visibility:"hidden"}}}}var ige={exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}},enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}},oge=we(Il.section),dF=Pe(function(t,n){const{variants:r=ige,...i}=t,{isOpen:o}=fh();return le.createElement(oge,{ref:n,variants:rge(r),initial:!1,animate:o?"enter":"exit",...i})});dF.displayName="PopoverTransition";var n_=Pe(function(t,n){const{rootProps:r,motionProps:i,...o}=t,{getPopoverProps:a,getPopoverPositionerProps:s,onAnimationComplete:l}=fh(),u=Jv(),h={position:"relative",display:"flex",flexDirection:"column",...u.content};return le.createElement(we.div,{...s(r),__css:u.popper,className:"chakra-popover__popper"},x(dF,{...i,...a(o,n),onAnimationComplete:Z1e(l,o.onAnimationComplete),className:Qv("chakra-popover__content",t.className),__css:h}))});n_.displayName="PopoverContent";var age=Pe(function(t,n){const{getHeaderProps:r}=fh(),i=Jv();return le.createElement(we.header,{...r(t,n),className:Qv("chakra-popover__header",t.className),__css:i.header})});age.displayName="PopoverHeader";function r_(e){const t=C.exports.Children.only(e.children),{getTriggerProps:n}=fh();return C.exports.cloneElement(t,n(t.props,t.ref))}r_.displayName="PopoverTrigger";function sge(e,t,n){return(e-t)*100/(n-t)}var lge=cd({"0%":{strokeDasharray:"1, 400",strokeDashoffset:"0"},"50%":{strokeDasharray:"400, 400",strokeDashoffset:"-100"},"100%":{strokeDasharray:"400, 400",strokeDashoffset:"-260"}}),uge=cd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),cge=cd({"0%":{left:"-40%"},"100%":{left:"100%"}}),dge=cd({from:{backgroundPosition:"1rem 0"},to:{backgroundPosition:"0 0"}});function fF(e){const{value:t=0,min:n,max:r,valueText:i,getValueText:o,isIndeterminate:a,role:s="progressbar"}=e,l=sge(t,n,r);return{bind:{"data-indeterminate":a?"":void 0,"aria-valuemax":r,"aria-valuemin":n,"aria-valuenow":a?void 0:t,"aria-valuetext":(()=>{if(t!=null)return typeof o=="function"?o(t,l):i})(),role:s},percent:l,value:t}}var hF=e=>{const{size:t,isIndeterminate:n,...r}=e;return le.createElement(we.svg,{viewBox:"0 0 100 100",__css:{width:t,height:t,animation:n?`${uge} 2s linear infinite`:void 0},...r})};hF.displayName="Shape";var LC=e=>le.createElement(we.circle,{cx:50,cy:50,r:42,fill:"transparent",...e});LC.displayName="Circle";var fge=Pe((e,t)=>{const{size:n="48px",max:r=100,min:i=0,valueText:o,getValueText:a,value:s,capIsRound:l,children:u,thickness:h="10px",color:p="#0078d4",trackColor:m="#edebe9",isIndeterminate:v,...S}=e,w=fF({min:i,max:r,value:s,valueText:o,getValueText:a,isIndeterminate:v}),E=v?void 0:(w.percent??0)*2.64,P=E==null?void 0:`${E} ${264-E}`,k=v?{css:{animation:`${lge} 1.5s linear infinite`}}:{strokeDashoffset:66,strokeDasharray:P,transitionProperty:"stroke-dasharray, stroke",transitionDuration:"0.6s",transitionTimingFunction:"ease"},T={display:"inline-block",position:"relative",verticalAlign:"middle",fontSize:n};return le.createElement(we.div,{ref:t,className:"chakra-progress",...w.bind,...S,__css:T},ne(hF,{size:n,isIndeterminate:v,children:[x(LC,{stroke:m,strokeWidth:h,className:"chakra-progress__track"}),x(LC,{stroke:p,strokeWidth:h,className:"chakra-progress__indicator",strokeLinecap:l?"round":void 0,opacity:w.value===0&&!v?0:void 0,...k})]}),u)});fge.displayName="CircularProgress";var[hge,pge]=xn({name:"ProgressStylesContext",errorMessage:`useProgressStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),gge=Pe((e,t)=>{const{min:n,max:r,value:i,isIndeterminate:o,role:a,...s}=e,l=fF({value:i,min:n,max:r,isIndeterminate:o,role:a}),h={height:"100%",...pge().filledTrack};return le.createElement(we.div,{ref:t,style:{width:`${l.percent}%`,...s.style},...l.bind,...s,__css:h})}),pF=Pe((e,t)=>{var n;const{value:r,min:i=0,max:o=100,hasStripe:a,isAnimated:s,children:l,borderRadius:u,isIndeterminate:h,"aria-label":p,"aria-labelledby":m,title:v,role:S,...w}=gn(e),E=Ii("Progress",e),P=u??((n=E.track)==null?void 0:n.borderRadius),k={animation:`${dge} 1s linear infinite`},I={...!h&&a&&s&&k,...h&&{position:"absolute",willChange:"left",minWidth:"50%",animation:`${cge} 1s ease infinite normal none running`}},R={overflow:"hidden",position:"relative",...E.track};return le.createElement(we.div,{ref:t,borderRadius:P,__css:R,...w},ne(hge,{value:E,children:[x(gge,{"aria-label":p,"aria-labelledby":m,min:i,max:o,value:r,isIndeterminate:h,css:I,borderRadius:P,title:v,role:S}),l]}))});pF.displayName="Progress";var mge=we("div",{baseStyle:{fontSize:"0.24em",top:"50%",left:"50%",width:"100%",textAlign:"center",position:"absolute",transform:"translate(-50%, -50%)"}});mge.displayName="CircularProgressLabel";var vge=(...e)=>e.filter(Boolean).join(" "),yge=e=>e?"":void 0;function Sge(e,t){const n={},r={};for(const[i,o]of Object.entries(e))t.includes(i)?n[i]=o:r[i]=o;return[n,r]}var gF=Pe(function(t,n){const{children:r,placeholder:i,className:o,...a}=t;return le.createElement(we.select,{...a,ref:n,className:vge("chakra-select",o)},i&&x("option",{value:"",children:i}),r)});gF.displayName="SelectField";var mF=Pe((e,t)=>{var n;const r=Ii("Select",e),{rootProps:i,placeholder:o,icon:a,color:s,height:l,h:u,minH:h,minHeight:p,iconColor:m,iconSize:v,...S}=gn(e),[w,E]=Sge(S,jZ),P=m8(E),k={width:"100%",height:"fit-content",position:"relative",color:s},T={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return le.createElement(we.div,{className:"chakra-select__wrapper",__css:k,...w,...i},x(gF,{ref:t,height:u??l,minH:h??p,placeholder:o,...P,__css:T,children:e.children}),x(vF,{"data-disabled":yge(P.disabled),...(m||s)&&{color:m||s},__css:r.icon,...v&&{fontSize:v},children:a}))});mF.displayName="Select";var bge=e=>x("svg",{viewBox:"0 0 24 24",...e,children:x("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),xge=we("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),vF=e=>{const{children:t=x(bge,{}),...n}=e,r=C.exports.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return x(xge,{...n,className:"chakra-select__icon-wrapper",children:C.exports.isValidElement(t)?r:null})};vF.displayName="SelectIcon";function wge(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cge(e){const t=kge(e);return typeof t.PointerEvent<"u"&&e instanceof t.PointerEvent?e.pointerType==="mouse":e instanceof t.MouseEvent}function yF(e){return!!e.touches}function _ge(e){return yF(e)&&e.touches.length>1}function kge(e){return e.view??window}function Ege(e,t="page"){const n=e.touches[0]||e.changedTouches[0];return{x:n[`${t}X`],y:n[`${t}Y`]}}function Pge(e,t="page"){return{x:e[`${t}X`],y:e[`${t}Y`]}}function SF(e,t="page"){return yF(e)?Ege(e,t):Pge(e,t)}function Tge(e){return t=>{const n=Cge(t);(!n||n&&t.button===0)&&e(t)}}function Age(e,t=!1){function n(i){e(i,{point:SF(i)})}return t?Tge(n):n}function z3(e,t,n,r){return wge(e,t,Age(n,t==="pointerdown"),r)}function bF(e){const t=C.exports.useRef(null);return t.current=e,t}var Lge=class{history=[];startEvent=null;lastEvent=null;lastEventInfo=null;handlers={};removeListeners=()=>{};threshold=3;win;constructor(e,t,n){if(this.win=e.view??window,_ge(e))return;this.handlers=t,n&&(this.threshold=n),e.stopPropagation(),e.preventDefault();const r={point:SF(e)},{timestamp:i}=HP();this.history=[{...r.point,timestamp:i}];const{onSessionStart:o}=t;o?.(e,Zx(r,this.history)),this.removeListeners=Ige(z3(this.win,"pointermove",this.onPointerMove),z3(this.win,"pointerup",this.onPointerUp),z3(this.win,"pointercancel",this.onPointerUp))}updatePoint=()=>{if(!(this.lastEvent&&this.lastEventInfo))return;const e=Zx(this.lastEventInfo,this.history),t=this.startEvent!==null,n=Rge(e.offset,{x:0,y:0})>=this.threshold;if(!t&&!n)return;const{timestamp:r}=HP();this.history.push({...e.point,timestamp:r});const{onStart:i,onMove:o}=this.handlers;t||(i?.(this.lastEvent,e),this.startEvent=this.lastEvent),o?.(this.lastEvent,e)};onPointerMove=(e,t)=>{this.lastEvent=e,this.lastEventInfo=t,iJ.update(this.updatePoint,!0)};onPointerUp=(e,t)=>{const n=Zx(t,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;i?.(e,n),this.end(),!(!r||!this.startEvent)&&r?.(e,n)};updateHandlers(e){this.handlers=e}end(){var e;(e=this.removeListeners)==null||e.call(this),oJ.update(this.updatePoint)}};function cL(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Zx(e,t){return{point:e.point,delta:cL(e.point,t[t.length-1]),offset:cL(e.point,t[0]),velocity:Oge(t,.1)}}var Mge=e=>e*1e3;function Oge(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=e[e.length-1];for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Mge(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Ige(...e){return t=>e.reduce((n,r)=>r(n),t)}function Qx(e,t){return Math.abs(e-t)}function dL(e){return"x"in e&&"y"in e}function Rge(e,t){if(typeof e=="number"&&typeof t=="number")return Qx(e,t);if(dL(e)&&dL(t)){const n=Qx(e.x,t.x),r=Qx(e.y,t.y);return Math.sqrt(n**2+r**2)}return 0}function xF(e,t){const{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:a,threshold:s}=t,l=Boolean(n||r||i||o||a),u=C.exports.useRef(null),h=bF({onSessionStart:o,onSessionEnd:a,onStart:r,onMove:n,onEnd(p,m){u.current=null,i?.(p,m)}});C.exports.useEffect(()=>{var p;(p=u.current)==null||p.updateHandlers(h.current)}),C.exports.useEffect(()=>{const p=e.current;if(!p||!l)return;function m(v){u.current=new Lge(v,h.current,s)}return z3(p,"pointerdown",m)},[e,l,h,s]),C.exports.useEffect(()=>()=>{var p;(p=u.current)==null||p.end(),u.current=null},[])}function Nge(e,t){if(!e){t(void 0);return}t({width:e.offsetWidth,height:e.offsetHeight});const n=e.ownerDocument.defaultView??window,r=new n.ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const[o]=i;let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;t({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}var Dge=Boolean(globalThis?.document)?C.exports.useLayoutEffect:C.exports.useEffect;function zge(e,t){var n;if(!e||!e.parentElement)return;const r=((n=e.ownerDocument)==null?void 0:n.defaultView)??window,i=new r.MutationObserver(()=>{t()});return i.observe(e.parentElement,{childList:!0}),()=>{i.disconnect()}}function wF({getNodes:e,observeMutation:t=!0}){const[n,r]=C.exports.useState([]),[i,o]=C.exports.useState(0);return Dge(()=>{const a=e(),s=a.map((l,u)=>Nge(l,h=>{r(p=>[...p.slice(0,u),h,...p.slice(u+1)])}));if(t){const l=a[0];s.push(zge(l,()=>{o(u=>u+1)}))}return()=>{s.forEach(l=>{l?.()})}},[i]),n}function Bge(e){return typeof e=="object"&&e!==null&&"current"in e}function Fge(e){const[t]=wF({observeMutation:!1,getNodes(){return[Bge(e)?e.current:e]}});return t}var $ge=Object.getOwnPropertyNames,Hge=(e,t)=>function(){return e&&(t=(0,e[$ge(e)[0]])(e=0)),t},gd=Hge({"../../../react-shim.js"(){}});gd();gd();gd();var La=e=>e?"":void 0,x0=e=>e?!0:void 0,md=(...e)=>e.filter(Boolean).join(" ");gd();function w0(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}gd();gd();function Wge(e){return{root:`slider-root-${e}`,getThumb:t=>`slider-thumb-${e}-${t}`,getInput:t=>`slider-input-${e}-${t}`,track:`slider-track-${e}`,innerTrack:`slider-filled-track-${e}`,getMarker:t=>`slider-marker-${e}-${t}`,output:`slider-output-${e}`}}function rm(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}var B3={width:0,height:0},zy=e=>e||B3;function CF(e){const{orientation:t,thumbPercents:n,thumbRects:r,isReversed:i}=e,o=w=>{const E=r[w]??B3;return{position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none",...rm({orientation:t,vertical:{bottom:`calc(${n[w]}% - ${E.height/2}px)`},horizontal:{left:`calc(${n[w]}% - ${E.width/2}px)`}})}},a=t==="vertical"?r.reduce((w,E)=>zy(w).height>zy(E).height?w:E,B3):r.reduce((w,E)=>zy(w).width>zy(E).width?w:E,B3),s={position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0,...rm({orientation:t,vertical:a?{paddingLeft:a.width/2,paddingRight:a.width/2}:{},horizontal:a?{paddingTop:a.height/2,paddingBottom:a.height/2}:{}})},l={position:"absolute",...rm({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})},u=n.length===1,h=[0,i?100-n[0]:n[0]],p=u?h:n;let m=p[0];!u&&i&&(m=100-m);const v=Math.abs(p[p.length-1]-p[0]),S={...l,...rm({orientation:t,vertical:i?{height:`${v}%`,top:`${m}%`}:{height:`${v}%`,bottom:`${m}%`},horizontal:i?{width:`${v}%`,right:`${m}%`}:{width:`${v}%`,left:`${m}%`}})};return{trackStyle:l,innerTrackStyle:S,rootStyle:s,getThumbStyle:o}}function _F(e){const{isReversed:t,direction:n,orientation:r}=e;return n==="ltr"||r==="vertical"?t:!t}function Vge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,minStepsBetweenThumbs:I=0,...R}=e,N=cr(m),z=cr(v),$=cr(w),W=_F({isReversed:a,direction:s,orientation:l}),[q,de]=tS({value:i,defaultValue:o??[25,75],onChange:r});if(!Array.isArray(q))throw new TypeError(`[range-slider] You passed an invalid value for \`value\` or \`defaultValue\`, expected \`Array\` but got \`${typeof q}\``);const[H,J]=C.exports.useState(!1),[re,oe]=C.exports.useState(!1),[X,G]=C.exports.useState(-1),Q=!(h||p),j=C.exports.useRef(q),Z=q.map($e=>y0($e,t,n)),me=I*S,Se=Uge(Z,t,n,me),xe=C.exports.useRef({eventSource:null,value:[],valueBounds:[]});xe.current.value=Z,xe.current.valueBounds=Se;const Fe=Z.map($e=>n-$e+t),ht=(W?Fe:Z).map($e=>V4($e,t,n)),qe=l==="vertical",rt=C.exports.useRef(null),Ze=C.exports.useRef(null),Xe=wF({getNodes(){const $e=Ze.current,pt=$e?.querySelectorAll("[role=slider]");return pt?Array.from(pt):[]}}),Et=C.exports.useId(),Ae=Wge(u??Et),it=C.exports.useCallback($e=>{var pt;if(!rt.current)return;xe.current.eventSource="pointer";const tt=rt.current.getBoundingClientRect(),{clientX:Nt,clientY:Zt}=((pt=$e.touches)==null?void 0:pt[0])??$e,Qn=qe?tt.bottom-Zt:Nt-tt.left,lo=qe?tt.height:tt.width;let hi=Qn/lo;return W&&(hi=1-hi),Tz(hi,t,n)},[qe,W,n,t]),Ot=(n-t)/10,lt=S||(n-t)/100,xt=C.exports.useMemo(()=>({setValueAtIndex($e,pt){if(!Q)return;const tt=xe.current.valueBounds[$e];pt=parseFloat(SC(pt,tt.min,lt)),pt=y0(pt,tt.min,tt.max);const Nt=[...xe.current.value];Nt[$e]=pt,de(Nt)},setActiveIndex:G,stepUp($e,pt=lt){const tt=xe.current.value[$e],Nt=W?tt-pt:tt+pt;xt.setValueAtIndex($e,Nt)},stepDown($e,pt=lt){const tt=xe.current.value[$e],Nt=W?tt+pt:tt-pt;xt.setValueAtIndex($e,Nt)},reset(){de(j.current)}}),[lt,W,de,Q]),_n=C.exports.useCallback($e=>{const pt=$e.key,Nt={ArrowRight:()=>xt.stepUp(X),ArrowUp:()=>xt.stepUp(X),ArrowLeft:()=>xt.stepDown(X),ArrowDown:()=>xt.stepDown(X),PageUp:()=>xt.stepUp(X,Ot),PageDown:()=>xt.stepDown(X,Ot),Home:()=>{const{min:Zt}=Se[X];xt.setValueAtIndex(X,Zt)},End:()=>{const{max:Zt}=Se[X];xt.setValueAtIndex(X,Zt)}}[pt];Nt&&($e.preventDefault(),$e.stopPropagation(),Nt($e),xe.current.eventSource="keyboard")},[xt,X,Ot,Se]),{getThumbStyle:Pt,rootStyle:Kt,trackStyle:kn,innerTrackStyle:mn}=C.exports.useMemo(()=>CF({isReversed:W,orientation:l,thumbRects:Xe,thumbPercents:ht}),[W,l,ht,Xe]),Oe=C.exports.useCallback($e=>{var pt;const tt=$e??X;if(tt!==-1&&M){const Nt=Ae.getThumb(tt),Zt=(pt=Ze.current)==null?void 0:pt.ownerDocument.getElementById(Nt);Zt&&setTimeout(()=>Zt.focus())}},[M,X,Ae]);ed(()=>{xe.current.eventSource==="keyboard"&&z?.(xe.current.value)},[Z,z]);const Je=$e=>{const pt=it($e)||0,tt=xe.current.value.map(hi=>Math.abs(hi-pt)),Nt=Math.min(...tt);let Zt=tt.indexOf(Nt);const Qn=tt.filter(hi=>hi===Nt);Qn.length>1&&pt>xe.current.value[Zt]&&(Zt=Zt+Qn.length-1),G(Zt),xt.setValueAtIndex(Zt,pt),Oe(Zt)},Xt=$e=>{if(X==-1)return;const pt=it($e)||0;G(X),xt.setValueAtIndex(X,pt),Oe(X)};xF(Ze,{onPanSessionStart($e){!Q||(J(!0),Je($e),N?.(xe.current.value))},onPanSessionEnd(){!Q||(J(!1),z?.(xe.current.value))},onPan($e){!Q||Xt($e)}});const jt=C.exports.useCallback(($e={},pt=null)=>({...$e,...R,id:Ae.root,ref:$n(pt,Ze),tabIndex:-1,"aria-disabled":x0(h),"data-focused":La(re),style:{...$e.style,...Kt}}),[R,h,re,Kt,Ae]),Ee=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:$n(pt,rt),id:Ae.track,"data-disabled":La(h),style:{...$e.style,...kn}}),[h,kn,Ae]),Mt=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.innerTrack,style:{...$e.style,...mn}}),[mn,Ae]),Ne=C.exports.useCallback(($e,pt=null)=>{const{index:tt,...Nt}=$e,Zt=Z[tt];if(Zt==null)throw new TypeError(`[range-slider > thumb] Cannot find value at index \`${tt}\`. The \`value\` or \`defaultValue\` length is : ${Z.length}`);const Qn=Se[tt];return{...Nt,ref:pt,role:"slider",tabIndex:Q?0:void 0,id:Ae.getThumb(tt),"data-active":La(H&&X===tt),"aria-valuetext":$?.(Zt)??E?.[tt],"aria-valuemin":Qn.min,"aria-valuemax":Qn.max,"aria-valuenow":Zt,"aria-orientation":l,"aria-disabled":x0(h),"aria-readonly":x0(p),"aria-label":P?.[tt],"aria-labelledby":P?.[tt]?void 0:k?.[tt],style:{...$e.style,...Pt(tt)},onKeyDown:w0($e.onKeyDown,_n),onFocus:w0($e.onFocus,()=>{oe(!0),G(tt)}),onBlur:w0($e.onBlur,()=>{oe(!1),G(-1)})}},[Ae,Z,Se,Q,H,X,$,E,l,h,p,P,k,Pt,_n,oe]),at=C.exports.useCallback(($e={},pt=null)=>({...$e,ref:pt,id:Ae.output,htmlFor:Z.map((tt,Nt)=>Ae.getThumb(Nt)).join(" "),"aria-live":"off"}),[Ae,Z]),an=C.exports.useCallback(($e,pt=null)=>{const{value:tt,...Nt}=$e,Zt=!(ttn),Qn=tt>=Z[0]&&tt<=Z[Z.length-1];let lo=V4(tt,t,n);lo=W?100-lo:lo;const hi={position:"absolute",pointerEvents:"none",...rm({orientation:l,vertical:{bottom:`${lo}%`},horizontal:{left:`${lo}%`}})};return{...Nt,ref:pt,id:Ae.getMarker($e.value),role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!Zt),"data-highlighted":La(Qn),style:{...$e.style,...hi}}},[h,W,n,t,l,Z,Ae]),Dn=C.exports.useCallback(($e,pt=null)=>{const{index:tt,...Nt}=$e;return{...Nt,ref:pt,id:Ae.getInput(tt),type:"hidden",value:Z[tt],name:Array.isArray(T)?T[tt]:`${T}-${tt}`}},[T,Z,Ae]);return{state:{value:Z,isFocused:re,isDragging:H,getThumbPercent:$e=>ht[$e],getThumbMinValue:$e=>Se[$e].min,getThumbMaxValue:$e=>Se[$e].max},actions:xt,getRootProps:jt,getTrackProps:Ee,getInnerTrackProps:Mt,getThumbProps:Ne,getMarkerProps:an,getInputProps:Dn,getOutputProps:at}}function Uge(e,t,n,r){return e.map((i,o)=>{const a=o===0?t:e[o-1]+r,s=o===e.length-1?n:e[o+1]-r;return{min:a,max:s}})}var[Gge,kS]=xn({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within "}),[jge,i_]=xn({name:"RangeSliderStylesContext",errorMessage:`useRangeSliderStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),kF=Pe(function(t,n){const r=Ii("Slider",t),i=gn(t),{direction:o}=t1();i.direction=o;const{getRootProps:a,...s}=Vge(i),l=C.exports.useMemo(()=>({...s,name:t.name}),[s,t.name]);return le.createElement(Gge,{value:l},le.createElement(jge,{value:r},le.createElement(we.div,{...a({},n),className:"chakra-slider",__css:r.container},t.children)))});kF.defaultProps={orientation:"horizontal"};kF.displayName="RangeSlider";var Yge=Pe(function(t,n){const{getThumbProps:r,getInputProps:i,name:o}=kS(),a=i_(),s=r(t,n);return le.createElement(we.div,{...s,className:md("chakra-slider__thumb",t.className),__css:a.thumb},s.children,o&&x("input",{...i({index:t.index})}))});Yge.displayName="RangeSliderThumb";var qge=Pe(function(t,n){const{getTrackProps:r}=kS(),i=i_(),o=r(t,n);return le.createElement(we.div,{...o,className:md("chakra-slider__track",t.className),__css:i.track,"data-testid":"chakra-range-slider-track"})});qge.displayName="RangeSliderTrack";var Kge=Pe(function(t,n){const{getInnerTrackProps:r}=kS(),i=i_(),o=r(t,n);return le.createElement(we.div,{...o,className:"chakra-slider__filled-track",__css:i.filledTrack})});Kge.displayName="RangeSliderFilledTrack";var Xge=Pe(function(t,n){const{getMarkerProps:r}=kS(),i=r(t,n);return le.createElement(we.div,{...i,className:md("chakra-slider__marker",t.className)})});Xge.displayName="RangeSliderMark";gd();gd();function Zge(e){const{min:t=0,max:n=100,onChange:r,value:i,defaultValue:o,isReversed:a,direction:s="ltr",orientation:l="horizontal",id:u,isDisabled:h,isReadOnly:p,onChangeStart:m,onChangeEnd:v,step:S=1,getAriaValueText:w,"aria-valuetext":E,"aria-label":P,"aria-labelledby":k,name:T,focusThumbOnChange:M=!0,...I}=e,R=cr(m),N=cr(v),z=cr(w),$=_F({isReversed:a,direction:s,orientation:l}),[W,q]=tS({value:i,defaultValue:o??Jge(t,n),onChange:r}),[de,H]=C.exports.useState(!1),[J,re]=C.exports.useState(!1),oe=!(h||p),X=(n-t)/10,G=S||(n-t)/100,Q=y0(W,t,n),j=n-Q+t,me=V4($?j:Q,t,n),Se=l==="vertical",xe=bF({min:t,max:n,step:S,isDisabled:h,value:Q,isInteractive:oe,isReversed:$,isVertical:Se,eventSource:null,focusThumbOnChange:M,orientation:l}),Fe=C.exports.useRef(null),We=C.exports.useRef(null),ht=C.exports.useRef(null),qe=C.exports.useId(),rt=u??qe,[Ze,Xe]=[`slider-thumb-${rt}`,`slider-track-${rt}`],Et=C.exports.useCallback(Ne=>{var at;if(!Fe.current)return;const an=xe.current;an.eventSource="pointer";const Dn=Fe.current.getBoundingClientRect(),{clientX:$e,clientY:pt}=((at=Ne.touches)==null?void 0:at[0])??Ne,tt=Se?Dn.bottom-pt:$e-Dn.left,Nt=Se?Dn.height:Dn.width;let Zt=tt/Nt;$&&(Zt=1-Zt);let Qn=Tz(Zt,an.min,an.max);return an.step&&(Qn=parseFloat(SC(Qn,an.min,an.step))),Qn=y0(Qn,an.min,an.max),Qn},[Se,$,xe]),bt=C.exports.useCallback(Ne=>{const at=xe.current;!at.isInteractive||(Ne=parseFloat(SC(Ne,at.min,G)),Ne=y0(Ne,at.min,at.max),q(Ne))},[G,q,xe]),Ae=C.exports.useMemo(()=>({stepUp(Ne=G){const at=$?Q-Ne:Q+Ne;bt(at)},stepDown(Ne=G){const at=$?Q+Ne:Q-Ne;bt(at)},reset(){bt(o||0)},stepTo(Ne){bt(Ne)}}),[bt,$,Q,G,o]),it=C.exports.useCallback(Ne=>{const at=xe.current,Dn={ArrowRight:()=>Ae.stepUp(),ArrowUp:()=>Ae.stepUp(),ArrowLeft:()=>Ae.stepDown(),ArrowDown:()=>Ae.stepDown(),PageUp:()=>Ae.stepUp(X),PageDown:()=>Ae.stepDown(X),Home:()=>bt(at.min),End:()=>bt(at.max)}[Ne.key];Dn&&(Ne.preventDefault(),Ne.stopPropagation(),Dn(Ne),at.eventSource="keyboard")},[Ae,bt,X,xe]),Ot=z?.(Q)??E,lt=Fge(We),{getThumbStyle:xt,rootStyle:_n,trackStyle:Pt,innerTrackStyle:Kt}=C.exports.useMemo(()=>{const Ne=xe.current,at=lt??{width:0,height:0};return CF({isReversed:$,orientation:Ne.orientation,thumbRects:[at],thumbPercents:[me]})},[$,lt,me,xe]),kn=C.exports.useCallback(()=>{xe.current.focusThumbOnChange&&setTimeout(()=>{var at;return(at=We.current)==null?void 0:at.focus()})},[xe]);ed(()=>{const Ne=xe.current;kn(),Ne.eventSource==="keyboard"&&N?.(Ne.value)},[Q,N]);function mn(Ne){const at=Et(Ne);at!=null&&at!==xe.current.value&&q(at)}xF(ht,{onPanSessionStart(Ne){const at=xe.current;!at.isInteractive||(H(!0),kn(),mn(Ne),R?.(at.value))},onPanSessionEnd(){const Ne=xe.current;!Ne.isInteractive||(H(!1),N?.(Ne.value))},onPan(Ne){!xe.current.isInteractive||mn(Ne)}});const Oe=C.exports.useCallback((Ne={},at=null)=>({...Ne,...I,ref:$n(at,ht),tabIndex:-1,"aria-disabled":x0(h),"data-focused":La(J),style:{...Ne.style,..._n}}),[I,h,J,_n]),Je=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,Fe),id:Xe,"data-disabled":La(h),style:{...Ne.style,...Pt}}),[h,Xe,Pt]),Xt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,style:{...Ne.style,...Kt}}),[Kt]),jt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:$n(at,We),role:"slider",tabIndex:oe?0:void 0,id:Ze,"data-active":La(de),"aria-valuetext":Ot,"aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":Q,"aria-orientation":l,"aria-disabled":x0(h),"aria-readonly":x0(p),"aria-label":P,"aria-labelledby":P?void 0:k,style:{...Ne.style,...xt(0)},onKeyDown:w0(Ne.onKeyDown,it),onFocus:w0(Ne.onFocus,()=>re(!0)),onBlur:w0(Ne.onBlur,()=>re(!1))}),[oe,Ze,de,Ot,t,n,Q,l,h,p,P,k,xt,it]),Ee=C.exports.useCallback((Ne,at=null)=>{const an=!(Ne.valuen),Dn=Q>=Ne.value,$e=V4(Ne.value,t,n),pt={position:"absolute",pointerEvents:"none",...Qge({orientation:l,vertical:{bottom:$?`${100-$e}%`:`${$e}%`},horizontal:{left:$?`${100-$e}%`:`${$e}%`}})};return{...Ne,ref:at,role:"presentation","aria-hidden":!0,"data-disabled":La(h),"data-invalid":La(!an),"data-highlighted":La(Dn),style:{...Ne.style,...pt}}},[h,$,n,t,l,Q]),Mt=C.exports.useCallback((Ne={},at=null)=>({...Ne,ref:at,type:"hidden",value:Q,name:T}),[T,Q]);return{state:{value:Q,isFocused:J,isDragging:de},actions:Ae,getRootProps:Oe,getTrackProps:Je,getInnerTrackProps:Xt,getThumbProps:jt,getMarkerProps:Ee,getInputProps:Mt}}function Qge(e){const{orientation:t,vertical:n,horizontal:r}=e;return t==="vertical"?n:r}function Jge(e,t){return t"}),[tme,PS]=xn({name:"SliderStylesContext",hookName:"useSliderStyles",providerName:""}),o_=Pe((e,t)=>{const n=Ii("Slider",e),r=gn(e),{direction:i}=t1();r.direction=i;const{getInputProps:o,getRootProps:a,...s}=Zge(r),l=a(),u=o({},t);return le.createElement(eme,{value:s},le.createElement(tme,{value:n},le.createElement(we.div,{...l,className:md("chakra-slider",e.className),__css:n.container},e.children,x("input",{...u}))))});o_.defaultProps={orientation:"horizontal"};o_.displayName="Slider";var EF=Pe((e,t)=>{const{getThumbProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__thumb",e.className),__css:r.thumb})});EF.displayName="SliderThumb";var PF=Pe((e,t)=>{const{getTrackProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__track",e.className),__css:r.track})});PF.displayName="SliderTrack";var TF=Pe((e,t)=>{const{getInnerTrackProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__filled-track",e.className),__css:r.filledTrack})});TF.displayName="SliderFilledTrack";var MC=Pe((e,t)=>{const{getMarkerProps:n}=ES(),r=PS(),i=n(e,t);return le.createElement(we.div,{...i,className:md("chakra-slider__marker",e.className),__css:r.mark})});MC.displayName="SliderMark";var nme=(...e)=>e.filter(Boolean).join(" "),fL=e=>e?"":void 0,a_=Pe(function(t,n){const r=Ii("Switch",t),{spacing:i="0.5rem",children:o,...a}=gn(t),{state:s,getInputProps:l,getCheckboxProps:u,getRootProps:h,getLabelProps:p}=Ez(a),m=C.exports.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),v=C.exports.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),S=C.exports.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return le.createElement(we.label,{...h(),className:nme("chakra-switch",t.className),__css:m},x("input",{className:"chakra-switch__input",...l({},n)}),le.createElement(we.span,{...u(),className:"chakra-switch__track",__css:v},le.createElement(we.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":fL(s.isChecked),"data-hover":fL(s.isHovered)})),o&&le.createElement(we.span,{className:"chakra-switch__label",...p(),__css:S},o))});a_.displayName="Switch";var s1=(...e)=>e.filter(Boolean).join(" ");function OC(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var[rme,AF,ime,ome]=FN();function ame(e){const{defaultIndex:t,onChange:n,index:r,isManual:i,isLazy:o,lazyBehavior:a="unmount",orientation:s="horizontal",direction:l="ltr",...u}=e,[h,p]=C.exports.useState(t??0),[m,v]=tS({defaultValue:t??0,value:r,onChange:n});C.exports.useEffect(()=>{r!=null&&p(r)},[r]);const S=ime(),w=C.exports.useId();return{id:`tabs-${e.id??w}`,selectedIndex:m,focusedIndex:h,setSelectedIndex:v,setFocusedIndex:p,isManual:i,isLazy:o,lazyBehavior:a,orientation:s,descendants:S,direction:l,htmlProps:u}}var[sme,e2]=xn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within "});function lme(e){const{focusedIndex:t,orientation:n,direction:r}=e2(),i=AF(),o=C.exports.useCallback(a=>{const s=()=>{var k;const T=i.nextEnabled(t);T&&((k=T.node)==null||k.focus())},l=()=>{var k;const T=i.prevEnabled(t);T&&((k=T.node)==null||k.focus())},u=()=>{var k;const T=i.firstEnabled();T&&((k=T.node)==null||k.focus())},h=()=>{var k;const T=i.lastEnabled();T&&((k=T.node)==null||k.focus())},p=n==="horizontal",m=n==="vertical",v=a.key,S=r==="ltr"?"ArrowLeft":"ArrowRight",w=r==="ltr"?"ArrowRight":"ArrowLeft",P={[S]:()=>p&&l(),[w]:()=>p&&s(),ArrowDown:()=>m&&s(),ArrowUp:()=>m&&l(),Home:u,End:h}[v];P&&(a.preventDefault(),P(a))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:OC(e.onKeyDown,o)}}function ume(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:a,setFocusedIndex:s,selectedIndex:l}=e2(),{index:u,register:h}=ome({disabled:t&&!n}),p=u===l,m=()=>{i(u)},v=()=>{s(u),!o&&!(t&&n)&&i(u)},S=ehe({...r,ref:$n(h,e.ref),isDisabled:t,isFocusable:n,onClick:OC(e.onClick,m)}),w="button";return{...S,id:LF(a,u),role:"tab",tabIndex:p?0:-1,type:w,"aria-selected":p,"aria-controls":MF(a,u),onFocus:t?void 0:OC(e.onFocus,v)}}var[cme,dme]=xn({});function fme(e){const t=e2(),{id:n,selectedIndex:r}=t,o=vS(e.children).map((a,s)=>C.exports.createElement(cme,{key:s,value:{isSelected:s===r,id:MF(n,s),tabId:LF(n,s),selectedIndex:r}},a));return{...e,children:o}}function hme(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=e2(),{isSelected:o,id:a,tabId:s}=dme(),l=C.exports.useRef(!1);o&&(l.current=!0);const u=mB({wasSelected:l.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:u?t:null,role:"tabpanel","aria-labelledby":s,hidden:!o,id:a}}function pme(){const e=e2(),t=AF(),{selectedIndex:n,orientation:r}=e,i=r==="horizontal",o=r==="vertical",[a,s]=C.exports.useState(()=>{if(i)return{left:0,width:0};if(o)return{top:0,height:0}}),[l,u]=C.exports.useState(!1);return bs(()=>{if(n==null)return;const h=t.item(n);if(h==null)return;i&&s({left:h.node.offsetLeft,width:h.node.offsetWidth}),o&&s({top:h.node.offsetTop,height:h.node.offsetHeight});const p=requestAnimationFrame(()=>{u(!0)});return()=>{p&&cancelAnimationFrame(p)}},[n,i,o,t]),{position:"absolute",transitionProperty:"left, right, top, bottom, height, width",transitionDuration:l?"200ms":"0ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",...a}}function LF(e,t){return`${e}--tab-${t}`}function MF(e,t){return`${e}--tabpanel-${t}`}var[gme,t2]=xn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "" `}),OF=Pe(function(t,n){const r=Ii("Tabs",t),{children:i,className:o,...a}=gn(t),{htmlProps:s,descendants:l,...u}=ame(a),h=C.exports.useMemo(()=>u,[u]),{isFitted:p,...m}=s;return le.createElement(rme,{value:l},le.createElement(sme,{value:h},le.createElement(gme,{value:r},le.createElement(we.div,{className:s1("chakra-tabs",o),ref:n,...m,__css:r.root},i))))});OF.displayName="Tabs";var mme=Pe(function(t,n){const r=pme(),i={...t.style,...r},o=t2();return le.createElement(we.div,{ref:n,...t,className:s1("chakra-tabs__tab-indicator",t.className),style:i,__css:o.indicator})});mme.displayName="TabIndicator";var vme=Pe(function(t,n){const r=lme({...t,ref:n}),o={display:"flex",...t2().tablist};return le.createElement(we.div,{...r,className:s1("chakra-tabs__tablist",t.className),__css:o})});vme.displayName="TabList";var IF=Pe(function(t,n){const r=hme({...t,ref:n}),i=t2();return le.createElement(we.div,{outline:"0",...r,className:s1("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});IF.displayName="TabPanel";var RF=Pe(function(t,n){const r=fme(t),i=t2();return le.createElement(we.div,{...r,width:"100%",ref:n,className:s1("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});RF.displayName="TabPanels";var NF=Pe(function(t,n){const r=t2(),i=ume({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return le.createElement(we.button,{...i,className:s1("chakra-tabs__tab",t.className),__css:o})});NF.displayName="Tab";var yme=(...e)=>e.filter(Boolean).join(" ");function Sme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}var bme=["h","minH","height","minHeight"],DF=Pe((e,t)=>{const n=so("Textarea",e),{className:r,rows:i,...o}=gn(e),a=m8(o),s=i?Sme(n,bme):n;return le.createElement(we.textarea,{ref:t,rows:i,...a,className:yme("chakra-textarea",r),__css:s})});DF.displayName="Textarea";function xme(e,t){const n=cr(e);C.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function IC(e,...t){return wme(e)?e(...t):e}var wme=e=>typeof e=="function";function Cme(e,t){const n=e??"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return i?.[t]??n}var _me=(e,t)=>e.find(n=>n.id===t);function hL(e,t){const n=zF(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function zF(e,t){for(const[n,r]of Object.entries(e))if(_me(r,t))return n}function kme(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Eme(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var Pme={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},gl=Tme(Pme);function Tme(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Ame(i,o),{position:s,id:l}=a;return r(u=>{const p=s.includes("top")?[a,...u[s]??[]]:[...u[s]??[],a];return{...u,[s]:p}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:u}=hL(s,i);return l&&u!==-1&&(s[l][u]={...s[l][u],...o,message:BF(o)}),s})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((l,u)=>(l[u]=o[u].map(h=>({...h,requestClose:!0})),l),{...o}))},close:i=>{r(o=>{const a=zF(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(hL(gl.getState(),i).position)}}var pL=0;function Ame(e,t={}){pL+=1;const n=t.id??pL,r=t.position??"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>gl.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Lme=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return le.createElement(bz,{addRole:!1,status:t,variant:n,id:u?.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},x(wz,{children:l}),le.createElement(we.div,{flex:"1",maxWidth:"100%"},i&&x(Cz,{id:u?.title,children:i}),s&&x(xz,{id:u?.description,display:"block",children:s})),o&&x(bS,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function BF(e={}){const{render:t,toastComponent:n=Lme}=e;return i=>typeof t=="function"?t({...i,...e}):x(n,{...i,...e})}function Mme(e,t){const n=i=>({...t,...i,position:Cme(i?.position??t?.position,e)}),r=i=>{const o=n(i),a=BF(o);return gl.notify(a,o)};return r.update=(i,o)=>{gl.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...IC(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...IC(o.error,s)}))},r.closeAll=gl.closeAll,r.close=gl.close,r.isActive=gl.isActive,r}function hh(e){const{theme:t}=DN();return C.exports.useMemo(()=>Mme(t.direction,e),[e,t.direction])}var Ome={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},FF=C.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:u=Ome,toastSpacing:h="0.5rem"}=e,[p,m]=C.exports.useState(s),v=Ile();ed(()=>{v||r?.()},[v]),ed(()=>{m(s)},[s]);const S=()=>m(null),w=()=>m(s),E=()=>{v&&i()};C.exports.useEffect(()=>{v&&o&&i()},[v,o,i]),xme(E,p);const P=C.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:h,...l}),[l,h]),k=C.exports.useMemo(()=>kme(a),[a]);return le.createElement(Il.li,{layout:!0,className:"chakra-toast",variants:u,initial:"initial",animate:"animate",exit:"exit",onHoverStart:S,onHoverEnd:w,custom:{position:a},style:k},le.createElement(we.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:P},IC(n,{id:t,onClose:E})))});FF.displayName="ToastComponent";var Ime=e=>{const t=C.exports.useSyncExternalStore(gl.subscribe,gl.getState,gl.getState),{children:n,motionVariants:r,component:i=FF,portalProps:o}=e,s=Object.keys(t).map(l=>{const u=t[l];return x("ul",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${l}`,style:Eme(l),children:x(dd,{initial:!1,children:u.map(h=>x(i,{motionVariants:r,...h},h.id))})},l)});return ne(Nn,{children:[n,x(uh,{...o,children:s})]})};function Rme(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Nme(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Dme={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function zg(...e){return function(n){e.some(r=>(r?.(n),n?.defaultPrevented))}}var K4=e=>{var t;return((t=e.current)==null?void 0:t.ownerDocument)||document},RC=e=>{var t,n;return((n=(t=e.current)==null?void 0:t.ownerDocument)==null?void 0:n.defaultView)||window};function zme(e={}){const{openDelay:t=0,closeDelay:n=0,closeOnClick:r=!0,closeOnMouseDown:i,closeOnScroll:o,closeOnPointerDown:a=i,closeOnEsc:s=!0,onOpen:l,onClose:u,placement:h,id:p,isOpen:m,defaultIsOpen:v,arrowSize:S=10,arrowShadowColor:w,arrowPadding:E,modifiers:P,isDisabled:k,gutter:T,offset:M,direction:I,...R}=e,{isOpen:N,onOpen:z,onClose:$}=gB({isOpen:m,defaultIsOpen:v,onOpen:l,onClose:u}),{referenceRef:W,getPopperProps:q,getArrowInnerProps:de,getArrowProps:H}=pB({enabled:N,placement:h,arrowPadding:E,modifiers:P,gutter:T,offset:M,direction:I}),J=C.exports.useId(),oe=`tooltip-${p??J}`,X=C.exports.useRef(null),G=C.exports.useRef(),Q=C.exports.useRef(),j=C.exports.useCallback(()=>{Q.current&&(clearTimeout(Q.current),Q.current=void 0),$()},[$]),Z=Bme(X,j),me=C.exports.useCallback(()=>{if(!k&&!G.current){Z();const Ze=RC(X);G.current=Ze.setTimeout(z,t)}},[Z,k,z,t]),Se=C.exports.useCallback(()=>{G.current&&(clearTimeout(G.current),G.current=void 0);const Ze=RC(X);Q.current=Ze.setTimeout(j,n)},[n,j]),xe=C.exports.useCallback(()=>{N&&r&&Se()},[r,Se,N]),Fe=C.exports.useCallback(()=>{N&&a&&Se()},[a,Se,N]),We=C.exports.useCallback(Ze=>{N&&Ze.key==="Escape"&&Se()},[N,Se]);Vf(()=>K4(X),"keydown",s?We:void 0),Vf(()=>K4(X),"scroll",()=>{N&&o&&j()}),C.exports.useEffect(()=>()=>{clearTimeout(G.current),clearTimeout(Q.current)},[]),Vf(()=>X.current,"pointerleave",Se);const ht=C.exports.useCallback((Ze={},Xe=null)=>({...Ze,ref:$n(X,Xe,W),onPointerEnter:zg(Ze.onPointerEnter,bt=>{bt.pointerType!=="touch"&&me()}),onClick:zg(Ze.onClick,xe),onPointerDown:zg(Ze.onPointerDown,Fe),onFocus:zg(Ze.onFocus,me),onBlur:zg(Ze.onBlur,Se),"aria-describedby":N?oe:void 0}),[me,Se,Fe,N,oe,xe,W]),qe=C.exports.useCallback((Ze={},Xe=null)=>q({...Ze,style:{...Ze.style,[Hr.arrowSize.var]:S?`${S}px`:void 0,[Hr.arrowShadowColor.var]:w}},Xe),[q,S,w]),rt=C.exports.useCallback((Ze={},Xe=null)=>{const Et={...Ze.style,position:"relative",transformOrigin:Hr.transformOrigin.varRef};return{ref:Xe,...R,...Ze,id:oe,role:"tooltip",style:Et}},[R,oe]);return{isOpen:N,show:me,hide:Se,getTriggerProps:ht,getTooltipProps:rt,getTooltipPositionerProps:qe,getArrowProps:H,getArrowInnerProps:de}}var Jx="chakra-ui:close-tooltip";function Bme(e,t){return C.exports.useEffect(()=>{const n=K4(e);return n.addEventListener(Jx,t),()=>n.removeEventListener(Jx,t)},[t,e]),()=>{const n=K4(e),r=RC(e);n.dispatchEvent(new r.CustomEvent(Jx))}}var Fme=we(Il.div),Oi=Pe((e,t)=>{const n=so("Tooltip",e),r=gn(e),i=t1(),{children:o,label:a,shouldWrapChildren:s,"aria-label":l,hasArrow:u,bg:h,portalProps:p,background:m,backgroundColor:v,bgColor:S,motionProps:w,...E}=r,P=m??v??h??S;if(P){n.bg=P;const $=aQ(i,"colors",P);n[Hr.arrowBg.var]=$}const k=zme({...E,direction:i.direction}),T=typeof o=="string"||s;let M;if(T)M=le.createElement(we.span,{display:"inline-block",tabIndex:0,...k.getTriggerProps()},o);else{const $=C.exports.Children.only(o);M=C.exports.cloneElement($,k.getTriggerProps($.props,$.ref))}const I=!!l,R=k.getTooltipProps({},t),N=I?Rme(R,["role","id"]):R,z=Nme(R,["role","id"]);return a?ne(Nn,{children:[M,x(dd,{children:k.isOpen&&le.createElement(uh,{...p},le.createElement(we.div,{...k.getTooltipPositionerProps(),__css:{zIndex:n.zIndex,pointerEvents:"none"}},ne(Fme,{variants:Dme,initial:"exit",animate:"enter",exit:"exit",...w,...N,__css:n,children:[a,I&&le.createElement(we.span,{srOnly:!0,...z},l),u&&le.createElement(we.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper"},le.createElement(we.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:n.bg}}))]})))})]}):x(Nn,{children:o})});Oi.displayName="Tooltip";var $me=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=x(Zz,{environment:a,children:t});return x(joe,{theme:o,cssVarsRoot:s,children:ne(FR,{colorModeManager:n,options:o.config,children:[i?x(ffe,{}):x(dfe,{}),x(qoe,{}),r?x(vB,{zIndex:r,children:l}):l]})})};function Hme({children:e,theme:t=zoe,toastOptions:n,...r}){return ne($me,{theme:t,...r,children:[e,x(Ime,{...n})]})}function vs(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:s_(e)?2:l_(e)?3:0}function C0(e,t){return l1(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wme(e,t){return l1(e)===2?e.get(t):e[t]}function $F(e,t,n){var r=l1(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function HF(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function s_(e){return qme&&e instanceof Map}function l_(e){return Kme&&e instanceof Set}function Sf(e){return e.o||e.t}function u_(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=VF(e);delete t[tr];for(var n=_0(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=Vme),Object.freeze(e),t&&eh(e,function(n,r){return c_(r,!0)},!0)),e}function Vme(){vs(2)}function d_(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function kl(e){var t=BC[e];return t||vs(18,e),t}function Ume(e,t){BC[e]||(BC[e]=t)}function NC(){return Tv}function ew(e,t){t&&(kl("Patches"),e.u=[],e.s=[],e.v=t)}function X4(e){DC(e),e.p.forEach(Gme),e.p=null}function DC(e){e===Tv&&(Tv=e.l)}function gL(e){return Tv={p:[],l:Tv,h:e,m:!0,_:0}}function Gme(e){var t=e[tr];t.i===0||t.i===1?t.j():t.O=!0}function tw(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||kl("ES5").S(t,e,r),r?(n[tr].P&&(X4(t),vs(4)),wu(e)&&(e=Z4(t,e),t.l||Q4(t,e)),t.u&&kl("Patches").M(n[tr].t,e,t.u,t.s)):e=Z4(t,n,[]),X4(t),t.u&&t.v(t.u,t.s),e!==WF?e:void 0}function Z4(e,t,n){if(d_(t))return t;var r=t[tr];if(!r)return eh(t,function(o,a){return mL(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Q4(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=u_(r.k):r.o;eh(r.i===3?new Set(i):i,function(o,a){return mL(e,r,i,o,a,n)}),Q4(e,i,!1),n&&e.u&&kl("Patches").R(r,n,e.u,e.s)}return r.o}function mL(e,t,n,r,i,o){if(rd(i)){var a=Z4(e,i,o&&t&&t.i!==3&&!C0(t.D,r)?o.concat(r):void 0);if($F(n,r,a),!rd(a))return;e.m=!1}if(wu(i)&&!d_(i)){if(!e.h.F&&e._<1)return;Z4(e,i),t&&t.A.l||Q4(e,i)}}function Q4(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&c_(t,n)}function nw(e,t){var n=e[tr];return(n?Sf(n):e)[t]}function vL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Oc(e){e.P||(e.P=!0,e.l&&Oc(e.l))}function rw(e){e.o||(e.o=u_(e.t))}function zC(e,t,n){var r=s_(t)?kl("MapSet").N(t,n):l_(t)?kl("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:NC(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=Av;a&&(l=[s],u=im);var h=Proxy.revocable(l,u),p=h.revoke,m=h.proxy;return s.k=m,s.j=p,m}(t,n):kl("ES5").J(t,n);return(n?n.A:NC()).p.push(r),r}function jme(e){return rd(e)||vs(22,e),function t(n){if(!wu(n))return n;var r,i=n[tr],o=l1(n);if(i){if(!i.P&&(i.i<4||!kl("ES5").K(i)))return i.t;i.I=!0,r=yL(n,o),i.I=!1}else r=yL(n,o);return eh(r,function(a,s){i&&Wme(i.t,a)===s||$F(r,a,t(s))}),o===3?new Set(r):r}(e)}function yL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return u_(e)}function Yme(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[tr];return Av.get(l,o)},set:function(l){var u=this[tr];Av.set(u,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][tr];if(!s.P)switch(s.i){case 5:r(s)&&Oc(s);break;case 4:n(s)&&Oc(s)}}}function n(o){for(var a=o.t,s=o.k,l=_0(s),u=l.length-1;u>=0;u--){var h=l[u];if(h!==tr){var p=a[h];if(p===void 0&&!C0(a,h))return!0;var m=s[h],v=m&&m[tr];if(v?v.t!==p:!HF(m,p))return!0}}var S=!!a[tr];return l.length!==_0(a).length+(S?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l1?P-1:0),T=1;T1?h-1:0),m=1;m=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=kl("Patches").$;return rd(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),da=new Zme,UF=da.produce;da.produceWithPatches.bind(da);da.setAutoFreeze.bind(da);da.setUseProxies.bind(da);da.applyPatches.bind(da);da.createDraft.bind(da);da.finishDraft.bind(da);function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CL(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error($i(1));return n(h_)(e,t)}if(typeof e!="function")throw new Error($i(2));var i=e,o=t,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function h(){if(l)throw new Error($i(3));return o}function p(w){if(typeof w!="function")throw new Error($i(4));if(l)throw new Error($i(5));var E=!0;return u(),s.push(w),function(){if(!!E){if(l)throw new Error($i(6));E=!1,u();var k=s.indexOf(w);s.splice(k,1),a=null}}}function m(w){if(!Qme(w))throw new Error($i(7));if(typeof w.type>"u")throw new Error($i(8));if(l)throw new Error($i(9));try{l=!0,o=i(o,w)}finally{l=!1}for(var E=a=s,P=0;P"u")throw new Error($i(12));if(typeof n(void 0,{type:J4.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($i(13))})}function GF(e){for(var t=Object.keys(e),n={},r=0;r"u")throw u&&u.type,new Error($i(14));p[v]=E,h=h||E!==w}return h=h||o.length!==Object.keys(l).length,h?p:l}}function e5(){for(var e=arguments.length,t=new Array(e),n=0;n-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return t5}function i(s,l){r(s)===t5&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var rve=function(t,n){return t===n};function ive(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o1?t-1:0),r=1;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$ve:Fve;XF.useSyncExternalStore=j0.useSyncExternalStore!==void 0?j0.useSyncExternalStore:Hve;(function(e){e.exports=XF})(KF);var ZF={exports:{}},QF={};/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var AS=C.exports,Wve=KF.exports;function Vve(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Uve=typeof Object.is=="function"?Object.is:Vve,Gve=Wve.useSyncExternalStore,jve=AS.useRef,Yve=AS.useEffect,qve=AS.useMemo,Kve=AS.useDebugValue;QF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=jve(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=qve(function(){function l(v){if(!u){if(u=!0,h=v,v=r(v),i!==void 0&&a.hasValue){var S=a.value;if(i(S,v))return p=S}return p=v}if(S=p,Uve(h,v))return S;var w=r(v);return i!==void 0&&i(S,w)?S:(h=v,p=w)}var u=!1,h,p,m=n===void 0?null:n;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,n,r,i]);var s=Gve(e,o[0],o[1]);return Yve(function(){a.hasValue=!0,a.value=s},[s]),Kve(s),s};(function(e){e.exports=QF})(ZF);function Xve(e){e()}let JF=Xve;const Zve=e=>JF=e,Qve=()=>JF,id=C.exports.createContext(null);function e$(){return C.exports.useContext(id)}const Jve=()=>{throw new Error("uSES not initialized!")};let t$=Jve;const e2e=e=>{t$=e},t2e=(e,t)=>e===t;function n2e(e=id){const t=e===id?e$:()=>C.exports.useContext(e);return function(r,i=t2e){const{store:o,subscription:a,getServerState:s}=t(),l=t$(a.addNestedSub,o.getState,s||o.getState,r,i);return C.exports.useDebugValue(l),l}}const r2e=n2e();var i2e={exports:{}},On={};/** - * @license React - * react-is.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var g_=Symbol.for("react.element"),m_=Symbol.for("react.portal"),LS=Symbol.for("react.fragment"),MS=Symbol.for("react.strict_mode"),OS=Symbol.for("react.profiler"),IS=Symbol.for("react.provider"),RS=Symbol.for("react.context"),o2e=Symbol.for("react.server_context"),NS=Symbol.for("react.forward_ref"),DS=Symbol.for("react.suspense"),zS=Symbol.for("react.suspense_list"),BS=Symbol.for("react.memo"),FS=Symbol.for("react.lazy"),a2e=Symbol.for("react.offscreen"),n$;n$=Symbol.for("react.module.reference");function Ua(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case g_:switch(e=e.type,e){case LS:case OS:case MS:case DS:case zS:return e;default:switch(e=e&&e.$$typeof,e){case o2e:case RS:case NS:case FS:case BS:case IS:return e;default:return t}}case m_:return t}}}On.ContextConsumer=RS;On.ContextProvider=IS;On.Element=g_;On.ForwardRef=NS;On.Fragment=LS;On.Lazy=FS;On.Memo=BS;On.Portal=m_;On.Profiler=OS;On.StrictMode=MS;On.Suspense=DS;On.SuspenseList=zS;On.isAsyncMode=function(){return!1};On.isConcurrentMode=function(){return!1};On.isContextConsumer=function(e){return Ua(e)===RS};On.isContextProvider=function(e){return Ua(e)===IS};On.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===g_};On.isForwardRef=function(e){return Ua(e)===NS};On.isFragment=function(e){return Ua(e)===LS};On.isLazy=function(e){return Ua(e)===FS};On.isMemo=function(e){return Ua(e)===BS};On.isPortal=function(e){return Ua(e)===m_};On.isProfiler=function(e){return Ua(e)===OS};On.isStrictMode=function(e){return Ua(e)===MS};On.isSuspense=function(e){return Ua(e)===DS};On.isSuspenseList=function(e){return Ua(e)===zS};On.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===LS||e===OS||e===MS||e===DS||e===zS||e===a2e||typeof e=="object"&&e!==null&&(e.$$typeof===FS||e.$$typeof===BS||e.$$typeof===IS||e.$$typeof===RS||e.$$typeof===NS||e.$$typeof===n$||e.getModuleId!==void 0)};On.typeOf=Ua;(function(e){e.exports=On})(i2e);function s2e(){const e=Qve();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const LL={notify(){},get:()=>[]};function l2e(e,t){let n,r=LL;function i(p){return l(),r.subscribe(p)}function o(){r.notify()}function a(){h.onStateChange&&h.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=s2e())}function u(){n&&(n(),n=void 0,r.clear(),r=LL)}const h={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return h}const u2e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",c2e=u2e?C.exports.useLayoutEffect:C.exports.useEffect;function d2e({store:e,context:t,children:n,serverState:r}){const i=C.exports.useMemo(()=>{const s=l2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=C.exports.useMemo(()=>e.getState(),[e]);return c2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),x((t||id).Provider,{value:i,children:n})}function r$(e=id){const t=e===id?e$:()=>C.exports.useContext(e);return function(){const{store:r}=t();return r}}const f2e=r$();function h2e(e=id){const t=e===id?f2e:r$(e);return function(){return t().dispatch}}const p2e=h2e();e2e(ZF.exports.useSyncExternalStoreWithSelector);Zve(Ol.exports.unstable_batchedUpdates);var v_="persist:",i$="persist/FLUSH",y_="persist/REHYDRATE",o$="persist/PAUSE",a$="persist/PERSIST",s$="persist/PURGE",l$="persist/REGISTER",g2e=-1;function F3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?F3=function(n){return typeof n}:F3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},F3(e)}function ML(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m2e(e){for(var t=1;t{Object.keys(R).forEach(function(N){!T(N)||h[N]!==R[N]&&m.indexOf(N)===-1&&m.push(N)}),Object.keys(h).forEach(function(N){R[N]===void 0&&T(N)&&m.indexOf(N)===-1&&h[N]!==void 0&&m.push(N)}),v===null&&(v=setInterval(P,i)),h=R},o)}function P(){if(m.length===0){v&&clearInterval(v),v=null;return}var R=m.shift(),N=r.reduce(function(z,$){return $.in(z,R,h)},h[R]);if(N!==void 0)try{p[R]=l(N)}catch(z){console.error("redux-persist/createPersistoid: error serializing state",z)}else delete p[R];m.length===0&&k()}function k(){Object.keys(p).forEach(function(R){h[R]===void 0&&delete p[R]}),S=s.setItem(a,l(p)).catch(M)}function T(R){return!(n&&n.indexOf(R)===-1&&R!=="_persist"||t&&t.indexOf(R)!==-1)}function M(R){u&&u(R)}var I=function(){for(;m.length!==0;)P();return S||Promise.resolve()};return{update:E,flush:I}}function b2e(e){return JSON.stringify(e)}function x2e(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:v_).concat(e.key),r=e.storage;e.debug;var i;return e.deserialize===!1?i=function(a){return a}:typeof e.deserialize=="function"?i=e.deserialize:i=w2e,r.getItem(n).then(function(o){if(o)try{var a={},s=i(o);return Object.keys(s).forEach(function(l){a[l]=t.reduceRight(function(u,h){return h.out(u,l,s)},i(s[l]))}),a}catch(l){throw l}else return})}function w2e(e){return JSON.parse(e)}function C2e(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:v_).concat(e.key);return t.removeItem(n,_2e)}function _2e(e){}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iu(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function P2e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var T2e=5e3;function A2e(e,t){var n=e.version!==void 0?e.version:g2e;e.debug;var r=e.stateReconciler===void 0?y2e:e.stateReconciler,i=e.getStoredState||x2e,o=e.timeout!==void 0?e.timeout:T2e,a=null,s=!1,l=!0,u=function(p){return p._persist.rehydrated&&a&&!l&&a.update(p),p};return function(h,p){var m=h||{},v=m._persist,S=E2e(m,["_persist"]),w=S;if(p.type===a$){var E=!1,P=function(z,$){E||(p.rehydrate(e.key,z,$),E=!0)};if(o&&setTimeout(function(){!E&&P(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},o),l=!1,a||(a=S2e(e)),v)return iu({},t(w,p),{_persist:v});if(typeof p.rehydrate!="function"||typeof p.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),i(e).then(function(N){var z=e.migrate||function($,W){return Promise.resolve($)};z(N,n).then(function($){P($)},function($){P(void 0,$)})},function(N){P(void 0,N)}),iu({},t(w,p),{_persist:{version:n,rehydrated:!1}})}else{if(p.type===s$)return s=!0,p.result(C2e(e)),iu({},t(w,p),{_persist:v});if(p.type===i$)return p.result(a&&a.flush()),iu({},t(w,p),{_persist:v});if(p.type===o$)l=!0;else if(p.type===y_){if(s)return iu({},w,{_persist:iu({},v,{rehydrated:!0})});if(p.key===e.key){var k=t(w,p),T=p.payload,M=r!==!1&&T!==void 0?r(T,h,k,e):k,I=iu({},M,{_persist:iu({},v,{rehydrated:!0})});return u(I)}}}if(!v)return t(h,p);var R=t(w,p);return R===w?h:u(iu({},R,{_persist:v}))}}function IL(e){return O2e(e)||M2e(e)||L2e()}function L2e(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function M2e(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function O2e(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0&&arguments[0]!==void 0?arguments[0]:u$,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case l$:return $C({},t,{registry:[].concat(IL(t.registry),[n.key])});case y_:var r=t.registry.indexOf(n.key),i=IL(t.registry);return i.splice(r,1),$C({},t,{registry:i,bootstrapped:i.length===0});default:return t}};function N2e(e,t,n){var r=n||!1,i=h_(R2e,u$,t&&t.enhancer?t.enhancer:void 0),o=function(u){i.dispatch({type:l$,key:u})},a=function(u,h,p){var m={type:y_,payload:h,err:p,key:u};e.dispatch(m),i.dispatch(m),r&&s.getState().bootstrapped&&(r(),r=!1)},s=$C({},i,{purge:function(){var u=[];return e.dispatch({type:s$,result:function(p){u.push(p)}}),Promise.all(u)},flush:function(){var u=[];return e.dispatch({type:i$,result:function(p){u.push(p)}}),Promise.all(u)},pause:function(){e.dispatch({type:o$})},persist:function(){e.dispatch({type:a$,register:o,rehydrate:a})}});return t&&t.manualPersist||s.persist(),s}var S_={},b_={};b_.__esModule=!0;b_.default=B2e;function $3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$3=function(n){return typeof n}:$3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},$3(e)}function lw(){}var D2e={getItem:lw,setItem:lw,removeItem:lw};function z2e(e){if((typeof self>"u"?"undefined":$3(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function B2e(e){var t="".concat(e,"Storage");return z2e(t)?self[t]:D2e}S_.__esModule=!0;S_.default=H2e;var F2e=$2e(b_);function $2e(e){return e&&e.__esModule?e:{default:e}}function H2e(e){var t=(0,F2e.default)(e);return{getItem:function(r){return new Promise(function(i,o){i(t.getItem(r))})},setItem:function(r,i){return new Promise(function(o,a){o(t.setItem(r,i))})},removeItem:function(r){return new Promise(function(i,o){i(t.removeItem(r))})}}}var c$=void 0,W2e=V2e(S_);function V2e(e){return e&&e.__esModule?e:{default:e}}var U2e=(0,W2e.default)("local");c$=U2e;var d$={},f$={},th={};Object.defineProperty(th,"__esModule",{value:!0});th.PLACEHOLDER_UNDEFINED=th.PACKAGE_NAME=void 0;th.PACKAGE_NAME="redux-deep-persist";th.PLACEHOLDER_UNDEFINED="@@placeholder/undefined";var x_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigType=void 0,function(t){t[t.WHITELIST=0]="WHITELIST",t[t.BLACKLIST=1]="BLACKLIST"}(e.ConfigType||(e.ConfigType={}))})(x_);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getRootKeysGroup=e.throwError=e.configValidator=e.transformsValidator=e.singleTransformValidator=e.findDuplicatesAndSubsets=e.unique=e.preserveUndefined=e.mergeDeep=e.dissocPath=e.assocPath=e.path=e.difference=e.cloneDeep=e._cloneDeep=e.getCircularPath=e.isEmpty=e.isDate=e.isString=e.isIntegerString=e.isPlainObject=e.isArray=e.isLength=e.isObjectLike=void 0;const t=th,n=x_,r=function(H){return typeof H=="object"&&H!==null};e.isObjectLike=r;const i=function(H){return typeof H=="number"&&H>-1&&H%1==0&&H<=Number.MAX_SAFE_INTEGER};e.isLength=i,e.isArray=Array.isArray||function(H){return(0,e.isLength)(H&&H.length)&&Object.prototype.toString.call(H)==="[object Array]"};const o=function(H){return!!H&&typeof H=="object"&&!(0,e.isArray)(H)};e.isPlainObject=o;const a=function(H){return String(~~H)===H&&Number(H)>=0};e.isIntegerString=a;const s=function(H){return Object.prototype.toString.call(H)==="[object String]"};e.isString=s;const l=function(H){return Object.prototype.toString.call(H)==="[object Date]"};e.isDate=l;const u=function(H){return Object.keys(H).length===0};e.isEmpty=u;const h=Object.prototype.hasOwnProperty,p=function(H,J,re){re||(re=new Set([H])),J||(J="");for(const oe in H){const X=J?`${J}.${oe}`:oe,G=H[oe];if((0,e.isObjectLike)(G))return re.has(G)?`${J}.${oe}:`:(re.add(G),(0,e.getCircularPath)(G,X,re))}return null};e.getCircularPath=p;const m=function(H){if(!(0,e.isObjectLike)(H))return H;if((0,e.isDate)(H))return new Date(+H);const J=(0,e.isArray)(H)?[]:{};for(const re in H){const oe=H[re];J[re]=(0,e._cloneDeep)(oe)}return J};e._cloneDeep=m;const v=function(H){const J=(0,e.getCircularPath)(H);if(J)throw new Error(`${t.PACKAGE_NAME}: circular dependency detected under the path '${J}' of object you're trying to persist: ${H}`);return(0,e._cloneDeep)(H)};e.cloneDeep=v;const S=function(H,J){if(H===J)return{};if(!(0,e.isObjectLike)(H)||!(0,e.isObjectLike)(J))return J;const re=(0,e.cloneDeep)(H),oe=(0,e.cloneDeep)(J),X=Object.keys(re).reduce((Q,j)=>(h.call(oe,j)||(Q[j]=void 0),Q),{});if((0,e.isDate)(re)||(0,e.isDate)(oe))return re.valueOf()===oe.valueOf()?{}:oe;const G=Object.keys(oe).reduce((Q,j)=>{if(!h.call(re,j))return Q[j]=oe[j],Q;const Z=(0,e.difference)(re[j],oe[j]);return(0,e.isObjectLike)(Z)&&(0,e.isEmpty)(Z)&&!(0,e.isDate)(Z)?(0,e.isArray)(re)&&!(0,e.isArray)(oe)||!(0,e.isArray)(re)&&(0,e.isArray)(oe)?oe:Q:(Q[j]=Z,Q)},X);return delete G._persist,G};e.difference=S;const w=function(H,J){return J.reduce((re,oe)=>{if(re){const X=parseInt(oe,10),G=(0,e.isIntegerString)(oe)&&X<0?re.length+X:oe;return(0,e.isString)(re)?re.charAt(G):re[G]}},H)};e.path=w;const E=function(H,J){return[...H].reverse().reduce((X,G,Q)=>{const j=(0,e.isIntegerString)(G)?[]:{};return j[G]=Q===0?J:X,j},{})};e.assocPath=E;const P=function(H,J){const re=(0,e.cloneDeep)(H);return J.reduce((oe,X,G)=>(G===J.length-1&&oe&&(0,e.isObjectLike)(oe)&&delete oe[X],oe&&oe[X]),re),re};e.dissocPath=P;const k=function(H,J,...re){if(!re||!re.length)return J;const oe=re.shift(),{preservePlaceholder:X,preserveUndefined:G}=H;if((0,e.isObjectLike)(J)&&(0,e.isObjectLike)(oe))for(const Q in oe)if((0,e.isObjectLike)(oe[Q])&&(0,e.isObjectLike)(J[Q]))J[Q]||(J[Q]={}),k(H,J[Q],oe[Q]);else if((0,e.isArray)(J)){let j=oe[Q];const Z=X?t.PLACEHOLDER_UNDEFINED:void 0;G||(j=typeof j<"u"?j:J[parseInt(Q,10)]),j=j!==t.PLACEHOLDER_UNDEFINED?j:Z,J[parseInt(Q,10)]=j}else{const j=oe[Q]!==t.PLACEHOLDER_UNDEFINED?oe[Q]:void 0;J[Q]=j}return k(H,J,...re)},T=function(H,J,re){return k({preservePlaceholder:re?.preservePlaceholder,preserveUndefined:re?.preserveUndefined},(0,e.cloneDeep)(H),(0,e.cloneDeep)(J))};e.mergeDeep=T;const M=function(H,J=[],re,oe,X){if(!(0,e.isObjectLike)(H))return H;for(const G in H){const Q=H[G],j=(0,e.isArray)(H),Z=oe?oe+"."+G:G;Q===null&&(re===n.ConfigType.WHITELIST&&J.indexOf(Z)===-1||re===n.ConfigType.BLACKLIST&&J.indexOf(Z)!==-1)&&j&&(H[parseInt(G,10)]=void 0),Q===void 0&&X&&re===n.ConfigType.BLACKLIST&&J.indexOf(Z)===-1&&j&&(H[parseInt(G,10)]=t.PLACEHOLDER_UNDEFINED),M(Q,J,re,Z,X)}},I=function(H,J,re,oe){const X=(0,e.cloneDeep)(H);return M(X,J,re,"",oe),X};e.preserveUndefined=I;const R=function(H,J,re){return re.indexOf(H)===J};e.unique=R;const N=function(H){return H.reduce((J,re)=>{const oe=H.filter(me=>me===re),X=H.filter(me=>(re+".").indexOf(me+".")===0),{duplicates:G,subsets:Q}=J,j=oe.length>1&&G.indexOf(re)===-1,Z=X.length>1;return{duplicates:[...G,...j?oe:[]],subsets:[...Q,...Z?X:[]].filter(e.unique).sort()}},{duplicates:[],subsets:[]})};e.findDuplicatesAndSubsets=N;const z=function(H,J,re){const oe=re===n.ConfigType.WHITELIST?"whitelist":"blacklist",X=`${t.PACKAGE_NAME}: incorrect ${oe} configuration.`,G=`Check your create${re===n.ConfigType.WHITELIST?"White":"Black"}list arguments. - -`;if(!(0,e.isString)(J)||J.length<1)throw new Error(`${X} Name (key) of reducer is required. ${G}`);if(!H||!H.length)return;const{duplicates:Q,subsets:j}=(0,e.findDuplicatesAndSubsets)(H);if(Q.length>1)throw new Error(`${X} Duplicated paths. - - ${JSON.stringify(Q)} - - ${G}`);if(j.length>1)throw new Error(`${X} You are trying to persist an entire property and also some of its subset. - -${JSON.stringify(j)} - - ${G}`)};e.singleTransformValidator=z;const $=function(H){if(!(0,e.isArray)(H))return;const J=H?.map(re=>re.deepPersistKey).filter(re=>re)||[];if(J.length){const re=J.filter((oe,X)=>J.indexOf(oe)!==X);if(re.length)throw new Error(`${t.PACKAGE_NAME}: found duplicated keys in transforms creators. You can createWhitelist or createBlacklist for a specific root reducer key only once. Duplicated keys among createWhitelist and createBlacklist transforms are not allowed. - - Duplicates: ${JSON.stringify(re)}`)}};e.transformsValidator=$;const W=function({whitelist:H,blacklist:J}){if(H&&H.length&&J&&J.length)throw new Error(`${t.PACKAGE_NAME}: you should not define a whitelist and blacklist in parallel. It is allowed to use only one of these lists per config.`);if(H){const{duplicates:re,subsets:oe}=(0,e.findDuplicatesAndSubsets)(H);(0,e.throwError)({duplicates:re,subsets:oe},"whitelist")}if(J){const{duplicates:re,subsets:oe}=(0,e.findDuplicatesAndSubsets)(J);(0,e.throwError)({duplicates:re,subsets:oe},"blacklist")}};e.configValidator=W;const q=function({duplicates:H,subsets:J},re){if(H.length)throw new Error(`${t.PACKAGE_NAME}: duplicates of paths found in your ${re}. - - ${JSON.stringify(H)}`);if(J.length)throw new Error(`${t.PACKAGE_NAME}: subsets of some parent keys found in your ${re}. You must decide if you want to persist an entire path or its specific subset. - - ${JSON.stringify(J)}`)};e.throwError=q;const de=function(H){return(0,e.isArray)(H)?H.filter(e.unique).reduce((J,re)=>{const oe=re.split("."),X=oe[0],G=oe.slice(1).join(".")||void 0,Q=J.filter(Z=>Object.keys(Z)[0]===X)[0],j=Q?Object.values(Q)[0]:void 0;return Q||J.push({[X]:G?[G]:void 0}),Q&&!j&&G&&(Q[X]=[G]),Q&&j&&G&&j.push(G),J},[]):[]};e.getRootKeysGroup=de})(f$);(function(e){var t=ms&&ms.__rest||function(p,m){var v={};for(var S in p)Object.prototype.hasOwnProperty.call(p,S)&&m.indexOf(S)<0&&(v[S]=p[S]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,S=Object.getOwnPropertySymbols(p);w!E(k)&&p?p(P,k,T):P,out:(P,k,T)=>!E(k)&&m?m(P,k,T):P,deepPersistKey:S&&S[0]}},a=(p,m,v,{debug:S,whitelist:w,blacklist:E,transforms:P})=>{if(w||E)throw new Error("State reconciler autoMergeDeep uses custom transforms instead of old whitelist or blacklist config properties. Please use createWhitelist or createBlacklist transforms.");(0,n.transformsValidator)(P);const k=(0,n.cloneDeep)(v);let T=p;if(T&&(0,n.isObjectLike)(T)){const M=(0,n.difference)(m,v);(0,n.isEmpty)(M)||(T=(0,n.mergeDeep)(p,M,{preserveUndefined:!0}),S&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: sub state of your state was modified by reducer during rehydration. Values from reducer will be kept: ${JSON.stringify(M)}`)),Object.keys(T).forEach(I=>{if(I!=="_persist"){if((0,n.isObjectLike)(k[I])){k[I]=(0,n.mergeDeep)(k[I],T[I]);return}k[I]=T[I]}})}return S&&T&&(0,n.isObjectLike)(T)&&console.log(`${r.PACKAGE_NAME}/autoMergeDeep: rehydrated keys ${JSON.stringify(T)}`),k};e.autoMergeDeep=a;const s=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.WHITELIST),o(v=>{if(!m||!m.length)return v;let S=null,w;return m.forEach(E=>{const P=E.split(".");w=(0,n.path)(v,P),typeof w>"u"&&(0,n.isIntegerString)(P[P.length-1])&&(w=r.PLACEHOLDER_UNDEFINED);const k=(0,n.assocPath)(P,w),T=(0,n.isArray)(k)?[]:{};S=(0,n.mergeDeep)(S||T,k,{preservePlaceholder:!0})}),S||v},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.WHITELIST),{whitelist:[p]}));e.createWhitelist=s;const l=(p,m)=>((0,n.singleTransformValidator)(m,p,i.ConfigType.BLACKLIST),o(v=>{if(!m||!m.length)return;const S=(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST,!0);return m.map(E=>E.split(".")).reduce((E,P)=>(0,n.dissocPath)(E,P),S)},v=>(0,n.preserveUndefined)(v,m,i.ConfigType.BLACKLIST),{whitelist:[p]}));e.createBlacklist=l;const u=function(p,m){return m.map(v=>{const S=Object.keys(v)[0],w=v[S];return p===i.ConfigType.WHITELIST?(0,e.createWhitelist)(S,w):(0,e.createBlacklist)(S,w)})};e.getTransforms=u;const h=p=>{var{key:m,whitelist:v,blacklist:S,storage:w,transforms:E,rootReducer:P}=p,k=t(p,["key","whitelist","blacklist","storage","transforms","rootReducer"]);(0,n.configValidator)({whitelist:v,blacklist:S});const T=(0,n.getRootKeysGroup)(v),M=(0,n.getRootKeysGroup)(S),I=Object.keys(P(void 0,{type:""})),R=T.map(de=>Object.keys(de)[0]),N=M.map(de=>Object.keys(de)[0]),z=I.filter(de=>R.indexOf(de)===-1&&N.indexOf(de)===-1),$=(0,e.getTransforms)(i.ConfigType.WHITELIST,T),W=(0,e.getTransforms)(i.ConfigType.BLACKLIST,M),q=(0,n.isArray)(v)?z.map(de=>(0,e.createBlacklist)(de)):[];return Object.assign(Object.assign({},k),{key:m,storage:w,transforms:[...$,...W,...q,...E||[]],stateReconciler:e.autoMergeDeep})};e.getPersistConfig=h})(d$);const H3=e=>e.length===1?e[0].prompt:e.map(t=>`${t.prompt}:${t.weight}`).join(" "),G2e=e=>{const r=e.split(",").map(i=>i.split(":")).map(i=>({seed:Number(i[0]),weight:Number(i[1])}));return w_(r)?r:!1},w_=e=>Boolean(typeof e=="string"?G2e(e):e.length&&!e.some(t=>{const{seed:n,weight:r}=t,i=!isNaN(parseInt(n.toString(),10)),o=!isNaN(parseInt(r.toString(),10))&&r>=0&&r<=1;return!(i&&o)})),r5=e=>e.reduce((t,n,r,i)=>{const{seed:o,weight:a}=n;return t+=`${o}:${a}`,r!==i.length-1&&(t+=","),t},""),j2e=e=>e.split(",").map(r=>r.split(":")).map(r=>[parseInt(r[0]),parseFloat(r[1])]);var Zr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(e,t){(function(){var n,r="4.17.21",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`",l="__lodash_hash_undefined__",u=500,h="__lodash_placeholder__",p=1,m=2,v=4,S=1,w=2,E=1,P=2,k=4,T=8,M=16,I=32,R=64,N=128,z=256,$=512,W=30,q="...",de=800,H=16,J=1,re=2,oe=3,X=1/0,G=9007199254740991,Q=17976931348623157e292,j=0/0,Z=4294967295,me=Z-1,Se=Z>>>1,xe=[["ary",N],["bind",E],["bindKey",P],["curry",T],["curryRight",M],["flip",$],["partial",I],["partialRight",R],["rearg",z]],Fe="[object Arguments]",We="[object Array]",ht="[object AsyncFunction]",qe="[object Boolean]",rt="[object Date]",Ze="[object DOMException]",Xe="[object Error]",Et="[object Function]",bt="[object GeneratorFunction]",Ae="[object Map]",it="[object Number]",Ot="[object Null]",lt="[object Object]",xt="[object Promise]",_n="[object Proxy]",Pt="[object RegExp]",Kt="[object Set]",kn="[object String]",mn="[object Symbol]",Oe="[object Undefined]",Je="[object WeakMap]",Xt="[object WeakSet]",jt="[object ArrayBuffer]",Ee="[object DataView]",Mt="[object Float32Array]",Ne="[object Float64Array]",at="[object Int8Array]",an="[object Int16Array]",Dn="[object Int32Array]",$e="[object Uint8Array]",pt="[object Uint8ClampedArray]",tt="[object Uint16Array]",Nt="[object Uint32Array]",Zt=/\b__p \+= '';/g,Qn=/\b(__p \+=) '' \+/g,lo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,hi=/&(?:amp|lt|gt|quot|#39);/g,Ms=/[&<>"']/g,g1=RegExp(hi.source),ma=RegExp(Ms.source),xh=/<%-([\s\S]+?)%>/g,m1=/<%([\s\S]+?)%>/g,Iu=/<%=([\s\S]+?)%>/g,wh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/,Ro=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kd=/[\\^$.*+?()[\]{}|]/g,v1=RegExp(kd.source),Ru=/^\s+/,Ed=/\s/,y1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Os=/\{\n\/\* \[wrapped with (.+)\] \*/,Nu=/,? & /,S1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,b1=/[()=,{}\[\]\/\s]/,x1=/\\(\\)?/g,w1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ga=/\w*$/,C1=/^[-+]0x[0-9a-f]+$/i,_1=/^0b[01]+$/i,k1=/^\[object .+?Constructor\]$/,E1=/^0o[0-7]+$/i,P1=/^(?:0|[1-9]\d*)$/,T1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Is=/($^)/,A1=/['\n\r\u2028\u2029\\]/g,ja="\\ud800-\\udfff",Dl="\\u0300-\\u036f",zl="\\ufe20-\\ufe2f",Rs="\\u20d0-\\u20ff",Bl=Dl+zl+Rs,_h="\\u2700-\\u27bf",Du="a-z\\xdf-\\xf6\\xf8-\\xff",Ns="\\xac\\xb1\\xd7\\xf7",No="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",En="\\u2000-\\u206f",vn=" \\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",Do="A-Z\\xc0-\\xd6\\xd8-\\xde",Cr="\\ufe0e\\ufe0f",Ur=Ns+No+En+vn,zo="['\u2019]",Ds="["+ja+"]",Gr="["+Ur+"]",Ya="["+Bl+"]",Pd="\\d+",Fl="["+_h+"]",qa="["+Du+"]",Td="[^"+ja+Ur+Pd+_h+Du+Do+"]",pi="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Ya+"|"+pi+")",Eh="[^"+ja+"]",Ad="(?:\\ud83c[\\udde6-\\uddff]){2}",zs="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+Do+"]",Bs="\\u200d",$l="(?:"+qa+"|"+Td+")",L1="(?:"+uo+"|"+Td+")",zu="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",Bu="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",Ld=kh+"?",Fu="["+Cr+"]?",va="(?:"+Bs+"(?:"+[Eh,Ad,zs].join("|")+")"+Fu+Ld+")*",Md="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ht=Fu+Ld+va,Ph="(?:"+[Fl,Ad,zs].join("|")+")"+Ht,$u="(?:"+[Eh+Ya+"?",Ya,Ad,zs,Ds].join("|")+")",Hu=RegExp(zo,"g"),Th=RegExp(Ya,"g"),Bo=RegExp(pi+"(?="+pi+")|"+$u+Ht,"g"),Wn=RegExp([uo+"?"+qa+"+"+zu+"(?="+[Gr,uo,"$"].join("|")+")",L1+"+"+Bu+"(?="+[Gr,uo+$l,"$"].join("|")+")",uo+"?"+$l+"+"+zu,uo+"+"+Bu,Hl,Md,Pd,Ph].join("|"),"g"),Od=RegExp("["+Bs+ja+Bl+Cr+"]"),Ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Id=["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"],Lh=-1,sn={};sn[Mt]=sn[Ne]=sn[at]=sn[an]=sn[Dn]=sn[$e]=sn[pt]=sn[tt]=sn[Nt]=!0,sn[Fe]=sn[We]=sn[jt]=sn[qe]=sn[Ee]=sn[rt]=sn[Xe]=sn[Et]=sn[Ae]=sn[it]=sn[lt]=sn[Pt]=sn[Kt]=sn[kn]=sn[Je]=!1;var Wt={};Wt[Fe]=Wt[We]=Wt[jt]=Wt[Ee]=Wt[qe]=Wt[rt]=Wt[Mt]=Wt[Ne]=Wt[at]=Wt[an]=Wt[Dn]=Wt[Ae]=Wt[it]=Wt[lt]=Wt[Pt]=Wt[Kt]=Wt[kn]=Wt[mn]=Wt[$e]=Wt[pt]=Wt[tt]=Wt[Nt]=!0,Wt[Xe]=Wt[Et]=Wt[Je]=!1;var Mh={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},M1={"&":"&","<":"<",">":">",'"':""","'":"'"},U={"&":"&","<":"<",">":">",""":'"',"'":"'"},te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},pe=parseFloat,Ke=parseInt,zt=typeof ms=="object"&&ms&&ms.Object===Object&&ms,cn=typeof self=="object"&&self&&self.Object===Object&&self,vt=zt||cn||Function("return this")(),Tt=t&&!t.nodeType&&t,Vt=Tt&&!0&&e&&!e.nodeType&&e,Nr=Vt&&Vt.exports===Tt,gr=Nr&&zt.process,dn=function(){try{var ie=Vt&&Vt.require&&Vt.require("util").types;return ie||gr&&gr.binding&&gr.binding("util")}catch{}}(),jr=dn&&dn.isArrayBuffer,co=dn&&dn.isDate,Ui=dn&&dn.isMap,ya=dn&&dn.isRegExp,Fs=dn&&dn.isSet,O1=dn&&dn.isTypedArray;function gi(ie,be,ve){switch(ve.length){case 0:return ie.call(be);case 1:return ie.call(be,ve[0]);case 2:return ie.call(be,ve[0],ve[1]);case 3:return ie.call(be,ve[0],ve[1],ve[2])}return ie.apply(be,ve)}function I1(ie,be,ve,Ge){for(var _t=-1,Qt=ie==null?0:ie.length;++_t-1}function Oh(ie,be,ve){for(var Ge=-1,_t=ie==null?0:ie.length;++Ge<_t;)if(ve(be,ie[Ge]))return!0;return!1}function Bn(ie,be){for(var ve=-1,Ge=ie==null?0:ie.length,_t=Array(Ge);++ve-1;);return ve}function Ka(ie,be){for(var ve=ie.length;ve--&&Uu(be,ie[ve],0)>-1;);return ve}function N1(ie,be){for(var ve=ie.length,Ge=0;ve--;)ie[ve]===be&&++Ge;return Ge}var g2=zd(Mh),Xa=zd(M1);function Hs(ie){return"\\"+te[ie]}function Rh(ie,be){return ie==null?n:ie[be]}function Vl(ie){return Od.test(ie)}function Nh(ie){return Ah.test(ie)}function m2(ie){for(var be,ve=[];!(be=ie.next()).done;)ve.push(be.value);return ve}function Dh(ie){var be=-1,ve=Array(ie.size);return ie.forEach(function(Ge,_t){ve[++be]=[_t,Ge]}),ve}function zh(ie,be){return function(ve){return ie(be(ve))}}function Ho(ie,be){for(var ve=-1,Ge=ie.length,_t=0,Qt=[];++ve-1}function N2(c,g){var b=this.__data__,L=kr(b,c);return L<0?(++this.size,b.push([c,g])):b[L][1]=g,this}Wo.prototype.clear=I2,Wo.prototype.delete=R2,Wo.prototype.get=X1,Wo.prototype.has=Z1,Wo.prototype.set=N2;function Vo(c){var g=-1,b=c==null?0:c.length;for(this.clear();++g=g?c:g)),c}function ri(c,g,b,L,D,F){var Y,ee=g&p,ce=g&m,Ce=g&v;if(b&&(Y=D?b(c,L,D,F):b(c)),Y!==n)return Y;if(!sr(c))return c;var _e=Rt(c);if(_e){if(Y=GV(c),!ee)return xi(c,Y)}else{var Le=ai(c),Ue=Le==Et||Le==bt;if(yc(c))return Qs(c,ee);if(Le==lt||Le==Fe||Ue&&!D){if(Y=ce||Ue?{}:_k(c),!ee)return ce?gg(c,lc(Y,c)):yo(c,Qe(Y,c))}else{if(!Wt[Le])return D?c:{};Y=jV(c,Le,ee)}}F||(F=new vr);var dt=F.get(c);if(dt)return dt;F.set(c,Y),Jk(c)?c.forEach(function(St){Y.add(ri(St,g,b,St,c,F))}):Zk(c)&&c.forEach(function(St,Gt){Y.set(Gt,ri(St,g,b,Gt,c,F))});var yt=Ce?ce?ge:qo:ce?bo:si,$t=_e?n:yt(c);return Vn($t||c,function(St,Gt){$t&&(Gt=St,St=c[Gt]),Us(Y,Gt,ri(St,g,b,Gt,c,F))}),Y}function Gh(c){var g=si(c);return function(b){return jh(b,c,g)}}function jh(c,g,b){var L=b.length;if(c==null)return!L;for(c=ln(c);L--;){var D=b[L],F=g[D],Y=c[D];if(Y===n&&!(D in c)||!F(Y))return!1}return!0}function tg(c,g,b){if(typeof c!="function")throw new mi(a);return bg(function(){c.apply(n,b)},g)}function uc(c,g,b,L){var D=-1,F=Ri,Y=!0,ee=c.length,ce=[],Ce=g.length;if(!ee)return ce;b&&(g=Bn(g,_r(b))),L?(F=Oh,Y=!1):g.length>=i&&(F=ju,Y=!1,g=new wa(g));e:for(;++DD?0:D+b),L=L===n||L>D?D:Dt(L),L<0&&(L+=D),L=b>L?0:tE(L);b0&&b(ee)?g>1?Er(ee,g-1,b,L,D):Sa(D,ee):L||(D[D.length]=ee)}return D}var qh=Js(),go=Js(!0);function Yo(c,g){return c&&qh(c,g,si)}function mo(c,g){return c&&go(c,g,si)}function Kh(c,g){return ho(g,function(b){return Ql(c[b])})}function Gs(c,g){g=Zs(g,c);for(var b=0,L=g.length;c!=null&&bg}function Zh(c,g){return c!=null&&en.call(c,g)}function Qh(c,g){return c!=null&&g in ln(c)}function Jh(c,g,b){return c>=qr(g,b)&&c=120&&_e.length>=120)?new wa(Y&&_e):n}_e=c[0];var Le=-1,Ue=ee[0];e:for(;++Le-1;)ee!==c&&Gd.call(ee,ce,1),Gd.call(c,ce,1);return c}function ef(c,g){for(var b=c?g.length:0,L=b-1;b--;){var D=g[b];if(b==L||D!==F){var F=D;Zl(D)?Gd.call(c,D,1):up(c,D)}}return c}function tf(c,g){return c+Gl(U1()*(g-c+1))}function Ks(c,g,b,L){for(var D=-1,F=mr(qd((g-c)/(b||1)),0),Y=ve(F);F--;)Y[L?F:++D]=c,c+=b;return Y}function gc(c,g){var b="";if(!c||g<1||g>G)return b;do g%2&&(b+=c),g=Gl(g/2),g&&(c+=c);while(g);return b}function Ct(c,g){return Pb(Pk(c,g,xo),c+"")}function ip(c){return sc(mp(c))}function nf(c,g){var b=mp(c);return V2(b,Yl(g,0,b.length))}function Kl(c,g,b,L){if(!sr(c))return c;g=Zs(g,c);for(var D=-1,F=g.length,Y=F-1,ee=c;ee!=null&&++DD?0:D+g),b=b>D?D:b,b<0&&(b+=D),D=g>b?0:b-g>>>0,g>>>=0;for(var F=ve(D);++L>>1,Y=c[F];Y!==null&&!Ko(Y)&&(b?Y<=g:Y=i){var Ce=g?null:V(c);if(Ce)return Hd(Ce);Y=!1,D=ju,ce=new wa}else ce=g?[]:ee;e:for(;++L=L?c:Tr(c,g,b)}var dg=x2||function(c){return vt.clearTimeout(c)};function Qs(c,g){if(g)return c.slice();var b=c.length,L=Zu?Zu(b):new c.constructor(b);return c.copy(L),L}function fg(c){var g=new c.constructor(c.byteLength);return new vi(g).set(new vi(c)),g}function Xl(c,g){var b=g?fg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function F2(c){var g=new c.constructor(c.source,Ga.exec(c));return g.lastIndex=c.lastIndex,g}function Un(c){return Xd?ln(Xd.call(c)):{}}function $2(c,g){var b=g?fg(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function hg(c,g){if(c!==g){var b=c!==n,L=c===null,D=c===c,F=Ko(c),Y=g!==n,ee=g===null,ce=g===g,Ce=Ko(g);if(!ee&&!Ce&&!F&&c>g||F&&Y&&ce&&!ee&&!Ce||L&&Y&&ce||!b&&ce||!D)return 1;if(!L&&!F&&!Ce&&c=ee)return ce;var Ce=b[L];return ce*(Ce=="desc"?-1:1)}}return c.index-g.index}function H2(c,g,b,L){for(var D=-1,F=c.length,Y=b.length,ee=-1,ce=g.length,Ce=mr(F-Y,0),_e=ve(ce+Ce),Le=!L;++ee1?b[D-1]:n,Y=D>2?b[2]:n;for(F=c.length>3&&typeof F=="function"?(D--,F):n,Y&&Xi(b[0],b[1],Y)&&(F=D<3?n:F,D=1),g=ln(g);++L-1?D[F?g[Y]:Y]:n}}function vg(c){return er(function(g){var b=g.length,L=b,D=ji.prototype.thru;for(c&&g.reverse();L--;){var F=g[L];if(typeof F!="function")throw new mi(a);if(D&&!Y&&ye(F)=="wrapper")var Y=new ji([],!0)}for(L=Y?L:b;++L1&&Jt.reverse(),_e&&ceee))return!1;var Ce=F.get(c),_e=F.get(g);if(Ce&&_e)return Ce==g&&_e==c;var Le=-1,Ue=!0,dt=b&w?new wa:n;for(F.set(c,g),F.set(g,c);++Le1?"& ":"")+g[L],g=g.join(b>2?", ":" "),c.replace(y1,`{ -/* [wrapped with `+g+`] */ -`)}function qV(c){return Rt(c)||df(c)||!!(W1&&c&&c[W1])}function Zl(c,g){var b=typeof c;return g=g??G,!!g&&(b=="number"||b!="symbol"&&P1.test(c))&&c>-1&&c%1==0&&c0){if(++g>=de)return arguments[0]}else g=0;return c.apply(n,arguments)}}function V2(c,g){var b=-1,L=c.length,D=L-1;for(g=g===n?L:g;++b1?c[g-1]:n;return b=typeof b=="function"?(c.pop(),b):n,Fk(c,b)});function $k(c){var g=B(c);return g.__chain__=!0,g}function oG(c,g){return g(c),c}function U2(c,g){return g(c)}var aG=er(function(c){var g=c.length,b=g?c[0]:0,L=this.__wrapped__,D=function(F){return Uh(F,c)};return g>1||this.__actions__.length||!(L instanceof Ut)||!Zl(b)?this.thru(D):(L=L.slice(b,+b+(g?1:0)),L.__actions__.push({func:U2,args:[D],thisArg:n}),new ji(L,this.__chain__).thru(function(F){return g&&!F.length&&F.push(n),F}))});function sG(){return $k(this)}function lG(){return new ji(this.value(),this.__chain__)}function uG(){this.__values__===n&&(this.__values__=eE(this.value()));var c=this.__index__>=this.__values__.length,g=c?n:this.__values__[this.__index__++];return{done:c,value:g}}function cG(){return this}function dG(c){for(var g,b=this;b instanceof Zd;){var L=Ik(b);L.__index__=0,L.__values__=n,g?D.__wrapped__=L:g=L;var D=L;b=b.__wrapped__}return D.__wrapped__=c,g}function fG(){var c=this.__wrapped__;if(c instanceof Ut){var g=c;return this.__actions__.length&&(g=new Ut(this)),g=g.reverse(),g.__actions__.push({func:U2,args:[Tb],thisArg:n}),new ji(g,this.__chain__)}return this.thru(Tb)}function hG(){return Xs(this.__wrapped__,this.__actions__)}var pG=dp(function(c,g,b){en.call(c,b)?++c[b]:Uo(c,b,1)});function gG(c,g,b){var L=Rt(c)?zn:ng;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}function mG(c,g){var b=Rt(c)?ho:jo;return b(c,Te(g,3))}var vG=mg(Rk),yG=mg(Nk);function SG(c,g){return Er(G2(c,g),1)}function bG(c,g){return Er(G2(c,g),X)}function xG(c,g,b){return b=b===n?1:Dt(b),Er(G2(c,g),b)}function Hk(c,g){var b=Rt(c)?Vn:Ja;return b(c,Te(g,3))}function Wk(c,g){var b=Rt(c)?fo:Yh;return b(c,Te(g,3))}var wG=dp(function(c,g,b){en.call(c,b)?c[b].push(g):Uo(c,b,[g])});function CG(c,g,b,L){c=So(c)?c:mp(c),b=b&&!L?Dt(b):0;var D=c.length;return b<0&&(b=mr(D+b,0)),X2(c)?b<=D&&c.indexOf(g,b)>-1:!!D&&Uu(c,g,b)>-1}var _G=Ct(function(c,g,b){var L=-1,D=typeof g=="function",F=So(c)?ve(c.length):[];return Ja(c,function(Y){F[++L]=D?gi(g,Y,b):es(Y,g,b)}),F}),kG=dp(function(c,g,b){Uo(c,b,g)});function G2(c,g){var b=Rt(c)?Bn:Sr;return b(c,Te(g,3))}function EG(c,g,b,L){return c==null?[]:(Rt(g)||(g=g==null?[]:[g]),b=L?n:b,Rt(b)||(b=b==null?[]:[b]),Si(c,g,b))}var PG=dp(function(c,g,b){c[b?0:1].push(g)},function(){return[[],[]]});function TG(c,g,b){var L=Rt(c)?Rd:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Ja)}function AG(c,g,b){var L=Rt(c)?d2:Ih,D=arguments.length<3;return L(c,Te(g,4),b,D,Yh)}function LG(c,g){var b=Rt(c)?ho:jo;return b(c,q2(Te(g,3)))}function MG(c){var g=Rt(c)?sc:ip;return g(c)}function OG(c,g,b){(b?Xi(c,g,b):g===n)?g=1:g=Dt(g);var L=Rt(c)?ni:nf;return L(c,g)}function IG(c){var g=Rt(c)?Sb:oi;return g(c)}function RG(c){if(c==null)return 0;if(So(c))return X2(c)?ba(c):c.length;var g=ai(c);return g==Ae||g==Kt?c.size:Pr(c).length}function NG(c,g,b){var L=Rt(c)?Wu:vo;return b&&Xi(c,g,b)&&(g=n),L(c,Te(g,3))}var DG=Ct(function(c,g){if(c==null)return[];var b=g.length;return b>1&&Xi(c,g[0],g[1])?g=[]:b>2&&Xi(g[0],g[1],g[2])&&(g=[g[0]]),Si(c,Er(g,1),[])}),j2=w2||function(){return vt.Date.now()};function zG(c,g){if(typeof g!="function")throw new mi(a);return c=Dt(c),function(){if(--c<1)return g.apply(this,arguments)}}function Vk(c,g,b){return g=b?n:g,g=c&&g==null?c.length:g,he(c,N,n,n,n,n,g)}function Uk(c,g){var b;if(typeof g!="function")throw new mi(a);return c=Dt(c),function(){return--c>0&&(b=g.apply(this,arguments)),c<=1&&(g=n),b}}var Lb=Ct(function(c,g,b){var L=E;if(b.length){var D=Ho(b,He(Lb));L|=I}return he(c,L,g,b,D)}),Gk=Ct(function(c,g,b){var L=E|P;if(b.length){var D=Ho(b,He(Gk));L|=I}return he(g,L,c,b,D)});function jk(c,g,b){g=b?n:g;var L=he(c,T,n,n,n,n,n,g);return L.placeholder=jk.placeholder,L}function Yk(c,g,b){g=b?n:g;var L=he(c,M,n,n,n,n,n,g);return L.placeholder=Yk.placeholder,L}function qk(c,g,b){var L,D,F,Y,ee,ce,Ce=0,_e=!1,Le=!1,Ue=!0;if(typeof c!="function")throw new mi(a);g=ka(g)||0,sr(b)&&(_e=!!b.leading,Le="maxWait"in b,F=Le?mr(ka(b.maxWait)||0,g):F,Ue="trailing"in b?!!b.trailing:Ue);function dt(Lr){var os=L,eu=D;return L=D=n,Ce=Lr,Y=c.apply(eu,os),Y}function yt(Lr){return Ce=Lr,ee=bg(Gt,g),_e?dt(Lr):Y}function $t(Lr){var os=Lr-ce,eu=Lr-Ce,hE=g-os;return Le?qr(hE,F-eu):hE}function St(Lr){var os=Lr-ce,eu=Lr-Ce;return ce===n||os>=g||os<0||Le&&eu>=F}function Gt(){var Lr=j2();if(St(Lr))return Jt(Lr);ee=bg(Gt,$t(Lr))}function Jt(Lr){return ee=n,Ue&&L?dt(Lr):(L=D=n,Y)}function Xo(){ee!==n&&dg(ee),Ce=0,L=ce=D=ee=n}function Zi(){return ee===n?Y:Jt(j2())}function Zo(){var Lr=j2(),os=St(Lr);if(L=arguments,D=this,ce=Lr,os){if(ee===n)return yt(ce);if(Le)return dg(ee),ee=bg(Gt,g),dt(ce)}return ee===n&&(ee=bg(Gt,g)),Y}return Zo.cancel=Xo,Zo.flush=Zi,Zo}var BG=Ct(function(c,g){return tg(c,1,g)}),FG=Ct(function(c,g,b){return tg(c,ka(g)||0,b)});function $G(c){return he(c,$)}function Y2(c,g){if(typeof c!="function"||g!=null&&typeof g!="function")throw new mi(a);var b=function(){var L=arguments,D=g?g.apply(this,L):L[0],F=b.cache;if(F.has(D))return F.get(D);var Y=c.apply(this,L);return b.cache=F.set(D,Y)||F,Y};return b.cache=new(Y2.Cache||Vo),b}Y2.Cache=Vo;function q2(c){if(typeof c!="function")throw new mi(a);return function(){var g=arguments;switch(g.length){case 0:return!c.call(this);case 1:return!c.call(this,g[0]);case 2:return!c.call(this,g[0],g[1]);case 3:return!c.call(this,g[0],g[1],g[2])}return!c.apply(this,g)}}function HG(c){return Uk(2,c)}var WG=wb(function(c,g){g=g.length==1&&Rt(g[0])?Bn(g[0],_r(Te())):Bn(Er(g,1),_r(Te()));var b=g.length;return Ct(function(L){for(var D=-1,F=qr(L.length,b);++D=g}),df=tp(function(){return arguments}())?tp:function(c){return br(c)&&en.call(c,"callee")&&!H1.call(c,"callee")},Rt=ve.isArray,rj=jr?_r(jr):ig;function So(c){return c!=null&&K2(c.length)&&!Ql(c)}function Ar(c){return br(c)&&So(c)}function ij(c){return c===!0||c===!1||br(c)&&ii(c)==qe}var yc=C2||Wb,oj=co?_r(co):og;function aj(c){return br(c)&&c.nodeType===1&&!xg(c)}function sj(c){if(c==null)return!0;if(So(c)&&(Rt(c)||typeof c=="string"||typeof c.splice=="function"||yc(c)||gp(c)||df(c)))return!c.length;var g=ai(c);if(g==Ae||g==Kt)return!c.size;if(Sg(c))return!Pr(c).length;for(var b in c)if(en.call(c,b))return!1;return!0}function lj(c,g){return dc(c,g)}function uj(c,g,b){b=typeof b=="function"?b:n;var L=b?b(c,g):n;return L===n?dc(c,g,n,b):!!L}function Ob(c){if(!br(c))return!1;var g=ii(c);return g==Xe||g==Ze||typeof c.message=="string"&&typeof c.name=="string"&&!xg(c)}function cj(c){return typeof c=="number"&&$h(c)}function Ql(c){if(!sr(c))return!1;var g=ii(c);return g==Et||g==bt||g==ht||g==_n}function Xk(c){return typeof c=="number"&&c==Dt(c)}function K2(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=G}function sr(c){var g=typeof c;return c!=null&&(g=="object"||g=="function")}function br(c){return c!=null&&typeof c=="object"}var Zk=Ui?_r(Ui):xb;function dj(c,g){return c===g||fc(c,g,kt(g))}function fj(c,g,b){return b=typeof b=="function"?b:n,fc(c,g,kt(g),b)}function hj(c){return Qk(c)&&c!=+c}function pj(c){if(ZV(c))throw new _t(o);return np(c)}function gj(c){return c===null}function mj(c){return c==null}function Qk(c){return typeof c=="number"||br(c)&&ii(c)==it}function xg(c){if(!br(c)||ii(c)!=lt)return!1;var g=Qu(c);if(g===null)return!0;var b=en.call(g,"constructor")&&g.constructor;return typeof b=="function"&&b instanceof b&&ir.call(b)==ti}var Ib=ya?_r(ya):or;function vj(c){return Xk(c)&&c>=-G&&c<=G}var Jk=Fs?_r(Fs):Bt;function X2(c){return typeof c=="string"||!Rt(c)&&br(c)&&ii(c)==kn}function Ko(c){return typeof c=="symbol"||br(c)&&ii(c)==mn}var gp=O1?_r(O1):Dr;function yj(c){return c===n}function Sj(c){return br(c)&&ai(c)==Je}function bj(c){return br(c)&&ii(c)==Xt}var xj=_(js),wj=_(function(c,g){return c<=g});function eE(c){if(!c)return[];if(So(c))return X2(c)?Ni(c):xi(c);if(Ju&&c[Ju])return m2(c[Ju]());var g=ai(c),b=g==Ae?Dh:g==Kt?Hd:mp;return b(c)}function Jl(c){if(!c)return c===0?c:0;if(c=ka(c),c===X||c===-X){var g=c<0?-1:1;return g*Q}return c===c?c:0}function Dt(c){var g=Jl(c),b=g%1;return g===g?b?g-b:g:0}function tE(c){return c?Yl(Dt(c),0,Z):0}function ka(c){if(typeof c=="number")return c;if(Ko(c))return j;if(sr(c)){var g=typeof c.valueOf=="function"?c.valueOf():c;c=sr(g)?g+"":g}if(typeof c!="string")return c===0?c:+c;c=Gi(c);var b=_1.test(c);return b||E1.test(c)?Ke(c.slice(2),b?2:8):C1.test(c)?j:+c}function nE(c){return Ca(c,bo(c))}function Cj(c){return c?Yl(Dt(c),-G,G):c===0?c:0}function Sn(c){return c==null?"":qi(c)}var _j=Ki(function(c,g){if(Sg(g)||So(g)){Ca(g,si(g),c);return}for(var b in g)en.call(g,b)&&Us(c,b,g[b])}),rE=Ki(function(c,g){Ca(g,bo(g),c)}),Z2=Ki(function(c,g,b,L){Ca(g,bo(g),c,L)}),kj=Ki(function(c,g,b,L){Ca(g,si(g),c,L)}),Ej=er(Uh);function Pj(c,g){var b=jl(c);return g==null?b:Qe(b,g)}var Tj=Ct(function(c,g){c=ln(c);var b=-1,L=g.length,D=L>2?g[2]:n;for(D&&Xi(g[0],g[1],D)&&(L=1);++b1),F}),Ca(c,ge(c),b),L&&(b=ri(b,p|m|v,At));for(var D=g.length;D--;)up(b,g[D]);return b});function jj(c,g){return oE(c,q2(Te(g)))}var Yj=er(function(c,g){return c==null?{}:lg(c,g)});function oE(c,g){if(c==null)return{};var b=Bn(ge(c),function(L){return[L]});return g=Te(g),rp(c,b,function(L,D){return g(L,D[0])})}function qj(c,g,b){g=Zs(g,c);var L=-1,D=g.length;for(D||(D=1,c=n);++Lg){var L=c;c=g,g=L}if(b||c%1||g%1){var D=U1();return qr(c+D*(g-c+pe("1e-"+((D+"").length-1))),g)}return tf(c,g)}var oY=el(function(c,g,b){return g=g.toLowerCase(),c+(b?lE(g):g)});function lE(c){return Db(Sn(c).toLowerCase())}function uE(c){return c=Sn(c),c&&c.replace(T1,g2).replace(Th,"")}function aY(c,g,b){c=Sn(c),g=qi(g);var L=c.length;b=b===n?L:Yl(Dt(b),0,L);var D=b;return b-=g.length,b>=0&&c.slice(b,D)==g}function sY(c){return c=Sn(c),c&&ma.test(c)?c.replace(Ms,Xa):c}function lY(c){return c=Sn(c),c&&v1.test(c)?c.replace(kd,"\\$&"):c}var uY=el(function(c,g,b){return c+(b?"-":"")+g.toLowerCase()}),cY=el(function(c,g,b){return c+(b?" ":"")+g.toLowerCase()}),dY=hp("toLowerCase");function fY(c,g,b){c=Sn(c),g=Dt(g);var L=g?ba(c):0;if(!g||L>=g)return c;var D=(g-L)/2;return d(Gl(D),b)+c+d(qd(D),b)}function hY(c,g,b){c=Sn(c),g=Dt(g);var L=g?ba(c):0;return g&&L>>0,b?(c=Sn(c),c&&(typeof g=="string"||g!=null&&!Ib(g))&&(g=qi(g),!g&&Vl(c))?ns(Ni(c),0,b):c.split(g,b)):[]}var bY=el(function(c,g,b){return c+(b?" ":"")+Db(g)});function xY(c,g,b){return c=Sn(c),b=b==null?0:Yl(Dt(b),0,c.length),g=qi(g),c.slice(b,b+g.length)==g}function wY(c,g,b){var L=B.templateSettings;b&&Xi(c,g,b)&&(g=n),c=Sn(c),g=Z2({},g,L,Re);var D=Z2({},g.imports,L.imports,Re),F=si(D),Y=$d(D,F),ee,ce,Ce=0,_e=g.interpolate||Is,Le="__p += '",Ue=Vd((g.escape||Is).source+"|"+_e.source+"|"+(_e===Iu?w1:Is).source+"|"+(g.evaluate||Is).source+"|$","g"),dt="//# sourceURL="+(en.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Lh+"]")+` -`;c.replace(Ue,function(St,Gt,Jt,Xo,Zi,Zo){return Jt||(Jt=Xo),Le+=c.slice(Ce,Zo).replace(A1,Hs),Gt&&(ee=!0,Le+=`' + -__e(`+Gt+`) + -'`),Zi&&(ce=!0,Le+=`'; -`+Zi+`; -__p += '`),Jt&&(Le+=`' + -((__t = (`+Jt+`)) == null ? '' : __t) + -'`),Ce=Zo+St.length,St}),Le+=`'; -`;var yt=en.call(g,"variable")&&g.variable;if(!yt)Le=`with (obj) { -`+Le+` -} -`;else if(b1.test(yt))throw new _t(s);Le=(ce?Le.replace(Zt,""):Le).replace(Qn,"$1").replace(lo,"$1;"),Le="function("+(yt||"obj")+`) { -`+(yt?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ee?", __e = _.escape":"")+(ce?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+Le+`return __p -}`;var $t=dE(function(){return Qt(F,dt+"return "+Le).apply(n,Y)});if($t.source=Le,Ob($t))throw $t;return $t}function CY(c){return Sn(c).toLowerCase()}function _Y(c){return Sn(c).toUpperCase()}function kY(c,g,b){if(c=Sn(c),c&&(b||g===n))return Gi(c);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ni(g),F=$o(L,D),Y=Ka(L,D)+1;return ns(L,F,Y).join("")}function EY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.slice(0,z1(c)+1);if(!c||!(g=qi(g)))return c;var L=Ni(c),D=Ka(L,Ni(g))+1;return ns(L,0,D).join("")}function PY(c,g,b){if(c=Sn(c),c&&(b||g===n))return c.replace(Ru,"");if(!c||!(g=qi(g)))return c;var L=Ni(c),D=$o(L,Ni(g));return ns(L,D).join("")}function TY(c,g){var b=W,L=q;if(sr(g)){var D="separator"in g?g.separator:D;b="length"in g?Dt(g.length):b,L="omission"in g?qi(g.omission):L}c=Sn(c);var F=c.length;if(Vl(c)){var Y=Ni(c);F=Y.length}if(b>=F)return c;var ee=b-ba(L);if(ee<1)return L;var ce=Y?ns(Y,0,ee).join(""):c.slice(0,ee);if(D===n)return ce+L;if(Y&&(ee+=ce.length-ee),Ib(D)){if(c.slice(ee).search(D)){var Ce,_e=ce;for(D.global||(D=Vd(D.source,Sn(Ga.exec(D))+"g")),D.lastIndex=0;Ce=D.exec(_e);)var Le=Ce.index;ce=ce.slice(0,Le===n?ee:Le)}}else if(c.indexOf(qi(D),ee)!=ee){var Ue=ce.lastIndexOf(D);Ue>-1&&(ce=ce.slice(0,Ue))}return ce+L}function AY(c){return c=Sn(c),c&&g1.test(c)?c.replace(hi,S2):c}var LY=el(function(c,g,b){return c+(b?" ":"")+g.toUpperCase()}),Db=hp("toUpperCase");function cE(c,g,b){return c=Sn(c),g=b?n:g,g===n?Nh(c)?Wd(c):R1(c):c.match(g)||[]}var dE=Ct(function(c,g){try{return gi(c,n,g)}catch(b){return Ob(b)?b:new _t(b)}}),MY=er(function(c,g){return Vn(g,function(b){b=tl(b),Uo(c,b,Lb(c[b],c))}),c});function OY(c){var g=c==null?0:c.length,b=Te();return c=g?Bn(c,function(L){if(typeof L[1]!="function")throw new mi(a);return[b(L[0]),L[1]]}):[],Ct(function(L){for(var D=-1;++DG)return[];var b=Z,L=qr(c,Z);g=Te(g),c-=Z;for(var D=Fd(L,g);++b0||g<0)?new Ut(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),g!==n&&(g=Dt(g),b=g<0?b.dropRight(-g):b.take(g-c)),b)},Ut.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ut.prototype.toArray=function(){return this.take(Z)},Yo(Ut.prototype,function(c,g){var b=/^(?:filter|find|map|reject)|While$/.test(g),L=/^(?:head|last)$/.test(g),D=B[L?"take"+(g=="last"?"Right":""):g],F=L||/^find/.test(g);!D||(B.prototype[g]=function(){var Y=this.__wrapped__,ee=L?[1]:arguments,ce=Y instanceof Ut,Ce=ee[0],_e=ce||Rt(Y),Le=function(Gt){var Jt=D.apply(B,Sa([Gt],ee));return L&&Ue?Jt[0]:Jt};_e&&b&&typeof Ce=="function"&&Ce.length!=1&&(ce=_e=!1);var Ue=this.__chain__,dt=!!this.__actions__.length,yt=F&&!Ue,$t=ce&&!dt;if(!F&&_e){Y=$t?Y:new Ut(this);var St=c.apply(Y,ee);return St.__actions__.push({func:U2,args:[Le],thisArg:n}),new ji(St,Ue)}return yt&&$t?c.apply(this,ee):(St=this.thru(Le),yt?L?St.value()[0]:St.value():St)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(c){var g=qu[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",L=/^(?:pop|shift)$/.test(c);B.prototype[c]=function(){var D=arguments;if(L&&!this.__chain__){var F=this.value();return g.apply(Rt(F)?F:[],D)}return this[b](function(Y){return g.apply(Rt(Y)?Y:[],D)})}}),Yo(Ut.prototype,function(c,g){var b=B[g];if(b){var L=b.name+"";en.call(Za,L)||(Za[L]=[]),Za[L].push({name:g,func:b})}}),Za[lf(n,P).name]=[{name:"wrapper",func:n}],Ut.prototype.clone=Di,Ut.prototype.reverse=yi,Ut.prototype.value=T2,B.prototype.at=aG,B.prototype.chain=sG,B.prototype.commit=lG,B.prototype.next=uG,B.prototype.plant=dG,B.prototype.reverse=fG,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=hG,B.prototype.first=B.prototype.head,Ju&&(B.prototype[Ju]=cG),B},xa=po();Vt?((Vt.exports=xa)._=xa,Tt._=xa):vt._=xa}).call(ms)})(Zr,Zr.exports);const st=Zr.exports;var Y2e=Object.create,h$=Object.defineProperty,q2e=Object.getOwnPropertyDescriptor,K2e=Object.getOwnPropertyNames,X2e=Object.getPrototypeOf,Z2e=Object.prototype.hasOwnProperty,De=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Q2e=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of K2e(t))!Z2e.call(e,i)&&i!==n&&h$(e,i,{get:()=>t[i],enumerable:!(r=q2e(t,i))||r.enumerable});return e},p$=(e,t,n)=>(n=e!=null?Y2e(X2e(e)):{},Q2e(t||!e||!e.__esModule?h$(n,"default",{value:e,enumerable:!0}):n,e)),J2e=De((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n}),g$=De((e,t)=>{function n(r,i){return r===i||r!==r&&i!==i}t.exports=n}),$S=De((e,t)=>{var n=g$();function r(i,o){for(var a=i.length;a--;)if(n(i[a][0],o))return a;return-1}t.exports=r}),eye=De((e,t)=>{var n=$S(),r=Array.prototype,i=r.splice;function o(a){var s=this.__data__,l=n(s,a);if(l<0)return!1;var u=s.length-1;return l==u?s.pop():i.call(s,l,1),--this.size,!0}t.exports=o}),tye=De((e,t)=>{var n=$S();function r(i){var o=this.__data__,a=n(o,i);return a<0?void 0:o[a][1]}t.exports=r}),nye=De((e,t)=>{var n=$S();function r(i){return n(this.__data__,i)>-1}t.exports=r}),rye=De((e,t)=>{var n=$S();function r(i,o){var a=this.__data__,s=n(a,i);return s<0?(++this.size,a.push([i,o])):a[s][1]=o,this}t.exports=r}),HS=De((e,t)=>{var n=J2e(),r=eye(),i=tye(),o=nye(),a=rye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=HS();function r(){this.__data__=new n,this.size=0}t.exports=r}),oye=De((e,t)=>{function n(r){var i=this.__data__,o=i.delete(r);return this.size=i.size,o}t.exports=n}),aye=De((e,t)=>{function n(r){return this.__data__.get(r)}t.exports=n}),sye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),m$=De((e,t)=>{var n=typeof global=="object"&&global&&global.Object===Object&&global;t.exports=n}),Pu=De((e,t)=>{var n=m$(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=n||r||Function("return this")();t.exports=i}),C_=De((e,t)=>{var n=Pu(),r=n.Symbol;t.exports=r}),lye=De((e,t)=>{var n=C_(),r=Object.prototype,i=r.hasOwnProperty,o=r.toString,a=n?n.toStringTag:void 0;function s(l){var u=i.call(l,a),h=l[a];try{l[a]=void 0;var p=!0}catch{}var m=o.call(l);return p&&(u?l[a]=h:delete l[a]),m}t.exports=s}),uye=De((e,t)=>{var n=Object.prototype,r=n.toString;function i(o){return r.call(o)}t.exports=i}),WS=De((e,t)=>{var n=C_(),r=lye(),i=uye(),o="[object Null]",a="[object Undefined]",s=n?n.toStringTag:void 0;function l(u){return u==null?u===void 0?a:o:s&&s in Object(u)?r(u):i(u)}t.exports=l}),v$=De((e,t)=>{function n(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}t.exports=n}),y$=De((e,t)=>{var n=WS(),r=v$(),i="[object AsyncFunction]",o="[object Function]",a="[object GeneratorFunction]",s="[object Proxy]";function l(u){if(!r(u))return!1;var h=n(u);return h==o||h==a||h==i||h==s}t.exports=l}),cye=De((e,t)=>{var n=Pu(),r=n["__core-js_shared__"];t.exports=r}),dye=De((e,t)=>{var n=cye(),r=function(){var o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}();function i(o){return!!r&&r in o}t.exports=i}),S$=De((e,t)=>{var n=Function.prototype,r=n.toString;function i(o){if(o!=null){try{return r.call(o)}catch{}try{return o+""}catch{}}return""}t.exports=i}),fye=De((e,t)=>{var n=y$(),r=dye(),i=v$(),o=S$(),a=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,h=l.toString,p=u.hasOwnProperty,m=RegExp("^"+h.call(p).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function v(S){if(!i(S)||r(S))return!1;var w=n(S)?m:s;return w.test(o(S))}t.exports=v}),hye=De((e,t)=>{function n(r,i){return r?.[i]}t.exports=n}),u1=De((e,t)=>{var n=fye(),r=hye();function i(o,a){var s=r(o,a);return n(s)?s:void 0}t.exports=i}),__=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Map");t.exports=i}),VS=De((e,t)=>{var n=u1(),r=n(Object,"create");t.exports=r}),pye=De((e,t)=>{var n=VS();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r}),gye=De((e,t)=>{function n(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}t.exports=n}),mye=De((e,t)=>{var n=VS(),r="__lodash_hash_undefined__",i=Object.prototype,o=i.hasOwnProperty;function a(s){var l=this.__data__;if(n){var u=l[s];return u===r?void 0:u}return o.call(l,s)?l[s]:void 0}t.exports=a}),vye=De((e,t)=>{var n=VS(),r=Object.prototype,i=r.hasOwnProperty;function o(a){var s=this.__data__;return n?s[a]!==void 0:i.call(s,a)}t.exports=o}),yye=De((e,t)=>{var n=VS(),r="__lodash_hash_undefined__";function i(o,a){var s=this.__data__;return this.size+=this.has(o)?0:1,s[o]=n&&a===void 0?r:a,this}t.exports=i}),Sye=De((e,t)=>{var n=pye(),r=gye(),i=mye(),o=vye(),a=yye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=Sye(),r=HS(),i=__();function o(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=o}),xye=De((e,t)=>{function n(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}t.exports=n}),US=De((e,t)=>{var n=xye();function r(i,o){var a=i.__data__;return n(o)?a[typeof o=="string"?"string":"hash"]:a.map}t.exports=r}),wye=De((e,t)=>{var n=US();function r(i){var o=n(this,i).delete(i);return this.size-=o?1:0,o}t.exports=r}),Cye=De((e,t)=>{var n=US();function r(i){return n(this,i).get(i)}t.exports=r}),_ye=De((e,t)=>{var n=US();function r(i){return n(this,i).has(i)}t.exports=r}),kye=De((e,t)=>{var n=US();function r(i,o){var a=n(this,i),s=a.size;return a.set(i,o),this.size+=a.size==s?0:1,this}t.exports=r}),b$=De((e,t)=>{var n=bye(),r=wye(),i=Cye(),o=_ye(),a=kye();function s(l){var u=-1,h=l==null?0:l.length;for(this.clear();++u{var n=HS(),r=__(),i=b$(),o=200;function a(s,l){var u=this.__data__;if(u instanceof n){var h=u.__data__;if(!r||h.length{var n=HS(),r=iye(),i=oye(),o=aye(),a=sye(),s=Eye();function l(u){var h=this.__data__=new n(u);this.size=h.size}l.prototype.clear=r,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=a,l.prototype.set=s,t.exports=l}),Tye=De((e,t)=>{var n="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,n),this}t.exports=r}),Aye=De((e,t)=>{function n(r){return this.__data__.has(r)}t.exports=n}),Lye=De((e,t)=>{var n=b$(),r=Tye(),i=Aye();function o(a){var s=-1,l=a==null?0:a.length;for(this.__data__=new n;++s{function n(r,i){for(var o=-1,a=r==null?0:r.length;++o{function n(r,i){return r.has(i)}t.exports=n}),x$=De((e,t)=>{var n=Lye(),r=Mye(),i=Oye(),o=1,a=2;function s(l,u,h,p,m,v){var S=h&o,w=l.length,E=u.length;if(w!=E&&!(S&&E>w))return!1;var P=v.get(l),k=v.get(u);if(P&&k)return P==u&&k==l;var T=-1,M=!0,I=h&a?new n:void 0;for(v.set(l,u),v.set(u,l);++T{var n=Pu(),r=n.Uint8Array;t.exports=r}),Rye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a,s){o[++i]=[s,a]}),o}t.exports=n}),Nye=De((e,t)=>{function n(r){var i=-1,o=Array(r.size);return r.forEach(function(a){o[++i]=a}),o}t.exports=n}),Dye=De((e,t)=>{var n=C_(),r=Iye(),i=g$(),o=x$(),a=Rye(),s=Nye(),l=1,u=2,h="[object Boolean]",p="[object Date]",m="[object Error]",v="[object Map]",S="[object Number]",w="[object RegExp]",E="[object Set]",P="[object String]",k="[object Symbol]",T="[object ArrayBuffer]",M="[object DataView]",I=n?n.prototype:void 0,R=I?I.valueOf:void 0;function N(z,$,W,q,de,H,J){switch(W){case M:if(z.byteLength!=$.byteLength||z.byteOffset!=$.byteOffset)return!1;z=z.buffer,$=$.buffer;case T:return!(z.byteLength!=$.byteLength||!H(new r(z),new r($)));case h:case p:case S:return i(+z,+$);case m:return z.name==$.name&&z.message==$.message;case w:case P:return z==$+"";case v:var re=a;case E:var oe=q&l;if(re||(re=s),z.size!=$.size&&!oe)return!1;var X=J.get(z);if(X)return X==$;q|=u,J.set(z,$);var G=o(re(z),re($),q,de,H,J);return J.delete(z),G;case k:if(R)return R.call(z)==R.call($)}return!1}t.exports=N}),zye=De((e,t)=>{function n(r,i){for(var o=-1,a=i.length,s=r.length;++o{var n=Array.isArray;t.exports=n}),Bye=De((e,t)=>{var n=zye(),r=k_();function i(o,a,s){var l=a(o);return r(o)?l:n(l,s(o))}t.exports=i}),Fye=De((e,t)=>{function n(r,i){for(var o=-1,a=r==null?0:r.length,s=0,l=[];++o{function n(){return[]}t.exports=n}),Hye=De((e,t)=>{var n=Fye(),r=$ye(),i=Object.prototype,o=i.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(l){return l==null?[]:(l=Object(l),n(a(l),function(u){return o.call(l,u)}))}:r;t.exports=s}),Wye=De((e,t)=>{function n(r,i){for(var o=-1,a=Array(r);++o{function n(r){return r!=null&&typeof r=="object"}t.exports=n}),Vye=De((e,t)=>{var n=WS(),r=GS(),i="[object Arguments]";function o(a){return r(a)&&n(a)==i}t.exports=o}),Uye=De((e,t)=>{var n=Vye(),r=GS(),i=Object.prototype,o=i.hasOwnProperty,a=i.propertyIsEnumerable,s=n(function(){return arguments}())?n:function(l){return r(l)&&o.call(l,"callee")&&!a.call(l,"callee")};t.exports=s}),Gye=De((e,t)=>{function n(){return!1}t.exports=n}),w$=De((e,t)=>{var n=Pu(),r=Gye(),i=typeof e=="object"&&e&&!e.nodeType&&e,o=i&&typeof t=="object"&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;t.exports=u}),jye=De((e,t)=>{var n=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(o,a){var s=typeof o;return a=a??n,!!a&&(s=="number"||s!="symbol"&&r.test(o))&&o>-1&&o%1==0&&o{var n=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}t.exports=r}),Yye=De((e,t)=>{var n=WS(),r=C$(),i=GS(),o="[object Arguments]",a="[object Array]",s="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",v="[object Object]",S="[object RegExp]",w="[object Set]",E="[object String]",P="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",M="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",N="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",W="[object Uint8ClampedArray]",q="[object Uint16Array]",de="[object Uint32Array]",H={};H[M]=H[I]=H[R]=H[N]=H[z]=H[$]=H[W]=H[q]=H[de]=!0,H[o]=H[a]=H[k]=H[s]=H[T]=H[l]=H[u]=H[h]=H[p]=H[m]=H[v]=H[S]=H[w]=H[E]=H[P]=!1;function J(re){return i(re)&&r(re.length)&&!!H[n(re)]}t.exports=J}),qye=De((e,t)=>{function n(r){return function(i){return r(i)}}t.exports=n}),Kye=De((e,t)=>{var n=m$(),r=typeof e=="object"&&e&&!e.nodeType&&e,i=r&&typeof t=="object"&&t&&!t.nodeType&&t,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s}),_$=De((e,t)=>{var n=Yye(),r=qye(),i=Kye(),o=i&&i.isTypedArray,a=o?r(o):n;t.exports=a}),Xye=De((e,t)=>{var n=Wye(),r=Uye(),i=k_(),o=w$(),a=jye(),s=_$(),l=Object.prototype,u=l.hasOwnProperty;function h(p,m){var v=i(p),S=!v&&r(p),w=!v&&!S&&o(p),E=!v&&!S&&!w&&s(p),P=v||S||w||E,k=P?n(p.length,String):[],T=k.length;for(var M in p)(m||u.call(p,M))&&!(P&&(M=="length"||w&&(M=="offset"||M=="parent")||E&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||a(M,T)))&&k.push(M);return k}t.exports=h}),Zye=De((e,t)=>{var n=Object.prototype;function r(i){var o=i&&i.constructor,a=typeof o=="function"&&o.prototype||n;return i===a}t.exports=r}),Qye=De((e,t)=>{function n(r,i){return function(o){return r(i(o))}}t.exports=n}),Jye=De((e,t)=>{var n=Qye(),r=n(Object.keys,Object);t.exports=r}),e3e=De((e,t)=>{var n=Zye(),r=Jye(),i=Object.prototype,o=i.hasOwnProperty;function a(s){if(!n(s))return r(s);var l=[];for(var u in Object(s))o.call(s,u)&&u!="constructor"&&l.push(u);return l}t.exports=a}),t3e=De((e,t)=>{var n=y$(),r=C$();function i(o){return o!=null&&r(o.length)&&!n(o)}t.exports=i}),n3e=De((e,t)=>{var n=Xye(),r=e3e(),i=t3e();function o(a){return i(a)?n(a):r(a)}t.exports=o}),r3e=De((e,t)=>{var n=Bye(),r=Hye(),i=n3e();function o(a){return n(a,i,r)}t.exports=o}),i3e=De((e,t)=>{var n=r3e(),r=1,i=Object.prototype,o=i.hasOwnProperty;function a(s,l,u,h,p,m){var v=u&r,S=n(s),w=S.length,E=n(l),P=E.length;if(w!=P&&!v)return!1;for(var k=w;k--;){var T=S[k];if(!(v?T in l:o.call(l,T)))return!1}var M=m.get(s),I=m.get(l);if(M&&I)return M==l&&I==s;var R=!0;m.set(s,l),m.set(l,s);for(var N=v;++k{var n=u1(),r=Pu(),i=n(r,"DataView");t.exports=i}),a3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Promise");t.exports=i}),s3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"Set");t.exports=i}),l3e=De((e,t)=>{var n=u1(),r=Pu(),i=n(r,"WeakMap");t.exports=i}),u3e=De((e,t)=>{var n=o3e(),r=__(),i=a3e(),o=s3e(),a=l3e(),s=WS(),l=S$(),u="[object Map]",h="[object Object]",p="[object Promise]",m="[object Set]",v="[object WeakMap]",S="[object DataView]",w=l(n),E=l(r),P=l(i),k=l(o),T=l(a),M=s;(n&&M(new n(new ArrayBuffer(1)))!=S||r&&M(new r)!=u||i&&M(i.resolve())!=p||o&&M(new o)!=m||a&&M(new a)!=v)&&(M=function(I){var R=s(I),N=R==h?I.constructor:void 0,z=N?l(N):"";if(z)switch(z){case w:return S;case E:return u;case P:return p;case k:return m;case T:return v}return R}),t.exports=M}),c3e=De((e,t)=>{var n=Pye(),r=x$(),i=Dye(),o=i3e(),a=u3e(),s=k_(),l=w$(),u=_$(),h=1,p="[object Arguments]",m="[object Array]",v="[object Object]",S=Object.prototype,w=S.hasOwnProperty;function E(P,k,T,M,I,R){var N=s(P),z=s(k),$=N?m:a(P),W=z?m:a(k);$=$==p?v:$,W=W==p?v:W;var q=$==v,de=W==v,H=$==W;if(H&&l(P)){if(!l(k))return!1;N=!0,q=!1}if(H&&!q)return R||(R=new n),N||u(P)?r(P,k,T,M,I,R):i(P,k,$,T,M,I,R);if(!(T&h)){var J=q&&w.call(P,"__wrapped__"),re=de&&w.call(k,"__wrapped__");if(J||re){var oe=J?P.value():P,X=re?k.value():k;return R||(R=new n),I(oe,X,T,M,R)}}return H?(R||(R=new n),o(P,k,T,M,I,R)):!1}t.exports=E}),d3e=De((e,t)=>{var n=c3e(),r=GS();function i(o,a,s,l,u){return o===a?!0:o==null||a==null||!r(o)&&!r(a)?o!==o&&a!==a:n(o,a,s,l,i,u)}t.exports=i}),k$=De((e,t)=>{var n=d3e();function r(i,o){return n(i,o)}t.exports=r}),f3e=["ctrl","shift","alt","meta","mod"],h3e={esc:"escape",return:"enter",left:"arrowleft",up:"arrowup",right:"arrowright",down:"arrowdown"};function uw(e,t=","){return typeof e=="string"?e.split(t):e}function Bm(e,t="+"){let n=e.toLocaleLowerCase().split(t).map(o=>o.trim()).map(o=>h3e[o]||o),r={alt:n.includes("alt"),ctrl:n.includes("ctrl"),shift:n.includes("shift"),meta:n.includes("meta"),mod:n.includes("mod")},i=n.filter(o=>!f3e.includes(o));return{...r,keys:i}}function p3e(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function g3e(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function m3e(e){return E$(e,["input","textarea","select"])}function E$({target:e},t=!1){let n=e&&e.tagName;return t instanceof Array?Boolean(n&&t&&t.some(r=>r.toLowerCase()===n.toLowerCase())):Boolean(n&&t&&t===!0)}function v3e(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):t?e.some(n=>t.includes(n))||e.includes("*"):!0}var y3e=(e,t,n)=>{let{alt:r,ctrl:i,meta:o,mod:a,shift:s,keys:l}=t,{altKey:u,ctrlKey:h,metaKey:p,shiftKey:m,key:v,code:S}=e,w=S.toLowerCase().replace("key",""),E=v.toLowerCase();if(u!==r&&E!=="alt"||m!==s&&E!=="shift")return!1;if(a){if(!p&&!h)return!1}else if(p!==o&&w!=="meta"||h!==i&&w!=="ctrl")return!1;return l&&l.length===1&&(l.includes(E)||l.includes(w))?!0:l?l.every(P=>n.has(P)):!l},S3e=C.exports.createContext(void 0),b3e=()=>C.exports.useContext(S3e),x3e=C.exports.createContext({hotkeys:[],enabledScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),w3e=()=>C.exports.useContext(x3e),C3e=p$(k$());function _3e(e){let t=C.exports.useRef(void 0);return(0,C3e.default)(t.current,e)||(t.current=e),t.current}var NL=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()};function mt(e,t,n,r){let i=C.exports.useRef(null),{current:o}=C.exports.useRef(new Set),a=n instanceof Array?r instanceof Array?void 0:r:n,s=n instanceof Array?n:r instanceof Array?r:[],l=C.exports.useCallback(t,[...s]),u=_3e(a),{enabledScopes:h}=w3e(),p=b3e();return C.exports.useLayoutEffect(()=>{if(u?.enabled===!1||!v3e(h,u?.scopes))return;let m=w=>{if(!(m3e(w)&&!E$(w,u?.enableOnFormTags))){if(i.current!==null&&document.activeElement!==i.current&&!i.current.contains(document.activeElement)){NL(w);return}w.target?.isContentEditable&&!u?.enableOnContentEditable||uw(e,u?.splitKey).forEach(E=>{let P=Bm(E,u?.combinationKey);if(y3e(w,P,o)||P.keys?.includes("*")){if(p3e(w,P,u?.preventDefault),!g3e(w,P,u?.enabled)){NL(w);return}l(w,P)}})}},v=w=>{o.add(w.key.toLowerCase()),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&m(w)},S=w=>{w.key.toLowerCase()!=="meta"?o.delete(w.key.toLowerCase()):o.clear(),u?.keyup&&m(w)};return(i.current||document).addEventListener("keyup",S),(i.current||document).addEventListener("keydown",v),p&&uw(e,u?.splitKey).forEach(w=>p.addHotkey(Bm(w,u?.combinationKey))),()=>{(i.current||document).removeEventListener("keyup",S),(i.current||document).removeEventListener("keydown",v),p&&uw(e,u?.splitKey).forEach(w=>p.removeHotkey(Bm(w,u?.combinationKey)))}},[e,l,u,h]),i}p$(k$());var HC=new Set;function k3e(e){(Array.isArray(e)?e:[e]).forEach(t=>HC.add(Bm(t)))}function E3e(e){(Array.isArray(e)?e:[e]).forEach(t=>{let n=Bm(t);for(let r of HC)r.keys?.every(i=>n.keys?.includes(i))&&HC.delete(r)})}window.addEventListener("DOMContentLoaded",()=>{document.addEventListener("keydown",e=>{k3e(e.key)}),document.addEventListener("keyup",e=>{E3e(e.key)})});function P3e(){return ne("div",{className:"work-in-progress nodes-work-in-progress",children:[x("h1",{children:"Nodes"}),x("p",{children:"A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature."})]})}const T3e=()=>ne("div",{className:"work-in-progress post-processing-work-in-progress",children:[x("h1",{children:"Post Processing"}),x("p",{children:"Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the main image display."}),x("p",{children:"A dedicated UI will be released soon to facilitate more advanced post processing workflows."}),x("p",{children:"The Invoke AI Command Line Interface offers various other features including Embiggen."})]}),A3e=ut({displayName:"ImageToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{transform:"matrix(1.10943,0,0,1.10943,-206.981,-213.533)",children:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M688.533,2405.95L542.987,2405.95C349.532,2405.95 192.47,2248.89 192.47,2055.44L192.47,542.987C192.47,349.532 349.532,192.47 542.987,192.47L2527.88,192.47C2721.33,192.47 2878.4,349.532 2878.4,542.987L2878.4,1172.79L3023.94,1172.79C3217.4,1172.79 3374.46,1329.85 3374.46,1523.3C3374.46,1523.3 3374.46,3035.75 3374.46,3035.75C3374.46,3229.21 3217.4,3386.27 3023.94,3386.27L1039.05,3386.27C845.595,3386.27 688.533,3229.21 688.533,3035.75L688.533,2405.95ZM3286.96,2634.37L3286.96,1523.3C3286.96,1378.14 3169.11,1260.29 3023.94,1260.29C3023.94,1260.29 1039.05,1260.29 1039.05,1260.29C893.887,1260.29 776.033,1378.14 776.033,1523.3L776.033,2489.79L1440.94,1736.22L2385.83,2775.59L2880.71,2200.41L3286.96,2634.37ZM2622.05,1405.51C2778.5,1405.51 2905.51,1532.53 2905.51,1688.98C2905.51,1845.42 2778.5,1972.44 2622.05,1972.44C2465.6,1972.44 2338.58,1845.42 2338.58,1688.98C2338.58,1532.53 2465.6,1405.51 2622.05,1405.51ZM2790.9,1172.79L1323.86,1172.79L944.882,755.906L279.97,1509.47L279.97,542.987C279.97,397.824 397.824,279.97 542.987,279.97C542.987,279.97 2527.88,279.97 2527.88,279.97C2673.04,279.97 2790.9,397.824 2790.9,542.987L2790.9,1172.79ZM2125.98,425.197C2282.43,425.197 2409.45,552.213 2409.45,708.661C2409.45,865.11 2282.43,992.126 2125.98,992.126C1969.54,992.126 1842.52,865.11 1842.52,708.661C1842.52,552.213 1969.54,425.197 2125.98,425.197Z"})})}),L3e=ut({displayName:"NodesIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 0,515.578 0,770.787L0,2766.03C0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM3427.88,770.787L3427.88,2766.03C3427.88,2957.53 3272.4,3113.01 3080.9,3113.01C3080.9,3113.01 462.407,3113.01 462.407,3113.01C270.906,3113.01 115.431,2957.53 115.431,2766.03L115.431,770.787C115.431,579.286 270.906,423.812 462.407,423.812L3080.9,423.812C3272.4,423.812 3427.88,579.286 3427.88,770.787ZM1214.23,1130.69L1321.47,1130.69C1324.01,1130.69 1326.54,1130.53 1329.05,1130.2C1329.05,1130.2 1367.3,1125.33 1397.94,1149.8C1421.63,1168.72 1437.33,1204.3 1437.33,1265.48L1437.33,2078.74L1220.99,2078.74C1146.83,2078.74 1086.61,2138.95 1086.61,2213.12L1086.61,2762.46C1086.61,2836.63 1146.83,2896.84 1220.99,2896.84L1770.34,2896.84C1844.5,2896.84 1904.71,2836.63 1904.71,2762.46L1904.71,2213.12C1904.71,2138.95 1844.5,2078.74 1770.34,2078.74L1554,2078.74L1554,1604.84C1625.84,1658.19 1703.39,1658.1 1703.39,1658.1C1703.54,1658.1 1703.69,1658.11 1703.84,1658.11L2362.2,1658.11L2362.2,1874.44C2362.2,1948.61 2422.42,2008.82 2496.58,2008.82L3045.93,2008.82C3120.09,2008.82 3180.3,1948.61 3180.3,1874.44L3180.3,1325.1C3180.3,1250.93 3120.09,1190.72 3045.93,1190.72L2496.58,1190.72C2422.42,1190.72 2362.2,1250.93 2362.2,1325.1L2362.2,1558.97L2362.2,1541.44L1704.23,1541.44C1702.2,1541.37 1650.96,1539.37 1609.51,1499.26C1577.72,1468.49 1554,1416.47 1554,1331.69L1554,1265.48C1554,1153.86 1513.98,1093.17 1470.76,1058.64C1411.24,1011.1 1338.98,1012.58 1319.15,1014.03L1214.23,1014.03L1214.23,796.992C1214.23,722.828 1154.02,662.617 1079.85,662.617L530.507,662.617C456.343,662.617 396.131,722.828 396.131,796.992L396.131,1346.34C396.131,1420.5 456.343,1480.71 530.507,1480.71L1079.85,1480.71C1154.02,1480.71 1214.23,1420.5 1214.23,1346.34L1214.23,1130.69Z"})}),M3e=ut({displayName:"PostprocessingIcon",viewBox:"0 0 3543 3543",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M709.477,1596.53L992.591,1275.66L2239.09,2646.81L2891.95,1888.03L3427.88,2460.51L3427.88,994.78C3427.88,954.66 3421.05,916.122 3408.5,880.254L3521.9,855.419C3535.8,899.386 3543.31,946.214 3543.31,994.78L3543.31,2990.02C3543.31,3245.23 3336.11,3452.43 3080.9,3452.43C3080.9,3452.43 462.407,3452.43 462.407,3452.43C207.197,3452.43 -0,3245.23 -0,2990.02L-0,994.78C-0,739.571 207.197,532.373 462.407,532.373L505.419,532.373L504.644,532.546L807.104,600.085C820.223,601.729 832.422,607.722 841.77,617.116C850.131,625.517 855.784,636.21 858.055,647.804L462.407,647.804C270.906,647.804 115.431,803.279 115.431,994.78L115.431,2075.73L-0,2101.5L115.431,2127.28L115.431,2269.78L220.47,2150.73L482.345,2209.21C503.267,2211.83 522.722,2221.39 537.63,2236.37C552.538,2251.35 562.049,2270.9 564.657,2291.93L671.84,2776.17L779.022,2291.93C781.631,2270.9 791.141,2251.35 806.05,2236.37C820.958,2221.39 840.413,2211.83 861.334,2209.21L1353.15,2101.5L861.334,1993.8C840.413,1991.18 820.958,1981.62 806.05,1966.64C791.141,1951.66 781.631,1932.11 779.022,1911.08L709.477,1596.53ZM671.84,1573.09L725.556,2006.07C726.863,2016.61 731.63,2026.4 739.101,2033.91C746.573,2041.42 756.323,2046.21 766.808,2047.53L1197.68,2101.5L766.808,2155.48C756.323,2156.8 746.573,2161.59 739.101,2169.09C731.63,2176.6 726.863,2186.4 725.556,2196.94L671.84,2629.92L618.124,2196.94C616.817,2186.4 612.05,2176.6 604.579,2169.09C597.107,2161.59 587.357,2156.8 576.872,2155.48L146.001,2101.5L576.872,2047.53C587.357,2046.21 597.107,2041.42 604.579,2033.91C612.05,2026.4 616.817,2016.61 618.124,2006.07L671.84,1573.09ZM609.035,1710.36L564.657,1911.08C562.049,1932.11 552.538,1951.66 537.63,1966.64C522.722,1981.62 503.267,1991.18 482.345,1993.8L328.665,2028.11L609.035,1710.36ZM2297.12,938.615L2451.12,973.003C2480.59,976.695 2507.99,990.158 2528.99,1011.26C2549.99,1032.37 2563.39,1059.9 2567.07,1089.52L2672.73,1566.9C2634.5,1580.11 2593.44,1587.29 2550.72,1587.29C2344.33,1587.29 2176.77,1419.73 2176.77,1213.34C2176.77,1104.78 2223.13,1006.96 2297.12,938.615ZM2718.05,76.925L2793.72,686.847C2795.56,701.69 2802.27,715.491 2812.8,726.068C2823.32,736.644 2837.06,743.391 2851.83,745.242L3458.78,821.28L2851.83,897.318C2837.06,899.168 2823.32,905.916 2812.8,916.492C2802.27,927.068 2795.56,940.87 2793.72,955.712L2718.05,1565.63L2642.38,955.712C2640.54,940.87 2633.83,927.068 2623.3,916.492C2612.78,905.916 2599.04,899.168 2584.27,897.318L1977.32,821.28L2584.27,745.242C2599.04,743.391 2612.78,736.644 2623.3,726.068C2633.83,715.491 2640.54,701.69 2642.38,686.847L2718.05,76.925ZM2883.68,1043.06C2909.88,1094.13 2924.67,1152.02 2924.67,1213.34C2924.67,1335.4 2866.06,1443.88 2775.49,1512.14L2869.03,1089.52C2871.07,1073.15 2876.07,1057.42 2883.68,1043.06ZM925.928,201.2L959.611,472.704C960.431,479.311 963.42,485.455 968.105,490.163C972.79,494.871 978.904,497.875 985.479,498.698L1255.66,532.546L985.479,566.395C978.904,567.218 972.79,570.222 968.105,574.93C963.42,579.638 960.431,585.781 959.611,592.388L925.928,863.893L892.245,592.388C891.425,585.781 888.436,579.638 883.751,574.93C879.066,570.222 872.952,567.218 866.378,566.395L596.195,532.546L866.378,498.698C872.952,497.875 879.066,494.871 883.751,490.163C888.436,485.455 891.425,479.311 892.245,472.704L925.928,201.2ZM2864.47,532.373L3080.9,532.373C3258.7,532.373 3413.2,632.945 3490.58,780.281L3319.31,742.773C3257.14,683.925 3173.2,647.804 3080.9,647.804L2927.07,647.804C2919.95,642.994 2913.25,637.473 2907.11,631.298C2886.11,610.194 2872.71,582.655 2869.03,553.04L2864.47,532.373ZM1352.36,532.373L2571.64,532.373L2567.07,553.04C2563.39,582.655 2549.99,610.194 2528.99,631.298C2522.85,637.473 2516.16,642.994 2509.03,647.804L993.801,647.804C996.072,636.21 1001.73,625.517 1010.09,617.116C1019.43,607.722 1031.63,601.729 1044.75,600.085L1353.15,532.546L1352.36,532.373Z"})}),O3e=ut({displayName:"TextToImageIcon",viewBox:"0 0 3543 3543",path:x("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",transform:"matrix(1.11667,0,0,1.1066,-231.131,-213.062)",children:x("path",{d:"M2209.59,1137.35L2209.59,1098.17C2177.13,1108.99 2125.74,1121.91 2055.41,1136.94C2054.77,1137.08 2054.14,1137.21 2053.49,1137.35L1662.79,1137.35C1687.75,1101.98 1720.8,1074.35 1761.93,1054.44C1808.52,1031.9 1875.69,1012.22 1963.45,995.386C2081.86,973.146 2163.91,952.409 2209.59,933.174L2209.59,907.929C2209.59,859.241 2197.57,824.529 2173.53,803.792C2149.48,783.054 2104.1,772.686 2037.38,772.686C1992.3,772.686 1957.14,781.552 1931.89,799.284C1906.64,817.015 1886.21,848.121 1870.58,892.601L1640.67,851.127C1666.51,758.56 1710.99,690.037 1774.11,645.557C1837.22,601.077 1930.99,578.837 2055.41,578.837C2168.42,578.837 2252.57,592.211 2307.87,618.959C2363.17,645.707 2402.09,679.668 2424.63,720.842C2447.17,762.016 2458.44,837.602 2458.44,947.6L2456.7,1137.35L3021.34,1137.35C3214.79,1137.35 3371.86,1294.41 3371.86,1487.87C3371.86,1487.87 3371.86,3000.32 3371.86,3000.32C3371.86,3193.78 3214.79,3350.84 3021.34,3350.84C3021.34,3350.84 1036.45,3350.84 1036.45,3350.84C842.991,3350.84 685.93,3193.78 685.93,3000.32L685.93,1487.87C685.93,1400.21 718.174,1320.03 771.448,1258.54L772.123,1257.76L607.408,1257.76L498.311,1558L215.202,1558L730.028,236.22L1012.24,236.22L1373.06,1137.35L2209.59,1137.35ZM3284.36,2598.93L3284.36,1487.87C3284.36,1342.71 3166.5,1224.85 3021.34,1224.85C3021.34,1224.85 1036.45,1224.85 1036.45,1224.85C891.284,1224.85 773.43,1342.71 773.43,1487.87L773.43,2454.35L1438.34,1700.79L2383.22,2740.16L2878.11,2164.98L3284.36,2598.93ZM2619.44,1370.08C2775.89,1370.08 2902.91,1497.1 2902.91,1653.54C2902.91,1809.99 2775.89,1937.01 2619.44,1937.01C2462.99,1937.01 2335.98,1809.99 2335.98,1653.54C2335.98,1497.1 2462.99,1370.08 2619.44,1370.08ZM772.877,1256.89L772.849,1256.93L773.167,1256.57L772.877,1256.89ZM773.634,1256.04L773.563,1256.12L773.985,1255.64L773.634,1256.04ZM774.394,1255.18L774.276,1255.31L774.746,1254.78L774.394,1255.18ZM775.157,1254.32L774.988,1254.51L775.493,1253.95L775.157,1254.32ZM775.923,1253.47L775.698,1253.72L776.237,1253.12L775.923,1253.47ZM776.691,1252.62L776.403,1252.94L776.979,1252.3L776.691,1252.62ZM777.462,1251.77L777.098,1252.17L777.723,1251.49L777.462,1251.77ZM925.081,1155.44C868.026,1174.57 817.508,1207.99 777.775,1251.43C817.511,1207.99 868.031,1174.57 925.081,1155.44ZM925.646,1155.25L925.108,1155.43L926.103,1155.1L925.646,1155.25ZM935.286,1152.2C932.214,1153.12 929.159,1154.09 926.13,1155.09C929.165,1154.09 932.219,1153.12 935.286,1152.2ZM935.716,1152.07L935.384,1152.17L936.292,1151.89L935.716,1152.07ZM936.843,1151.73L936.451,1151.85L937.327,1151.59L936.843,1151.73ZM937.972,1151.4L937.514,1151.53L938.377,1151.28L937.972,1151.4ZM939.102,1151.07L938.57,1151.22L939.438,1150.97L939.102,1151.07ZM940.233,1150.74L939.613,1150.92L940.505,1150.67L940.233,1150.74ZM946.659,1148.98C944.639,1149.51 942.626,1150.07 940.626,1150.63C942.631,1150.06 944.642,1149.51 946.659,1148.98ZM947.056,1148.87L946.829,1148.93L947.659,1148.71L947.056,1148.87ZM948.198,1148.57L947.919,1148.65L948.705,1148.44L948.198,1148.57ZM949.342,1148.28L949.008,1148.37L949.771,1148.17L949.342,1148.28ZM950.488,1147.99L950.096,1148.09L950.848,1147.9L950.488,1147.99ZM951.635,1147.7L951.182,1147.81L951.932,1147.63L951.635,1147.7ZM952.783,1147.42L952.262,1147.55L953.022,1147.36L952.783,1147.42ZM953.933,1147.14L953.327,1147.28L954.115,1147.09L953.933,1147.14ZM958.213,1146.13C956.927,1146.42 955.644,1146.73 954.354,1147.04C955.637,1146.73 956.923,1146.43 958.213,1146.13ZM958.547,1146.06L958.409,1146.09L959.174,1145.91L958.547,1146.06ZM959.704,1145.79L959.517,1145.84L960.229,1145.68L959.704,1145.79ZM960.863,1145.54L960.626,1145.59L961.311,1145.44L960.863,1145.54ZM962.023,1145.28L961.736,1145.35L962.406,1145.2L962.023,1145.28ZM963.184,1145.03L962.846,1145.11L963.508,1144.97L963.184,1145.03ZM964.347,1144.79L963.956,1144.87L964.615,1144.73L964.347,1144.79ZM965.511,1144.55L965.066,1144.64L965.725,1144.5L965.511,1144.55ZM966.677,1144.31L966.172,1144.41L966.838,1144.28L966.677,1144.31ZM967.844,1144.08L967.269,1144.19L967.953,1144.05L967.844,1144.08ZM970.183,1143.62C969.793,1143.69 969.403,1143.77 969.013,1143.85L969.055,1143.84C969.413,1143.77 969.771,1143.7 970.129,1143.63L970.183,1143.62ZM971.354,1143.4L971.245,1143.42L971.882,1143.3L971.354,1143.4ZM972.526,1143.18L972.37,1143.21L972.987,1143.09L972.526,1143.18ZM973.7,1142.96L973.496,1143L974.103,1142.89L973.7,1142.96ZM974.876,1142.75L974.624,1142.8L975.225,1142.69L974.876,1142.75ZM976.052,1142.55L975.754,1142.6L976.349,1142.49L976.052,1142.55ZM977.23,1142.34L976.885,1142.4L977.476,1142.3L977.23,1142.34ZM978.41,1142.14L978.019,1142.21L978.605,1142.11L978.41,1142.14ZM979.59,1141.95L979.156,1142.02L979.736,1141.92L979.59,1141.95ZM980.772,1141.76L980.299,1141.83L980.868,1141.74L980.772,1141.76ZM981.955,1141.57L981.464,1141.65L982.002,1141.56L981.955,1141.57ZM983.14,1141.39L983.1,1141.39L983.605,1141.32L983.14,1141.39ZM984.326,1141.21L984.239,1141.22L984.778,1141.14L984.326,1141.21ZM985.513,1141.03L985.379,1141.05L985.928,1140.97L985.513,1141.03ZM986.702,1140.86L986.521,1140.89L987.073,1140.81L986.702,1140.86ZM987.891,1140.69L987.665,1140.73L988.218,1140.65L987.891,1140.69ZM989.082,1140.53L988.811,1140.57L989.363,1140.49L989.082,1140.53ZM990.275,1140.37L989.96,1140.41L990.508,1140.34L990.275,1140.37ZM991.468,1140.22L991.113,1140.26L991.654,1140.19L991.468,1140.22ZM992.663,1140.07L992.273,1140.12L992.8,1140.05L992.663,1140.07ZM993.859,1139.92L993.447,1139.97L993.948,1139.91L993.859,1139.92ZM995.056,1139.78L994.671,1139.82L995.097,1139.77L995.056,1139.78ZM996.255,1139.64L996.23,1139.64L996.578,1139.6L996.255,1139.64ZM997.454,1139.5L997.383,1139.51L997.852,1139.46L997.454,1139.5ZM998.655,1139.37L998.537,1139.38L999.041,1139.33L998.655,1139.37ZM999.857,1139.24L999.693,1139.26L1000.21,1139.21L999.857,1139.24ZM1001.06,1139.12L1000.85,1139.14L1001.38,1139.09L1001.06,1139.12ZM1002.26,1139L1002.01,1139.03L1002.54,1138.98L1002.26,1139ZM1003.47,1138.89L1003.18,1138.91L1003.7,1138.87L1003.47,1138.89ZM1004.68,1138.78L1004.34,1138.81L1004.86,1138.76L1004.68,1138.78ZM1005.89,1138.67L1005.52,1138.7L1006.02,1138.66L1005.89,1138.67ZM1007.1,1138.57L1006.71,1138.6L1007.18,1138.56L1007.1,1138.57ZM1008.31,1138.47L1007.96,1138.5L1008.35,1138.46L1008.31,1138.47ZM1009.52,1138.37L1009.5,1138.38L1009.72,1138.36L1009.52,1138.37ZM1010.73,1138.28L1010.67,1138.29L1011.1,1138.26L1010.73,1138.28ZM1011.94,1138.2L1011.84,1138.2L1012.32,1138.17L1011.94,1138.2ZM1013.16,1138.12L1013,1138.13L1013.51,1138.09L1013.16,1138.12ZM1014.37,1138.04L1014.17,1138.05L1014.69,1138.02L1014.37,1138.04ZM1015.59,1137.96L1015.35,1137.98L1015.86,1137.95L1015.59,1137.96ZM1016.81,1137.89L1016.52,1137.91L1017.04,1137.88L1016.81,1137.89ZM1018.03,1137.83L1017.7,1137.85L1018.21,1137.82L1018.03,1137.83ZM1019.25,1137.77L1018.89,1137.79L1019.39,1137.76L1019.25,1137.77ZM1020.47,1137.71L1020.1,1137.73L1020.56,1137.71L1020.47,1137.71ZM1021.69,1137.66L1021.36,1137.67L1021.74,1137.66L1021.69,1137.66ZM1022.92,1137.61L1022.91,1137.61L1023.02,1137.61L1022.92,1137.61ZM1024.14,1137.57L1024.09,1137.57L1024.49,1137.55L1024.14,1137.57ZM1025.37,1137.52L1025.27,1137.53L1025.74,1137.51L1025.37,1137.52ZM1026.6,1137.49L1026.45,1137.49L1026.94,1137.48L1026.6,1137.49ZM1027.82,1137.46L1027.63,1137.46L1028.14,1137.45L1027.82,1137.46ZM1029.05,1137.43L1028.81,1137.43L1029.33,1137.42L1029.05,1137.43ZM1030.28,1137.41L1030,1137.41L1030.52,1137.4L1030.28,1137.41ZM1031.51,1137.39L1031.19,1137.39L1031.7,1137.38L1031.51,1137.39ZM1032.75,1137.37L1032.39,1137.38L1032.89,1137.37L1032.75,1137.37ZM1033.98,1137.36L1033.61,1137.36L1034.07,1137.36L1033.98,1137.36ZM1035.21,1137.35L1034.87,1137.36L1035.26,1137.35L1035.21,1137.35ZM1050.1,1035.06L867.977,544.575L689.455,1035.06L1050.1,1035.06Z"})})});var to=(e=>(e[e.PROMPT=0]="PROMPT",e[e.GALLERY=1]="GALLERY",e[e.OTHER=2]="OTHER",e[e.SEED=3]="SEED",e[e.VARIATIONS=4]="VARIATIONS",e[e.UPSCALE=5]="UPSCALE",e[e.FACE_CORRECTION=6]="FACE_CORRECTION",e[e.IMAGE_TO_IMAGE=7]="IMAGE_TO_IMAGE",e))(to||{});const I3e={[0]:{text:"This field will take all prompt text, including both content and stylistic terms. While weights can be included in the prompt, standard CLI Commands/parameters will not work.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[1]:{text:"As new invocations are generated, files from the output directory will be displayed here. Generations have additional options to configure new generations.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[2]:{text:"These options will enable alternative processing modes for Invoke. Seamless tiling will work to generate repeating patterns in the output. High Resolution Optimization performs a two-step generation cycle, and should be used at higher resolutions when you desire a more coherent image/composition. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[3]:{text:"Seed values provide an initial set of noise which guide the denoising process, and can be randomized or populated with a seed from a previous invocation. The Threshold feature can be used to mitigate undesirable outcomes at higher CFG values (try between 0-10), and Perlin can be used to add Perlin noise into the denoising process - Both serve to add variation to your outputs. ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[4]:{text:"Try a variation with an amount of between 0 and 1 to change the output image for the set seed - Interesting variations on the seed are found between 0.1 and 0.3.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[5]:{text:"Using ESRGAN you can increase the output resolution without requiring a higher width/height in the initial generation.",href:"link/to/docs/feature1.html",guideImage:"asset/path.gif"},[6]:{text:"Using GFPGAN or Codeformer, Face Correction will attempt to identify faces in outputs, and correct any defects/abnormalities. Higher strength values will apply a stronger corrective pressure on outputs, resulting in more appealing faces. With Codeformer, a higher fidelity will attempt to preserve the original image, at the expense of face correction strength.",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"},[7]:{text:"ImageToImage allows the upload of an initial image, which InvokeAI will use to guide the generation process, along with a prompt. A lower value for this setting will more closely resemble the original image. Values between 0-1 are accepted, and a range of .25-.75 is recommended ",href:"link/to/docs/feature3.html",guideImage:"asset/path.gif"}},ks=e=>{const{label:t,isDisabled:n=!1,width:r="auto",formControlProps:i,formLabelProps:o,styleClass:a,...s}=e;return x(fd,{isDisabled:n,width:r,className:`invokeai__switch-form-control ${a}`,...i,children:ne(lh,{className:"invokeai__switch-form-label",whiteSpace:"nowrap",...o,children:[t,x(a_,{className:"invokeai__switch-root",...s})]})})};function E_(){const e=ke(i=>i.system.isGFPGANAvailable),t=ke(i=>i.options.shouldRunFacetool),n=Ye();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Restore Face"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(G_e(i.target.checked))})]})}const DL=/^-?(0\.)?\.?$/,Ts=e=>{const{label:t,labelFontSize:n="1rem",styleClass:r,isDisabled:i=!1,showStepper:o=!0,width:a,textAlign:s,isInvalid:l,value:u,onChange:h,min:p,max:m,isInteger:v=!0,formControlProps:S,formLabelProps:w,numberInputFieldProps:E,numberInputStepperProps:P,tooltipProps:k,...T}=e,[M,I]=C.exports.useState(String(u));C.exports.useEffect(()=>{!M.match(DL)&&u!==Number(M)&&I(String(u))},[u,M]);const R=z=>{I(z),z.match(DL)||h(v?Math.floor(Number(z)):Number(z))},N=z=>{const $=st.clamp(v?Math.floor(Number(z.target.value)):Number(z.target.value),p,m);I(String($)),h($)};return x(Oi,{...k,children:ne(fd,{isDisabled:i,isInvalid:l,className:r?`invokeai__number-input-form-control ${r}`:"invokeai__number-input-form-control",...S,children:[t&&x(lh,{className:"invokeai__number-input-form-label",style:{display:t?"block":"none"},fontSize:n,...w,children:t}),ne(X8,{className:"invokeai__number-input-root",value:M,keepWithinRange:!0,clampValueOnBlur:!1,onChange:R,onBlur:N,width:a,...T,children:[x(Z8,{className:"invokeai__number-input-field",textAlign:s,...E}),o&&ne("div",{className:"invokeai__number-input-stepper",children:[x(J8,{...P,className:"invokeai__number-input-stepper-button"}),x(Q8,{...P,className:"invokeai__number-input-stepper-button"})]})]})]})})},vd=e=>{const{label:t,isDisabled:n,validValues:r,tooltip:i,tooltipProps:o,size:a="sm",fontSize:s="md",styleClass:l,...u}=e;return x(Oi,{label:i,...o,children:ne(fd,{isDisabled:n,className:`invokeai__select ${l}`,onClick:h=>{h.stopPropagation(),h.nativeEvent.stopImmediatePropagation(),h.nativeEvent.stopPropagation(),h.nativeEvent.cancelBubble=!0},children:[t&&x(lh,{className:"invokeai__select-label",fontSize:s,marginBottom:1,flexGrow:2,whiteSpace:"nowrap",children:t}),x(mF,{className:"invokeai__select-picker",fontSize:s,size:a,...u,children:r.map(h=>typeof h=="string"||typeof h=="number"?x("option",{value:h,className:"invokeai__select-option",children:h},h):x("option",{value:h.value,className:"invokeai__select-option",children:h.key},h.value))})]})})},R3e=["ddim","plms","k_lms","k_dpm_2","k_dpm_2_a","k_euler","k_euler_a","k_heun"],N3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],D3e=[64,128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664,1728,1792,1856,1920,1984,2048],z3e=[{key:"2x",value:2},{key:"4x",value:4}],P_=0,T_=4294967295,B3e=["gfpgan","codeformer"],F3e=[{key:"None",value:"none"},{key:"Fast",value:"latents"},{key:"Accurate",value:"full-res"}],$3e=ct(e=>e.options,e=>({facetoolStrength:e.facetoolStrength,facetoolType:e.facetoolType,codeformerFidelity:e.codeformerFidelity}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),H3e=ct(e=>e.system,e=>({isGFPGANAvailable:e.isGFPGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),jS=()=>{const e=Ye(),{facetoolStrength:t,facetoolType:n,codeformerFidelity:r}=ke($3e),{isGFPGANAvailable:i}=ke(H3e),o=l=>e(j3(l)),a=l=>e(sV(l)),s=l=>e(Y3(l.target.value));return ne(nn,{direction:"column",gap:2,children:[x(vd,{label:"Type",validValues:B3e.concat(),value:n,onChange:s}),x(Ts,{isDisabled:!i,label:"Strength",step:.05,min:0,max:1,onChange:o,value:t,width:"90px",isInteger:!1}),n==="codeformer"&&x(Ts,{isDisabled:!i,label:"Fidelity",step:.05,min:0,max:1,onChange:a,value:r,width:"90px",isInteger:!1})]})};function W3e(){const e=Ye(),t=ke(r=>r.options.shouldFitToWidthHeight);return x(ks,{label:"Fit Initial Image To Output Size",isChecked:t,onChange:r=>e(uV(r.target.checked))})}var P$={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zL=le.createContext&&le.createContext(P$),Xc=globalThis&&globalThis.__assign||function(){return Xc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{const{tooltip:n="",styleClass:r,tooltipProps:i,asCheckbox:o,isChecked:a,...s}=e;return x(Oi,{label:n,hasArrow:!0,...i,...i?.placement?{placement:i.placement}:{placement:"top"},children:x(Ps,{ref:t,className:r?`invokeai__icon-button ${r}`:"invokeai__icon-button","data-as-checkbox":o,"data-selected":a!==void 0?a:void 0,...s})})});function n2(e){const[t,n]=C.exports.useState(!1),{label:r,value:i,min:o=1,max:a=100,step:s=1,onChange:l,tooltipSuffix:u="",withSliderMarks:h=!1,sliderMarkLeftOffset:p=0,sliderMarkRightOffset:m=-7,withInput:v=!1,isInteger:S=!1,inputWidth:w="5rem",inputReadOnly:E=!0,withReset:P=!1,hideTooltip:k=!1,handleReset:T,isResetDisabled:M,isSliderDisabled:I,isInputDisabled:R,styleClass:N,sliderFormControlProps:z,sliderFormLabelProps:$,sliderMarkProps:W,sliderTrackProps:q,sliderThumbProps:de,sliderNumberInputProps:H,sliderNumberInputFieldProps:J,sliderNumberInputStepperProps:re,sliderTooltipProps:oe,sliderIAIIconButtonProps:X,...G}=e,[Q,j]=C.exports.useState(String(i)),Z=C.exports.useMemo(()=>H?.max?H.max:a,[a,H?.max]);C.exports.useEffect(()=>{String(i)!==Q&&Q!==""&&j(String(i))},[i,Q,j]);const me=Fe=>{const We=st.clamp(S?Math.floor(Number(Fe.target.value)):Number(Fe.target.value),o,Z);j(String(We)),l(We)},Se=Fe=>{j(Fe),l(Number(Fe))},xe=()=>{!T||T()};return ne(fd,{className:N?`invokeai__slider-component ${N}`:"invokeai__slider-component","data-markers":h,...z,children:[x(lh,{className:"invokeai__slider-component-label",...$,children:r}),ne(Gz,{w:"100%",gap:2,children:[ne(o_,{"aria-label":r,value:i,min:o,max:a,step:s,onChange:Se,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),focusThumbOnChange:!1,isDisabled:I,...G,children:[h&&ne(Nn,{children:[x(MC,{value:o,className:"invokeai__slider-mark invokeai__slider-mark-start",ml:p,...W,children:o}),x(MC,{value:a,className:"invokeai__slider-mark invokeai__slider-mark-end",ml:m,...W,children:a})]}),x(PF,{className:"invokeai__slider_track",...q,children:x(TF,{className:"invokeai__slider_track-filled"})}),x(Oi,{hasArrow:!0,className:"invokeai__slider-component-tooltip",placement:"top",isOpen:t,label:`${i}${u}`,hidden:k,...oe,children:x(EF,{className:"invokeai__slider-thumb",...de})})]}),v&&ne(X8,{min:o,max:Z,step:s,value:Q,onChange:Se,onBlur:me,className:"invokeai__slider-number-field",isDisabled:R,...H,children:[x(Z8,{className:"invokeai__slider-number-input",width:w,readOnly:E,...J}),ne(uF,{...re,children:[x(J8,{className:"invokeai__slider-number-stepper"}),x(Q8,{className:"invokeai__slider-number-stepper"})]})]}),P&&x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset",icon:x(A_,{}),onClick:xe,isDisabled:M,...X})]})]})}function A$(e){const{label:t="Strength",styleClass:n}=e,r=ke(s=>s.options.img2imgStrength),i=Ye();return x(n2,{label:t,step:.01,min:.01,max:.99,onChange:s=>i(m9(s)),value:r,isInteger:!1,styleClass:n,withInput:!0,withReset:!0,withSliderMarks:!0,inputWidth:"5.5rem",handleReset:()=>{i(m9(.5))}})}const L$=()=>x(hd,{flex:"1",textAlign:"left",children:"Other Options"}),Q3e=()=>{const e=Ye(),t=ke(r=>r.options.hiresFix);return x(nn,{gap:2,direction:"column",children:x(ks,{label:"High Res Optimization",fontSize:"md",isChecked:t,onChange:r=>e(aV(r.target.checked))})})},J3e=()=>{const e=Ye(),t=ke(r=>r.options.seamless);return x(nn,{gap:2,direction:"column",children:x(ks,{label:"Seamless tiling",fontSize:"md",isChecked:t,onChange:r=>e(oV(r.target.checked))})})},M$=()=>ne(nn,{gap:2,direction:"column",children:[x(J3e,{}),x(Q3e,{})]}),L_=()=>x(hd,{flex:"1",textAlign:"left",children:"Seed"});function e4e(){const e=Ye(),t=ke(r=>r.options.shouldRandomizeSeed);return x(ks,{label:"Randomize Seed",isChecked:t,onChange:r=>e(Y_e(r.target.checked))})}function t4e(){const e=ke(o=>o.options.seed),t=ke(o=>o.options.shouldRandomizeSeed),n=ke(o=>o.options.shouldGenerateVariations),r=Ye(),i=o=>r(l2(o));return x(Ts,{label:"Seed",step:1,precision:0,flexGrow:1,min:P_,max:T_,isDisabled:t,isInvalid:e<0&&n,onChange:i,value:e,width:"10rem"})}const O$=(e,t)=>Math.floor(Math.random()*(t-e+1)+e);function n4e(){const e=Ye(),t=ke(r=>r.options.shouldRandomizeSeed);return x(Da,{size:"sm",isDisabled:t,onClick:()=>e(l2(O$(P_,T_))),children:x("p",{children:"Shuffle"})})}function r4e(){const e=Ye(),t=ke(r=>r.options.threshold);return x(Ts,{label:"Threshold",min:0,max:1e3,step:.1,onChange:r=>e($_e(r)),value:t,isInteger:!1})}function i4e(){const e=Ye(),t=ke(r=>r.options.perlin);return x(Ts,{label:"Perlin Noise",min:0,max:1,step:.05,onChange:r=>e(H_e(r)),value:t,isInteger:!1})}const M_=()=>ne(nn,{gap:2,direction:"column",children:[x(e4e,{}),ne(nn,{gap:2,children:[x(t4e,{}),x(n4e,{})]}),x(nn,{gap:2,children:x(r4e,{})}),x(nn,{gap:2,children:x(i4e,{})})]});function O_(){const e=ke(i=>i.system.isESRGANAvailable),t=ke(i=>i.options.shouldRunESRGAN),n=Ye();return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Upscale"}),x(ks,{isDisabled:!e,isChecked:t,onChange:i=>n(j_e(i.target.checked))})]})}const o4e=ct(e=>e.options,e=>({upscalingLevel:e.upscalingLevel,upscalingStrength:e.upscalingStrength}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),a4e=ct(e=>e.system,e=>({isESRGANAvailable:e.isESRGANAvailable}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),YS=()=>{const e=Ye(),{upscalingLevel:t,upscalingStrength:n}=ke(o4e),{isESRGANAvailable:r}=ke(a4e);return ne("div",{className:"upscale-options",children:[x(vd,{isDisabled:!r,label:"Scale",value:t,onChange:a=>e(v9(Number(a.target.value))),validValues:z3e}),x(Ts,{isDisabled:!r,label:"Strength",step:.05,min:0,max:1,onChange:a=>e(y9(a)),value:n,isInteger:!1})]})};function s4e(){const e=ke(r=>r.options.shouldGenerateVariations),t=Ye();return x(ks,{isChecked:e,width:"auto",onChange:r=>t(W_e(r.target.checked))})}function I_(){return ne(nn,{justifyContent:"space-between",alignItems:"center",width:"100%",mr:2,children:[x("p",{children:"Variations"}),x(s4e,{})]})}function l4e(e){const{label:t,styleClass:n,isDisabled:r=!1,fontSize:i="1rem",width:o,isInvalid:a,...s}=e;return ne(fd,{className:`input ${n}`,isInvalid:a,isDisabled:r,flexGrow:1,children:[x(lh,{fontSize:i,marginBottom:1,whiteSpace:"nowrap",className:"input-label",children:t}),x(w8,{...s,className:"input-entry",size:"sm",width:o})]})}function u4e(){const e=ke(i=>i.options.seedWeights),t=ke(i=>i.options.shouldGenerateVariations),n=Ye(),r=i=>n(cV(i.target.value));return x(l4e,{label:"Seed Weights",value:e,isInvalid:t&&!(w_(e)||e===""),isDisabled:!t,onChange:r})}function c4e(){const e=ke(i=>i.options.variationAmount),t=ke(i=>i.options.shouldGenerateVariations),n=Ye();return x(Ts,{label:"Variation Amount",value:e,step:.01,min:0,max:1,isDisabled:!t,onChange:i=>n(V_e(i)),isInteger:!1})}const R_=()=>ne(nn,{gap:2,direction:"column",children:[x(c4e,{}),x(u4e,{})]}),ta=e=>{const{label:t,styleClass:n,...r}=e;return x(Pz,{className:`invokeai__checkbox ${n}`,...r,children:t})};function N_(){const e=ke(r=>r.options.showAdvancedOptions),t=Ye();return x(ta,{label:"Advanced Options",styleClass:"advanced-options-checkbox",onChange:r=>t(q_e(r.target.checked)),isChecked:e})}function d4e(){const e=Ye(),t=ke(r=>r.options.cfgScale);return x(Ts,{label:"CFG Scale",step:.5,min:1.01,max:200,onChange:r=>e(tV(r)),value:t,width:D_,styleClass:"main-option-block",textAlign:"center",isInteger:!1})}const Rr=ct(e=>e.options,e=>db[e.activeTab],{memoizeOptions:{equalityCheck:st.isEqual}}),f4e=ct(e=>e.options,e=>{const{shouldRandomizeSeed:t,shouldGenerateVariations:n}=e;return t||n},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function h4e(){const e=ke(i=>i.options.height),t=ke(Rr),n=Ye();return x(vd,{isDisabled:t==="unifiedCanvas",label:"Height",value:e,flexGrow:1,onChange:i=>n(nV(Number(i.target.value))),validValues:D3e,styleClass:"main-option-block"})}const p4e=ct([e=>e.options,f4e],(e,t)=>{const{iterations:n}=e;return{iterations:n,mayGenerateMultipleImages:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function g4e(){const e=Ye(),{iterations:t,mayGenerateMultipleImages:n}=ke(p4e);return x(Ts,{label:"Images",step:1,min:1,max:9999,isDisabled:!n,onChange:i=>e(F_e(i)),value:t,width:D_,labelFontSize:.5,styleClass:"main-option-block",textAlign:"center"})}function m4e(){const e=ke(r=>r.options.sampler),t=Ye();return x(vd,{label:"Sampler",value:e,onChange:r=>t(iV(r.target.value)),validValues:R3e,styleClass:"main-option-block"})}function v4e(){const e=Ye(),t=ke(r=>r.options.steps);return x(Ts,{label:"Steps",min:1,max:9999,step:1,onChange:r=>e(eV(r)),value:t,width:D_,styleClass:"main-option-block",textAlign:"center"})}function y4e(){const e=ke(i=>i.options.width),t=ke(Rr),n=Ye();return x(vd,{isDisabled:t==="unifiedCanvas",label:"Width",value:e,flexGrow:1,onChange:i=>n(rV(Number(i.target.value))),validValues:N3e,styleClass:"main-option-block"})}const D_="auto";function z_(){return x("div",{className:"main-options",children:ne("div",{className:"main-options-list",children:[ne("div",{className:"main-options-row",children:[x(g4e,{}),x(v4e,{}),x(d4e,{})]}),ne("div",{className:"main-options-row",children:[x(y4e,{}),x(h4e,{}),x(m4e,{})]})]})})}const S4e={isConnected:!1,isProcessing:!1,log:[],shouldShowLogViewer:!1,shouldDisplayInProgressType:"latents",shouldDisplayGuides:!0,isGFPGANAvailable:!0,isESRGANAvailable:!0,socketId:"",shouldConfirmOnDelete:!0,openAccordions:[0],currentStep:0,totalSteps:0,currentIteration:0,totalIterations:0,currentStatus:"Disconnected",currentStatusHasSteps:!1,model:"",model_id:"",model_hash:"",app_id:"",app_version:"",model_list:{},hasError:!1,wasErrorSeen:!0,isCancelable:!0,saveIntermediatesInterval:5,enableImageDebugging:!1,toastQueue:[]},I$=TS({name:"system",initialState:S4e,reducers:{setShouldDisplayInProgressType:(e,t)=>{e.shouldDisplayInProgressType=t.payload},setIsProcessing:(e,t)=>{e.isProcessing=t.payload},setCurrentStatus:(e,t)=>{e.currentStatus=t.payload},setSystemStatus:(e,t)=>({...e,...t.payload}),errorOccurred:e=>{e.hasError=!0,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Error",e.wasErrorSeen=!1},errorSeen:e=>{e.hasError=!1,e.wasErrorSeen=!0,e.currentStatus=e.isConnected?"Connected":"Disconnected"},addLogEntry:(e,t)=>{const{timestamp:n,message:r,level:i}=t.payload,a={timestamp:n,message:r,level:i||"info"};e.log.push(a)},setShouldShowLogViewer:(e,t)=>{e.shouldShowLogViewer=t.payload},setIsConnected:(e,t)=>{e.isConnected=t.payload,e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.hasError=!1},setSocketId:(e,t)=>{e.socketId=t.payload},setShouldConfirmOnDelete:(e,t)=>{e.shouldConfirmOnDelete=t.payload},setOpenAccordions:(e,t)=>{e.openAccordions=t.payload},setSystemConfig:(e,t)=>({...e,...t.payload}),setShouldDisplayGuides:(e,t)=>{e.shouldDisplayGuides=t.payload},processingCanceled:e=>{e.isProcessing=!1,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Processing canceled"},generationRequested:e=>{e.isProcessing=!0,e.isCancelable=!0,e.currentStep=0,e.totalSteps=0,e.currentIteration=0,e.totalIterations=0,e.currentStatusHasSteps=!1,e.currentStatus="Preparing"},setModelList:(e,t)=>{e.model_list=t.payload},setIsCancelable:(e,t)=>{e.isCancelable=t.payload},modelChangeRequested:e=>{e.currentStatus="Loading Model",e.isCancelable=!1,e.isProcessing=!0,e.currentStatusHasSteps=!1},setSaveIntermediatesInterval:(e,t)=>{e.saveIntermediatesInterval=t.payload},setEnableImageDebugging:(e,t)=>{e.enableImageDebugging=t.payload},addToast:(e,t)=>{e.toastQueue.push(t.payload)},clearToastQueue:e=>{e.toastQueue=[]},setProcessingIndeterminateTask:(e,t)=>{e.isProcessing=!0,e.currentStatus=t.payload,e.currentStatusHasSteps=!1}}}),{setShouldDisplayInProgressType:b4e,setIsProcessing:hu,addLogEntry:Co,setShouldShowLogViewer:cw,setIsConnected:BL,setSocketId:$Pe,setShouldConfirmOnDelete:R$,setOpenAccordions:x4e,setSystemStatus:w4e,setCurrentStatus:W3,setSystemConfig:C4e,setShouldDisplayGuides:_4e,processingCanceled:k4e,errorOccurred:FL,errorSeen:N$,setModelList:$L,setIsCancelable:Xp,modelChangeRequested:E4e,setSaveIntermediatesInterval:P4e,setEnableImageDebugging:T4e,generationRequested:A4e,addToast:By,clearToastQueue:L4e,setProcessingIndeterminateTask:M4e}=I$.actions,O4e=I$.reducer;function I4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"}}]})(e)}function R4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"}}]})(e)}function D$(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"}}]})(e)}function N4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}}]})(e)}function D4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}}]})(e)}const z4e=ct(e=>e.system,e=>e.shouldDisplayGuides),B4e=({children:e,feature:t})=>{const n=ke(z4e),{text:r}=I3e[t];return n?ne(e_,{trigger:"hover",children:[x(r_,{children:x(hd,{children:e})}),ne(n_,{className:"guide-popover-content",maxWidth:"400px",onClick:i=>i.preventDefault(),cursor:"initial",children:[x(t_,{className:"guide-popover-arrow"}),x("div",{className:"guide-popover-guide-content",children:r})]})]}):null},F4e=Pe(({feature:e,icon:t=I4e},n)=>x(B4e,{feature:e,children:x(hd,{ref:n,children:x(ga,{as:t})})}));function $4e(e){const{header:t,feature:n,options:r}=e;return ne(Df,{className:"advanced-settings-item",children:[x("h2",{children:ne(Rf,{className:"advanced-settings-header",children:[t,x(F4e,{feature:n}),x(Nf,{})]})}),x(zf,{className:"advanced-settings-panel",children:r})]})}const B_=e=>{const{accordionInfo:t}=e,n=ke(a=>a.system.openAccordions),r=Ye();return x(pS,{defaultIndex:n,allowMultiple:!0,reduceMotion:!0,onChange:a=>r(x4e(a)),className:"advanced-settings",children:(()=>{const a=[];return t&&Object.keys(t).forEach(s=>{a.push(x($4e,{header:t[s].header,feature:t[s].feature,options:t[s].options},s))}),a})()})};function H4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"}}]})(e)}function W4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"}}]})(e)}function V4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M143 256.3L7 120.3c-9.4-9.4-9.4-24.6 0-33.9l22.6-22.6c9.4-9.4 24.6-9.4 33.9 0l96.4 96.4 96.4-96.4c9.4-9.4 24.6-9.4 33.9 0L313 86.3c9.4 9.4 9.4 24.6 0 33.9l-136 136c-9.4 9.5-24.6 9.5-34 .1zm34 192l136-136c9.4-9.4 9.4-24.6 0-33.9l-22.6-22.6c-9.4-9.4-24.6-9.4-33.9 0L160 352.1l-96.4-96.4c-9.4-9.4-24.6-9.4-33.9 0L7 278.3c-9.4 9.4-9.4 24.6 0 33.9l136 136c9.4 9.5 24.6 9.5 34 .1z"}}]})(e)}function z$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"}}]})(e)}function B$(e){return ft({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"}}]})(e)}function U4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M257.5 445.1l-22.2 22.2c-9.4 9.4-24.6 9.4-33.9 0L7 273c-9.4-9.4-9.4-24.6 0-33.9L201.4 44.7c9.4-9.4 24.6-9.4 33.9 0l22.2 22.2c9.5 9.5 9.3 25-.4 34.3L136.6 216H424c13.3 0 24 10.7 24 24v32c0 13.3-10.7 24-24 24H136.6l120.5 114.8c9.8 9.3 10 24.8.4 34.3z"}}]})(e)}function G4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"}}]})(e)}function j4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M352.201 425.775l-79.196 79.196c-9.373 9.373-24.568 9.373-33.941 0l-79.196-79.196c-15.119-15.119-4.411-40.971 16.971-40.97h51.162L228 284H127.196v51.162c0 21.382-25.851 32.09-40.971 16.971L7.029 272.937c-9.373-9.373-9.373-24.569 0-33.941L86.225 159.8c15.119-15.119 40.971-4.411 40.971 16.971V228H228V127.196h-51.23c-21.382 0-32.09-25.851-16.971-40.971l79.196-79.196c9.373-9.373 24.568-9.373 33.941 0l79.196 79.196c15.119 15.119 4.411 40.971-16.971 40.971h-51.162V228h100.804v-51.162c0-21.382 25.851-32.09 40.97-16.971l79.196 79.196c9.373 9.373 9.373 24.569 0 33.941L425.773 352.2c-15.119 15.119-40.971 4.411-40.97-16.971V284H284v100.804h51.23c21.382 0 32.09 25.851 16.971 40.971z"}}]})(e)}function Y4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M478.21 334.093L336 256l142.21-78.093c11.795-6.477 15.961-21.384 9.232-33.037l-19.48-33.741c-6.728-11.653-21.72-15.499-33.227-8.523L296 186.718l3.475-162.204C299.763 11.061 288.937 0 275.48 0h-38.96c-13.456 0-24.283 11.061-23.994 24.514L216 186.718 77.265 102.607c-11.506-6.976-26.499-3.13-33.227 8.523l-19.48 33.741c-6.728 11.653-2.562 26.56 9.233 33.037L176 256 33.79 334.093c-11.795 6.477-15.961 21.384-9.232 33.037l19.48 33.741c6.728 11.653 21.721 15.499 33.227 8.523L216 325.282l-3.475 162.204C212.237 500.939 223.064 512 236.52 512h38.961c13.456 0 24.283-11.061 23.995-24.514L296 325.282l138.735 84.111c11.506 6.976 26.499 3.13 33.227-8.523l19.48-33.741c6.728-11.653 2.563-26.559-9.232-33.036z"}}]})(e)}function q4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M511.988 288.9c-.478 17.43-15.217 31.1-32.653 31.1H424v16c0 21.864-4.882 42.584-13.6 61.145l60.228 60.228c12.496 12.497 12.496 32.758 0 45.255-12.498 12.497-32.759 12.496-45.256 0l-54.736-54.736C345.886 467.965 314.351 480 280 480V236c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v244c-34.351 0-65.886-12.035-90.636-32.108l-54.736 54.736c-12.498 12.497-32.759 12.496-45.256 0-12.496-12.497-12.496-32.758 0-45.255l60.228-60.228C92.882 378.584 88 357.864 88 336v-16H32.666C15.23 320 .491 306.33.013 288.9-.484 270.816 14.028 256 32 256h56v-58.745l-46.628-46.628c-12.496-12.497-12.496-32.758 0-45.255 12.498-12.497 32.758-12.497 45.256 0L141.255 160h229.489l54.627-54.627c12.498-12.497 32.758-12.497 45.256 0 12.496 12.497 12.496 32.758 0 45.255L424 197.255V256h56c17.972 0 32.484 14.816 31.988 32.9zM257 0c-61.856 0-112 50.144-112 112h224C369 50.144 318.856 0 257 0z"}}]})(e)}function F_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"}}]})(e)}function F$(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"}}]})(e)}function $_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"}}]})(e)}function K4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500 224h-30.364C455.724 130.325 381.675 56.276 288 42.364V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v30.364C130.325 56.276 56.276 130.325 42.364 224H12c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h30.364C56.276 381.675 130.325 455.724 224 469.636V500c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-30.364C381.675 455.724 455.724 381.675 469.636 288H500c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12zM288 404.634V364c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40.634C165.826 392.232 119.783 346.243 107.366 288H148c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40.634C119.768 165.826 165.757 119.783 224 107.366V148c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12v-40.634C346.174 119.768 392.217 165.757 404.634 224H364c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40.634C392.232 346.174 346.243 392.217 288 404.634zM288 256c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-17.673 14.327-32 32-32s32 14.327 32 32z"}}]})(e)}function $$(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function X4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z"}}]})(e)}function Z4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M448 344v112a23.94 23.94 0 0 1-24 24H312c-21.39 0-32.09-25.9-17-41l36.2-36.2L224 295.6 116.77 402.9 153 439c15.09 15.1 4.39 41-17 41H24a23.94 23.94 0 0 1-24-24V344c0-21.4 25.89-32.1 41-17l36.19 36.2L184.46 256 77.18 148.7 41 185c-15.1 15.1-41 4.4-41-17V56a23.94 23.94 0 0 1 24-24h112c21.39 0 32.09 25.9 17 41l-36.2 36.2L224 216.4l107.23-107.3L295 73c-15.09-15.1-4.39-41 17-41h112a23.94 23.94 0 0 1 24 24v112c0 21.4-25.89 32.1-41 17l-36.19-36.2L263.54 256l107.28 107.3L407 327.1c15.1-15.2 41-4.5 41 16.9z"}}]})(e)}function Q4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"}}]})(e)}function J4e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"}}]})(e)}function e5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 496 512"},child:[{tag:"path",attr:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM94.6 168.9l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.2 1 8.9 8.6 4.3 13.2l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L152 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.6-4.7-1.9-12.3 4.3-13.3zM248 432c-60.6 0-134.5-38.3-143.8-93.3-2-11.8 9.3-21.5 20.7-17.9C155.1 330.5 200 336 248 336s92.9-5.5 123.1-15.2c11.5-3.7 22.6 6.1 20.7 17.9-9.3 55-83.2 93.3-143.8 93.3zm157.7-249.9l-25.4 24.6 6 34.9c1 6.2-5.3 11-11 7.9L344 233.3l-31.3 16.3c-5.7 3.1-12-1.7-11-7.9l6-34.9-25.4-24.6c-4.5-4.6-1.9-12.2 4.3-13.2l34.9-5 15.5-31.6c2.9-5.8 11-5.8 13.9 0l15.5 31.6 34.9 5c6.3.9 9 8.5 4.4 13.1z"}}]})(e)}function t5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"}}]})(e)}function n5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}}]})(e)}function r5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"}}]})(e)}function i5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320.67 64c-442.6 0-357.57 384-158.46 384 39.9 0 77.47-20.69 101.42-55.86l25.73-37.79c15.66-22.99 46.97-22.99 62.63 0l25.73 37.79C401.66 427.31 439.23 448 479.13 448c189.86 0 290.63-384-158.46-384zM184 308.36c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05zm272 0c-41.06 0-67.76-25.66-80.08-41.05-5.23-6.53-5.23-16.09 0-22.63 12.32-15.4 39.01-41.05 80.08-41.05s67.76 25.66 80.08 41.05c5.23 6.53 5.23 16.09 0 22.63-12.32 15.4-39.02 41.05-80.08 41.05z"}}]})(e)}function o5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"}}]})(e)}function a5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M167.02 309.34c-40.12 2.58-76.53 17.86-97.19 72.3-2.35 6.21-8 9.98-14.59 9.98-11.11 0-45.46-27.67-55.25-34.35C0 439.62 37.93 512 128 512c75.86 0 128-43.77 128-120.19 0-3.11-.65-6.08-.97-9.13l-88.01-73.34zM457.89 0c-15.16 0-29.37 6.71-40.21 16.45C213.27 199.05 192 203.34 192 257.09c0 13.7 3.25 26.76 8.73 38.7l63.82 53.18c7.21 1.8 14.64 3.03 22.39 3.03 62.11 0 98.11-45.47 211.16-256.46 7.38-14.35 13.9-29.85 13.9-45.99C512 20.64 486 0 457.89 0z"}}]})(e)}function s5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]})(e)}function l5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}}]})(e)}function u5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z"}}]})(e)}function c5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M184.561 261.903c3.232 13.997-12.123 24.635-24.068 17.168l-40.736-25.455-50.867 81.402C55.606 356.273 70.96 384 96.012 384H148c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12H96.115c-75.334 0-121.302-83.048-81.408-146.88l50.822-81.388-40.725-25.448c-12.081-7.547-8.966-25.961 4.879-29.158l110.237-25.45c8.611-1.988 17.201 3.381 19.189 11.99l25.452 110.237zm98.561-182.915l41.289 66.076-40.74 25.457c-12.051 7.528-9 25.953 4.879 29.158l110.237 25.45c8.672 1.999 17.215-3.438 19.189-11.99l25.45-110.237c3.197-13.844-11.99-24.719-24.068-17.168l-40.687 25.424-41.263-66.082c-37.521-60.033-125.209-60.171-162.816 0l-17.963 28.766c-3.51 5.62-1.8 13.021 3.82 16.533l33.919 21.195c5.62 3.512 13.024 1.803 16.536-3.817l17.961-28.743c12.712-20.341 41.973-19.676 54.257-.022zM497.288 301.12l-27.515-44.065c-3.511-5.623-10.916-7.334-16.538-3.821l-33.861 21.159c-5.62 3.512-7.33 10.915-3.818 16.536l27.564 44.112c13.257 21.211-2.057 48.96-27.136 48.96H320V336.02c0-14.213-17.242-21.383-27.313-11.313l-80 79.981c-6.249 6.248-6.249 16.379 0 22.627l80 79.989C302.689 517.308 320 510.3 320 495.989V448h95.88c75.274 0 121.335-82.997 81.408-146.88z"}}]})(e)}function d5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M500.33 0h-47.41a12 12 0 0 0-12 12.57l4 82.76A247.42 247.42 0 0 0 256 8C119.34 8 7.9 119.53 8 256.19 8.1 393.07 119.1 504 256 504a247.1 247.1 0 0 0 166.18-63.91 12 12 0 0 0 .48-17.43l-34-34a12 12 0 0 0-16.38-.55A176 176 0 1 1 402.1 157.8l-101.53-4.87a12 12 0 0 0-12.57 12v47.41a12 12 0 0 0 12 12h200.33a12 12 0 0 0 12-12V12a12 12 0 0 0-12-12z"}}]})(e)}function f5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"}}]})(e)}function h5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M64 96H0c0 123.7 100.3 224 224 224v144c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16V320C288 196.3 187.7 96 64 96zm384-64c-84.2 0-157.4 46.5-195.7 115.2 27.7 30.2 48.2 66.9 59 107.6C424 243.1 512 147.9 512 32h-64z"}}]})(e)}function p5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M352 320c-22.608 0-43.387 7.819-59.79 20.895l-102.486-64.054a96.551 96.551 0 0 0 0-41.683l102.486-64.054C308.613 184.181 329.392 192 352 192c53.019 0 96-42.981 96-96S405.019 0 352 0s-96 42.981-96 96c0 7.158.79 14.13 2.276 20.841L155.79 180.895C139.387 167.819 118.608 160 96 160c-53.019 0-96 42.981-96 96s42.981 96 96 96c22.608 0 43.387-7.819 59.79-20.895l102.486 64.054A96.301 96.301 0 0 0 256 416c0 53.019 42.981 96 96 96s96-42.981 96-96-42.981-96-96-96z"}}]})(e)}function HL(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.691 189.836L327.687 37.851C312.281 24.546 288 35.347 288 56.015v80.053C127.371 137.907 0 170.1 0 322.326c0 61.441 39.581 122.309 83.333 154.132 13.653 9.931 33.111-2.533 28.077-18.631C66.066 312.814 132.917 274.316 288 272.085V360c0 20.7 24.3 31.453 39.687 18.164l176.004-152c11.071-9.562 11.086-26.753 0-36.328z"}}]})(e)}function g5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M496 384H160v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h80v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h336c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160h-80v-16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h336v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h80c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-160H288V48c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v16H16C7.2 64 0 71.2 0 80v32c0 8.8 7.2 16 16 16h208v16c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-16h208c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16z"}}]})(e)}function m5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"}}]})(e)}function H_(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"}}]})(e)}function v5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M212.333 224.333H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h48c6.627 0 12 5.373 12 12v78.112C117.773 39.279 184.26 7.47 258.175 8.007c136.906.994 246.448 111.623 246.157 248.532C504.041 393.258 393.12 504 256.333 504c-64.089 0-122.496-24.313-166.51-64.215-5.099-4.622-5.334-12.554-.467-17.42l33.967-33.967c4.474-4.474 11.662-4.717 16.401-.525C170.76 415.336 211.58 432 256.333 432c97.268 0 176-78.716 176-176 0-97.267-78.716-176-176-176-58.496 0-110.28 28.476-142.274 72.333h98.274c6.627 0 12 5.373 12 12v48c0 6.627-5.373 12-12 12z"}}]})(e)}function W_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"}}]})(e)}function y5e(e){return ft({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"}}]})(e)}function V_(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M507.73 109.1c-2.24-9.03-13.54-12.09-20.12-5.51l-74.36 74.36-67.88-11.31-11.31-67.88 74.36-74.36c6.62-6.62 3.43-17.9-5.66-20.16-47.38-11.74-99.55.91-136.58 37.93-39.64 39.64-50.55 97.1-34.05 147.2L18.74 402.76c-24.99 24.99-24.99 65.51 0 90.5 24.99 24.99 65.51 24.99 90.5 0l213.21-213.21c50.12 16.71 107.47 5.68 147.37-34.22 37.07-37.07 49.7-89.32 37.91-136.73zM64 472c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"}}]})(e)}const S5e=[{key:"Base",value:"base"},{key:"Mask",value:"mask"}],U_=e=>e.kind==="line"&&e.layer==="mask",b5e=e=>e.kind==="line"&&e.layer==="base",i5=e=>e.kind==="image"&&e.layer==="base",x5e=e=>e.kind==="line",wn=e=>e.canvas,yd=e=>e.canvas.layerState.stagingArea.images.length>0,H$=e=>e.canvas.layerState.objects.find(i5),W$=ct([e=>e.options,e=>e.system,H$,Rr],(e,t,n,r)=>{const{prompt:i,shouldGenerateVariations:o,seedWeights:a,initialImage:s,seed:l}=e,{isProcessing:u,isConnected:h}=t;let p=!0;const m=[];return(!i||Boolean(i.match(/^[\s\r\n]+$/)))&&(p=!1,m.push("Missing prompt")),r==="img2img"&&!s&&(p=!1,m.push("No initial image selected")),u&&(p=!1,m.push("System Busy")),h||(p=!1,m.push("System Disconnected")),o&&(!(w_(a)||a==="")||l===-1)&&(p=!1,m.push("Seed-Weights badly formatted.")),{isReady:p,reasonsWhyNotReady:m}},{memoizeOptions:{equalityCheck:st.isEqual,resultEqualityCheck:st.isEqual}}),WC=Li("socketio/generateImage"),w5e=Li("socketio/runESRGAN"),C5e=Li("socketio/runFacetool"),_5e=Li("socketio/deleteImage"),VC=Li("socketio/requestImages"),WL=Li("socketio/requestNewImages"),k5e=Li("socketio/cancelProcessing"),E5e=Li("socketio/requestSystemConfig"),V$=Li("socketio/requestModelChange"),fl=Pe((e,t)=>{const{children:n,tooltip:r="",tooltipProps:i,styleClass:o,...a}=e;return x(Oi,{label:r,...i,children:x(Da,{ref:t,className:["invokeai__button",o].join(" "),...a,children:n})})}),pu=e=>{const{triggerComponent:t,children:n,styleClass:r,hasArrow:i=!0,...o}=e;return ne(e_,{...o,children:[x(r_,{children:t}),ne(n_,{className:`invokeai__popover-content ${r}`,children:[i&&x(t_,{className:"invokeai__popover-arrow"}),n]})]})};function U$(e){const{iconButton:t=!1,...n}=e,r=Ye(),{isReady:i,reasonsWhyNotReady:o}=ke(W$),a=ke(Rr),s=()=>{r(WC(a))};mt(["ctrl+enter","meta+enter"],()=>{i&&r(WC(a))},[i,a]);const l=x("div",{style:{flexGrow:4},children:t?x(gt,{"aria-label":"Invoke",type:"submit",icon:x(l5e,{}),isDisabled:!i,onClick:s,className:"invoke-btn",tooltip:"Invoke",tooltipProps:{placement:"bottom"},...n}):x(fl,{"aria-label":"Invoke",type:"submit",isDisabled:!i,onClick:s,className:"invoke-btn",...n,children:"Invoke"})});return i?l:x(pu,{trigger:"hover",triggerComponent:l,children:o&&x(Hz,{children:o.map((u,h)=>x(Wz,{children:u},h))})})}const P5e=ct(e=>e.system,e=>({isProcessing:e.isProcessing,isConnected:e.isConnected,isCancelable:e.isCancelable}),{memoizeOptions:{resultEqualityCheck:st.isEqual}});function G$(e){const{...t}=e,n=Ye(),{isProcessing:r,isConnected:i,isCancelable:o}=ke(P5e),a=()=>n(k5e());return mt("shift+x",()=>{(i||r)&&o&&a()},[i,r,o]),x(gt,{icon:x(D4e,{}),tooltip:"Cancel","aria-label":"Cancel",isDisabled:!i||!r||!o,onClick:a,styleClass:"cancel-btn",...t})}const T5e=ct(e=>e.options,e=>e.shouldLoopback),j$=()=>{const e=Ye(),t=ke(T5e);return x(gt,{"aria-label":"Toggle Loopback",tooltip:"Toggle Loopback",styleClass:"loopback-btn",asCheckbox:!0,isChecked:t,icon:x(c5e,{}),onClick:()=>{e(tke(!t))}})},G_=()=>ne("div",{className:"process-buttons",children:[x(U$,{}),x(j$,{}),x(G$,{})]}),A5e=ct([e=>e.options,Rr],(e,t)=>({prompt:e.prompt,activeTabName:t}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),j_=()=>{const e=Ye(),{prompt:t,activeTabName:n}=ke(A5e),{isReady:r}=ke(W$),i=C.exports.useRef(null),o=s=>{e(fb(s.target.value))};mt("alt+a",()=>{i.current?.focus()},[]);const a=s=>{s.key==="Enter"&&s.shiftKey===!1&&r&&(s.preventDefault(),e(WC(n)))};return x("div",{className:"prompt-bar",children:x(fd,{isInvalid:t.length===0||Boolean(t.match(/^[\s\r\n]+$/)),children:x(DF,{id:"prompt",name:"prompt",placeholder:"I'm dreaming of...",size:"lg",value:t,onChange:o,onKeyDown:a,resize:"vertical",height:30,ref:i})})})};function Y$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146z"}}]})(e)}function q$(e){return ft({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.828.722a.5.5 0 0 1 .354.146l4.95 4.95a.5.5 0 0 1 0 .707c-.48.48-1.072.588-1.503.588-.177 0-.335-.018-.46-.039l-3.134 3.134a5.927 5.927 0 0 1 .16 1.013c.046.702-.032 1.687-.72 2.375a.5.5 0 0 1-.707 0l-2.829-2.828-3.182 3.182c-.195.195-1.219.902-1.414.707-.195-.195.512-1.22.707-1.414l3.182-3.182-2.828-2.829a.5.5 0 0 1 0-.707c.688-.688 1.673-.767 2.375-.72a5.922 5.922 0 0 1 1.013.16l3.134-3.133a2.772 2.772 0 0 1-.04-.461c0-.43.108-1.022.589-1.503a.5.5 0 0 1 .353-.146zm.122 2.112v-.002.002zm0-.002v.002a.5.5 0 0 1-.122.51L6.293 6.878a.5.5 0 0 1-.511.12H5.78l-.014-.004a4.507 4.507 0 0 0-.288-.076 4.922 4.922 0 0 0-.765-.116c-.422-.028-.836.008-1.175.15l5.51 5.509c.141-.34.177-.753.149-1.175a4.924 4.924 0 0 0-.192-1.054l-.004-.013v-.001a.5.5 0 0 1 .12-.512l3.536-3.535a.5.5 0 0 1 .532-.115l.096.022c.087.017.208.034.344.034.114 0 .23-.011.343-.04L9.927 2.028c-.029.113-.04.23-.04.343a1.779 1.779 0 0 0 .062.46z"}}]})(e)}function L5e(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function M5e(e,t){e.classList?e.classList.add(t):L5e(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function VL(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function O5e(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=VL(e.className,t):e.setAttribute("class",VL(e.className&&e.className.baseVal||"",t))}const UL={disabled:!1},K$=le.createContext(null);var X$=function(t){return t.scrollTop},om="unmounted",bf="exited",xf="entering",Rp="entered",UC="exiting",Tu=function(e){z8(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=bf,o.appearStatus=xf):l=Rp:r.unmountOnExit||r.mountOnEnter?l=om:l=bf,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===om?{status:bf}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==xf&&a!==Rp&&(o=xf):(a===xf||a===Rp)&&(o=UC)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===xf){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:gy.findDOMNode(this);a&&X$(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===bf&&this.setState({status:om})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[gy.findDOMNode(this),s],u=l[0],h=l[1],p=this.getTimeouts(),m=s?p.appear:p.enter;if(!i&&!a||UL.disabled){this.safeSetState({status:Rp},function(){o.props.onEntered(u)});return}this.props.onEnter(u,h),this.safeSetState({status:xf},function(){o.props.onEntering(u,h),o.onTransitionEnd(m,function(){o.safeSetState({status:Rp},function(){o.props.onEntered(u,h)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:gy.findDOMNode(this);if(!o||UL.disabled){this.safeSetState({status:bf},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:UC},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:bf},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:gy.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],h=l[1];this.props.addEndListener(u,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===om)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=R8(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return x(K$.Provider,{value:null,children:typeof a=="function"?a(i,s):le.cloneElement(le.Children.only(a),s)})},t}(le.Component);Tu.contextType=K$;Tu.propTypes={};function Ep(){}Tu.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ep,onEntering:Ep,onEntered:Ep,onExit:Ep,onExiting:Ep,onExited:Ep};Tu.UNMOUNTED=om;Tu.EXITED=bf;Tu.ENTERING=xf;Tu.ENTERED=Rp;Tu.EXITING=UC;const I5e=Tu;var R5e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return M5e(t,r)})},dw=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return O5e(t,r)})},Y_=function(e){z8(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;aMath.floor(e/t)*t,Fc=(e,t)=>Math.round(e/t)*t,Pp=(e,t,n,r,i=.95)=>{const o=e*i/n,a=t*i/r;return Math.min(1,Math.min(o,a))},Tp=(e,t,n,r,i,o,a)=>{const s=e/2-(n+i/2)*a,l=t/2-(r+o/2)*a;return{x:s,y:l}},GL=e=>({x:Math.floor(e.x),y:Math.floor(e.y)}),N5e=e=>({width:Fc(e.width,64),height:Fc(e.height,64)}),D5e=.999,z5e=.1,B5e=20,Bg=.95,am={objects:[],stagingArea:{x:-1,y:-1,width:-1,height:-1,images:[],selectedImageIndex:-1}},F5e={boundingBoxCoordinates:{x:0,y:0},boundingBoxDimensions:{width:512,height:512},boundingBoxPreviewFill:{r:0,g:0,b:0,a:.5},brushColor:{r:90,g:90,b:255,a:1},brushSize:50,canvasContainerDimensions:{width:0,height:0},cursorPosition:null,doesCanvasNeedScaling:!1,futureLayerStates:[],inpaintReplace:.1,isCanvasInitialized:!1,isDrawing:!1,isMaskEnabled:!0,isMouseOverBoundingBox:!1,isMoveBoundingBoxKeyHeld:!1,isMoveStageKeyHeld:!1,isMovingBoundingBox:!1,isMovingStage:!1,isTransformingBoundingBox:!1,layer:"base",layerState:am,maskColor:{r:255,g:90,b:90,a:1},maxHistory:128,minimumStageScale:1,pastLayerStates:[],shouldAutoSave:!1,shouldDarkenOutsideBoundingBox:!1,shouldLockBoundingBox:!1,shouldPreserveMaskedArea:!1,shouldShowBoundingBox:!0,shouldShowBrush:!0,shouldShowBrushPreview:!1,shouldShowCanvasDebugInfo:!1,shouldShowCheckboardTransparency:!1,shouldShowGrid:!0,shouldShowIntermediates:!0,shouldShowStagingImage:!0,shouldShowStagingOutline:!0,shouldSnapToGrid:!0,shouldUseInpaintReplace:!1,stageCoordinates:{x:0,y:0},stageDimensions:{width:0,height:0},stageScale:1,tool:"brush"},Q$=TS({name:"canvas",initialState:F5e,reducers:{setTool:(e,t)=>{const n=t.payload;e.tool=t.payload,n!=="move"&&(e.isTransformingBoundingBox=!1,e.isMouseOverBoundingBox=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1)},setLayer:(e,t)=>{e.layer=t.payload},toggleTool:e=>{const t=e.tool;t!=="move"&&(e.tool=t==="brush"?"eraser":"brush")},setMaskColor:(e,t)=>{e.maskColor=t.payload},setBrushColor:(e,t)=>{e.brushColor=t.payload},setBrushSize:(e,t)=>{e.brushSize=t.payload},clearMask:e=>{e.pastLayerStates.push(e.layerState),e.layerState.objects=e.layerState.objects.filter(t=>!U_(t)),e.futureLayerStates=[],e.shouldPreserveMaskedArea=!1},toggleShouldInvertMask:e=>{e.shouldPreserveMaskedArea=!e.shouldPreserveMaskedArea},toggleShouldShowMask:e=>{e.isMaskEnabled=!e.isMaskEnabled},setShouldPreserveMaskedArea:(e,t)=>{e.shouldPreserveMaskedArea=t.payload},setIsMaskEnabled:(e,t)=>{e.isMaskEnabled=t.payload,e.layer=t.payload?"mask":"base"},setShouldShowCheckboardTransparency:(e,t)=>{e.shouldShowCheckboardTransparency=t.payload},setShouldShowBrushPreview:(e,t)=>{e.shouldShowBrushPreview=t.payload},setShouldShowBrush:(e,t)=>{e.shouldShowBrush=t.payload},setCursorPosition:(e,t)=>{e.cursorPosition=t.payload},setInitialCanvasImage:(e,t)=>{const n=t.payload,{stageDimensions:r}=e,i={width:gs(st.clamp(n.width,64,512),64),height:gs(st.clamp(n.height,64,512),64)},o={x:Fc(n.width/2-i.width/2,64),y:Fc(n.height/2-i.height/2,64)};e.boundingBoxDimensions=i,e.boundingBoxCoordinates=o,e.pastLayerStates.push(e.layerState),e.layerState={...am,objects:[{kind:"image",layer:"base",x:0,y:0,width:n.width,height:n.height,image:n}]},e.futureLayerStates=[],e.isCanvasInitialized=!1;const a=Pp(r.width,r.height,n.width,n.height,Bg),s=Tp(r.width,r.height,0,0,n.width,n.height,a);e.stageScale=a,e.stageCoordinates=s,e.doesCanvasNeedScaling=!0},setStageDimensions:(e,t)=>{e.stageDimensions=t.payload;const{width:n,height:r}=t.payload,{width:i,height:o}=e.boundingBoxDimensions,a=gs(st.clamp(i,64,n/e.stageScale),64),s=gs(st.clamp(o,64,r/e.stageScale),64);e.boundingBoxDimensions={width:a,height:s}},setBoundingBoxDimensions:(e,t)=>{e.boundingBoxDimensions=N5e(t.payload)},setBoundingBoxCoordinates:(e,t)=>{e.boundingBoxCoordinates=GL(t.payload)},setStageCoordinates:(e,t)=>{e.stageCoordinates=t.payload},setBoundingBoxPreviewFill:(e,t)=>{e.boundingBoxPreviewFill=t.payload},setDoesCanvasNeedScaling:(e,t)=>{e.doesCanvasNeedScaling=t.payload},setStageScale:(e,t)=>{e.stageScale=t.payload},setShouldDarkenOutsideBoundingBox:(e,t)=>{e.shouldDarkenOutsideBoundingBox=t.payload},setIsDrawing:(e,t)=>{e.isDrawing=t.payload},setClearBrushHistory:e=>{e.pastLayerStates=[],e.futureLayerStates=[]},setShouldUseInpaintReplace:(e,t)=>{e.shouldUseInpaintReplace=t.payload},setInpaintReplace:(e,t)=>{e.inpaintReplace=t.payload},setShouldLockBoundingBox:(e,t)=>{e.shouldLockBoundingBox=t.payload},toggleShouldLockBoundingBox:e=>{e.shouldLockBoundingBox=!e.shouldLockBoundingBox},setShouldShowBoundingBox:(e,t)=>{e.shouldShowBoundingBox=t.payload},setIsTransformingBoundingBox:(e,t)=>{e.isTransformingBoundingBox=t.payload},setIsMovingBoundingBox:(e,t)=>{e.isMovingBoundingBox=t.payload},setIsMouseOverBoundingBox:(e,t)=>{e.isMouseOverBoundingBox=t.payload},setIsMoveBoundingBoxKeyHeld:(e,t)=>{e.isMoveBoundingBoxKeyHeld=t.payload},setIsMoveStageKeyHeld:(e,t)=>{e.isMoveStageKeyHeld=t.payload},addImageToStagingArea:(e,t)=>{const{boundingBox:n,image:r}=t.payload;!n||!r||(e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.stagingArea.images.push({kind:"image",layer:"base",...n,image:r}),e.layerState.stagingArea.selectedImageIndex=e.layerState.stagingArea.images.length-1,e.futureLayerStates=[])},discardStagedImages:e=>{e.layerState.stagingArea={...am.stagingArea},e.shouldShowStagingOutline=!0},addLine:(e,t)=>{const{tool:n,layer:r,brushColor:i,brushSize:o}=e;if(n==="move")return;const a=o/2,s=r==="base"&&n==="brush"?{color:i}:{};e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({kind:"line",layer:r,tool:n,strokeWidth:a,points:t.payload,...s}),e.futureLayerStates=[]},addPointToCurrentLine:(e,t)=>{const n=e.layerState.objects.findLast(x5e);!n||n.points.push(...t.payload)},undo:e=>{const t=e.pastLayerStates.pop();!t||(e.futureLayerStates.unshift(e.layerState),e.futureLayerStates.length>e.maxHistory&&e.futureLayerStates.pop(),e.layerState=t)},redo:e=>{const t=e.futureLayerStates.shift();!t||(e.pastLayerStates.push(e.layerState),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState=t)},setShouldShowGrid:(e,t)=>{e.shouldShowGrid=t.payload},setIsMovingStage:(e,t)=>{e.isMovingStage=t.payload},setShouldSnapToGrid:(e,t)=>{e.shouldSnapToGrid=t.payload},setShouldAutoSave:(e,t)=>{e.shouldAutoSave=t.payload},setShouldShowIntermediates:(e,t)=>{e.shouldShowIntermediates=t.payload},resetCanvas:e=>{e.pastLayerStates.push(e.layerState),e.layerState=am,e.futureLayerStates=[]},setCanvasContainerDimensions:(e,t)=>{e.canvasContainerDimensions=t.payload},resizeAndScaleCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r=e.layerState.objects.find(i5),i={width:Math.floor(t),height:Math.floor(n)};if(!r){const h=Pp(i.width,i.height,512,512,Bg),p=Tp(i.width,i.height,0,0,512,512,h);e.stageScale=h,e.stageCoordinates=p,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512};return}const{width:o,height:a}=r,l=Pp(t,n,o,a,.95),u=Tp(i.width,i.height,0,0,o,a,l);e.minimumStageScale=l,e.stageScale=l,e.stageCoordinates=GL(u),e.stageDimensions=i,e.isCanvasInitialized=!0},resizeCanvas:e=>{const{width:t,height:n}=e.canvasContainerDimensions,r={width:Math.floor(t),height:Math.floor(n)};if(e.stageDimensions=r,!e.layerState.objects.find(i5)){const i=Pp(r.width,r.height,512,512,Bg),o=Tp(r.width,r.height,0,0,512,512,i);e.stageScale=i,e.stageCoordinates=o,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},resetCanvasView:(e,t)=>{const{contentRect:n}=t.payload,{stageDimensions:{width:r,height:i}}=e,{x:o,y:a,width:s,height:l}=n;if(s!==0&&l!==0){const u=Pp(r,i,s,l,Bg),h=Tp(r,i,o,a,s,l,u);e.stageScale=u,e.stageCoordinates=h}else{const u=Pp(r,i,512,512,Bg),h=Tp(r,i,0,0,512,512,u);e.stageScale=u,e.stageCoordinates=h,e.boundingBoxCoordinates={x:0,y:0},e.boundingBoxDimensions={width:512,height:512}}},nextStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex,n=e.layerState.stagingArea.images.length;e.layerState.stagingArea.selectedImageIndex=Math.min(t+1,n-1)},prevStagingAreaImage:e=>{const t=e.layerState.stagingArea.selectedImageIndex;e.layerState.stagingArea.selectedImageIndex=Math.max(t-1,0)},commitStagingAreaImage:e=>{const{images:t,selectedImageIndex:n}=e.layerState.stagingArea;e.pastLayerStates.push(st.cloneDeep(e.layerState)),e.pastLayerStates.length>e.maxHistory&&e.pastLayerStates.shift(),e.layerState.objects.push({...t[n]}),e.layerState.stagingArea={...am.stagingArea},e.futureLayerStates=[],e.shouldShowStagingOutline=!0},fitBoundingBoxToStage:e=>{const{boundingBoxDimensions:t,boundingBoxCoordinates:n,stageDimensions:r,stageScale:i}=e,o=r.width/i,a=r.height/i;if(n.x<0||n.x+t.width>o||n.y<0||n.y+t.height>a){const s={width:gs(st.clamp(o,64,512),64),height:gs(st.clamp(a,64,512),64)},l={x:Fc(o/2-s.width/2,64),y:Fc(a/2-s.height/2,64)};e.boundingBoxDimensions=s,e.boundingBoxCoordinates=l}},setShouldShowStagingImage:(e,t)=>{e.shouldShowStagingImage=t.payload},setShouldShowStagingOutline:(e,t)=>{e.shouldShowStagingOutline=t.payload},setShouldShowCanvasDebugInfo:(e,t)=>{e.shouldShowCanvasDebugInfo=t.payload},setMergedCanvas:(e,t)=>{e.pastLayerStates.push({...e.layerState}),e.futureLayerStates=[],e.layerState.objects=[t.payload]},resetCanvasInteractionState:e=>{e.cursorPosition=null,e.isDrawing=!1,e.isMouseOverBoundingBox=!1,e.isMoveBoundingBoxKeyHeld=!1,e.isMoveStageKeyHeld=!1,e.isMovingBoundingBox=!1,e.isMovingStage=!1,e.isTransformingBoundingBox=!1}}}),{addImageToStagingArea:$5e,addLine:J$,addPointToCurrentLine:eH,clearMask:H5e,commitStagingAreaImage:W5e,discardStagedImages:V5e,fitBoundingBoxToStage:HPe,nextStagingAreaImage:U5e,prevStagingAreaImage:G5e,redo:j5e,resetCanvas:Y5e,resetCanvasInteractionState:q5e,resetCanvasView:K5e,resizeAndScaleCanvas:tH,resizeCanvas:X5e,setBoundingBoxCoordinates:fw,setBoundingBoxDimensions:sm,setBoundingBoxPreviewFill:WPe,setBrushColor:Z5e,setBrushSize:hw,setCanvasContainerDimensions:Q5e,setClearBrushHistory:J5e,setCursorPosition:nH,setDoesCanvasNeedScaling:io,setInitialCanvasImage:q_,setInpaintReplace:jL,setIsDrawing:qS,setIsMaskEnabled:eSe,setIsMouseOverBoundingBox:Fy,setIsMoveBoundingBoxKeyHeld:VPe,setIsMoveStageKeyHeld:UPe,setIsMovingBoundingBox:YL,setIsMovingStage:o5,setIsTransformingBoundingBox:pw,setLayer:qL,setMaskColor:tSe,setMergedCanvas:nSe,setShouldAutoSave:rSe,setShouldDarkenOutsideBoundingBox:rH,setShouldLockBoundingBox:iSe,setShouldPreserveMaskedArea:oSe,setShouldShowBoundingBox:iH,setShouldShowBrush:GPe,setShouldShowBrushPreview:jPe,setShouldShowCanvasDebugInfo:aSe,setShouldShowCheckboardTransparency:YPe,setShouldShowGrid:sSe,setShouldShowIntermediates:lSe,setShouldShowStagingImage:uSe,setShouldShowStagingOutline:KL,setShouldSnapToGrid:cSe,setShouldUseInpaintReplace:dSe,setStageCoordinates:oH,setStageDimensions:qPe,setStageScale:fSe,setTool:Zp,toggleShouldLockBoundingBox:KPe,toggleTool:XPe,undo:hSe}=Q$.actions,pSe=Q$.reducer,aH=""+new URL("logo.13003d72.png",import.meta.url).href,gSe=ct(e=>e.options,e=>{const{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}=e;return{shouldShowOptionsPanel:t,shouldHoldOptionsPanelOpen:n,shouldPinOptionsPanel:r,optionsPanelScrollPosition:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),K_=e=>{const t=Ye(),{shouldShowOptionsPanel:n,shouldHoldOptionsPanelOpen:r,shouldPinOptionsPanel:i}=ke(gSe),o=C.exports.useRef(null),a=C.exports.useRef(null),s=C.exports.useRef(null),{children:l}=e;mt("o",()=>{t(A0(!n)),i&&setTimeout(()=>t(io(!0)),400)},[n,i]),mt("esc",()=>{t(A0(!1))},{enabled:()=>!i,preventDefault:!0},[i]),mt("shift+o",()=>{m(),t(io(!0))},[i]);const u=C.exports.useCallback(()=>{i||(t(J_e(a.current?a.current.scrollTop:0)),t(A0(!1)),t(eke(!1)))},[t,i]),h=()=>{s.current=window.setTimeout(()=>u(),500)},p=()=>{s.current&&window.clearTimeout(s.current)},m=()=>{t(Q_e(!i)),t(io(!0))};return C.exports.useEffect(()=>{function v(S){o.current&&!o.current.contains(S.target)&&u()}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[u]),x(Z$,{nodeRef:o,in:n||r&&!i,unmountOnExit:!0,timeout:200,classNames:"options-panel-wrapper",children:x("div",{className:"options-panel-wrapper","data-pinned":i,tabIndex:1,ref:o,onMouseEnter:i?void 0:p,onMouseOver:i?void 0:p,children:x("div",{className:"options-panel-margin",children:ne("div",{className:"options-panel",ref:a,onMouseLeave:v=>{v.target!==a.current?p():!i&&h()},children:[x(Oi,{label:"Pin Options Panel",children:x("div",{className:"options-panel-pin-button","data-selected":i,onClick:m,children:i?x(Y$,{}):x(q$,{})})}),!i&&ne("div",{className:"invoke-ai-logo-wrapper",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),l]})})})})};function mSe(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})},other:{header:x(L$,{}),feature:to.OTHER,options:x(M$,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(A$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(W3e,{}),x(N_,{}),e?x(B_,{accordionInfo:t}):null]})}const X_=C.exports.createContext(null),vSe=e=>{const{styleClass:t}=e,n=C.exports.useContext(X_),r=()=>{n&&n()};return x("div",{className:`image-uploader-button-outer ${t}`,onClick:r,children:ne("div",{className:"image-upload-button",children:[x(W_,{}),x(Uf,{size:"lg",children:"Click or Drag and Drop"})]})})},ySe=ct(e=>e.system,e=>{const{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}=e;return{shouldConfirmOnDelete:t,isConnected:n,isProcessing:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),GC=C.exports.forwardRef(({image:e,children:t},n)=>{const{isOpen:r,onOpen:i,onClose:o}=U4(),a=Ye(),{shouldConfirmOnDelete:s,isConnected:l,isProcessing:u}=ke(ySe),h=C.exports.useRef(null),p=S=>{S.stopPropagation(),s?i():m()},m=()=>{l&&!u&&e&&a(_5e(e)),o()};mt("delete",()=>{s?i():m()},[e,s]);const v=S=>a(R$(!S.target.checked));return ne(Nn,{children:[C.exports.cloneElement(t,{onClick:e?p:void 0,ref:n}),x(I1e,{isOpen:r,leastDestructiveRef:h,onClose:o,children:x(Pv,{children:ne(R1e,{children:[x(q8,{fontSize:"lg",fontWeight:"bold",children:"Delete image"}),x(q4,{children:ne(nn,{direction:"column",gap:5,children:[x(Eo,{children:"Are you sure? You can't undo this action afterwards."}),x(fd,{children:ne(nn,{alignItems:"center",children:[x(lh,{mb:0,children:"Don't ask me again"}),x(a_,{checked:!s,onChange:v})]})})]})}),ne(Y8,{children:[x(Da,{ref:h,onClick:o,children:"Cancel"}),x(Da,{colorScheme:"red",onClick:m,ml:3,children:"Delete"})]})]})})})]})}),SSe=ct([e=>e.system,e=>e.options,e=>e.gallery,Rr],(e,t,n,r)=>{const{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s}=e,{upscalingLevel:l,facetoolStrength:u,shouldShowImageDetails:h,isLightBoxOpen:p}=t,{intermediateImage:m,currentImage:v}=n;return{isProcessing:i,isConnected:o,isGFPGANAvailable:a,isESRGANAvailable:s,upscalingLevel:l,facetoolStrength:u,shouldDisableToolbarButtons:Boolean(m)||!v,currentImage:v,shouldShowImageDetails:h,activeTabName:r,isLightBoxOpen:p}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),sH=()=>{const e=Ye(),{isProcessing:t,isConnected:n,isGFPGANAvailable:r,isESRGANAvailable:i,upscalingLevel:o,facetoolStrength:a,shouldDisableToolbarButtons:s,shouldShowImageDetails:l,currentImage:u,isLightBoxOpen:h,activeTabName:p}=ke(SSe),m=hh(),v=()=>{!u||(h&&e(ad(!1)),e(u2(u)),e(na("img2img")))},S=()=>{navigator.clipboard.writeText(u?window.location.toString()+u.url:"").then(()=>{m({title:"Image Link Copied",status:"success",duration:2500,isClosable:!0})})};mt("shift+i",()=>{u?(v(),m({title:"Sent To Image To Image",status:"success",duration:2500,isClosable:!0})):m({title:"No Image Loaded",description:"No image found to send to image to image module.",status:"error",duration:2500,isClosable:!0})},[u]);const w=()=>{!u||(u.metadata&&e(U_e(u.metadata)),u.metadata?.image.type==="img2img"?e(na("img2img")):u.metadata?.image.type==="txt2img"&&e(na("txt2img")))};mt("a",()=>{["txt2img","img2img"].includes(u?.metadata?.image?.type)?(w(),m({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})):m({title:"Parameters Not Set",description:"No metadata found for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const E=()=>{u?.metadata&&e(l2(u.metadata.image.seed))};mt("s",()=>{u?.metadata?.image?.seed?(E(),m({title:"Seed Set",status:"success",duration:2500,isClosable:!0})):m({title:"Seed Not Set",description:"Could not find seed for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const P=()=>u?.metadata?.image?.prompt&&e(fb(u.metadata.image.prompt));mt("p",()=>{u?.metadata?.image?.prompt?(P(),m({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})):m({title:"Prompt Not Set",description:"Could not find prompt for this image.",status:"error",duration:2500,isClosable:!0})},[u]);const k=()=>{u&&e(w5e(u))};mt("u",()=>{i&&!s&&n&&!t&&o?k():m({title:"Upscaling Failed",status:"error",duration:2500,isClosable:!0})},[u,i,s,n,t,o]);const T=()=>{u&&e(C5e(u))};mt("r",()=>{r&&!s&&n&&!t&&a?T():m({title:"Face Restoration Failed",status:"error",duration:2500,isClosable:!0})},[u,r,s,n,t,a]);const M=()=>e(dV(!l)),I=()=>{!u||(h&&e(ad(!1)),e(q_(u)),e(io(!0)),p!=="unifiedCanvas"&&e(na("unifiedCanvas")),m({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0}))};return mt("i",()=>{u?M():m({title:"Failed to load metadata",status:"error",duration:2500,isClosable:!0})},[u,l]),ne("div",{className:"current-image-options",children:[x(Ia,{isAttached:!0,children:x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Send to...",icon:x(p5e,{})}),children:ne("div",{className:"current-image-send-to-popover",children:[x(fl,{size:"sm",onClick:v,leftIcon:x(HL,{}),children:"Send to Image to Image"}),x(fl,{size:"sm",onClick:I,leftIcon:x(HL,{}),children:"Send to Unified Canvas"}),x(fl,{size:"sm",onClick:S,leftIcon:x($_,{}),children:"Copy Link to Image"}),x(fl,{leftIcon:x($$,{}),size:"sm",children:x(Gf,{download:!0,href:u?.url,children:"Download Image"})})]})})}),ne(Ia,{isAttached:!0,children:[x(gt,{icon:x(u5e,{}),tooltip:"Use Prompt","aria-label":"Use Prompt",isDisabled:!u?.metadata?.image?.prompt,onClick:P}),x(gt,{icon:x(h5e,{}),tooltip:"Use Seed","aria-label":"Use Seed",isDisabled:!u?.metadata?.image?.seed,onClick:E}),x(gt,{icon:x(Y4e,{}),tooltip:"Use All","aria-label":"Use All",isDisabled:!["txt2img","img2img"].includes(u?.metadata?.image?.type),onClick:w})]}),ne(Ia,{isAttached:!0,children:[x(pu,{trigger:"hover",triggerComponent:x(gt,{icon:x(e5e,{}),"aria-label":"Restore Faces"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(jS,{}),x(fl,{isDisabled:!r||!u||!(n&&!t)||!a,onClick:T,children:"Restore Faces"})]})}),x(pu,{trigger:"hover",triggerComponent:x(gt,{icon:x(Z4e,{}),"aria-label":"Upscale"}),children:ne("div",{className:"current-image-postprocessing-popover",children:[x(YS,{}),x(fl,{isDisabled:!i||!u||!(n&&!t)||!o,onClick:k,children:"Upscale Image"})]})})]}),x(gt,{icon:x(F$,{}),tooltip:"Details","aria-label":"Details","data-selected":l,onClick:M}),x(GC,{image:u,children:x(gt,{icon:x(H_,{}),tooltip:"Delete Image","aria-label":"Delete Image",isDisabled:!u||!n||t,style:{backgroundColor:"var(--btn-delete-image)"}})})]})},bSe={currentImageUuid:"",shouldPinGallery:!0,shouldShowGallery:!0,galleryScrollPosition:0,galleryImageMinimumWidth:64,galleryImageObjectFit:"cover",shouldHoldGalleryOpen:!1,shouldAutoSwitchToNewImages:!0,currentCategory:"result",categories:{user:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0},result:{images:[],latest_mtime:void 0,earliest_mtime:void 0,areMoreImagesAvailable:!0}},galleryWidth:300},lH=TS({name:"gallery",initialState:bSe,reducers:{setCurrentImage:(e,t)=>{e.currentImage=t.payload,e.currentImageUuid=t.payload.uuid},removeImage:(e,t)=>{const{uuid:n,category:r}=t.payload,i=e.categories[r].images,o=i.filter(a=>a.uuid!==n);if(n===e.currentImageUuid){const a=i.findIndex(l=>l.uuid===n),s=Zr.exports.clamp(a,0,o.length-1);e.currentImage=o.length?o[s]:void 0,e.currentImageUuid=o.length?o[s].uuid:""}e.categories[r].images=o},addImage:(e,t)=>{const{image:n,category:r}=t.payload,{uuid:i,url:o,mtime:a}=n,s=e.categories[r];s.images.find(l=>l.url===o&&l.mtime===a)||(s.images.unshift(n),e.shouldAutoSwitchToNewImages&&(e.currentImageUuid=i,e.currentImage=n,e.currentCategory=r),e.intermediateImage=void 0,s.latest_mtime=a)},setIntermediateImage:(e,t)=>{e.intermediateImage=t.payload},clearIntermediateImage:e=>{e.intermediateImage=void 0},selectNextImage:e=>{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r{const{currentImage:t}=e;if(!t)return;const n=e.categories[t.category].images;if(t){const r=n.findIndex(i=>i.uuid===t.uuid);if(r>0){const i=n[r-1];e.currentImage=i,e.currentImageUuid=i.uuid}}},addGalleryImages:(e,t)=>{const{images:n,areMoreImagesAvailable:r,category:i}=t.payload,o=e.categories[i].images;if(n.length>0){const a=n.filter(s=>!o.find(l=>l.url===s.url&&l.mtime===s.mtime));if(e.categories[i].images=o.concat(a).sort((s,l)=>l.mtime-s.mtime),!e.currentImage){const s=n[0];e.currentImage=s,e.currentImageUuid=s.uuid}e.categories[i].latest_mtime=n[0].mtime,e.categories[i].earliest_mtime=n[n.length-1].mtime}r!==void 0&&(e.categories[i].areMoreImagesAvailable=r)},setShouldPinGallery:(e,t)=>{e.shouldPinGallery=t.payload},setShouldShowGallery:(e,t)=>{e.shouldShowGallery=t.payload},setGalleryScrollPosition:(e,t)=>{e.galleryScrollPosition=t.payload},setGalleryImageMinimumWidth:(e,t)=>{e.galleryImageMinimumWidth=t.payload},setGalleryImageObjectFit:(e,t)=>{e.galleryImageObjectFit=t.payload},setShouldHoldGalleryOpen:(e,t)=>{e.shouldHoldGalleryOpen=t.payload},setShouldAutoSwitchToNewImages:(e,t)=>{e.shouldAutoSwitchToNewImages=t.payload},setCurrentCategory:(e,t)=>{e.currentCategory=t.payload},setGalleryWidth:(e,t)=>{e.galleryWidth=t.payload}}}),{addImage:Qp,clearIntermediateImage:gw,removeImage:uH,setCurrentImage:xSe,addGalleryImages:wSe,setIntermediateImage:CSe,selectNextImage:Z_,selectPrevImage:Q_,setShouldPinGallery:_Se,setShouldShowGallery:k0,setGalleryScrollPosition:kSe,setGalleryImageMinimumWidth:Ap,setGalleryImageObjectFit:ESe,setShouldHoldGalleryOpen:cH,setShouldAutoSwitchToNewImages:PSe,setCurrentCategory:$y,setGalleryWidth:Fg}=lH.actions,TSe=lH.reducer;ut({d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",displayName:"CopyIcon"});ut({d:"M23.384,21.619,16.855,15.09a9.284,9.284,0,1,0-1.768,1.768l6.529,6.529a1.266,1.266,0,0,0,1.768,0A1.251,1.251,0,0,0,23.384,21.619ZM2.75,9.5a6.75,6.75,0,1,1,6.75,6.75A6.758,6.758,0,0,1,2.75,9.5Z",displayName:"SearchIcon"});ut({d:"M23.414,20.591l-4.645-4.645a10.256,10.256,0,1,0-2.828,2.829l4.645,4.644a2.025,2.025,0,0,0,2.828,0A2,2,0,0,0,23.414,20.591ZM10.25,3.005A7.25,7.25,0,1,1,3,10.255,7.258,7.258,0,0,1,10.25,3.005Z",displayName:"Search2Icon"});ut({d:"M21.4,13.7C20.6,13.9,19.8,14,19,14c-5,0-9-4-9-9c0-0.8,0.1-1.6,0.3-2.4c0.1-0.3,0-0.7-0.3-1 c-0.3-0.3-0.6-0.4-1-0.3C4.3,2.7,1,7.1,1,12c0,6.1,4.9,11,11,11c4.9,0,9.3-3.3,10.6-8.1c0.1-0.3,0-0.7-0.3-1 C22.1,13.7,21.7,13.6,21.4,13.7z",displayName:"MoonIcon"});ut({displayName:"SunIcon",path:ne("g",{strokeLinejoin:"round",strokeLinecap:"round",strokeWidth:"2",fill:"none",stroke:"currentColor",children:[x("circle",{cx:"12",cy:"12",r:"5"}),x("path",{d:"M12 1v2"}),x("path",{d:"M12 21v2"}),x("path",{d:"M4.22 4.22l1.42 1.42"}),x("path",{d:"M18.36 18.36l1.42 1.42"}),x("path",{d:"M1 12h2"}),x("path",{d:"M21 12h2"}),x("path",{d:"M4.22 19.78l1.42-1.42"}),x("path",{d:"M18.36 5.64l1.42-1.42"})]})});ut({d:"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",displayName:"AddIcon"});ut({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:x("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})});ut({viewBox:"0 0 14 14",d:"M14,7.77 L14,6.17 L12.06,5.53 L11.61,4.44 L12.49,2.6 L11.36,1.47 L9.55,2.38 L8.46,1.93 L7.77,0.01 L6.17,0.01 L5.54,1.95 L4.43,2.4 L2.59,1.52 L1.46,2.65 L2.37,4.46 L1.92,5.55 L0,6.23 L0,7.82 L1.94,8.46 L2.39,9.55 L1.51,11.39 L2.64,12.52 L4.45,11.61 L5.54,12.06 L6.23,13.98 L7.82,13.98 L8.45,12.04 L9.56,11.59 L11.4,12.47 L12.53,11.34 L11.61,9.53 L12.08,8.44 L14,7.75 L14,7.77 Z M7,10 C5.34,10 4,8.66 4,7 C4,5.34 5.34,4 7,4 C8.66,4 10,5.34 10,7 C10,8.66 8.66,10 7,10 Z",displayName:"SettingsIcon"});ut({displayName:"CheckCircleIcon",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"});ut({d:"M19.5,9.5h-.75V6.75a6.75,6.75,0,0,0-13.5,0V9.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5ZM7.75,6.75a4.25,4.25,0,0,1,8.5,0V9a.5.5,0,0,1-.5.5H8.25a.5.5,0,0,1-.5-.5Z",displayName:"LockIcon"});ut({d:"M19.5,9.5h-.75V6.75A6.751,6.751,0,0,0,5.533,4.811a1.25,1.25,0,1,0,2.395.717A4.251,4.251,0,0,1,16.25,6.75V9a.5.5,0,0,1-.5.5H4.5a2,2,0,0,0-2,2V22a2,2,0,0,0,2,2h15a2,2,0,0,0,2-2V11.5A2,2,0,0,0,19.5,9.5Zm-9.5,6a2,2,0,1,1,3,1.723V19.5a1,1,0,0,1-2,0V17.223A1.994,1.994,0,0,1,10,15.5Z",displayName:"UnlockIcon"});ut({displayName:"ViewIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M23.432,10.524C20.787,7.614,16.4,4.538,12,4.6,7.6,4.537,3.213,7.615.568,10.524a2.211,2.211,0,0,0,0,2.948C3.182,16.351,7.507,19.4,11.839,19.4h.308c4.347,0,8.671-3.049,11.288-5.929A2.21,2.21,0,0,0,23.432,10.524ZM7.4,12A4.6,4.6,0,1,1,12,16.6,4.6,4.6,0,0,1,7.4,12Z"}),x("circle",{cx:"12",cy:"12",r:"2"})]})});ut({displayName:"ViewOffIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M23.2,10.549a20.954,20.954,0,0,0-4.3-3.6l4-3.995a1,1,0,1,0-1.414-1.414l-.018.018a.737.737,0,0,1-.173.291l-19.5,19.5c-.008.007-.018.009-.026.017a1,1,0,0,0,1.631,1.088l4.146-4.146a11.26,11.26,0,0,0,4.31.939h.3c4.256,0,8.489-2.984,11.051-5.8A2.171,2.171,0,0,0,23.2,10.549ZM16.313,13.27a4.581,4.581,0,0,1-3,3.028,4.3,4.3,0,0,1-3.1-.19.253.253,0,0,1-.068-.407l5.56-5.559a.252.252,0,0,1,.407.067A4.3,4.3,0,0,1,16.313,13.27Z"}),x("path",{d:"M7.615,13.4a.244.244,0,0,0,.061-.24A4.315,4.315,0,0,1,7.5,12,4.5,4.5,0,0,1,12,7.5a4.276,4.276,0,0,1,1.16.173.244.244,0,0,0,.24-.062l1.941-1.942a.254.254,0,0,0-.1-.421A10.413,10.413,0,0,0,12,4.75C7.7,4.692,3.4,7.7.813,10.549a2.15,2.15,0,0,0-.007,2.9,21.209,21.209,0,0,0,3.438,3.03.256.256,0,0,0,.326-.029Z"})]})});ut({d:"M11.2857,6.05714 L10.08571,4.85714 L7.85714,7.14786 L7.85714,1 L6.14286,1 L6.14286,7.14786 L3.91429,4.85714 L2.71429,6.05714 L7,10.42857 L11.2857,6.05714 Z M1,11.2857 L1,13 L13,13 L13,11.2857 L1,11.2857 Z",displayName:"DownloadIcon",viewBox:"0 0 14 14"});ut({displayName:"DeleteIcon",path:x("g",{fill:"currentColor",children:x("path",{d:"M19.452 7.5H4.547a.5.5 0 00-.5.545l1.287 14.136A2 2 0 007.326 24h9.347a2 2 0 001.992-1.819L19.95 8.045a.5.5 0 00-.129-.382.5.5 0 00-.369-.163zm-9.2 13a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zm5 0a.75.75 0 01-1.5 0v-9a.75.75 0 011.5 0zM22 4h-4.75a.25.25 0 01-.25-.25V2.5A2.5 2.5 0 0014.5 0h-5A2.5 2.5 0 007 2.5v1.25a.25.25 0 01-.25.25H2a1 1 0 000 2h20a1 1 0 000-2zM9 3.75V2.5a.5.5 0 01.5-.5h5a.5.5 0 01.5.5v1.25a.25.25 0 01-.25.25h-5.5A.25.25 0 019 3.75z"})})});ut({displayName:"RepeatIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),x("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})});ut({displayName:"RepeatClockIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),x("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})});ut({displayName:"EditIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),x("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]})});ut({d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z",displayName:"ChevronLeftIcon"});ut({d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",displayName:"ChevronRightIcon"});ut({displayName:"ChevronDownIcon",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"});ut({d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z",displayName:"ChevronUpIcon"});ut({d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z",displayName:"ArrowBackIcon"});ut({d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z",displayName:"ArrowForwardIcon"});ut({d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z",displayName:"ArrowUpIcon"});ut({viewBox:"0 0 16 16",d:"M11.891 9.992a1 1 0 1 1 1.416 1.415l-4.3 4.3a1 1 0 0 1-1.414 0l-4.3-4.3A1 1 0 0 1 4.71 9.992l3.59 3.591 3.591-3.591zm0-3.984L8.3 2.417 4.709 6.008a1 1 0 0 1-1.416-1.415l4.3-4.3a1 1 0 0 1 1.414 0l4.3 4.3a1 1 0 1 1-1.416 1.415z",displayName:"ArrowUpDownIcon"});ut({d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z",displayName:"ArrowDownIcon"});var dH=ut({displayName:"ExternalLinkIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x("path",{d:"M15 3h6v6"}),x("path",{d:"M10 14L21 3"})]})});ut({displayName:"LinkIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z"}),x("path",{d:"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z"})]})});ut({displayName:"PlusSquareIcon",path:ne("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2",children:[x("rect",{height:"18",width:"18",rx:"2",ry:"2",x:"3",y:"3"}),x("path",{d:"M12 8v8"}),x("path",{d:"M8 12h8"})]})});ut({displayName:"CalendarIcon",viewBox:"0 0 14 14",d:"M10.8889,5.5 L3.11111,5.5 L3.11111,7.05556 L10.8889,7.05556 L10.8889,5.5 Z M12.4444,1.05556 L11.6667,1.05556 L11.6667,0 L10.1111,0 L10.1111,1.05556 L3.88889,1.05556 L3.88889,0 L2.33333,0 L2.33333,1.05556 L1.55556,1.05556 C0.692222,1.05556 0.00777777,1.75556 0.00777777,2.61111 L0,12.5 C0,13.3556 0.692222,14 1.55556,14 L12.4444,14 C13.3,14 14,13.3556 14,12.5 L14,2.61111 C14,1.75556 13.3,1.05556 12.4444,1.05556 Z M12.4444,12.5 L1.55556,12.5 L1.55556,3.94444 L12.4444,3.94444 L12.4444,12.5 Z M8.55556,8.61111 L3.11111,8.61111 L3.11111,10.1667 L8.55556,10.1667 L8.55556,8.61111 Z"});ut({d:"M0.913134,0.920639 C1.49851,0.331726 2.29348,0 3.12342,0 L10.8766,0 C11.7065,0 12.5015,0.331725 13.0869,0.920639 C13.6721,1.50939 14,2.30689 14,3.13746 L14,8.12943 C13.9962,8.51443 13.9059,8.97125 13.7629,9.32852 C13.6128,9.683 13.3552,10.0709 13.0869,10.3462 C12.813,10.6163 12.4265,10.8761 12.0734,11.0274 C11.7172,11.1716 11.2607,11.263 10.8766,11.2669 L10.1234,11.2669 L10.1234,12.5676 L10.1209,12.5676 C10.1204,12.793 10.0633,13.0791 9.97807,13.262 C9.8627,13.466 9.61158,13.7198 9.40818,13.8382 L9.40824,13.8383 C9.4077,13.8386 9.40716,13.8388 9.40661,13.8391 C9.40621,13.8393 9.4058,13.8396 9.40539,13.8398 L9.40535,13.8397 C9.22958,13.9254 8.94505,13.9951 8.75059,14 L8.74789,14 C8.35724,13.9963 7.98473,13.8383 7.71035,13.5617 L5.39553,11.2669 L3.12342,11.2669 C2.29348,11.2669 1.49851,10.9352 0.913134,10.3462 C0.644826,10.0709 0.387187,9.683 0.23711,9.32852 C0.0941235,8.97125 0.00379528,8.51443 0,8.12943 L0,3.13746 C0,2.30689 0.327915,1.50939 0.913134,0.920639 Z M3.12342,1.59494 C2.71959,1.59494 2.33133,1.75628 2.04431,2.04503 C1.75713,2.33395 1.59494,2.72681 1.59494,3.13746 L1.59494,8.12943 C1.59114,8.35901 1.62114,8.51076 1.71193,8.72129 C1.79563,8.9346 1.88065,9.06264 2.04431,9.22185 C2.33133,9.5106 2.71959,9.67195 3.12342,9.67195 L5.72383,9.67195 C5.93413,9.67195 6.13592,9.75502 6.28527,9.90308 L8.52848,12.1269 L8.52848,10.4694 C8.52848,10.029 8.88552,9.67195 9.32595,9.67195 L10.8766,9.67195 C11.1034,9.67583 11.2517,9.64614 11.4599,9.55518 C11.6712,9.47132 11.7976,9.38635 11.9557,9.22185 C12.1193,9.06264 12.2044,8.9346 12.2881,8.72129 C12.3789,8.51076 12.4089,8.35901 12.4051,8.12943 L12.4051,3.13746 C12.4051,2.72681 12.2429,2.33394 11.9557,2.04503 C11.6687,1.75628 11.2804,1.59494 10.8766,1.59494 L3.12342,1.59494 Z",displayName:"ChatIcon",viewBox:"0 0 14 14"});ut({displayName:"TimeIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),x("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})});ut({displayName:"ArrowRightIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M13.584,12a2.643,2.643,0,0,1-.775,1.875L3.268,23.416a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L.768,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,13.584,12Z"}),x("path",{d:"M23.75,12a2.643,2.643,0,0,1-.775,1.875l-9.541,9.541a1.768,1.768,0,0,1-2.5-2.5l8.739-8.739a.25.25,0,0,0,0-.354L10.934,3.084a1.768,1.768,0,0,1,2.5-2.5l9.541,9.541A2.643,2.643,0,0,1,23.75,12Z"})]})});ut({displayName:"ArrowLeftIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M10.416,12a2.643,2.643,0,0,1,.775-1.875L20.732.584a1.768,1.768,0,0,1,2.5,2.5l-8.739,8.739a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5l-9.541-9.541A2.643,2.643,0,0,1,10.416,12Z"}),x("path",{d:"M.25,12a2.643,2.643,0,0,1,.775-1.875L10.566.584a1.768,1.768,0,0,1,2.5,2.5L4.327,11.823a.25.25,0,0,0,0,.354l8.739,8.739a1.768,1.768,0,0,1-2.5,2.5L1.025,13.875A2.643,2.643,0,0,1,.25,12Z"})]})});ut({displayName:"AtSignIcon",d:"M12,.5A11.634,11.634,0,0,0,.262,12,11.634,11.634,0,0,0,12,23.5a11.836,11.836,0,0,0,6.624-2,1.25,1.25,0,1,0-1.393-2.076A9.34,9.34,0,0,1,12,21a9.132,9.132,0,0,1-9.238-9A9.132,9.132,0,0,1,12,3a9.132,9.132,0,0,1,9.238,9v.891a1.943,1.943,0,0,1-3.884,0V12A5.355,5.355,0,1,0,12,17.261a5.376,5.376,0,0,0,3.861-1.634,4.438,4.438,0,0,0,7.877-2.736V12A11.634,11.634,0,0,0,12,.5Zm0,14.261A2.763,2.763,0,1,1,14.854,12,2.812,2.812,0,0,1,12,14.761Z"});ut({displayName:"AttachmentIcon",d:"M21.843,3.455a6.961,6.961,0,0,0-9.846,0L1.619,13.832a5.128,5.128,0,0,0,7.252,7.252L17.3,12.653A3.293,3.293,0,1,0,12.646,8L7.457,13.184A1,1,0,1,0,8.871,14.6L14.06,9.409a1.294,1.294,0,0,1,1.829,1.83L7.457,19.67a3.128,3.128,0,0,1-4.424-4.424L13.411,4.869a4.962,4.962,0,1,1,7.018,7.018L12.646,19.67a1,1,0,1,0,1.414,1.414L21.843,13.3a6.96,6.96,0,0,0,0-9.846Z"});ut({displayName:"UpDownIcon",viewBox:"-1 -1 9 11",d:"M 3.5 0L 3.98809 -0.569442L 3.5 -0.987808L 3.01191 -0.569442L 3.5 0ZM 3.5 9L 3.01191 9.56944L 3.5 9.98781L 3.98809 9.56944L 3.5 9ZM 0.488094 3.56944L 3.98809 0.569442L 3.01191 -0.569442L -0.488094 2.43056L 0.488094 3.56944ZM 3.01191 0.569442L 6.51191 3.56944L 7.48809 2.43056L 3.98809 -0.569442L 3.01191 0.569442ZM -0.488094 6.56944L 3.01191 9.56944L 3.98809 8.43056L 0.488094 5.43056L -0.488094 6.56944ZM 3.98809 9.56944L 7.48809 6.56944L 6.51191 5.43056L 3.01191 8.43056L 3.98809 9.56944Z"});ut({d:"M23.555,8.729a1.505,1.505,0,0,0-1.406-.98H16.062a.5.5,0,0,1-.472-.334L13.405,1.222a1.5,1.5,0,0,0-2.81,0l-.005.016L8.41,7.415a.5.5,0,0,1-.471.334H1.85A1.5,1.5,0,0,0,.887,10.4l5.184,4.3a.5.5,0,0,1,.155.543L4.048,21.774a1.5,1.5,0,0,0,2.31,1.684l5.346-3.92a.5.5,0,0,1,.591,0l5.344,3.919a1.5,1.5,0,0,0,2.312-1.683l-2.178-6.535a.5.5,0,0,1,.155-.543l5.194-4.306A1.5,1.5,0,0,0,23.555,8.729Z",displayName:"StarIcon"});ut({displayName:"EmailIcon",path:ne("g",{fill:"currentColor",children:[x("path",{d:"M11.114,14.556a1.252,1.252,0,0,0,1.768,0L22.568,4.87a.5.5,0,0,0-.281-.849A1.966,1.966,0,0,0,22,4H2a1.966,1.966,0,0,0-.289.021.5.5,0,0,0-.281.849Z"}),x("path",{d:"M23.888,5.832a.182.182,0,0,0-.2.039l-6.2,6.2a.251.251,0,0,0,0,.354l5.043,5.043a.75.75,0,1,1-1.06,1.061l-5.043-5.043a.25.25,0,0,0-.354,0l-2.129,2.129a2.75,2.75,0,0,1-3.888,0L7.926,13.488a.251.251,0,0,0-.354,0L2.529,18.531a.75.75,0,0,1-1.06-1.061l5.043-5.043a.251.251,0,0,0,0-.354l-6.2-6.2a.18.18,0,0,0-.2-.039A.182.182,0,0,0,0,6V18a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V6A.181.181,0,0,0,23.888,5.832Z"})]})});ut({d:"M2.20731,0.0127209 C2.1105,-0.0066419 1.99432,-0.00664663 1.91687,0.032079 C0.871279,0.438698 0.212942,1.92964 0.0580392,2.95587 C-0.426031,6.28627 2.20731,9.17133 4.62766,11.0689 C6.77694,12.7534 10.9012,15.5223 13.3409,12.8503 C13.6507,12.5211 14.0186,12.037 13.9993,11.553 C13.9412,10.7397 13.186,10.1588 12.6051,9.71349 C12.1598,9.38432 11.2304,8.47427 10.6495,8.49363 C10.1267,8.51299 9.79754,9.05515 9.46837,9.38432 L8.88748,9.96521 C8.79067,10.062 7.55145,9.24878 7.41591,9.15197 C6.91248,8.8228 6.4284,8.45491 6.00242,8.04829 C5.57644,7.64167 5.18919,7.19632 4.86002,6.73161 C4.7632,6.59607 3.96933,5.41495 4.04678,5.31813 C4.04678,5.31813 4.72448,4.58234 4.91811,4.2919 C5.32473,3.67229 5.63453,3.18822 5.16982,2.45243 C4.99556,2.18135 4.78257,1.96836 4.55021,1.73601 C4.14359,1.34875 3.73698,0.942131 3.27227,0.612963 C3.02055,0.419335 2.59457,0.0708094 2.20731,0.0127209 Z",displayName:"PhoneIcon",viewBox:"0 0 14 14"});ut({viewBox:"0 0 10 10",d:"M3,2 C2.44771525,2 2,1.55228475 2,1 C2,0.44771525 2.44771525,0 3,0 C3.55228475,0 4,0.44771525 4,1 C4,1.55228475 3.55228475,2 3,2 Z M3,6 C2.44771525,6 2,5.55228475 2,5 C2,4.44771525 2.44771525,4 3,4 C3.55228475,4 4,4.44771525 4,5 C4,5.55228475 3.55228475,6 3,6 Z M3,10 C2.44771525,10 2,9.55228475 2,9 C2,8.44771525 2.44771525,8 3,8 C3.55228475,8 4,8.44771525 4,9 C4,9.55228475 3.55228475,10 3,10 Z M7,2 C6.44771525,2 6,1.55228475 6,1 C6,0.44771525 6.44771525,0 7,0 C7.55228475,0 8,0.44771525 8,1 C8,1.55228475 7.55228475,2 7,2 Z M7,6 C6.44771525,6 6,5.55228475 6,5 C6,4.44771525 6.44771525,4 7,4 C7.55228475,4 8,4.44771525 8,5 C8,5.55228475 7.55228475,6 7,6 Z M7,10 C6.44771525,10 6,9.55228475 6,9 C6,8.44771525 6.44771525,8 7,8 C7.55228475,8 8,8.44771525 8,9 C8,9.55228475 7.55228475,10 7,10 Z",displayName:"DragHandleIcon"});ut({displayName:"SpinnerIcon",path:ne(Nn,{children:[x("defs",{children:ne("linearGradient",{x1:"28.154%",y1:"63.74%",x2:"74.629%",y2:"17.783%",id:"a",children:[x("stop",{stopColor:"currentColor",offset:"0%"}),x("stop",{stopColor:"#fff",stopOpacity:"0",offset:"100%"})]})}),ne("g",{transform:"translate(2)",fill:"none",children:[x("circle",{stroke:"url(#a)",strokeWidth:"4",cx:"10",cy:"12",r:"10"}),x("path",{d:"M10 2C4.477 2 0 6.477 0 12",stroke:"currentColor",strokeWidth:"4"}),x("rect",{fill:"currentColor",x:"8",width:"4",height:"4",rx:"8"})]})]})});ut({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"});ut({displayName:"SmallCloseIcon",viewBox:"0 0 16 16",path:x("path",{d:"M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z",fillRule:"evenodd",fill:"currentColor"})});ut({d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z",displayName:"NotAllowedIcon"});ut({d:"M21,5H3C2.621,5,2.275,5.214,2.105,5.553C1.937,5.892,1.973,6.297,2.2,6.6l9,12 c0.188,0.252,0.485,0.4,0.8,0.4s0.611-0.148,0.8-0.4l9-12c0.228-0.303,0.264-0.708,0.095-1.047C21.725,5.214,21.379,5,21,5z",displayName:"TriangleDownIcon"});ut({d:"M12.8,5.4c-0.377-0.504-1.223-0.504-1.6,0l-9,12c-0.228,0.303-0.264,0.708-0.095,1.047 C2.275,18.786,2.621,19,3,19h18c0.379,0,0.725-0.214,0.895-0.553c0.169-0.339,0.133-0.744-0.095-1.047L12.8,5.4z",displayName:"TriangleUpIcon"});ut({displayName:"InfoOutlineIcon",path:ne("g",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"2",children:[x("circle",{cx:"12",cy:"12",fill:"none",r:"11",stroke:"currentColor"}),x("line",{fill:"none",x1:"11.959",x2:"11.959",y1:"11",y2:"17"}),x("circle",{cx:"11.959",cy:"7",r:"1",stroke:"none"})]})});ut({displayName:"BellIcon",d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"});ut({d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm0,19a1.5,1.5,0,1,1,1.5-1.5A1.5,1.5,0,0,1,12,19Zm1.6-6.08a1,1,0,0,0-.6.917,1,1,0,1,1-2,0,3,3,0,0,1,1.8-2.75A2,2,0,1,0,10,9.255a1,1,0,1,1-2,0,4,4,0,1,1,5.6,3.666Z",displayName:"QuestionIcon"});ut({displayName:"QuestionOutlineIcon",path:ne("g",{stroke:"currentColor",strokeWidth:"1.5",children:[x("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),x("path",{fill:"none",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),x("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]})});ut({d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z",displayName:"WarningIcon"});ut({displayName:"WarningTwoIcon",d:"M23.119,20,13.772,2.15h0a2,2,0,0,0-3.543,0L.881,20a2,2,0,0,0,1.772,2.928H21.347A2,2,0,0,0,23.119,20ZM11,8.423a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Zm1.05,11.51h-.028a1.528,1.528,0,0,1-1.522-1.47,1.476,1.476,0,0,1,1.448-1.53h.028A1.527,1.527,0,0,1,13.5,18.4,1.475,1.475,0,0,1,12.05,19.933Z"});ut({viewBox:"0 0 14 14",path:x("g",{fill:"currentColor",children:x("polygon",{points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})})});ut({displayName:"MinusIcon",path:x("g",{fill:"currentColor",children:x("rect",{height:"4",width:"20",x:"2",y:"10"})})});ut({displayName:"HamburgerIcon",viewBox:"0 0 24 24",d:"M 3 5 A 1.0001 1.0001 0 1 0 3 7 L 21 7 A 1.0001 1.0001 0 1 0 21 5 L 3 5 z M 3 11 A 1.0001 1.0001 0 1 0 3 13 L 21 13 A 1.0001 1.0001 0 1 0 21 11 L 3 11 z M 3 17 A 1.0001 1.0001 0 1 0 3 19 L 21 19 A 1.0001 1.0001 0 1 0 21 17 L 3 17 z"});function ASe(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M245.09 327.74v-37.32c57.07 0 84.51 13.47 108.58 38.68 5.4 5.65 15 1.32 14.29-6.43-5.45-61.45-34.14-117.09-122.87-117.09v-37.32a8.32 8.32 0 00-14.05-6L146.58 242a8.2 8.2 0 000 11.94L231 333.71a8.32 8.32 0 0014.09-5.97z"}},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64z"}}]})(e)}const qn=({label:e,value:t,onClick:n,isLink:r,labelPosition:i})=>ne(nn,{gap:2,children:[n&&x(Oi,{label:`Recall ${e}`,children:x(Ps,{"aria-label":"Use this parameter",icon:x(ASe,{}),size:"xs",variant:"ghost",fontSize:20,onClick:n})}),ne(nn,{direction:i?"column":"row",children:[ne(Eo,{fontWeight:"semibold",whiteSpace:"pre-wrap",pr:2,children:[e,":"]}),r?ne(Gf,{href:t.toString(),isExternal:!0,wordBreak:"break-all",children:[t.toString()," ",x(dH,{mx:"2px"})]}):x(Eo,{overflowY:"scroll",wordBreak:"break-all",children:t.toString()})]})]}),LSe=(e,t)=>e.image.uuid===t.image.uuid,fH=C.exports.memo(({image:e,styleClass:t})=>{const n=Ye();mt("esc",()=>{n(dV(!1))});const r=e?.metadata?.image||{},{type:i,postprocessing:o,sampler:a,prompt:s,seed:l,variations:u,steps:h,cfg_scale:p,seamless:m,hires_fix:v,width:S,height:w,strength:E,fit:P,init_image_path:k,mask_image_path:T,orig_path:M,scale:I}=r,R=JSON.stringify(e.metadata,null,2);return x("div",{className:`image-metadata-viewer ${t}`,children:ne(nn,{gap:1,direction:"column",width:"100%",children:[ne(nn,{gap:2,children:[x(Eo,{fontWeight:"semibold",children:"File:"}),ne(Gf,{href:e.url,isExternal:!0,maxW:"calc(100% - 3rem)",children:[e.url.length>64?e.url.substring(0,64).concat("..."):e.url,x(dH,{mx:"2px"})]})]}),Object.keys(r).length>0?ne(Nn,{children:[i&&x(qn,{label:"Generation type",value:i}),e.metadata?.model_weights&&x(qn,{label:"Model",value:e.metadata.model_weights}),["esrgan","gfpgan"].includes(i)&&x(qn,{label:"Original image",value:M}),i==="gfpgan"&&E!==void 0&&x(qn,{label:"Fix faces strength",value:E,onClick:()=>n(j3(E))}),i==="esrgan"&&I!==void 0&&x(qn,{label:"Upscaling scale",value:I,onClick:()=>n(v9(I))}),i==="esrgan"&&E!==void 0&&x(qn,{label:"Upscaling strength",value:E,onClick:()=>n(y9(E))}),s&&x(qn,{label:"Prompt",labelPosition:"top",value:H3(s),onClick:()=>n(fb(s))}),l!==void 0&&x(qn,{label:"Seed",value:l,onClick:()=>n(l2(l))}),a&&x(qn,{label:"Sampler",value:a,onClick:()=>n(iV(a))}),h&&x(qn,{label:"Steps",value:h,onClick:()=>n(eV(h))}),p!==void 0&&x(qn,{label:"CFG scale",value:p,onClick:()=>n(tV(p))}),u&&u.length>0&&x(qn,{label:"Seed-weight pairs",value:r5(u),onClick:()=>n(cV(r5(u)))}),m&&x(qn,{label:"Seamless",value:m,onClick:()=>n(oV(m))}),v&&x(qn,{label:"High Resolution Optimization",value:v,onClick:()=>n(aV(v))}),S&&x(qn,{label:"Width",value:S,onClick:()=>n(rV(S))}),w&&x(qn,{label:"Height",value:w,onClick:()=>n(nV(w))}),k&&x(qn,{label:"Initial image",value:k,isLink:!0,onClick:()=>n(u2(k))}),T&&x(qn,{label:"Mask image",value:T,isLink:!0,onClick:()=>n(lV(T))}),i==="img2img"&&E&&x(qn,{label:"Image to image strength",value:E,onClick:()=>n(m9(E))}),P&&x(qn,{label:"Image to image fit",value:P,onClick:()=>n(uV(P))}),o&&o.length>0&&ne(Nn,{children:[x(Uf,{size:"sm",children:"Postprocessing"}),o.map((N,z)=>{if(N.type==="esrgan"){const{scale:$,strength:W}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Upscale (ESRGAN)`}),x(qn,{label:"Scale",value:$,onClick:()=>n(v9($))}),x(qn,{label:"Strength",value:W,onClick:()=>n(y9(W))})]},z)}else if(N.type==="gfpgan"){const{strength:$}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (GFPGAN)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(j3($)),n(Y3("gfpgan"))}})]},z)}else if(N.type==="codeformer"){const{strength:$,fidelity:W}=N;return ne(nn,{pl:"2rem",gap:1,direction:"column",children:[x(Eo,{size:"md",children:`${z+1}: Face restoration (Codeformer)`}),x(qn,{label:"Strength",value:$,onClick:()=>{n(j3($)),n(Y3("codeformer"))}}),W&&x(qn,{label:"Fidelity",value:W,onClick:()=>{n(sV(W)),n(Y3("codeformer"))}})]},z)}})]}),ne(nn,{gap:2,direction:"column",children:[ne(nn,{gap:2,children:[x(Oi,{label:"Copy metadata JSON",children:x(Ps,{"aria-label":"Copy metadata JSON",icon:x($_,{}),size:"xs",variant:"ghost",fontSize:14,onClick:()=>navigator.clipboard.writeText(R)})}),x(Eo,{fontWeight:"semibold",children:"Metadata JSON:"})]}),x("div",{className:"image-json-viewer",children:x("pre",{children:R})})]})]}):x(Bz,{width:"100%",pt:10,children:x(Eo,{fontSize:"lg",fontWeight:"semibold",children:"No metadata available"})})]})})},LSe),hH=ct([e=>e.gallery,e=>e.options],(e,t)=>{const{currentCategory:n,currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t,a=e.categories[r?r.category:"result"].images,s=a.findIndex(u=>u.uuid===e?.currentImage?.uuid),l=a.length;return{imageToDisplay:i||r,isIntermediate:Boolean(i),viewerImageToDisplay:r,currentCategory:n,isOnFirstImage:s===0,isOnLastImage:!isNaN(s)&&s===l-1,shouldShowImageDetails:o,shouldShowPrevImageButton:s===0,shouldShowNextImageButton:!isNaN(s)&&s===l-1}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function MSe(){const e=Ye(),{isOnFirstImage:t,isOnLastImage:n,shouldShowImageDetails:r,imageToDisplay:i,isIntermediate:o}=ke(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())},m=()=>{e(ad(!0))};return ne("div",{className:"current-image-preview",children:[i&&x(mS,{src:i.url,width:i.width,height:i.height,onClick:m,style:{imageRendering:o?"pixelated":"initial"}}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!t&&x(Ps,{"aria-label":"Previous image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!n&&x(Ps,{"aria-label":"Next image",icon:x(B$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),r&&i&&x(fH,{image:i,styleClass:"current-image-metadata"})]})}const OSe=ct([e=>e.gallery,e=>e.options,Rr],(e,t,n)=>{const{currentImage:r,intermediateImage:i}=e,{shouldShowImageDetails:o}=t;return{activeTabName:n,shouldShowImageDetails:o,hasAnImageToDisplay:r||i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),pH=()=>{const{hasAnImageToDisplay:e,activeTabName:t}=ke(OSe);return x("div",{className:"current-image-area","data-tab-name":t,children:e?ne(Nn,{children:[x(sH,{}),x(MSe,{})]}):x("div",{className:"current-image-display-placeholder",children:x(N4e,{})})})},ISe=()=>{const e=C.exports.useContext(X_);return x(gt,{"aria-label":"Upload Image",tooltip:"Upload Image",icon:x(W_,{}),onClick:e||void 0})};function RSe(){const e=ke(i=>i.options.initialImage),t=Ye(),n=hh(),r=()=>{n({title:"Problem loading parameters",description:"Unable to load init image.",status:"error",isClosable:!0}),t(fV())};return ne(Nn,{children:[ne("div",{className:"init-image-preview-header",children:[x("h2",{children:"Initial Image"}),x(ISe,{})]}),e&&x("div",{className:"init-image-preview",children:x(mS,{fit:"contain",maxWidth:"100%",maxHeight:"100%",src:typeof e=="string"?e:e.url,onError:r})})]})}const NSe=()=>{const e=ke(r=>r.options.initialImage),{currentImage:t}=ke(r=>r.gallery);return ne("div",{className:"workarea-split-view",children:[x("div",{className:"workarea-split-view-left",children:e?x("div",{className:"image-to-image-area",children:x(RSe,{})}):x(vSe,{})}),t&&x("div",{className:"workarea-split-view-right",children:x(pH,{})})]})};function DSe(e){return ft({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{d:"M14 1H3L2 2v11l1 1h11l1-1V2l-1-1zM8 13H3V2h5v11zm6 0H9V2h5v11z"}}]})(e)}var zSe=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Br=globalThis&&globalThis.__assign||function(){return Br=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"?void 0:Number(r),maxHeight:typeof i>"u"?void 0:Number(i),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof a>"u"?void 0:Number(a)}},USe=["as","style","className","grid","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"],eM="__resizable_base__",gH=function(e){$Se(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var i=r.parentNode;if(!i)return null;var o=r.window.document.createElement("div");return o.style.width="100%",o.style.height="100%",o.style.position="absolute",o.style.transform="scale(0, 0)",o.style.left="0",o.style.flex="0 0 100%",o.classList?o.classList.add(eM):o.className+=eM,i.appendChild(o),o},r.removeBase=function(i){var o=r.parentNode;!o||o.removeChild(i)},r.ref=function(i){i&&(r.resizable=i)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,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},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}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||HSe},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=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"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:i,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,i=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),h=u/l[s]*100;return h+"%"}return mw(n.state[s])},o=r&&typeof r.width<"u"&&!this.state.isResizing?mw(r.width):i("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?mw(r.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 n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,i=this.parentNode.style.flexWrap;i!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=i),this.removeBase(n),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 n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var i=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof i>"u"||i==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var i=this.props.boundsByDirection,o=this.state.direction,a=i&&Lp("left",o),s=i&&Lp("top",o),l,u;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(l=a?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),u=s?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,u=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=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 l&&Number.isFinite(l)&&(n=n&&n"u"?10:o.width,p=typeof i.width>"u"||i.width<0?n:i.width,m=typeof o.height>"u"?10:o.height,v=typeof i.height>"u"||i.height<0?r:i.height,S=l||0,w=u||0;if(s){var E=(m-S)*this.ratio+w,P=(v-S)*this.ratio+w,k=(h-w)/this.ratio+S,T=(p-w)/this.ratio+S,M=Math.max(h,E),I=Math.min(p,P),R=Math.max(m,k),N=Math.min(v,T);n=Wy(n,M,I),r=Wy(r,R,N)}else n=Wy(n,h,p),r=Wy(r,m,v);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left,this.targetTop=i.top}if(this.resizable){var o=this.resizable.getBoundingClientRect(),a=o.left,s=o.top,l=o.right,u=o.bottom;this.resizableLeft=a,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=u}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var i=0,o=0;if(n.nativeEvent&&WSe(n.nativeEvent)?(i=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&Vy(n.nativeEvent)&&(i=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,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,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var u=this.parentNode;if(u){var h=this.window.getComputedStyle(u).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var p={original:{x:i,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(p)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Vy(n))try{n.preventDefault(),n.stopPropagation()}catch{}var i=this.props,o=i.maxWidth,a=i.maxHeight,s=i.minWidth,l=i.minHeight,u=Vy(n)?n.touches[0].clientX:n.clientX,h=Vy(n)?n.touches[0].clientY:n.clientY,p=this.state,m=p.direction,v=p.original,S=p.width,w=p.height,E=this.getParentSize(),P=VSe(E,this.window.innerWidth,this.window.innerHeight,o,a,s,l);o=P.maxWidth,a=P.maxHeight,s=P.minWidth,l=P.minHeight;var k=this.calculateNewSizeFromDirection(u,h),T=k.newHeight,M=k.newWidth,I=this.calculateNewMaxFromBoundary(o,a);this.props.snap&&this.props.snap.x&&(M=JL(M,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(T=JL(T,this.props.snap.y,this.props.snapGap));var R=this.calculateNewSizeFromAspectRatio(M,T,{width:I.maxWidth,height:I.maxHeight},{width:s,height:l});if(M=R.newWidth,T=R.newHeight,this.props.grid){var N=QL(M,this.props.grid[0]),z=QL(T,this.props.grid[1]),$=this.props.snapGap||0;M=$===0||Math.abs(N-M)<=$?N:M,T=$===0||Math.abs(z-T)<=$?z:T}var W={width:M-v.width,height:T-v.height};if(S&&typeof S=="string"){if(S.endsWith("%")){var q=M/E.width*100;M=q+"%"}else if(S.endsWith("vw")){var de=M/this.window.innerWidth*100;M=de+"vw"}else if(S.endsWith("vh")){var H=M/this.window.innerHeight*100;M=H+"vh"}}if(w&&typeof w=="string"){if(w.endsWith("%")){var q=T/E.height*100;T=q+"%"}else if(w.endsWith("vw")){var de=T/this.window.innerWidth*100;T=de+"vw"}else if(w.endsWith("vh")){var H=T/this.window.innerHeight*100;T=H+"vh"}}var J={width:this.createSizeForCssProperty(M,"width"),height:this.createSizeForCssProperty(T,"height")};this.flexDir==="row"?J.flexBasis=J.width:this.flexDir==="column"&&(J.flexBasis=J.height),Ol.exports.flushSync(function(){r.setState(J)}),this.props.onResize&&this.props.onResize(n,m,this.resizable,W)}},t.prototype.onMouseUp=function(n){var r=this.state,i=r.isResizing,o=r.direction,a=r.original;if(!(!i||!this.resizable)){var s={width:this.size.width-a.width,height:this.size.height-a.height};this.props.onResizeStop&&this.props.onResizeStop(n,o,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:ul(ul({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,i=r.enable,o=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,u=r.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(p){return i[p]!==!1?x(FSe,{direction:p,onResizeStart:n.onResizeStart,replaceStyles:o&&o[p],className:a&&a[p],children:u&&u[p]?u[p]:null},p):null});return x("div",{className:l,style:s,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return USe.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),i=ul(ul(ul({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 ne(o,{...ul({ref:this.ref,style:i,className:this.props.className},r),children:[this.state.isResizing&&x("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],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(C.exports.PureComponent);function Yn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function r2(e,t=[]){let n=[];function r(o,a){const s=C.exports.createContext(a),l=n.length;n=[...n,a];function u(p){const{scope:m,children:v,...S}=p,w=m?.[e][l]||s,E=C.exports.useMemo(()=>S,Object.values(S));return C.exports.createElement(w.Provider,{value:E},v)}function h(p,m){const v=m?.[e][l]||s,S=C.exports.useContext(v);if(S)return S;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,h]}const i=()=>{const o=n.map(a=>C.exports.createContext(a));return function(s){const l=s?.[e]||o;return C.exports.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,GSe(i,...t)]}function GSe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return C.exports.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function jSe(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function mH(...e){return t=>e.forEach(n=>jSe(n,t))}function Wa(...e){return C.exports.useCallback(mH(...e),e)}const Lv=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e,i=C.exports.Children.toArray(n),o=i.find(qSe);if(o){const a=o.props.children,s=i.map(l=>l===o?C.exports.Children.count(a)>1?C.exports.Children.only(null):C.exports.isValidElement(a)?a.props.children:null:l);return C.exports.createElement(jC,An({},r,{ref:t}),C.exports.isValidElement(a)?C.exports.cloneElement(a,void 0,s):null)}return C.exports.createElement(jC,An({},r,{ref:t}),n)});Lv.displayName="Slot";const jC=C.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return C.exports.isValidElement(n)?C.exports.cloneElement(n,{...KSe(r,n.props),ref:mH(t,n.ref)}):C.exports.Children.count(n)>1?C.exports.Children.only(null):null});jC.displayName="SlotClone";const YSe=({children:e})=>C.exports.createElement(C.exports.Fragment,null,e);function qSe(e){return C.exports.isValidElement(e)&&e.type===YSe}function KSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const XSe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Cu=XSe.reduce((e,t)=>{const n=C.exports.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Lv:t;return C.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),C.exports.createElement(s,An({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function vH(e,t){e&&Ol.exports.flushSync(()=>e.dispatchEvent(t))}function yH(e){const t=e+"CollectionProvider",[n,r]=r2(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:S,children:w}=v,E=le.useRef(null),P=le.useRef(new Map).current;return le.createElement(i,{scope:S,itemMap:P,collectionRef:E},w)},s=e+"CollectionSlot",l=le.forwardRef((v,S)=>{const{scope:w,children:E}=v,P=o(s,w),k=Wa(S,P.collectionRef);return le.createElement(Lv,{ref:k},E)}),u=e+"CollectionItemSlot",h="data-radix-collection-item",p=le.forwardRef((v,S)=>{const{scope:w,children:E,...P}=v,k=le.useRef(null),T=Wa(S,k),M=o(u,w);return le.useEffect(()=>(M.itemMap.set(k,{ref:k,...P}),()=>void M.itemMap.delete(k))),le.createElement(Lv,{[h]:"",ref:T},E)});function m(v){const S=o(e+"CollectionConsumer",v);return le.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const P=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((M,I)=>P.indexOf(M.ref.current)-P.indexOf(I.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},m,r]}const ZSe=C.exports.createContext(void 0);function SH(e){const t=C.exports.useContext(ZSe);return e||t||"ltr"}function Al(e){const t=C.exports.useRef(e);return C.exports.useEffect(()=>{t.current=e}),C.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function QSe(e,t=globalThis?.document){const n=Al(e);C.exports.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const YC="dismissableLayer.update",JSe="dismissableLayer.pointerDownOutside",ebe="dismissableLayer.focusOutside";let tM;const tbe=C.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nbe=C.exports.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,h=C.exports.useContext(tbe),[p,m]=C.exports.useState(null),v=(n=p?.ownerDocument)!==null&&n!==void 0?n:globalThis?.document,[,S]=C.exports.useState({}),w=Wa(t,z=>m(z)),E=Array.from(h.layers),[P]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),k=E.indexOf(P),T=p?E.indexOf(p):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,I=T>=k,R=rbe(z=>{const $=z.target,W=[...h.branches].some(q=>q.contains($));!I||W||(o?.(z),s?.(z),z.defaultPrevented||l?.())},v),N=ibe(z=>{const $=z.target;[...h.branches].some(q=>q.contains($))||(a?.(z),s?.(z),z.defaultPrevented||l?.())},v);return QSe(z=>{T===h.layers.size-1&&(i?.(z),!z.defaultPrevented&&l&&(z.preventDefault(),l()))},v),C.exports.useEffect(()=>{if(!!p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(tM=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),nM(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=tM)}},[p,v,r,h]),C.exports.useEffect(()=>()=>{!p||(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),nM())},[p,h]),C.exports.useEffect(()=>{const z=()=>S({});return document.addEventListener(YC,z),()=>document.removeEventListener(YC,z)},[]),C.exports.createElement(Cu.div,An({},u,{ref:w,style:{pointerEvents:M?I?"auto":"none":void 0,...e.style},onFocusCapture:Yn(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Yn(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Yn(e.onPointerDownCapture,R.onPointerDownCapture)}))});function rbe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1),i=C.exports.useRef(()=>{});return C.exports.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){bH(JSe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ibe(e,t=globalThis?.document){const n=Al(e),r=C.exports.useRef(!1);return C.exports.useEffect(()=>{const i=o=>{o.target&&!r.current&&bH(ebe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function nM(){const e=new CustomEvent(YC);document.dispatchEvent(e)}function bH(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?vH(i,o):i.dispatchEvent(o)}let vw=0;function obe(){C.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:rM()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:rM()),vw++,()=>{vw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),vw--}},[])}function rM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const yw="focusScope.autoFocusOnMount",Sw="focusScope.autoFocusOnUnmount",iM={bubbles:!1,cancelable:!0},abe=C.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=C.exports.useState(null),u=Al(i),h=Al(o),p=C.exports.useRef(null),m=Wa(t,w=>l(w)),v=C.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.exports.useEffect(()=>{if(r){let w=function(P){if(v.paused||!s)return;const k=P.target;s.contains(k)?p.current=k:wf(p.current,{select:!0})},E=function(P){v.paused||!s||s.contains(P.relatedTarget)||wf(p.current,{select:!0})};return document.addEventListener("focusin",w),document.addEventListener("focusout",E),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",E)}}},[r,s,v.paused]),C.exports.useEffect(()=>{if(s){aM.add(v);const w=document.activeElement;if(!s.contains(w)){const P=new CustomEvent(yw,iM);s.addEventListener(yw,u),s.dispatchEvent(P),P.defaultPrevented||(sbe(fbe(xH(s)),{select:!0}),document.activeElement===w&&wf(s))}return()=>{s.removeEventListener(yw,u),setTimeout(()=>{const P=new CustomEvent(Sw,iM);s.addEventListener(Sw,h),s.dispatchEvent(P),P.defaultPrevented||wf(w??document.body,{select:!0}),s.removeEventListener(Sw,h),aM.remove(v)},0)}}},[s,u,h,v]);const S=C.exports.useCallback(w=>{if(!n&&!r||v.paused)return;const E=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,P=document.activeElement;if(E&&P){const k=w.currentTarget,[T,M]=lbe(k);T&&M?!w.shiftKey&&P===M?(w.preventDefault(),n&&wf(T,{select:!0})):w.shiftKey&&P===T&&(w.preventDefault(),n&&wf(M,{select:!0})):P===k&&w.preventDefault()}},[n,r,v.paused]);return C.exports.createElement(Cu.div,An({tabIndex:-1},a,{ref:m,onKeyDown:S}))});function sbe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wf(r,{select:t}),document.activeElement!==n)return}function lbe(e){const t=xH(e),n=oM(t,e),r=oM(t.reverse(),e);return[n,r]}function xH(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function oM(e,t){for(const n of e)if(!ube(n,{upTo:t}))return n}function ube(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function cbe(e){return e instanceof HTMLInputElement&&"select"in e}function wf(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cbe(e)&&t&&e.select()}}const aM=dbe();function dbe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=sM(e,t),e.unshift(t)},remove(t){var n;e=sM(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function sM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function fbe(e){return e.filter(t=>t.tagName!=="A")}const Y0=Boolean(globalThis?.document)?C.exports.useLayoutEffect:()=>{},hbe=Rw["useId".toString()]||(()=>{});let pbe=0;function gbe(e){const[t,n]=C.exports.useState(hbe());return Y0(()=>{e||n(r=>r??String(pbe++))},[e]),e||(t?`radix-${t}`:"")}function c1(e){return e.split("-")[0]}function KS(e){return e.split("-")[1]}function d1(e){return["top","bottom"].includes(c1(e))?"x":"y"}function J_(e){return e==="y"?"height":"width"}function lM(e,t,n){let{reference:r,floating:i}=e;const o=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,s=d1(t),l=J_(s),u=r[l]/2-i[l]/2,h=c1(t),p=s==="x";let m;switch(h){case"top":m={x:o,y:r.y-i.height};break;case"bottom":m={x:o,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:a};break;case"left":m={x:r.x-i.width,y:a};break;default:m={x:r.x,y:r.y}}switch(KS(t)){case"start":m[s]-=u*(n&&p?-1:1);break;case"end":m[s]+=u*(n&&p?-1:1);break}return m}const mbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:h}=lM(l,r,s),p=r,m={},v=0;for(let S=0;S({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(n==null)return{};const u=wH(r),h={x:i,y:o},p=d1(a),m=KS(a),v=J_(p),S=await l.getDimensions(n),w=p==="y"?"top":"left",E=p==="y"?"bottom":"right",P=s.reference[v]+s.reference[p]-h[p]-s.floating[v],k=h[p]-s.reference[p],T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(n));let M=T?p==="y"?T.clientHeight||0:T.clientWidth||0:0;M===0&&(M=s.floating[v]);const I=P/2-k/2,R=u[w],N=M-S[v]-u[E],z=M/2-S[v]/2+I,$=qC(R,z,N),de=(m==="start"?u[w]:u[E])>0&&z!==$&&s.reference[v]<=s.floating[v]?zbbe[t])}function xbe(e,t,n){n===void 0&&(n=!1);const r=KS(e),i=d1(e),o=J_(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=l5(a)),{main:a,cross:l5(a)}}const wbe={start:"end",end:"start"};function cM(e){return e.replace(/start|end/g,t=>wbe[t])}const Cbe=["top","right","bottom","left"];function _be(e){const t=l5(e);return[cM(e),t,cM(t)]}const kbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:v=!0,...S}=e,w=c1(r),P=p||(w===a||!v?[l5(a)]:_be(a)),k=[a,...P],T=await s5(t,S),M=[];let I=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&M.push(T[w]),h){const{main:$,cross:W}=xbe(r,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));M.push(T[$],T[W])}if(I=[...I,{placement:r,overflows:M}],!M.every($=>$<=0)){var R,N;const $=((R=(N=i.flip)==null?void 0:N.index)!=null?R:0)+1,W=k[$];if(W)return{data:{index:$,overflows:I},reset:{placement:W}};let q="bottom";switch(m){case"bestFit":{var z;const de=(z=I.map(H=>[H,H.overflows.filter(J=>J>0).reduce((J,re)=>J+re,0)]).sort((H,J)=>H[1]-J[1])[0])==null?void 0:z[0].placement;de&&(q=de);break}case"initialPlacement":q=a;break}if(r!==q)return{reset:{placement:q}}}return{}}}};function dM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fM(e){return Cbe.some(t=>e[t]>=0)}const Ebe=function(e){let{strategy:t="referenceHidden",...n}=e===void 0?{}:e;return{name:"hide",async fn(r){const{rects:i}=r;switch(t){case"referenceHidden":{const o=await s5(r,{...n,elementContext:"reference"}),a=dM(o,i.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:fM(a)}}}case"escaped":{const o=await s5(r,{...n,altBoundary:!0}),a=dM(o,i.floating);return{data:{escapedOffsets:a,escaped:fM(a)}}}default:return{}}}}};async function Pbe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=c1(n),s=KS(n),l=d1(n)==="x",u=["left","top"].includes(a)?-1:1,h=o&&l?-1:1,p=typeof t=="function"?t(e):t;let{mainAxis:m,crossAxis:v,alignmentAxis:S}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&typeof S=="number"&&(v=s==="end"?S*-1:S),l?{x:v*h,y:m*u}:{x:m*u,y:v*h}}const Tbe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Pbe(t,e);return{x:n+i.x,y:r+i.y,data:i}}}};function CH(e){return e==="x"?"y":"x"}const Abe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:E=>{let{x:P,y:k}=E;return{x:P,y:k}}},...l}=e,u={x:n,y:r},h=await s5(t,l),p=d1(c1(i)),m=CH(p);let v=u[p],S=u[m];if(o){const E=p==="y"?"top":"left",P=p==="y"?"bottom":"right",k=v+h[E],T=v-h[P];v=qC(k,v,T)}if(a){const E=m==="y"?"top":"left",P=m==="y"?"bottom":"right",k=S+h[E],T=S-h[P];S=qC(k,S,T)}const w=s.fn({...t,[p]:v,[m]:S});return{...w,data:{x:w.x-n,y:w.y-r}}}}},Lbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,h={x:n,y:r},p=d1(i),m=CH(p);let v=h[p],S=h[m];const w=typeof s=="function"?s({...o,placement:i}):s,E=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const I=p==="y"?"height":"width",R=o.reference[p]-o.floating[I]+E.mainAxis,N=o.reference[p]+o.reference[I]-E.mainAxis;vN&&(v=N)}if(u){var P,k,T,M;const I=p==="y"?"width":"height",R=["top","left"].includes(c1(i)),N=o.reference[m]-o.floating[I]+(R&&(P=(k=a.offset)==null?void 0:k[m])!=null?P:0)+(R?0:E.crossAxis),z=o.reference[m]+o.reference[I]+(R?0:(T=(M=a.offset)==null?void 0:M[m])!=null?T:0)-(R?E.crossAxis:0);Sz&&(S=z)}return{[p]:v,[m]:S}}}};function _H(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Au(e){if(e==null)return window;if(!_H(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function i2(e){return Au(e).getComputedStyle(e)}function _u(e){return _H(e)?"":e?(e.nodeName||"").toLowerCase():""}function kH(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Ll(e){return e instanceof Au(e).HTMLElement}function od(e){return e instanceof Au(e).Element}function Mbe(e){return e instanceof Au(e).Node}function ek(e){if(typeof ShadowRoot>"u")return!1;const t=Au(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function XS(e){const{overflow:t,overflowX:n,overflowY:r}=i2(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function Obe(e){return["table","td","th"].includes(_u(e))}function EH(e){const t=/firefox/i.test(kH()),n=i2(e);return n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].includes(n.willChange)||t&&n.willChange==="filter"||t&&(n.filter?n.filter!=="none":!1)}function PH(){return!/^((?!chrome|android).)*safari/i.test(kH())}const hM=Math.min,Fm=Math.max,u5=Math.round;function ku(e,t,n){var r,i,o,a;t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Ll(e)&&(l=e.offsetWidth>0&&u5(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&u5(s.height)/e.offsetHeight||1);const h=od(e)?Au(e):window,p=!PH()&&n,m=(s.left+(p&&(r=(i=h.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/l,v=(s.top+(p&&(o=(a=h.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,S=s.width/l,w=s.height/u;return{width:S,height:w,top:v,right:m+S,bottom:v+w,left:m,x:m,y:v}}function Sd(e){return((Mbe(e)?e.ownerDocument:e.document)||window.document).documentElement}function ZS(e){return od(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function TH(e){return ku(Sd(e)).left+ZS(e).scrollLeft}function Ibe(e){const t=ku(e);return u5(t.width)!==e.offsetWidth||u5(t.height)!==e.offsetHeight}function Rbe(e,t,n){const r=Ll(t),i=Sd(t),o=ku(e,r&&Ibe(t),n==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&n!=="fixed")if((_u(t)!=="body"||XS(i))&&(a=ZS(t)),Ll(t)){const l=ku(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=TH(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function AH(e){return _u(e)==="html"?e:e.assignedSlot||e.parentNode||(ek(e)?e.host:null)||Sd(e)}function pM(e){return!Ll(e)||getComputedStyle(e).position==="fixed"?null:e.offsetParent}function Nbe(e){let t=AH(e);for(ek(t)&&(t=t.host);Ll(t)&&!["html","body"].includes(_u(t));){if(EH(t))return t;t=t.parentNode}return null}function KC(e){const t=Au(e);let n=pM(e);for(;n&&Obe(n)&&getComputedStyle(n).position==="static";)n=pM(n);return n&&(_u(n)==="html"||_u(n)==="body"&&getComputedStyle(n).position==="static"&&!EH(n))?t:n||Nbe(e)||t}function gM(e){if(Ll(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=ku(e);return{width:t.width,height:t.height}}function Dbe(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=Ll(n),o=Sd(n);if(n===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&r!=="fixed")&&((_u(n)!=="body"||XS(o))&&(a=ZS(n)),Ll(n))){const l=ku(n,!0);s.x=l.x+n.clientLeft,s.y=l.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}}function zbe(e,t){const n=Au(e),r=Sd(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=PH();(u||!u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function Bbe(e){var t;const n=Sd(e),r=ZS(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Fm(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Fm(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let s=-r.scrollLeft+TH(e);const l=-r.scrollTop;return i2(i||n).direction==="rtl"&&(s+=Fm(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function LH(e){const t=AH(e);return["html","body","#document"].includes(_u(t))?e.ownerDocument.body:Ll(t)&&XS(t)?t:LH(t)}function c5(e,t){var n;t===void 0&&(t=[]);const r=LH(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Au(r),a=i?[o].concat(o.visualViewport||[],XS(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(c5(a))}function Fbe(e,t){const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ek(n)){let r=t;do{if(r&&e===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function $be(e,t){const n=ku(e,!1,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft;return{top:r,left:i,x:i,y:r,right:i+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}function mM(e,t,n){return t==="viewport"?a5(zbe(e,n)):od(t)?$be(t,n):a5(Bbe(Sd(e)))}function Hbe(e){const t=c5(e),r=["absolute","fixed"].includes(i2(e).position)&&Ll(e)?KC(e):e;return od(r)?t.filter(i=>od(i)&&Fbe(i,r)&&_u(i)!=="body"):[]}function Wbe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Hbe(t):[].concat(n),r],s=a[0],l=a.reduce((u,h)=>{const p=mM(t,h,i);return u.top=Fm(p.top,u.top),u.right=hM(p.right,u.right),u.bottom=hM(p.bottom,u.bottom),u.left=Fm(p.left,u.left),u},mM(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}const Vbe={getClippingRect:Wbe,convertOffsetParentRelativeRectToViewportRelativeRect:Dbe,isElement:od,getDimensions:gM,getOffsetParent:KC,getDocumentElement:Sd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Rbe(t,KC(n),r),floating:{...gM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>i2(e).direction==="rtl"};function Ube(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,u=o&&!s,h=l||u?[...od(e)?c5(e):[],...c5(t)]:[];h.forEach(w=>{l&&w.addEventListener("scroll",n,{passive:!0}),u&&w.addEventListener("resize",n)});let p=null;if(a){let w=!0;p=new ResizeObserver(()=>{w||n(),w=!1}),od(e)&&!s&&p.observe(e),p.observe(t)}let m,v=s?ku(e):null;s&&S();function S(){const w=ku(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(S)}return n(),()=>{var w;h.forEach(E=>{l&&E.removeEventListener("scroll",n),u&&E.removeEventListener("resize",n)}),(w=p)==null||w.disconnect(),p=null,s&&cancelAnimationFrame(m)}}const Gbe=(e,t,n)=>mbe(e,t,{platform:Vbe,...n});var XC=typeof document<"u"?C.exports.useLayoutEffect:C.exports.useEffect;function ZC(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 n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ZC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ZC(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function jbe(e){const t=C.exports.useRef(e);return XC(()=>{t.current=e}),t}function Ybe(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=C.exports.useRef(null),a=C.exports.useRef(null),s=jbe(i),l=C.exports.useRef(null),[u,h]=C.exports.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[p,m]=C.exports.useState(t);ZC(p?.map(T=>{let{options:M}=T;return M}),t?.map(T=>{let{options:M}=T;return M}))||m(t);const v=C.exports.useCallback(()=>{!o.current||!a.current||Gbe(o.current,a.current,{middleware:p,placement:n,strategy:r}).then(T=>{S.current&&Ol.exports.flushSync(()=>{h(T)})})},[p,n,r]);XC(()=>{S.current&&v()},[v]);const S=C.exports.useRef(!1);XC(()=>(S.current=!0,()=>{S.current=!1}),[]);const w=C.exports.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const T=s.current(o.current,a.current,v);l.current=T}else v()},[v,s]),E=C.exports.useCallback(T=>{o.current=T,w()},[w]),P=C.exports.useCallback(T=>{a.current=T,w()},[w]),k=C.exports.useMemo(()=>({reference:o,floating:a}),[]);return C.exports.useMemo(()=>({...u,update:v,refs:k,reference:E,floating:P}),[u,v,k,E,P])}const qbe=e=>{const{element:t,padding:n}=e;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return r(t)?t.current!=null?uM({element:t.current,padding:n}).fn(i):{}:t?uM({element:t,padding:n}).fn(i):{}}}};function Kbe(e){const[t,n]=C.exports.useState(void 0);return Y0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const MH="Popper",[tk,OH]=r2(MH),[Xbe,IH]=tk(MH),Zbe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=C.exports.useState(null);return C.exports.createElement(Xbe,{scope:t,anchor:r,onAnchorChange:i},n)},Qbe="PopperAnchor",Jbe=C.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=IH(Qbe,n),a=C.exports.useRef(null),s=Wa(t,a);return C.exports.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:C.exports.createElement(Cu.div,An({},i,{ref:s}))}),d5="PopperContent",[exe,ZPe]=tk(d5),[txe,nxe]=tk(d5,{hasParent:!1,positionUpdateFns:new Set}),rxe=C.exports.forwardRef((e,t)=>{var n,r,i,o,a,s,l,u;const{__scopePopper:h,side:p="bottom",sideOffset:m=0,align:v="center",alignOffset:S=0,arrowPadding:w=0,collisionBoundary:E=[],collisionPadding:P=0,sticky:k="partial",hideWhenDetached:T=!1,avoidCollisions:M=!0,...I}=e,R=IH(d5,h),[N,z]=C.exports.useState(null),$=Wa(t,Pt=>z(Pt)),[W,q]=C.exports.useState(null),de=Kbe(W),H=(n=de?.width)!==null&&n!==void 0?n:0,J=(r=de?.height)!==null&&r!==void 0?r:0,re=p+(v!=="center"?"-"+v:""),oe=typeof P=="number"?P:{top:0,right:0,bottom:0,left:0,...P},X=Array.isArray(E)?E:[E],G=X.length>0,Q={padding:oe,boundary:X.filter(oxe),altBoundary:G},{reference:j,floating:Z,strategy:me,x:Se,y:xe,placement:Fe,middlewareData:We,update:ht}=Ybe({strategy:"fixed",placement:re,whileElementsMounted:Ube,middleware:[Tbe({mainAxis:m+J,alignmentAxis:S}),M?Abe({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Lbe():void 0,...Q}):void 0,W?qbe({element:W,padding:w}):void 0,M?kbe({...Q}):void 0,axe({arrowWidth:H,arrowHeight:J}),T?Ebe({strategy:"referenceHidden"}):void 0].filter(ixe)});Y0(()=>{j(R.anchor)},[j,R.anchor]);const qe=Se!==null&&xe!==null,[rt,Ze]=RH(Fe),Xe=(i=We.arrow)===null||i===void 0?void 0:i.x,Et=(o=We.arrow)===null||o===void 0?void 0:o.y,bt=((a=We.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[Ae,it]=C.exports.useState();Y0(()=>{N&&it(window.getComputedStyle(N).zIndex)},[N]);const{hasParent:Ot,positionUpdateFns:lt}=nxe(d5,h),xt=!Ot;C.exports.useLayoutEffect(()=>{if(!xt)return lt.add(ht),()=>{lt.delete(ht)}},[xt,lt,ht]),C.exports.useLayoutEffect(()=>{xt&&qe&&Array.from(lt).reverse().forEach(Pt=>requestAnimationFrame(Pt))},[xt,qe,lt]);const _n={"data-side":rt,"data-align":Ze,...I,ref:$,style:{...I.style,animation:qe?void 0:"none",opacity:(s=We.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return C.exports.createElement("div",{ref:Z,"data-radix-popper-content-wrapper":"",style:{position:me,left:0,top:0,transform:qe?`translate3d(${Math.round(Se)}px, ${Math.round(xe)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Ae,["--radix-popper-transform-origin"]:[(l=We.transformOrigin)===null||l===void 0?void 0:l.x,(u=We.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")}},C.exports.createElement(exe,{scope:h,placedSide:rt,onArrowChange:q,arrowX:Xe,arrowY:Et,shouldHideArrow:bt},xt?C.exports.createElement(txe,{scope:h,hasParent:!0,positionUpdateFns:lt},C.exports.createElement(Cu.div,_n)):C.exports.createElement(Cu.div,_n)))});function ixe(e){return e!==void 0}function oxe(e){return e!==null}const axe=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,m=p?0:e.arrowWidth,v=p?0:e.arrowHeight,[S,w]=RH(s),E={start:"0%",center:"50%",end:"100%"}[w],P=((r=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&r!==void 0?r:0)+m/2,k=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+v/2;let T="",M="";return S==="bottom"?(T=p?E:`${P}px`,M=`${-v}px`):S==="top"?(T=p?E:`${P}px`,M=`${l.floating.height+v}px`):S==="right"?(T=`${-v}px`,M=p?E:`${k}px`):S==="left"&&(T=`${l.floating.width+v}px`,M=p?E:`${k}px`),{data:{x:T,y:M}}}});function RH(e){const[t,n="center"]=e.split("-");return[t,n]}const sxe=Zbe,lxe=Jbe,uxe=rxe;function cxe(e,t){return C.exports.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const NH=e=>{const{present:t,children:n}=e,r=dxe(t),i=typeof n=="function"?n({present:r.isPresent}):C.exports.Children.only(n),o=Wa(r.ref,i.ref);return typeof n=="function"||r.isPresent?C.exports.cloneElement(i,{ref:o}):null};NH.displayName="Presence";function dxe(e){const[t,n]=C.exports.useState(),r=C.exports.useRef({}),i=C.exports.useRef(e),o=C.exports.useRef("none"),a=e?"mounted":"unmounted",[s,l]=cxe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.exports.useEffect(()=>{const u=Gy(r.current);o.current=s==="mounted"?u:"none"},[s]),Y0(()=>{const u=r.current,h=i.current;if(h!==e){const m=o.current,v=Gy(u);e?l("MOUNT"):v==="none"||u?.display==="none"?l("UNMOUNT"):l(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Y0(()=>{if(t){const u=p=>{const v=Gy(r.current).includes(p.animationName);p.target===t&&v&&Ol.exports.flushSync(()=>l("ANIMATION_END"))},h=p=>{p.target===t&&(o.current=Gy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.exports.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Gy(e){return e?.animationName||"none"}function fxe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=hxe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Al(n),l=C.exports.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function hxe({defaultProp:e,onChange:t}){const n=C.exports.useState(e),[r]=n,i=C.exports.useRef(r),o=Al(t);return C.exports.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const bw="rovingFocusGroup.onEntryFocus",pxe={bubbles:!1,cancelable:!0},nk="RovingFocusGroup",[QC,DH,gxe]=yH(nk),[mxe,zH]=r2(nk,[gxe]),[vxe,yxe]=mxe(nk),Sxe=C.exports.forwardRef((e,t)=>C.exports.createElement(QC.Provider,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(QC.Slot,{scope:e.__scopeRovingFocusGroup},C.exports.createElement(bxe,An({},e,{ref:t}))))),bxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...h}=e,p=C.exports.useRef(null),m=Wa(t,p),v=SH(o),[S=null,w]=fxe({prop:a,defaultProp:s,onChange:l}),[E,P]=C.exports.useState(!1),k=Al(u),T=DH(n),M=C.exports.useRef(!1),[I,R]=C.exports.useState(0);return C.exports.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(bw,k),()=>N.removeEventListener(bw,k)},[k]),C.exports.createElement(vxe,{scope:n,orientation:r,dir:v,loop:i,currentTabStopId:S,onItemFocus:C.exports.useCallback(N=>w(N),[w]),onItemShiftTab:C.exports.useCallback(()=>P(!0),[]),onFocusableItemAdd:C.exports.useCallback(()=>R(N=>N+1),[]),onFocusableItemRemove:C.exports.useCallback(()=>R(N=>N-1),[])},C.exports.createElement(Cu.div,An({tabIndex:E||I===0?-1:0,"data-orientation":r},h,{ref:m,style:{outline:"none",...e.style},onMouseDown:Yn(e.onMouseDown,()=>{M.current=!0}),onFocus:Yn(e.onFocus,N=>{const z=!M.current;if(N.target===N.currentTarget&&z&&!E){const $=new CustomEvent(bw,pxe);if(N.currentTarget.dispatchEvent($),!$.defaultPrevented){const W=T().filter(re=>re.focusable),q=W.find(re=>re.active),de=W.find(re=>re.id===S),J=[q,de,...W].filter(Boolean).map(re=>re.ref.current);BH(J)}}M.current=!1}),onBlur:Yn(e.onBlur,()=>P(!1))})))}),xxe="RovingFocusGroupItem",wxe=C.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=gbe(),s=yxe(xxe,n),l=s.currentTabStopId===a,u=DH(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=s;return C.exports.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),C.exports.createElement(QC.ItemSlot,{scope:n,id:a,focusable:r,active:i},C.exports.createElement(Cu.span,An({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Yn(e.onMouseDown,m=>{r?s.onItemFocus(a):m.preventDefault()}),onFocus:Yn(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Yn(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){s.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=kxe(m,s.orientation,s.dir);if(v!==void 0){m.preventDefault();let w=u().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const E=w.indexOf(m.currentTarget);w=s.loop?Exe(w,E+1):w.slice(E+1)}setTimeout(()=>BH(w))}})})))}),Cxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _xe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function kxe(e,t,n){const r=_xe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Cxe[r]}function BH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Exe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const Pxe=Sxe,Txe=wxe,Axe=["Enter"," "],Lxe=["ArrowDown","PageUp","Home"],FH=["ArrowUp","PageDown","End"],Mxe=[...Lxe,...FH],QS="Menu",[JC,Oxe,Ixe]=yH(QS),[ph,$H]=r2(QS,[Ixe,OH,zH]),rk=OH(),HH=zH(),[Rxe,JS]=ph(QS),[Nxe,ik]=ph(QS),Dxe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=rk(t),[l,u]=C.exports.useState(null),h=C.exports.useRef(!1),p=Al(o),m=SH(i);return C.exports.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),C.exports.createElement(sxe,s,C.exports.createElement(Rxe,{scope:t,open:n,onOpenChange:p,content:l,onContentChange:u},C.exports.createElement(Nxe,{scope:t,onClose:C.exports.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:m,modal:a},r)))},zxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=rk(n);return C.exports.createElement(lxe,An({},i,r,{ref:t}))}),Bxe="MenuPortal",[QPe,Fxe]=ph(Bxe,{forceMount:void 0}),Zc="MenuContent",[$xe,WH]=ph(Zc),Hxe=C.exports.forwardRef((e,t)=>{const n=Fxe(Zc,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=JS(Zc,e.__scopeMenu),a=ik(Zc,e.__scopeMenu);return C.exports.createElement(JC.Provider,{scope:e.__scopeMenu},C.exports.createElement(NH,{present:r||o.open},C.exports.createElement(JC.Slot,{scope:e.__scopeMenu},a.modal?C.exports.createElement(Wxe,An({},i,{ref:t})):C.exports.createElement(Vxe,An({},i,{ref:t})))))}),Wxe=C.exports.forwardRef((e,t)=>{const n=JS(Zc,e.__scopeMenu),r=C.exports.useRef(null),i=Wa(t,r);return C.exports.useEffect(()=>{const o=r.current;if(o)return SB(o)},[]),C.exports.createElement(VH,An({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Yn(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),Vxe=C.exports.forwardRef((e,t)=>{const n=JS(Zc,e.__scopeMenu);return C.exports.createElement(VH,An({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),VH=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...S}=e,w=JS(Zc,n),E=ik(Zc,n),P=rk(n),k=HH(n),T=Oxe(n),[M,I]=C.exports.useState(null),R=C.exports.useRef(null),N=Wa(t,R,w.onContentChange),z=C.exports.useRef(0),$=C.exports.useRef(""),W=C.exports.useRef(0),q=C.exports.useRef(null),de=C.exports.useRef("right"),H=C.exports.useRef(0),J=v?oF:C.exports.Fragment,re=v?{as:Lv,allowPinchZoom:!0}:void 0,oe=G=>{var Q,j;const Z=$.current+G,me=T().filter(qe=>!qe.disabled),Se=document.activeElement,xe=(Q=me.find(qe=>qe.ref.current===Se))===null||Q===void 0?void 0:Q.textValue,Fe=me.map(qe=>qe.textValue),We=Qxe(Fe,Z,xe),ht=(j=me.find(qe=>qe.textValue===We))===null||j===void 0?void 0:j.ref.current;(function qe(rt){$.current=rt,window.clearTimeout(z.current),rt!==""&&(z.current=window.setTimeout(()=>qe(""),1e3))})(Z),ht&&setTimeout(()=>ht.focus())};C.exports.useEffect(()=>()=>window.clearTimeout(z.current),[]),obe();const X=C.exports.useCallback(G=>{var Q,j;return de.current===((Q=q.current)===null||Q===void 0?void 0:Q.side)&&ewe(G,(j=q.current)===null||j===void 0?void 0:j.area)},[]);return C.exports.createElement($xe,{scope:n,searchRef:$,onItemEnter:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),onItemLeave:C.exports.useCallback(G=>{var Q;X(G)||((Q=R.current)===null||Q===void 0||Q.focus(),I(null))},[X]),onTriggerLeave:C.exports.useCallback(G=>{X(G)&&G.preventDefault()},[X]),pointerGraceTimerRef:W,onPointerGraceIntentChange:C.exports.useCallback(G=>{q.current=G},[])},C.exports.createElement(J,re,C.exports.createElement(abe,{asChild:!0,trapped:i,onMountAutoFocus:Yn(o,G=>{var Q;G.preventDefault(),(Q=R.current)===null||Q===void 0||Q.focus()}),onUnmountAutoFocus:a},C.exports.createElement(nbe,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:p,onDismiss:m},C.exports.createElement(Pxe,An({asChild:!0},k,{dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:M,onCurrentTabStopIdChange:I,onEntryFocus:G=>{E.isUsingKeyboardRef.current||G.preventDefault()}}),C.exports.createElement(uxe,An({role:"menu","aria-orientation":"vertical","data-state":Kxe(w.open),"data-radix-menu-content":"",dir:E.dir},P,S,{ref:N,style:{outline:"none",...S.style},onKeyDown:Yn(S.onKeyDown,G=>{const j=G.target.closest("[data-radix-menu-content]")===G.currentTarget,Z=G.ctrlKey||G.altKey||G.metaKey,me=G.key.length===1;j&&(G.key==="Tab"&&G.preventDefault(),!Z&&me&&oe(G.key));const Se=R.current;if(G.target!==Se||!Mxe.includes(G.key))return;G.preventDefault();const Fe=T().filter(We=>!We.disabled).map(We=>We.ref.current);FH.includes(G.key)&&Fe.reverse(),Xxe(Fe)}),onBlur:Yn(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(z.current),$.current="")}),onPointerMove:Yn(e.onPointerMove,t9(G=>{const Q=G.target,j=H.current!==G.clientX;if(G.currentTarget.contains(Q)&&j){const Z=G.clientX>H.current?"right":"left";de.current=Z,H.current=G.clientX}}))})))))))}),e9="MenuItem",vM="menu.itemSelect",Uxe=C.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=C.exports.useRef(null),a=ik(e9,e.__scopeMenu),s=WH(e9,e.__scopeMenu),l=Wa(t,o),u=C.exports.useRef(!1),h=()=>{const p=o.current;if(!n&&p){const m=new CustomEvent(vM,{bubbles:!0,cancelable:!0});p.addEventListener(vM,v=>r?.(v),{once:!0}),vH(p,m),m.defaultPrevented?u.current=!1:a.onClose()}};return C.exports.createElement(Gxe,An({},i,{ref:l,disabled:n,onClick:Yn(e.onClick,h),onPointerDown:p=>{var m;(m=e.onPointerDown)===null||m===void 0||m.call(e,p),u.current=!0},onPointerUp:Yn(e.onPointerUp,p=>{var m;u.current||(m=p.currentTarget)===null||m===void 0||m.click()}),onKeyDown:Yn(e.onKeyDown,p=>{const m=s.searchRef.current!=="";n||m&&p.key===" "||Axe.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),Gxe=C.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=WH(e9,n),s=HH(n),l=C.exports.useRef(null),u=Wa(t,l),[h,p]=C.exports.useState(!1),[m,v]=C.exports.useState("");return C.exports.useEffect(()=>{const S=l.current;if(S){var w;v(((w=S.textContent)!==null&&w!==void 0?w:"").trim())}},[o.children]),C.exports.createElement(JC.ItemSlot,{scope:n,disabled:r,textValue:i??m},C.exports.createElement(Txe,An({asChild:!0},s,{focusable:!r}),C.exports.createElement(Cu.div,An({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:u,onPointerMove:Yn(e.onPointerMove,t9(S=>{r?a.onItemLeave(S):(a.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus())})),onPointerLeave:Yn(e.onPointerLeave,t9(S=>a.onItemLeave(S))),onFocus:Yn(e.onFocus,()=>p(!0)),onBlur:Yn(e.onBlur,()=>p(!1))}))))}),jxe="MenuRadioGroup";ph(jxe,{value:void 0,onValueChange:()=>{}});const Yxe="MenuItemIndicator";ph(Yxe,{checked:!1});const qxe="MenuSub";ph(qxe);function Kxe(e){return e?"open":"closed"}function Xxe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Zxe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Qxe(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=Zxe(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Jxe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=h>r&&n<(u-s)*(r-l)/(h-l)+s&&(i=!i)}return i}function ewe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Jxe(n,t)}function t9(e){return t=>t.pointerType==="mouse"?e(t):void 0}const twe=Dxe,nwe=zxe,rwe=Hxe,iwe=Uxe,UH="ContextMenu",[owe,JPe]=r2(UH,[$H]),eb=$H(),[awe,GH]=owe(UH),swe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=C.exports.useState(!1),l=eb(t),u=Al(r),h=C.exports.useCallback(p=>{s(p),u(p)},[u]);return C.exports.createElement(awe,{scope:t,open:a,onOpenChange:h,modal:o},C.exports.createElement(twe,An({},l,{dir:i,open:a,onOpenChange:h,modal:o}),n))},lwe="ContextMenuTrigger",uwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(lwe,n),o=eb(n),a=C.exports.useRef({x:0,y:0}),s=C.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=C.exports.useRef(0),u=C.exports.useCallback(()=>window.clearTimeout(l.current),[]),h=p=>{a.current={x:p.clientX,y:p.clientY},i.onOpenChange(!0)};return C.exports.useEffect(()=>u,[u]),C.exports.createElement(C.exports.Fragment,null,C.exports.createElement(nwe,An({},o,{virtualRef:s})),C.exports.createElement(Cu.span,An({"data-state":i.open?"open":"closed"},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Yn(e.onContextMenu,p=>{u(),h(p),p.preventDefault()}),onPointerDown:Yn(e.onPointerDown,jy(p=>{u(),l.current=window.setTimeout(()=>h(p),700)})),onPointerMove:Yn(e.onPointerMove,jy(u)),onPointerCancel:Yn(e.onPointerCancel,jy(u)),onPointerUp:Yn(e.onPointerUp,jy(u))})))}),cwe="ContextMenuContent",dwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=GH(cwe,n),o=eb(n),a=C.exports.useRef(!1);return C.exports.createElement(rwe,An({},o,r,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&!i.modal&&(a.current=!0)},style:{...e.style,["--radix-context-menu-content-transform-origin"]:"var(--radix-popper-transform-origin)"}}))}),fwe=C.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=eb(n);return C.exports.createElement(iwe,An({},i,r,{ref:t}))});function jy(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const hwe=swe,pwe=uwe,gwe=dwe,pf=fwe,mwe=ct([e=>e.gallery,e=>e.options,yd,Rr],(e,t,n,r)=>{const{categories:i,currentCategory:o,currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,galleryWidth:S}=e,{isLightBoxOpen:w}=t;return{currentImageUuid:a,shouldPinGallery:s,shouldShowGallery:l,galleryScrollPosition:u,galleryImageMinimumWidth:h,galleryImageObjectFit:p,galleryGridTemplateColumns:`repeat(auto-fill, minmax(${h}px, auto))`,activeTabName:r,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,images:i[o].images,areMoreImagesAvailable:i[o].areMoreImagesAvailable,currentCategory:o,galleryWidth:S,isLightBoxOpen:w,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),vwe=ct([e=>e.options,e=>e.gallery,e=>e.system,Rr],(e,t,n,r)=>({mayDeleteImage:n.isConnected&&!n.isProcessing,galleryImageObjectFit:t.galleryImageObjectFit,galleryImageMinimumWidth:t.galleryImageMinimumWidth,activeTabName:r,isLightBoxOpen:e.isLightBoxOpen}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),ywe=(e,t)=>e.image.uuid===t.image.uuid&&e.isSelected===t.isSelected,Swe=C.exports.memo(e=>{const t=Ye(),{activeTabName:n,galleryImageObjectFit:r,galleryImageMinimumWidth:i,mayDeleteImage:o,isLightBoxOpen:a}=ke(vwe),{image:s,isSelected:l}=e,{url:u,thumbnail:h,uuid:p,metadata:m}=s,[v,S]=C.exports.useState(!1),w=hh(),E=()=>S(!0),P=()=>S(!1),k=()=>{s.metadata&&t(fb(s.metadata.image.prompt)),w({title:"Prompt Set",status:"success",duration:2500,isClosable:!0})},T=()=>{s.metadata&&t(l2(s.metadata.image.seed)),w({title:"Seed Set",status:"success",duration:2500,isClosable:!0})},M=()=>{a&&t(ad(!1)),t(u2(s)),n!=="img2img"&&t(na("img2img")),w({title:"Sent to Image To Image",status:"success",duration:2500,isClosable:!0})},I=()=>{a&&t(ad(!1)),t(q_(s)),t(tH()),n!=="unifiedCanvas"&&t(na("unifiedCanvas")),w({title:"Sent to Unified Canvas",status:"success",duration:2500,isClosable:!0})},R=()=>{m&&t(K_e(m)),w({title:"Parameters Set",status:"success",duration:2500,isClosable:!0})},N=async()=>{if(m?.image?.init_image_path&&(await fetch(m.image.init_image_path)).ok){t(na("img2img")),t(X_e(m)),w({title:"Initial Image Set",status:"success",duration:2500,isClosable:!0});return}w({title:"Initial Image Not Set",description:"Could not load initial image.",status:"error",duration:2500,isClosable:!0})};return ne(hwe,{onOpenChange:$=>{t(cH($))},children:[x(pwe,{children:ne(hd,{position:"relative",className:"hoverable-image",onMouseOver:E,onMouseOut:P,children:[x(mS,{className:"hoverable-image-image",objectFit:r,rounded:"md",src:h||u,loading:"lazy"}),x("div",{className:"hoverable-image-content",onClick:()=>t(xSe(s)),children:l&&x(ga,{width:"50%",height:"50%",as:F_,className:"hoverable-image-check"})}),v&&i>=64&&x("div",{className:"hoverable-image-delete-button",children:x(Oi,{label:"Delete image",hasArrow:!0,children:x(GC,{image:s,children:x(Ps,{"aria-label":"Delete image",icon:x(m5e,{}),size:"xs",variant:"imageHoverIconButton",fontSize:14,isDisabled:!o})})})})]},p)}),ne(gwe,{className:"hoverable-image-context-menu",sticky:"always",onInteractOutside:$=>{$.detail.originalEvent.preventDefault()},children:[x(pf,{onClickCapture:k,disabled:s?.metadata?.image?.prompt===void 0,children:"Use Prompt"}),x(pf,{onClickCapture:T,disabled:s?.metadata?.image?.seed===void 0,children:"Use Seed"}),x(pf,{onClickCapture:R,disabled:!["txt2img","img2img"].includes(s?.metadata?.image?.type),children:"Use All Parameters"}),x(Oi,{label:"Load initial image used for this generation",children:x(pf,{onClickCapture:N,disabled:s?.metadata?.image?.type!=="img2img",children:"Use Initial Image"})}),x(pf,{onClickCapture:M,children:"Send to Image To Image"}),x(pf,{onClickCapture:I,children:"Send to Unified Canvas"}),x(GC,{image:s,children:x(pf,{"data-warning":!0,children:"Delete Image"})})]})]})},ywe),bwe=320;function jH(){const e=Ye(),t=hh(),{images:n,currentCategory:r,currentImageUuid:i,shouldPinGallery:o,shouldShowGallery:a,galleryScrollPosition:s,galleryImageMinimumWidth:l,galleryGridTemplateColumns:u,activeTabName:h,galleryImageObjectFit:p,shouldHoldGalleryOpen:m,shouldAutoSwitchToNewImages:v,areMoreImagesAvailable:S,galleryWidth:w,isLightBoxOpen:E,isStaging:P}=ke(mwe),[k,T]=C.exports.useState(300),[M,I]=C.exports.useState(590),[R,N]=C.exports.useState(w>=bwe);C.exports.useLayoutEffect(()=>{if(!!o){if(E){e(Fg(400)),T(400),I(400);return}h==="unifiedCanvas"?(e(Fg(190)),T(190),I(190)):h==="img2img"?(e(Fg(Math.min(Math.max(Number(w),0),490))),I(490)):(e(Fg(Math.min(Math.max(Number(w),0),590))),I(590))}},[e,h,o,w,E]),C.exports.useLayoutEffect(()=>{o||I(window.innerWidth)},[o,E]);const z=C.exports.useRef(null),$=C.exports.useRef(null),W=C.exports.useRef(null),q=()=>{e(_Se(!o)),e(io(!0))},de=()=>{a?J():H()},H=()=>{e(k0(!0)),o&&e(io(!0))},J=C.exports.useCallback(()=>{e(k0(!1)),e(cH(!1)),e(kSe($.current?$.current.scrollTop:0))},[e]),re=()=>{e(VC(r))},oe=j=>{e(Ap(j)),e(io(!0))},X=()=>{m||(W.current=window.setTimeout(()=>J(),500))},G=()=>{W.current&&window.clearTimeout(W.current)};mt("g",()=>{de()},[a,o]),mt("left",()=>{e(Q_())},{enabled:!P},[P]),mt("right",()=>{e(Z_())},{enabled:!P},[P]),mt("shift+g",()=>{q()},[o]),mt("esc",()=>{e(k0(!1))},{enabled:()=>!o,preventDefault:!0},[o]);const Q=32;return mt("shift+up",()=>{if(!(l>=256)&&l<256){const j=l+Q;j<=256?(e(Ap(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Ap(256)),t({title:"Gallery Thumbnail Size set to 256",status:"success",duration:1e3,isClosable:!0}))}},[l]),mt("shift+down",()=>{if(!(l<=32)&&l>32){const j=l-Q;j>32?(e(Ap(j)),t({title:`Gallery Thumbnail Size set to ${j}`,status:"success",duration:1e3,isClosable:!0})):(e(Ap(32)),t({title:"Gallery Thumbnail Size set to 32",status:"success",duration:1e3,isClosable:!0}))}},[l]),C.exports.useEffect(()=>{!$.current||($.current.scrollTop=s)},[s,a]),C.exports.useEffect(()=>{N(w>=280)},[w]),C.exports.useEffect(()=>{function j(Z){z.current&&!z.current.contains(Z.target)&&J()}return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[J]),x(Z$,{nodeRef:z,in:a||m,unmountOnExit:!0,timeout:200,classNames:"image-gallery-wrapper",children:x("div",{className:"image-gallery-wrapper",style:{zIndex:o?1:100},"data-pinned":o,ref:z,onMouseLeave:o?void 0:X,onMouseEnter:o?void 0:G,onMouseOver:o?void 0:G,children:ne(gH,{minWidth:k,maxWidth:M,className:"image-gallery-popup",handleStyles:{left:{width:"15px"}},enable:{top:!1,right:!1,bottom:!1,left:!0,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},size:{width:w,height:o?"100%":"100vh"},onResizeStop:(j,Z,me,Se)=>{e(Fg(st.clamp(Number(w)+Se.width,0,Number(M)))),me.removeAttribute("data-resize-alert")},onResize:(j,Z,me,Se)=>{const xe=st.clamp(Number(w)+Se.width,0,Number(M));xe>=280&&!R?N(!0):xe<280&&R&&N(!1),xe>=M?me.setAttribute("data-resize-alert","true"):me.removeAttribute("data-resize-alert")},children:[ne("div",{className:"image-gallery-header",children:[x(Ia,{size:"sm",isAttached:!0,variant:"solid",className:"image-gallery-category-btn-group",children:R?ne(Nn,{children:[x(Da,{"data-selected":r==="result",onClick:()=>e($y("result")),children:"Invocations"}),x(Da,{"data-selected":r==="user",onClick:()=>e($y("user")),children:"User"})]}):ne(Nn,{children:[x(gt,{"aria-label":"Show Invocations",tooltip:"Show Invocations","data-selected":r==="result",icon:x(t5e,{}),onClick:()=>e($y("result"))}),x(gt,{"aria-label":"Show Uploads",tooltip:"Show Uploads","data-selected":r==="user",icon:x(y5e,{}),onClick:()=>e($y("user"))})]})}),ne("div",{className:"image-gallery-header-right-icons",children:[x(pu,{isLazy:!0,trigger:"hover",placement:"left",triggerComponent:x(gt,{size:"sm","aria-label":"Gallery Settings",icon:x(V_,{}),className:"image-gallery-icon-btn",cursor:"pointer"}),children:ne("div",{className:"image-gallery-settings-popover",children:[ne("div",{children:[x(n2,{value:l,onChange:oe,min:32,max:256,label:"Image Size"}),x(gt,{size:"sm","aria-label":"Reset",tooltip:"Reset Size",onClick:()=>e(Ap(64)),icon:x(A_,{}),"data-selected":o,styleClass:"image-gallery-icon-btn"})]}),x("div",{children:x(ta,{label:"Maintain Aspect Ratio",isChecked:p==="contain",onChange:()=>e(ESe(p==="contain"?"cover":"contain"))})}),x("div",{children:x(ta,{label:"Auto-Switch to New Images",isChecked:v,onChange:j=>e(PSe(j.target.checked))})})]})}),x(gt,{size:"sm",className:"image-gallery-icon-btn","aria-label":"Pin Gallery",tooltip:"Pin Gallery (Shift+G)",onClick:q,icon:o?x(Y$,{}):x(q$,{})})]})]}),x("div",{className:"image-gallery-container",ref:$,children:n.length||S?ne(Nn,{children:[x("div",{className:"image-gallery",style:{gridTemplateColumns:u},children:n.map(j=>{const{uuid:Z}=j;return x(Swe,{image:j,isSelected:i===Z},Z)})}),x(Da,{onClick:re,isDisabled:!S,className:"image-gallery-load-more-btn",children:S?"Load More":"All Images Loaded"})]}):ne("div",{className:"image-gallery-container-placeholder",children:[x(D$,{}),x("p",{children:"No Images In Gallery"})]})})]})})})}const xwe=ct([e=>e.options,Rr],(e,t)=>{const{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i}=e;return{showDualDisplay:n,shouldPinOptionsPanel:r,isLightBoxOpen:i,shouldShowDualDisplayButton:["inpainting"].includes(t)}}),ok=e=>{const t=Ye(),{optionsPanel:n,children:r,styleClass:i}=e,{showDualDisplay:o,isLightBoxOpen:a,shouldShowDualDisplayButton:s}=ke(xwe),l=()=>{t(Z_e(!o)),t(io(!0))};return x("div",{className:i?`workarea-wrapper ${i}`:"workarea-wrapper",children:ne("div",{className:"workarea-main",children:[n,ne("div",{className:"workarea-children-wrapper",children:[r,s&&x(Oi,{label:"Toggle Split View",children:x("div",{className:"workarea-split-button","data-selected":o,onClick:l,children:x(DSe,{})})})]}),!a&&x(jH,{})]})})};function wwe(){return x(ok,{optionsPanel:x(mSe,{}),children:x(NSe,{})})}function Cwe(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})},other:{header:x(L$,{}),feature:to.OTHER,options:x(M$,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(N_,{}),e?x(B_,{accordionInfo:t}):null]})}const _we=()=>x("div",{className:"workarea-single-view",children:x("div",{className:"text-to-image-area",children:x(pH,{})})});function kwe(){return x(ok,{optionsPanel:x(Cwe,{}),children:x(_we,{})})}var n9=function(e,t){return n9=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},n9(e,t)};function Ewe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n9(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var El=function(){return El=Object.assign||function(t){for(var n,r=1,i=arguments.length;r=n?(r(o),e.animation=null):e.animation&&(r(u),requestAnimationFrame(e.animation))},requestAnimationFrame(e.animation)}}function bd(e,t,n,r){var i=Wwe(t);if(!(!e.mounted||!i)){var o=e.setTransformState,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=t.scale-s,p=t.positionX-l,m=t.positionY-u;n===0?o(t.scale,t.positionX,t.positionY):KH(e,r,n,function(v){var S=s+h*v,w=l+p*v,E=u+m*v;o(S,w,E)})}}function Wwe(e){var t=e.scale,n=e.positionX,r=e.positionY;return!(isNaN(t)||isNaN(n)||isNaN(r))}function Vwe(e,t,n){var r=e.offsetWidth,i=e.offsetHeight,o=t.offsetWidth,a=t.offsetHeight,s=o*n,l=a*n,u=r-s,h=i-l;return{wrapperWidth:r,wrapperHeight:i,newContentWidth:s,newDiffWidth:u,newContentHeight:l,newDiffHeight:h}}var Uwe=function(e,t,n,r,i,o,a){var s=e>t?n*(a?1:.5):0,l=r>i?o*(a?1:.5):0,u=e-t-s,h=s,p=r-i-l,m=l;return{minPositionX:u,maxPositionX:h,minPositionY:p,maxPositionY:m}},ak=function(e,t){var n=e.wrapperComponent,r=e.contentComponent,i=e.setup.centerZoomedOut;if(!n||!r)throw new Error("Components are not mounted");var o=Vwe(n,r,t),a=o.wrapperWidth,s=o.wrapperHeight,l=o.newContentWidth,u=o.newDiffWidth,h=o.newContentHeight,p=o.newDiffHeight,m=Uwe(a,l,u,s,h,p,Boolean(i));return m},q0=function(e,t){var n=ak(e,t);return e.bounds=n,n};function tb(e,t,n,r,i,o,a){var s=n.minPositionX,l=n.minPositionY,u=n.maxPositionX,h=n.maxPositionY,p=0,m=0;a&&(p=i,m=o);var v=r9(e,s-p,u+p,r),S=r9(t,l-m,h+m,r);return{x:v,y:S}}var r9=function(e,t,n,r){return r?en?Ra(n,2):Ra(e,2):Ra(e,2)};function nb(e,t,n,r,i,o){var a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY,h=r-s;if(typeof t!="number"||typeof n!="number")return console.error("Mouse X and Y position were not provided!"),{x:l,y:u};var p=l-t*h,m=u-n*h,v=tb(p,m,i,o,0,0,null);return v}function o2(e,t,n,r,i){var o=i?r:0,a=t-o;return!isNaN(n)&&e>=n?n:!isNaN(t)&&e<=a?a:e}var SM=function(e,t){var n=e.setup.panning.excluded,r=e.isInitialized,i=e.wrapperComponent,o=t.target,a=i?.contains(o),s=r&&o&&a;if(!s)return!1;var l=rb(o,n);return!l},bM=function(e){var t=e.isInitialized,n=e.isPanning,r=e.setup,i=r.panning.disabled,o=t&&n&&!i;return!!o},Gwe=function(e,t){var n=e.transformState,r=n.positionX,i=n.positionY;e.isPanning=!0;var o=t.clientX,a=t.clientY;e.startCoords={x:o-r,y:a-i}},jwe=function(e,t){var n=t.touches,r=e.transformState,i=r.positionX,o=r.positionY;e.isPanning=!0;var a=n.length===1;if(a){var s=n[0].clientX,l=n[0].clientY;e.startCoords={x:s-i,y:l-o}}};function Ywe(e){var t=e.transformState,n=t.positionX,r=t.positionY,i=t.scale,o=e.setup,a=o.disabled,s=o.limitToBounds,l=o.centerZoomedOut,u=e.wrapperComponent;if(!(a||!u||!e.bounds)){var h=e.bounds,p=h.maxPositionX,m=h.minPositionX,v=h.maxPositionY,S=h.minPositionY,w=n>p||nv||rp?u.offsetWidth:e.setup.minPositionX||0,k=r>v?u.offsetHeight:e.setup.minPositionY||0,T=nb(e,P,k,i,e.bounds,s||l),M=T.x,I=T.y;return{scale:i,positionX:w?M:n,positionY:E?I:r}}}function qwe(e,t,n,r,i){var o=e.setup.limitToBounds,a=e.wrapperComponent,s=e.bounds,l=e.transformState,u=l.scale,h=l.positionX,p=l.positionY,m=t!==h,v=n!==p,S=!m||!v;if(!(!a||S||!s)){var w=tb(t,n,s,o,r,i,a),E=w.x,P=w.y;e.setTransformState(u,E,P)}}var Kwe=function(e,t,n){var r=e.startCoords,i=e.transformState,o=e.setup.panning,a=o.lockAxisX,s=o.lockAxisY,l=i.positionX,u=i.positionY;if(!r)return{x:l,y:u};var h=t-r.x,p=n-r.y,m=a?l:h,v=s?u:p;return{x:m,y:v}},f5=function(e,t){var n=e.setup,r=e.transformState,i=r.scale,o=n.minScale;return t>0&&i>=o?t:0},Xwe=function(e){var t=e.mounted,n=e.setup,r=n.disabled,i=n.velocityAnimation,o=e.transformState.scale,a=i.disabled,s=!a||o>1||!r||t;return!!s},Zwe=function(e){var t=e.mounted,n=e.velocity,r=e.bounds,i=e.setup,o=i.disabled,a=i.velocityAnimation,s=e.transformState.scale,l=a.disabled,u=!l||s>1||!o||t;return!(!u||!n||!r)};function Qwe(e,t){var n=e.setup.velocityAnimation,r=n.equalToMove,i=n.animationTime,o=n.sensitivity;return r?i*t*o:i}function xM(e,t,n,r,i,o,a,s,l,u){if(i){if(t>a&&n>a){var h=a+(e-a)*u;return h>l?l:ho?o:h}}return r?t:r9(e,o,a,i)}function Jwe(e,t){var n=1;return t?Math.min(n,e.offsetWidth/window.innerWidth):n}function e6e(e,t){var n=Xwe(e);if(!!n){var r=e.lastMousePosition,i=e.velocityTime,o=e.setup,a=e.wrapperComponent,s=o.velocityAnimation.equalToMove,l=Date.now();if(r&&i&&a){var u=Jwe(a,s),h=t.x-r.x,p=t.y-r.y,m=h/u,v=p/u,S=l-i,w=h*h+p*p,E=Math.sqrt(w)/S;e.velocity={velocityX:m,velocityY:v,total:E}}e.lastMousePosition=t,e.velocityTime=l}}function t6e(e){var t=e.velocity,n=e.bounds,r=e.setup,i=e.wrapperComponent,o=Zwe(e);if(!(!o||!t||!n||!i)){var a=t.velocityX,s=t.velocityY,l=t.total,u=n.maxPositionX,h=n.minPositionX,p=n.maxPositionY,m=n.minPositionY,v=r.limitToBounds,S=r.alignmentAnimation,w=r.zoomAnimation,E=r.panning,P=E.lockAxisY,k=E.lockAxisX,T=w.animationType,M=S.sizeX,I=S.sizeY,R=S.velocityAlignmentTime,N=R,z=Qwe(e,l),$=Math.max(z,N),W=f5(e,M),q=f5(e,I),de=W*i.offsetWidth/100,H=q*i.offsetHeight/100,J=u+de,re=h-de,oe=p+H,X=m-H,G=e.transformState,Q=new Date().getTime();KH(e,T,$,function(j){var Z=e.transformState,me=Z.scale,Se=Z.positionX,xe=Z.positionY,Fe=new Date().getTime()-Q,We=Fe/N,ht=YH[S.animationType],qe=1-ht(Math.min(1,We)),rt=1-j,Ze=Se+a*rt,Xe=xe+s*rt,Et=xM(Ze,G.positionX,Se,k,v,h,u,re,J,qe),bt=xM(Xe,G.positionY,xe,P,v,m,p,X,oe,qe);(Se!==Ze||xe!==Xe)&&e.setTransformState(me,Et,bt)})}}function wM(e,t){var n=e.transformState.scale;ml(e),q0(e,n),t.touches?jwe(e,t):Gwe(e,t)}function CM(e,t,n){var r=e.startCoords,i=e.setup,o=i.alignmentAnimation,a=o.sizeX,s=o.sizeY;if(!!r){var l=Kwe(e,t,n),u=l.x,h=l.y,p=f5(e,a),m=f5(e,s);e6e(e,{x:u,y:h}),qwe(e,u,h,p,m)}}function n6e(e){if(e.isPanning){var t=e.setup.panning.velocityDisabled,n=e.velocity,r=e.wrapperComponent,i=e.contentComponent;e.isPanning=!1,e.animate=!1,e.animation=null;var o=r?.getBoundingClientRect(),a=i?.getBoundingClientRect(),s=o?.width||0,l=o?.height||0,u=a?.width||0,h=a?.height||0,p=s.1&&p;m?t6e(e):XH(e)}}function XH(e){var t=e.transformState.scale,n=e.setup,r=n.minScale,i=n.alignmentAnimation,o=i.disabled,a=i.sizeX,s=i.sizeY,l=i.animationTime,u=i.animationType,h=o||t=a;if((r>=1||s)&&XH(e),!(m||!i||!e.mounted)){var v=t||i.offsetWidth/2,S=n||i.offsetHeight/2,w=sk(e,a,v,S);w&&bd(e,w,h,p)}}function sk(e,t,n,r){var i=e.setup,o=i.minScale,a=i.maxScale,s=i.limitToBounds,l=o2(Ra(t,2),o,a,0,!1),u=q0(e,l),h=nb(e,n,r,l,u,s),p=h.x,m=h.y;return{scale:l,positionX:p,positionY:m}}var Jp={previousScale:1,scale:1,positionX:0,positionY:0},r6e=El(El({},Jp),{setComponents:function(){},contextInstance:null}),$g={disabled:!1,minPositionX:null,maxPositionX:null,minPositionY:null,maxPositionY:null,minScale:1,maxScale:8,limitToBounds:!0,centerZoomedOut:!1,centerOnInit:!1,wheel:{step:.2,disabled:!1,wheelDisabled:!1,touchPadDisabled:!1,activationKeys:[],excluded:[]},panning:{disabled:!1,velocityDisabled:!1,lockAxisX:!1,lockAxisY:!1,activationKeys:[],excluded:[]},pinch:{step:5,disabled:!1,excluded:[]},doubleClick:{disabled:!1,step:.7,mode:"zoomIn",animationType:"easeOut",animationTime:200,excluded:[]},zoomAnimation:{disabled:!1,size:.4,animationTime:200,animationType:"easeOut"},alignmentAnimation:{disabled:!1,sizeX:100,sizeY:100,animationTime:200,velocityAlignmentTime:400,animationType:"easeOut"},velocityAnimation:{disabled:!1,sensitivity:1,animationTime:400,animationType:"easeOut",equalToMove:!0}},QH=function(e){var t,n,r,i;return{previousScale:(t=e.initialScale)!==null&&t!==void 0?t:Jp.scale,scale:(n=e.initialScale)!==null&&n!==void 0?n:Jp.scale,positionX:(r=e.initialPositionX)!==null&&r!==void 0?r:Jp.positionX,positionY:(i=e.initialPositionY)!==null&&i!==void 0?i:Jp.positionY}},_M=function(e){var t=El({},$g);return Object.keys(e).forEach(function(n){var r=typeof e[n]<"u",i=typeof $g[n]<"u";if(i&&r){var o=Object.prototype.toString.call($g[n]),a=o==="[object Object]",s=o==="[object Array]";a?t[n]=El(El({},$g[n]),e[n]):s?t[n]=yM(yM([],$g[n]),e[n]):t[n]=e[n]}}),t},JH=function(e,t,n){var r=e.transformState.scale,i=e.wrapperComponent,o=e.setup,a=o.maxScale,s=o.minScale,l=o.zoomAnimation,u=l.size;if(!i)throw new Error("Wrapper is not mounted");var h=r*Math.exp(t*n),p=o2(Ra(h,3),s,a,u,!1);return p};function eW(e,t,n,r,i){var o=e.wrapperComponent,a=e.transformState,s=a.scale,l=a.positionX,u=a.positionY;if(!o)return console.error("No WrapperComponent found");var h=o.offsetWidth,p=o.offsetHeight,m=(h/2-l)/s,v=(p/2-u)/s,S=JH(e,t,n),w=sk(e,S,m,v);if(!w)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,w,r,i)}function tW(e,t,n){var r=e.setup,i=e.wrapperComponent,o=r.limitToBounds,a=QH(e.props),s=e.transformState,l=s.scale,u=s.positionX,h=s.positionY;if(!!i){var p=ak(e,a.scale),m=tb(a.positionX,a.positionY,p,o,0,0,i),v={scale:a.scale,positionX:m.x,positionY:m.y};l===a.scale&&u===a.positionX&&h===a.positionY||bd(e,v,t,n)}}function i6e(e,t,n){var r=e.wrapperComponent,i=e.setup,o=i.limitToBounds,a=i.minScale,s=i.maxScale;if(!r)return Jp;var l=r.getBoundingClientRect(),u=o6e(t),h=u.x,p=u.y,m=t.offsetWidth,v=t.offsetHeight,S=r.offsetWidth/m,w=r.offsetHeight/v,E=o2(n||Math.min(S,w),a,s,0,!1),P=(l.width-m*E)/2,k=(l.height-v*E)/2,T=(l.left-h)*E+P,M=(l.top-p)*E+k,I=ak(e,E),R=tb(T,M,I,o,0,0,r),N=R.x,z=R.y;return{positionX:N,positionY:z,scale:E}}function o6e(e){for(var t=e,n=0,r=0;t;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;return{x:n,y:r}}function a6e(e){if(e){if(e?.offsetWidth===void 0||e?.offsetHeight===void 0)return console.error("Zoom node is not valid - it must contain offsetWidth and offsetHeight"),!1}else return console.error("Zoom node not found"),!1;return!0}var s6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,1,t,n,r)}},l6e=function(e){return function(t,n,r){t===void 0&&(t=.5),n===void 0&&(n=300),r===void 0&&(r="easeOut"),eW(e,-1,t,n,r)}},u6e=function(e){return function(t,n,r,i,o){i===void 0&&(i=300),o===void 0&&(o="easeOut");var a=e.transformState,s=a.positionX,l=a.positionY,u=a.scale,h=e.wrapperComponent,p=e.contentComponent,m=e.setup.disabled;if(!(m||!h||!p)){var v={positionX:isNaN(t)?s:t,positionY:isNaN(n)?l:n,scale:isNaN(r)?u:r};bd(e,v,i,o)}}},c6e=function(e){return function(t,n){t===void 0&&(t=200),n===void 0&&(n="easeOut"),tW(e,t,n)}},d6e=function(e){return function(t,n,r){n===void 0&&(n=200),r===void 0&&(r="easeOut");var i=e.transformState,o=e.wrapperComponent,a=e.contentComponent;if(o&&a){var s=nW(t||i.scale,o,a);bd(e,s,n,r)}}},f6e=function(e){return function(t,n,r,i){r===void 0&&(r=600),i===void 0&&(i="easeOut"),ml(e);var o=e.wrapperComponent,a=typeof t=="string"?document.getElementById(t):t;if(o&&a6e(a)&&a&&o.contains(a)){var s=i6e(e,a,n);bd(e,s,r,i)}}},Fr=function(e){return{instance:e,state:e.transformState,zoomIn:s6e(e),zoomOut:l6e(e),setTransform:u6e(e),resetTransform:c6e(e),centerView:d6e(e),zoomToElement:f6e(e)}},xw=!1;function ww(){try{var e={get passive(){return xw=!0,!1}};return e}catch{return xw=!1,xw}}var rb=function(e,t){var n=e.tagName.toUpperCase(),r=t.find(function(o){return o.toUpperCase()===n});if(r)return!0;var i=t.find(function(o){return e.classList.contains(o)});return!!i},kM=function(e){e&&clearTimeout(e)},h6e=function(e,t,n){return"translate3d("+e+"px, "+t+"px, 0) scale("+n+")"},nW=function(e,t,n){var r=n.offsetWidth*e,i=n.offsetHeight*e,o=(t.offsetWidth-r)/2,a=(t.offsetHeight-i)/2;return{scale:e,positionX:o,positionY:a}},p6e=function(e,t){var n=e.setup.wheel,r=n.disabled,i=n.wheelDisabled,o=n.touchPadDisabled,a=n.excluded,s=e.isInitialized,l=e.isPanning,u=t.target,h=s&&!l&&!r&&u;if(!h||i&&!t.ctrlKey||o&&t.ctrlKey)return!1;var p=rb(u,a);return!p};function g6e(e,t){var n=e?e.deltaY<0?1:-1:0,r=Pwe(t,n);return r}function rW(e,t,n){var r=t.getBoundingClientRect(),i=0,o=0;if("clientX"in e)i=(e.clientX-r.left)/n,o=(e.clientY-r.top)/n;else{var a=e.touches[0];i=(a.clientX-r.left)/n,o=(a.clientY-r.top)/n}return(isNaN(i)||isNaN(o))&&console.error("No mouse or touch offset found"),{x:i,y:o}}var m6e=function(e,t,n,r,i){var o=e.transformState.scale,a=e.wrapperComponent,s=e.setup,l=s.maxScale,u=s.minScale,h=s.zoomAnimation,p=h.size,m=h.disabled;if(!a)throw new Error("Wrapper is not mounted");var v=o+t*(o-o*n)*n;if(i)return v;var S=r?!1:!m,w=o2(Ra(v,3),u,l,p,S);return w},v6e=function(e,t){var n=e.previousWheelEvent,r=e.transformState.scale,i=e.setup,o=i.maxScale,a=i.minScale;return n?ra||Math.sign(n.deltaY)!==Math.sign(t.deltaY)||n.deltaY>0&&n.deltaYt.deltaY||Math.sign(n.deltaY)!==Math.sign(t.deltaY):!1},y6e=function(e,t){var n=e.setup.pinch,r=n.disabled,i=n.excluded,o=e.isInitialized,a=t.target,s=o&&!r&&a;if(!s)return!1;var l=rb(a,i);return!l},S6e=function(e){var t=e.setup.pinch.disabled,n=e.isInitialized,r=e.pinchStartDistance,i=n&&!t&&r;return!!i},b6e=function(e,t,n){var r=n.getBoundingClientRect(),i=e.touches,o=Ra(i[0].clientX-r.left,5),a=Ra(i[0].clientY-r.top,5),s=Ra(i[1].clientX-r.left,5),l=Ra(i[1].clientY-r.top,5);return{x:(o+s)/2/t,y:(a+l)/2/t}},iW=function(e){return Math.sqrt(Math.pow(e.touches[0].pageX-e.touches[1].pageX,2)+Math.pow(e.touches[0].pageY-e.touches[1].pageY,2))},x6e=function(e,t){var n=e.pinchStartScale,r=e.pinchStartDistance,i=e.setup,o=i.maxScale,a=i.minScale,s=i.zoomAnimation,l=s.size,u=s.disabled;if(!n||r===null||!t)throw new Error("Pinch touches distance was not provided");if(t<0)return e.transformState.scale;var h=t/r,p=h*n;return o2(Ra(p,2),a,o,l,!u)},w6e=160,C6e=100,_6e=function(e,t){var n=e.props,r=n.onWheelStart,i=n.onZoomStart;e.wheelStopEventTimer||(ml(e),li(Fr(e),t,r),li(Fr(e),t,i))},k6e=function(e,t){var n=e.props,r=n.onWheel,i=n.onZoom,o=e.contentComponent,a=e.setup,s=e.transformState,l=s.scale,u=a.limitToBounds,h=a.centerZoomedOut,p=a.zoomAnimation,m=a.wheel,v=p.size,S=p.disabled,w=m.step;if(!o)throw new Error("Component not mounted");t.preventDefault(),t.stopPropagation();var E=g6e(t,null),P=m6e(e,E,w,!t.ctrlKey);if(l!==P){var k=q0(e,P),T=rW(t,o,l),M=S||v===0||h,I=u&&M,R=nb(e,T.x,T.y,P,k,I),N=R.x,z=R.y;e.previousWheelEvent=t,e.setTransformState(P,N,z),li(Fr(e),t,r),li(Fr(e),t,i)}},E6e=function(e,t){var n=e.props,r=n.onWheelStop,i=n.onZoomStop;kM(e.wheelAnimationTimer),e.wheelAnimationTimer=setTimeout(function(){!e.mounted||(ZH(e,t.x,t.y),e.wheelAnimationTimer=null)},C6e);var o=v6e(e,t);o&&(kM(e.wheelStopEventTimer),e.wheelStopEventTimer=setTimeout(function(){!e.mounted||(e.wheelStopEventTimer=null,li(Fr(e),t,r),li(Fr(e),t,i))},w6e))},P6e=function(e,t){var n=iW(t);e.pinchStartDistance=n,e.lastDistance=n,e.pinchStartScale=e.transformState.scale,e.isPanning=!1,ml(e)},T6e=function(e,t){var n=e.contentComponent,r=e.pinchStartDistance,i=e.transformState.scale,o=e.setup,a=o.limitToBounds,s=o.centerZoomedOut,l=o.zoomAnimation,u=l.disabled,h=l.size;if(!(r===null||!n)){var p=b6e(t,i,n);if(!(!isFinite(p.x)||!isFinite(p.y))){var m=iW(t),v=x6e(e,m);if(v!==i){var S=q0(e,v),w=u||h===0||s,E=a&&w,P=nb(e,p.x,p.y,v,S,E),k=P.x,T=P.y;e.pinchMidpoint=p,e.lastDistance=m,e.setTransformState(v,k,T)}}}},A6e=function(e){var t=e.pinchMidpoint;e.velocity=null,e.lastDistance=null,e.pinchMidpoint=null,e.pinchStartScale=null,e.pinchStartDistance=null,ZH(e,t?.x,t?.y)};function L6e(e,t){var n=e.setup.doubleClick,r=n.disabled,i=n.mode,o=n.step,a=n.animationTime,s=n.animationType;if(!r){if(i==="reset")return tW(e,a,s);var l=e.transformState.scale,u=e.contentComponent;if(!u)return console.error("No ContentComponent found");var h=i==="zoomOut"?-1:1,p=JH(e,h,o),m=rW(t,u,l),v=sk(e,p,m.x,m.y);if(!v)return console.error("Error during zoom event. New transformation state was not calculated.");bd(e,v,a,s)}}var M6e=function(e,t){var n=e.isInitialized,r=e.setup,i=e.wrapperComponent,o=r.doubleClick,a=o.disabled,s=o.excluded,l=t.target,u=i?.contains(l),h=n&&l&&u&&!a;if(!h)return!1;var p=rb(l,s);return!(p||!h)},oW=le.createContext(r6e),O6e=function(e){Ewe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.mounted=!0,n.transformState=QH(n.props),n.setup=_M(n.props),n.wrapperComponent=null,n.contentComponent=null,n.isInitialized=!1,n.bounds=null,n.previousWheelEvent=null,n.wheelStopEventTimer=null,n.wheelAnimationTimer=null,n.isPanning=!1,n.startCoords=null,n.lastTouch=null,n.distance=null,n.lastDistance=null,n.pinchStartDistance=null,n.pinchStartScale=null,n.pinchMidpoint=null,n.velocity=null,n.velocityTime=null,n.lastMousePosition=null,n.animate=!1,n.animation=null,n.maxBounds=null,n.pressedKeys={},n.handleInitializeWrapperEvents=function(r){var i=ww();r.addEventListener("wheel",n.onWheelZoom,i),r.addEventListener("dblclick",n.onDoubleClick,i),r.addEventListener("touchstart",n.onTouchPanningStart,i),r.addEventListener("touchmove",n.onTouchPanning,i),r.addEventListener("touchend",n.onTouchPanningStop,i)},n.handleInitialize=function(){var r=n.setup.centerOnInit;n.applyTransformation(),n.forceUpdate(),r&&(setTimeout(function(){n.mounted&&n.setCenter()},50),setTimeout(function(){n.mounted&&n.setCenter()},100),setTimeout(function(){n.mounted&&n.setCenter()},200))},n.onWheelZoom=function(r){var i=n.setup.disabled;if(!i){var o=p6e(n,r);if(!!o){var a=n.isPressingKeys(n.setup.wheel.activationKeys);!a||(_6e(n,r),k6e(n,r),E6e(n,r))}}},n.onPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),ml(n),wM(n,r),li(Fr(n),r,o))}}},n.onPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(!i){var a=bM(n);if(!!a){var s=n.isPressingKeys(n.setup.panning.activationKeys);!s||(r.preventDefault(),r.stopPropagation(),CM(n,r.clientX,r.clientY),li(Fr(n),r,o))}}},n.onPanningStop=function(r){var i=n.props.onPanningStop;n.isPanning&&(n6e(n),li(Fr(n),r,i))},n.onPinchStart=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinchingStart,s=o.onZoomStart;if(!i){var l=y6e(n,r);!l||(P6e(n,r),ml(n),li(Fr(n),r,a),li(Fr(n),r,s))}},n.onPinch=function(r){var i=n.setup.disabled,o=n.props,a=o.onPinching,s=o.onZoom;if(!i){var l=S6e(n);!l||(r.preventDefault(),r.stopPropagation(),T6e(n,r),li(Fr(n),r,a),li(Fr(n),r,s))}},n.onPinchStop=function(r){var i=n.props,o=i.onPinchingStop,a=i.onZoomStop;n.pinchStartScale&&(A6e(n),li(Fr(n),r,o),li(Fr(n),r,a))},n.onTouchPanningStart=function(r){var i=n.setup.disabled,o=n.props.onPanningStart;if(!i){var a=SM(n,r);if(!!a){var s=n.lastTouch&&+new Date-n.lastTouch<200;if(s&&r.touches.length===1)n.onDoubleClick(r);else{n.lastTouch=+new Date,ml(n);var l=r.touches,u=l.length===1,h=l.length===2;u&&(ml(n),wM(n,r),li(Fr(n),r,o)),h&&n.onPinchStart(r)}}}},n.onTouchPanning=function(r){var i=n.setup.disabled,o=n.props.onPanning;if(n.isPanning&&r.touches.length===1){if(i)return;var a=bM(n);if(!a)return;r.preventDefault(),r.stopPropagation();var s=r.touches[0];CM(n,s.clientX,s.clientY),li(Fr(n),r,o)}else r.touches.length>1&&n.onPinch(r)},n.onTouchPanningStop=function(r){n.onPanningStop(r),n.onPinchStop(r)},n.onDoubleClick=function(r){var i=n.setup.disabled;if(!i){var o=M6e(n,r);!o||L6e(n,r)}},n.clearPanning=function(r){n.isPanning&&n.onPanningStop(r)},n.setKeyPressed=function(r){n.pressedKeys[r.key]=!0},n.setKeyUnPressed=function(r){n.pressedKeys[r.key]=!1},n.isPressingKeys=function(r){return r.length?Boolean(r.find(function(i){return n.pressedKeys[i]})):!0},n.setComponents=function(r,i){n.wrapperComponent=r,n.contentComponent=i,q0(n,n.transformState.scale),n.handleInitializeWrapperEvents(r),n.handleInitialize(),n.handleRef(),n.isInitialized=!0,li(Fr(n),void 0,n.props.onInit)},n.setTransformState=function(r,i,o){!isNaN(r)&&!isNaN(i)&&!isNaN(o)?(r!==n.transformState.scale&&(n.transformState.previousScale=n.transformState.scale,n.transformState.scale=r),n.transformState.positionX=i,n.transformState.positionY=o,n.applyTransformation()):console.error("Detected NaN set state values")},n.setCenter=function(){if(n.wrapperComponent&&n.contentComponent){var r=nW(n.transformState.scale,n.wrapperComponent,n.contentComponent);n.setTransformState(r.scale,r.positionX,r.positionY)}},n.applyTransformation=function(){if(!(!n.mounted||!n.contentComponent)){var r=n.transformState,i=r.scale,o=r.positionX,a=r.positionY,s=h6e(o,a,i);n.contentComponent.style.transform=s,n.handleRef()}},n.handleRef=function(){n.props.setRef(Fr(n))},n}return t.prototype.componentDidMount=function(){var n=ww();window.addEventListener("mousedown",this.onPanningStart,n),window.addEventListener("mousemove",this.onPanning,n),window.addEventListener("mouseup",this.onPanningStop,n),document.addEventListener("mouseleave",this.clearPanning,n),window.addEventListener("keyup",this.setKeyUnPressed,n),window.addEventListener("keydown",this.setKeyPressed,n),this.handleRef()},t.prototype.componentWillUnmount=function(){var n=ww();window.removeEventListener("mousedown",this.onPanningStart,n),window.removeEventListener("mousemove",this.onPanning,n),window.removeEventListener("mouseup",this.onPanningStop,n),window.removeEventListener("keyup",this.setKeyUnPressed,n),window.removeEventListener("keydown",this.setKeyPressed,n),ml(this)},t.prototype.componentDidUpdate=function(n){n!==this.props&&(q0(this,this.transformState.scale),this.setup=_M(this.props))},t.prototype.render=function(){var n=Fr(this),r=this.props.children,i=typeof r=="function"?r(n):r;return x(oW.Provider,{value:El(El({},this.transformState),{setComponents:this.setComponents,contextInstance:this}),children:i})},t}(C.exports.Component),I6e=le.forwardRef(function(e,t){var n=C.exports.useState(null),r=n[0],i=n[1];return C.exports.useImperativeHandle(t,function(){return r},[r]),x(O6e,{...El({},e,{setRef:i})})});function R6e(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(!e||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var N6e=`.transform-component-module_wrapper__1_Fgj { - position: relative; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - overflow: hidden; - -webkit-touch-callout: none; /* iOS Safari */ - -webkit-user-select: none; /* Safari */ - -khtml-user-select: none; /* Konqueror HTML */ - -moz-user-select: none; /* Firefox */ - -ms-user-select: none; /* Internet Explorer/Edge */ - user-select: none; - margin: 0; - padding: 0; -} -.transform-component-module_content__2jYgh { - display: flex; - flex-wrap: wrap; - width: -moz-fit-content; - width: fit-content; - height: -moz-fit-content; - height: fit-content; - margin: 0; - padding: 0; - transform-origin: 0% 0%; -} -.transform-component-module_content__2jYgh img { - pointer-events: none; -} -`,EM={wrapper:"transform-component-module_wrapper__1_Fgj",content:"transform-component-module_content__2jYgh"};R6e(N6e);var D6e=function(e){var t=e.children,n=e.wrapperClass,r=n===void 0?"":n,i=e.contentClass,o=i===void 0?"":i,a=e.wrapperStyle,s=e.contentStyle,l=C.exports.useContext(oW).setComponents,u=C.exports.useRef(null),h=C.exports.useRef(null);return C.exports.useEffect(function(){var p=u.current,m=h.current;p!==null&&m!==null&&l&&l(p,m)},[]),x("div",{ref:u,className:"react-transform-wrapper "+EM.wrapper+" "+r,style:a,children:x("div",{ref:h,className:"react-transform-component "+EM.content+" "+o,style:s,children:t})})};function z6e({image:e,alt:t,ref:n,styleClass:r}){const[i,o]=C.exports.useState(0),[a,s]=C.exports.useState(!1),l=()=>{o(i===-3?0:i-1)},u=()=>{o(i===3?0:i+1)},h=()=>{s(!a)};return x(I6e,{centerOnInit:!0,minScale:.1,children:({zoomIn:p,zoomOut:m,resetTransform:v,centerView:S})=>ne(Nn,{children:[ne("div",{className:"lightbox-image-options",children:[x(gt,{icon:x(X3e,{}),"aria-label":"Zoom In",tooltip:"Zoom In",onClick:()=>p(),fontSize:20}),x(gt,{icon:x(Z3e,{}),"aria-label":"Zoom Out",tooltip:"Zoom Out",onClick:()=>m(),fontSize:20}),x(gt,{icon:x(Y3e,{}),"aria-label":"Rotate Left",tooltip:"Rotate Left",onClick:l,fontSize:20}),x(gt,{icon:x(q3e,{}),"aria-label":"Rotate Right",tooltip:"Rotate Right",onClick:u,fontSize:20}),x(gt,{icon:x(R4e,{}),"aria-label":"Flip Image",tooltip:"Flip Image",onClick:h,fontSize:20}),x(gt,{icon:x(A_,{}),"aria-label":"Reset",tooltip:"Reset",onClick:()=>{v(),o(0),s(!1)},fontSize:20})]}),x(D6e,{wrapperStyle:{width:"100%",height:"100%"},children:x("img",{style:{transform:`rotate(${i*90}deg) scaleX(${a?-1:1})`,width:"100%"},src:e,alt:t,ref:n,className:r||""})})]})})}function B6e(){const e=Ye(),t=ke(m=>m.options.isLightBoxOpen),{viewerImageToDisplay:n,shouldShowImageDetails:r,isOnFirstImage:i,isOnLastImage:o}=ke(hH),[a,s]=C.exports.useState(!1),l=()=>{s(!0)},u=()=>{s(!1)},h=()=>{e(Q_())},p=()=>{e(Z_())};return mt("Esc",()=>{t&&e(ad(!1))},[t]),ne("div",{className:"lightbox-container",children:[x(gt,{icon:x(G3e,{}),"aria-label":"Exit Viewer",className:"lightbox-close-btn",onClick:()=>{e(ad(!1))},fontSize:20}),ne("div",{className:"lightbox-display-container",children:[ne("div",{className:"lightbox-preview-wrapper",children:[x(sH,{}),!r&&ne("div",{className:"current-image-next-prev-buttons",children:[x("div",{className:"next-prev-button-trigger-area prev-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!i&&x(Ps,{"aria-label":"Previous image",icon:x(z$,{className:"next-prev-button"}),variant:"unstyled",onClick:h})}),x("div",{className:"next-prev-button-trigger-area next-button-trigger-area",onMouseOver:l,onMouseOut:u,children:a&&!o&&x(Ps,{"aria-label":"Next image",icon:x(B$,{className:"next-prev-button"}),variant:"unstyled",onClick:p})})]}),n&&ne(Nn,{children:[x(z6e,{image:n.url,styleClass:"lightbox-image"}),r&&x(fH,{image:n})]})]}),x(jH,{})]})]})}const F6e=ct(wn,e=>e.shouldDarkenOutsideBoundingBox);function $6e(){const e=Ye(),t=ke(F6e);return x(ta,{label:"Darken Outside Box",isChecked:t,onChange:()=>{e(rH(!t))},styleClass:"inpainting-bounding-box-darken"})}const H6e=ct(wn,e=>{const{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}=e;return{stageDimensions:t,boundingBoxDimensions:n,shouldLockBoundingBox:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function PM(e){const{dimension:t,label:n}=e,r=Ye(),{shouldLockBoundingBox:i,stageDimensions:o,boundingBoxDimensions:a}=ke(H6e),s=o[t],l=a[t],u=p=>{t=="width"&&r(sm({...a,width:Math.floor(p)})),t=="height"&&r(sm({...a,height:Math.floor(p)}))},h=()=>{t=="width"&&r(sm({...a,width:Math.floor(s)})),t=="height"&&r(sm({...a,height:Math.floor(s)}))};return x(n2,{label:n,min:64,max:gs(s,64),step:64,value:l,onChange:u,handleReset:h,isSliderDisabled:i,isInputDisabled:i,isResetDisabled:i||s===l,withSliderMarks:!0,withInput:!0,withReset:!0})}const W6e=ct(wn,e=>e.shouldLockBoundingBox);function V6e(){const e=ke(W6e),t=Ye();return x(ta,{label:"Lock Bounding Box",isChecked:e,onChange:()=>{t(iSe(!e))},styleClass:"inpainting-bounding-box-darken"})}const U6e=ct(wn,e=>e.shouldShowBoundingBox);function G6e(){const e=ke(U6e),t=Ye();return x(gt,{"aria-label":"Toggle Bounding Box Visibility",icon:e?x(K3e,{size:22}):x(j3e,{size:22}),onClick:()=>t(iH(!e)),background:"none",padding:0})}const j6e=()=>ne("div",{className:"inpainting-bounding-box-settings",children:[ne("div",{className:"inpainting-bounding-box-header",children:[x("p",{children:"Inpaint Box"}),x(G6e,{})]}),ne("div",{className:"inpainting-bounding-box-settings-items",children:[x(PM,{dimension:"width",label:"Box W"}),x(PM,{dimension:"height",label:"Box H"}),ne(nn,{alignItems:"center",justifyContent:"space-between",children:[x($6e,{}),x(V6e,{})]})]})]}),Y6e=ct(wn,e=>{const{inpaintReplace:t,shouldUseInpaintReplace:n}=e;return{inpaintReplace:t,shouldUseInpaintReplace:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function q6e(){const{inpaintReplace:e,shouldUseInpaintReplace:t}=ke(Y6e),n=Ye();return ne(nn,{alignItems:"center",columnGap:"1rem",children:[x(n2,{label:"Inpaint Replace",value:e,onChange:r=>{n(jL(r))},min:0,max:1,step:.05,isInteger:!1,isSliderDisabled:!t,withSliderMarks:!0,sliderMarkRightOffset:-2,withReset:!0,handleReset:()=>n(jL(1)),isResetDisabled:!t}),x(ks,{isChecked:t,onChange:r=>n(dSe(r.target.checked))})]})}const K6e=ct(wn,e=>{const{pastLayerStates:t,futureLayerStates:n}=e;return{mayClearBrushHistory:!(n.length>0||t.length>0)}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function X6e(){const e=Ye(),t=hh(),{mayClearBrushHistory:n}=ke(K6e);return x(fl,{onClick:()=>{e(J5e()),t({title:"Brush Stroke History Cleared",status:"success",duration:2500,isClosable:!0})},tooltip:"Clears brush stroke history",disabled:n,styleClass:"inpainting-options-btn",children:"Clear Brush History"})}function Z6e(){return ne(Nn,{children:[x(q6e,{}),x(j6e,{}),x(X6e,{})]})}function Q6e(){const e=ke(n=>n.options.showAdvancedOptions),t={seed:{header:x(L_,{}),feature:to.SEED,options:x(M_,{})},variations:{header:x(I_,{}),feature:to.VARIATIONS,options:x(R_,{})},face_restore:{header:x(E_,{}),feature:to.FACE_CORRECTION,options:x(jS,{})},upscale:{header:x(O_,{}),feature:to.UPSCALE,options:x(YS,{})}};return ne(K_,{children:[x(j_,{}),x(G_,{}),x(z_,{}),x(A$,{label:"Image To Image Strength",styleClass:"main-option-block image-to-image-strength-main-option"}),x(Z6e,{}),x(N_,{}),e&&x(B_,{accordionInfo:t})]})}const J6e=ct(wn,H$,Rr,(e,t,n)=>{const{doesCanvasNeedScaling:r,isCanvasInitialized:i}=e;return{doesCanvasNeedScaling:r,activeTabName:n,initialCanvasImage:t,isCanvasInitialized:i}}),eCe=()=>{const e=Ye(),{doesCanvasNeedScaling:t,activeTabName:n,initialCanvasImage:r,isCanvasInitialized:i}=ke(J6e),o=C.exports.useRef(null);return C.exports.useLayoutEffect(()=>{window.setTimeout(()=>{if(!o.current)return;const{clientWidth:a,clientHeight:s}=o.current;e(Q5e({width:a,height:s})),e(X5e()),e(io(!1))},0)},[e,r,t,n,i]),x("div",{ref:o,className:"inpainting-canvas-area",children:x(Kv,{thickness:"2px",speed:"1s",size:"xl"})})};var tCe=Math.PI/180;function nCe(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}const E0=typeof global<"u"?global:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},ot={_global:E0,version:"8.3.13",isBrowser:nCe(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return ot.angleDeg?e*tCe:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return ot.DD.isDragging},isDragReady(){return!!ot.DD.node},document:E0.document,_injectGlobal(e){E0.Konva=e}},pr=e=>{ot[e.prototype.getClassName()]=e};ot._injectGlobal(ot);class ra{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new ra(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var n=this.m;return{x:n[0]*t.x+n[2]*t.y+n[4],y:n[1]*t.x+n[3]*t.y+n[5]}}translate(t,n){return this.m[4]+=this.m[0]*t+this.m[2]*n,this.m[5]+=this.m[1]*t+this.m[3]*n,this}scale(t,n){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=n,this.m[3]*=n,this}rotate(t){var n=Math.cos(t),r=Math.sin(t),i=this.m[0]*n+this.m[2]*r,o=this.m[1]*n+this.m[3]*r,a=this.m[0]*-r+this.m[2]*n,s=this.m[1]*-r+this.m[3]*n;return this.m[0]=i,this.m[1]=o,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,n){var r=this.m[0]+this.m[2]*n,i=this.m[1]+this.m[3]*n,o=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}multiply(t){var n=this.m[0]*t.m[0]+this.m[2]*t.m[1],r=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],o=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),n=this.m[3]*t,r=-this.m[1]*t,i=-this.m[2]*t,o=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=this.m[4],a=this.m[5],s=t*i-n*r;let l={x:o,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(t!=0||n!=0){var u=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/u):-Math.acos(t/u),l.scaleX=u,l.scaleY=s/u,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(r!=0||i!=0){var h=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/h):-Math.acos(r/h)),l.scaleX=s/h,l.scaleY=h,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=fe._getRotation(l.rotation),l}}var rCe="[object Array]",iCe="[object Number]",oCe="[object String]",aCe="[object Boolean]",sCe=Math.PI/180,lCe=180/Math.PI,Cw="#",uCe="",cCe="0",dCe="Konva warning: ",TM="Konva error: ",fCe="rgb(",_w={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},hCe=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,Yy=[];const pCe=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(e){setTimeout(e,60)},fe={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===rCe},_isNumber(e){return Object.prototype.toString.call(e)===iCe&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===oCe},_isBoolean(e){return Object.prototype.toString.call(e)===aCe},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!="string")return!1;var t=e[0];return t==="#"||t==="."||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e){Yy.push(e),Yy.length===1&&pCe(function(){const t=Yy;Yy=[],t.forEach(function(n){n()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch{}return e},createImageElement(){return document.createElement("img")},_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=fe.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(Cw,uCe);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){for(var e=(Math.random()*16777215<<0).toString(16);e.length<6;)e=cCe+e;return Cw+e},getRGB(e){var t;return e in _w?(t=_w[e],{r:t[0],g:t[1],b:t[2]}):e[0]===Cw?this._hexToRgb(e.substring(1)):e.substr(0,4)===fCe?(t=hCe.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA(e){return e=e||"black",fe._namedColorToRBA(e)||fe._hex3ColorToRGBA(e)||fe._hex6ColorToRGBA(e)||fe._rgbColorToRGBA(e)||fe._rgbaColorToRGBA(e)||fe._hslColorToRGBA(e)},_namedColorToRBA(e){var t=_w[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(e.indexOf("rgb(")===0){e=e.match(/rgb\(([^)]+)\)/)[1];var t=e.split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(e.indexOf("rgba(")===0){e=e.match(/rgba\(([^)]+)\)/)[1];var t=e.split(/ *, */).map((n,r)=>n.slice(-1)==="%"?r===3?parseInt(n)/100:parseInt(n)/100*255:Number(n));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if(e[0]==="#"&&e.length===7)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if(e[0]==="#"&&e.length===4)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,i=Number(n[1])/100,o=Number(n[2])/100;let a,s,l;if(i===0)return l=o*255,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o<.5?a=o*(1+i):a=o+i-o*i;const u=2*o-a,h=[0,0,0];for(let p=0;p<3;p++)s=r+1/3*-(p-1),s<0&&s++,s>1&&s--,6*s<1?l=u+(a-u)*6*s:2*s<1?l=a:3*s<2?l=u+(a-u)*(2/3-s)*6:l=u,h[p]=l*255;return{r:Math.round(h[0]),g:Math.round(h[1]),b:Math.round(h[2]),a:1}}},haveIntersection(e,t){return!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.height1?(a=n,s=r,l=(n-i)*(n-i)+(r-o)*(r-o)):(a=e+h*(n-e),s=t+h*(r-t),l=(a-i)*(a-i)+(s-o)*(s-o))}return[a,s,l]},_getProjectionToLine(e,t,n){var r=fe.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(o,a){if(!(!n&&a===t.length-1)){var s=t[(a+1)%t.length],l=fe._getProjectionToSegment(o.x,o.y,s.x,s.y,e.x,e.y),u=l[0],h=l[1],p=l[2];pt.length){var a=t;t=e,e=a}for(r=0;r255?255:e<0?0:Math.round(e)}function ze(){if(ot.isUnminified)return function(e,t){return fe._isNumber(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function sW(e){if(ot.isUnminified)return function(t,n){let r=fe._isNumber(t),i=fe._isArray(t)&&t.length==e;return!r&&!i&&fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function lk(){if(ot.isUnminified)return function(e,t){var n=fe._isNumber(e),r=e==="auto";return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function f1(){if(ot.isUnminified)return function(e,t){return fe._isString(e)||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function lW(){if(ot.isUnminified)return function(e,t){const n=fe._isString(e),r=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return n||r||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function gCe(){if(ot.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(fe._isArray(e)?e.forEach(function(r){fe._isNumber(r)||fe.warn('"'+t+'" attribute has non numeric element '+r+". Make sure that all elements are numbers.")}):fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}function As(){if(ot.isUnminified)return function(e,t){var n=e===!0||e===!1;return n||fe.warn(xd(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}function mCe(e){if(ot.isUnminified)return function(t,n){return t==null||fe.isObject(t)||fe.warn(xd(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}var Hg="get",Wg="set";const K={addGetterSetter(e,t,n,r,i){K.addGetter(e,t,n),K.addSetter(e,t,r,i),K.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Hg+fe._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var i=this.attrs[t];return i===void 0?n:i}},addSetter(e,t,n,r){var i=Wg+fe._capitalize(t);e.prototype[i]||K.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var i=Wg+fe._capitalize(t);e.prototype[i]=function(o){return n&&o!==void 0&&o!==null&&(o=n.call(this,o,t)),this._setAttr(t,o),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){var o=n.length,a=fe._capitalize,s=Hg+a(t),l=Wg+a(t),u,h;e.prototype[s]=function(){var m={};for(u=0;u{this._setAttr(t+a(w),void 0)}),this._fireChangeEvent(t,v,m),i&&i.call(this),this},K.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=fe._capitalize(t),r=Wg+n,i=Hg+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()}},addDeprecatedGetterSetter(e,t,n,r){fe.error("Adding deprecated "+t);var i=Hg+fe._capitalize(t),o=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[i]=function(){fe.error(o);var a=this.attrs[t];return a===void 0?n:a},K.addSetter(e,t,r,function(){fe.error(o)}),K.addOverloadedGetterSetter(e,t)},backCompat(e,t){fe.each(t,function(n,r){var i=e.prototype[r],o=Hg+fe._capitalize(n),a=Wg+fe._capitalize(n);function s(){i.apply(this,arguments),fe.error('"'+n+'" method is deprecated and will be removed soon. Use ""'+r+'" instead.')}e.prototype[n]=s,e.prototype[o]=s,e.prototype[a]=s})},afterSetFilter(){this._filterUpToDate=!1}};function vCe(e){var t=[],n=e.length,r=fe,i,o;for(i=0;itypeof h=="number"?Math.floor(h):h)),o+=yCe+u.join(AM)+SCe)):(o+=s.property,t||(o+=_Ce+s.val)),o+=wCe;return o}clearTrace(){this.traceArr=[]}_trace(t){var n=this.traceArr,r;n.push(t),r=n.length,r>=ECe&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var n=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,n.getWidth()/n.pixelRatio,n.getHeight()/n.pixelRatio)}_applyLineCap(t){var n=t.getLineCap();n&&this.setAttr("lineCap",n)}_applyOpacity(t){var n=t.getAbsoluteOpacity();n!==1&&this.setAttr("globalAlpha",n)}_applyLineJoin(t){var n=t.attrs.lineJoin;n&&this.setAttr("lineJoin",n)}setAttr(t,n){this._context[t]=n}arc(t,n,r,i,o,a){this._context.arc(t,n,r,i,o,a)}arcTo(t,n,r,i,o){this._context.arcTo(t,n,r,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(t,n,r,i,o,a){this._context.bezierCurveTo(t,n,r,i,o,a)}clearRect(t,n,r,i){this._context.clearRect(t,n,r,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,n){var r=arguments;if(r.length===2)return this._context.createImageData(t,n);if(r.length===1)return this._context.createImageData(t)}createLinearGradient(t,n,r,i){return this._context.createLinearGradient(t,n,r,i)}createPattern(t,n){return this._context.createPattern(t,n)}createRadialGradient(t,n,r,i,o,a){return this._context.createRadialGradient(t,n,r,i,o,a)}drawImage(t,n,r,i,o,a,s,l,u){var h=arguments,p=this._context;h.length===3?p.drawImage(t,n,r):h.length===5?p.drawImage(t,n,r,i,o):h.length===9&&p.drawImage(t,n,r,i,o,a,s,l,u)}ellipse(t,n,r,i,o,a,s,l){this._context.ellipse(t,n,r,i,o,a,s,l)}isPointInPath(t,n){return this._context.isPointInPath(t,n)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,n,r,i){this._context.fillRect(t,n,r,i)}strokeRect(t,n,r,i){this._context.strokeRect(t,n,r,i)}fillText(t,n,r,i){i?this._context.fillText(t,n,r,i):this._context.fillText(t,n,r)}measureText(t){return this._context.measureText(t)}getImageData(t,n,r,i){return this._context.getImageData(t,n,r,i)}lineTo(t,n){this._context.lineTo(t,n)}moveTo(t,n){this._context.moveTo(t,n)}rect(t,n,r,i){this._context.rect(t,n,r,i)}putImageData(t,n,r){this._context.putImageData(t,n,r)}quadraticCurveTo(t,n,r,i){this._context.quadraticCurveTo(t,n,r,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,n){this._context.scale(t,n)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,n,r,i,o,a){this._context.setTransform(t,n,r,i,o,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,n,r,i){this._context.strokeText(t,n,r,i)}transform(t,n,r,i,o,a){this._context.transform(t,n,r,i,o,a)}translate(t,n){this._context.translate(t,n)}_enableTrace(){var t=this,n=LM.length,r=this.setAttr,i,o,a=function(s){var l=t[s],u;t[s]=function(){return o=vCe(Array.prototype.slice.call(arguments,0)),u=l.apply(t,arguments),t._trace({method:s,args:o}),u}};for(i=0;i{t.dragStatus==="dragging"&&(e=!0)}),e},justDragged:!1,get node(){var e;return un._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const t=[];un._dragElements.forEach((n,r)=>{const{node:i}=n,o=i.getStage();o.setPointersPositions(e),n.pointerId===void 0&&(n.pointerId=fe._getFirstPointerId(e));const a=o._changedPointerPositions.find(u=>u.id===n.pointerId);if(!!a){if(n.dragStatus!=="dragging"){var s=i.dragDistance(),l=Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y));if(l{n.fire("dragmove",{type:"dragmove",target:n,evt:e},!0)})},_endDragBefore(e){const t=[];un._dragElements.forEach(n=>{const{node:r}=n,i=r.getStage();if(e&&i.setPointersPositions(e),!i._changedPointerPositions.find(s=>s.id===n.pointerId))return;(n.dragStatus==="dragging"||n.dragStatus==="stopped")&&(un.justDragged=!0,ot._mouseListenClick=!1,ot._touchListenClick=!1,ot._pointerListenClick=!1,n.dragStatus="stopped");const a=n.node.getLayer()||n.node instanceof ot.Stage&&n.node;a&&t.indexOf(a)===-1&&t.push(a)}),t.forEach(n=>{n.draw()})},_endDragAfter(e){un._dragElements.forEach((t,n)=>{t.dragStatus==="stopped"&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),t.dragStatus!=="dragging"&&un._dragElements.delete(n)})}};ot.isBrowser&&(window.addEventListener("mouseup",un._endDragBefore,!0),window.addEventListener("touchend",un._endDragBefore,!0),window.addEventListener("mousemove",un._drag),window.addEventListener("touchmove",un._drag),window.addEventListener("mouseup",un._endDragAfter,!1),window.addEventListener("touchend",un._endDragAfter,!1));var V3="absoluteOpacity",Ky="allEventListeners",ou="absoluteTransform",MM="absoluteScale",Vg="canvas",LCe="Change",MCe="children",OCe="konva",i9="listening",OM="mouseenter",IM="mouseleave",RM="set",NM="Shape",U3=" ",DM="stage",kc="transform",ICe="Stage",o9="visible",RCe=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(U3);let NCe=1;class Be{constructor(t){this._id=NCe++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===kc||t===ou)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,n){var r=this._cache.get(t),i=t===kc||t===ou,o=r===void 0||i&&r.dirty===!0;return o&&(r=n.call(this),this._cache.set(t,r)),r}_calculate(t,n,r){if(!this._attachedDepsListeners.get(t)){const i=n.map(o=>o+"Change.konva").join(U3);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,r)}_getCanvasCache(){return this._cache.get(Vg)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ou&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(Vg),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var n=t||{},r={};(n.x===void 0||n.y===void 0||n.width===void 0||n.height===void 0)&&(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(n.width||r.width),o=Math.ceil(n.height||r.height),a=n.pixelRatio,s=n.x===void 0?Math.floor(r.x):n.x,l=n.y===void 0?Math.floor(r.y):n.y,u=n.offset||0,h=n.drawBorder||!1,p=n.hitCanvasPixelRatio||1;if(!i||!o){fe.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}i+=u*2+1,o+=u*2+1,s-=u,l-=u;var m=new P0({pixelRatio:a,width:i,height:o}),v=new P0({pixelRatio:a,width:0,height:0}),S=new uk({pixelRatio:p,width:i,height:o}),w=m.getContext(),E=S.getContext();return S.isCache=!0,m.isCache=!0,this._cache.delete(Vg),this._filterUpToDate=!1,n.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),w.save(),E.save(),w.translate(-s,-l),E.translate(-s,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(V3),this._clearSelfAndDescendantCache(MM),this.drawScene(m,this),this.drawHit(S,this),this._isUnderCache=!1,w.restore(),E.restore(),h&&(w.save(),w.beginPath(),w.rect(0,0,i,o),w.closePath(),w.setAttr("strokeStyle","red"),w.setAttr("lineWidth",5),w.stroke(),w.restore()),this._cache.set(Vg,{scene:m,filter:v,hit:S,x:s,y:l}),this._requestDraw(),this}isCached(){return this._cache.has(Vg)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,n){var r=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i,o,a,s,l=this.getAbsoluteTransform(n);return r.forEach(function(u){var h=l.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const n=this._getCanvasCache();t.translate(n.x,n.y);var r=this._getCachedSceneCanvas(),i=r.pixelRatio;t.drawImage(r._canvas,0,0,r.width/i,r.height/i),t.restore()}_drawCachedHitCanvas(t){var n=this._getCanvasCache(),r=n.hit;t.save(),t.translate(n.x,n.y),t.drawImage(r._canvas,0,0,r.width/r.pixelRatio,r.height/r.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),n=this._getCanvasCache(),r=n.scene,i=n.filter,o=i.getContext(),a,s,l,u;if(t){if(!this._filterUpToDate){var h=r.pixelRatio;i.setSize(r.width/r.pixelRatio,r.height/r.pixelRatio);try{for(a=t.length,o.clear(),o.drawImage(r._canvas,0,0,r.getWidth()/h,r.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l{var n,r;if(!t)return this;for(n in t)n!==MCe&&(r=RM+fe._capitalize(n),fe._isFunction(this[r])?this[r](t[n]):this._setAttr(n,t[n]))}),this}isListening(){return this._getCache(i9,this._isListening)}_isListening(t){if(!this.listening())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isListening(t):!0}isVisible(){return this._getCache(o9,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const r=this.getParent();return r&&r!==t&&this!==t?r._isVisible(t):!0}shouldDrawHit(t,n=!1){if(t)return this._isVisible(t)&&this._isListening(t);var r=this.getLayer(),i=!1;un._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===r)&&(i=!0)});var o=!n&&!ot.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),n=this,r=0,i,o,a,s;function l(u){for(i=[],o=u.length,a=0;a0&&i[0].getDepth()<=t&&l(i)}return n.nodeType!==ICe&&l(n.getStage().getChildren()),r}getDepth(){for(var t=0,n=this.parent;n;)t++,n=n.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(kc),this._clearSelfAndDescendantCache(ou)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(t){let n=!1,r=this.parent;for(;r;){if(r.isCached()){n=!0;break}r=r.parent}n&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),o=new ra,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(t){var n=this._clearTransform();this.attrs.x=n.x,this.attrs.y=n.y,delete n.x,delete n.y,this._clearCache(kc);var r=this._getAbsoluteTransform().copy();return r.invert(),r.translate(t.x,t.y),t={x:this.attrs.x+r.getTranslation().x,y:this.attrs.y+r.getTranslation().y},this._setTransform(n),this.setPosition({x:t.x,y:t.y}),this._clearCache(kc),this._clearSelfAndDescendantCache(ou),this}_setTransform(t){var n;for(n in t)this.attrs[n]=t[n]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var n=t.x,r=t.y,i=this.x(),o=this.y();return n!==void 0&&(i+=n),r!==void 0&&(o+=r),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(t,n){var r=[],i=this.getParent(),o,a;if(!(n&&n._id===this._id)){for(r.unshift(this);i&&(!n||i._id!==n._id);)r.unshift(i),i=i.parent;for(o=r.length,a=0;a0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return fe.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return fe.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&fe.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var n=this.index;return this.parent.children.splice(n,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(V3,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),n=this.getParent();return n&&!n._isUnderCache&&(t*=n.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t={},n=this.getAttrs(),r,i,o,a,s;t.attrs={};for(r in n)i=n[r],s=fe.isObject(i)&&!fe._isPlainObject(i)&&!fe._isArray(i),!s&&(o=typeof this[r]=="function"&&this[r],delete n[r],a=o?o.call(this):null,n[r]=i,a!==i&&(t.attrs[r]=i));return t.className=this.getClassName(),fe._prepareToStringify(t)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,n,r){var i=[];n&&this._isMatch(t)&&i.push(this);for(var o=this.parent;o;){if(o===r)return i;o._isMatch(t)&&i.push(o),o=o.parent}return i}isAncestorOf(t){return!1}findAncestor(t,n,r){return this.findAncestors(t,n,r)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var n=t.replace(/ /g,"").split(","),r=n.length,i,o;for(i=0;i{try{const i=t?.callback;i&&delete t.callback,fe._urlToImage(this.toDataURL(t),function(o){n(o),i?.(o)})}catch(i){r(i)}})}toBlob(t){return new Promise((n,r)=>{try{const i=t?.callback;i&&delete t.callback,this.toCanvas(t).toBlob(o=>{n(o),i?.(o)})}catch(i){r(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():ot.dragDistance}_off(t,n,r){var i=this.eventListeners[t],o,a,s;for(o=0;o=0;if(!!r&&!this.isDragging()){var i=!1;un._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const n=un._dragElements.get(this._id),r=n&&n.dragStatus==="dragging",i=n&&n.dragStatus==="ready";r?this.stopDrag():i&&un._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const n=this.getStage();if(!n)return!1;const r={x:-t.x,y:-t.y,width:n.width()+2*t.x,height:n.height()+2*t.y};return fe.haveIntersection(r,this.getClientRect())}static create(t,n){return fe._isString(t)&&(t=JSON.parse(t)),this._createNode(t,n)}static _createNode(t,n){var r=Be.prototype.getClassName.call(t),i=t.children,o,a,s;n&&(t.attrs.container=n),ot[r]||(fe.warn('Can not find a node with class name "'+r+'". Fallback to "Shape".'),r="Shape");const l=ot[r];if(o=new l(t.attrs),i)for(a=i.length,s=0;s0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var n=0;n0?n[0]:void 0}_generalFind(t,n){var r=[];return this._descendants(i=>{const o=i._isMatch(t);return o&&r.push(i),!!(o&&n)}),r}_descendants(t){let n=!1;const r=this.getChildren();for(const i of r){if(n=t(i),n)return!0;if(!!i.hasChildren()&&(n=i._descendants(t),n))return!0}return!1}toObject(){var t=Be.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(n=>{t.children.push(n.toObject())}),t}isAncestorOf(t){for(var n=t.getParent();n;){if(n._id===this._id)return!0;n=n.getParent()}return!1}clone(t){var n=Be.prototype.clone.call(this,t);return this.getChildren().forEach(function(r){n.add(r.clone())}),n}getAllIntersections(t){var n=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(t)&&n.push(r)}),n}_clearSelfAndDescendantCache(t){var n;super._clearSelfAndDescendantCache(t),!this.isCached()&&((n=this.children)===null||n===void 0||n.forEach(function(r){r._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(n,r){n.index=r}),this._requestDraw()}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas(),o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){o.save();var u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",i,n);return this}drawHit(t,n){if(!this.shouldDrawHit(n))return this;var r=this.getLayer(),i=t||r&&r.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var l=this.getAbsoluteTransform(n).getMatrix();o.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,n);return this}_drawChildren(t,n,r){var i,o=n&&n.getContext(),a=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),u=a&&s||l;const h=r===this;if(u){o.save();var p=this.getAbsoluteTransform(r),m=p.getMatrix();if(o.transform(m[0],m[1],m[2],m[3],m[4],m[5]),o.beginPath(),l)l.call(this,o,this);else{var v=this.clipX(),S=this.clipY();o.rect(v,S,a,s)}o.clip(),m=p.copy().invert().getMatrix(),o.transform(m[0],m[1],m[2],m[3],m[4],m[5])}var w=!h&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";w&&(o.save(),o._applyGlobalCompositeOperation(this)),(i=this.children)===null||i===void 0||i.forEach(function(E){E[t](n,r)}),w&&o.restore(),u&&o.restore()}getClientRect(t){var n;t=t||{};var r=t.skipTransform,i=t.relativeTo,o,a,s,l,u={x:1/0,y:1/0,width:0,height:0},h=this;(n=this.children)===null||n===void 0||n.forEach(function(w){if(!!w.visible()){var E=w.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});E.width===0&&E.height===0||(o===void 0?(o=E.x,a=E.y,s=E.x+E.width,l=E.y+E.height):(o=Math.min(o,E.x),a=Math.min(a,E.y),s=Math.max(s,E.x+E.width),l=Math.max(l,E.y+E.height)))}});for(var p=this.find("Shape"),m=!1,v=0;ve.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Mp=e=>{const t=dm(e);if(t==="pointer")return ot.pointerEventsEnabled&&Ew.pointer;if(t==="touch")return Ew.touch;if(t==="mouse")return Ew.mouse};function BM(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&fe.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const WCe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",G3=[];class ab extends la{constructor(t){super(BM(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),G3.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{BM(this.attrs)}),this._checkVisibility()}_validateAdd(t){const n=t.getType()==="Layer",r=t.getType()==="FastLayer";n||r||fe.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===zCe){if(t.charAt(0)==="."){var n=t.slice(1);t=document.getElementsByClassName(n)[0]}else{var r;t.charAt(0)!=="#"?r=t:r=t.slice(1),t=document.getElementById(r)}if(!t)throw"Can not find container in document with id "+r}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t=this.children,n=t.length,r;for(r=0;r-1&&G3.splice(n,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(fe.warn(WCe),null)}_getPointerById(t){return this._pointerPositions.find(n=>n.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var n=new P0({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),r=n.getContext()._context,i=this.children;return(t.x||t.y)&&r.translate(-1*t.x,-1*t.y),i.forEach(function(o){if(!!o.isVisible()){var a=o._toKonvaCanvas(t);r.drawImage(a._canvas,t.x,t.y,a.getWidth()/a.getPixelRatio(),a.getHeight()/a.getPixelRatio())}}),n}getIntersection(t){if(!t)return null;var n=this.children,r=n.length,i=r-1,o;for(o=i;o>=0;o--){const a=n[o].getIntersection(t);if(a)return a}return null}_resizeDOM(){var t=this.width(),n=this.height();this.content&&(this.content.style.width=t+zM,this.content.style.height=n+zM),this.bufferCanvas.setSize(t,n),this.bufferHitCanvas.setSize(t,n),this.children.forEach(r=>{r.setSize({width:t,height:n}),r.draw()})}add(t,...n){if(arguments.length>1){for(var r=0;r$Ce&&fe.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),ot.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){$m(t)}getLayers(){return this.children}_bindContentEvents(){!ot.isBrowser||HCe.forEach(([t,n])=>{this.content.addEventListener(t,r=>{this[n](r)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const n=Mp(t.type);this._fire(n.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const n=Mp(t.type);this._fire(n.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let n=this[t+"targetShape"];return n&&!n.getStage()&&(n=null),n}_pointerleave(t){const n=Mp(t.type),r=dm(t.type);if(!!n){this.setPointersPositions(t);var i=this._getTargetShape(r),o=!un.isDragging||ot.hitOnDragEnabled;i&&o?(i._fireAndBubble(n.pointerout,{evt:t}),i._fireAndBubble(n.pointerleave,{evt:t}),this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this[r+"targetShape"]=null):o&&(this._fire(n.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(n.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const n=Mp(t.type),r=dm(t.type);if(!!n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach(o=>{var a=this.getIntersection(o);if(un.justDragged=!1,ot["_"+r+"ListenClick"]=!0,!(a&&a.isListening()))return;ot.capturePointerEventsEnabled&&a.setPointerCapture(o.id),this[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;const l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const n=Mp(t.type),r=dm(t.type);if(!n)return;un.isDragging&&un.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!un.isDragging||ot.hitOnDragEnabled;if(!i)return;var o={};let a=!1;var s=this._getTargetShape(r);this._changedPointerPositions.forEach(l=>{const u=kw(l.id)||this.getIntersection(l),h=l.id,p={evt:t,pointerId:h};var m=s!==u;if(m&&s&&(s._fireAndBubble(n.pointerout,Object.assign({},p),u),s._fireAndBubble(n.pointerleave,Object.assign({},p),u)),u){if(o[u._id])return;o[u._id]=!0}u&&u.isListening()?(a=!0,m&&(u._fireAndBubble(n.pointerover,Object.assign({},p),s),u._fireAndBubble(n.pointerenter,Object.assign({},p),s),this[r+"targetShape"]=u),u._fireAndBubble(n.pointermove,Object.assign({},p))):s&&(this._fire(n.pointerover,{evt:t,target:this,currentTarget:this,pointerId:h}),this[r+"targetShape"]=null)}),a||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const n=Mp(t.type),r=dm(t.type);if(!n)return;this.setPointersPositions(t);const i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach(l=>{const u=kw(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),a[u._id])return;a[u._id]=!0}const h=l.id,p={evt:t,pointerId:h};let m=!1;ot["_"+r+"InDblClickWindow"]?(m=!0,clearTimeout(this[r+"DblTimeout"])):un.justDragged||(ot["_"+r+"InDblClickWindow"]=!0,clearTimeout(this[r+"DblTimeout"])),this[r+"DblTimeout"]=setTimeout(function(){ot["_"+r+"InDblClickWindow"]=!1},ot.dblClickWindow),u&&u.isListening()?(s=!0,this[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},p)),ot["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},p)),m&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},p)))):(this[r+"ClickEndShape"]=null,ot["_"+r+"ListenClick"]&&this._fire(n.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:h}),m&&this._fire(n.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:h}))}),s||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),ot["_"+r+"ListenClick"]=!1,t.cancelable&&r!=="touch"&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(a9,{evt:t}):this._fire(a9,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var n=this.getIntersection(this.getPointerPosition());n&&n.isListening()?n._fireAndBubble(s9,{evt:t}):this._fire(s9,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const n=kw(t.pointerId)||this.getIntersection(this.getPointerPosition());n&&n._fireAndBubble(e0,ck(t)),$m(t.pointerId)}_lostpointercapture(t){$m(t.pointerId)}setPointersPositions(t){var n=this._getContentPosition(),r=null,i=null;t=t||window.event,t.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,o=>{this._pointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,o=>{this._changedPointerPositions.push({id:o.identifier,x:(o.clientX-n.left)/n.scaleX,y:(o.clientY-n.top)/n.scaleY})})):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:fe._getFirstPointerId(t)}])}_setPointerPosition(t){fe.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new P0({width:this.width(),height:this.height()}),this.bufferHitCanvas=new uk({pixelRatio:1,width:this.width(),height:this.height()}),!!ot.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return fe.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}ab.prototype.nodeType=DCe;pr(ab);K.addGetterSetter(ab,"container");var wW="hasShadow",CW="shadowRGBA",_W="patternImage",kW="linearGradient",EW="radialGradient";let e3;function Pw(){return e3||(e3=fe.createCanvasElement().getContext("2d"),e3)}const Hm={};function VCe(e){e.fill()}function UCe(e){e.stroke()}function GCe(e){e.fill()}function jCe(e){e.stroke()}function YCe(){this._clearCache(wW)}function qCe(){this._clearCache(CW)}function KCe(){this._clearCache(_W)}function XCe(){this._clearCache(kW)}function ZCe(){this._clearCache(EW)}class Me extends Be{constructor(t){super(t);let n;for(;n=fe.getRandomColor(),!(n&&!(n in Hm)););this.colorKey=n,Hm[n]=this}getContext(){return fe.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return fe.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(wW,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(_W,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=Pw();const n=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(n&&n.setTransform){const r=new ra;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(ot.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix(),o=typeof DOMMatrix>"u"?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);n.setTransform(o)}return n}}_getLinearGradient(){return this._getCache(kW,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var n=Pw(),r=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),o=n.createLinearGradient(r.x,r.y,i.x,i.y),a=0;athis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return t==="auto"?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var n=this.getStage(),r=n.bufferHitCanvas,i;return r.getContext().clear(),this.drawHit(r,null,!0),i=r.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,i[3]>0}destroy(){return Be.prototype.destroy.call(this),delete Hm[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var n;if(!this.getStage()||!((n=this.attrs.perfectDrawEnabled)!==null&&n!==void 0?n:!0))return!1;const i=t||this.hasFill(),o=this.hasStroke(),a=this.getAbsoluteOpacity()!==1;if(i&&o&&a)return!0;const s=this.hasShadow(),l=this.shadowForStrokeEnabled();return!!(i&&o&&s&&l)}setStrokeHitEnabled(t){fe.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const n=t.skipTransform,r=t.relativeTo,i=this.getSelfRect(),a=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=i.width+a,l=i.height+a,u=!t.skipShadow&&this.hasShadow(),h=u?this.shadowOffsetX():0,p=u?this.shadowOffsetY():0,m=s+Math.abs(h),v=l+Math.abs(p),S=u&&this.shadowBlur()||0,w=m+S*2,E=v+S*2,P={width:w,height:E,x:-(a/2+S)+Math.min(h,0)+i.x,y:-(a/2+S)+Math.min(p,0)+i.y};return n?P:this._transformedRect(P,r)}drawScene(t,n){var r=this.getLayer(),i=t||r.getCanvas(),o=i.getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),u,h,p,m=i.isCache,v=n===this;if(!this.isVisible()&&!v)return this;if(a){o.save();var S=this.getAbsoluteTransform(n).getMatrix();return o.transform(S[0],S[1],S[2],S[3],S[4],S[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),this._useBufferCanvas()&&!m){u=this.getStage(),h=u.bufferCanvas,p=h.getContext(),p.clear(),p.save(),p._applyLineJoin(this);var w=this.getAbsoluteTransform(n).getMatrix();p.transform(w[0],w[1],w[2],w[3],w[4],w[5]),s.call(this,p,this),p.restore();var E=h.pixelRatio;l&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(h._canvas,0,0,h.width/E,h.height/E)}else{if(o._applyLineJoin(this),!v){var w=this.getAbsoluteTransform(n).getMatrix();o.transform(w[0],w[1],w[2],w[3],w[4],w[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}l&&o._applyShadow(this),s.call(this,o,this)}return o.restore(),this}drawHit(t,n,r=!1){if(!this.shouldDrawHit(n,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,a=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),u=l&&l.hit;if(this.colorKey||fe.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),u){a.save();var h=this.getAbsoluteTransform(n).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),a._applyLineJoin(this),!(this===n)){var m=this.getAbsoluteTransform(n).getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}return s.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var n=this._getCanvasCache(),r=this._getCachedSceneCanvas(),i=n.hit,o=i.getContext(),a=i.getWidth(),s=i.getHeight(),l,u,h,p,m,v;o.clear(),o.drawImage(r._canvas,0,0,a,s);try{for(l=o.getImageData(0,0,a,s),u=l.data,h=u.length,p=fe._hexToRgb(this.colorKey),m=0;mt?(u[m]=p.r,u[m+1]=p.g,u[m+2]=p.b,u[m+3]=255):u[m+3]=0;o.putImageData(l,0,0)}catch(S){fe.error("Unable to draw hit graph from cached scene canvas. "+S.message)}return this}hasPointerCapture(t){return cW(t,this)}setPointerCapture(t){dW(t,this)}releaseCapture(t){$m(t)}}Me.prototype._fillFunc=VCe;Me.prototype._strokeFunc=UCe;Me.prototype._fillFuncHit=GCe;Me.prototype._strokeFuncHit=jCe;Me.prototype._centroid=!1;Me.prototype.nodeType="Shape";pr(Me);Me.prototype.eventListeners={};Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",YCe);Me.prototype.on.call(Me.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",qCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",KCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",XCe);Me.prototype.on.call(Me.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",ZCe);K.addGetterSetter(Me,"stroke",void 0,lW());K.addGetterSetter(Me,"strokeWidth",2,ze());K.addGetterSetter(Me,"fillAfterStrokeEnabled",!1);K.addGetterSetter(Me,"hitStrokeWidth","auto",lk());K.addGetterSetter(Me,"strokeHitEnabled",!0,As());K.addGetterSetter(Me,"perfectDrawEnabled",!0,As());K.addGetterSetter(Me,"shadowForStrokeEnabled",!0,As());K.addGetterSetter(Me,"lineJoin");K.addGetterSetter(Me,"lineCap");K.addGetterSetter(Me,"sceneFunc");K.addGetterSetter(Me,"hitFunc");K.addGetterSetter(Me,"dash");K.addGetterSetter(Me,"dashOffset",0,ze());K.addGetterSetter(Me,"shadowColor",void 0,f1());K.addGetterSetter(Me,"shadowBlur",0,ze());K.addGetterSetter(Me,"shadowOpacity",1,ze());K.addComponentsGetterSetter(Me,"shadowOffset",["x","y"]);K.addGetterSetter(Me,"shadowOffsetX",0,ze());K.addGetterSetter(Me,"shadowOffsetY",0,ze());K.addGetterSetter(Me,"fillPatternImage");K.addGetterSetter(Me,"fill",void 0,lW());K.addGetterSetter(Me,"fillPatternX",0,ze());K.addGetterSetter(Me,"fillPatternY",0,ze());K.addGetterSetter(Me,"fillLinearGradientColorStops");K.addGetterSetter(Me,"strokeLinearGradientColorStops");K.addGetterSetter(Me,"fillRadialGradientStartRadius",0);K.addGetterSetter(Me,"fillRadialGradientEndRadius",0);K.addGetterSetter(Me,"fillRadialGradientColorStops");K.addGetterSetter(Me,"fillPatternRepeat","repeat");K.addGetterSetter(Me,"fillEnabled",!0);K.addGetterSetter(Me,"strokeEnabled",!0);K.addGetterSetter(Me,"shadowEnabled",!0);K.addGetterSetter(Me,"dashEnabled",!0);K.addGetterSetter(Me,"strokeScaleEnabled",!0);K.addGetterSetter(Me,"fillPriority","color");K.addComponentsGetterSetter(Me,"fillPatternOffset",["x","y"]);K.addGetterSetter(Me,"fillPatternOffsetX",0,ze());K.addGetterSetter(Me,"fillPatternOffsetY",0,ze());K.addComponentsGetterSetter(Me,"fillPatternScale",["x","y"]);K.addGetterSetter(Me,"fillPatternScaleX",1,ze());K.addGetterSetter(Me,"fillPatternScaleY",1,ze());K.addComponentsGetterSetter(Me,"fillLinearGradientStartPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientStartPointX",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointX",0);K.addGetterSetter(Me,"fillLinearGradientStartPointY",0);K.addGetterSetter(Me,"strokeLinearGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillLinearGradientEndPoint",["x","y"]);K.addComponentsGetterSetter(Me,"strokeLinearGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillLinearGradientEndPointX",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointX",0);K.addGetterSetter(Me,"fillLinearGradientEndPointY",0);K.addGetterSetter(Me,"strokeLinearGradientEndPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientStartPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientStartPointX",0);K.addGetterSetter(Me,"fillRadialGradientStartPointY",0);K.addComponentsGetterSetter(Me,"fillRadialGradientEndPoint",["x","y"]);K.addGetterSetter(Me,"fillRadialGradientEndPointX",0);K.addGetterSetter(Me,"fillRadialGradientEndPointY",0);K.addGetterSetter(Me,"fillPatternRotation",0);K.backCompat(Me,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var QCe="#",JCe="beforeDraw",e9e="draw",PW=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],t9e=PW.length;class gh extends la{constructor(t){super(t),this.canvas=new P0,this.hitCanvas=new uk({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var n=this.getStage();return n&&n.content&&(n.content.removeChild(this.getNativeCanvasElement()),t{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var n=1,r=!1;;){for(let i=0;i0)return{antialiased:!0};return{}}drawScene(t,n){var r=this.getLayer(),i=t||r&&r.getCanvas();return this._fire(JCe,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),la.prototype.drawScene.call(this,i,n),this._fire(e9e,{node:this}),this}drawHit(t,n){var r=this.getLayer(),i=t||r&&r.hitCanvas;return r&&r.clearBeforeDraw()&&r.getHitCanvas().getContext().clear(),la.prototype.drawHit.call(this,i,n),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return fe.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,n=!!this.hitCanvas._canvas.parentNode;n?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}gh.prototype.nodeType="Layer";pr(gh);K.addGetterSetter(gh,"imageSmoothingEnabled",!0);K.addGetterSetter(gh,"clearBeforeDraw",!0);K.addGetterSetter(gh,"hitGraphEnabled",!0,As());class dk extends gh{constructor(t){super(t),this.listening(!1),fe.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}dk.prototype.nodeType="FastLayer";pr(dk);class K0 extends la{_validateAdd(t){var n=t.getType();n!=="Group"&&n!=="Shape"&&fe.throw("You may only add groups and shapes to groups.")}}K0.prototype.nodeType="Group";pr(K0);var Tw=function(){return E0.performance&&E0.performance.now?function(){return E0.performance.now()}:function(){return new Date().getTime()}}();class Ma{constructor(t,n){this.id=Ma.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Tw(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(t){var n=[];return t?t.length>0?n=t:n=[t]:n=[],this.layers=n,this}getLayers(){return this.layers}addLayer(t){var n=this.layers,r=n.length,i;for(i=0;ithis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return t===void 0&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=FM,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=$M,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===FM?this.setTime(t):this.state===$M&&this.setTime(this.duration-t)}pause(){this.state=r9e,this.fire("onPause")}getTimer(){return new Date().getTime()}}class Mr{constructor(t){var n=this,r=t.node,i=r._id,o,a=t.easing||Wm.Linear,s=!!t.yoyo,l;typeof t.duration>"u"?o=.3:t.duration===0?o=.001:o=t.duration,this.node=r,this._id=i9e++;var u=r.getLayer()||(r instanceof ot.Stage?r.getLayers():null);u||fe.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ma(function(){n.tween.onEnterFrame()},u),this.tween=new o9e(l,function(h){n._tweenFunc(h)},a,0,1,o*1e3,s),this._addListeners(),Mr.attrs[i]||(Mr.attrs[i]={}),Mr.attrs[i][this._id]||(Mr.attrs[i][this._id]={}),Mr.tweens[i]||(Mr.tweens[i]={});for(l in t)n9e[l]===void 0&&this._addAttr(l,t[l]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){var r=this.node,i=r._id,o,a,s,l,u,h,p,m;if(s=Mr.tweens[i][t],s&&delete Mr.attrs[i][s][t],o=r.getAttr(t),fe._isArray(n))if(a=[],u=Math.max(n.length,o.length),t==="points"&&n.length!==o.length&&(n.length>o.length?(p=o,o=fe._prepareArrayForTween(o,n,r.closed())):(h=n,n=fe._prepareArrayForTween(n,o,r.closed()))),t.indexOf("fill")===0)for(l=0;l{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueEnd&&t.setAttr("points",n.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,n=Mr.attrs[t._id][this._id];n.points&&n.points.trueStart&&t.points(n.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(t*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t=this.node._id,n=this._id,r=Mr.tweens[t],i;this.pause();for(i in r)delete Mr.tweens[t][i];delete Mr.attrs[t][n]}}Mr.attrs={};Mr.tweens={};Be.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()};var n=new Mr(e);n.play()};const Wm={BackEaseIn(e,t,n,r){var i=1.70158;return n*(e/=r)*e*((i+1)*e-i)+t},BackEaseOut(e,t,n,r){var i=1.70158;return n*((e=e/r-1)*e*((i+1)*e+i)+1)+t},BackEaseInOut(e,t,n,r){var i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,o){var a=0;return e===0?t:(e/=r)===1?t+n:(o||(o=r*.3),!i||i0?t:n),h=a*n,p=s*(s>0?t:n),m=l*(l>0?n:t);return{x:u,y:r?-1*m:p,width:h-u,height:m-p}}}Lu.prototype._centroid=!0;Lu.prototype.className="Arc";Lu.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Lu);K.addGetterSetter(Lu,"innerRadius",0,ze());K.addGetterSetter(Lu,"outerRadius",0,ze());K.addGetterSetter(Lu,"angle",0,ze());K.addGetterSetter(Lu,"clockwise",!1,As());function l9(e,t,n,r,i,o,a){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*s/(s+l),h=a*l/(s+l),p=n-u*(i-e),m=r-u*(o-t),v=n+h*(i-e),S=r+h*(o-t);return[p,m,v,S]}function WM(e,t){var n=e.length,r=[],i,o;for(i=2;i4){for(s=this.getTensionPoints(),l=s.length,u=o?0:4,o||t.quadraticCurveTo(s[0],s[1],s[2],s[3]);uh?u:h,E=u>h?1:u/h,P=u>h?h/u:1;t.translate(s,l),t.rotate(v),t.scale(E,P),t.arc(0,0,w,p,p+m,1-S),t.scale(1/E,1/P),t.rotate(-v),t.translate(-s,-l);break;case"z":r=!0,t.closePath();break}}!r&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(u){if(u.command==="A"){var h=u.points[4],p=u.points[5],m=u.points[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;S-=v){const w=Rn.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],S,0);t.push(w.x,w.y)}else for(let S=h+v;Sthis.dataArray[r].pathLength;)t-=this.dataArray[r].pathLength,++r;if(r===i)return n=this.dataArray[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=this.dataArray[r].points.slice(0,2),{x:n[0],y:n[1]};var o=this.dataArray[r],a=o.points;switch(o.command){case"L":return Rn.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return Rn.getPointOnCubicBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return Rn.getPointOnQuadraticBezier(t/o.pathLength,o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var s=a[0],l=a[1],u=a[2],h=a[3],p=a[4],m=a[5],v=a[6];return p+=m*t/o.pathLength,Rn.getPointOnEllipticalArc(s,l,u,h,p,v)}return null}static getLineLength(t,n,r,i){return Math.sqrt((r-t)*(r-t)+(i-n)*(i-n))}static getPointOnLine(t,n,r,i,o,a,s){a===void 0&&(a=n),s===void 0&&(s=r);var l=(o-r)/(i-n+1e-8),u=Math.sqrt(t*t/(1+l*l));i0&&!isNaN(S[0]);){var k=null,T=[],M=l,I=u,R,N,z,$,W,q,de,H,J,re;switch(v){case"l":l+=S.shift(),u+=S.shift(),k="L",T.push(l,u);break;case"L":l=S.shift(),u=S.shift(),T.push(l,u);break;case"m":var oe=S.shift(),X=S.shift();if(l+=oe,u+=X,k="M",a.length>2&&a[a.length-1].command==="z"){for(var G=a.length-2;G>=0;G--)if(a[G].command==="M"){l=a[G].points[0]+oe,u=a[G].points[1]+X;break}}T.push(l,u),v="l";break;case"M":l=S.shift(),u=S.shift(),k="M",T.push(l,u),v="L";break;case"h":l+=S.shift(),k="L",T.push(l,u);break;case"H":l=S.shift(),k="L",T.push(l,u);break;case"v":u+=S.shift(),k="L",T.push(l,u);break;case"V":u=S.shift(),k="L",T.push(l,u);break;case"C":T.push(S.shift(),S.shift(),S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"c":T.push(l+S.shift(),u+S.shift(),l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"S":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,S.shift(),S.shift()),l=S.shift(),u=S.shift(),k="C",T.push(l,u);break;case"s":N=l,z=u,R=a[a.length-1],R.command==="C"&&(N=l+(l-R.points[2]),z=u+(u-R.points[3])),T.push(N,z,l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="C",T.push(l,u);break;case"Q":T.push(S.shift(),S.shift()),l=S.shift(),u=S.shift(),T.push(l,u);break;case"q":T.push(l+S.shift(),u+S.shift()),l+=S.shift(),u+=S.shift(),k="Q",T.push(l,u);break;case"T":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l=S.shift(),u=S.shift(),k="Q",T.push(N,z,l,u);break;case"t":N=l,z=u,R=a[a.length-1],R.command==="Q"&&(N=l+(l-R.points[0]),z=u+(u-R.points[1])),l+=S.shift(),u+=S.shift(),k="Q",T.push(N,z,l,u);break;case"A":$=S.shift(),W=S.shift(),q=S.shift(),de=S.shift(),H=S.shift(),J=l,re=u,l=S.shift(),u=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,re,l,u,de,H,$,W,q);break;case"a":$=S.shift(),W=S.shift(),q=S.shift(),de=S.shift(),H=S.shift(),J=l,re=u,l+=S.shift(),u+=S.shift(),k="A",T=this.convertEndpointToCenterParameterization(J,re,l,u,de,H,$,W,q);break}a.push({command:k||v,points:T,start:{x:M,y:I},pathLength:this.calcLength(M,I,k||v,T)})}(v==="z"||v==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,n,r,i){var o,a,s,l,u=Rn;switch(r){case"L":return u.getLineLength(t,n,i[0],i[1]);case"C":for(o=0,a=u.getPointOnCubicBezier(0,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),l=.01;l<=1;l+=.01)s=u.getPointOnCubicBezier(l,t,n,i[0],i[1],i[2],i[3],i[4],i[5]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"Q":for(o=0,a=u.getPointOnQuadraticBezier(0,t,n,i[0],i[1],i[2],i[3]),l=.01;l<=1;l+=.01)s=u.getPointOnQuadraticBezier(l,t,n,i[0],i[1],i[2],i[3]),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;return o;case"A":o=0;var h=i[4],p=i[5],m=i[4]+p,v=Math.PI/180;if(Math.abs(h-m)m;l-=v)s=u.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),o+=u.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(l=h+v;l1&&(s*=Math.sqrt(v),l*=Math.sqrt(v));var S=Math.sqrt((s*s*(l*l)-s*s*(m*m)-l*l*(p*p))/(s*s*(m*m)+l*l*(p*p)));o===a&&(S*=-1),isNaN(S)&&(S=0);var w=S*s*m/l,E=S*-l*p/s,P=(t+r)/2+Math.cos(h)*w-Math.sin(h)*E,k=(n+i)/2+Math.sin(h)*w+Math.cos(h)*E,T=function(W){return Math.sqrt(W[0]*W[0]+W[1]*W[1])},M=function(W,q){return(W[0]*q[0]+W[1]*q[1])/(T(W)*T(q))},I=function(W,q){return(W[0]*q[1]=1&&($=0),a===0&&$>0&&($=$-2*Math.PI),a===1&&$<0&&($=$+2*Math.PI),[P,k,s,l,R,$,h,a]}}Rn.prototype.className="Path";Rn.prototype._attrsAffectingSize=["data"];pr(Rn);K.addGetterSetter(Rn,"data");class mh extends Mu{_sceneFunc(t){super._sceneFunc(t);var n=Math.PI*2,r=this.points(),i=r,o=this.tension()!==0&&r.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=r.length,l,u;if(o){const m=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],r[s-2],r[s-1]],v=Rn.calcLength(i[i.length-4],i[i.length-3],"C",m),S=Rn.getPointOnQuadraticBezier(Math.min(1,1-a/v),m[0],m[1],m[2],m[3],m[4],m[5]);l=r[s-2]-S.x,u=r[s-1]-S.y}else l=r[s-2]-r[s-4],u=r[s-1]-r[s-3];var h=(Math.atan2(u,l)+n)%n,p=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(r[s-2],r[s-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(r[0],r[1]),o?(l=(i[0]+i[2])/2-r[0],u=(i[1]+i[3])/2-r[1]):(l=r[2]-r[0],u=r[3]-r[1]),t.rotate((Math.atan2(-u,-l)+n)%n),t.moveTo(0,0),t.lineTo(-a,p/2),t.lineTo(-a,-p/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var n=this.dashEnabled();n&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),n&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),n=this.pointerWidth()/2;return{x:t.x-n,y:t.y-n,width:t.width+n*2,height:t.height+n*2}}}mh.prototype.className="Arrow";pr(mh);K.addGetterSetter(mh,"pointerLength",10,ze());K.addGetterSetter(mh,"pointerWidth",10,ze());K.addGetterSetter(mh,"pointerAtBeginning",!1);K.addGetterSetter(mh,"pointerAtEnding",!0);class h1 extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}h1.prototype._centroid=!0;h1.prototype.className="Circle";h1.prototype._attrsAffectingSize=["radius"];pr(h1);K.addGetterSetter(h1,"radius",0,ze());class wd extends Me{_sceneFunc(t){var n=this.radiusX(),r=this.radiusY();t.beginPath(),t.save(),n!==r&&t.scale(1,r/n),t.arc(0,0,n,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}wd.prototype.className="Ellipse";wd.prototype._centroid=!0;wd.prototype._attrsAffectingSize=["radiusX","radiusY"];pr(wd);K.addComponentsGetterSetter(wd,"radius",["x","y"]);K.addGetterSetter(wd,"radiusX",0,ze());K.addGetterSetter(wd,"radiusY",0,ze());class Ls extends Me{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const n=this.getWidth(),r=this.getHeight(),i=this.attrs.image;let o;if(i){const a=this.attrs.cropWidth,s=this.attrs.cropHeight;a&&s?o=[i,this.cropX(),this.cropY(),a,s,0,0,n,r]:o=[i,0,0,n,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,o)}_hitFunc(t){var n=this.width(),r=this.height();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,n;return(t=this.attrs.width)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.width}getHeight(){var t,n;return(t=this.attrs.height)!==null&&t!==void 0?t:(n=this.image())===null||n===void 0?void 0:n.height}static fromURL(t,n,r=null){var i=fe.createImageElement();i.onload=function(){var o=new Ls({image:i});n(o)},i.onerror=r,i.crossOrigin="Anonymous",i.src=t}}Ls.prototype.className="Image";pr(Ls);K.addGetterSetter(Ls,"image");K.addComponentsGetterSetter(Ls,"crop",["x","y","width","height"]);K.addGetterSetter(Ls,"cropX",0,ze());K.addGetterSetter(Ls,"cropY",0,ze());K.addGetterSetter(Ls,"cropWidth",0,ze());K.addGetterSetter(Ls,"cropHeight",0,ze());var TW=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],a9e="Change.konva",s9e="none",u9="up",c9="right",d9="down",f9="left",l9e=TW.length;class fk extends K0{constructor(t){super(t),this.on("add.konva",function(n){this._addListeners(n.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var n=this,r,i=function(){n._sync()};for(r=0;r{n=Math.min(n,a.x),r=Math.max(r,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:n,y:i,width:r-n,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}yh.prototype.className="RegularPolygon";yh.prototype._centroid=!0;yh.prototype._attrsAffectingSize=["radius"];pr(yh);K.addGetterSetter(yh,"radius",0,ze());K.addGetterSetter(yh,"sides",0,ze());var VM=Math.PI*2;class Sh extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,VM,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),VM,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sh.prototype.className="Ring";Sh.prototype._centroid=!0;Sh.prototype._attrsAffectingSize=["innerRadius","outerRadius"];pr(Sh);K.addGetterSetter(Sh,"innerRadius",0,ze());K.addGetterSetter(Sh,"outerRadius",0,ze());class Nl extends Me{constructor(t){super(t),this._updated=!0,this.anim=new Ma(()=>{var n=this._updated;return this._updated=!1,n}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){!this.anim.isRunning()||(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+0],l=o[i+1],u=o[i+2],h=o[i+3],p=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,u,h),t.closePath(),t.fillStrokeShape(this)),p)if(a){var m=a[n],v=r*2;t.drawImage(p,s,l,u,h,m[v+0],m[v+1],u,h)}else t.drawImage(p,s,l,u,h,0,0,u,h)}_hitFunc(t){var n=this.animation(),r=this.frameIndex(),i=r*4,o=this.animations()[n],a=this.frameOffsets(),s=o[i+2],l=o[i+3];if(t.beginPath(),a){var u=a[n],h=r*2;t.rect(u[h+0],u[h+1],s,l)}else t.rect(0,0,s,l);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),n=this.animation(),r=this.animations(),i=r[n],o=i.length/4;t{t=t.trim();const n=t.indexOf(" ")>=0,r=t.indexOf('"')>=0||t.indexOf("'")>=0;return n&&!r&&(t=`"${t}"`),t}).join(", ")}var n3;function Lw(){return n3||(n3=fe.createCanvasElement().getContext(d9e),n3)}function w9e(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function C9e(e){e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function _9e(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}class hr extends Me{constructor(t){super(_9e(t)),this._partialTextX=0,this._partialTextY=0;for(var n=0;n1&&(P+=a)}}}_hitFunc(t){var n=this.getWidth(),r=this.getHeight();t.beginPath(),t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}setText(t){var n=fe._isString(t)?t:t==null?"":t+"";return this._setAttr(f9e,n),this}getWidth(){var t=this.attrs.width===Op||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===Op||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return fe.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var n=Lw(),r=this.fontSize(),i;return n.save(),n.font=this._getContextFont(),i=n.measureText(t),n.restore(),{width:i.width,height:r}}_getContextFont(){return this.fontStyle()+t3+this.fontVariant()+t3+(this.fontSize()+m9e)+x9e(this.fontFamily())}_addTextLine(t){this.align()===Ug&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var n=this.letterSpacing(),r=t.length;return Lw().measureText(t).width+(r?n*(r-1):0)}_setTextData(){var t=this.text().split(` -`),n=+this.fontSize(),r=0,i=this.lineHeight()*n,o=this.attrs.width,a=this.attrs.height,s=o!==Op&&o!==void 0,l=a!==Op&&a!==void 0,u=this.padding(),h=o-u*2,p=a-u*2,m=0,v=this.wrap(),S=v!==jM,w=v!==S9e&&S,E=this.ellipsis();this.textArr=[],Lw().font=this._getContextFont();for(var P=E?this._getTextWidth(Aw):0,k=0,T=t.length;kh)for(;M.length>0;){for(var R=0,N=M.length,z="",$=0;R>>1,q=M.slice(0,W+1),de=this._getTextWidth(q)+P;de<=h?(R=W+1,z=q,$=de):N=W}if(z){if(w){var H,J=M[z.length],re=J===t3||J===UM;re&&$<=h?H=z.length:H=Math.max(z.lastIndexOf(t3),z.lastIndexOf(UM))+1,H>0&&(R=H,z=z.slice(0,R),$=this._getTextWidth(z))}z=z.trimRight(),this._addTextLine(z),r=Math.max(r,$),m+=i;var oe=this._shouldHandleEllipsis(m);if(oe){this._tryToAddEllipsisToLastLine();break}if(M=M.slice(R),M=M.trimLeft(),M.length>0&&(I=this._getTextWidth(M),I<=h)){this._addTextLine(M),m+=i,r=Math.max(r,I);break}}else break}else this._addTextLine(M),m+=i,r=Math.max(r,I),this._shouldHandleEllipsis(m)&&kp)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=n,this.textWidth=r}_shouldHandleEllipsis(t){var n=+this.fontSize(),r=this.lineHeight()*n,i=this.attrs.height,o=i!==Op&&i!==void 0,a=this.padding(),s=i-a*2,l=this.wrap(),u=l!==jM;return!u||o&&t+r>s}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,n=t!==Op&&t!==void 0,r=this.padding(),i=t-r*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(n){var s=this._getTextWidth(a.text+Aw)=1){var r=n[0].p0;t.moveTo(r.x,r.y)}for(var i=0;i0&&(s+=t.dataArray[l].pathLength);var u=0;i==="center"&&(u=Math.max(0,s/2-a/2)),i==="right"&&(u=Math.max(0,s-a));for(var h=AW(this.text()),p=this.text().split(" ").length-1,m,v,S,w=-1,E=0,P=function(){E=0;for(var de=t.dataArray,H=w+1;H0)return w=H,de[H];de[H].command==="M"&&(m={x:de[H].points[0],y:de[H].points[1]})}return{}},k=function(de){var H=t._getTextSize(de).width+r;de===" "&&i==="justify"&&(H+=(s-a)/p);var J=0,re=0;for(v=void 0;Math.abs(H-J)/H>.01&&re<20;){re++;for(var oe=J;S===void 0;)S=P(),S&&oe+S.pathLengthH?v=Rn.getPointOnLine(H,m.x,m.y,S.points[0],S.points[1],m.x,m.y):S=void 0;break;case"A":var G=S.points[4],Q=S.points[5],j=S.points[4]+Q;E===0?E=G+1e-8:H>J?E+=Math.PI/180*Q/Math.abs(Q):E-=Math.PI/360*Q/Math.abs(Q),(Q<0&&E=0&&E>j)&&(E=j,X=!0),v=Rn.getPointOnEllipticalArc(S.points[0],S.points[1],S.points[2],S.points[3],E,S.points[6]);break;case"C":E===0?H>S.pathLength?E=1e-8:E=H/S.pathLength:H>J?E+=(H-J)/S.pathLength/2:E=Math.max(E-(J-H)/S.pathLength/2,0),E>1&&(E=1,X=!0),v=Rn.getPointOnCubicBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3],S.points[4],S.points[5]);break;case"Q":E===0?E=H/S.pathLength:H>J?E+=(H-J)/S.pathLength:E-=(J-H)/S.pathLength,E>1&&(E=1,X=!0),v=Rn.getPointOnQuadraticBezier(E,S.start.x,S.start.y,S.points[0],S.points[1],S.points[2],S.points[3]);break}v!==void 0&&(J=Rn.getLineLength(m.x,m.y,v.x,v.y)),X&&(X=!1,S=void 0)}},T="C",M=t._getTextSize(T).width+r,I=u/M-1,R=0;Re+`.${DW}`).join(" "),YM="nodesRect",P9e=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],T9e={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const A9e="ontouchstart"in ot._global;function L9e(e,t){if(e==="rotater")return"crosshair";t+=fe.degToRad(T9e[e]||0);var n=(fe.radToDeg(t)%360+360)%360;return fe._inRange(n,315+22.5,360)||fe._inRange(n,0,22.5)?"ns-resize":fe._inRange(n,45-22.5,45+22.5)?"nesw-resize":fe._inRange(n,90-22.5,90+22.5)?"ew-resize":fe._inRange(n,135-22.5,135+22.5)?"nwse-resize":fe._inRange(n,180-22.5,180+22.5)?"ns-resize":fe._inRange(n,225-22.5,225+22.5)?"nesw-resize":fe._inRange(n,270-22.5,270+22.5)?"ew-resize":fe._inRange(n,315-22.5,315+22.5)?"nwse-resize":(fe.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var h5=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],qM=1e8;function M9e(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function zW(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:i})}function O9e(e,t){const n=M9e(e);return zW(e,t,n)}function I9e(e,t,n){let r=t;for(let i=0;i{const i=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=r._attrsAffectingSize.map(a=>a+"Change."+this._getEventNamespace()).join(" ");r.on(o,i),r.on(P9e.map(a=>a+`.${this._getEventNamespace()}`).join(" "),i),r.on(`absoluteTransformChange.${this._getEventNamespace()}`,i),this._proxyDrag(r)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let n;t.on(`dragstart.${this._getEventNamespace()}`,r=>{n=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(r,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,r=>{if(!n)return;const i=t.getAbsolutePosition(),o=i.x-n.x,a=i.y-n.y;this.nodes().forEach(s=>{if(s===t||s.isDragging())return;const l=s.getAbsolutePosition();s.setAbsolutePosition({x:l.x+o,y:l.y+a}),s.startDrag(r)}),n=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(YM),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(YM,this.__getNodeRect)}__getNodeShape(t,n=this.rotation(),r){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=t.getAbsoluteScale(r),a=t.getAbsolutePosition(r),s=i.x*o.x-t.offsetX()*o.x,l=i.y*o.y-t.offsetY()*o.y;const u=(ot.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(u)+l*Math.sin(-u),y:a.y+l*Math.cos(u)+s*Math.sin(u),width:i.width*o.x,height:i.height*o.y,rotation:u};return zW(h,-ot.getAngle(n),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-qM,y:-qM,width:0,height:0,rotation:0};const n=[];this.nodes().map(u=>{const h=u.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var p=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],m=u.getAbsoluteTransform();p.forEach(function(v){var S=m.point(v);n.push(S)})});const r=new ra;r.rotate(-ot.getAngle(this.rotation()));var i,o,a,s;n.forEach(function(u){var h=r.point(u);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),r.invert();const l=r.point({x:i,y:o});return{x:l.x,y:l.y,width:a-i,height:s-o,rotation:ot.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),h5.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var n=new a2({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:A9e?10:"auto"}),r=this;n.on("mousedown touchstart",function(i){r._handleMouseDown(i)}),n.on("dragstart",i=>{n.stopDrag(),i.cancelBubble=!0}),n.on("dragend",i=>{i.cancelBubble=!0}),n.on("mouseenter",()=>{var i=ot.getAngle(this.rotation()),o=L9e(t,i);n.getStage().content&&(n.getStage().content.style.cursor=o),this._cursorChange=!0}),n.on("mouseout",()=>{n.getStage().content&&(n.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(n)}_createBack(){var t=new Me({name:"back",width:0,height:0,draggable:!0,sceneFunc(n){var r=this.getParent(),i=r.padding();n.beginPath(),n.rect(-i,-i,this.width()+i*2,this.height()+i*2),n.moveTo(this.width()/2,-i),r.rotateEnabled()&&n.lineTo(this.width()/2,-r.rotateAnchorOffset()*fe._sign(this.height())-i),n.fillStrokeShape(this)},hitFunc:(n,r)=>{if(!!this.shouldOverdrawWholeArea()){var i=this.padding();n.beginPath(),n.rect(-i,-i,r.width()+i*2,r.height()+i*2),n.fillStrokeShape(r)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",n=>{n.cancelBubble=!0}),t.on("dragmove",n=>{n.cancelBubble=!0}),t.on("dragend",n=>{n.cancelBubble=!0}),this.on("dragmove",n=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var n=this._getNodeRect(),r=n.width,i=n.height,o=Math.sqrt(Math.pow(r,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(r/o),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(l=>{l._fire("transformstart",{evt:t.evt,target:l})})}_handleMouseMove(t){var n,r,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const u=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),o.setAbsolutePosition(l);const h=o.getAbsolutePosition();if(!(u.x===h.x&&u.y===h.y)){if(this._movingAnchorName==="rotater"){var p=this._getNodeRect();n=o.x()-p.width/2,r=-o.y()+p.height/2;let de=Math.atan2(-r,n)+Math.PI/2;p.height<0&&(de-=Math.PI);var m=ot.getAngle(this.rotation());const H=m+de,J=ot.getAngle(this.rotationSnapTolerance()),oe=I9e(this.rotationSnaps(),H,J)-p.rotation,X=O9e(p,oe);this._fitNodesInto(X,t);return}var v=this.keepRatio()||t.shiftKey,k=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-left").x()>S.x?-1:1,E=this.findOne(".top-left").y()>S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-left").x(S.x-n),this.findOne(".top-left").y(S.y-r)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-S.x,2)+Math.pow(S.y-o.y(),2));var w=this.findOne(".top-right").x()S.y?-1:1;n=i*this.cos*w,r=i*this.sin*E,this.findOne(".top-right").x(S.x+n),this.findOne(".top-right").y(S.y-r)}var P=o.position();this.findOne(".top-left").y(P.y),this.findOne(".bottom-right").x(P.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var S=k?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(S.x-o.x(),2)+Math.pow(o.y()-S.y,2));var w=S.x{r._fire("transformend",{evt:t,target:r})}),this._movingAnchorName=null}}_fitNodesInto(t,n){var r=this._getNodeRect();const i=1;if(fe._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(fe._inRange(t.height,-this.padding()*2-i,i)){this.update();return}const o=this.flipEnabled();var a=new ra;if(a.rotate(ot.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const p=a.point({x:-this.padding()*2,y:0});if(t.x+=p.x,t.y+=p.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,!o){this.update();return}}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const p=a.point({x:this.padding()*2,y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.width+=this.padding()*2,!o){this.update();return}}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const p=a.point({x:0,y:-this.padding()*2});if(t.x+=p.x,t.y+=p.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const p=a.point({x:0,y:this.padding()*2});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=p.x,this._anchorDragOffset.y-=p.y,t.height+=this.padding()*2,!o){this.update();return}}if(this.boundBoxFunc()){const p=this.boundBoxFunc()(r,t);p?t=p:fe.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new ra;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/s,r.height/s);const u=new ra;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach(p=>{var m;const v=p.getParent().getAbsoluteTransform(),S=p.getTransform().copy();S.translate(p.offsetX(),p.offsetY());const w=new ra;w.multiply(v.copy().invert()).multiply(h).multiply(v).multiply(S);const E=w.decompose();p.setAttrs(E),this._fire("transform",{evt:n,target:p}),p._fire("transform",{evt:n,target:p}),(m=p.getLayer())===null||m===void 0||m.batchDraw()}),this.rotation(fe._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,n){this.findOne(t).setAttrs(n)}update(){var t,n=this._getNodeRect();this.rotation(fe._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();this.find("._anchor").forEach(u=>{u.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:l/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:l/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:l/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*fe._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),K0.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Be.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function R9e(e){return e instanceof Array||fe.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){h5.indexOf(t)===-1&&fe.warn("Unknown anchor name: "+t+". Available names are: "+h5.join(", "))}),e||[]}Cn.prototype.className="Transformer";pr(Cn);K.addGetterSetter(Cn,"enabledAnchors",h5,R9e);K.addGetterSetter(Cn,"flipEnabled",!0,As());K.addGetterSetter(Cn,"resizeEnabled",!0);K.addGetterSetter(Cn,"anchorSize",10,ze());K.addGetterSetter(Cn,"rotateEnabled",!0);K.addGetterSetter(Cn,"rotationSnaps",[]);K.addGetterSetter(Cn,"rotateAnchorOffset",50,ze());K.addGetterSetter(Cn,"rotationSnapTolerance",5,ze());K.addGetterSetter(Cn,"borderEnabled",!0);K.addGetterSetter(Cn,"anchorStroke","rgb(0, 161, 255)");K.addGetterSetter(Cn,"anchorStrokeWidth",1,ze());K.addGetterSetter(Cn,"anchorFill","white");K.addGetterSetter(Cn,"anchorCornerRadius",0,ze());K.addGetterSetter(Cn,"borderStroke","rgb(0, 161, 255)");K.addGetterSetter(Cn,"borderStrokeWidth",1,ze());K.addGetterSetter(Cn,"borderDash");K.addGetterSetter(Cn,"keepRatio",!0);K.addGetterSetter(Cn,"centeredScaling",!1);K.addGetterSetter(Cn,"ignoreStroke",!1);K.addGetterSetter(Cn,"padding",0,ze());K.addGetterSetter(Cn,"node");K.addGetterSetter(Cn,"nodes");K.addGetterSetter(Cn,"boundBoxFunc");K.addGetterSetter(Cn,"anchorDragBoundFunc");K.addGetterSetter(Cn,"shouldOverdrawWholeArea",!1);K.addGetterSetter(Cn,"useSingleNodeRotation",!0);K.backCompat(Cn,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Ou extends Me{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,ot.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}Ou.prototype.className="Wedge";Ou.prototype._centroid=!0;Ou.prototype._attrsAffectingSize=["radius"];pr(Ou);K.addGetterSetter(Ou,"radius",0,ze());K.addGetterSetter(Ou,"angle",0,ze());K.addGetterSetter(Ou,"clockwise",!1);K.backCompat(Ou,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});function KM(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var N9e=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],D9e=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function z9e(e,t){var n=e.data,r=e.width,i=e.height,o,a,s,l,u,h,p,m,v,S,w,E,P,k,T,M,I,R,N,z,$,W,q,de,H=t+t+1,J=r-1,re=i-1,oe=t+1,X=oe*(oe+1)/2,G=new KM,Q=null,j=G,Z=null,me=null,Se=N9e[t],xe=D9e[t];for(s=1;s>xe,q!==0?(q=255/q,n[h]=(m*Se>>xe)*q,n[h+1]=(v*Se>>xe)*q,n[h+2]=(S*Se>>xe)*q):n[h]=n[h+1]=n[h+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=p+((l=o+t+1)>xe,q>0?(q=255/q,n[l]=(m*Se>>xe)*q,n[l+1]=(v*Se>>xe)*q,n[l+2]=(S*Se>>xe)*q):n[l]=n[l+1]=n[l+2]=0,m-=E,v-=P,S-=k,w-=T,E-=Z.r,P-=Z.g,k-=Z.b,T-=Z.a,l=o+((l=a+oe)0&&z9e(t,n)};K.addGetterSetter(Be,"blurRadius",0,ze(),K.afterSetFilter);const F9e=function(e){var t=this.brightness()*255,n=e.data,r=n.length,i;for(i=0;i255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,n[s]=i,n[s+1]=o,n[s+2]=a};K.addGetterSetter(Be,"contrast",0,ze(),K.afterSetFilter);const H9e=function(e){var t=this.embossStrength()*10,n=this.embossWhiteLevel()*255,r=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=e.data,l=e.width,u=e.height,h=l*4,p=u;switch(r){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:fe.error("Unknown emboss direction: "+r)}do{var m=(p-1)*h,v=o;p+v<1&&(v=0),p+v>u&&(v=0);var S=(p-1+v)*l*4,w=l;do{var E=m+(w-1)*4,P=a;w+P<1&&(P=0),w+P>l&&(P=0);var k=S+(w-1+P)*4,T=s[E]-s[k],M=s[E+1]-s[k+1],I=s[E+2]-s[k+2],R=T,N=R>0?R:-R,z=M>0?M:-M,$=I>0?I:-I;if(z>N&&(R=M),$>N&&(R=I),R*=t,i){var W=s[E]+R,q=s[E+1]+R,de=s[E+2]+R;s[E]=W>255?255:W<0?0:W,s[E+1]=q>255?255:q<0?0:q,s[E+2]=de>255?255:de<0?0:de}else{var H=n-R;H<0?H=0:H>255&&(H=255),s[E]=s[E+1]=s[E+2]=H}}while(--w)}while(--p)};K.addGetterSetter(Be,"embossStrength",.5,ze(),K.afterSetFilter);K.addGetterSetter(Be,"embossWhiteLevel",.5,ze(),K.afterSetFilter);K.addGetterSetter(Be,"embossDirection","top-left",null,K.afterSetFilter);K.addGetterSetter(Be,"embossBlend",!1,null,K.afterSetFilter);function Mw(e,t,n,r,i){var o=n-t,a=i-r,s;return o===0?r+a/2:a===0?r:(s=(e-t)/o,s=a*s+r,s)}const W9e=function(e){var t=e.data,n=t.length,r=t[0],i=r,o,a=t[1],s=a,l,u=t[2],h=u,p,m,v=this.enhance();if(v!==0){for(m=0;mi&&(i=o),l=t[m+1],ls&&(s=l),p=t[m+2],ph&&(h=p);i===r&&(i=255,r=0),s===a&&(s=255,a=0),h===u&&(h=255,u=0);var S,w,E,P,k,T,M,I,R;for(v>0?(w=i+v*(255-i),E=r-v*(r-0),k=s+v*(255-s),T=a-v*(a-0),I=h+v*(255-h),R=u-v*(u-0)):(S=(i+r)*.5,w=i+v*(i-S),E=r+v*(r-S),P=(s+a)*.5,k=s+v*(s-P),T=a+v*(a-P),M=(h+u)*.5,I=h+v*(h-M),R=u+v*(u-M)),m=0;mP?E:P;var k=a,T=o,M,I,R=360/T*Math.PI/180,N,z;for(I=0;IT?k:T;var M=a,I=o,R,N,z=n.polarRotation||0,$,W;for(h=0;ht&&(M=T,I=0,R=-1),i=0;i=0&&v=0&&S=0&&v=0&&S=255*4?255:0}return a}function t7e(e,t,n){for(var r=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],s=0;s=0&&v=0&&S=n))for(o=w;o=r||(a=(n*o+i)*4,s+=M[a+0],l+=M[a+1],u+=M[a+2],h+=M[a+3],T+=1);for(s=s/T,l=l/T,u=u/T,h=h/T,i=v;i=n))for(o=w;o=r||(a=(n*o+i)*4,M[a+0]=s,M[a+1]=l,M[a+2]=u,M[a+3]=h)}};K.addGetterSetter(Be,"pixelSize",8,ze(),K.afterSetFilter);const o7e=function(e){var t=Math.round(this.levels()*254)+1,n=e.data,r=n.length,i=255/t,o;for(o=0;o255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"blue",0,aW,K.afterSetFilter);const s7e=function(e){var t=e.data,n=t.length,r=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,l;for(s=0;s255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});K.addGetterSetter(Be,"blue",0,aW,K.afterSetFilter);K.addGetterSetter(Be,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});const l7e=function(e){var t=e.data,n=t.length,r,i,o,a;for(r=0;r127&&(u=255-u),h>127&&(h=255-h),p>127&&(p=255-p),t[l]=u,t[l+1]=h,t[l+2]=p}while(--s)}while(--o)},c7e=function(e){var t=this.threshold()*255,n=e.data,r=n.length,i;for(i=0;ise||A[V]!==O[se]){var he=` -`+A[V].replace(" at new "," at ");return d.displayName&&he.includes("")&&(he=he.replace("",d.displayName)),he}while(1<=V&&0<=se);break}}}finally{Rs=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?zl(d):""}var _h=Object.prototype.hasOwnProperty,Du=[],Ns=-1;function No(d){return{current:d}}function En(d){0>Ns||(d.current=Du[Ns],Du[Ns]=null,Ns--)}function vn(d,f){Ns++,Du[Ns]=d.current,d.current=f}var Do={},Cr=No(Do),Ur=No(!1),zo=Do;function Ds(d,f){var y=d.type.contextTypes;if(!y)return Do;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===f)return _.__reactInternalMemoizedMaskedChildContext;var A={},O;for(O in y)A[O]=f[O];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=A),A}function Gr(d){return d=d.childContextTypes,d!=null}function Ya(){En(Ur),En(Cr)}function Pd(d,f,y){if(Cr.current!==Do)throw Error(a(168));vn(Cr,f),vn(Ur,y)}function Fl(d,f,y){var _=d.stateNode;if(f=f.childContextTypes,typeof _.getChildContext!="function")return y;_=_.getChildContext();for(var A in _)if(!(A in f))throw Error(a(108,z(d)||"Unknown",A));return o({},y,_)}function qa(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Do,zo=Cr.current,vn(Cr,d),vn(Ur,Ur.current),!0}function Td(d,f,y){var _=d.stateNode;if(!_)throw Error(a(169));y?(d=Fl(d,f,zo),_.__reactInternalMemoizedMergedChildContext=d,En(Ur),En(Cr),vn(Cr,d)):En(Ur),vn(Ur,y)}var pi=Math.clz32?Math.clz32:Ad,kh=Math.log,Eh=Math.LN2;function Ad(d){return d>>>=0,d===0?32:31-(kh(d)/Eh|0)|0}var zs=64,uo=4194304;function Bs(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function $l(d,f){var y=d.pendingLanes;if(y===0)return 0;var _=0,A=d.suspendedLanes,O=d.pingedLanes,V=y&268435455;if(V!==0){var se=V&~A;se!==0?_=Bs(se):(O&=V,O!==0&&(_=Bs(O)))}else V=y&~A,V!==0?_=Bs(V):O!==0&&(_=Bs(O));if(_===0)return 0;if(f!==0&&f!==_&&(f&A)===0&&(A=_&-_,O=f&-f,A>=O||A===16&&(O&4194240)!==0))return f;if((_&4)!==0&&(_|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=_;0y;y++)f.push(d);return f}function va(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-pi(f),d[f]=y}function Md(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0>=V,A-=V,Ui=1<<32-pi(f)+A|y<Ft?(zr=kt,kt=null):zr=kt.sibling;var Yt=je(ge,kt,ye[Ft],He);if(Yt===null){kt===null&&(kt=zr);break}d&&kt&&Yt.alternate===null&&f(ge,kt),ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt,kt=zr}if(Ft===ye.length)return y(ge,kt),zn&&Fs(ge,Ft),Te;if(kt===null){for(;FtFt?(zr=kt,kt=null):zr=kt.sibling;var rs=je(ge,kt,Yt.value,He);if(rs===null){kt===null&&(kt=zr);break}d&&kt&&rs.alternate===null&&f(ge,kt),ue=O(rs,ue,Ft),Lt===null?Te=rs:Lt.sibling=rs,Lt=rs,kt=zr}if(Yt.done)return y(ge,kt),zn&&Fs(ge,Ft),Te;if(kt===null){for(;!Yt.done;Ft++,Yt=ye.next())Yt=At(ge,Yt.value,He),Yt!==null&&(ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return zn&&Fs(ge,Ft),Te}for(kt=_(ge,kt);!Yt.done;Ft++,Yt=ye.next())Yt=Fn(kt,ge,Ft,Yt.value,He),Yt!==null&&(d&&Yt.alternate!==null&&kt.delete(Yt.key===null?Ft:Yt.key),ue=O(Yt,ue,Ft),Lt===null?Te=Yt:Lt.sibling=Yt,Lt=Yt);return d&&kt.forEach(function(ai){return f(ge,ai)}),zn&&Fs(ge,Ft),Te}function qo(ge,ue,ye,He){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case l:e:{for(var Te=ye.key,Lt=ue;Lt!==null;){if(Lt.key===Te){if(Te=ye.type,Te===h){if(Lt.tag===7){y(ge,Lt.sibling),ue=A(Lt,ye.props.children),ue.return=ge,ge=ue;break e}}else if(Lt.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===T&&z1(Te)===Lt.type){y(ge,Lt.sibling),ue=A(Lt,ye.props),ue.ref=ba(ge,Lt,ye),ue.return=ge,ge=ue;break e}y(ge,Lt);break}else f(ge,Lt);Lt=Lt.sibling}ye.type===h?(ue=Js(ye.props.children,ge.mode,He,ye.key),ue.return=ge,ge=ue):(He=af(ye.type,ye.key,ye.props,null,ge.mode,He),He.ref=ba(ge,ue,ye),He.return=ge,ge=He)}return V(ge);case u:e:{for(Lt=ye.key;ue!==null;){if(ue.key===Lt)if(ue.tag===4&&ue.stateNode.containerInfo===ye.containerInfo&&ue.stateNode.implementation===ye.implementation){y(ge,ue.sibling),ue=A(ue,ye.children||[]),ue.return=ge,ge=ue;break e}else{y(ge,ue);break}else f(ge,ue);ue=ue.sibling}ue=el(ye,ge.mode,He),ue.return=ge,ge=ue}return V(ge);case T:return Lt=ye._init,qo(ge,ue,Lt(ye._payload),He)}if(re(ye))return Pn(ge,ue,ye,He);if(R(ye))return er(ge,ue,ye,He);Ni(ge,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,ue!==null&&ue.tag===6?(y(ge,ue.sibling),ue=A(ue,ye),ue.return=ge,ge=ue):(y(ge,ue),ue=hp(ye,ge.mode,He),ue.return=ge,ge=ue),V(ge)):y(ge,ue)}return qo}var Yu=S2(!0),b2=S2(!1),Wd={},po=No(Wd),xa=No(Wd),ie=No(Wd);function be(d){if(d===Wd)throw Error(a(174));return d}function ve(d,f){vn(ie,f),vn(xa,d),vn(po,Wd),d=X(f),En(po),vn(po,d)}function Ge(){En(po),En(xa),En(ie)}function _t(d){var f=be(ie.current),y=be(po.current);f=G(y,d.type,f),y!==f&&(vn(xa,d),vn(po,f))}function Qt(d){xa.current===d&&(En(po),En(xa))}var It=No(0);function ln(d){for(var f=d;f!==null;){if(f.tag===13){var y=f.memoizedState;if(y!==null&&(y=y.dehydrated,y===null||Ru(y)||Ed(y)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===d)break;for(;f.sibling===null;){if(f.return===null||f.return===d)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Vd=[];function B1(){for(var d=0;dy?y:4,d(!0);var _=qu.transition;qu.transition={};try{d(!1),f()}finally{Ht=y,qu.transition=_}}function tc(){return vi().memoizedState}function j1(d,f,y){var _=Tr(d);if(y={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null},rc(d))ic(f,y);else if(y=ju(d,f,y,_),y!==null){var A=oi();vo(y,d,_,A),Kd(y,f,_)}}function nc(d,f,y){var _=Tr(d),A={lane:_,action:y,hasEagerState:!1,eagerState:null,next:null};if(rc(d))ic(f,A);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var V=f.lastRenderedState,se=O(V,y);if(A.hasEagerState=!0,A.eagerState=se,U(se,V)){var he=f.interleaved;he===null?(A.next=A,$d(f)):(A.next=he.next,he.next=A),f.interleaved=A;return}}catch{}finally{}y=ju(d,f,A,_),y!==null&&(A=oi(),vo(y,d,_,A),Kd(y,f,_))}}function rc(d){var f=d.alternate;return d===yn||f!==null&&f===yn}function ic(d,f){Ud=en=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function Kd(d,f,y){if((y&4194240)!==0){var _=f.lanes;_&=d.pendingLanes,y|=_,f.lanes=y,Hl(d,y)}}var Za={readContext:Gi,useCallback:ti,useContext:ti,useEffect:ti,useImperativeHandle:ti,useInsertionEffect:ti,useLayoutEffect:ti,useMemo:ti,useReducer:ti,useRef:ti,useState:ti,useDebugValue:ti,useDeferredValue:ti,useTransition:ti,useMutableSource:ti,useSyncExternalStore:ti,useId:ti,unstable_isNewReconciler:!1},pb={readContext:Gi,useCallback:function(d,f){return Yr().memoizedState=[d,f===void 0?null:f],d},useContext:Gi,useEffect:C2,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,Gl(4194308,4,mr.bind(null,f,d),y)},useLayoutEffect:function(d,f){return Gl(4194308,4,d,f)},useInsertionEffect:function(d,f){return Gl(4,2,d,f)},useMemo:function(d,f){var y=Yr();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var _=Yr();return f=y!==void 0?y(f):f,_.memoizedState=_.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},_.queue=d,d=d.dispatch=j1.bind(null,yn,d),[_.memoizedState,d]},useRef:function(d){var f=Yr();return d={current:d},f.memoizedState=d},useState:w2,useDebugValue:V1,useDeferredValue:function(d){return Yr().memoizedState=d},useTransition:function(){var d=w2(!1),f=d[0];return d=G1.bind(null,d[1]),Yr().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var _=yn,A=Yr();if(zn){if(y===void 0)throw Error(a(407));y=y()}else{if(y=f(),Dr===null)throw Error(a(349));(Ul&30)!==0||W1(_,f,y)}A.memoizedState=y;var O={value:y,getSnapshot:f};return A.queue=O,C2(Ws.bind(null,_,O,d),[d]),_.flags|=2048,Yd(9,Ju.bind(null,_,O,y,f),void 0,null),y},useId:function(){var d=Yr(),f=Dr.identifierPrefix;if(zn){var y=ya,_=Ui;y=(_&~(1<<32-pi(_)-1)).toString(32)+y,f=":"+f+"R"+y,y=Ku++,0rp&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304)}else{if(!_)if(d=ln(O),d!==null){if(f.flags|=128,_=!0,d=d.updateQueue,d!==null&&(f.updateQueue=d,f.flags|=4),sc(A,!0),A.tail===null&&A.tailMode==="hidden"&&!O.alternate&&!zn)return ni(f),null}else 2*Wn()-A.renderingStartTime>rp&&y!==1073741824&&(f.flags|=128,_=!0,sc(A,!1),f.lanes=4194304);A.isBackwards?(O.sibling=f.child,f.child=O):(d=A.last,d!==null?d.sibling=O:f.child=O,A.last=O)}return A.tail!==null?(f=A.tail,A.rendering=f,A.tail=f.sibling,A.renderingStartTime=Wn(),f.sibling=null,d=It.current,vn(It,_?d&1|2:d&1),f):(ni(f),null);case 22:case 23:return mc(),y=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==y&&(f.flags|=8192),y&&(f.mode&1)!==0?(Yi&1073741824)!==0&&(ni(f),Xe&&f.subtreeFlags&6&&(f.flags|=8192)):ni(f),null;case 24:return null;case 25:return null}throw Error(a(156,f.tag))}function eg(d,f){switch(I1(f),f.tag){case 1:return Gr(f.type)&&Ya(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return Ge(),En(Ur),En(Cr),B1(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return Qt(f),null;case 13:if(En(It),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(a(340));Vu()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return En(It),null;case 4:return Ge(),null;case 10:return Bd(f.type._context),null;case 22:case 23:return mc(),null;case 24:return null;default:return null}}var Us=!1,kr=!1,bb=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function lc(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(_){Un(d,f,_)}else y.current=null}function Uo(d,f,y){try{y()}catch(_){Un(d,f,_)}}var Uh=!1;function Yl(d,f){for(Q(d.containerInfo),Qe=f;Qe!==null;)if(d=Qe,f=d.child,(d.subtreeFlags&1028)!==0&&f!==null)f.return=d,Qe=f;else for(;Qe!==null;){d=Qe;try{var y=d.alternate;if((d.flags&1024)!==0)switch(d.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,A=y.memoizedState,O=d.stateNode,V=O.getSnapshotBeforeUpdate(d.elementType===d.type?_:Fo(d.type,_),A);O.__reactInternalSnapshotBeforeUpdate=V}break;case 3:Xe&&Ms(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(se){Un(d,d.return,se)}if(f=d.sibling,f!==null){f.return=d.return,Qe=f;break}Qe=d.return}return y=Uh,Uh=!1,y}function ri(d,f,y){var _=f.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var A=_=_.next;do{if((A.tag&d)===d){var O=A.destroy;A.destroy=void 0,O!==void 0&&Uo(f,y,O)}A=A.next}while(A!==_)}}function Gh(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var _=y.create;y.destroy=_()}y=y.next}while(y!==f)}}function jh(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=oe(y);break;default:d=y}typeof f=="function"?f(d):f.current=d}}function tg(d){var f=d.alternate;f!==null&&(d.alternate=null,tg(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&<(f)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function uc(d){return d.tag===5||d.tag===3||d.tag===4}function Ja(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||uc(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Yh(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?$e(y,d,f):Mt(y,d);else if(_!==4&&(d=d.child,d!==null))for(Yh(d,f,y),d=d.sibling;d!==null;)Yh(d,f,y),d=d.sibling}function ng(d,f,y){var _=d.tag;if(_===5||_===6)d=d.stateNode,f?Dn(y,d,f):Ee(y,d);else if(_!==4&&(d=d.child,d!==null))for(ng(d,f,y),d=d.sibling;d!==null;)ng(d,f,y),d=d.sibling}var yr=null,Go=!1;function jo(d,f,y){for(y=y.child;y!==null;)Er(d,f,y),y=y.sibling}function Er(d,f,y){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(sn,y)}catch{}switch(y.tag){case 5:kr||lc(y,f);case 6:if(Xe){var _=yr,A=Go;yr=null,jo(d,f,y),yr=_,Go=A,yr!==null&&(Go?tt(yr,y.stateNode):pt(yr,y.stateNode))}else jo(d,f,y);break;case 18:Xe&&yr!==null&&(Go?T1(yr,y.stateNode):P1(yr,y.stateNode));break;case 4:Xe?(_=yr,A=Go,yr=y.stateNode.containerInfo,Go=!0,jo(d,f,y),yr=_,Go=A):(Et&&(_=y.stateNode.containerInfo,A=ma(_),Iu(_,A)),jo(d,f,y));break;case 0:case 11:case 14:case 15:if(!kr&&(_=y.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){A=_=_.next;do{var O=A,V=O.destroy;O=O.tag,V!==void 0&&((O&2)!==0||(O&4)!==0)&&Uo(y,f,V),A=A.next}while(A!==_)}jo(d,f,y);break;case 1:if(!kr&&(lc(y,f),_=y.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=y.memoizedProps,_.state=y.memoizedState,_.componentWillUnmount()}catch(se){Un(y,f,se)}jo(d,f,y);break;case 21:jo(d,f,y);break;case 22:y.mode&1?(kr=(_=kr)||y.memoizedState!==null,jo(d,f,y),kr=_):jo(d,f,y);break;default:jo(d,f,y)}}function qh(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new bb),f.forEach(function(_){var A=H2.bind(null,d,_);y.has(_)||(y.add(_),_.then(A,A))})}}function go(d,f){var y=f.deletions;if(y!==null)for(var _=0;_";case Qh:return":has("+(og(d)||"")+")";case Jh:return'[role="'+d.value+'"]';case ep:return'"'+d.value+'"';case cc:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function dc(d,f){var y=[];d=[d,0];for(var _=0;_A&&(A=V),_&=~O}if(_=A,_=Wn()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*xb(_/1960))-_,10<_){d.timeoutHandle=ht(Qs.bind(null,d,Si,ts),_);break}Qs(d,Si,ts);break;case 5:Qs(d,Si,ts);break;default:throw Error(a(329))}}}return Kr(d,Wn()),d.callbackNode===y?ap.bind(null,d):null}function sp(d,f){var y=pc;return d.current.memoizedState.isDehydrated&&(Xs(d,f).flags|=256),d=vc(d,f),d!==2&&(f=Si,Si=y,f!==null&&lp(f)),d}function lp(d){Si===null?Si=d:Si.push.apply(Si,d)}function qi(d){for(var f=d;;){if(f.flags&16384){var y=f.updateQueue;if(y!==null&&(y=y.stores,y!==null))for(var _=0;_d?16:d,Ct===null)var _=!1;else{if(d=Ct,Ct=null,ip=0,(Bt&6)!==0)throw Error(a(331));var A=Bt;for(Bt|=4,Qe=d.current;Qe!==null;){var O=Qe,V=O.child;if((Qe.flags&16)!==0){var se=O.deletions;if(se!==null){for(var he=0;heWn()-lg?Xs(d,0):sg|=y),Kr(d,f)}function hg(d,f){f===0&&((d.mode&1)===0?f=1:(f=uo,uo<<=1,(uo&130023424)===0&&(uo=4194304)));var y=oi();d=$o(d,f),d!==null&&(va(d,f,y),Kr(d,y))}function Cb(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),hg(d,y)}function H2(d,f){var y=0;switch(d.tag){case 13:var _=d.stateNode,A=d.memoizedState;A!==null&&(y=A.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(f),hg(d,y)}var pg;pg=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ur.current)Di=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Di=!1,yb(d,f,y);Di=(d.flags&131072)!==0}else Di=!1,zn&&(f.flags&1048576)!==0&&O1(f,gr,f.index);switch(f.lanes=0,f.tag){case 2:var _=f.type;wa(d,f),d=f.pendingProps;var A=Ds(f,Cr.current);Gu(f,y),A=$1(null,f,_,d,A,y);var O=Xu();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Gr(_)?(O=!0,qa(f)):O=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,N1(f),A.updater=Ho,f.stateNode=A,A._reactInternals=f,D1(f,_,d,y),f=Wo(null,f,_,!0,O,y)):(f.tag=0,zn&&O&&gi(f),yi(null,f,A,y),f=f.child),f;case 16:_=f.elementType;e:{switch(wa(d,f),d=f.pendingProps,A=_._init,_=A(_._payload),f.type=_,A=f.tag=dp(_),d=Fo(_,d),A){case 0:f=K1(null,f,_,d,y);break e;case 1:f=O2(null,f,_,d,y);break e;case 11:f=T2(null,f,_,d,y);break e;case 14:f=Vs(null,f,_,Fo(_.type,d),y);break e}throw Error(a(306,_,""))}return f;case 0:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),K1(d,f,_,A,y);case 1:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),O2(d,f,_,A,y);case 3:e:{if(I2(f),d===null)throw Error(a(387));_=f.pendingProps,O=f.memoizedState,A=O.element,g2(d,f),Nh(f,_,null,y);var V=f.memoizedState;if(_=V.element,bt&&O.isDehydrated)if(O={element:_,isDehydrated:!1,cache:V.cache,pendingSuspenseBoundaries:V.pendingSuspenseBoundaries,transitions:V.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){A=oc(Error(a(423)),f),f=R2(d,f,_,y,A);break e}else if(_!==A){A=oc(Error(a(424)),f),f=R2(d,f,_,y,A);break e}else for(bt&&(fo=b1(f.stateNode.containerInfo),Vn=f,zn=!0,Ri=null,ho=!1),y=b2(f,null,_,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Vu(),_===A){f=Qa(d,f,y);break e}yi(d,f,_,y)}f=f.child}return f;case 5:return _t(f),d===null&&Rd(f),_=f.type,A=f.pendingProps,O=d!==null?d.memoizedProps:null,V=A.children,Fe(_,A)?V=null:O!==null&&Fe(_,O)&&(f.flags|=32),M2(d,f),yi(d,f,V,y),f.child;case 6:return d===null&&Rd(f),null;case 13:return N2(d,f,y);case 4:return ve(f,f.stateNode.containerInfo),_=f.pendingProps,d===null?f.child=Yu(f,null,_,y):yi(d,f,_,y),f.child;case 11:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),T2(d,f,_,A,y);case 7:return yi(d,f,f.pendingProps,y),f.child;case 8:return yi(d,f,f.pendingProps.children,y),f.child;case 12:return yi(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(_=f.type._context,A=f.pendingProps,O=f.memoizedProps,V=A.value,p2(f,_,V),O!==null)if(U(O.value,V)){if(O.children===A.children&&!Ur.current){f=Qa(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var se=O.dependencies;if(se!==null){V=O.child;for(var he=se.firstContext;he!==null;){if(he.context===_){if(O.tag===1){he=Xa(-1,y&-y),he.tag=2;var Re=O.updateQueue;if(Re!==null){Re=Re.shared;var et=Re.pending;et===null?he.next=he:(he.next=et.next,et.next=he),Re.pending=he}}O.lanes|=y,he=O.alternate,he!==null&&(he.lanes|=y),Fd(O.return,y,f),se.lanes|=y;break}he=he.next}}else if(O.tag===10)V=O.type===f.type?null:O.child;else if(O.tag===18){if(V=O.return,V===null)throw Error(a(341));V.lanes|=y,se=V.alternate,se!==null&&(se.lanes|=y),Fd(V,y,f),V=O.sibling}else V=O.child;if(V!==null)V.return=O;else for(V=O;V!==null;){if(V===f){V=null;break}if(O=V.sibling,O!==null){O.return=V.return,V=O;break}V=V.return}O=V}yi(d,f,A.children,y),f=f.child}return f;case 9:return A=f.type,_=f.pendingProps.children,Gu(f,y),A=Gi(A),_=_(A),f.flags|=1,yi(d,f,_,y),f.child;case 14:return _=f.type,A=Fo(_,f.pendingProps),A=Fo(_.type,A),Vs(d,f,_,A,y);case 15:return A2(d,f,f.type,f.pendingProps,y);case 17:return _=f.type,A=f.pendingProps,A=f.elementType===_?A:Fo(_,A),wa(d,f),f.tag=1,Gr(_)?(d=!0,qa(f)):d=!1,Gu(f,y),v2(f,_,A),D1(f,_,A,y),Wo(null,f,_,!0,d,y);case 19:return z2(d,f,y);case 22:return L2(d,f,y)}throw Error(a(156,f.tag))};function xi(d,f){return $u(d,f)}function Ca(d,f,y,_){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yo(d,f,y,_){return new Ca(d,f,y,_)}function gg(d){return d=d.prototype,!(!d||!d.isReactComponent)}function dp(d){if(typeof d=="function")return gg(d)?1:0;if(d!=null){if(d=d.$$typeof,d===w)return 11;if(d===k)return 14}return 2}function Ki(d,f){var y=d.alternate;return y===null?(y=yo(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function af(d,f,y,_,A,O){var V=2;if(_=d,typeof d=="function")gg(d)&&(V=1);else if(typeof d=="string")V=5;else e:switch(d){case h:return Js(y.children,A,O,f);case p:V=8,A|=8;break;case m:return d=yo(12,y,f,A|2),d.elementType=m,d.lanes=O,d;case E:return d=yo(13,y,f,A),d.elementType=E,d.lanes=O,d;case P:return d=yo(19,y,f,A),d.elementType=P,d.lanes=O,d;case M:return fp(y,A,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case v:V=10;break e;case S:V=9;break e;case w:V=11;break e;case k:V=14;break e;case T:V=16,_=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return f=yo(V,y,f,A),f.elementType=d,f.type=_,f.lanes=O,f}function Js(d,f,y,_){return d=yo(7,d,_,f),d.lanes=y,d}function fp(d,f,y,_){return d=yo(22,d,_,f),d.elementType=M,d.lanes=y,d.stateNode={isHidden:!1},d}function hp(d,f,y){return d=yo(6,d,null,f),d.lanes=y,d}function el(d,f,y){return f=yo(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function sf(d,f,y,_,A){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rt,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Fu(0),this.expirationTimes=Fu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fu(0),this.identifierPrefix=_,this.onRecoverableError=A,bt&&(this.mutableSourceEagerHydrationData=null)}function W2(d,f,y,_,A,O,V,se,he){return d=new sf(d,f,y,se,he),f===1?(f=1,O===!0&&(f|=8)):f=0,O=yo(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:_,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},N1(O),d}function mg(d){if(!d)return Do;d=d._reactInternals;e:{if($(d)!==d||d.tag!==1)throw Error(a(170));var f=d;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Gr(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(a(171))}if(d.tag===1){var y=d.type;if(Gr(y))return Fl(d,y,f)}return f}function vg(d){var f=d._reactInternals;if(f===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=de(f),d===null?null:d.stateNode}function lf(d,f){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var y=d.retryLane;d.retryLane=y!==0&&y=Re&&O>=At&&A<=et&&V<=je){d.splice(f,1);break}else if(_!==Re||y.width!==he.width||jeV){if(!(O!==At||y.height!==he.height||et<_||Re>A)){Re>_&&(he.width+=Re-_,he.x=_),etO&&(he.height+=At-O,he.y=O),jey&&(y=V)),V ")+` - -No matching component was found for: - `)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return oe(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:pp,findFiberByHostInstance:d.findFiberByHostInstance||yg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)d=!0;else{try{sn=f.inject(d),Wt=f}catch{}d=!!f.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,f,y,_){if(!Pt)throw Error(a(363));d=ag(d,f);var A=jt(d,y,_).disconnect;return{disconnect:function(){A()}}},n.registerMutableSourceForHydration=function(d,f){var y=f._getVersion;y=y(f._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[f,y]:d.mutableSourceEagerHydrationData.push(f,y)},n.runWithPriority=function(d,f){var y=Ht;try{return Ht=d,f()}finally{Ht=y}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,f,y,_){var A=f.current,O=oi(),V=Tr(A);return y=mg(y),f.context===null?f.context=y:f.pendingContext=y,f=Xa(O,V),f.payload={element:d},_=_===void 0?null:_,_!==null&&(f.callback=_),d=Hs(A,f,V),d!==null&&(vo(d,A,V,O),Rh(d,A,V)),V},n};(function(e){e.exports=d7e})(BW);const f7e=M9(BW.exports);var hk={exports:{}},bh={};/** - * @license React - * react-reconciler-constants.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */bh.ConcurrentRoot=1;bh.ContinuousEventPriority=4;bh.DefaultEventPriority=16;bh.DiscreteEventPriority=1;bh.IdleEventPriority=536870912;bh.LegacyRoot=0;(function(e){e.exports=bh})(hk);const XM={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let ZM=!1,QM=!1;const pk=".react-konva-event",h7e=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,p7e=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,g7e={};function sb(e,t,n=g7e){if(!ZM&&"zIndex"in t&&(console.warn(p7e),ZM=!0),!QM&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(h7e),QM=!0)}for(var o in n)if(!XM[o]){var a=o.slice(0,2)==="on",s=n[o]!==t[o];if(a&&s){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e.off(l,n[o])}var u=!t.hasOwnProperty(o);u&&e.setAttr(o,void 0)}var h=t._useStrictMode,p={},m=!1;const v={};for(var o in t)if(!XM[o]){var a=o.slice(0,2)==="on",S=n[o]!==t[o];if(a&&S){var l=o.substr(2).toLowerCase();l.substr(0,7)==="content"&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t[o]&&(v[l]=t[o])}!a&&(t[o]!==n[o]||h&&t[o]!==e.getAttr(o))&&(m=!0,p[o]=t[o])}m&&(e.setAttrs(p),_d(e));for(var l in v)e.on(l+pk,v[l])}function _d(e){if(!ot.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const FW={},m7e={};nh.Node.prototype._applyProps=sb;function v7e(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),_d(e)}function y7e(e,t,n){let r=nh[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=nh.Group);const i={},o={};for(var a in t){var s=a.slice(0,2)==="on";s?o[a]=t[a]:i[a]=t[a]}const l=new r(i);return sb(l,o),l}function S7e(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function b7e(e,t,n){return!1}function x7e(e){return e}function w7e(){return null}function C7e(){return null}function _7e(e,t,n,r){return m7e}function k7e(){}function E7e(e){}function P7e(e,t){return!1}function T7e(){return FW}function A7e(){return FW}const L7e=setTimeout,M7e=clearTimeout,O7e=-1;function I7e(e,t){return!1}const R7e=!1,N7e=!0,D7e=!0;function z7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function B7e(e,t){t.parent===e?t.moveToTop():e.add(t),_d(e)}function $W(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),_d(e)}function F7e(e,t,n){$W(e,t,n)}function $7e(e,t){t.destroy(),t.off(pk),_d(e)}function H7e(e,t){t.destroy(),t.off(pk),_d(e)}function W7e(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function V7e(e,t,n){}function U7e(e,t,n,r,i){sb(e,i,r)}function G7e(e){e.hide(),_d(e)}function j7e(e){}function Y7e(e,t){(t.visible==null||t.visible)&&e.show()}function q7e(e,t){}function K7e(e){}function X7e(){}const Z7e=()=>hk.exports.DefaultEventPriority,Q7e=Object.freeze(Object.defineProperty({__proto__:null,appendInitialChild:v7e,createInstance:y7e,createTextInstance:S7e,finalizeInitialChildren:b7e,getPublicInstance:x7e,prepareForCommit:w7e,preparePortalMount:C7e,prepareUpdate:_7e,resetAfterCommit:k7e,resetTextContent:E7e,shouldDeprioritizeSubtree:P7e,getRootHostContext:T7e,getChildHostContext:A7e,scheduleTimeout:L7e,cancelTimeout:M7e,noTimeout:O7e,shouldSetTextContent:I7e,isPrimaryRenderer:R7e,warnsIfNotActing:N7e,supportsMutation:D7e,appendChild:z7e,appendChildToContainer:B7e,insertBefore:$W,insertInContainerBefore:F7e,removeChild:$7e,removeChildFromContainer:H7e,commitTextUpdate:W7e,commitMount:V7e,commitUpdate:U7e,hideInstance:G7e,hideTextInstance:j7e,unhideInstance:Y7e,unhideTextInstance:q7e,clearContainer:K7e,detachDeletedInstance:X7e,getCurrentEventPriority:Z7e,now:n0.exports.unstable_now,idlePriority:n0.exports.unstable_IdlePriority,run:n0.exports.unstable_runWithPriority},Symbol.toStringTag,{value:"Module"}));var J7e=Object.defineProperty,e8e=Object.defineProperties,t8e=Object.getOwnPropertyDescriptors,JM=Object.getOwnPropertySymbols,n8e=Object.prototype.hasOwnProperty,r8e=Object.prototype.propertyIsEnumerable,eO=(e,t,n)=>t in e?J7e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tO=(e,t)=>{for(var n in t||(t={}))n8e.call(t,n)&&eO(e,n,t[n]);if(JM)for(var n of JM(t))r8e.call(t,n)&&eO(e,n,t[n]);return e},i8e=(e,t)=>e8e(e,t8e(t));function gk(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){const i=gk(r,t,n);if(i)return i;r=t?null:r.sibling}}function HW(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const mk=HW(C.exports.createContext(null));class WW extends C.exports.Component{render(){return x(mk.Provider,{value:this._reactInternals,children:this.props.children})}}const{ReactCurrentOwner:o8e,ReactCurrentDispatcher:a8e}=C.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function s8e(){const e=C.exports.useContext(mk);if(!e)throw new Error("its-fine: useFiber must be called within a !");const t=C.exports.useId();return C.exports.useMemo(()=>{var r;return(r=o8e.current)!=null?r:gk(e,!1,i=>{let o=i.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}})},[e,t])}const Yg=[],nO=new WeakMap;function l8e(){var e;const t=s8e();Yg.splice(0,Yg.length),gk(t,!0,n=>{var r;const i=(r=n.type)==null?void 0:r._context;i&&i!==mk&&Yg.push(HW(i))});for(const n of Yg){const r=(e=a8e.current)==null?void 0:e.readContext(n);nO.set(n,r)}return C.exports.useMemo(()=>Yg.reduce((n,r)=>i=>C.exports.createElement(n,null,C.exports.createElement(r.Provider,i8e(tO({},i),{value:nO.get(r)}))),n=>x(WW,{...tO({},n)})),[])}function u8e(e){const t=le.useRef();return le.useLayoutEffect(()=>{t.current=e}),t.current}const c8e=e=>{const t=le.useRef(),n=le.useRef(),r=le.useRef(),i=u8e(e),o=l8e(),a=s=>{const{forwardedRef:l}=e;!l||(typeof l=="function"?l(s):l.current=s)};return le.useLayoutEffect(()=>(n.current=new nh.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=fm.createContainer(n.current,hk.exports.LegacyRoot,!1,null),fm.updateContainer(x(o,{children:e.children}),r.current),()=>{!nh.isBrowser||(a(null),fm.updateContainer(null,r.current,null),n.current.destroy())}),[]),le.useLayoutEffect(()=>{a(n.current),sb(n.current,e,i),fm.updateContainer(x(o,{children:e.children}),r.current,null)}),x("div",{ref:t,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},i3="Layer",rh="Group",T0="Rect",qg="Circle",p5="Line",VW="Image",d8e="Transformer",fm=f7e(Q7e);fm.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:le.version,rendererPackageName:"react-konva"});const f8e=le.forwardRef((e,t)=>x(WW,{children:x(c8e,{...e,forwardedRef:t})})),h8e=ct([wn],e=>({objects:e.layerState.objects}),{memoizeOptions:{resultEqualityCheck:st.isEqual}}),p8e=e=>{const{...t}=e,{objects:n}=ke(h8e);return x(rh,{listening:!1,...t,children:n.filter(U_).map((r,i)=>x(p5,{points:r.points,stroke:"rgb(0,0,0)",strokeWidth:r.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:r.tool==="brush"?"source-over":"destination-out"},i))})},s2=e=>{const{r:t,g:n,b:r,a:i}=e;return`rgba(${t}, ${n}, ${r}, ${i})`},g8e=ct(wn,e=>{const{cursorPosition:t,stageDimensions:{width:n,height:r},brushSize:i,maskColor:o,brushColor:a,tool:s,layer:l,shouldShowBrush:u,isMovingBoundingBox:h,isTransformingBoundingBox:p,stageScale:m}=e;return{cursorPosition:t,width:n,height:r,radius:i/2,brushColorString:s2(l==="mask"?{...o,a:.5}:a),tool:s,shouldShowBrush:u,shouldDrawBrushPreview:!(h||p||!t)&&u,strokeWidth:1.5/m,dotRadius:1.5/m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),m8e=e=>{const{...t}=e,{cursorPosition:n,width:r,height:i,radius:o,brushColorString:a,tool:s,shouldDrawBrushPreview:l,dotRadius:u,strokeWidth:h}=ke(g8e);return l?ne(rh,{listening:!1,...t,children:[x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,fill:a,listening:!1,globalCompositeOperation:s==="eraser"?"destination-out":"source-over"}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(255,255,255,0.4)",strokeWidth:h*2,strokeEnabled:!0,listening:!1}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:o,stroke:"rgba(0,0,0,1)",strokeWidth:h,strokeEnabled:!0,listening:!1}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u*2,fill:"rgba(255,255,255,0.4)",listening:!1}),x(qg,{x:n?n.x:r/2,y:n?n.y:i/2,radius:u,fill:"rgba(0,0,0,1)",listening:!1})]}):null},v8e=ct(wn,e=>{const{boundingBoxCoordinates:t,boundingBoxDimensions:n,stageDimensions:r,stageScale:i,isDrawing:o,isTransformingBoundingBox:a,isMovingBoundingBox:s,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,tool:h,stageCoordinates:p,shouldSnapToGrid:m}=e;return{boundingBoxCoordinates:t,boundingBoxDimensions:n,isDrawing:o,isMouseOverBoundingBox:l,shouldDarkenOutsideBoundingBox:u,isMovingBoundingBox:s,isTransformingBoundingBox:a,stageDimensions:r,stageScale:i,shouldSnapToGrid:m,tool:h,stageCoordinates:p,boundingBoxStrokeWidth:(l?8:1)/i,hitStrokeWidth:20/i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),y8e=e=>{const{...t}=e,n=Ye(),{boundingBoxCoordinates:r,boundingBoxDimensions:i,isDrawing:o,isMouseOverBoundingBox:a,shouldDarkenOutsideBoundingBox:s,isMovingBoundingBox:l,isTransformingBoundingBox:u,stageCoordinates:h,stageDimensions:p,stageScale:m,shouldSnapToGrid:v,tool:S,boundingBoxStrokeWidth:w,hitStrokeWidth:E}=ke(v8e),P=C.exports.useRef(null),k=C.exports.useRef(null);C.exports.useEffect(()=>{!P.current||!k.current||(P.current.nodes([k.current]),P.current.getLayer()?.batchDraw())},[]);const T=64*m,M=C.exports.useCallback(H=>{if(!v){n(fw({x:Math.floor(H.target.x()),y:Math.floor(H.target.y())}));return}const J=H.target.x(),re=H.target.y(),oe=Fc(J,64),X=Fc(re,64);H.target.x(oe),H.target.y(X),n(fw({x:oe,y:X}))},[n,v]),I=C.exports.useCallback(()=>{if(!k.current)return;const H=k.current,J=H.scaleX(),re=H.scaleY(),oe=Math.round(H.width()*J),X=Math.round(H.height()*re),G=Math.round(H.x()),Q=Math.round(H.y());n(sm({width:oe,height:X})),n(fw({x:v?gs(G,64):G,y:v?gs(Q,64):Q})),H.scaleX(1),H.scaleY(1)},[n,v]),R=C.exports.useCallback((H,J,re)=>{const oe=H.x%T,X=H.y%T;return{x:gs(J.x,T)+oe,y:gs(J.y,T)+X}},[T]),N=()=>{n(pw(!0))},z=()=>{n(pw(!1)),n(Fy(!1))},$=()=>{n(YL(!0))},W=()=>{n(pw(!1)),n(YL(!1)),n(Fy(!1))},q=()=>{n(Fy(!0))},de=()=>{!u&&!l&&n(Fy(!1))};return ne(rh,{...t,children:[x(T0,{offsetX:h.x/m,offsetY:h.y/m,height:p.height/m,width:p.width/m,fill:"rgba(0,0,0,0.4)",listening:!1,visible:s}),x(T0,{x:r.x,y:r.y,width:i.width,height:i.height,fill:"rgb(255,255,255)",listening:!1,visible:s,globalCompositeOperation:"destination-out"}),x(T0,{draggable:!0,fillEnabled:!1,height:i.height,hitStrokeWidth:E,listening:!o&&S==="move",onDragEnd:W,onDragMove:M,onMouseDown:$,onMouseOut:de,onMouseOver:q,onMouseUp:W,onTransform:I,onTransformEnd:z,ref:k,stroke:a?"rgba(255,255,255,0.7)":"white",strokeWidth:w,width:i.width,x:r.x,y:r.y}),x(d8e,{anchorCornerRadius:3,anchorDragBoundFunc:R,anchorFill:"rgba(212,216,234,1)",anchorSize:15,anchorStroke:"rgb(42,42,42)",borderDash:[4,4],borderEnabled:!0,borderStroke:"black",draggable:!1,enabledAnchors:S==="move"?void 0:[],flipEnabled:!1,ignoreStroke:!0,keepRatio:!1,listening:!o&&S==="move",onDragEnd:W,onMouseDown:N,onMouseUp:z,onTransformEnd:z,ref:P,rotateEnabled:!1})]})};let UW=null,GW=null;const S8e=e=>{UW=e},g5=()=>UW,b8e=e=>{GW=e},x8e=()=>GW,w8e=ct([wn,Rr],(e,t)=>{const{cursorPosition:n,shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}=e;return{activeTabName:t,isCursorOnCanvas:Boolean(n),shouldLockBoundingBox:r,shouldShowBoundingBox:i,tool:o}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),C8e=()=>{const e=Ye(),{activeTabName:t,shouldShowBoundingBox:n,tool:r}=ke(w8e),i=C.exports.useRef(null),o=x8e();mt("esc",()=>{e(q5e())},{enabled:()=>!0,preventDefault:!0}),mt("shift+h",()=>{e(iH(!n))},{preventDefault:!0},[t,n]),mt(["space"],a=>{a.repeat||(o?.container().focus(),r!=="move"&&(i.current=r,e(Zp("move"))),r==="move"&&i.current&&i.current!=="move"&&(e(Zp(i.current)),i.current="move"))},{keyup:!0,keydown:!0,preventDefault:!0},[r,i])},_8e=ct(wn,e=>{const{maskColor:t,stageCoordinates:n,stageDimensions:r,stageScale:i}=e;return{stageCoordinates:n,stageDimensions:r,stageScale:i,maskColorString:s2(t)}}),rO=e=>`data:image/svg+xml;utf8, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -`.replaceAll("black",e),k8e=e=>{const{...t}=e,{maskColorString:n,stageCoordinates:r,stageDimensions:i,stageScale:o}=ke(_8e),[a,s]=C.exports.useState(null),[l,u]=C.exports.useState(0),h=C.exports.useRef(null),p=C.exports.useCallback(()=>{u(l+1),setTimeout(p,500)},[l]);return C.exports.useEffect(()=>{if(a)return;const m=new Image;m.onload=()=>{s(m)},m.src=rO(n)},[a,n]),C.exports.useEffect(()=>{!a||(a.src=rO(n))},[a,n]),C.exports.useEffect(()=>{const m=setInterval(()=>u(v=>(v+1)%5),50);return()=>clearInterval(m)},[]),!a||!Zr.exports.isNumber(r.x)||!Zr.exports.isNumber(r.y)||!Zr.exports.isNumber(o)||!Zr.exports.isNumber(i.width)||!Zr.exports.isNumber(i.height)?null:x(T0,{ref:h,offsetX:r.x/o,offsetY:r.y/o,height:i.height/o,width:i.width/o,fillPatternImage:a,fillPatternOffsetY:Zr.exports.isNumber(l)?l:0,fillPatternRepeat:"repeat",fillPatternScale:{x:1/o,y:1/o},listening:!0,globalCompositeOperation:"source-in",...t})},E8e=ct([wn],e=>{const{isMoveStageKeyHeld:t,stageScale:n}=e;return{isMoveStageKeyHeld:t,stageScale:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),P8e=e=>{const t=Ye(),{isMoveStageKeyHeld:n,stageScale:r}=ke(E8e);return C.exports.useCallback(i=>{if(!e.current||n)return;i.evt.preventDefault();const o=e.current.getPointerPosition();if(!o)return;const a={x:(o.x-e.current.x())/r,y:(o.y-e.current.y())/r};let s=i.evt.deltaY;i.evt.ctrlKey&&(s=-s);const l=st.clamp(r*D5e**s,z5e,B5e),u={x:o.x-a.x*l,y:o.y-a.y*l};t(fSe(l)),t(oH(u))},[e,n,r,t])},lb=e=>{const t=e.getPointerPosition(),n=e.getAbsoluteTransform().copy();if(!t||!n)return;const r=n.invert().point(t);return{x:Math.floor(r.x),y:Math.floor(r.y)}},T8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),A8e=e=>{const t=Ye(),{tool:n,isStaging:r}=ke(T8e);return C.exports.useCallback(i=>{if(!e.current)return;if(e.current.container().focus(),n==="move"||r){t(o5(!0));return}const o=lb(e.current);!o||(i.evt.preventDefault(),t(qS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},L8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),M8e=(e,t)=>{const n=Ye(),{tool:r,isDrawing:i,isStaging:o}=ke(L8e);return C.exports.useCallback(()=>{if(r==="move"||o){n(o5(!1));return}if(!t.current&&i&&e.current){const a=lb(e.current);if(!a)return;n(eH([a.x,a.y]))}else t.current=!1;n(qS(!1))},[t,n,i,o,e,r])},O8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r,isDrawing:i}=t;return{tool:r,isDrawing:i,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),I8e=(e,t,n)=>{const r=Ye(),{isDrawing:i,tool:o,isStaging:a}=ke(O8e);return C.exports.useCallback(()=>{if(!e.current)return;const s=lb(e.current);!s||(r(nH(s)),n.current=s,!(!i||o==="move"||a)&&(t.current=!0,r(eH([s.x,s.y]))))},[t,r,i,a,n,e,o])},R8e=ct([Rr,wn,yd],(e,t,n)=>{const{tool:r}=t;return{tool:r,activeTabName:e,isStaging:n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),N8e=e=>{const t=Ye(),{tool:n,isStaging:r}=ke(R8e);return C.exports.useCallback(i=>{if(i.evt.buttons!==1||!e.current)return;const o=lb(e.current);!o||n==="move"||r||(t(qS(!0)),t(J$([o.x,o.y])))},[e,n,r,t])},D8e=()=>{const e=Ye();return C.exports.useCallback(()=>{e(nH(null)),e(qS(!1))},[e])},z8e=ct([wn,yd],(e,t)=>{const{tool:n}=e;return{tool:n,isStaging:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),B8e=()=>{const e=Ye(),{tool:t,isStaging:n}=ke(z8e);return{handleDragStart:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!0))},[e,n,t]),handleDragMove:C.exports.useCallback(r=>{if(!(t==="move"||n))return;const i={x:r.target.x(),y:r.target.y()};e(oH(i))},[e,n,t]),handleDragEnd:C.exports.useCallback(()=>{!(t==="move"||n)||e(o5(!1))},[e,n,t])}};var gf=C.exports,F8e=function(t,n,r){const i=gf.useRef("loading"),o=gf.useRef(),[a,s]=gf.useState(0),l=gf.useRef(),u=gf.useRef(),h=gf.useRef();return(l.current!==t||u.current!==n||h.current!==r)&&(i.current="loading",o.current=void 0,l.current=t,u.current=n,h.current=r),gf.useLayoutEffect(function(){if(!t)return;var p=document.createElement("img");function m(){i.current="loaded",o.current=p,s(Math.random())}function v(){i.current="failed",o.current=void 0,s(Math.random())}return p.addEventListener("load",m),p.addEventListener("error",v),n&&(p.crossOrigin=n),r&&(p.referrerpolicy=r),p.src=t,function(){p.removeEventListener("load",m),p.removeEventListener("error",v)}},[t,n,r]),[o.current,i.current]};const jW=e=>{const{url:t,x:n,y:r}=e,[i]=F8e(t);return x(VW,{x:n,y:r,image:i,listening:!1})},$8e=ct([wn],e=>{const{layerState:{objects:t}}=e;return{objects:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),H8e=()=>{const{objects:e}=ke($8e);return e?x(rh,{name:"outpainting-objects",listening:!1,children:e.map((t,n)=>{if(i5(t))return x(jW,{x:t.x,y:t.y,url:t.image.url},n);if(b5e(t))return x(p5,{points:t.points,stroke:t.color?s2(t.color):"rgb(0,0,0)",strokeWidth:t.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,listening:!1,globalCompositeOperation:t.tool==="brush"?"source-over":"destination-out"},n)})}):null},W8e=ct([wn],e=>{const{stageScale:t,stageCoordinates:n,stageDimensions:r}=e;return{stageScale:t,stageCoordinates:n,stageDimensions:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),V8e=()=>{const{colorMode:e}=Bv(),{stageScale:t,stageCoordinates:n,stageDimensions:r}=ke(W8e),[i,o]=C.exports.useState([]),a=C.exports.useCallback(s=>s/t,[t]);return C.exports.useLayoutEffect(()=>{const s=e==="light"?"rgba(136, 136, 136, 1)":"rgba(84, 84, 84, 1)",{width:l,height:u}=r,{x:h,y:p}=n,m={x1:0,y1:0,x2:l,y2:u,offset:{x:a(h),y:a(p)}},v={x:Math.ceil(a(h)/64)*64,y:Math.ceil(a(p)/64)*64},S={x1:-v.x,y1:-v.y,x2:a(l)-v.x+64,y2:a(u)-v.y+64},E={x1:Math.min(m.x1,S.x1),y1:Math.min(m.y1,S.y1),x2:Math.max(m.x2,S.x2),y2:Math.max(m.y2,S.y2)},P=E.x2-E.x1,k=E.y2-E.y1,T=Math.round(P/64)+1,M=Math.round(k/64)+1,I=st.range(0,T).map(N=>x(p5,{x:E.x1+N*64,y:E.y1,points:[0,0,0,k],stroke:s,strokeWidth:1},`x_${N}`)),R=st.range(0,M).map(N=>x(p5,{x:E.x1,y:E.y1+N*64,points:[0,0,P,0],stroke:s,strokeWidth:1},`y_${N}`));o(I.concat(R))},[t,n,r,e,a]),x(rh,{children:i})},U8e=ct([e=>e.gallery],e=>e.intermediateImage?e.intermediateImage:null,{memoizeOptions:{resultEqualityCheck:st.isEqual}}),G8e=e=>{const{...t}=e,n=ke(U8e),[r,i]=C.exports.useState(null);if(C.exports.useEffect(()=>{if(!n)return;const u=new Image;u.onload=()=>{i(u)},u.src=n.url},[n]),!n?.boundingBox)return null;const{boundingBox:{x:o,y:a,width:s,height:l}}=n;return r?x(VW,{x:o,y:a,width:s,height:l,image:r,listening:!1,...t}):null},o3=e=>Math.round(e*100)/100,j8e=ct([wn],e=>{const{stageDimensions:{width:t,height:n},stageCoordinates:{x:r,y:i},boundingBoxDimensions:{width:o,height:a},boundingBoxCoordinates:{x:s,y:l},cursorPosition:u,stageScale:h,shouldShowCanvasDebugInfo:p,layer:m}=e,{cursorX:v,cursorY:S}=u?{cursorX:u.x,cursorY:u.y}:{cursorX:-1,cursorY:-1};return{activeLayerColor:m==="mask"?"var(--status-working-color)":"inherit",activeLayerString:m.charAt(0).toUpperCase()+m.slice(1),boundingBoxColor:o<512||a<512?"var(--status-working-color)":"inherit",boundingBoxCoordinatesString:`(${o3(s)}, ${o3(l)})`,boundingBoxDimensionsString:`${o}\xD7${a}`,canvasCoordinatesString:`${o3(r)}\xD7${o3(i)}`,canvasDimensionsString:`${t}\xD7${n}`,canvasScaleString:Math.round(h*100),cursorCoordinatesString:`(${v}, ${S})`,shouldShowCanvasDebugInfo:p}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),Y8e=()=>{const{activeLayerColor:e,activeLayerString:t,boundingBoxColor:n,boundingBoxCoordinatesString:r,boundingBoxDimensionsString:i,canvasCoordinatesString:o,canvasDimensionsString:a,canvasScaleString:s,cursorCoordinatesString:l,shouldShowCanvasDebugInfo:u}=ke(j8e);return ne("div",{className:"canvas-status-text",children:[x("div",{style:{color:e},children:`Active Layer: ${t}`}),x("div",{children:`Canvas Scale: ${s}%`}),x("div",{style:{color:n},children:`Bounding Box: ${i}`}),u&&ne(Nn,{children:[x("div",{children:`Bounding Box Position: ${r}`}),x("div",{children:`Canvas Dimensions: ${a}`}),x("div",{children:`Canvas Position: ${o}`}),x("div",{children:`Cursor Position: ${l}`})]})]})},q8e=ct([wn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingImage:r,shouldShowStagingOutline:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:r,shouldShowStagingOutline:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),K8e=e=>{const{...t}=e,{currentStagingAreaImage:n,shouldShowStagingImage:r,shouldShowStagingOutline:i}=ke(q8e);if(!n)return null;const{x:o,y:a,image:{width:s,height:l,url:u}}=n;return ne(rh,{...t,children:[r&&x(jW,{url:u,x:o,y:a}),i&&ne(rh,{children:[x(T0,{x:o,y:a,width:s,height:l,strokeWidth:1,stroke:"black",strokeScaleEnabled:!1}),x(T0,{x:o,y:a,width:s,height:l,dash:[4,4],strokeWidth:1,stroke:"white",strokeScaleEnabled:!1})]})]})},X8e=ct([wn],e=>{const{layerState:{stagingArea:{images:t,selectedImageIndex:n}},shouldShowStagingOutline:r,shouldShowStagingImage:i}=e;return{currentStagingAreaImage:t.length>0?t[n]:void 0,isOnFirstImage:n===0,isOnLastImage:n===t.length-1,shouldShowStagingImage:i,shouldShowStagingOutline:r}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),Z8e=()=>{const e=Ye(),{isOnFirstImage:t,isOnLastImage:n,currentStagingAreaImage:r,shouldShowStagingImage:i}=ke(X8e),o=C.exports.useCallback(()=>{e(KL(!1))},[e]),a=C.exports.useCallback(()=>{e(KL(!0))},[e]);mt(["left"],()=>{s()},{enabled:()=>!0,preventDefault:!0}),mt(["right"],()=>{l()},{enabled:()=>!0,preventDefault:!0}),mt(["enter"],()=>{u()},{enabled:()=>!0,preventDefault:!0});const s=()=>e(G5e()),l=()=>e(U5e()),u=()=>e(W5e());return r?x(nn,{pos:"absolute",bottom:"1rem",w:"100%",align:"center",justify:"center",filter:"drop-shadow(0 0.5rem 1rem rgba(0,0,0))",onMouseOver:o,onMouseOut:a,children:ne(Ia,{isAttached:!0,children:[x(gt,{tooltip:"Previous (Left)","aria-label":"Previous (Left)",icon:x(U4e,{}),onClick:s,"data-selected":!0,isDisabled:t}),x(gt,{tooltip:"Next (Right)","aria-label":"Next (Right)",icon:x(G4e,{}),onClick:l,"data-selected":!0,isDisabled:n}),x(gt,{tooltip:"Accept (Enter)","aria-label":"Accept (Enter)",icon:x(F_,{}),onClick:u,"data-selected":!0}),x(gt,{tooltip:"Show/Hide","aria-label":"Show/Hide","data-alert":!i,icon:i?x(J4e,{}):x(Q4e,{}),onClick:()=>e(uSe(!i)),"data-selected":!0}),x(gt,{tooltip:"Discard All","aria-label":"Discard All",icon:x(H_,{}),onClick:()=>e(V5e()),"data-selected":!0,style:{backgroundColor:"var(--btn-delete-image)"}})]})}):null},Q8e=ct([wn,yd],(e,t)=>{const{isMaskEnabled:n,stageScale:r,shouldShowBoundingBox:i,isTransformingBoundingBox:o,isMouseOverBoundingBox:a,isMovingBoundingBox:s,stageDimensions:l,stageCoordinates:u,tool:h,isMovingStage:p,shouldShowIntermediates:m,shouldShowGrid:v}=e;let S="";return h==="move"||t?p?S="grabbing":S="grab":o?S=void 0:a?S="move":S="none",{isMaskEnabled:n,isModifyingBoundingBox:o||s,shouldShowBoundingBox:i,shouldShowGrid:v,stageCoordinates:u,stageCursor:S,stageDimensions:l,stageScale:r,tool:h,isStaging:t,shouldShowIntermediates:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),J8e=()=>{const{isMaskEnabled:e,isModifyingBoundingBox:t,shouldShowBoundingBox:n,shouldShowGrid:r,stageCoordinates:i,stageCursor:o,stageDimensions:a,stageScale:s,tool:l,isStaging:u,shouldShowIntermediates:h}=ke(Q8e);C8e();const p=C.exports.useRef(null),m=C.exports.useRef(null),v=C.exports.useCallback(W=>{b8e(W),p.current=W},[]),S=C.exports.useCallback(W=>{S8e(W),m.current=W},[]),w=C.exports.useRef({x:0,y:0}),E=C.exports.useRef(!1),P=P8e(p),k=A8e(p),T=M8e(p,E),M=I8e(p,E,w),I=N8e(p),R=D8e(),{handleDragStart:N,handleDragMove:z,handleDragEnd:$}=B8e();return x("div",{className:"inpainting-canvas-container",children:ne("div",{className:"inpainting-canvas-wrapper",children:[ne(f8e,{tabIndex:-1,ref:v,className:"inpainting-canvas-stage",style:{...o?{cursor:o}:{}},x:i.x,y:i.y,width:a.width,height:a.height,scale:{x:s,y:s},onTouchStart:k,onTouchMove:M,onTouchEnd:T,onMouseDown:k,onMouseEnter:I,onMouseLeave:R,onMouseMove:M,onMouseOut:R,onMouseUp:T,onDragStart:N,onDragMove:z,onDragEnd:$,onWheel:P,listening:(l==="move"||u)&&!t,draggable:(l==="move"||u)&&!t,children:[x(i3,{id:"grid",visible:r,children:x(V8e,{})}),x(i3,{id:"base",ref:S,listening:!1,imageSmoothingEnabled:!1,children:x(H8e,{})}),ne(i3,{id:"mask",visible:e,listening:!1,children:[x(p8e,{visible:!0,listening:!1}),x(k8e,{listening:!1})]}),ne(i3,{id:"preview",imageSmoothingEnabled:!1,children:[!u&&x(m8e,{visible:l!=="move",listening:!1}),x(K8e,{visible:u}),h&&x(G8e,{}),x(y8e,{visible:n&&!u})]})]}),x(Y8e,{}),x(Z8e,{})]})})},e_e=ct([wn,Rr],(e,t)=>{const{pastLayerStates:n}=e;return{canUndo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function t_e(){const e=Ye(),{canUndo:t,activeTabName:n}=ke(e_e),r=()=>{e(hSe())};return mt(["meta+z","ctrl+z"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Undo (Ctrl+Z)",tooltip:"Undo (Ctrl+Z)",icon:x(v5e,{}),onClick:r,isDisabled:!t})}const n_e=ct([wn,Rr],(e,t)=>{const{futureLayerStates:n}=e;return{canRedo:n.length>0,activeTabName:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}});function r_e(){const e=Ye(),{canRedo:t,activeTabName:n}=ke(n_e),r=()=>{e(j5e())};return mt(["meta+shift+z","ctrl+shift+z","control+y","meta+y"],()=>{r()},{enabled:()=>t,preventDefault:!0},[n,t]),x(gt,{"aria-label":"Redo (Ctrl+Shift+Z)",tooltip:"Redo (Ctrl+Shift+Z)",icon:x(d5e,{}),onClick:r,isDisabled:!t})}const i_e=ct([wn],e=>{const{shouldDarkenOutsideBoundingBox:t,shouldShowIntermediates:n,shouldShowGrid:r,shouldSnapToGrid:i,shouldAutoSave:o,shouldShowCanvasDebugInfo:a}=e;return{shouldShowGrid:r,shouldSnapToGrid:i,shouldAutoSave:o,shouldDarkenOutsideBoundingBox:t,shouldShowIntermediates:n,shouldShowCanvasDebugInfo:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),o_e=()=>{const e=Ye(),{shouldShowIntermediates:t,shouldShowGrid:n,shouldSnapToGrid:r,shouldAutoSave:i,shouldDarkenOutsideBoundingBox:o,shouldShowCanvasDebugInfo:a}=ke(i_e);return x(pu,{trigger:"hover",triggerComponent:x(gt,{tooltip:"Canvas Settings","aria-label":"Canvas Settings",icon:x(V_,{})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(ta,{label:"Show Intermediates",isChecked:t,onChange:s=>e(lSe(s.target.checked))}),x(ta,{label:"Show Grid",isChecked:n,onChange:s=>e(sSe(s.target.checked))}),x(ta,{label:"Snap to Grid",isChecked:r,onChange:s=>e(cSe(s.target.checked))}),x(ta,{label:"Darken Outside Selection",isChecked:o,onChange:s=>e(rH(s.target.checked))}),x(ta,{label:"Auto Save to Gallery",isChecked:i,onChange:s=>e(rSe(s.target.checked))}),x(ta,{label:"Show Canvas Debug Info",isChecked:a,onChange:s=>e(aSe(s.target.checked))})]})})};function ub(){return(ub=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function h9(e){var t=C.exports.useRef(e),n=C.exports.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var X0=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:E.buttons>0)&&i.current?o(iO(i.current,E,s.current)):w(!1)},S=function(){return w(!1)};function w(E){var P=l.current,k=p9(i.current),T=E?k.addEventListener:k.removeEventListener;T(P?"touchmove":"mousemove",v),T(P?"touchend":"mouseup",S)}return[function(E){var P=E.nativeEvent,k=i.current;if(k&&(oO(P),!function(M,I){return I&&!Vm(M)}(P,l.current)&&k)){if(Vm(P)){l.current=!0;var T=P.changedTouches||[];T.length&&(s.current=T[0].identifier)}k.focus(),o(iO(k,P,s.current)),w(!0)}},function(E){var P=E.which||E.keyCode;P<37||P>40||(E.preventDefault(),a({left:P===39?.05:P===37?-.05:0,top:P===40?.05:P===38?-.05:0}))},w]},[a,o]),h=u[0],p=u[1],m=u[2];return C.exports.useEffect(function(){return m},[m]),x("div",{...ub({},r,{onTouchStart:h,onMouseDown:h,className:"react-colorful__interactive",ref:i,onKeyDown:p,tabIndex:0,role:"slider"})})}),cb=function(e){return e.filter(Boolean).join(" ")},yk=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=cb(["react-colorful__pointer",e.className]);return x("div",{className:o,style:{top:100*i+"%",left:100*n+"%"},children:x("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}})})},no=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},qW=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:no(e.h),s:no(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:no(i/2),a:no(r,2)}},g9=function(e){var t=qW(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Ow=function(e){var t=qW(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},a_e=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),s=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),u=o%6;return{r:no(255*[r,s,a,a,l,r][u]),g:no(255*[l,r,r,s,a,a][u]),b:no(255*[a,a,l,r,r,s][u]),a:no(i,2)}},s_e=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),s=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:no(60*(s<0?s+6:s)),s:no(o?a/o*100:0),v:no(o/255*100),a:i}},l_e=le.memo(function(e){var t=e.hue,n=e.onChange,r=cb(["react-colorful__hue",e.className]);return le.createElement("div",{className:r},le.createElement(vk,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:X0(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":no(t),"aria-valuemax":"360","aria-valuemin":"0"},le.createElement(yk,{className:"react-colorful__hue-pointer",left:t/360,color:g9({h:t,s:100,v:100,a:1})})))}),u_e=le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:g9({h:t.h,s:100,v:100,a:1})};return le.createElement("div",{className:"react-colorful__saturation",style:r},le.createElement(vk,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:X0(t.s+100*i.left,0,100),v:X0(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+no(t.s)+"%, Brightness "+no(t.v)+"%"},le.createElement(yk,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:g9(t)})))}),KW=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function c_e(e,t,n){var r=h9(n),i=C.exports.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],s=C.exports.useRef({color:t,hsva:o});C.exports.useEffect(function(){if(!e.equal(t,s.current.color)){var u=e.toHsva(t);s.current={hsva:u,color:t},a(u)}},[t,e]),C.exports.useEffect(function(){var u;KW(o,s.current.hsva)||e.equal(u=e.fromHsva(o),s.current.color)||(s.current={hsva:o,color:u},r(u))},[o,e,r]);var l=C.exports.useCallback(function(u){a(function(h){return Object.assign({},h,u)})},[]);return[o,l]}var d_e=typeof window<"u"?C.exports.useLayoutEffect:C.exports.useEffect,f_e=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},aO=new Map,h_e=function(e){d_e(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!aO.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,aO.set(t,n);var r=f_e();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},p_e=function(e){var t=e.className,n=e.hsva,r=e.onChange,i={backgroundImage:"linear-gradient(90deg, "+Ow(Object.assign({},n,{a:0}))+", "+Ow(Object.assign({},n,{a:1}))+")"},o=cb(["react-colorful__alpha",t]),a=no(100*n.a);return le.createElement("div",{className:o},x("div",{className:"react-colorful__alpha-gradient",style:i}),le.createElement(vk,{onMove:function(s){r({a:s.left})},onKey:function(s){r({a:X0(n.a+s.left)})},"aria-label":"Alpha","aria-valuetext":a+"%","aria-valuenow":a,"aria-valuemin":"0","aria-valuemax":"100"},le.createElement(yk,{className:"react-colorful__alpha-pointer",left:n.a,color:Ow(n)})))},g_e=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,a=YW(e,["className","colorModel","color","onChange"]),s=C.exports.useRef(null);h_e(s);var l=c_e(n,i,o),u=l[0],h=l[1],p=cb(["react-colorful",t]);return le.createElement("div",ub({},a,{ref:s,className:p}),x(u_e,{hsva:u,onChange:h}),x(l_e,{hue:u.h,onChange:h}),le.createElement(p_e,{hsva:u,onChange:h,className:"react-colorful__last-control"}))},m_e={defaultColor:{r:0,g:0,b:0,a:1},toHsva:s_e,fromHsva:a_e,equal:KW},v_e=function(e){return le.createElement(g_e,ub({},e,{colorModel:m_e}))};const XW=e=>{const{styleClass:t,...n}=e;return x(v_e,{className:`invokeai__color-picker ${t}`,...n})},y_e=ct([wn],e=>{const{maskColor:t,layer:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=e;return{layer:n,maskColor:t,maskColorString:s2(t),isMaskEnabled:r,shouldPreserveMaskedArea:i}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),S_e=()=>{const e=Ye(),{layer:t,maskColor:n,isMaskEnabled:r,shouldPreserveMaskedArea:i}=ke(y_e);mt(["q"],()=>{o()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["shift+c"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["h"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[r]);const o=()=>{e(qL(t==="mask"?"base":"mask"))},a=()=>e(H5e()),s=()=>e(eSe(!r));return ne(Nn,{children:[x(vd,{label:"Layer",tooltipProps:{hasArrow:!0,placement:"top"},value:r?t:"base",isDisabled:!r,validValues:S5e,onChange:l=>e(qL(l.target.value))}),x(pu,{trigger:"hover",triggerComponent:x(Ia,{children:x(gt,{"aria-label":"Inpainting Mask Options",tooltip:"Inpainting Mask Options","data-alert":t==="mask",icon:x(i5e,{})})}),children:ne(nn,{direction:"column",gap:"0.5rem",children:[x(ta,{label:"Enable Mask (H)",isChecked:r,onChange:s}),x(ta,{label:"Preserve Masked Area",isChecked:i,onChange:l=>e(oSe(l.target.checked))}),x(XW,{style:{paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:l=>e(tSe(l))}),x(fl,{onClick:a,tooltip:"Clear Mask (Shift+C)",children:"Clear Mask"})]})})]})};let a3;const b_e=new Uint8Array(16);function x_e(){if(!a3&&(a3=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!a3))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a3(b_e)}const Ci=[];for(let e=0;e<256;++e)Ci.push((e+256).toString(16).slice(1));function w_e(e,t=0){return(Ci[e[t+0]]+Ci[e[t+1]]+Ci[e[t+2]]+Ci[e[t+3]]+"-"+Ci[e[t+4]]+Ci[e[t+5]]+"-"+Ci[e[t+6]]+Ci[e[t+7]]+"-"+Ci[e[t+8]]+Ci[e[t+9]]+"-"+Ci[e[t+10]]+Ci[e[t+11]]+Ci[e[t+12]]+Ci[e[t+13]]+Ci[e[t+14]]+Ci[e[t+15]]).toLowerCase()}const C_e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sO={randomUUID:C_e};function t0(e,t,n){if(sO.randomUUID&&!t&&!e)return sO.randomUUID();e=e||{};const r=e.random||(e.rng||x_e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return w_e(r)}const __e=(e,t)=>{const n=e.scale(),r=e.getClientRect({relativeTo:e.getParent()});e.scale({x:1/t,y:1/t});const{x:i,y:o,width:a,height:s}=e.getClientRect(),l=e.toDataURL({x:Math.round(i),y:Math.round(o),width:Math.round(a),height:Math.round(s)});return e.scale(n),{dataURL:l,boundingBox:{x:Math.round(r.x),y:Math.round(r.y),width:Math.round(a),height:Math.round(s)}}},k_e=e=>{const t=document.createElement("a");t.href=e,t.download="",document.body.appendChild(t),t.click(),document.body.removeChild(t),t.remove()},E_e=(e,t,n)=>{const r=document.createElement("img");r.addEventListener("load",()=>{const i=document.createElement("canvas");i.width=t,i.height=n;const o=i.getContext("2d");!o||(o.drawImage(r,0,0),i.toBlob(a=>{a&&navigator.clipboard.write([new ClipboardItem({[a.type]:a})])}),i.remove(),r.remove())}),r.src=e},P_e={cropVisible:!1,shouldSaveToGallery:!1,shouldDownload:!1,shouldCopy:!1,shouldSetAsInitialImage:!0},s3=(e=P_e)=>async(t,n)=>{const{cropVisible:r,shouldSaveToGallery:i,shouldDownload:o,shouldCopy:a,shouldSetAsInitialImage:s}=e;t(M4e("Exporting Image")),t(Xp(!1));const u=n().canvas.stageScale,h=g5();if(!h){t(hu(!1)),t(Xp(!0));return}const{dataURL:p,boundingBox:m}=__e(h,u);if(!p){t(hu(!1)),t(Xp(!0));return}const v=new FormData;v.append("data",JSON.stringify({dataURL:p,filename:"merged_canvas.png",kind:i?"result":"temp",cropVisible:r}));const w=await(await fetch(window.location.origin+"/upload",{method:"POST",body:v})).json(),{url:E,width:P,height:k}=w,T={uuid:t0(),category:i?"result":"user",...w};o&&(k_e(E),t(By({title:"Image Download Started",status:"success",duration:2500,isClosable:!0}))),a&&(E_e(E,P,k),t(By({title:"Image Copied",status:"success",duration:2500,isClosable:!0}))),i&&(t(Qp({image:T,category:"result"})),t(By({title:"Image Saved to Gallery",status:"success",duration:2500,isClosable:!0}))),s&&(t(nSe({kind:"image",layer:"base",...m,image:T})),t(By({title:"Canvas Merged",status:"success",duration:2500,isClosable:!0}))),t(hu(!1)),t(W3("Connected")),t(Xp(!0))},Sk=e=>e.system,T_e=e=>e.system.toastQueue,A_e=ct([wn,yd,Sk],(e,t,n)=>{const{isProcessing:r}=n,{tool:i,brushColor:o,brushSize:a}=e;return{tool:i,isStaging:t,isProcessing:r,brushColor:o,brushColorString:s2(o),brushSize:a}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),L_e=()=>{const e=Ye(),{tool:t,brushColor:n,brushSize:r,brushColorString:i,isStaging:o}=ke(A_e);mt(["v"],()=>{l()},{enabled:()=>!0,preventDefault:!0},[]),mt(["b"],()=>{a()},{enabled:()=>!0,preventDefault:!0},[]),mt(["e"],()=>{s()},{enabled:()=>!0,preventDefault:!0},[t]),mt(["["],()=>{e(hw(Math.max(r-5,5)))},{enabled:()=>!0,preventDefault:!0},[r]),mt(["]"],()=>{e(hw(Math.min(r+5,500)))},{enabled:()=>!0,preventDefault:!0},[r]);const a=()=>e(Zp("brush")),s=()=>e(Zp("eraser")),l=()=>e(Zp("move"));return ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Brush Tool (B)",tooltip:"Brush Tool (B)",icon:x(a5e,{}),"data-selected":t==="brush"&&!o,onClick:a,isDisabled:o}),x(gt,{"aria-label":"Eraser Tool (E)",tooltip:"Eraser Tool (E)",icon:x(X4e,{}),"data-selected":t==="eraser"&&!o,isDisabled:o,onClick:()=>e(Zp("eraser"))}),x(gt,{"aria-label":"Move Tool (V)",tooltip:"Move Tool (V)",icon:x(j4e,{}),"data-selected":t==="move"||o,onClick:l}),x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Tool Options",tooltip:"Tool Options",icon:x(g5e,{})}),children:ne(nn,{minWidth:"15rem",direction:"column",gap:"1rem",width:"100%",children:[x(nn,{gap:"1rem",justifyContent:"space-between",children:x(n2,{label:"Size",value:r,withInput:!0,onChange:u=>e(hw(u)),sliderNumberInputProps:{max:500},inputReadOnly:!1})}),x(XW,{style:{width:"100%",paddingTop:"0.5rem",paddingBottom:"0.5rem"},color:n,onChange:u=>e(Z5e(u))})]})})]})};let lO;const ZW=()=>({setOpenUploader:e=>{e&&(lO=e)},openUploader:lO}),M_e=ct([Sk],e=>{const{isProcessing:t}=e;return{isProcessing:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),O_e=()=>{const e=Ye(),{isProcessing:t}=ke(M_e),n=g5(),{openUploader:r}=ZW();mt(["r"],()=>{i()},{enabled:()=>!0,preventDefault:!0},[n]),mt(["shift+m"],()=>{a()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["shift+s"],()=>{s()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["meta+c","ctrl+c"],()=>{l()},{enabled:()=>!t,preventDefault:!0},[n,t]),mt(["shift+d"],()=>{u()},{enabled:()=>!t,preventDefault:!0},[n,t]);const i=()=>{const h=g5();if(!h)return;const p=h.getClientRect({skipTransform:!0});e(K5e({contentRect:p}))},o=()=>{e(Y5e()),e(tH())},a=()=>{e(s3({cropVisible:!1,shouldSetAsInitialImage:!0}))},s=()=>{e(s3({cropVisible:!0,shouldSaveToGallery:!0}))},l=()=>{e(s3({cropVisible:!0,shouldCopy:!0}))},u=()=>{e(s3({cropVisible:!0,shouldDownload:!0}))};return ne("div",{className:"inpainting-settings",children:[x(S_e,{}),x(L_e,{}),ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Merge Visible (Shift+M)",tooltip:"Merge Visible (Shift+M)",icon:x(r5e,{}),onClick:a,isDisabled:t}),x(gt,{"aria-label":"Save to Gallery (Shift+S)",tooltip:"Save to Gallery (Shift+S)",icon:x(f5e,{}),onClick:s,isDisabled:t}),x(gt,{"aria-label":"Copy to Clipboard (Cmd/Ctrl+C)",tooltip:"Copy to Clipboard (Cmd/Ctrl+C)",icon:x($_,{}),onClick:l,isDisabled:t}),x(gt,{"aria-label":"Download as Image (Shift+D)",tooltip:"Download as Image (Shift+D)",icon:x($$,{}),onClick:u,isDisabled:t})]}),ne(Ia,{isAttached:!0,children:[x(t_e,{}),x(r_e,{})]}),ne(Ia,{isAttached:!0,children:[x(gt,{"aria-label":"Upload",tooltip:"Upload",icon:x(W_,{}),onClick:r}),x(gt,{"aria-label":"Reset View (R)",tooltip:"Reset View (R)",icon:x(K4e,{}),onClick:i}),x(gt,{"aria-label":"Clear Canvas",tooltip:"Clear Canvas",icon:x(H_,{}),onClick:o,style:{backgroundColor:"var(--btn-delete-image)"}})]}),x(Ia,{isAttached:!0,children:x(o_e,{})})]})},I_e=ct([wn],e=>{const{doesCanvasNeedScaling:t}=e;return{doesCanvasNeedScaling:t}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),R_e=()=>{const e=Ye(),{doesCanvasNeedScaling:t}=ke(I_e);return C.exports.useLayoutEffect(()=>{const n=st.debounce(()=>{e(io(!0))},250);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[e]),x("div",{className:"workarea-single-view",children:x("div",{className:"workarea-split-view-left",children:ne("div",{className:"inpainting-main-area",children:[x(O_e,{}),x("div",{className:"inpainting-canvas-area",children:t?x(eCe,{}):x(J8e,{})})]})})})};function N_e(){const e=Ye();return C.exports.useEffect(()=>{e(io(!0))},[e]),x(ok,{optionsPanel:x(Q6e,{}),styleClass:"inpainting-workarea-overrides",children:x(R_e,{})})}const D_e=ut({displayName:"UnifiedCanvasIcon",viewBox:"0 0 3544 3544",path:x("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3543.31,770.787C3543.31,515.578 3336.11,308.38 3080.9,308.38L462.407,308.38C207.197,308.38 -0,515.578 -0,770.787L-0,2766.03C-0,3021.24 207.197,3228.44 462.407,3228.44L3080.9,3228.44C3336.11,3228.44 3543.31,3021.24 3543.31,2766.03C3543.31,2766.03 3543.31,770.787 3543.31,770.787ZM922.933,3113.01L462.407,3113.01C437.741,3113.01 413.674,3110.43 390.453,3105.52L390.453,2899.11L922.933,2899.11L922.933,3113.01ZM947.933,2899.11L947.933,3113.01L1480.41,3113.01L1480.41,2899.11L947.933,2899.11ZM1505.41,2899.11L1505.41,3113.01L2037.89,3113.01L2037.89,2899.11L1505.41,2899.11ZM2062.89,2899.11L2062.89,3113.01L2595.37,3113.01L2595.37,2899.11L2062.89,2899.11ZM3152.85,3105.52C3129.63,3110.43 3105.57,3113.01 3080.9,3113.01L2620.37,3113.01L2620.37,2899.11L3152.85,2899.11L3152.85,3105.52ZM365.453,3099.26L365.408,3099.24C354.521,3096.07 343.79,3092.37 333.266,3088.14C315.377,3080.95 298.094,3072.26 281.651,3062.2C263.114,3050.85 245.648,3037.77 229.544,3023.17C213.34,3008.49 198.518,2992.28 185.34,2974.83C174.102,2959.94 164.06,2944.16 155.353,2927.66C150.517,2918.5 146.102,2909.13 142.102,2899.57L141.91,2899.11L365.453,2899.11L365.453,3099.26ZM3401.4,2899.11C3361.33,2995.39 3279.12,3069.8 3177.85,3099.26L3177.85,2899.11L3401.4,2899.11ZM132.624,2874.11C121.465,2840.08 115.431,2803.76 115.431,2766.03L115.431,2341.63L365.453,2341.63L365.453,2874.11L132.624,2874.11ZM922.933,918.103L922.933,669.193L390.453,669.193L390.453,1201.67L731.014,1201.67L731.014,1226.67L390.453,1226.67L390.453,1759.15L731.014,1759.15L731.014,1784.15L390.453,1784.15L390.453,2316.63L731.014,2316.63L731.014,2341.63L390.453,2341.63L390.453,2874.11L922.933,2874.11L922.933,2625.2C931.122,2627.1 939.463,2628.6 947.933,2629.66L947.933,2874.11L1480.41,2874.11L1480.41,2631.62L1505.41,2631.62L1505.41,2874.11L2037.89,2874.11L2037.89,2631.62L2062.89,2631.62L2062.89,2874.11L2595.37,2874.11L2595.37,2629.66C2603.85,2628.6 2612.18,2627.1 2620.37,2625.2L2620.37,2874.11L3152.85,2874.11L3152.85,2341.63L2812.29,2341.63L2812.29,2316.63L3152.85,2316.63L3152.85,1784.15L2812.29,1784.15L2812.29,1759.15L3152.85,1759.15L3152.85,1226.67L2812.29,1226.67L2812.29,1201.67L3152.85,1201.67L3152.85,669.193L2620.37,669.193L2620.37,918.103C2612.18,916.203 2603.84,914.708 2595.37,913.642L2595.37,669.193L2062.89,669.193L2062.89,911.688L2037.89,911.688L2037.89,669.193L1505.41,669.193L1505.41,911.688L1480.41,911.688L1480.41,669.193L947.933,669.193L947.933,913.642C939.462,914.708 931.123,916.203 922.933,918.103ZM3427.88,2341.63L3427.88,2766.03C3427.88,2803.76 3421.84,2840.08 3410.68,2874.11L3177.85,2874.11L3177.85,2341.63L3427.88,2341.63ZM2494.01,2603.04L2524.53,2603.04C2541.26,2603.04 2557.62,2601.44 2573.47,2598.39L2598.02,2593.66L2588.56,2544.56L2564.01,2549.29C2551.23,2551.75 2538.03,2553.04 2524.53,2553.04L2494.01,2553.04L2494.01,2603.04ZM1294.01,2603.04L1394.01,2603.04L1394.01,2553.04L1294.01,2553.04L1294.01,2603.04ZM1894.01,2603.04L1994.01,2603.04L1994.01,2553.04L1894.01,2553.04L1894.01,2603.04ZM2194.01,2603.04L2294.01,2603.04L2294.01,2553.04L2194.01,2553.04L2194.01,2603.04ZM1144.01,2603.04L1244.01,2603.04L1244.01,2553.04L1144.01,2553.04L1144.01,2603.04ZM1444.01,2603.04L1544.01,2603.04L1544.01,2553.04L1444.01,2553.04L1444.01,2603.04ZM1594.01,2603.04L1694.01,2603.04L1694.01,2553.04L1594.01,2553.04L1594.01,2603.04ZM2344.01,2603.04L2444.01,2603.04L2444.01,2553.04L2344.01,2553.04L2344.01,2603.04ZM2044.01,2603.04L2144.01,2603.04L2144.01,2553.04L2044.01,2553.04L2044.01,2603.04ZM994.01,2603.04L1094.01,2603.04L1094.01,2553.04L994.01,2553.04L994.01,2603.04ZM1744.01,2603.04L1844.01,2603.04L1844.01,2553.04L1744.01,2553.04L1744.01,2603.04ZM864.145,2551.46C878.835,2562.5 894.741,2572 911.624,2579.74L934.352,2590.15L955.18,2544.7L932.452,2534.28C918.844,2528.05 906.024,2520.39 894.185,2511.49L874.199,2496.47L844.16,2536.44L864.145,2551.46ZM2674.44,2554.92C2689.46,2544.16 2703.28,2531.82 2715.65,2518.14L2732.42,2499.61L2695.35,2466.06L2678.58,2484.6C2668.59,2495.63 2657.44,2505.59 2645.32,2514.28L2625,2528.84L2654.12,2569.48L2674.44,2554.92ZM865.632,1911.31L1339.59,1374.15L2030.89,2134.59L2392.97,1713.77L2677.68,2017.9L2677.68,2324.93C2677.68,2424.23 2597.06,2504.85 2497.76,2504.85C2497.76,2504.85 1045.55,2504.85 1045.55,2504.85C946.251,2504.85 865.632,2424.23 865.632,2324.93L865.632,1911.31ZM771.251,2417.22C776.455,2435.14 783.552,2452.26 792.313,2468.35L804.27,2490.3L848.18,2466.39L836.223,2444.43C829.171,2431.49 823.457,2417.7 819.268,2403.28L812.297,2379.27L764.28,2393.21L771.251,2417.22ZM2770.36,2422.83C2775.83,2405.47 2779.52,2387.33 2781.2,2368.61L2783.43,2343.71L2733.64,2339.24L2731.4,2364.14C2730.05,2379.21 2727.08,2393.82 2722.67,2407.79L2715.15,2431.63L2762.84,2446.67L2770.36,2422.83ZM761.068,2236.12L761.068,2336.12L811.068,2336.12L811.068,2236.12L761.068,2236.12ZM3177.85,1784.15L3177.85,2316.63L3427.88,2316.63L3427.88,1784.15L3177.85,1784.15ZM115.431,1784.15L115.431,2316.63L365.453,2316.63L365.453,1784.15L115.431,1784.15ZM2782.24,2291.41L2782.24,2191.41L2732.24,2191.41L2732.24,2291.41L2782.24,2291.41ZM761.068,2086.12L761.068,2186.12L811.068,2186.12L811.068,2086.12L761.068,2086.12ZM2782.24,2141.41L2782.24,2041.4L2732.24,2041.4L2732.24,2141.41L2782.24,2141.41ZM761.068,1936.12L761.068,2036.12L811.068,2036.12L811.068,1936.12L761.068,1936.12ZM2782.24,1991.4L2782.24,1891.4L2732.24,1891.4L2732.24,1991.4L2782.24,1991.4ZM761.068,1786.12L761.068,1886.12L811.068,1886.12L811.068,1786.12L761.068,1786.12ZM2782.24,1841.4L2782.24,1741.41L2732.24,1741.41L2732.24,1841.4L2782.24,1841.4ZM3177.85,1226.67L3177.85,1759.15L3427.88,1759.15L3427.88,1226.67L3177.85,1226.67ZM115.431,1226.67L115.431,1759.15L365.453,1759.15L365.453,1226.67L115.431,1226.67ZM761.068,1636.12L761.068,1736.12L811.068,1736.12L811.068,1636.12L761.068,1636.12ZM2782.24,1691.41L2782.24,1591.41L2732.24,1591.41L2732.24,1691.41L2782.24,1691.41ZM761.068,1486.12L761.068,1586.12L811.068,1586.12L811.068,1486.12L761.068,1486.12ZM2203.72,1132.2C2318.18,1132.2 2411.11,1225.13 2411.11,1339.59C2411.11,1454.05 2318.18,1546.98 2203.72,1546.98C2089.26,1546.98 1996.33,1454.05 1996.33,1339.59C1996.33,1225.13 2089.26,1132.2 2203.72,1132.2ZM2782.24,1541.41L2782.24,1441.41L2732.24,1441.41L2732.24,1541.41L2782.24,1541.41ZM761.068,1336.12L761.068,1436.12L811.068,1436.12L811.068,1336.12L761.068,1336.12ZM2782.24,1391.41L2782.24,1291.41L2732.24,1291.41L2732.24,1391.41L2782.24,1391.41ZM761.068,1186.12L761.068,1286.12L811.068,1286.12L811.068,1186.12L761.068,1186.12ZM2732.24,1197.98L2732.24,1241.41L2782.24,1241.41L2782.24,1172.98L2781.03,1172.98C2780.06,1162.82 2778.49,1152.83 2776.36,1143.04L2771.04,1118.62L2722.18,1129.24L2727.5,1153.67C2730.61,1167.95 2732.24,1182.78 2732.24,1197.98ZM3412.74,669.193L3412.89,669.694C3414.66,675.5 3416.28,681.348 3417.73,687.238C3420.46,698.265 3422.65,709.427 3424.28,720.67C3425.85,731.554 3426.91,742.513 3427.45,753.497C3427.74,759.256 3427.87,765.021 3427.88,770.787L3427.88,1201.67L3177.85,1201.67L3177.85,669.193L3412.74,669.193ZM115.431,1201.67L115.431,770.787C115.436,765.021 115.572,759.256 115.855,753.497C116.395,742.513 117.453,731.554 119.031,720.67C120.66,709.427 122.844,698.265 125.574,687.238C127.032,681.348 128.65,675.5 130.414,669.694L130.567,669.193L365.453,669.193L365.453,1201.67L115.431,1201.67ZM804.386,1055C794.186,1070.26 785.572,1086.67 778.777,1103.99L769.647,1127.26L816.194,1145.52L825.324,1122.25C830.797,1108.3 837.738,1095.08 845.955,1082.79L859.848,1062L818.279,1034.21L804.386,1055ZM2730.5,1043.14C2719.39,1028.39 2706.73,1014.86 2692.77,1002.81L2673.84,986.48L2641.17,1024.34L2660.1,1040.67C2671.37,1050.39 2681.59,1061.31 2690.56,1073.22L2705.6,1093.19L2745.54,1063.11L2730.5,1043.14ZM933.266,954.821C915.698,961.006 898.998,969.041 883.402,978.694L862.144,991.851L888.457,1034.37L909.715,1021.21C922.275,1013.44 935.723,1006.96 949.871,1001.98L973.452,993.681L956.848,946.518L933.266,954.821ZM2596.18,950.378C2578.71,945.327 2560.49,942.072 2541.72,940.832L2516.78,939.183L2513.48,989.074L2538.43,990.723C2553.54,991.722 2568.22,994.341 2582.28,998.409L2606.3,1005.36L2620.19,957.325L2596.18,950.378ZM2165.09,940.265L2065.09,940.265L2065.09,990.265L2165.09,990.265L2165.09,940.265ZM1865.08,940.265L1765.08,940.265L1765.08,990.265L1865.08,990.265L1865.08,940.265ZM1115.08,940.265L1015.08,940.265L1015.08,990.265L1115.08,990.265L1115.08,940.265ZM2015.09,940.265L1915.09,940.265L1915.09,990.265L2015.09,990.265L2015.09,940.265ZM2315.09,940.265L2215.09,940.265L2215.09,990.265L2315.09,990.265L2315.09,940.265ZM1265.08,940.265L1165.08,940.265L1165.08,990.265L1265.08,990.265L1265.08,940.265ZM1415.08,940.265L1315.08,940.265L1315.08,990.265L1415.08,990.265L1415.08,940.265ZM1565.08,940.265L1465.08,940.265L1465.08,990.265L1565.08,990.265L1565.08,940.265ZM1715.08,940.265L1615.08,940.265L1615.08,990.265L1715.08,990.265L1715.08,940.265ZM2465.09,940.265L2365.09,940.265L2365.09,990.265L2465.09,990.265L2465.09,940.265ZM365.453,437.562L365.453,644.193L139.286,644.193C178.303,544.782 261.917,467.677 365.453,437.562ZM922.933,423.812L922.933,644.193L390.453,644.193L390.453,431.295C413.674,426.391 437.741,423.812 462.407,423.812L922.933,423.812ZM947.933,423.812L947.933,644.193L1480.41,644.193L1480.41,423.812L947.933,423.812ZM1505.41,423.812L1505.41,644.193L2037.89,644.193L2037.89,423.812L1505.41,423.812ZM2062.89,423.812L2062.89,644.193L2595.37,644.193L2595.37,423.812L2062.89,423.812ZM2620.37,423.812L3080.9,423.812C3105.57,423.812 3129.63,426.391 3152.85,431.295L3152.85,644.193L2620.37,644.193L2620.37,423.812ZM3177.85,437.562C3281.38,467.669 3365,544.774 3404.02,644.193L3177.85,644.193L3177.85,437.562Z"})}),kf={txt2img:{title:x(O3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(kwe,{}),tooltip:"Text To Image"},img2img:{title:x(A3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(wwe,{}),tooltip:"Image To Image"},unifiedCanvas:{title:x(D_e,{fill:"black",boxSize:"2.5rem"}),workarea:x(N_e,{}),tooltip:"Unified Canvas"},nodes:{title:x(L3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(P3e,{}),tooltip:"Nodes"},postprocess:{title:x(M3e,{fill:"black",boxSize:"2.5rem"}),workarea:x(T3e,{}),tooltip:"Post Processing"}},db=st.map(kf,(e,t)=>t);[...db];function z_e(){const e=ke(u=>u.options.activeTab),t=ke(u=>u.options.isLightBoxOpen),n=ke(u=>u.gallery.shouldShowGallery),r=ke(u=>u.options.shouldShowOptionsPanel),i=ke(u=>u.gallery.shouldPinGallery),o=ke(u=>u.options.shouldPinOptionsPanel),a=Ye();mt("1",()=>{a(na(0))}),mt("2",()=>{a(na(1))}),mt("3",()=>{a(na(2))}),mt("4",()=>{a(na(3))}),mt("5",()=>{a(na(4))}),mt("z",()=>{a(ad(!t))},[t]),mt("f",()=>{n||r?(a(A0(!1)),a(k0(!1))):(a(A0(!0)),a(k0(!0))),(i||o)&&setTimeout(()=>a(io(!0)),400)},[n,r]);const s=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(Oi,{hasArrow:!0,label:kf[h].tooltip,placement:"right",children:x(NF,{children:kf[h].title})},h))}),u},l=()=>{const u=[];return Object.keys(kf).forEach(h=>{u.push(x(IF,{className:"app-tabs-panel",children:kf[h].workarea},h))}),u};return ne(OF,{isLazy:!0,className:"app-tabs",variant:"unstyled",defaultIndex:e,index:e,onChange:u=>{a(na(u)),a(io(!0))},children:[x("div",{className:"app-tabs-list",children:s()}),x(RF,{className:"app-tabs-panels",children:t?x(B6e,{}):l()})]})}const QW={prompt:"",iterations:1,steps:50,cfgScale:7.5,height:512,width:512,sampler:"k_lms",threshold:0,perlin:0,seed:0,seamless:!1,hiresFix:!1,img2imgStrength:.75,maskPath:"",shouldFitToWidthHeight:!0,shouldGenerateVariations:!1,variationAmount:.1,seedWeights:"",shouldRunESRGAN:!1,upscalingLevel:4,upscalingStrength:.75,shouldRunFacetool:!1,facetoolStrength:.8,facetoolType:"gfpgan",codeformerFidelity:.75,shouldRandomizeSeed:!0,showAdvancedOptions:!0,activeTab:0,shouldShowImageDetails:!1,showDualDisplay:!0,shouldShowOptionsPanel:!0,shouldPinOptionsPanel:!0,optionsPanelScrollPosition:0,shouldHoldOptionsPanelOpen:!1,shouldLoopback:!1,currentTheme:"dark",isLightBoxOpen:!1},B_e=QW,JW=TS({name:"options",initialState:B_e,reducers:{setPrompt:(e,t)=>{const n=t.payload;typeof n=="string"?e.prompt=n:e.prompt=H3(n)},setIterations:(e,t)=>{e.iterations=t.payload},setSteps:(e,t)=>{e.steps=t.payload},setCfgScale:(e,t)=>{e.cfgScale=t.payload},setThreshold:(e,t)=>{e.threshold=t.payload},setPerlin:(e,t)=>{e.perlin=t.payload},setHeight:(e,t)=>{e.height=t.payload},setWidth:(e,t)=>{e.width=t.payload},setSampler:(e,t)=>{e.sampler=t.payload},setSeed:(e,t)=>{e.seed=t.payload,e.shouldRandomizeSeed=!1},setImg2imgStrength:(e,t)=>{e.img2imgStrength=t.payload},setFacetoolStrength:(e,t)=>{e.facetoolStrength=t.payload},setCodeformerFidelity:(e,t)=>{e.codeformerFidelity=t.payload},setUpscalingLevel:(e,t)=>{e.upscalingLevel=t.payload},setUpscalingStrength:(e,t)=>{e.upscalingStrength=t.payload},setMaskPath:(e,t)=>{e.maskPath=t.payload},setSeamless:(e,t)=>{e.seamless=t.payload},setHiresFix:(e,t)=>{e.hiresFix=t.payload},setShouldFitToWidthHeight:(e,t)=>{e.shouldFitToWidthHeight=t.payload},resetSeed:e=>{e.seed=-1},setParameter:(e,t)=>{const{key:n,value:r}=t.payload,i={...e,[n]:r};return n==="seed"&&(i.shouldRandomizeSeed=!1),i},setShouldGenerateVariations:(e,t)=>{e.shouldGenerateVariations=t.payload},setVariationAmount:(e,t)=>{e.variationAmount=t.payload},setSeedWeights:(e,t)=>{e.seedWeights=t.payload},setAllTextToImageParameters:(e,t)=>{const{sampler:n,prompt:r,seed:i,variations:o,steps:a,cfg_scale:s,threshold:l,perlin:u,seamless:h,hires_fix:p,width:m,height:v}=t.payload.image;o&&o.length>0?(e.seedWeights=r5(o),e.shouldGenerateVariations=!0):e.shouldGenerateVariations=!1,i&&(e.seed=i,e.shouldRandomizeSeed=!1),r&&(e.prompt=H3(r)),n&&(e.sampler=n),a&&(e.steps=a),s&&(e.cfgScale=s),l&&(e.threshold=l),typeof l>"u"&&(e.threshold=0),u&&(e.perlin=u),typeof u>"u"&&(e.perlin=0),typeof h=="boolean"&&(e.seamless=h),typeof p=="boolean"&&(e.hiresFix=p),m&&(e.width=m),v&&(e.height=v)},setAllImageToImageParameters:(e,t)=>{const{type:n,strength:r,fit:i,init_image_path:o,mask_image_path:a}=t.payload.image;n==="img2img"&&(o&&(e.initialImage=o),a&&(e.maskPath=a),r&&(e.img2imgStrength=r),typeof i=="boolean"&&(e.shouldFitToWidthHeight=i))},setAllParameters:(e,t)=>{const{type:n,sampler:r,prompt:i,seed:o,variations:a,steps:s,cfg_scale:l,threshold:u,perlin:h,seamless:p,hires_fix:m,width:v,height:S,strength:w,fit:E,init_image_path:P,mask_image_path:k}=t.payload.image;n==="img2img"&&(P&&(e.initialImage=P),k&&(e.maskPath=k),w&&(e.img2imgStrength=w),typeof E=="boolean"&&(e.shouldFitToWidthHeight=E)),a&&a.length>0?(e.seedWeights=r5(a),e.shouldGenerateVariations=!0,e.variationAmount=0):e.shouldGenerateVariations=!1,o&&(e.seed=o,e.shouldRandomizeSeed=!1),i&&(e.prompt=H3(i)),r&&(e.sampler=r),s&&(e.steps=s),l&&(e.cfgScale=l),u&&(e.threshold=u),typeof u>"u"&&(e.threshold=0),h&&(e.perlin=h),typeof h>"u"&&(e.perlin=0),typeof p=="boolean"&&(e.seamless=p),typeof m=="boolean"&&(e.hiresFix=m),v&&(e.width=v),S&&(e.height=S)},resetOptionsState:e=>({...e,...QW}),setShouldRunFacetool:(e,t)=>{e.shouldRunFacetool=t.payload},setFacetoolType:(e,t)=>{e.facetoolType=t.payload},setShouldRunESRGAN:(e,t)=>{e.shouldRunESRGAN=t.payload},setShouldRandomizeSeed:(e,t)=>{e.shouldRandomizeSeed=t.payload},setShowAdvancedOptions:(e,t)=>{e.showAdvancedOptions=t.payload},setActiveTab:(e,t)=>{typeof t.payload=="number"?e.activeTab=t.payload:e.activeTab=db.indexOf(t.payload)},setShouldShowImageDetails:(e,t)=>{e.shouldShowImageDetails=t.payload},setShowDualDisplay:(e,t)=>{e.showDualDisplay=t.payload},setInitialImage:(e,t)=>{e.initialImage=t.payload},clearInitialImage:e=>{e.initialImage=void 0},setShouldPinOptionsPanel:(e,t)=>{e.shouldPinOptionsPanel=t.payload},setShouldShowOptionsPanel:(e,t)=>{e.shouldShowOptionsPanel=t.payload},setOptionsPanelScrollPosition:(e,t)=>{e.optionsPanelScrollPosition=t.payload},setShouldHoldOptionsPanelOpen:(e,t)=>{e.shouldHoldOptionsPanelOpen=t.payload},setShouldLoopback:(e,t)=>{e.shouldLoopback=t.payload},setCurrentTheme:(e,t)=>{e.currentTheme=t.payload},setIsLightBoxOpen:(e,t)=>{e.isLightBoxOpen=t.payload}}}),{setPrompt:fb,setIterations:F_e,setSteps:eV,setCfgScale:tV,setThreshold:$_e,setPerlin:H_e,setHeight:nV,setWidth:rV,setSampler:iV,setSeed:l2,setSeamless:oV,setHiresFix:aV,setImg2imgStrength:m9,setFacetoolStrength:j3,setFacetoolType:Y3,setCodeformerFidelity:sV,setUpscalingLevel:v9,setUpscalingStrength:y9,setMaskPath:lV,resetSeed:eTe,resetOptionsState:tTe,setShouldFitToWidthHeight:uV,setParameter:nTe,setShouldGenerateVariations:W_e,setSeedWeights:cV,setVariationAmount:V_e,setAllParameters:U_e,setShouldRunFacetool:G_e,setShouldRunESRGAN:j_e,setShouldRandomizeSeed:Y_e,setShowAdvancedOptions:q_e,setActiveTab:na,setShouldShowImageDetails:dV,setAllTextToImageParameters:K_e,setAllImageToImageParameters:X_e,setShowDualDisplay:Z_e,setInitialImage:u2,clearInitialImage:fV,setShouldShowOptionsPanel:A0,setShouldPinOptionsPanel:Q_e,setOptionsPanelScrollPosition:J_e,setShouldHoldOptionsPanelOpen:eke,setShouldLoopback:tke,setCurrentTheme:nke,setIsLightBoxOpen:ad}=JW.actions,rke=JW.reducer,Ml=Object.create(null);Ml.open="0";Ml.close="1";Ml.ping="2";Ml.pong="3";Ml.message="4";Ml.upgrade="5";Ml.noop="6";const q3=Object.create(null);Object.keys(Ml).forEach(e=>{q3[Ml[e]]=e});const ike={type:"error",data:"parser error"},oke=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ake=typeof ArrayBuffer=="function",ske=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,hV=({type:e,data:t},n,r)=>oke&&t instanceof Blob?n?r(t):uO(t,r):ake&&(t instanceof ArrayBuffer||ske(t))?n?r(t):uO(new Blob([t]),r):r(Ml[e]+(t||"")),uO=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},cO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),h=new Uint8Array(u);for(r=0;r>4,h[i++]=(a&15)<<4|s>>2,h[i++]=(s&3)<<6|l&63;return u},uke=typeof ArrayBuffer=="function",pV=(e,t)=>{if(typeof e!="string")return{type:"message",data:gV(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:cke(e.substring(1),t)}:q3[n]?e.length>1?{type:q3[n],data:e.substring(1)}:{type:q3[n]}:ike},cke=(e,t)=>{if(uke){const n=lke(e);return gV(n,t)}else return{base64:!0,data:e}},gV=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},mV=String.fromCharCode(30),dke=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{hV(o,!1,s=>{r[a]=s,++i===n&&t(r.join(mV))})})},fke=(e,t)=>{const n=e.split(mV),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function yV(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const pke=setTimeout,gke=clearTimeout;function hb(e,t){t.useNativeTimers?(e.setTimeoutFn=pke.bind($c),e.clearTimeoutFn=gke.bind($c)):(e.setTimeoutFn=setTimeout.bind($c),e.clearTimeoutFn=clearTimeout.bind($c))}const mke=1.33;function vke(e){return typeof e=="string"?yke(e):Math.ceil((e.byteLength||e.size)*mke)}function yke(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class Ske extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class SV extends Vr{constructor(t){super(),this.writable=!1,hb(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new Ske(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=pV(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const bV="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),S9=64,bke={};let dO=0,l3=0,fO;function hO(e){let t="";do t=bV[e%S9]+t,e=Math.floor(e/S9);while(e>0);return t}function xV(){const e=hO(+new Date);return e!==fO?(dO=0,fO=e):e+"."+hO(dO++)}for(;l3{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};fke(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,dke(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=xV()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new Pl(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Pl extends Vr{constructor(t,n){super(),hb(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=yV(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new _V(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=Pl.requestsCount++,Pl.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Cke,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Pl.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Pl.requestsCount=0;Pl.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",pO);else if(typeof addEventListener=="function"){const e="onpagehide"in $c?"pagehide":"unload";addEventListener(e,pO,!1)}}function pO(){for(let e in Pl.requests)Pl.requests.hasOwnProperty(e)&&Pl.requests[e].abort()}const kV=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),u3=$c.WebSocket||$c.MozWebSocket,gO=!0,Eke="arraybuffer",mO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Pke extends SV{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=mO?{}:yV(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=gO&&!mO?n?new u3(t,n):new u3(t):new u3(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||Eke,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const a={};try{gO&&this.ws.send(o)}catch{}i&&kV(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=xV()),this.supportsBinary||(t.b64=1);const i=wV(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!u3}}const Tke={websocket:Pke,polling:kke},Ake=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Lke=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function b9(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Ake.exec(e||""),o={},a=14;for(;a--;)o[Lke[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Mke(o,o.path),o.queryKey=Oke(o,o.query),o}function Mke(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Oke(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class Ic extends Vr{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=b9(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=b9(n.host).host),hb(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=xke(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=vV,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Tke[t](r)}open(){let t;if(this.opts.rememberUpgrade&&Ic.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;Ic.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ic.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,h(),n.close(),n=null)}const a=p=>{const m=new Error("probe error: "+p);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function s(){a("transport closed")}function l(){a("socket closed")}function u(p){n&&p.name!==n.name&&o()}const h=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",u)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",u),n.open()}onOpen(){if(this.readyState="open",Ic.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){Ic.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,EV=Object.prototype.toString,Dke=typeof Blob=="function"||typeof Blob<"u"&&EV.call(Blob)==="[object BlobConstructor]",zke=typeof File=="function"||typeof File<"u"&&EV.call(File)==="[object FileConstructor]";function bk(e){return Rke&&(e instanceof ArrayBuffer||Nke(e))||Dke&&e instanceof Blob||zke&&e instanceof File}function K3(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case tn.ACK:case tn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Wke{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Fke(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Vke=Object.freeze(Object.defineProperty({__proto__:null,protocol:$ke,get PacketType(){return tn},Encoder:Hke,Decoder:xk},Symbol.toStringTag,{value:"Module"}));function hs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Uke=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class PV extends Vr{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[hs(t,"open",this.onopen.bind(this)),hs(t,"packet",this.onpacket.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(Uke.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:tn.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:tn.CONNECT,data:t})}):this.packet({type:tn.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tn.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tn.EVENT:case tn.BINARY_EVENT:this.onevent(t);break;case tn.ACK:case tn.BINARY_ACK:this.onack(t);break;case tn.DISCONNECT:this.ondisconnect();break;case tn.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:tn.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}p1.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};p1.prototype.reset=function(){this.attempts=0};p1.prototype.setMin=function(e){this.ms=e};p1.prototype.setMax=function(e){this.max=e};p1.prototype.setJitter=function(e){this.jitter=e};class C9 extends Vr{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,hb(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new p1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Vke;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Ic(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=hs(n,"open",function(){r.onopen(),t&&t()}),o=hs(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(hs(t,"ping",this.onping.bind(this)),hs(t,"data",this.ondata.bind(this)),hs(t,"error",this.onerror.bind(this)),hs(t,"close",this.onclose.bind(this)),hs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){kV(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new PV(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Kg={};function X3(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Ike(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Kg[i]&&o in Kg[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new C9(r,t):(Kg[i]||(Kg[i]=new C9(r,t)),l=Kg[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(X3,{Manager:C9,Socket:PV,io:X3,connect:X3});var Gke=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,jke=/\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g,Yke=/[^-+\dA-Z]/g;function _o(e,t,n,r){if(arguments.length===1&&typeof e=="string"&&!/\d/.test(e)&&(t=e,e=void 0),e=e||e===0?e:new Date,e instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");t=String(vO[t]||t||vO.default);var i=t.slice(0,4);(i==="UTC:"||i==="GMT:")&&(t=t.slice(4),n=!0,i==="GMT:"&&(r=!0));var o=function(){return n?"getUTC":"get"},a=function(){return e[o()+"Date"]()},s=function(){return e[o()+"Day"]()},l=function(){return e[o()+"Month"]()},u=function(){return e[o()+"FullYear"]()},h=function(){return e[o()+"Hours"]()},p=function(){return e[o()+"Minutes"]()},m=function(){return e[o()+"Seconds"]()},v=function(){return e[o()+"Milliseconds"]()},S=function(){return n?0:e.getTimezoneOffset()},w=function(){return qke(e)},E=function(){return Kke(e)},P={d:function(){return a()},dd:function(){return Qo(a())},ddd:function(){return wo.dayNames[s()]},DDD:function(){return yO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()],short:!0})},dddd:function(){return wo.dayNames[s()+7]},DDDD:function(){return yO({y:u(),m:l(),d:a(),_:o(),dayName:wo.dayNames[s()+7]})},m:function(){return l()+1},mm:function(){return Qo(l()+1)},mmm:function(){return wo.monthNames[l()]},mmmm:function(){return wo.monthNames[l()+12]},yy:function(){return String(u()).slice(2)},yyyy:function(){return Qo(u(),4)},h:function(){return h()%12||12},hh:function(){return Qo(h()%12||12)},H:function(){return h()},HH:function(){return Qo(h())},M:function(){return p()},MM:function(){return Qo(p())},s:function(){return m()},ss:function(){return Qo(m())},l:function(){return Qo(v(),3)},L:function(){return Qo(Math.floor(v()/10))},t:function(){return h()<12?wo.timeNames[0]:wo.timeNames[1]},tt:function(){return h()<12?wo.timeNames[2]:wo.timeNames[3]},T:function(){return h()<12?wo.timeNames[4]:wo.timeNames[5]},TT:function(){return h()<12?wo.timeNames[6]:wo.timeNames[7]},Z:function(){return r?"GMT":n?"UTC":Xke(e)},o:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60)*100+Math.abs(S())%60,4)},p:function(){return(S()>0?"-":"+")+Qo(Math.floor(Math.abs(S())/60),2)+":"+Qo(Math.floor(Math.abs(S())%60),2)},S:function(){return["th","st","nd","rd"][a()%10>3?0:(a()%100-a()%10!=10)*a()%10]},W:function(){return w()},WW:function(){return Qo(w())},N:function(){return E()}};return t.replace(Gke,function(k){return k in P?P[k]():k.slice(1,k.length-1)})}var vO={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},wo={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]},Qo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return String(t).padStart(n,"0")},yO=function(t){var n=t.y,r=t.m,i=t.d,o=t._,a=t.dayName,s=t.short,l=s===void 0?!1:s,u=new Date,h=new Date;h.setDate(h[o+"Date"]()-1);var p=new Date;p.setDate(p[o+"Date"]()+1);var m=function(){return u[o+"Date"]()},v=function(){return u[o+"Month"]()},S=function(){return u[o+"FullYear"]()},w=function(){return h[o+"Date"]()},E=function(){return h[o+"Month"]()},P=function(){return h[o+"FullYear"]()},k=function(){return p[o+"Date"]()},T=function(){return p[o+"Month"]()},M=function(){return p[o+"FullYear"]()};return S()===n&&v()===r&&m()===i?l?"Tdy":"Today":P()===n&&E()===r&&w()===i?l?"Ysd":"Yesterday":M()===n&&T()===r&&k()===i?l?"Tmw":"Tomorrow":a},qke=function(t){var n=new Date(t.getFullYear(),t.getMonth(),t.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=new Date(n.getFullYear(),0,4);r.setDate(r.getDate()-(r.getDay()+6)%7+3);var i=n.getTimezoneOffset()-r.getTimezoneOffset();n.setHours(n.getHours()-i);var o=(n-r)/(864e5*7);return 1+Math.floor(o)},Kke=function(t){var n=t.getDay();return n===0&&(n=7),n},Xke=function(t){return(String(t).match(jke)||[""]).pop().replace(Yke,"").replace(/GMT\+0000/g,"UTC")};const Zke=e=>{const{dispatch:t,getState:n}=e;return{onConnect:()=>{try{t(BL(!0)),t(W3("Connected")),t(E5e());const r=n().gallery;r.categories.user.latest_mtime?t(WL("user")):t(VC("user")),r.categories.result.latest_mtime?t(WL("result")):t(VC("result"))}catch(r){console.error(r)}},onDisconnect:()=>{try{t(BL(!1)),t(W3("Disconnected")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Disconnected from server",level:"warning"}))}catch(r){console.error(r)}},onGenerationResult:r=>{try{const i=n(),{shouldLoopback:o,activeTab:a}=i.options,{boundingBox:s,generationMode:l,...u}=r,h={uuid:t0(),...u};if(["txt2img","img2img"].includes(l)&&t(Qp({category:"result",image:{...h,category:"result"}})),l==="unifiedCanvas"&&r.boundingBox){const{boundingBox:p}=r;t($5e({image:{...h,category:"temp"},boundingBox:p})),i.canvas.shouldAutoSave&&t(Qp({image:{...h,category:"result"},category:"result"}))}if(o)switch(db[a]){case"img2img":{t(u2(h));break}}t(gw()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generated: ${r.url}`}))}catch(i){console.error(i)}},onIntermediateResult:r=>{try{t(CSe({uuid:t0(),...r})),r.isBase64||t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image generated: ${r.url}`}))}catch(i){console.error(i)}},onPostprocessingResult:r=>{try{t(Qp({category:"result",image:{uuid:t0(),...r,category:"result"}})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Postprocessed: ${r.url}`}))}catch(i){console.error(i)}},onProgressUpdate:r=>{try{t(hu(!0)),t(w4e(r))}catch(i){console.error(i)}},onError:r=>{const{message:i,additionalData:o}=r;try{t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Server error: ${i}`,level:"error"})),t(FL()),t(gw())}catch(a){console.error(a)}},onGalleryImages:r=>{const{images:i,areMoreImagesAvailable:o,category:a}=r,s=i.map(l=>({uuid:t0(),...l}));t(wSe({images:s,areMoreImagesAvailable:o,category:a})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Loaded ${i.length} images`}))},onProcessingCanceled:()=>{t(k4e());const{intermediateImage:r}=n().gallery;r&&(r.isBase64||(t(Qp({category:"result",image:r})),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Intermediate image saved: ${r.url}`}))),t(gw())),t(Co({timestamp:_o(new Date,"isoDateTime"),message:"Processing canceled",level:"warning"}))},onImageDeleted:r=>{const{url:i}=r;t(uH(r));const{initialImage:o,maskPath:a}=n().options;(o?.url===i||o===i)&&t(fV()),a===i&&t(lV("")),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image deleted: ${i}`}))},onSystemConfig:r=>{t(C4e(r))},onModelChanged:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(W3("Model Changed")),t(hu(!1)),t(Xp(!0)),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model changed: ${i}`,level:"info"}))},onModelChangeFailed:r=>{const{model_name:i,model_list:o}=r;t($L(o)),t(hu(!1)),t(Xp(!0)),t(FL()),t(Co({timestamp:_o(new Date,"isoDateTime"),message:`Model change failed: ${i}`,level:"error"}))}}},Qke=(e,t)=>{const{width:n,height:r}=t,i=document.createElement("div"),o=new jg.Stage({container:i,width:n,height:r}),a=new jg.Layer,s=new jg.Layer;a.add(new jg.Rect({...t,fill:"white"})),e.forEach(u=>s.add(new jg.Line({points:u.points,stroke:"black",strokeWidth:u.strokeWidth*2,tension:0,lineCap:"round",lineJoin:"round",shadowForStrokeEnabled:!1,globalCompositeOperation:u.tool==="brush"?"source-over":"destination-out"}))),o.add(a),o.add(s);const l=o.toDataURL({...t});return i.remove(),l},Jke=e=>{const t=window.open("");!t||e.forEach(n=>{const r=new Image;r.src=n.base64,t.document.write(n.caption),t.document.write("
"),t.document.write(r.outerHTML),t.document.write("

")})},eEe=e=>{const t=g5(),{generationMode:n,optionsState:r,canvasState:i,systemState:o,imageToProcessUrl:a}=e,{prompt:s,iterations:l,steps:u,cfgScale:h,threshold:p,perlin:m,height:v,width:S,sampler:w,seed:E,seamless:P,hiresFix:k,img2imgStrength:T,initialImage:M,shouldFitToWidthHeight:I,shouldGenerateVariations:R,variationAmount:N,seedWeights:z,shouldRunESRGAN:$,upscalingLevel:W,upscalingStrength:q,shouldRunFacetool:de,facetoolStrength:H,codeformerFidelity:J,facetoolType:re,shouldRandomizeSeed:oe}=r,{shouldDisplayInProgressType:X,saveIntermediatesInterval:G,enableImageDebugging:Q}=o,j={prompt:s,iterations:oe||R?l:1,steps:u,cfg_scale:h,threshold:p,perlin:m,height:v,width:S,sampler_name:w,seed:E,progress_images:X==="full-res",progress_latents:X==="latents",save_intermediates:G,generation_mode:n,init_mask:""};if(j.seed=oe?O$(P_,T_):E,["txt2img","img2img"].includes(n)&&(j.seamless=P,j.hires_fix=k),n==="img2img"&&M&&(j.init_img=typeof M=="string"?M:M.url,j.strength=T,j.fit=I),n==="unifiedCanvas"&&t){const{layerState:{objects:Se},boundingBoxCoordinates:xe,boundingBoxDimensions:Fe,inpaintReplace:We,shouldUseInpaintReplace:ht,stageScale:qe,isMaskEnabled:rt,shouldPreserveMaskedArea:Ze}=i,Xe={...xe,...Fe},Et=Qke(rt?Se.filter(U_):[],Xe);j.init_mask=Et,j.fit=!1,j.init_img=a,j.strength=T,j.invert_mask=Ze,ht&&(j.inpaint_replace=We),j.bounding_box=Xe;const bt=t.scale();t.scale({x:1/qe,y:1/qe});const Ae=t.getAbsolutePosition(),it=t.toDataURL({x:Xe.x+Ae.x,y:Xe.y+Ae.y,width:Xe.width,height:Xe.height});Q&&Jke([{base64:Et,caption:"mask sent as init_mask"},{base64:it,caption:"image sent as init_img"}]),t.scale(bt),j.init_img=it,j.progress_images=!1,j.seam_size=96,j.seam_blur=16,j.seam_strength=.7,j.seam_steps=10,j.tile_size=32,j.force_outpaint=!1}R?(j.variation_amount=N,z&&(j.with_variations=j2e(z))):j.variation_amount=0;let Z=!1,me=!1;return $&&(Z={level:W,strength:q}),de&&(me={type:re,strength:H},re==="codeformer"&&(me.codeformer_fidelity=J)),Q&&(j.enable_image_debugging=Q),{generationParameters:j,esrganParameters:Z,facetoolParameters:me}},tEe=(e,t)=>{const{dispatch:n,getState:r}=e;return{emitGenerateImage:i=>{n(hu(!0));const o=r(),{options:a,system:s,canvas:l,gallery:u}=o,h={generationMode:i,optionsState:a,canvasState:l,systemState:s};if(n(A4e()),!["txt2img","img2img"].includes(i)){if(!u.currentImage?.url)return;h.imageToProcessUrl=u.currentImage.url}const{generationParameters:p,esrganParameters:m,facetoolParameters:v}=eEe(h);t.emit("generateImage",p,m,v),p.init_mask&&(p.init_mask=p.init_mask.substr(0,64).concat("...")),p.init_img&&(p.init_img=p.init_img.substr(0,64).concat("...")),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Image generation requested: ${JSON.stringify({...p,...m,...v})}`}))},emitRunESRGAN:i=>{n(hu(!0));const o=r().options,{upscalingLevel:a,upscalingStrength:s}=o,l={upscale:[a,s]};t.emit("runPostprocessing",i,{type:"esrgan",...l}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`ESRGAN upscale requested: ${JSON.stringify({file:i.url,...l})}`}))},emitRunFacetool:i=>{n(hu(!0));const o=r().options,{facetoolType:a,facetoolStrength:s,codeformerFidelity:l}=o,u={facetool_strength:s};a==="codeformer"&&(u.codeformer_fidelity=l),t.emit("runPostprocessing",i,{type:a,...u}),n(Co({timestamp:_o(new Date,"isoDateTime"),message:`Face restoration (${a}) requested: ${JSON.stringify({file:i.url,...u})}`}))},emitDeleteImage:i=>{const{url:o,uuid:a,category:s,thumbnail:l}=i;n(uH(i)),t.emit("deleteImage",o,l,a,s)},emitRequestImages:i=>{const o=r().gallery,{earliest_mtime:a}=o.categories[i];t.emit("requestImages",i,a)},emitRequestNewImages:i=>{const o=r().gallery,{latest_mtime:a}=o.categories[i];t.emit("requestLatestImages",i,a)},emitCancelProcessing:()=>{t.emit("cancel")},emitRequestSystemConfig:()=>{t.emit("requestSystemConfig")},emitRequestModelChange:i=>{n(E4e()),t.emit("requestModelChange",i)}}},nEe=()=>{const{origin:e}=new URL(window.location.href),t=X3(e,{timeout:6e4,path:window.location.pathname+"socket.io"});let n=!1;return i=>o=>a=>{const{onConnect:s,onDisconnect:l,onError:u,onPostprocessingResult:h,onGenerationResult:p,onIntermediateResult:m,onProgressUpdate:v,onGalleryImages:S,onProcessingCanceled:w,onImageDeleted:E,onSystemConfig:P,onModelChanged:k,onModelChangeFailed:T}=Zke(i),{emitGenerateImage:M,emitRunESRGAN:I,emitRunFacetool:R,emitDeleteImage:N,emitRequestImages:z,emitRequestNewImages:$,emitCancelProcessing:W,emitRequestSystemConfig:q,emitRequestModelChange:de}=tEe(i,t);switch(n||(t.on("connect",()=>s()),t.on("disconnect",()=>l()),t.on("error",H=>u(H)),t.on("generationResult",H=>p(H)),t.on("postprocessingResult",H=>h(H)),t.on("intermediateResult",H=>m(H)),t.on("progressUpdate",H=>v(H)),t.on("galleryImages",H=>S(H)),t.on("processingCanceled",()=>{w()}),t.on("imageDeleted",H=>{E(H)}),t.on("systemConfig",H=>{P(H)}),t.on("modelChanged",H=>{k(H)}),t.on("modelChangeFailed",H=>{T(H)}),n=!0),a.type){case"socketio/generateImage":{M(a.payload);break}case"socketio/runESRGAN":{I(a.payload);break}case"socketio/runFacetool":{R(a.payload);break}case"socketio/deleteImage":{N(a.payload);break}case"socketio/requestImages":{z(a.payload);break}case"socketio/requestNewImages":{$(a.payload);break}case"socketio/cancelProcessing":{W();break}case"socketio/requestSystemConfig":{q();break}case"socketio/requestModelChange":{de(a.payload);break}}o(a)}},rEe=["cursorPosition"].map(e=>`canvas.${e}`),iEe=["currentIteration","currentStatus","currentStep","isCancelable","isConnected","isESRGANAvailable","isGFPGANAvailable","isProcessing","socketId","totalIterations","totalSteps"].map(e=>`system.${e}`),oEe=["categories","currentCategory","currentImage","currentImageUuid","shouldAutoSwitchToNewImages","shouldHoldGalleryOpen","intermediateImage"].map(e=>`gallery.${e}`),TV=GF({options:rke,gallery:TSe,system:O4e,canvas:pSe}),aEe=d$.getPersistConfig({key:"root",storage:c$,rootReducer:TV,blacklist:[...rEe,...iEe,...oEe],debounce:300}),sEe=A2e(aEe,TV),AV=Cve({reducer:sEe,middleware:e=>e({immutableCheck:!1,serializableCheck:!1}).concat(nEe()),devTools:{actionsDenylist:["canvas/setCursorPosition","canvas/setStageCoordinates","canvas/setStageScale","canvas/setIsDrawing","canvas/setIsDrawing","canvas/addPointToCurrentLine"]}}),Ye=p2e,ke=r2e;function Z3(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z3=function(n){return typeof n}:Z3=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Z3(e)}function lEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SO(e,t){for(var n=0;nx(nn,{width:"100vw",height:"100vh",alignItems:"center",justifyContent:"center",children:x(Kv,{thickness:"2px",speed:"1s",emptyColor:"gray.200",color:"gray.400",size:"xl"})}),hEe=ct(e=>e.system,e=>({isProcessing:e.isProcessing,currentStep:e.currentStep,totalSteps:e.totalSteps,currentStatusHasSteps:e.currentStatusHasSteps}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),pEe=()=>{const{isProcessing:e,currentStep:t,totalSteps:n,currentStatusHasSteps:r}=ke(hEe),i=t?Math.round(t*100/n):0;return x(pF,{value:i,isIndeterminate:e&&!r,className:"progress-bar"})};function gEe(e){const{title:t,hotkey:n,description:r}=e;return ne("div",{className:"hotkey-modal-item",children:[ne("div",{className:"hotkey-info",children:[x("p",{className:"hotkey-title",children:t}),r&&x("p",{className:"hotkey-description",children:r})]}),x("div",{className:"hotkey-key",children:n})]})}function mEe({children:e}){const{isOpen:t,onOpen:n,onClose:r}=U4(),i=[{title:"Invoke",desc:"Generate an image",hotkey:"Ctrl+Enter"},{title:"Cancel",desc:"Cancel image generation",hotkey:"Shift+X"},{title:"Focus Prompt",desc:"Focus the prompt input area",hotkey:"Alt+A"},{title:"Toggle Options",desc:"Open and close the options panel",hotkey:"O"},{title:"Pin Options",desc:"Pin the options panel",hotkey:"Shift+O"},{title:"Toggle Viewer",desc:"Open and close Image Viewer",hotkey:"Z"},{title:"Toggle Gallery",desc:"Open and close the gallery drawer",hotkey:"G"},{title:"Maximize Workspace",desc:"Close panels and maximize work area",hotkey:"F"},{title:"Change Tabs",desc:"Switch to another workspace",hotkey:"1-5"},{title:"Console Toggle",desc:"Open and close console",hotkey:"`"}],o=[{title:"Set Prompt",desc:"Use the prompt of the current image",hotkey:"P"},{title:"Set Seed",desc:"Use the seed of the current image",hotkey:"S"},{title:"Set Parameters",desc:"Use all parameters of the current image",hotkey:"A"},{title:"Restore Faces",desc:"Restore the current image",hotkey:"R"},{title:"Upscale",desc:"Upscale the current image",hotkey:"U"},{title:"Show Info",desc:"Show metadata info of the current image",hotkey:"I"},{title:"Send To Image To Image",desc:"Send current image to Image to Image",hotkey:"Shift+I"},{title:"Delete Image",desc:"Delete the current image",hotkey:"Del"},{title:"Close Panels",desc:"Closes open panels",hotkey:"Esc"}],a=[{title:"Previous Image",desc:"Display the previous image in gallery",hotkey:"Arrow Left"},{title:"Next Image",desc:"Display the next image in gallery",hotkey:"Arrow Right"},{title:"Toggle Gallery Pin",desc:"Pins and unpins the gallery to the UI",hotkey:"Shift+G"},{title:"Increase Gallery Image Size",desc:"Increases gallery thumbnails size",hotkey:"Shift+Up"},{title:"Decrease Gallery Image Size",desc:"Decreases gallery thumbnails size",hotkey:"Shift+Down"}],s=[{title:"Select Brush",desc:"Selects the inpainting brush",hotkey:"B"},{title:"Select Eraser",desc:"Selects the inpainting eraser",hotkey:"E"},{title:"Decrease Brush Size",desc:"Decreases the size of the inpainting brush/eraser",hotkey:"["},{title:"Increase Brush Size",desc:"Increases the size of the inpainting brush/eraser",hotkey:"]"},{title:"Move Tool",desc:"Allows canvas navigation",hotkey:"V"},{title:"Quick Toggle Move",desc:"Temporarily toggles Move mode",hotkey:"Hold Space"},{title:"Select Mask Layer",desc:"Toggles mask layer",hotkey:"Q"},{title:"Clear Mask",desc:"Clear the entire mask",hotkey:"Shift+C"},{title:"Hide Mask",desc:"Hide and unhide mask",hotkey:"H"},{title:"Show/Hide Bounding Box",desc:"Toggle visibility of bounding box",hotkey:"Shift+H"},{title:"Merge Visible",desc:"Merge all visible layers of canvas",hotkey:"Shift+M"},{title:"Save To Gallery",desc:"Save current canvas to gallery",hotkey:"Shift+S"},{title:"Copy to Clipboard",desc:"Copy current canvas to clipboard",hotkey:"Ctrl+C"},{title:"Download Image",desc:"Download current canvas",hotkey:"Shift+D"},{title:"Undo Stroke",desc:"Undo a brush stroke",hotkey:"Ctrl+Z"},{title:"Redo Stroke",desc:"Redo a brush stroke",hotkey:"Ctrl+Shift+Z, Ctrl+Y"},{title:"Reset View",desc:"Reset Canvas View",hotkey:"R"},{title:"Previous Image",desc:"Previous Staging Area Image",hotkey:"Arrow Left"},{title:"Next Image",desc:"Next Staging Area Image",hotkey:"Arrow Right"},{title:"Accept Image",desc:"Accept Current Staging Area Image",hotkey:"Enter"}],l=u=>{const h=[];return u.forEach((p,m)=>{h.push(x(gEe,{title:p.title,description:p.desc,hotkey:p.hotkey},m))}),x("div",{className:"hotkey-modal-category",children:h})};return ne(Nn,{children:[C.exports.cloneElement(e,{onClick:n}),ne(G0,{isOpen:t,onClose:r,children:[x(Pv,{}),ne(Ev,{className:" modal hotkeys-modal",children:[x(j8,{className:"modal-close-btn"}),x("h1",{children:"Keyboard Shorcuts"}),x("div",{className:"hotkeys-modal-items",children:ne(pS,{allowMultiple:!0,children:[ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"App Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(i)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"General Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(o)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Gallery Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(a)})]}),ne(Df,{children:[ne(Rf,{className:"hotkeys-modal-button",children:[x("h2",{children:"Unified Canvas Hotkeys"}),x(Nf,{})]}),x(zf,{children:l(s)})]})]})})]})]})]})}const vEe=e=>{const{isProcessing:t,isConnected:n}=ke(l=>l.system),r=Ye(),{name:i,status:o,description:a}=e,s=()=>{r(V$(i))};return ne("div",{className:"model-list-item",children:[x(Oi,{label:a,hasArrow:!0,placement:"bottom",children:x("div",{className:"model-list-item-name",children:i})}),x(Vz,{}),x("div",{className:`model-list-item-status ${o.split(" ").join("-")}`,children:o}),x("div",{className:"model-list-item-load-btn",children:x(Da,{size:"sm",onClick:s,isDisabled:o==="active"||t||!n,children:"Load"})})]})},yEe=ct(e=>e.system,e=>{const t=st.map(e.model_list,(r,i)=>({name:i,...r})),n=t.find(r=>r.status==="active");return{models:t,activeModel:n}}),SEe=()=>{const{models:e}=ke(yEe);return x(pS,{allowToggle:!0,className:"model-list-accordion",variant:"unstyled",children:ne(Df,{children:[x(Rf,{children:ne("div",{className:"model-list-button",children:[x("h2",{children:"Models"}),x(Nf,{})]})}),x(zf,{children:x("div",{className:"model-list-list",children:e.map((t,n)=>x(vEe,{name:t.name,status:t.status,description:t.description},n))})})]})})},bEe=ct(e=>e.system,e=>{const{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,model_list:i,saveIntermediatesInterval:o,enableImageDebugging:a}=e;return{shouldDisplayInProgressType:t,shouldConfirmOnDelete:n,shouldDisplayGuides:r,models:st.map(i,(s,l)=>l),saveIntermediatesInterval:o,enableImageDebugging:a}},{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),xEe=({children:e})=>{const t=Ye(),n=ke(E=>E.options.steps),{isOpen:r,onOpen:i,onClose:o}=U4(),{isOpen:a,onOpen:s,onClose:l}=U4(),{shouldDisplayInProgressType:u,shouldConfirmOnDelete:h,shouldDisplayGuides:p,saveIntermediatesInterval:m,enableImageDebugging:v}=ke(bEe),S=()=>{WV.purge().then(()=>{o(),s()})},w=E=>{E>n&&(E=n),E<1&&(E=1),t(P4e(E))};return ne(Nn,{children:[C.exports.cloneElement(e,{onClick:i}),ne(G0,{isOpen:r,onClose:o,children:[x(Pv,{}),ne(Ev,{className:"modal settings-modal",children:[x(q8,{className:"settings-modal-header",children:"Settings"}),x(j8,{className:"modal-close-btn"}),ne(q4,{className:"settings-modal-content",children:[ne("div",{className:"settings-modal-items",children:[x("div",{className:"settings-modal-item",children:x(SEe,{})}),ne("div",{className:"settings-modal-item",style:{gridAutoFlow:"row",rowGap:"0.5rem"},children:[x(vd,{label:"Display In-Progress Images",validValues:F3e,value:u,onChange:E=>t(b4e(E.target.value))}),u==="full-res"&&x(Ts,{label:"Save images every n steps",min:1,max:n,step:1,onChange:w,value:m,width:"auto",textAlign:"center"})]}),x(ks,{styleClass:"settings-modal-item",label:"Confirm on Delete",isChecked:h,onChange:E=>t(R$(E.target.checked))}),x(ks,{styleClass:"settings-modal-item",label:"Display Help Icons",isChecked:p,onChange:E=>t(_4e(E.target.checked))})]}),ne("div",{className:"settings-modal-items",children:[x("h2",{style:{fontWeight:"bold"},children:"Developer"}),x(ks,{styleClass:"settings-modal-item",label:"Enable Image Debugging",isChecked:v,onChange:E=>t(T4e(E.target.checked))})]}),ne("div",{className:"settings-modal-reset",children:[x(Uf,{size:"md",children:"Reset Web UI"}),x(Da,{colorScheme:"red",onClick:S,children:"Reset Web UI"}),x(Eo,{children:"Resetting the web UI only resets the browser's local cache of your images and remembered settings. It does not delete any images from disk."}),x(Eo,{children:"If images aren't showing up in the gallery or something else isn't working, please try resetting before submitting an issue on GitHub."})]})]}),x(Y8,{children:x(Da,{onClick:o,className:"modal-close-btn",children:"Close"})})]})]}),ne(G0,{closeOnOverlayClick:!1,isOpen:a,onClose:l,isCentered:!0,children:[x(Pv,{bg:"blackAlpha.300",backdropFilter:"blur(40px)"}),x(Ev,{children:x(q4,{pb:6,pt:6,children:x(nn,{justifyContent:"center",children:x(Eo,{fontSize:"lg",children:"Web UI has been reset. Refresh the page to reload."})})})})]})]})},wEe=ct(e=>e.system,e=>({isConnected:e.isConnected,isProcessing:e.isProcessing,currentIteration:e.currentIteration,totalIterations:e.totalIterations,currentStatus:e.currentStatus,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),CEe=()=>{const{isConnected:e,isProcessing:t,currentIteration:n,totalIterations:r,currentStatus:i,hasError:o,wasErrorSeen:a}=ke(wEe),s=Ye();let l;e&&!o?l="status-good":l="status-bad";let u=i;return["generating","preparing","saving image","restoring faces","upscaling"].includes(u.toLowerCase())&&(l="status-working"),u&&t&&r>1&&(u+=` (${n}/${r})`),x(Oi,{label:o&&!a?"Click to clear, check logs for details":void 0,children:x(Eo,{cursor:o&&!a?"pointer":"initial",onClick:()=>{(o||!a)&&s(N$())},className:`status ${l}`,children:u})})},_Ee=["dark","light","green"];function kEe(){const{setColorMode:e}=Bv(),t=Ye(),n=ke(i=>i.options.currentTheme),r=i=>{e(i),t(nke(i))};return x(pu,{trigger:"hover",triggerComponent:x(gt,{"aria-label":"Theme",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(s5e,{})}),children:x(jz,{align:"stretch",children:_Ee.map(i=>x(fl,{style:{width:"6rem"},leftIcon:n===i?x(F_,{}):void 0,size:"sm",onClick:()=>r(i),children:i.charAt(0).toUpperCase()+i.slice(1)},i))})})}const EEe=ct([Sk],e=>{const{isProcessing:t,model_list:n}=e,r=st.map(n,(o,a)=>a),i=st.reduce(n,(o,a,s)=>(a.status==="active"&&(o=s),o),"");return{models:r,activeModel:i,isProcessing:t}}),PEe=()=>{const e=Ye(),{models:t,activeModel:n,isProcessing:r}=ke(EEe);return x(nn,{style:{paddingLeft:"0.3rem"},children:x(vd,{style:{fontSize:"0.8rem"},isDisabled:r,value:n,validValues:t,onChange:o=>{e(V$(o.target.value))}})})},TEe=()=>ne("div",{className:"site-header",children:[ne("div",{className:"site-header-left-side",children:[x("img",{src:aH,alt:"invoke-ai-logo"}),ne("h1",{children:["invoke ",x("strong",{children:"ai"})]})]}),ne("div",{className:"site-header-right-side",children:[x(CEe,{}),x(PEe,{}),x(mEe,{children:x(gt,{"aria-label":"Hotkeys",tooltip:"Hotkeys",size:"sm",variant:"link","data-variant":"link",fontSize:20,icon:x(n5e,{})})}),x(kEe,{}),x(gt,{"aria-label":"Report Bug",tooltip:"Report Bug",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI/issues",children:x(q4e,{})})}),x(gt,{"aria-label":"Link to Github Repo",tooltip:"Github",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"http://github.com/invoke-ai/InvokeAI",children:x(W4e,{})})}),x(gt,{"aria-label":"Link to Discord Server",tooltip:"Discord",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(Gf,{isExternal:!0,href:"https://discord.gg/ZmtBAhwWhy",children:x(H4e,{})})}),x(xEe,{children:x(gt,{"aria-label":"Settings",tooltip:"Settings",variant:"link","data-variant":"link",fontSize:20,size:"sm",icon:x(V_,{})})})]})]}),AEe=ct(e=>e.system,e=>e.log,{memoizeOptions:{resultEqualityCheck:(e,t)=>e.length===t.length}}),LEe=ct(e=>e.system,e=>({shouldShowLogViewer:e.shouldShowLogViewer,hasError:e.hasError,wasErrorSeen:e.wasErrorSeen}),{memoizeOptions:{resultEqualityCheck:Zr.exports.isEqual}}),MEe=()=>{const e=Ye(),t=ke(AEe),{shouldShowLogViewer:n,hasError:r,wasErrorSeen:i}=ke(LEe),[o,a]=C.exports.useState(!0),s=C.exports.useRef(null);C.exports.useLayoutEffect(()=>{s.current!==null&&o&&(s.current.scrollTop=s.current.scrollHeight)},[o,t,n]);const l=()=>{e(N$()),e(cw(!n))};return mt("`",()=>{e(cw(!n))},[n]),mt("esc",()=>{e(cw(!1))}),ne(Nn,{children:[n&&x(gH,{defaultSize:{width:"100%",height:200},style:{display:"flex",position:"fixed",left:0,bottom:0,zIndex:9999},maxHeight:"90vh",children:x("div",{className:"console",ref:s,onScroll:()=>{!s.current||o&&s.current.scrollTop{const{timestamp:m,message:v,level:S}=h;return ne("div",{className:`console-entry console-${S}-color`,children:[ne("p",{className:"console-timestamp",children:[m,":"]}),x("p",{className:"console-message",children:v})]},p)})})}),n&&x(Oi,{hasArrow:!0,label:o?"Autoscroll On":"Autoscroll Off",children:x(Ps,{className:"console-autoscroll-icon-button","data-autoscroll-enabled":o,size:"sm","aria-label":"Toggle autoscroll",variant:"solid",icon:x(V4e,{}),onClick:()=>a(!o)})}),x(Oi,{hasArrow:!0,label:n?"Hide Console":"Show Console",children:x(Ps,{className:"console-toggle-icon-button","data-error-seen":r||!i,size:"sm",position:"fixed",variant:"solid","aria-label":"Toggle Log Viewer",icon:n?x(o5e,{}):x(F$,{}),onClick:l})})]})};function OEe(){async function e(n=""){return await fetch(n,{method:"GET",cache:"no-cache"})}const t=()=>{const n=document.location;e(n+"/flaskwebgui-keep-server-alive").then(i=>i)};(!{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV||{BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0}.NODE_ENV==="production")&&document.addEventListener("DOMContentLoaded",()=>{t(),setInterval(t,3e3)})}var IEe=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function c2(e,t){var n=REe(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function REe(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=IEe.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var NEe=[".DS_Store","Thumbs.db"];function DEe(e){return r1(this,void 0,void 0,function(){return i1(this,function(t){return m5(e)&&zEe(e.dataTransfer)?[2,HEe(e.dataTransfer,e.type)]:BEe(e)?[2,FEe(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,$Ee(e)]:[2,[]]})})}function zEe(e){return m5(e)}function BEe(e){return m5(e)&&m5(e.target)}function m5(e){return typeof e=="object"&&e!==null}function FEe(e){return E9(e.target.files).map(function(t){return c2(t)})}function $Ee(e){return r1(this,void 0,void 0,function(){var t;return i1(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return c2(r)})]}})})}function HEe(e,t){return r1(this,void 0,void 0,function(){var n,r;return i1(this,function(i){switch(i.label){case 0:return e.items?(n=E9(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(WEe))]):[3,2];case 1:return r=i.sent(),[2,bO(MV(r))];case 2:return[2,bO(E9(e.files).map(function(o){return c2(o)}))]}})})}function bO(e){return e.filter(function(t){return NEe.indexOf(t.name)===-1})}function E9(e){if(e===null)return[];for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,kO(n)];if(e.sizen)return[!1,kO(n)]}return[!0,null]}function Ef(e){return e!=null}function iPe(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var u=NV(l,n),h=Ov(u,1),p=h[0],m=DV(l,r,i),v=Ov(m,1),S=v[0],w=s?s(l):null;return p&&S&&!w})}function v5(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function c3(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function PO(e){e.preventDefault()}function oPe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function aPe(e){return e.indexOf("Edge/")!==-1}function sPe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return oPe(e)||aPe(e)}function al(){for(var e=arguments.length,t=new Array(e),n=0;n1?i-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function _Pe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wk=C.exports.forwardRef(function(e,t){var n=e.children,r=y5(e,hPe),i=HV(r),o=i.open,a=y5(i,pPe);return C.exports.useImperativeHandle(t,function(){return{open:o}},[o]),x(C.exports.Fragment,{children:n(lr(lr({},a),{},{open:o}))})});wk.displayName="Dropzone";var $V={disabled:!1,getFilesFromEvent:DEe,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};wk.defaultProps=$V;wk.propTypes={children:In.exports.func,accept:In.exports.objectOf(In.exports.arrayOf(In.exports.string)),multiple:In.exports.bool,preventDropOnDocument:In.exports.bool,noClick:In.exports.bool,noKeyboard:In.exports.bool,noDrag:In.exports.bool,noDragEventsBubbling:In.exports.bool,minSize:In.exports.number,maxSize:In.exports.number,maxFiles:In.exports.number,disabled:In.exports.bool,getFilesFromEvent:In.exports.func,onFileDialogCancel:In.exports.func,onFileDialogOpen:In.exports.func,useFsAccessApi:In.exports.bool,autoFocus:In.exports.bool,onDragEnter:In.exports.func,onDragLeave:In.exports.func,onDragOver:In.exports.func,onDrop:In.exports.func,onDropAccepted:In.exports.func,onDropRejected:In.exports.func,onError:In.exports.func,validator:In.exports.func};var L9={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function HV(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=lr(lr({},$V),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,h=t.onDragLeave,p=t.onDragOver,m=t.onDrop,v=t.onDropAccepted,S=t.onDropRejected,w=t.onFileDialogCancel,E=t.onFileDialogOpen,P=t.useFsAccessApi,k=t.autoFocus,T=t.preventDropOnDocument,M=t.noClick,I=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,z=t.onError,$=t.validator,W=C.exports.useMemo(function(){return cPe(n)},[n]),q=C.exports.useMemo(function(){return uPe(n)},[n]),de=C.exports.useMemo(function(){return typeof E=="function"?E:AO},[E]),H=C.exports.useMemo(function(){return typeof w=="function"?w:AO},[w]),J=C.exports.useRef(null),re=C.exports.useRef(null),oe=C.exports.useReducer(kPe,L9),X=Iw(oe,2),G=X[0],Q=X[1],j=G.isFocused,Z=G.isFileDialogActive,me=C.exports.useRef(typeof window<"u"&&window.isSecureContext&&P&&lPe()),Se=function(){!me.current&&Z&&setTimeout(function(){if(re.current){var Je=re.current.files;Je.length||(Q({type:"closeDialog"}),H())}},300)};C.exports.useEffect(function(){return window.addEventListener("focus",Se,!1),function(){window.removeEventListener("focus",Se,!1)}},[re,Z,H,me]);var xe=C.exports.useRef([]),Fe=function(Je){J.current&&J.current.contains(Je.target)||(Je.preventDefault(),xe.current=[])};C.exports.useEffect(function(){return T&&(document.addEventListener("dragover",PO,!1),document.addEventListener("drop",Fe,!1)),function(){T&&(document.removeEventListener("dragover",PO),document.removeEventListener("drop",Fe))}},[J,T]),C.exports.useEffect(function(){return!r&&k&&J.current&&J.current.focus(),function(){}},[J,k,r]);var We=C.exports.useCallback(function(Oe){z?z(Oe):console.error(Oe)},[z]),ht=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[].concat(vPe(xe.current),[Oe.target]),c3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){if(!(v5(Oe)&&!N)){var Xt=Je.length,jt=Xt>0&&iPe({files:Je,accept:W,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:$}),Ee=Xt>0&&!jt;Q({isDragAccept:jt,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),u&&u(Oe)}}).catch(function(Je){return We(Je)})},[i,u,We,N,W,a,o,s,l,$]),qe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=c3(Oe);if(Je&&Oe.dataTransfer)try{Oe.dataTransfer.dropEffect="copy"}catch{}return Je&&p&&p(Oe),!1},[p,N]),rt=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe);var Je=xe.current.filter(function(jt){return J.current&&J.current.contains(jt)}),Xt=Je.indexOf(Oe.target);Xt!==-1&&Je.splice(Xt,1),xe.current=Je,!(Je.length>0)&&(Q({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),c3(Oe)&&h&&h(Oe))},[J,h,N]),Ze=C.exports.useCallback(function(Oe,Je){var Xt=[],jt=[];Oe.forEach(function(Ee){var Mt=NV(Ee,W),Ne=Iw(Mt,2),at=Ne[0],an=Ne[1],Dn=DV(Ee,a,o),$e=Iw(Dn,2),pt=$e[0],tt=$e[1],Nt=$?$(Ee):null;if(at&&pt&&!Nt)Xt.push(Ee);else{var Zt=[an,tt];Nt&&(Zt=Zt.concat(Nt)),jt.push({file:Ee,errors:Zt.filter(function(Qn){return Qn})})}}),(!s&&Xt.length>1||s&&l>=1&&Xt.length>l)&&(Xt.forEach(function(Ee){jt.push({file:Ee,errors:[rPe]})}),Xt.splice(0)),Q({acceptedFiles:Xt,fileRejections:jt,type:"setFiles"}),m&&m(Xt,jt,Je),jt.length>0&&S&&S(jt,Je),Xt.length>0&&v&&v(Xt,Je)},[Q,s,W,a,o,l,m,v,S,$]),Xe=C.exports.useCallback(function(Oe){Oe.preventDefault(),Oe.persist(),Pt(Oe),xe.current=[],c3(Oe)&&Promise.resolve(i(Oe)).then(function(Je){v5(Oe)&&!N||Ze(Je,Oe)}).catch(function(Je){return We(Je)}),Q({type:"reset"})},[i,Ze,We,N]),Et=C.exports.useCallback(function(){if(me.current){Q({type:"openDialog"}),de();var Oe={multiple:s,types:q};window.showOpenFilePicker(Oe).then(function(Je){return i(Je)}).then(function(Je){Ze(Je,null),Q({type:"closeDialog"})}).catch(function(Je){dPe(Je)?(H(Je),Q({type:"closeDialog"})):fPe(Je)?(me.current=!1,re.current?(re.current.value=null,re.current.click()):We(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):We(Je)});return}re.current&&(Q({type:"openDialog"}),de(),re.current.value=null,re.current.click())},[Q,de,H,P,Ze,We,q,s]),bt=C.exports.useCallback(function(Oe){!J.current||!J.current.isEqualNode(Oe.target)||(Oe.key===" "||Oe.key==="Enter"||Oe.keyCode===32||Oe.keyCode===13)&&(Oe.preventDefault(),Et())},[J,Et]),Ae=C.exports.useCallback(function(){Q({type:"focus"})},[]),it=C.exports.useCallback(function(){Q({type:"blur"})},[]),Ot=C.exports.useCallback(function(){M||(sPe()?setTimeout(Et,0):Et())},[M,Et]),lt=function(Je){return r?null:Je},xt=function(Je){return I?null:lt(Je)},_n=function(Je){return R?null:lt(Je)},Pt=function(Je){N&&Je.stopPropagation()},Kt=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.role,Ee=Oe.onKeyDown,Mt=Oe.onFocus,Ne=Oe.onBlur,at=Oe.onClick,an=Oe.onDragEnter,Dn=Oe.onDragOver,$e=Oe.onDragLeave,pt=Oe.onDrop,tt=y5(Oe,gPe);return lr(lr(A9({onKeyDown:xt(al(Ee,bt)),onFocus:xt(al(Mt,Ae)),onBlur:xt(al(Ne,it)),onClick:lt(al(at,Ot)),onDragEnter:_n(al(an,ht)),onDragOver:_n(al(Dn,qe)),onDragLeave:_n(al($e,rt)),onDrop:_n(al(pt,Xe)),role:typeof jt=="string"&&jt!==""?jt:"presentation"},Xt,J),!r&&!I?{tabIndex:0}:{}),tt)}},[J,bt,Ae,it,Ot,ht,qe,rt,Xe,I,R,r]),kn=C.exports.useCallback(function(Oe){Oe.stopPropagation()},[]),mn=C.exports.useMemo(function(){return function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Je=Oe.refKey,Xt=Je===void 0?"ref":Je,jt=Oe.onChange,Ee=Oe.onClick,Mt=y5(Oe,mPe),Ne=A9({accept:W,multiple:s,type:"file",style:{display:"none"},onChange:lt(al(jt,Xe)),onClick:lt(al(Ee,kn)),tabIndex:-1},Xt,re);return lr(lr({},Ne),Mt)}},[re,n,s,Xe,r]);return lr(lr({},G),{},{isFocused:j&&!r,getRootProps:Kt,getInputProps:mn,rootRef:J,inputRef:re,open:lt(Et)})}function kPe(e,t){switch(t.type){case"focus":return lr(lr({},e),{},{isFocused:!0});case"blur":return lr(lr({},e),{},{isFocused:!1});case"openDialog":return lr(lr({},L9),{},{isFileDialogActive:!0});case"closeDialog":return lr(lr({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return lr(lr({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return lr(lr({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return lr({},L9);default:return e}}function AO(){}const EPe=e=>{const{isDragAccept:t,isDragReject:n,overlaySecondaryText:r,setIsHandlingUpload:i}=e;return mt("esc",()=>{i(!1)}),ne("div",{className:"dropzone-container",children:[t&&x("div",{className:"dropzone-overlay is-drag-accept",children:ne(Uf,{size:"lg",children:["Upload Image",r]})}),n&&ne("div",{className:"dropzone-overlay is-drag-reject",children:[x(Uf,{size:"lg",children:"Invalid Upload"}),x(Uf,{size:"md",children:"Must be single JPEG or PNG image"})]})]})},LO=e=>async(t,n)=>{const{imageFile:r}=e,i=n(),o=Rr(i),a=new FormData;a.append("file",r,r.name),a.append("data",JSON.stringify({kind:"init"}));const l=await(await fetch(window.location.origin+"/upload",{method:"POST",body:a})).json();console.log(l);const u={uuid:t0(),category:"user",...l};t(Qp({image:u,category:"user"})),o==="unifiedCanvas"?t(q_(u)):o==="img2img"&&t(u2(u))},PPe=e=>{const{children:t}=e,n=Ye(),r=ke(Rr),i=hh({}),[o,a]=C.exports.useState(!1),{setOpenUploader:s}=ZW(),l=C.exports.useCallback(k=>{a(!0);const T=k.errors.reduce((M,I)=>M+` -`+I.message,"");i({title:"Upload failed",description:T,status:"error",isClosable:!0})},[i]),u=C.exports.useCallback(async k=>{n(LO({imageFile:k}))},[n]),h=C.exports.useCallback((k,T)=>{T.forEach(M=>{l(M)}),k.forEach(M=>{u(M)})},[u,l]),{getRootProps:p,getInputProps:m,isDragAccept:v,isDragReject:S,isDragActive:w,open:E}=HV({accept:{"image/png":[".png"],"image/jpeg":[".jpg",".jpeg",".png"]},noClick:!0,onDrop:h,onDragOver:()=>a(!0),maxFiles:1});s(E),C.exports.useEffect(()=>{const k=T=>{const M=T.clipboardData?.items;if(!M)return;const I=[];for(const N of M)N.kind==="file"&&["image/png","image/jpg"].includes(N.type)&&I.push(N);if(!I.length)return;if(T.stopImmediatePropagation(),I.length>1){i({description:"Multiple images pasted, may only upload one image at a time",status:"error",isClosable:!0});return}const R=I[0].getAsFile();if(!R){i({description:"Unable to load file",status:"error",isClosable:!0});return}n(LO({imageFile:R}))};return document.addEventListener("paste",k),()=>{document.removeEventListener("paste",k)}},[n,i,r]);const P=["img2img","unifiedCanvas"].includes(r)?` to ${kf[r].tooltip}`:"";return x(X_.Provider,{value:E,children:ne("div",{...p({style:{}}),onKeyDown:k=>{k.key},children:[x("input",{...m()}),t,w&&o&&x(EPe,{isDragAccept:v,isDragReject:S,overlaySecondaryText:P,setIsHandlingUpload:a})]})})},TPe=()=>{const e=Ye(),t=ke(r=>r.gallery.shouldPinGallery);return x(gt,{tooltip:"Show Gallery (G)",tooltipProps:{placement:"top"},"aria-label":"Show Gallery",styleClass:"floating-show-hide-button right show-hide-button-gallery",onClick:()=>{e(k0(!0)),t&&e(io(!0))},children:x(D$,{})})};function APe(e){return ft({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M32 384h272v32H32zM400 384h80v32h-80zM384 447.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 240h80v32H32zM208 240h272v32H208zM192 303.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]},{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M32 96h272v32H32zM400 96h80v32h-80zM384 159.5c0 17.949-14.327 32.5-32 32.5-17.673 0-32-14.551-32-32.5v-95c0-17.949 14.327-32.5 32-32.5 17.673 0 32 14.551 32 32.5v95z"}}]}]})(e)}const LPe=ct(e=>e.options,e=>{const{shouldPinOptionsPanel:t,shouldShowOptionsPanel:n}=e;return{shouldPinOptionsPanel:t,shouldShowProcessButtons:!t||!n}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),MPe=()=>{const e=Ye(),{shouldShowProcessButtons:t,shouldPinOptionsPanel:n}=ke(LPe);return ne("div",{className:"show-hide-button-options",children:[x(gt,{tooltip:"Show Options Panel (O)",tooltipProps:{placement:"top"},"aria-label":"Show Options Panel",onClick:()=>{e(A0(!0)),n&&setTimeout(()=>e(io(!0)),400)},children:x(APe,{})}),t&&ne(Nn,{children:[x(U$,{iconButton:!0}),x(j$,{}),x(G$,{})]})]})},OPe=()=>{const e=Ye(),t=ke(T_e),n=hh();C.exports.useEffect(()=>{t.forEach(r=>{n(r)}),t.length>0&&e(L4e())},[e,n,t])};OEe();const IPe=ct([e=>e.gallery,e=>e.options,e=>e.system,Rr],(e,t,n,r)=>{const{shouldShowGallery:i,shouldHoldGalleryOpen:o,shouldPinGallery:a}=e,{shouldShowOptionsPanel:s,shouldHoldOptionsPanelOpen:l,shouldPinOptionsPanel:u}=t,h=st.reduce(n.model_list,(v,S,w)=>(S.status==="active"&&(v=w),v),""),p=!(i||o&&!a)&&["txt2img","img2img","unifiedCanvas"].includes(r),m=!(s||l&&!u)&&["txt2img","img2img","unifiedCanvas"].includes(r);return{modelStatusText:h,shouldShowGalleryButton:p,shouldShowOptionsPanelButton:m}},{memoizeOptions:{resultEqualityCheck:st.isEqual}}),RPe=()=>{const{shouldShowGalleryButton:e,shouldShowOptionsPanelButton:t}=ke(IPe);return OPe(),x("div",{className:"App",children:ne(PPe,{children:[x(pEe,{}),ne("div",{className:"app-content",children:[x(TEe,{}),x(z_e,{})]}),x("div",{className:"app-console",children:x(MEe,{})}),e&&x(TPe,{}),t&&x(MPe,{})]})})};const WV=N2e(AV),NPe=rN({key:"invokeai-style-cache",prepend:!0});Nw.createRoot(document.getElementById("root")).render(x(le.StrictMode,{children:x(d2e,{store:AV,children:x(LV,{loading:x(fEe,{}),persistor:WV,children:x(XQ,{value:NPe,children:x(Hme,{children:x(RPe,{})})})})})})); diff --git a/frontend/dist/assets/index.fc40251f.css b/frontend/dist/assets/index.fc40251f.css new file mode 100644 index 0000000000..21806c4796 --- /dev/null +++ b/frontend/dist/assets/index.fc40251f.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;src:url(./Inter.b9a8e5e2.ttf);font-display:swap;font-weight:400;font-style:normal}@font-face{font-family:Inter;src:url(./Inter-Bold.790c108b.ttf);font-display:swap;font-weight:600;font-style:normal}@keyframes slideOut{0%{transform:translate(10rem)}to{transform:translate(0)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}[data-theme=dark]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(57, 25, 153);--accent-color: rgb(80, 40, 200);--accent-color-bright: rgb(104, 60, 230);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 10);--background-color: rgb(20, 20, 26);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(16, 16, 22);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 162, 188);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(48, 48, 64);--border-color: rgb(30, 30, 46);--border-color-light: rgb(60, 60, 76);--svg-color: rgb(255, 255, 255);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(30, 32, 42);--tab-hover-color: rgb(36, 38, 48);--tab-panel-bg: rgb(20, 22, 28);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 216);--tab-list-text-inactive: rgb(92, 94, 114);--btn-base-color: rgb(30, 32, 42);--btn-base-color-hover: rgb(46, 48, 68);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 10);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--slider-color: rgb(151, 113, 255);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}[data-theme=light]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(186, 146, 0);--accent-color: rgb(235, 185, 5);--accent-color-bright: rgb(255, 200, 0);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(255, 255, 255);--background-color: rgb(220, 222, 224);--background-color-light: rgb(250, 252, 254);--background-color-secondary: rgb(204, 206, 208);--text-color: rgb(0, 0, 0);--text-color-secondary: rgb(40, 40, 40);--subtext-color: rgb(24, 24, 34);--subtext-color-bright: rgb(142, 144, 146);--border-color: rgb(200, 200, 200);--border-color-light: rgb(147, 147, 147);--svg-color: rgb(50, 50, 50);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(237, 51, 51);--destructive-color-hover: rgb(255, 55, 55);--warning-color: rgb(224, 142, 42);--warning-color-hover: rgb(255, 167, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: none;--tab-color: rgb(202, 204, 206);--tab-hover-color: rgb(206, 208, 210);--tab-panel-bg: rgb(214, 216, 218);--tab-list-bg: rgb(235, 185, 5);--tab-list-text: rgb(0, 0, 0);--tab-list-text-inactive: rgb(106, 108, 110);--btn-base-color: rgb(184, 186, 188);--btn-base-color-hover: rgb(230, 232, 234);--btn-load-more: rgb(202, 204, 206);--btn-load-more-hover: rgb(178, 180, 182);--btn-svg-color: rgb(0, 0, 0);--btn-delete-image: rgb(213, 49, 49);--btn-checkbox-border-hover: rgb(176, 178, 182);--progress-bar-color: rgb(235, 185, 5);--prompt-bg-color: rgb(225, 227, 229);--switch-bg-color: rgb(178, 180, 182);--switch-bg-active-color: rgb(235, 185, 5);--slider-color: rgb(0, 0, 0);--resizeable-handle-border-color: rgb(160, 162, 164);--metadata-bg-color: rgba(230, 230, 230, .9);--metadata-json-bg-color: rgba(0, 0, 0, .1);--status-good-color: rgb(21, 126, 0);--status-good-glow: var(--background-color);--status-working-color: rgb(235, 141, 0);--status-working-glow: var(--background-color);--status-bad-color: rgb(202, 0, 0);--status-bad-glow: var(--background-color);--settings-modal-bg: rgb(202, 204, 206);--input-checkbox-bg: rgb(90, 90, 120);--input-checkbox-checked-bg: rgb(235, 185, 5);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: rgb(0, 0, 0);--input-box-shadow-color: none;--error-level-info: rgb(42, 42, 42);--error-level-warning: rgb(173, 121, 0);--error-level-error: rgb(145, 14, 0);--console-bg-color: rgb(220, 224, 230);--console-icon-button-bg-color: var(--switch-bg-color);--console-icon-button-bg-color-hover: var(--resizeable-handle-border-color);--img2img-img-bg-color: rgb(180, 182, 184);--context-menu-bg-color: var(--background-color);--context-menu-box-shadow: 0px 10px 38px -10px rgba(22, 23, 24, .35), 0px 10px 20px -15px rgba(22, 23, 24, .2);--context-menu-bg-color-hover: var(--background-color-secondary);--floating-button-drop-shadow-color: rgba(0, 0, 0, .7);--inpainting-alerts-bg: rgba(220, 222, 224, .75);--inpainting-alerts-icon-color: rgb(0, 0, 0);--inpainting-alerts-bg-active: rgb(255, 200, 0);--inpainting-alerts-icon-active: rgb(0, 0, 0);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(0, 0, 0);--checkboard-dots-color: rgb(160, 160, 172)}[data-theme=green]{--white: rgb(255, 255, 255);--accent-color-dim: rgb(10, 60, 40);--accent-color: rgb(20, 110, 70);--accent-color-bright: rgb(30, 180, 100);--accent-color-hover: var(--accent-color-bright);--root-bg-color: rgb(10, 10, 14);--background-color: rgb(30, 32, 37);--background-color-light: rgb(40, 44, 48);--background-color-secondary: rgb(22, 24, 28);--text-color: rgb(255, 255, 255);--text-color-secondary: rgb(160, 164, 168);--subtext-color: rgb(24, 24, 28);--subtext-color-bright: rgb(68, 72, 76);--border-color: rgb(40, 44, 48);--border-color-light: rgb(60, 60, 64);--svg-color: rgb(220, 224, 228);--invalid: rgb(255, 75, 75);--invalid-secondary: rgb(120, 5, 5);--destructive-color: rgb(185, 55, 55);--destructive-color-hover: rgb(255, 75, 75);--warning-color: rgb(200, 88, 40);--warning-color-hover: rgb(230, 117, 60);--border-color-invalid: rgb(255, 80, 50);--box-shadow-color-invalid: rgb(210, 30, 10);--tab-color: rgb(40, 44, 48);--tab-hover-color: rgb(48, 52, 56);--tab-panel-bg: var(--background-color-secondary);--tab-list-bg: var(--accent-color);--tab-list-text: rgb(202, 204, 206);--tab-list-text-inactive: rgb(92, 94, 96);--btn-base-color: rgb(40, 44, 48);--btn-base-color-hover: rgb(56, 60, 64);--btn-load-more: rgb(30, 32, 42);--btn-load-more-hover: rgb(54, 56, 66);--btn-svg-color: rgb(255, 255, 255);--btn-delete-image: rgb(182, 46, 46);--btn-checkbox-border-hover: rgb(46, 48, 68);--progress-bar-color: var(--accent-color);--prompt-bg-color: rgb(10, 10, 14);--switch-bg-color: rgb(100, 102, 110);--switch-bg-active-color: var(--accent-color);--slider-color: var(--accent-color-bright);--resizeable-handle-border-color: var(--accent-color);--metadata-bg-color: rgba(0, 0, 0, .7);--metadata-json-bg-color: rgba(255, 255, 255, .1);--status-good-color: rgb(125, 255, 100);--status-good-glow: rgb(40, 215, 40);--status-working-color: rgb(255, 175, 55);--status-working-glow: rgb(255, 160, 55);--status-bad-color: rgb(255, 90, 90);--status-bad-glow: rgb(255, 40, 40);--settings-modal-bg: rgb(30, 32, 42);--input-checkbox-bg: rgb(60, 64, 68);--input-checkbox-checked-bg: var(--accent-color);--input-checkbox-checked-tick: rgb(0, 0, 0);--input-border-color: var(--accent-color-bright);--input-box-shadow-color: var(--accent-color);--error-level-info: rgb(200, 202, 224);--error-level-warning: rgb(255, 225, 105);--error-level-error: rgb(255, 81, 46);--console-bg-color: rgb(30, 30, 36);--console-icon-button-bg-color: rgb(50, 53, 64);--console-icon-button-bg-color-hover: rgb(70, 73, 84);--img2img-img-bg-color: rgb(30, 32, 42);--context-menu-bg-color: rgb(46, 48, 58);--context-menu-box-shadow: none;--context-menu-bg-color-hover: rgb(30, 32, 42);--floating-button-drop-shadow-color: var(--accent-color);--inpainting-alerts-bg: rgba(20, 20, 26, .75);--inpainting-alerts-icon-color: rgb(255, 255, 255);--inpainting-alerts-bg-active: var(--accent-color);--inpainting-alerts-icon-active: rgb(255, 255, 255);--inpainting-alerts-bg-alert: var(--invalid);--inpainting-alerts-icon-alert: rgb(255, 255, 255);--checkboard-dots-color: rgb(35, 35, 39)}svg{fill:var(--svg-color)}.App{display:grid;width:100vw;height:100vh;background-color:var(--background-color)}.app-content{display:grid;row-gap:1rem;padding:1rem;grid-auto-rows:min-content auto;width:calc(100vw + -0px);height:calc(100vh - .3rem)}.site-header{display:grid;grid-template-columns:auto max-content}.site-header-left-side{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem}.site-header-left-side img{width:32px;height:32px}.site-header-left-side h1{font-size:1.4rem}.site-header-right-side{display:flex;align-items:center;column-gap:.5rem}.status{font-size:.8rem;font-weight:700}.status-good{color:var(--status-good-color);text-shadow:0 0 10px var(--status-good-glow)}.status-bad{color:var(--status-bad-color);text-shadow:0 0 10px var(--status-bad-glow)}.status-working{color:var(--status-working-color);text-shadow:0 0 10px var(--status-working-glow)}.settings-modal{max-height:36rem;font-family:Inter}.settings-modal .settings-modal-content{display:grid;row-gap:2rem;overflow-y:scroll}.settings-modal .settings-modal-header{font-weight:700}.settings-modal .settings-modal-items{display:grid;row-gap:.5rem}.settings-modal .settings-modal-items .settings-modal-item{display:grid;grid-auto-flow:column;background-color:var(--background-color);padding:.4rem 1rem;border-radius:.5rem;align-items:center;width:100%}.settings-modal .settings-modal-reset{display:grid;row-gap:1rem}.settings-modal .settings-modal-reset button{min-width:100%;min-height:100%;background-color:var(--destructive-color)!important}.settings-modal .settings-modal-reset button:hover{background-color:var(--destructive-color-hover)}.settings-modal .settings-modal-reset button:disabled{background-color:#2d3135!important}.settings-modal .settings-modal-reset button:disabled:hover{background-color:#2d3135!important}.settings-modal .settings-modal-reset button svg{width:20px;height:20px;color:var(--btn-svg-color)}.model-list-accordion{outline:none;padding:.25rem}.model-list-accordion button{padding:0;margin:0}.model-list-accordion button:hover{background-color:unset}.model-list-accordion div{border:none}.model-list-accordion .model-list-button{display:flex;flex-direction:row;row-gap:.5rem;justify-content:space-between;align-items:center;width:100%}.model-list-accordion .model-list-header-hint{color:var(--text-color-secondary);font-weight:400}.model-list-accordion .model-list-list{display:flex;flex-direction:column;row-gap:.5rem}.model-list-accordion .model-list-list .model-list-item{display:flex;column-gap:.5rem;width:100%;justify-content:space-between;align-items:center}.model-list-accordion .model-list-list .model-list-item .model-list-item-description{font-size:.9rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.active{color:var(--status-good-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.cached{color:var(--status-working-color)}.model-list-accordion .model-list-list .model-list-item .model-list-item-status.not-loaded{color:var(--text-color-secondary)}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button{padding:.5rem;background-color:var(--btn-base-color);color:var(--text-color);border-radius:.2rem}.model-list-accordion .model-list-list .model-list-item .model-list-item-load-btn button:hover{background-color:var(--btn-base-color-hover)}.hotkeys-modal{width:36rem;max-width:36rem;display:grid;padding:1rem;row-gap:1rem;font-family:Inter}.hotkeys-modal h1{font-size:1.2rem;font-weight:700}.hotkeys-modal h2{font-weight:700}.hotkeys-modal-button{display:flex;align-items:center;justify-content:space-between}.hotkeys-modal-items{max-height:36rem;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.hotkeys-modal-items::-webkit-scrollbar{display:none}.hotkeys-modal-items .chakra-accordion{display:grid;row-gap:.5rem}.hotkeys-modal-items .chakra-accordion__item{border:none;border-radius:.3rem;background-color:var(--tab-hover-color)}.hotkeys-modal-items button{border-radius:.3rem}.hotkeys-modal-items button[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:.3rem}.hotkey-modal-category{display:grid;row-gap:.5rem}.hotkey-modal-item{display:grid;grid-template-columns:auto max-content;justify-content:space-between;align-items:center;background-color:var(--background-color);padding:.5rem 1rem;border-radius:.3rem}.hotkey-modal-item .hotkey-info{display:grid}.hotkey-modal-item .hotkey-info .hotkey-title{font-weight:700}.hotkey-modal-item .hotkey-info .hotkey-description{font-size:.9rem;color:var(--text-color-secondary)}.hotkey-modal-item .hotkey-key{font-size:.8rem;font-weight:700;background-color:var(--background-color-light);padding:.2rem .5rem;border-radius:.3rem}.console{width:100vw;display:flex;flex-direction:column;background:var(--console-bg-color);overflow:auto;direction:column;font-family:monospace;padding:0 1rem 1rem 3rem;border-top-width:.3rem;border-color:var(--resizeable-handle-border-color)}.console .console-info-color{color:var(--error-level-info)}.console .console-warning-color{color:var(--error-level-warning)}.console .console-error-color{color:var(--status-bad-color)}.console .console-entry{display:flex;column-gap:.5rem}.console .console-entry .console-timestamp{font-weight:semibold}.console .console-entry .console-message{word-break:break-all}.console-toggle-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:.5rem;z-index:10000}.console-toggle-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-toggle-icon-button[data-error-seen=true],.console-toggle-icon-button[data-error-seen=true]:hover{background:var(--status-bad-color)}.console-autoscroll-icon-button{background:var(--console-icon-button-bg-color);position:fixed;left:.5rem;bottom:3rem;z-index:10000}.console-autoscroll-icon-button:hover{background:var(--console-icon-button-bg-color-hover)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]{background:var(--accent-color)}.console-autoscroll-icon-button[data-autoscroll-enabled=true]:hover{background:var(--accent-color-hover)}.prompt-bar{display:grid;row-gap:1rem}.prompt-bar input,.prompt-bar textarea{background-color:var(--prompt-bg-color);font-size:1rem;border:2px solid var(--border-color)}.prompt-bar input:hover,.prompt-bar textarea:hover{border:2px solid var(--border-color-light)}.prompt-bar input:focus-visible,.prompt-bar textarea:focus-visible{border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.prompt-bar input[aria-invalid=true],.prompt-bar textarea[aria-invalid=true]{border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.prompt-bar input:disabled,.prompt-bar textarea:disabled{border:2px solid var(--border-color);box-shadow:none}.prompt-bar textarea{min-height:10rem}.process-buttons{display:flex;column-gap:.5rem}.invoke-btn{flex-grow:1;width:100%;min-width:100%;min-height:100%;background-color:var(--accent-color)!important}.invoke-btn:hover{background-color:var(--accent-color-hover)}.invoke-btn:disabled{background-color:#2d3135!important}.invoke-btn:disabled:hover{background-color:#2d3135!important}.invoke-btn svg{width:16px;height:16px;color:var(--btn-svg-color)}.cancel-btn{min-width:3rem;min-height:100%;background-color:var(--destructive-color)!important}.cancel-btn:hover{background-color:var(--destructive-color-hover)}.cancel-btn:disabled{background-color:#2d3135!important}.cancel-btn:disabled:hover{background-color:#2d3135!important}.cancel-btn svg{width:20px;height:20px;color:var(--btn-svg-color)}.loopback-btn[data-as-checkbox=true]{background-color:var(--btn-btn-base-color);border:3px solid var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true]:hover{background-color:var(--btn-btn-base-color);border-color:var(--btn-checkbox-border-hover)}.loopback-btn[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true] svg{fill:var(--text-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover{border-color:var(--accent-color);background-color:var(--btn-btn-base-color)}.loopback-btn[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--text-color)}.main-options,.main-options-list{display:grid;row-gap:1rem}.main-options-row{display:grid;grid-template-columns:repeat(3,auto);column-gap:.5rem;max-width:22.5rem}.main-option-block{border-radius:.5rem;display:grid!important;grid-template-columns:auto!important;row-gap:.5rem}.main-option-block .invokeai__number-input-form-label,.main-option-block .invokeai__select-label{font-weight:700;font-size:.9rem!important}.main-option-block .invokeai__select-label{margin:0}.advanced-options-checkbox{background-color:var(--background-color-secondary);padding:.5rem 1rem;border-radius:.4rem;font-weight:700}.advanced-settings{display:grid;row-gap:.5rem}.advanced-settings-item{display:grid;max-width:22.5rem;border:none;border-top:0px;border-radius:.4rem}.advanced-settings-item[aria-expanded=true]{background-color:var(--tab-hover-color);border-radius:0 0 .4rem .4rem}.advanced-settings-panel{background-color:var(--tab-panel-bg);border-radius:0 0 .4rem .4rem;padding:1rem}.advanced-settings-panel button{background-color:var(--btn-base-color)}.advanced-settings-panel button:hover{background-color:var(--btn-base-color-hover)}.advanced-settings-panel button:disabled:hover{background-color:var(--btn-base-color)}.advanced-settings-header{border-radius:.4rem}.advanced-settings-header[aria-expanded=true]{background-color:var(--tab-color);border-radius:.4rem .4rem 0 0}.advanced-settings-header:hover{background-color:var(--tab-hover-color)}.upscale-options{display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.inpainting-bounding-box-settings{display:flex;flex-direction:column;border-radius:.4rem;border:2px solid var(--tab-color)}.inpainting-bounding-box-header{background-color:var(--tab-color);display:flex;flex-direction:row;justify-content:space-between;padding:.5rem 1rem;border-radius:.3rem .3rem 0 0;align-items:center}.inpainting-bounding-box-header button{width:.5rem;height:1.2rem;background:none}.inpainting-bounding-box-header button:hover{background:none}.inpainting-bounding-box-settings-items{padding:1rem;display:flex;flex-direction:column;row-gap:1rem}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn{background-color:var(--btn-base-color)}.inpainting-bounding-box-settings-items .inpainting-bounding-box-reset-icon-btn:hover{background-color:var(--btn-base-color-hover)}.inpainting-bounding-box-dimensions-slider-numberinput{display:grid;grid-template-columns:repeat(3,auto);column-gap:1rem}.inpainting-bounding-box-darken{width:max-content}.progress-bar{background-color:var(--root-bg-color);height:.3rem;z-index:99}.progress-bar div{background-color:var(--progress-bar-color)}.progress-bar div[data-indeterminate]{background-color:unset;background-image:linear-gradient(to right,transparent 0%,var(--progress-bar-color) 50%,transparent 100%)}.current-image-area{display:flex;flex-direction:column;height:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem}.current-image-preview{position:relative;justify-content:center;align-items:center;display:flex;width:100%;height:100%}.current-image-preview img{border-radius:.5rem;object-fit:contain;max-width:100%;max-height:100%;height:auto;position:absolute;cursor:pointer}.current-image-metadata{grid-area:current-image-preview}.current-image-next-prev-buttons{grid-area:current-image-content;display:flex;justify-content:space-between;z-index:1;height:100%;width:100%;pointer-events:none}.next-prev-button-trigger-area{width:7rem;height:100%;width:15%;display:grid;align-items:center;pointer-events:auto}.next-prev-button-trigger-area.prev-button-trigger-area{justify-content:flex-start}.next-prev-button-trigger-area.next-button-trigger-area{justify-content:flex-end}.next-prev-button{font-size:4rem;fill:var(--white);filter:drop-shadow(0 0 1rem var(--text-color-secondary));opacity:70%}.current-image-display-placeholder{background-color:var(--background-color-secondary);display:grid;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:.5rem}.current-image-display-placeholder svg{width:10rem;height:10rem;color:var(--svg-color)}.current-image-options{width:100%;display:flex;justify-content:center;align-items:center;column-gap:.5em}.current-image-options .current-image-send-to-popover,.current-image-options .current-image-postprocessing-popover{display:flex;flex-direction:column;row-gap:.5rem;max-width:25rem}.current-image-options .current-image-send-to-popover .invokeai__button{place-content:start}.current-image-options .chakra-popover__popper{z-index:11}.current-image-options .delete-image-btn{background-color:var(--btn-base-color)}.current-image-options .delete-image-btn svg{fill:var(--btn-delete-image)}.image-gallery-wrapper-enter{transform:translate(150%)}.image-gallery-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.image-gallery-wrapper-exit{transform:translate(0)}.image-gallery-wrapper-exit-active{transform:translate(150%);transition:all .12s ease-out}.image-gallery-wrapper[data-pinned=false]{position:fixed;height:100vh;top:0;right:0}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup{border-radius:0;box-shadow:0 0 1rem var(--text-color-a3)}.image-gallery-wrapper[data-pinned=false] .image-gallery-popup .image-gallery-container{max-height:calc(100vh + 4.7rem)}.image-gallery-wrapper .image-gallery-popup{background-color:var(--background-color-secondary);padding:1rem;display:flex;flex-direction:column;row-gap:1rem;border-radius:.5rem;border-left-width:.3rem;border-color:var(--resizeable-handle-border-color)}.image-gallery-wrapper .image-gallery-popup[data-resize-alert=true]{border-color:var(--status-bad-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header{display:flex;align-items:center;column-gap:.5rem;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-header-right-icons{display:flex;flex-direction:row;column-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-icon-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover{display:flex;flex-direction:column;row-gap:.5rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-header .image-gallery-settings-popover div{display:flex;column-gap:.5rem;align-items:center;justify-content:space-between}.image-gallery-wrapper .image-gallery-popup .image-gallery-header h1{font-weight:700}.image-gallery-wrapper .image-gallery-popup .image-gallery-container{display:flex;flex-direction:column;max-height:calc(100vh - (70px + 7rem));overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container::-webkit-scrollbar{display:none}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder{display:flex;flex-direction:column;row-gap:.5rem;background-color:var(--background-color);border-radius:.5rem;place-items:center;padding:2rem;text-align:center}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder p{color:var(--subtext-color-bright);font-family:Inter}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-container-placeholder svg{width:4rem;height:4rem;color:var(--svg-color)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn{background-color:var(--btn-load-more);font-size:.85rem;padding:.5rem;margin-top:1rem}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:disabled:hover{background-color:var(--btn-load-more)}.image-gallery-wrapper .image-gallery-popup .image-gallery-container .image-gallery-load-more-btn:hover{background-color:var(--btn-load-more-hover)}.image-gallery-category-btn-group{width:max-content;column-gap:0;justify-content:stretch}.image-gallery-category-btn-group button{background-color:var(--btn-base-color);flex-grow:1}.image-gallery-category-btn-group button:hover{background-color:var(--btn-base-color-hover)}.image-gallery-category-btn-group button[data-selected=true]{background-color:var(--accent-color)}.image-gallery-category-btn-group button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.image-gallery{display:grid;grid-gap:.5rem}.image-gallery .hoverable-image{padding:.5rem;position:relative}.image-gallery .hoverable-image:before{content:"";display:block;padding-bottom:100%}.image-gallery .hoverable-image .hoverable-image-image{position:absolute;max-width:100%;top:50%;left:50%;transform:translate(-50%,-50%)}.hoverable-image{display:flex;justify-content:center;transition:transform .2s ease-out}.hoverable-image:hover{cursor:pointer;border-radius:.5rem;z-index:2}.hoverable-image .hoverable-image-image{width:100%;height:100%;max-width:100%;max-height:100%}.hoverable-image .hoverable-image-delete-button{position:absolute;top:.25rem;right:.25rem}.hoverable-image .hoverable-image-content{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;align-items:center;justify-content:center}.hoverable-image .hoverable-image-content .hoverable-image-check{fill:var(--status-good-color)}.hoverable-image .hoverable-image-icons{position:absolute;bottom:-2rem;display:grid;width:min-content;grid-template-columns:repeat(2,max-content);border-radius:.4rem;background-color:var(--background-color-secondary);padding:.2rem;gap:.2rem;grid-auto-rows:max-content}.hoverable-image .hoverable-image-icons button{width:12px;height:12px;border-radius:.2rem;padding:10px 0;flex-shrink:2}.hoverable-image .hoverable-image-icons button svg{width:12px;height:12px}.hoverable-image-context-menu{z-index:15;padding:.4rem;border-radius:.25rem;background-color:var(--context-menu-bg-color);box-shadow:var(--context-menu-box-shadow)}.hoverable-image-context-menu [role=menuitem]{font-size:.8rem;line-height:1rem;border-radius:3px;display:flex;align-items:center;height:1.75rem;padding:0 .5rem;position:relative;user-select:none;cursor:pointer;outline:none}.hoverable-image-context-menu [role=menuitem][data-disabled]{color:gray;pointer-events:none;cursor:not-allowed}.hoverable-image-context-menu [role=menuitem][data-warning]{color:var(--status-bad-color)}.hoverable-image-context-menu [role=menuitem][data-highlighted]{background-color:var(--context-menu-bg-color-hover)}.image-metadata-viewer{position:absolute;top:0;width:100%;border-radius:.5rem;padding:1rem;background-color:var(--metadata-bg-color);overflow:scroll;max-height:calc(100vh - (70px + 5.4rem));height:100%;z-index:10}.image-json-viewer{border-radius:.5rem;margin:0 .5rem 1rem;padding:1rem;overflow-x:scroll;word-break:break-all;background-color:var(--metadata-json-bg-color)}.lightbox-container{width:100%;height:100%;color:var(--text-color);overflow:hidden;position:absolute;left:0;top:0;background-color:var(--background-color-secondary);z-index:30}.lightbox-container .image-gallery-wrapper{max-height:100%!important}.lightbox-container .image-gallery-wrapper .image-gallery-container{max-height:calc(100vh - 5rem)}.lightbox-container .current-image-options{z-index:2;position:absolute;top:1rem}.lightbox-container .image-metadata-viewer{left:0;max-height:100%}.lightbox-close-btn{z-index:3;position:absolute;left:1rem;top:1rem;background-color:var(--btn-base-color)}.lightbox-close-btn:hover{background-color:var(--btn-base-color-hover)}.lightbox-close-btn:disabled:hover{background-color:var(--btn-base-color)}.lightbox-display-container{display:flex;flex-direction:row}.lightbox-preview-wrapper{overflow:hidden;background-color:var(--background-color-secondary);display:grid;grid-template-columns:auto max-content;place-items:center;width:100vw;height:100vh}.lightbox-preview-wrapper .current-image-next-prev-buttons{position:absolute}.lightbox-preview-wrapper .lightbox-image{grid-area:lightbox-content;border-radius:.5rem}.lightbox-preview-wrapper .lightbox-image-options{position:absolute;z-index:2;left:1rem;top:4.5rem;user-select:none;border-radius:.5rem;display:flex;flex-direction:column;row-gap:.5rem}.app-tabs{display:grid;grid-template-columns:min-content auto;column-gap:1rem;height:calc(100vh - (70px + 1rem))}.app-tabs-list{display:grid;row-gap:.3rem;grid-auto-rows:min-content;color:var(--tab-list-text-inactive)}.app-tabs-list button{font-size:.85rem;padding:.5rem}.app-tabs-list button:hover{background-color:var(--tab-hover-color);border-radius:.3rem}.app-tabs-list button svg{width:26px;height:26px}.app-tabs-list button[aria-selected=true]{background-color:var(--tab-list-bg);color:var(--tab-list-text);font-weight:700;border-radius:.3rem;border:none}.app-tabs-panels .app-tabs-panel{padding:0;height:100%}.workarea-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main{display:flex;column-gap:1rem;height:100%}.workarea-wrapper .workarea-main .workarea-children-wrapper{position:relative;width:100%;height:100%}.workarea-wrapper .workarea-main .workarea-split-view{width:100%;height:100%;display:grid;grid-template-columns:1fr 1fr;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-left{padding-right:.5rem}.workarea-wrapper .workarea-main .workarea-split-view .workarea-split-view-right{padding-left:.5rem}.workarea-wrapper .workarea-main .workarea-single-view{width:100%;height:100%;background-color:var(--background-color-secondary);border-radius:.5rem}.workarea-wrapper .workarea-main .workarea-split-view-left,.workarea-wrapper .workarea-main .workarea-split-view-right{display:flex;flex-direction:column;height:100%;width:100%;row-gap:1rem;background-color:var(--background-color-secondary);border-radius:.5rem;padding:1rem}.workarea-split-button{position:absolute;cursor:pointer;padding:.5rem;top:0;right:0}.workarea-split-button[data-selected=true]{top:0;right:0}.workarea-split-button[data-selected=true] svg{opacity:1}.workarea-split-button svg{opacity:.5}.options-panel-wrapper-enter{transform:translate(-150%)}.options-panel-wrapper-enter-active{transform:translate(0);transition:all .12s ease-out}.options-panel-wrapper-exit{transform:translate(0)}.options-panel-wrapper-exit-active{transform:translate(-150%);transition:all .12s ease-out}.options-panel-wrapper{background-color:var(--background-color);height:calc(100vh - (70px + 1rem));width:22.5rem;max-width:22.5rem;flex-shrink:0;position:relative;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.options-panel-wrapper::-webkit-scrollbar{display:none}.options-panel-wrapper .options-panel{display:flex;flex-direction:column;row-gap:1rem;height:100%;-ms-overflow-style:none;scrollbar-width:none;background-color:var(--background-color)}.options-panel-wrapper .options-panel::-webkit-scrollbar{display:none}.options-panel-wrapper[data-pinned=false]{z-index:20;position:fixed;top:0;left:0;filter:var(--floating-panel-drop-shadow);width:24.5rem;max-width:24.5rem;height:100%}.options-panel-wrapper[data-pinned=false] .options-panel-margin{margin:1rem}.options-panel-wrapper .options-panel-pin-button{position:absolute;cursor:pointer;padding:.5rem;top:1rem;right:1rem;z-index:20}.options-panel-wrapper .options-panel-pin-button[data-selected=true]{top:0;right:0}.options-panel-wrapper .options-panel-pin-button svg{opacity:.5}.invoke-ai-logo-wrapper{display:flex;align-items:center;column-gap:.7rem;padding-left:.5rem;padding-top:.3rem}.invoke-ai-logo-wrapper img{width:32px;height:32px}.invoke-ai-logo-wrapper h1{font-size:1.4rem}.text-to-image-area{padding:1rem;height:100%}.image-to-image-area{display:flex;flex-direction:column;row-gap:1rem;width:100%;height:100%}.image-to-image-strength-main-option{display:flex;row-gap:.5rem!important}.image-to-image-strength-main-option .invokeai__slider-component-label{color:var(--text-color-secondary);font-size:.9rem!important}.init-image-preview-header{display:flex;align-items:center;justify-content:space-between;width:100%}.init-image-preview-header h2{font-weight:700;font-size:.9rem}.init-image-preview{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center}.init-image-preview img{border-radius:.5rem;object-fit:contain;position:absolute}.image-to-image-current-image-display{position:relative}.floating-show-hide-button{position:absolute;top:50%;transform:translateY(-50%);z-index:20;padding:0;background-color:red!important;min-width:2rem;min-height:12rem;background-color:var(--btn-btn-base-color)!important}.floating-show-hide-button.left{left:0;border-radius:0 .5rem .5rem 0}.floating-show-hide-button.right{right:0;border-radius:.5rem 0 0 .5rem}.floating-show-hide-button:hover{background-color:var(--btn-btn-base-color-hover)}.floating-show-hide-button:disabled{background-color:#2d3135!important}.floating-show-hide-button:disabled:hover{background-color:#2d3135!important}.floating-show-hide-button svg{width:20px;height:20px;color:var(--btn-svg-color)}.show-hide-button-options{position:absolute;transform:translateY(-50%);z-index:20;min-width:2rem;top:50%;left:calc(42px + 2rem);border-radius:0 .5rem .5rem 0;display:flex;flex-direction:column;row-gap:.5rem}.show-hide-button-options button{border-radius:0 .3rem .3rem 0}.show-hide-button-gallery{padding-left:.75rem;padding-right:.75rem;background-color:var(--background-color)!important;filter:drop-shadow(.5rem 0px 1rem var(--floating-button-drop-shadow-color))}.inpainting-main-area{display:flex;flex-direction:column;align-items:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-settings{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings svg{transform:scale(.9)}.inpainting-main-area .inpainting-settings .inpainting-buttons-group{display:flex;align-items:center;column-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-button-dropdown{display:flex;flex-direction:column;row-gap:.5rem}.inpainting-main-area .inpainting-settings .inpainting-color-picker{margin-left:1rem}.inpainting-main-area .inpainting-settings .inpainting-brush-options{display:flex;align-items:center;column-gap:1rem}.inpainting-main-area .inpainting-canvas-area{display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:1rem;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-spiner{display:flex;align-items:center;width:100%;height:100%}.inpainting-main-area .inpainting-canvas-container{display:flex;align-items:center;justify-content:center;height:100%;width:100%;border-radius:.5rem}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-wrapper{position:relative}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage{outline:none;border-radius:.5rem;box-shadow:0 0 0 1px var(--border-color-light);overflow:hidden}.inpainting-main-area .inpainting-canvas-container .inpainting-canvas-stage canvas{outline:none;border-radius:.5rem}.inpainting-options-btn{min-height:2rem}.canvas-status-text{position:absolute;top:0;left:0;background-color:var(--background-color);opacity:.65;display:flex;flex-direction:column;font-size:.8rem;padding:.25rem;min-width:12rem;border-radius:.25rem;margin:.25rem;pointer-events:none}.invokeai__number-input-form-control{display:flex;align-items:center;column-gap:1rem}.invokeai__number-input-form-control .invokeai__number-input-form-label{color:var(--text-color-secondary);margin-right:0;font-size:1rem;margin-bottom:0;white-space:nowrap}.invokeai__number-input-form-control .invokeai__number-input-form-label[data-focus]+.invokeai__number-input-root{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__number-input-form-control .invokeai__number-input-form-label[aria-invalid=true]+.invokeai__number-input-root{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__number-input-form-control .invokeai__number-input-root{height:2rem;display:grid;grid-template-columns:auto max-content;column-gap:.5rem;align-items:center;background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.3rem}.invokeai__number-input-form-control .invokeai__number-input-field{border:none;font-weight:700;width:100%;height:auto;font-size:.9rem;padding:0 .5rem}.invokeai__number-input-form-control .invokeai__number-input-field:focus{outline:none;box-shadow:none}.invokeai__number-input-form-control .invokeai__number-input-field:disabled{opacity:.2}.invokeai__number-input-form-control .invokeai__number-input-stepper{display:grid;padding-right:.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button{border:none;padding:0 .5rem;margin:0 -.5rem}.invokeai__number-input-form-control .invokeai__number-input-stepper .invokeai__number-input-stepper-button svg{width:10px;height:10px}.input{display:grid;grid-template-columns:max-content auto;column-gap:1rem;align-items:center}.input .input-label{color:var(--text-color-secondary);margin-right:0}.input .input-entry{background-color:var(--background-color-secondary);border:2px solid var(--border-color);border-radius:.2rem;font-weight:700}.input .input-entry:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.input .input-entry:disabled{opacity:.2}.input .input-entry[aria-invalid=true]{outline:none;border:2px solid var(--border-color-invalid);box-shadow:0 0 10px 0 var(--box-shadow-color-invalid)}.invokeai__icon-button{background:var(--btn-base-color);cursor:pointer}.invokeai__icon-button:hover{background-color:var(--btn-base-color-hover)}.invokeai__icon-button[data-selected=true]{background-color:var(--accent-color)}.invokeai__icon-button[data-selected=true]:hover{background-color:var(--accent-color-hover)}.invokeai__icon-button[disabled]{cursor:not-allowed}.invokeai__icon-button[data-variant=link],.invokeai__icon-button[data-variant=link]:hover{background:none}.invokeai__icon-button[data-as-checkbox=true]{background-color:var(--btn-base-color);border:3px solid var(--btn-base-color)}.invokeai__icon-button[data-as-checkbox=true] svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true]:hover{background-color:var(--btn-base-color);border-color:var(--btn-checkbox-border-hover)}.invokeai__icon-button[data-as-checkbox=true]:hover svg{fill:var(--text-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]{border-color:var(--accent-color)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true] svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-as-checkbox=true][data-selected=true]:hover svg{fill:var(--accent-color-hover)}.invokeai__icon-button[data-alert=true]{animation-name:pulseColor;animation-duration:1s;animation-timing-function:ease-in-out;animation-iteration-count:infinite}.invokeai__icon-button[data-alert=true]:hover{animation:none;background-color:var(--accent-color-hover)}@keyframes pulseColor{0%{background-color:var(--accent-color)}50%{background-color:var(--accent-color-dim)}to{background-color:var(--accent-color)}}.invokeai__button{background-color:var(--btn-base-color);place-content:center}.invokeai__button:hover{background-color:var(--btn-base-color-hover)}.invokeai__switch-form-control .invokeai__switch-form-label{display:flex;column-gap:1rem;justify-content:space-between;align-items:center;color:var(--text-color-secondary);font-size:1rem;margin-right:0;margin-bottom:.1rem;white-space:nowrap;width:auto}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span{background-color:var(--switch-bg-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root span span{background-color:var(--white)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span{background:var(--switch-bg-active-color)}.invokeai__switch-form-control .invokeai__switch-form-label .invokeai__switch-root[data-checked] span span{background-color:var(--white)}.invokeai__select{display:flex;column-gap:1rem;align-items:center;width:max-content}.invokeai__select .invokeai__select-label{color:var(--text-color-secondary);margin-right:0}.invokeai__select .invokeai__select-picker{border:2px solid var(--border-color);background-color:var(--background-color-secondary);font-weight:700;height:2rem;border-radius:.2rem}.invokeai__select .invokeai__select-picker:focus{outline:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__select .invokeai__select-option{background-color:var(--background-color-secondary);color:var(--text-color-secondary)}.invokeai__slider-component{display:flex;gap:1rem;align-items:center}.invokeai__slider-component .invokeai__slider-component-label{min-width:max-content;margin:0;font-weight:700;font-size:.9rem;color:var(--text-color-secondary)}.invokeai__slider-component .invokeai__slider_track{background-color:var(--tab-color)}.invokeai__slider-component .invokeai__slider_track-filled{background-color:var(--slider-color)}.invokeai__slider-component .invokeai__slider-thumb{width:4px}.invokeai__slider-component .invokeai__slider-mark{font-size:.75rem;font-weight:700;color:var(--slider-color);margin-top:.3rem}.invokeai__slider-component .invokeai__slider-number-input{border:none;font-size:.9rem;font-weight:700;height:2rem;background-color:var(--background-color-secondary);border:2px solid var(--border-color)}.invokeai__slider-component .invokeai__slider-number-input:focus{outline:none;box-shadow:none;border:2px solid var(--input-border-color);box-shadow:0 0 10px 0 var(--input-box-shadow-color)}.invokeai__slider-component .invokeai__slider-number-input:disabled{opacity:.2}.invokeai__slider-component .invokeai__slider-number-stepper{border:none}.invokeai__slider-component[data-markers=true] .invokeai__slider_container{margin-top:-1rem}.invokeai__checkbox .chakra-checkbox__label{margin-top:1px;color:var(--text-color-secondary);font-size:.9rem}.invokeai__checkbox .chakra-checkbox__control{width:1rem;height:1rem;border:none;border-radius:.2rem;background-color:var(--input-checkbox-bg)}.invokeai__checkbox .chakra-checkbox__control svg{width:.6rem;height:.6rem;stroke-width:3px}.invokeai__checkbox .chakra-checkbox__control[data-checked]{color:var(--text-color);background-color:var(--input-checkbox-checked-bg)}.invokeai__popover-content{min-width:unset;width:unset;padding:1rem;border-radius:.5rem;background-color:var(--background-color);border:2px solid var(--border-color)}.invokeai__popover-content .invokeai__popover-arrow{background-color:var(--background-color)!important}.invokeai__color-picker .react-colorful__hue-pointer,.invokeai__color-picker .react-colorful__saturation-pointer{width:1.5rem;height:1.5rem;border-color:var(--white)}.dropzone-container{position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:999;backdrop-filter:blur(20px)}.dropzone-container .dropzone-overlay{opacity:.5;width:100%;height:100%;display:flex;flex-direction:column;row-gap:1rem;align-items:center;justify-content:center;background-color:var(--background-color)}.dropzone-container .dropzone-overlay.is-drag-accept{box-shadow:inset 0 0 20rem 1rem var(--accent-color)}.dropzone-container .dropzone-overlay.is-drag-reject{box-shadow:inset 0 0 20rem 1rem var(--status-bad-color)}.dropzone-container .dropzone-overlay.is-handling-upload{box-shadow:inset 0 0 20rem 1rem var(--status-working-color)}.image-uploader-button-outer{width:100%;height:100%;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:.5rem;color:var(--tab-list-text-inactive);background-color:var(--background-color)}.image-uploader-button-outer:hover{background-color:var(--background-color-light)}.image-upload-button-inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}.image-upload-button{display:flex;flex-direction:column;row-gap:2rem;align-items:center;justify-content:center;text-align:center}.image-upload-button svg{width:4rem;height:4rem}.image-upload-button h2{font-size:1.2rem}.work-in-progress{display:grid;width:100%;height:calc(100vh - (70px + 1rem));grid-auto-rows:max-content;background-color:var(--background-color-secondary);border-radius:.4rem;place-content:center;place-items:center;row-gap:1rem}.work-in-progress h1{font-size:2rem;font-weight:700}.work-in-progress p{text-align:center;max-width:50rem;color:var(--subtext-color-bright)}.guide-popover-arrow{background-color:var(--tab-panel-bg);box-shadow:none}.guide-popover-content{background-color:var(--background-color-secondary);border:none}.guide-popover-guide-content{background:var(--tab-panel-bg);border:2px solid var(--tab-hover-color);border-radius:.4rem;padding:.75rem 1rem;display:grid;grid-template-rows:repeat(auto-fill,1fr);grid-row-gap:.5rem;justify-content:space-between}.modal{background-color:var(--background-color-secondary);color:var(--text-color)}.modal-close-btn{background-color:var(--btn-base-color)}.modal-close-btn:hover{background-color:var(--btn-base-color-hover)}.modal-close-btn:disabled:hover{background-color:var(--btn-base-color)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{-ms-overflow-style:none;scrollbar-width:none;background-color:var(--root-bg-color);overflow:hidden}html::-webkit-scrollbar,body::-webkit-scrollbar{display:none}#root{background-color:var(--root-bg-color);color:var(--text-color);font-family:Inter,Arial,Helvetica,sans-serif} diff --git a/frontend/dist/index.html b/frontend/dist/index.html index 9a2ef6268b..633ebe4a16 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -6,8 +6,8 @@ InvokeAI - A Stable Diffusion Toolkit - - + +