Cozy-Nest/client/assets/index.js

1937 lines
1.5 MiB
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

var AR=Object.defineProperty;var MR=(e,t,n)=>t in e?AR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var zm=(e,t,n)=>(MR(e,typeof t!="symbol"?t+"":t,n),n);function LR(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[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 s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).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)}})();const RR=`:root{--nevysha-margin-left: 175px;--ae-primary-color: rgb(92, 175, 214);--secondary-accent-color: #b67ee1;--secondary-accent-color-from-luminance: white;--nevysha-gradiant-1: rgb(101,0,94);--nevysha-text-md: 12px;--nevysha-color-from-luminance: black;--extra-network-card-width: 13em;--extra-network-card-height: 8em;--nevysha-font-color: #d4d4d4;--nevysha-icon-fill: var(--nevysha-font-color);--nevysha-font-color-subdued: #9ca3af;--menu-top-height: 1px;--main-container-height: 1px}:root,.dark{--nevysha-gradiant-2: rgb(28 28 28);--body-background-fill: rgba(255, 255, 255, 0) !important;--button-primary-background-fill: var(--primary-500);--tab-nav-background-color: #262626ad;--tab-nav-background-color-selected: var(--input-background-fill);--vertical-line-bg-color: #ffffff59;--checkbox-background-color: var(--nevysha-dark);--button-border-width: 0px;--tabmenu-button-color: var(--nevysha-font-color);--nevysha-dark: #1c1c1c;--nevysha-light-dark: #292a2e;--nevysha-white: var(--nevysha-font-color);--nevysha-input-border-color: hsl(214deg 5% 30%);--nevysha-color2: #f0a6caff;--nevysha-color3: #efc3e6ff;--nevysha-color4: #f0e6efff;--main-tabs-background-color: #14141485;--background-fill-primary: var(--nevysha-light-dark);--ae-slider-bg-overlay: repeating-linear-gradient( 90deg, transparent, transparent max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(4px, calc(.671141% + 0px)) );--ae-subgroup-input-bg-color: hsl(225deg 6% 13%);--ae-input-border-color: hsl(214deg 5% 30%);--ae-panel-border-radius: 0px;--ae-input-bg-color: hsl(225deg 6% 13%);--ae-input-color: var(--nevysha-font-color);--block-title-text-color: var(--nevysha-font-color);--primary-50: var(--nevysha-color4);--primary-100: var(--nevysha-color4);--primary-200: var(--nevysha-color3);--primary-300: var(--nevysha-color3);--primary-400: var(--nevysha-light-dark);--primary-500: var(--nevysha-light-dark);--primary-600: var(--nevysha-dark);--primary-700: var(--nevysha-dark);--primary-800: var(--nevysha-dark);--primary-900: var(--nevysha-dark);--primary-950: var(--nevysha-dark);--secondary-50: var(--nevysha-color4);--secondary-100: var(--nevysha-color4);--secondary-200: var(--nevysha-color3);--secondary-300: var(--nevysha-color3);--secondary-400: var(--nevysha-light-dark);--secondary-500: var(--nevysha-light-dark);--secondary-600: var(--nevysha-dark);--secondary-700: var(--nevysha-dark);--secondary-800: var(--nevysha-dark);--secondary-900: var(--nevysha-dark);--secondary-950: var(--nevysha-dark);--neutral-50: #f9fafb;--neutral-100: #f3f4f6;--neutral-200: #e5e7eb;--neutral-300: #d1d5db;--neutral-400: #9ca3af;--neutral-500: #6b7280;--neutral-600: var(--nevysha-light-dark);--neutral-700: var(--nevysha-light-dark);--neutral-800: var(--nevysha-light-dark);--neutral-900: var(--nevysha-light-dark);--neutral-950: var(--nevysha-light-dark);--slider-color: var(--nevysha-dark);--button-secondary-background-fill: var(--nevysha-dark);--button-secondary-background-fill-hover: var(--nevysha-dark);--checkbox-border-color: var(--nevysha-white);--checkbox-border-color-hover: var(--ae-primary-color);--color-accent: var(--ae-primary-color);--link-text-color: var(--nevysha-white);--body-text-color: var(--nevysha-font-color);--color-accent-soft: var(--neutral-700);--background-fill-secondary: var(--neutral-900);--border-color-accent: var(--neutral-600);--border-color-primary: var(--neutral-700);--link-text-color-active: var(--secondary-500);--link-text-color-hover: var(--ae-primary-color);--link-text-color-visited: var(--secondary-600);--body-text-color-subdued: var(--nevysha-font-color-subdued);--shadow-drop: rgba(0,0,0,.05) 0px 1px 2px 0px;--shadow-drop-lg: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--shadow-inset: rgba(0,0,0,.05) 0px 2px 4px 0px inset;--block-background-fill: var(--neutral-800);--block-label-border-color: var(--nevysha-input-border-color);--block-label-text-color: var(--neutral-200);--checkbox-background-color-selected: var(--secondary-600);--checkbox-border-color-focus: var(--secondary-500);--checkbox-border-color-selected: var(--checkbox-border-color);--checkbox-label-background-fill: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--checkbox-label-background-fill-hover: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--error-background-fill: var(--background-fill-primary);--error-text-color: #ef4444;--input-background-fill: var(--nevysha-dark);--input-background-fill-focus: var(--secondary-600);--input-background-fill-hover: var(--input-background-fill);--input-border-color-focus: var(--neutral-700);--input-placeholder-color: var(--neutral-500);--input-shadow-focus: 0 0 0 var(--shadow-spread) var(--neutral-700), var(--shadow-inset);--stat-background-fill: linear-gradient(to right, var(--primary-400), var(--primary-600));--table-border-color: var(--neutral-700);--table-even-background-fill: var(--neutral-950);--table-odd-background-fill: var(--neutral-900);--button-cancel-background-fill: linear-gradient(to bottom right, #dc2626, #b91c1c);--button-cancel-background-fill-hover: linear-gradient(to bottom right, #dc2626, #dc2626);--button-cancel-border-color: #dc2626;--button-cancel-border-color-hover: var(--button-cancel-border-color);--button-cancel-text-color: white;--button-cancel-text-color-hover: var(--button-cancel-text-color);--button-primary-background-fill-hover: linear-gradient(to bottom right, var(--primary-500), var(--primary-500));--button-primary-border-color: var(--primary-500);--button-primary-text-color: white;--button-primary-text-color-hover: var(--button-primary-text-color);--button-secondary-border-color: var(--neutral-600);--button-secondary-text-color: var(--nevysha-font-color);--button-secondary-text-color-hover: var(--button-secondary-text-color);--shadow-spread: 1px;--block-border-color: var(--border-color-primary);--block_border_width: None;--block-info-text-color: var(--nevysha-font-color-subdued);--block-label-background-fill: var(--background-fill-secondary);--block_label_border_width: None;--block_shadow: None;--block_title_background_fill: None;--block_title_border_color: None;--block_title_border_width: None;--panel-background-fill: var(--background-fill-secondary);--panel-border-color: var(--border-color-primary);--panel_border_width: None;--checkbox-background-color-focus: var(--checkbox-background-color);--checkbox-background-color-hover: var(--checkbox-background-color);--checkbox-border-width: var(--input-border-width);--checkbox-label-background-fill-selected: var(--checkbox-label-background-fill);--checkbox-label-border-color: var(--border-color-primary);--checkbox-label-border-color-hover: var(--checkbox-label-border-color);--checkbox-label-border-width: var(--input-border-width);--checkbox-label-text-color: var(--body-text-color);--checkbox-label-text-color-selected: var(--checkbox-label-text-color);--error-border-color: var(--border-color-primary);--error_border_width: None;--input-border-color: var(--border-color-primary);--input-border-color-hover: var(--input-border-color);--input_border_width: None;--input_shadow: None;--loader_color: None;--slider_color: None;--table-row-focus: var(--color-accent-soft);--button-primary-border-color-hover: var(--button-primary-border-color);--button-secondary-border-color-hover: var(--button-secondary-border-color);--spacing-xxs: 1px;--spacing-xs: 2px;--spacing-sm: 3px;--spacing-md: 6px;--spacing-lg: 4px;--spacing-xl: 10px;--spacing-xxl: 16px;--radius-xxs: 1px;--radius-xs: 2px;--radius-sm: 0;--radius-md: 6px;--radius-lg: 2px !important;--radius-xl: 12px;--radius-xxl: 22px;--text-xxs: 9px;--text-xs: 10px;--text-sm: 12px;--text-lg: 12px;--text-xl: 22px;--text-xxl: 26px;--font: "Source Sans Pro", "ui-sans-serif", "system-ui", sans-serif;--font-mono: "IBM Plex Mono", "ui-monospace", "Consolas", monospace;--body-text-size: var(--nevysha-text-md);--body-text-weight: 400;--embed-radius: var(--radius-lg);--block-border-width: 1px;--block-info-text-size: var(--text-sm);--block-info-text-weight: 400;--block-label-border-width: 1px;--block-label-margin: 0;--block-label-padding: var(--spacing-sm) var(--spacing-lg);--block-label-radius: calc(var(--radius-lg) - 1px) 0 calc(var(--radius-lg) - 1px) 0;--block-label-right-radius: 0 calc(var(--radius-lg) - 1px) 0 calc(var(--radius-lg) - 1px);--block-label-text-size: var(--text-sm);--block-label-text-weight: 400;--block-padding: var(--spacing-xl) calc(var(--spacing-xl) + 2px);--block-radius: var(--radius-lg);--block-shadow: var(--shadow-drop);--block-title-background-fill: none;--block-title-border-color: none;--block-title-border-width: 1px;--block-title-padding: 0;--block-title-radius: none;--block-title-text-size: var(--nevysha-text-md);--block-title-text-weight: 400;--container-radius: var(--radius-lg);--form-gap-width: 1px;--layout-gap: var(--spacing-xxl);--panel-border-width: 0;--section-header-text-size: var(--nevysha-text-md);--section-header-text-weight: 400;--checkbox-border-radius: var(--radius-sm);--checkbox-label-gap: var(--spacing-lg);--checkbox-label-padding: var(--spacing-md) calc(2 * var(--spacing-md));--checkbox-label-shadow: var(--shadow-drop);--checkbox-label-text-size: var(--nevysha-text-md);--checkbox-label-text-weight: 400;--checkbox-check: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");--radio-circle: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");--checkbox-shadow: var(--input-shadow);--error-border-width: 1px;--input-border-width: 1px;--input-padding: var(--spacing-xl);--input-radius: var(--radius-lg);--input-shadow: 0 0 0 var(--shadow-spread) transparent, var(--shadow-inset);--input-text-size: var(--nevysha-text-md);--input-text-weight: 400;--loader-color: var(--color-accent);--prose-text-size: var(--nevysha-text-md);--prose-text-weight: 400;--prose-header-text-weight: 600;--table-radius: var(--radius-lg);--button-large-padding: 2px;--button-large-radius: var(--radius-lg);--button-large-text-size: var(--nevysha-text-md);--button-large-text-weight: 600;--button-shadow: var(--shadow-drop);--button-shadow-active: var(--shadow-inset);--button-shadow-hover: var(--shadow-drop-lg);--button-small-padding: var(--spacing-sm) calc(2 * var(--spacing-sm));--button-small-radius: var(--radius-lg);--button-small-text-size: var(--nevysha-text-md);--button-small-text-weight: 400;--button-transition: none}.nevysha-light{--nevysha-gradiant-2: #fefefe;--nevysha-white: var(--nevysha-font-color);--nevysha-dark: #fefefe;--nevysha-light-dark: #efefef;--neutral-50: var(--nevysha-white);--neutral-100: var(--nevysha-white);--neutral-200: var(--nevysha-white);--neutral-400: var(--nevysha-white);--neutral-600: var(--nevysha-light-dark);--neutral-700: var(--nevysha-light-dark);--neutral-800: var(--nevysha-light-dark);--neutral-900: var(--nevysha-light-dark);--neutral-950: var(--nevysha-light-dark);--link-text-color-hover: var(--ae-primary-color);--ae-slider-bg-overlay: repeating-linear-gradient( 90deg, transparent, transparent max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(3px, calc(.671141% - 2px)), var(--ae-input-border-color) max(4px, calc(.671141% + 0px)) );--ae-subgroup-input-bg-color: hsl(225deg 6% 13%);--ae-input-border-color: hsl(0deg 0% 84.25%);--ae-input-color: hsl(0, 0%, 0%);--ae-input-bg-color: hsl(0, 0%, 100%);--button-secondary-background-fill: var(--nevysha-dark);--block-label-background-fill: var(--background-fill-secondary);--checkbox-label-background-fill-hover: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--vertical-line-bg-color: #18181859;--checkbox-background-color: var(--nevysha-dark);--checkbox-background-color-focus: var(--checkbox-background-color);--checkbox-label-background-fill: linear-gradient(to top, var(--neutral-900), var(--neutral-800));--checkbox-label-background-fill-selected: var(--checkbox-label-background-fill);--checkbox-label-text-color: var(--body-text-color);--checkbox-label-text-color-selected: var(--checkbox-label-text-color);--background-fill-secondary: var(--neutral-900);--panel-background-fill: var(--background-fill-secondary);--body-text-color-subdued: var(--nevysha-font-color-subdued);--block-label-text-color: var(--neutral-200);--button-secondary-text-color: var(--nevysha-white);--button-secondary-text-color-hover: var(--button-secondary-text-color);--checkbox-border-color-hover: var(--ae-primary-color);--checkbox-background-color-hover: var(--nevysha-dark);--button-secondary-background-fill-hover: var(--ae-primary-color);--body-background-fill: rgba(255, 255, 255, 0) !important;--tab-nav-background-color: var(--nevysha-light-dark);--tab-nav-background-color-selected: var(--nevysha-dark);--border-color-primary: #acacac;--input-border-color: #acacac;--block-border-color: var(--border-color-primary);--input-border-color-focus: var(--ae-primary-color);--ae-panel-border-radius: 0px;--tabnav-button-color: var(--nevysha-white);--input-background-fill: var(--nevysha-dark);--body-text-color: var(--neutral-100);--tabmenu-button-color: var(--nevysha-white);--background-fill-primary: var(--nevysha-light-dark);--block-background-fill: var(--neutral-800);--secondary-text-color: var(--nevysha-white);--block-title-text-color: var(--nevysha-font-color);--main-tabs-background-color: #e5e5e585}#kofi_nevysha_support{transform:rotate(360deg)}.gradio-button.secondary-down:hover{background:var(--button-secondary-background-fill-hover);color:var(--button-secondary-text-color-hover)}.gradio-dropdown ul.options li.item.selected{background-color:var(--ae-primary-color)!important}.gradio-dropdown ul.options li.item:hover{background-color:var(--color-accent)}.progressDiv .progress{background:var(--ae-primary-color)!important}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0;position:relative}input[type=number]::-webkit-inner-spin-button:before{content:"▲";display:block;position:absolute;top:0;left:0;right:0;bottom:50%;text-align:center;color:red;font-size:10px}input[type=number]::-webkit-inner-spin-button:after{content:"▼";display:block;position:absolute;top:50%;left:0;right:0;bottom:0;text-align:center;color:red;font-size:10px}.gradio-accordion{background-color:var(--nevysha-light-dark)!important;border-left:none!important;border-bottom:none!important;border-right:none!important;border-radius:3px!important;color:var(--secondary-text-color)!important;margin:6px 0!important}.gradio-slider input[type=range]{align-self:flex-start}.gradio-container.app{padding:2px!important;transform:rotate(360deg)}input[type=range]{overflow:hidden;width:100%;-webkit-appearance:none;background-color:var(--ae-input-bg-color);border:1px solid var(--ae-input-border-color);position:relative;accent-color:var(--ae-primary-color)!important}input[type=range]:after{content:"";position:absolute;height:13px;background-image:var(--ae-slider-bg-overlay);opacity:.15;width:100%}input[type=range]::-webkit-slider-runnable-track{height:14px;-webkit-appearance:none;color:var(--ae-primary-color);margin-top:-1px}input[type=range]::-moz-range-thumb,input[type=range]::-webkit-slider-thumb{color:var(--ae-primary-color);border-radius:0}.nevysha.nevysha-tabnav{display:flex;position:fixed;z-index:2;flex-direction:column;width:175px;background-color:var(--tab-nav-background-color);border-bottom:none!important}.nevysha.nevysha-tabnav.center-menu-items{justify-content:center}.nevysha.nevysha-tabnav.center-menu-items>button:nth-child(1){margin-left:auto}.nevysha.nevysha-tabnav>.selected{background-color:var(--tab-nav-background-color-selected)!important;border-top:2px solid var(--ae-primary-color);border-radius:0}.nevysha.nevysha-tabnav>button{color:var(--tabmenu-button-color)}#quicksettings_gap{display:none}#quicksettings_gap.nevysha-quicksettings-gap{display:block;flex:1;max-width:none}#tabs>.nevysha.tabitem{margin-left:calc(var(--nevysha-margin-left) + 10px);background-color:var(--main-tabs-background-color);border:none;border-radius:0;overflow-y:auto;height:var(--main-container-height);padding:0 10px}#tabs>.nevysha.tabitem::-webkit-scrollbar{width:5px}#tabs>.nevysha.tabitem::-webkit-scrollbar-track{background-color:transparent}#tabs>.nevysha.tabitem::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.nevysha.btn{display:inline-flex;justify-content:center;align-items:center;transition:var(--button-transition);padding:var(--size-0-5) var(--size-2);text-align:center;border:var(--button-border-width) solid var(--button-primary-border-color);background:var(--button-primary-background-fill);color:var(--button-primary-text-color);border-radius:var(--button-large-radius);padding:var(--button-large-padding);font-size:var(--button-large-text-size);--checkbox-background-color: var(--neutral-800)}.nevysha.btn.refresh{width:50px;max-width:50px;text-align:center;vertical-align:middle;height:50px;background-color:var(--nevysha-dark);display:none}.block.padded:not(.gradio-accordion){padding:10px!important}.nevysha.settings-child{background-color:var(--nevysha-light-dark)!important}.gradio-button.tool{border-radius:0!important;border:none!important}#quicksettings{width:auto;align-items:stretch;gap:20px}#quicksettings>.block.gradio-slider{display:flex;flex-direction:row;align-content:space-between}#quicksettings>div.block{padding:0!important;display:flex;flex-direction:row;align-content:space-between}#quicksettings>div.block>*{width:100%}#quicksettings>div.block>input[type=range]{margin-bottom:2px}#quicksettings>.gradio-button.tool{height:38px;margin-left:-20px}#quicksettings.centered-quicksettings{justify-content:center!important}#footer{text-align:center;position:fixed;bottom:0;left:0;display:flex;justify-content:center;width:100%}#footer>div{display:flex;position:fixed;left:10px;bottom:2px}#footer .versions{font-size:85%!important;opacity:.85!important;position:fixed!important;right:10px!important;left:auto!important;bottom:2px}.nevysha.svg-icon{height:20px;fill:var(--nevysha-icon-fill);margin:3px 0}.nevysha.svg-icon.rotate{transform:rotate(315deg)}/*!*versions*!*/.token-remove>svg{width:20px;height:20px;fill:var(--neutral-50)}html{overflow-y:hidden}body,#nevysha-loading{font-family:-apple-system,BlinkMacSystemFont,sans-serif;overflow:auto;background:linear-gradient(330deg,var(--nevysha-gradiant-1) 3%,var(--nevysha-gradiant-2) 38%);animation:gradient 35s ease infinite;background-size:400% 400%;background-attachment:fixed;display:flex;height:100vh}@keyframes gradient{0%{background-position:0% 0%}50%{background-position:75% 75%}to{background-position:0% 0%}}.wave{background:rgb(94 26 145 / 16%);border-radius:1000% 1000% 0 0;position:fixed;width:200%;height:3.5em;animation:wave 10s -3s linear infinite;transform:translateZ(0);opacity:.8;bottom:0;left:0;z-index:0}.wave:nth-of-type(2){bottom:-1.25em;animation:wave 18s linear reverse infinite;opacity:.8}.wave:nth-of-type(3){bottom:-2.5em;animation:wave 20s -1s reverse infinite;opacity:.9}@keyframes wave{2%{transform:translate(1)}25%{transform:translate(-25%)}50%{transform:translate(-50%)}75%{transform:translate(-25%)}to{transform:translate(1)}}.block{padding:10px!important}.block.padded:not(.gradio-accordion){padding:0!important}.block.token-counter span{background:var(--nevysha-dark)!important;box-shadow:none!important;border:none!important;border-radius:0!important}.gradio-group{margin-top:10px!important}button.secondary,button.primary{border:1px solid var(--ae-input-border-color)!important;border-radius:var(--ae-panel-border-radius)!important;background:var(--ae-input-bg-color)!important;color:var(--ae-input-color)!important}.nevysha.skip-interrupt-wrapper{display:flex!important;flex-direction:row}.nevysha.skip-interrupt-wrapper>button{position:relative}.nevysha.settings-wrapper{flex:1;margin-top:5px;overflow-y:scroll;padding:0 5px 15px 0}.nevysha.settings-wrapper::-webkit-scrollbar{width:5px}.nevysha.settings-wrapper::-webkit-scrollbar-track{background-color:transparent}.nevysha.settings-wrapper::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.nevysha.txt2img_toprow-wrapper{display:flex;flex-direction:column}#txt2img_settings,#img2img_settings{flex:1;height:100%;display:flex;flex-direction:column;flex-wrap:nowrap}#txt2img_script_container,#img2img_script_container{padding:0!important}#txt2img_tools,#img2img_tools{gap:0}#txt2img_tools>.form,#img2img_tools>.form{gap:0;justify-content:space-between}#txt2img_toprow,#img2img_toprow{background-color:var(--nevysha-light-dark)!important;padding:10px!important;margin-bottom:6px;display:flex;flex-direction:column}#txt2img_script_container,#img2img_script_container{background-color:transparent!important}#tab_txt2img>div,#tab_img2img>div,#tab_img2img>div>div{height:100%}.settings-gradio-parent{height:100%;padding:10px 0 0}#txt2img_results,#img2img_results{height:100%}#txt2img_gallery_container,#img2img_gallery_container{flex:1;max-height:100%;overflow-y:auto}.nevysha.nevysha-scrollable::-webkit-scrollbar{width:5px}.nevysha.nevysha-scrollable::-webkit-scrollbar-track{background-color:transparent}.nevysha.nevysha-scrollable::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.nevysha.nevysha-scrollable>div>div:nth-child(2){overflow-y:visible}#txt2img_gallery,#img2img_gallery{height:100%;display:flex;flex-direction:column}#txt2img_gallery>div:nth-child(2),#img2img_gallery>div:nth-child(2){flex:1;min-height:auto!important;max-height:none!important}#txt2img_settings,#img2img_settings,#txt2img_results,#img2img_results{flex-grow:1;flex-shrink:0}#txt2img_settings,#img2img_settings,#txt2img_results,#img2img_results{flex-basis:50%}#txt2img_seed_row,#img2img_seed_row{display:flex;align-content:center;align-items:center}#txt2img_seed_row>button,#img2img_seed_row>button{align-self:auto}#image_browser_tabs_container>:not(:nth-child(-n+2)){background-color:var(--nevysha-light-dark)!important}#tab_settings{background-color:var(--nevysha-light-dark)!important}#img2img_settings .tabs>:not(:first-child){background-color:var(--nevysha-light-dark)!important}.nevysha.resizable-children-container{flex-wrap:nowrap;width:calc(100% - 33px)!important;display:flex;flex-direction:row}.vertical-line-wrapper{width:10px!important;max-width:10px!important;min-width:10px!important;height:calc(100% - 30px);cursor:ew-resize;display:flex;justify-content:center;margin:15px -10px 0}.slide-right-browser-panel>.vertical-line-wrapper{position:absolute}.slide-right-browser-panel>.slide-right-browser-panel-container{flex:1;padding:10px;margin-left:15px}#cozy-img-browser_panel{border:1px solid var(--ae-input-border-color)!important}.vertical-line{width:2px!important;max-width:2px!important;min-width:2px!important;height:100%;cursor:ew-resize;background-image:linear-gradient(to bottom,var(--vertical-line-bg-color) 7px,transparent 0);background-size:100% 13px}.gradio-image{padding:0!important}#expendBtn{position:absolute;bottom:10px;right:35px;z-index:99999}#img2maskimg>div:nth-child(3)>div>div{display:flex;justify-content:center}canvas.nevysha{inset:auto}.brush>input[type=range]{min-width:200px}.block.gradio-checkbox{margin:0!important}.nevysha-accent{background-color:var(--ae-primary-color)!important}.slide-right-browser-panel>.vertical-line-wrapper{z-index:100;margin:15px 0 0 5px}.nevysha-right-button-wrapper{position:fixed;right:0;top:calc(75px + var(--menu-top-height));z-index:999;height:calc(100vh - (100px + var(--menu-top-height)));width:25px;min-width:25px!important;display:flex;flex-direction:column}.nevysha-right-button-wrapper>button{flex:1;min-height:auto!important;max-height:none!important;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0!important;margin:0!important}.nevysha-right-button-wrapper>button>div,.nevysha-extra-network-floating-btn>div{writing-mode:vertical-rl;width:25px;min-width:25px!important}.nevysha-extra-network-floating-btn{height:100px;position:absolute;top:calc(50% - 50px)}.extra-network-cards{overflow-x:hidden}.extra-network-cards>.card{width:var(--extra-network-card-width);height:var(--extra-network-card-height)}.extra-network-cards .card .actions .name{font-size:var(--nevysha-text-md);line-break:normal;text-overflow:ellipsis;width:100%;display:block}.slide-right-browser-panel{position:fixed;z-index:9999;background-color:var(--block-background-fill)!important;width:75vw;right:0;height:calc(100% - (95px + var(--menu-top-height)));top:calc(75px + var(--menu-top-height));padding-right:15px;display:flex;flex-direction:row;border:1px solid #3f3f3f}.nevysha-light .slide-right-browser-panel{border:1px solid var(--ae-input-border-color)}.extra-network-subdirs{overflow:scroll}[id$=_subdirs]{padding:0;margin:0;overflow:visible}[id$=cards_html]{display:flex;flex-direction:column;width:100%;padding:0;margin:0;align-items:stretch;overflow:auto}[id$=cards_html]::-webkit-scrollbar{width:5px}[id$=cards_html]::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}[id$=cards_html]::-webkit-scrollbar-track{background-color:transparent}[id$=_cards]{height:auto;overflow:visible;position:relative}input[type=number]{width:100px}.nevysha.settings-nevyui-title{position:absolute;top:0;width:100%;text-align:center}.nevysha.settings-nevyui-title>h2{font-size:1.8em;color:var(--ae-primary-color);font-family:Caveat Variable,sans-serif}.nevysha.settings-nevyui-title>.subtitle{font-size:10px;font-style:italic}.nevysha.settings-nevyui-top>.info{color:var(--body-text-color);margin-bottom:5px;font-style:italic}.nevysha-reporting{color:var(--body-text-color)!important;margin:15px 0!important;border-left:4px solid var(--ae-primary-color);padding-left:5px;display:flex;flex-wrap:wrap}.nevysha.settings-nevyui-top>.nevysha-reporting>a{color:var(--ae-primary-color);text-decoration:underline}#cozy_nest_settings_tabs .block{background-color:transparent}.nevysha-emphasis{margin-top:5px;font-weight:700;background-color:var(--ae-primary-color);color:var(--nevysha-color-from-luminance)!important;padding:8px;border-radius:2px}.nevysha-tabnav.nevysha-tabnav-settings>h2{font-size:1.6em;margin-top:20px}#nevyui_update_info_panel>article{border-left:4px solid var(--ae-primary-color);padding-left:15px;margin-left:5px}#nevysha-version-info{display:flex;justify-content:space-between}.nevysha-version-info-text{flex:1;margin-left:10px!important}.nevysha.settings-nevyui-bottom{position:absolute;bottom:0}.nevysha.settings-nevyui-bottom>p{font-size:.8em;color:var(--body-text-color)}#cozy_nest_settings_tabs{background-color:var(--tab-nav-background-color-selected)}#cozy_nest_settings_tabs>.tabitem{overflow-y:auto;height:520px}#cozy_nest_settings_tabs>.tab-nav{background-color:var(--tab-nav-background-color)}.tab-nav>*{border-radius:0}#cozy_nest_settings_tabs>.tab-nav>.selected{background-color:var(--tab-nav-background-color-selected)!important;border-top:2px solid var(--ae-primary-color)}[id$=_extra_tabs]{background-color:var(--tab-nav-background-color-selected)}[id$=_extra_tabs]>.tabitem{background-color:var(--tab-nav-background-color-selected)!important}[id$=_extra_tabs]>.tab-nav{background-color:var(--tab-nav-background-color)}[id$=_extra_tabs]>.tab-nav>.selected{background-color:var(--tab-nav-background-color-selected)!important;border-top:2px solid var(--ae-primary-color)}.nevysha-draggable-anchor-icon{cursor:pointer;position:relative;top:2px;left:2px;width:60px;height:35px;display:flex;align-content:center;justify-content:center;flex-wrap:wrap;background:var(--ae-input-bg-color);border:1px solid var(--ae-input-border-color)}.nevysha-draggable-anchor-icon>svg{height:15px;fill:var(--body-text-color)}.nevysha-draggable-anchor{position:absolute;top:0;left:0;cursor:pointer;z-index:9999;width:60px;height:35px}#img_browser_main_block{gap:0}#img_browser_main_block .form{align-items:center}textarea.nevysha-image-browser-folder{display:block;position:relative;outline:none!important;box-shadow:var(--input-shadow);border:var(--input-border-width) solid var(--input-border-color);resize:none}#cnib_output_folder>label>textarea{display:none}.nevysha-image-browser-folder-container{display:flex;flex-direction:row}.nevysha-image-browser-folder-btn{border:1px solid var(--ae-input-border-color)!important;border-radius:var(--ae-panel-border-radius)!important;background:var(--ae-input-bg-color)!important;color:var(--ae-input-color)!important;padding:0 10px!important;min-width:60px}.nevysha.nevysha-tabnav.menu-fix-top{position:fixed;flex-direction:row;width:100%;top:0}.gradio-container.app{z-index:1;height:100vh!important}.gradio-container.app.menu-fix-top{padding-top:0!important;padding-bottom:20px!important}#tab_nevyui>div{height:100%}#nevyui-ui-wrapper{background-color:var(--block-background-fill)}.nevysha-tab-settings{position:fixed;right:5px;top:30px;height:fit-content;width:max(800px,50vw);z-index:9999;background-color:var(--block-background-fill);border:1px solid var(--ae-input-border-color)}.nevysha-btn-menu-wrapper{display:flex;justify-content:center;margin:15px 0}.nevysha-btn-menu-wrapper.menu-fix-top{position:relative;right:20px;margin:0 0 0 auto;display:flex;gap:10px;justify-content:end}.nevysha-btn-menu-wrapper>button>svg{fill:var(--ae-primary-color);width:20px}#nevysha-saved-feedback-wrapper{height:1px}.nevysha-feedback{margin:auto;width:100%;text-align:center;margin-top:-15px!important;color:var(--ae-primary-color)!important}#nevyui_update_info_panel{padding:5px}.markdown-body{font-size:1em;color:var(--body-text-color);line-height:1.5;font-weight:400;letter-spacing:.00938em;word-wrap:break-word;padding:0 10px;max-height:400px;overflow-y:auto}.markdown-body code{font-family:monospace;font-size:.9em;background-color:var(--ae-input-bg-color);color:var(--body-text-color);padding:2px;border-radius:2px}.markdown-body>h1{font-size:medium;color:var(--body-text-color);margin-top:30px}.markdown-body>h2{font-size:1.4em;color:var(--body-text-color);margin-top:30px}.markdown-body>ul{margin-left:20px}.markdown-body>ul>li>ul{margin-left:20px}.markdown-body>ul>li{margin-bottom:10px}.markdown-body em{font-style:italic}#nevysha_other_tabs:empty{height:200px;width:200px}#nevysha_other_tabs:empty:before{content:"Drop tabs here to hide them";display:flex;justify-content:center;align-items:center;height:100%;width:100%;color:var(--body-text-color);font-size:1.2em;font-weight:500;text-align:center}#nevysha_other_tabs{background-color:var(--block-background-fill);position:absolute;display:flex;flex-direction:column;border:1px solid var(--ae-input-border-color)}#nevysha_other_tabs>button{text-align:left}.nevysha-other-tab-text{padding:3px 10px;text-align:left}.remove-nevysha-other-tab{padding-right:4px;padding-left:4px}.nevysha-cozy-nest-app-name{font-size:4em;margin-bottom:30%;color:var(--ae-primary-color);font-family:Caveat Variable,sans-serif;text-transform:uppercase}#nevysha-loading>div.nevysha-loading-progress>div.subtext1{font-size:1em;color:var(--body-text-color);opacity:1;margin-top:30%}#nevysha-loading>div.nevysha-loading-progress>div.subtext2{font-size:.8em;color:var(--body-text-color);opacity:.2}#nevysha-loading-wrap{background-color:var(--nevysha-gradiant-2);position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9000}#nevysha-loading-wrap>#nevysha-loading>.footer{position:fixed;bottom:calc(3.5em + 25px);right:25px;color:var(--body-text-color);font-size:.7em;opacity:.3}#nevysha-loading{position:fixed;top:0;left:0;width:100vw;height:100vh;display:flex;z-index:9001}#loading_step_estimator{font-size:.8em}.nevysha-loading-progress{margin:auto;color:var(--ae-primary-color);text-align:center}.lds-roller{display:inline-block;position:relative;width:80px;height:80px}.lds-roller div{animation:lds-roller 1.2s cubic-bezier(.5,0,.5,1) infinite;transform-origin:40px 40px}.lds-roller div:after{content:" ";display:block;position:absolute;width:7px;height:7px;border-radius:50%;background:var(--ae-primary-color);margin:-4px 0 0 -4px}.lds-roller div:nth-child(1){animation-delay:-36ms}.lds-roller div:nth-child(1):after{top:63px;left:63px}.lds-roller div:nth-child(2){animation-delay:-72ms}.lds-roller div:nth-child(2):after{top:68px;left:56px}.lds-roller div:nth-child(3){animation-delay:-.108s}.lds-roller div:nth-child(3):after{top:71px;left:48px}.lds-roller div:nth-child(4){animation-delay:-.144s}.lds-roller div:nth-child(4):after{top:72px;left:40px}.lds-roller div:nth-child(5){animation-delay:-.18s}.lds-roller div:nth-child(5):after{top:71px;left:32px}.lds-roller div:nth-child(6){animation-delay:-.216s}.lds-roller div:nth-child(6):after{top:68px;left:24px}.lds-roller div:nth-child(7){animation-delay:-.252s}.lds-roller div:nth-child(7):after{top:63px;left:17px}.lds-roller div:nth-child(8){animation-delay:-.288s}.lds-roller div:nth-child(8):after{top:56px;left:12px}@keyframes lds-roller{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:var(--ae-primary-color);animation-timing-function:cubic-bezier(0,1,1,0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 .6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 .6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 .6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 .6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}#kofi_nevysha_support>img{height:15px!important}.nevysha-kofi-tab{width:auto;height:auto}.livePreview{background-color:var(--background-fill-primary)!important}:root{--error-handler-white: #eeeeee}#dialog-message-wrap,#cozy-alert-wrap{font-size:12px;position:fixed;z-index:1000;width:100vw;height:100vh;top:0;backdrop-filter:blur(10px);display:flex;justify-content:center}#dialog-message{display:flex;flex-direction:column;padding:10px;margin:50px;background-color:var(--nevysha-gradiant-2)}#dialog-message>.header{display:flex;justify-content:space-between}#dialog-message>.header>h1{font-size:1.5em}#cozy-alert-wrap>div{height:fit-content;width:auto;margin:auto;background-color:var(--nevysha-gradiant-2);padding:15px;display:flex;flex-direction:column;border:1px solid var(--ae-input-border-color);color:var(--nevysha-font-color)}#cozy-alert-wrap>div>.header{display:flex;justify-content:space-between;flex-direction:row}#cozy-alert-title{font-size:1.5em;margin:0 auto}#cozy-alert-close{margin:auto}.ui-dialog-title,#cozy_nest_error_handling_display{color:var(--error-handler-white)}#cozy_nest_error_handling_display_stack{color:red;font-weight:700;font-family:monospace;white-space:pre-wrap;background-color:#222;padding:25px;border-radius:3px;border-color:red}#cozynest-error-extentions>table>tbody>tr>td>a{color:var(--error-handler-white);font-style:italic}#dialog-message>fieldset{color:var(--error-handler-white);margin-bottom:40px}#dialog-message>fieldset.extensions-list{height:100%;overflow-y:auto}#cozynest-error-instance-info>a{color:#0ff!important;text-decoration:underline;font-weight:700}.cozynest-error-tips{font-weight:700;color:var(--error-handler-white);background-color:#d57411;padding:10px;font-size:15px}.cozynest-error-tips>a{color:#0ff;text-decoration:underline;font-weight:700}.ui-dialog{background-color:#101010;border:none}.ui-dialog-titlebar,.ui-dialog-buttonpane{background-color:#000;border:none;color:var(--error-handler-white)}.ui-button{background-color:#222;border:none;color:var(--error-handler-white)}.ui-button:hover,.ui-widget.ui-widget-content{border:none}.blocInfo,textarea{display:block;position:relative;outline:none!important;box-shadow:var(--input-shadow);border:var(--input-border-width) solid var(--input-border-color);border-color:var(--input-border-color)!important;border-radius:var(--input-radius)!important;background:var(--input-background-fill)!important;background-color:var(--input-background-fill)!important;width:100%;color:var(--body-text-color)!important;font-weight:var(--input-text-weight)!important;font-size:var(--input-text-size)!important;line-height:var(--line-sm)!important;font-family:monospace!important}.infotext{max-height:200px;overflow-y:auto}.infotext::-webkit-scrollbar{width:5px}.infotext::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}.infotext::-webkit-scrollbar-track{background-color:transparent}ul.options{overflow-y:auto;z-index:303;border:1px solid var(--ae-input-border-color)}ul.options::-webkit-scrollbar{width:5px}ul.options::-webkit-scrollbar-track{background-color:transparent}ul.options::-webkit-scrollbar-thumb{background-color:var(--ae-primary-color);border-radius:20px}button:hover,.nevysha-button:hover{filter:brightness(1.2)!important}body.nevysha-light button:hover,body.nevysha-light .nevysha-button:hover{filter:brightness(.95)!important}.nevysha-enhanced-prompt-field{padding:10px!important}.nevysha-enhanced-prompt-field>.prompt{height:289px;display:block;position:relative;outline:none!important;box-shadow:var(--input-shadow);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-radius);background:var(--input-background-fill);width:100%;color:var(--body-text-color)!important;font-weight:var(--input-text-weight)!important;font-size:var(--input-text-size)!important;line-height:var(--line-sm)!important;font-family:monospace!important;overflow:auto;min-height:45px;padding:10px}.nevysha-enhanced-prompt-field-bracket{font-weight:700;font-size:1.2em}#kofi_nevysha_support,#kofi_nevysha_support_img{display:none}[id$=_gallery_clear_button]{position:absolute;top:3px;right:10px;z-index:30;background-color:var(--block-background-fill)}[id$=_gallery_clear_button]>svg{height:15px;width:15px;fill:var(--body-text-color)}#nevyui_update_info_close_btn,#nevyui_update_btn{width:60px}#cozynest_others_settings_header>p:nth-child(1){font-style:italic}#nevysha_cozy_nest{display:none}body.nsfw img:not([id="kofi_nevysha_support_img"]){filter:blur(20px)}body.nsfw .infoModal>.image-wrapper>img{filter:blur(50px)}body.nsfw .card{filter:blur(10px)}[id$=_actions_column]{gap:0}[id$=_toprow]{gap:5px!important}.gradio-accordion{border-left:2px solid var(--block-background-fill)!important}.nevysha-accordion-open{border-top:2px solid var(--secondary-accent-color)!important;border-image:linear-gradient(to right,var(--secondary-accent-color) 100px,var(--block-background-fill) 70%) 1}[id$=_script_container] .gradio-accordion:before{content:""!important;background-color:var(--ae-input-border-color)!important;height:1px!important;position:absolute;top:0;width:100%;left:0;margin-top:-2px;margin-left:-2px}[id$=_script_container] .nevysha-accordion-open.gradio-accordion:before{margin-top:-3px}[id$=_script_container] .nevysha-accordion-open{border-left:2px solid var(--secondary-accent-color)!important}[id$=_script_container] .nevysha-accordion-open .nevysha-accordion-open{border-top:2px solid var(--secondary-accent-color)!important;border-left:2px solid var(--block-background-fill)!important;border-image:none}.gradio-accordion>.label-wrap.open{color:var(--ae-primary-color)!important;margin-bottom:20px}.nevysha-scripts{border-left:2px solid var(--secondary-accent-color)!important;background-color:var(--background-fill-primary);padding:15px;margin-top:-10px!important}.nevysha-script-selected{border-top:2px solid var(--secondary-accent-color)!important;border-left:2px solid var(--secondary-accent-color)!important;border-image:linear-gradient(to right,var(--secondary-accent-color) 100px,var(--block-background-fill) 70%) 1;color:var(--ae-primary-color)!important}.nevysha-script-selected label>span{color:var(--ae-primary-color)!important;margin-bottom:20px}.nevysha-script-selected input{color:var(--ae-primary-color)!important}[id$=_prompt_container]{gap:1px!important}.checkboxes-row,.gradio-group{margin-bottom:0!important;margin-top:0!important}.gradio-button.tool{height:3em}.tab-nav>button.selected{border-top:2px solid var(--secondary-accent-color)}.nevysha.settings-wrapper>:not([id$="_toprow"]):not([id$="_script_container"]){padding:5px!important}[id$=_container_aspect_ratio]{padding:5px!important}[id$=_script_container]>div{background-color:var(--block-background-fill)}.nevysha-prompt-tools{align-items:flex-end}.nevysha-interrogate-btn{max-width:55px;height:38px;width:20px;min-width:75px!important}button#interrogate{margin:0 3px 0 5px!important}[id$=_styles_row]{margin-right:5px}[id$=_styles_row] button{padding:0!important}[id$=_styles_row]>div{gap:0!important}#script_list{padding:5px!important}
`;var Ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ki(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a2={exports:{}};(function(e){(function(){function t(v){var w={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(v===!1)return JSON.parse(JSON.stringify(w));var b={};for(var m in w)w.hasOwnProperty(m)&&(b[m]=w[m].defaultValue);return b}function n(){var v=t(!0),w={};for(var b in v)v.hasOwnProperty(b)&&(w[b]=!0);return w}var r={},i={},o={},s=t(!0),d="vanilla",a={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:t(!0),allOn:n()};r.helper={},r.extensions={},r.setOption=function(v,w){return s[v]=w,this},r.getOption=function(v){return s[v]},r.getOptions=function(){return s},r.resetOptions=function(){s=t(!0)},r.setFlavor=function(v){if(!a.hasOwnProperty(v))throw Error(v+" flavor was not found");r.resetOptions();var w=a[v];d=v;for(var b in w)w.hasOwnProperty(b)&&(s[b]=w[b])},r.getFlavor=function(){return d},r.getFlavorOptions=function(v){if(a.hasOwnProperty(v))return a[v]},r.getDefaultOptions=function(v){return t(v)},r.subParser=function(v,w){if(r.helper.isString(v))if(typeof w<"u")i[v]=w;else{if(i.hasOwnProperty(v))return i[v];throw Error("SubParser named "+v+" not registered!")}},r.extension=function(v,w){if(!r.helper.isString(v))throw Error("Extension 'name' must be a string");if(v=r.helper.stdExtName(v),r.helper.isUndefined(w)){if(!o.hasOwnProperty(v))throw Error("Extension named "+v+" is not registered!");return o[v]}else{typeof w=="function"&&(w=w()),r.helper.isArray(w)||(w=[w]);var b=c(w,v);if(b.valid)o[v]=w;else throw Error(b.error)}},r.getAllExtensions=function(){return o},r.removeExtension=function(v){delete o[v]},r.resetExtensions=function(){o={}};function c(v,w){var b=w?"Error in "+w+" extension->":"Error in unnamed extension",m={valid:!0,error:""};r.helper.isArray(v)||(v=[v]);for(var $=0;$<v.length;++$){var A=b+" sub-extension "+$+": ",C=v[$];if(typeof C!="object")return m.valid=!1,m.error=A+"must be an object, but "+typeof C+" given",m;if(!r.helper.isString(C.type))return m.valid=!1,m.error=A+'property "type" must be a string, but '+typeof C.type+" given",m;var k=C.type=C.type.toLowerCase();if(k==="language"&&(k=C.type="lang"),k==="html"&&(k=C.type="output"),k!=="lang"&&k!=="output"&&k!=="listener")return m.valid=!1,m.error=A+"type "+k+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',m;if(k==="listener"){if(r.helper.isUndefined(C.listeners))return m.valid=!1,m.error=A+'. Extensions of type "listener" must have a property called "listeners"',m}else if(r.helper.isUndefined(C.filter)&&r.helper.isUndefined(C.regex))return m.valid=!1,m.error=A+k+' extensions must define either a "regex" property or a "filter" method',m;if(C.listeners){if(typeof C.listeners!="object")return m.valid=!1,m.error=A+'"listeners" property must be an object but '+typeof C.listeners+" given",m;for(var I in C.listeners)if(C.listeners.hasOwnProperty(I)&&typeof C.listeners[I]!="function")return m.valid=!1,m.error=A+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+I+" must be a function but "+typeof C.listeners[I]+" given",m}if(C.filter){if(typeof C.filter!="function")return m.valid=!1,m.error=A+'"filter" must be a function, but '+typeof C.filter+" given",m}else if(C.regex){if(r.helper.isString(C.regex)&&(C.regex=new RegExp(C.regex,"g")),!(C.regex instanceof RegExp))return m.valid=!1,m.error=A+'"regex" property must either be a string or a RegExp object, but '+typeof C.regex+" given",m;if(r.helper.isUndefined(C.replace))return m.valid=!1,m.error=A+'"regex" extensions must implement a replace string or function',m}}return m}r.validateExtension=function(v){var w=c(v,null);return w.valid?!0:(console.warn(w.error),!1)},r.hasOwnProperty("helper")||(r.helper={}),r.helper.isString=function(v){return typeof v=="string"||v instanceof String},r.helper.isFunction=function(v){var w={};return v&&w.toString.call(v)==="[object Function]"},r.helper.isArray=function(v){return Array.isArray(v)},r.helper.isUndefined=function(v){return typeof v>"u"},r.helper.forEach=function(v,w){if(r.helper.isUndefined(v))throw new Error("obj param is required");if(r.helper.isUndefined(w))throw new Error("callback param is required");if(!r.helper.isFunction(w))throw new Error("callback param must be a function/closure");if(typeof v.forEach=="function")v.forEach(w);else if(r.helper.isArray(v))for(var b=0;b<v.length;b++)w(v[b],b,v);else if(typeof v=="object")for(var m in v)v.hasOwnProperty(m)&&w(v[m],m,v);else throw new Error("obj does not seem to be an array or an iterable object")},r.helper.stdExtName=function(v){return v.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()};function u(v,w){var b=w.charCodeAt(0);return"¨E"+b+"E"}r.helper.escapeCharactersCallback=u,r.helper.escapeCharacters=function(v,w,b){var m="(["+w.replace(/([\[\]\\])/g,"\\$1")+"])";b&&(m="\\\\"+m);var $=new RegExp(m,"g");return v=v.replace($,u),v},r.helper.unescapeHTMLEntities=function(v){return v.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};var l=function(v,w,b,m){var $=m||"",A=$.indexOf("g")>-1,C=new RegExp(w+"|"+b,"g"+$.replace(/g/g,"")),k=new RegExp(w,$.replace(/g/g,"")),I=[],L,T,R,P,D;do for(L=0;R=C.exec(v);)if(k.test(R[0]))L++||(T=C.lastIndex,P=T-R[0].length);else if(L&&!--L){D=R.index+R[0].length;var N={left:{start:P,end:T},match:{start:T,end:R.index},right:{start:R.index,end:D},wholeMatch:{start:P,end:D}};if(I.push(N),!A)return I}while(L&&(C.lastIndex=T));return I};r.helper.matchRecursiveRegExp=function(v,w,b,m){for(var $=l(v,w,b,m),A=[],C=0;C<$.length;++C)A.push([v.slice($[C].wholeMatch.start,$[C].wholeMatch.end),v.slice($[C].match.start,$[C].match.end),v.slice($[C].left.start,$[C].left.end),v.slice($[C].right.start,$[C].right.end)]);return A},r.helper.replaceRecursiveRegExp=function(v,w,b,m,$){if(!r.helper.isFunction(w)){var A=w;w=function(){return A}}var C=l(v,b,m,$),k=v,I=C.length;if(I>0){var L=[];C[0].wholeMatch.start!==0&&L.push(v.slice(0,C[0].wholeMatch.start));for(var T=0;T<I;++T)L.push(w(v.slice(C[T].wholeMatch.start,C[T].wholeMatch.end),v.slice(C[T].match.start,C[T].match.end),v.slice(C[T].left.start,C[T].left.end),v.slice(C[T].right.start,C[T].right.end))),T<I-1&&L.push(v.slice(C[T].wholeMatch.end,C[T+1].wholeMatch.start));C[I-1].wholeMatch.end<v.length&&L.push(v.slice(C[I-1].wholeMatch.end)),k=L.join("")}return k},r.helper.regexIndexOf=function(v,w,b){if(!r.helper.isString(v))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(!(w instanceof RegExp))throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var m=v.substring(b||0).search(w);return m>=0?m+(b||0):m},r.helper.splitAtIndex=function(v,w){if(!r.helper.isString(v))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[v.substring(0,w),v.substring(w)]},r.helper.encodeEmailAddress=function(v){var w=[function(b){return"&#"+b.charCodeAt(0)+";"},function(b){return"&#x"+b.charCodeAt(0).toString(16)+";"},function(b){return b}];return v=v.replace(/./g,function(b){if(b==="@")b=w[Math.floor(Math.random()*2)](b);else{var m=Math.random();b=m>.9?w[2](b):m>.45?w[1](b):w[0](b)}return b}),v},r.helper.padEnd=function(w,b,m){return b=b>>0,m=String(m||" "),w.length>b?String(w):(b=b-w.length,b>m.length&&(m+=m.repeat(b/m.length)),String(w)+m.slice(0,b))},typeof console>"u"&&(console={warn:function(v){alert(v)},log:function(v){alert(v)},error:function(v){throw v}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️&zwj;♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴&zwj;♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱&zwj;♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇&zwj;♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷&zwj;♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨&zwj;❤️&zwj;👨",couple_with_heart_woman_woman:"👩&zwj;❤️&zwj;👩",couplekiss_man_man:"👨&zwj;❤️&zwj;💋&zwj;👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩&zwj;❤️&zwj;💋&zwj;👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯&zwj;♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁&zwj;🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨&zwj;👦",family_man_boy_boy:"👨&zwj;👦&zwj;👦",family_man_girl:"👨&zwj;👧",family_man_girl_boy:"👨&zwj;👧&zwj;👦",family_man_girl_girl:"👨&zwj;👧&zwj;👧",family_man_man_boy:"👨&zwj;👨&zwj;👦",family_man_man_boy_boy:"👨&zwj;👨&zwj;👦&zwj;👦",family_man_man_girl:"👨&zwj;👨&zwj;👧",family_man_man_girl_boy:"👨&zwj;👨&zwj;👧&zwj;👦",family_man_man_girl_girl:"👨&zwj;👨&zwj;👧&zwj;👧",family_man_woman_boy_boy:"👨&zwj;👩&zwj;👦&zwj;👦",family_man_woman_girl:"👨&zwj;👩&zwj;👧",family_man_woman_girl_boy:"👨&zwj;👩&zwj;👧&zwj;👦",family_man_woman_girl_girl:"👨&zwj;👩&zwj;👧&zwj;👧",family_woman_boy:"👩&zwj;👦",family_woman_boy_boy:"👩&zwj;👦&zwj;👦",family_woman_girl:"👩&zwj;👧",family_woman_girl_boy:"👩&zwj;👧&zwj;👦",family_woman_girl_girl:"👩&zwj;👧&zwj;👧",family_woman_woman_boy:"👩&zwj;👩&zwj;👦",family_woman_woman_boy_boy:"👩&zwj;👩&zwj;👦&zwj;👦",family_woman_woman_girl:"👩&zwj;👩&zwj;👧",family_woman_woman_girl_boy:"👩&zwj;👩&zwj;👧&zwj;👦",family_woman_woman_girl_girl:"👩&zwj;👩&zwj;👧&zwj;👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️&zwj;♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍&zwj;♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️&zwj;♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂&zwj;♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇&zwj;♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"",heavy_multiplication_x:"✖️",heavy_plus_sign:"",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨&zwj;🎨",man_astronaut:"👨&zwj;🚀",man_cartwheeling:"🤸&zwj;♂️",man_cook:"👨&zwj;🍳",man_dancing:"🕺",man_facepalming:"🤦&zwj;♂️",man_factory_worker:"👨&zwj;🏭",man_farmer:"👨&zwj;🌾",man_firefighter:"👨&zwj;🚒",man_health_worker:"👨&zwj;⚕️",man_in_tuxedo:"🤵",man_judge:"👨&zwj;⚖️",man_juggling:"🤹&zwj;♂️",man_mechanic:"👨&zwj;🔧",man_office_worker:"👨&zwj;💼",man_pilot:"👨&zwj;✈️",man_playing_handball:"🤾&zwj;♂️",man_playing_water_polo:"🤽&zwj;♂️",man_scientist:"👨&zwj;🔬",man_shrugging:"🤷&zwj;♂️",man_singer:"👨&zwj;🎤",man_student:"👨&zwj;🎓",man_teacher:"👨&zwj;🏫",man_technologist:"👨&zwj;💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆&zwj;♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼&zwj;♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵&zwj;♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅&zwj;♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆&zwj;♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮&zwj;♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎&zwj;♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️&zwj;🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋&zwj;♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣&zwj;♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃&zwj;♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄&zwj;♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊&zwj;♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁&zwj;♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶&zwj;♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️&zwj;♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩&zwj;🎨",woman_astronaut:"👩&zwj;🚀",woman_cartwheeling:"🤸&zwj;♀️",woman_cook:"👩&zwj;🍳",woman_facepalming:"🤦&zwj;♀️",woman_factory_worker:"👩&zwj;🏭",woman_farmer:"👩&zwj;🌾",woman_firefighter:"👩&zwj;🚒",woman_health_worker:"👩&zwj;⚕️",woman_judge:"👩&zwj;⚖️",woman_juggling:"🤹&zwj;♀️",woman_mechanic:"👩&zwj;🔧",woman_office_worker:"👩&zwj;💼",woman_pilot:"👩&zwj;✈️",woman_playing_handball:"🤾&zwj;♀️",woman_playing_water_polo:"🤽&zwj;♀️",woman_scientist:"👩&zwj;🔬",woman_shrugging:"🤷&zwj;♀️",woman_singer:"👩&zwj;🎤",woman_student:"👩&zwj;🎓",woman_teacher:"👩&zwj;🏫",woman_technologist:"👩&zwj;💻",woman_with_turban:"👳&zwj;♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼&zwj;♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:`<span style="font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;">S</span>`},r.Converter=function(v){var w={},b=[],m=[],$={},A=d,C={parsed:{},raw:"",format:""};k();function k(){v=v||{};for(var P in s)s.hasOwnProperty(P)&&(w[P]=s[P]);if(typeof v=="object")for(var D in v)v.hasOwnProperty(D)&&(w[D]=v[D]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof v+" was passed instead.");w.extensions&&r.helper.forEach(w.extensions,I)}function I(P,D){if(D=D||null,r.helper.isString(P))if(P=r.helper.stdExtName(P),D=P,r.extensions[P]){console.warn("DEPRECATION WARNING: "+P+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),L(r.extensions[P],P);return}else if(!r.helper.isUndefined(o[P]))P=o[P];else throw Error('Extension "'+P+'" could not be loaded. It was either not found or is not a valid extension.');typeof P=="function"&&(P=P()),r.helper.isArray(P)||(P=[P]);var N=c(P,D);if(!N.valid)throw Error(N.error);for(var B=0;B<P.length;++B){switch(P[B].type){case"lang":b.push(P[B]);break;case"output":m.push(P[B]);break}if(P[B].hasOwnProperty("listeners"))for(var Z in P[B].listeners)P[B].listeners.hasOwnProperty(Z)&&T(Z,P[B].listeners[Z])}}function L(P,D){typeof P=="function"&&(P=P(new r.Converter)),r.helper.isArray(P)||(P=[P]);var N=c(P,D);if(!N.valid)throw Error(N.error);for(var B=0;B<P.length;++B)switch(P[B].type){case"lang":b.push(P[B]);break;case"output":m.push(P[B]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}function T(P,D){if(!r.helper.isString(P))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof P+" given");if(typeof D!="function")throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof D+" given");$.hasOwnProperty(P)||($[P]=[]),$[P].push(D)}function R(P){var D=P.match(/^\s*/)[0].length,N=new RegExp("^\\s{0,"+D+"}","gm");return P.replace(N,"")}this._dispatch=function(D,N,B,Z){if($.hasOwnProperty(D))for(var U=0;U<$[D].length;++U){var X=$[D][U](D,N,this,B,Z);X&&typeof X<"u"&&(N=X)}return N},this.listen=function(P,D){return T(P,D),this},this.makeHtml=function(P){if(!P)return P;var D={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:b,outputModifiers:m,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return P=P.replace(/¨/g,"¨T"),P=P.replace(/\$/g,"¨D"),P=P.replace(/\r\n/g,`
`),P=P.replace(/\r/g,`
`),P=P.replace(/\u00A0/g,"&nbsp;"),w.smartIndentationFix&&(P=R(P)),P=`
`+P+`
`,P=r.subParser("detab")(P,w,D),P=P.replace(/^[ \t]+$/mg,""),r.helper.forEach(b,function(N){P=r.subParser("runExtension")(N,P,w,D)}),P=r.subParser("metadata")(P,w,D),P=r.subParser("hashPreCodeTags")(P,w,D),P=r.subParser("githubCodeBlocks")(P,w,D),P=r.subParser("hashHTMLBlocks")(P,w,D),P=r.subParser("hashCodeTags")(P,w,D),P=r.subParser("stripLinkDefinitions")(P,w,D),P=r.subParser("blockGamut")(P,w,D),P=r.subParser("unhashHTMLSpans")(P,w,D),P=r.subParser("unescapeSpecialChars")(P,w,D),P=P.replace(/¨D/g,"$$"),P=P.replace(/¨T/g,"¨"),P=r.subParser("completeHTMLDocument")(P,w,D),r.helper.forEach(m,function(N){P=r.subParser("runExtension")(N,P,w,D)}),C=D.metadata,P},this.makeMarkdown=this.makeMd=function(P,D){if(P=P.replace(/\r\n/g,`
`),P=P.replace(/\r/g,`
`),P=P.replace(/>[ \t]+</,">¨NBSP;<"),!D)if(window&&window.document)D=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var N=D.createElement("div");N.innerHTML=P;var B={preList:q(N)};W(N);for(var Z=N.childNodes,U="",X=0;X<Z.length;X++)U+=r.subParser("makeMarkdown.node")(Z[X],B);function W(Q){for(var G=0;G<Q.childNodes.length;++G){var oe=Q.childNodes[G];oe.nodeType===3?!/\S/.test(oe.nodeValue)&&!/^[ ]+$/.test(oe.nodeValue)?(Q.removeChild(oe),--G):(oe.nodeValue=oe.nodeValue.split(`
`).join(" "),oe.nodeValue=oe.nodeValue.replace(/(\s)+/g,"$1")):oe.nodeType===1&&W(oe)}}function q(Q){for(var G=Q.querySelectorAll("pre"),oe=[],ne=0;ne<G.length;++ne)if(G[ne].childElementCount===1&&G[ne].firstChild.tagName.toLowerCase()==="code"){var ce=G[ne].firstChild.innerHTML.trim(),fe=G[ne].firstChild.getAttribute("data-language")||"";if(fe==="")for(var he=G[ne].firstChild.className.split(" "),me=0;me<he.length;++me){var Pe=he[me].match(/^language-(.+)$/);if(Pe!==null){fe=Pe[1];break}}ce=r.helper.unescapeHTMLEntities(ce),oe.push(ce),G[ne].outerHTML='<precode language="'+fe+'" precodenum="'+ne.toString()+'"></precode>'}else oe.push(G[ne].innerHTML),G[ne].innerHTML="",G[ne].setAttribute("prenum",ne.toString());return oe}return U},this.setOption=function(P,D){w[P]=D},this.getOption=function(P){return w[P]},this.getOptions=function(){return w},this.addExtension=function(P,D){D=D||null,I(P,D)},this.useExtension=function(P){I(P)},this.setFlavor=function(P){if(!a.hasOwnProperty(P))throw Error(P+" flavor was not found");var D=a[P];A=P;for(var N in D)D.hasOwnProperty(N)&&(w[N]=D[N])},this.getFlavor=function(){return A},this.removeExtension=function(P){r.helper.isArray(P)||(P=[P]);for(var D=0;D<P.length;++D){for(var N=P[D],B=0;B<b.length;++B)b[B]===N&&b.splice(B,1);for(var Z=0;Z<m.length;++Z)m[Z]===N&&m.splice(Z,1)}},this.getAllExtensions=function(){return{language:b,output:m}},this.getMetadata=function(P){return P?C.raw:C.parsed},this.getMetadataFormat=function(){return C.format},this._setMetadataPair=function(P,D){C.parsed[P]=D},this._setMetadataFormat=function(P){C.format=P},this._setMetadataRaw=function(P){C.raw=P}},r.subParser("anchors",function(v,w,b){v=b.converter._dispatch("anchors.before",v,w,b);var m=function($,A,C,k,I,L,T){if(r.helper.isUndefined(T)&&(T=""),C=C.toLowerCase(),$.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)k="";else if(!k)if(C||(C=A.toLowerCase().replace(/ ?\n/g," ")),k="#"+C,!r.helper.isUndefined(b.gUrls[C]))k=b.gUrls[C],r.helper.isUndefined(b.gTitles[C])||(T=b.gTitles[C]);else return $;k=k.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var R='<a href="'+k+'"';return T!==""&&T!==null&&(T=T.replace(/"/g,"&quot;"),T=T.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),R+=' title="'+T+'"'),w.openLinksInNewWindow&&!/^#/.test(k)&&(R+=' rel="noopener noreferrer" target="¨E95Eblank"'),R+=">"+A+"</a>",R};return v=v.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,m),v=v.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,m),v=v.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,m),v=v.replace(/\[([^\[\]]+)]()()()()()/g,m),w.ghMentions&&(v=v.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function($,A,C,k,I){if(C==="\\")return A+k;if(!r.helper.isString(w.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var L=w.ghMentionsLink.replace(/\{u}/g,I),T="";return w.openLinksInNewWindow&&(T=' rel="noopener noreferrer" target="¨E95Eblank"'),A+'<a href="'+L+'"'+T+">"+k+"</a>"})),v=b.converter._dispatch("anchors.after",v,w,b),v});var f=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,h=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,p=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,g=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,y=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,x=function(v){return function(w,b,m,$,A,C,k){m=m.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var I=m,L="",T="",R=b||"",P=k||"";return/^www\./i.test(m)&&(m=m.replace(/^www\./i,"http://www.")),v.excludeTrailingPunctuationFromURLs&&C&&(L=C),v.openLinksInNewWindow&&(T=' rel="noopener noreferrer" target="¨E95Eblank"'),R+'<a href="'+m+'"'+T+">"+I+"</a>"+L+P}},S=function(v,w){return function(b,m,$){var A="mailto:";return m=m||"",$=r.subParser("unescapeSpecialChars")($,v,w),v.encodeEmails?(A=r.helper.encodeEmailAddress(A+$),$=r.helper.encodeEmailAddress($)):A=A+$,m+'<a href="'+A+'">'+$+"</a>"}};r.subParser("autoLinks",function(v,w,b){return v=b.converter._dispatch("autoLinks.before",v,w,b),v=v.replace(p,x(w)),v=v.replace(y,S(w,b)),v=b.converter._dispatch("autoLinks.after",v,w,b),v}),r.subParser("simplifiedAutoLinks",function(v,w,b){return w.simplifiedAutoLink&&(v=b.converter._dispatch("simplifiedAutoLinks.before",v,w,b),w.excludeTrailingPunctuationFromURLs?v=v.replace(h,x(w)):v=v.replace(f,x(w)),v=v.replace(g,S(w,b)),v=b.converter._dispatch("simplifiedAutoLinks.after",v,w,b)),v}),r.subParser("blockGamut",function(v,w,b){return v=b.converter._dispatch("blockGamut.before",v,w,b),v=r.subParser("blockQuotes")(v,w,b),v=r.subParser("headers")(v,w,b),v=r.subParser("horizontalRule")(v,w,b),v=r.subParser("lists")(v,w,b),v=r.subParser("codeBlocks")(v,w,b),v=r.subParser("tables")(v,w,b),v=r.subParser("hashHTMLBlocks")(v,w,b),v=r.subParser("paragraphs")(v,w,b),v=b.converter._dispatch("blockGamut.after",v,w,b),v}),r.subParser("blockQuotes",function(v,w,b){v=b.converter._dispatch("blockQuotes.before",v,w,b),v=v+`
`;var m=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return w.splitAdjacentBlockquotes&&(m=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),v=v.replace(m,function($){return $=$.replace(/^[ \t]*>[ \t]?/gm,""),$=$.replace(/¨0/g,""),$=$.replace(/^[ \t]+$/gm,""),$=r.subParser("githubCodeBlocks")($,w,b),$=r.subParser("blockGamut")($,w,b),$=$.replace(/(^|\n)/g,"$1 "),$=$.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(A,C){var k=C;return k=k.replace(/^ /mg,"¨0"),k=k.replace(/¨0/g,""),k}),r.subParser("hashBlock")(`<blockquote>
`+$+`
</blockquote>`,w,b)}),v=b.converter._dispatch("blockQuotes.after",v,w,b),v}),r.subParser("codeBlocks",function(v,w,b){v=b.converter._dispatch("codeBlocks.before",v,w,b),v+="¨0";var m=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return v=v.replace(m,function($,A,C){var k=A,I=C,L=`
`;return k=r.subParser("outdent")(k,w,b),k=r.subParser("encodeCode")(k,w,b),k=r.subParser("detab")(k,w,b),k=k.replace(/^\n+/g,""),k=k.replace(/\n+$/g,""),w.omitExtraWLInCodeBlocks&&(L=""),k="<pre><code>"+k+L+"</code></pre>",r.subParser("hashBlock")(k,w,b)+I}),v=v.replace(/¨0/,""),v=b.converter._dispatch("codeBlocks.after",v,w,b),v}),r.subParser("codeSpans",function(v,w,b){return v=b.converter._dispatch("codeSpans.before",v,w,b),typeof v>"u"&&(v=""),v=v.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(m,$,A,C){var k=C;return k=k.replace(/^([ \t]*)/g,""),k=k.replace(/[ \t]*$/g,""),k=r.subParser("encodeCode")(k,w,b),k=$+"<code>"+k+"</code>",k=r.subParser("hashHTMLSpans")(k,w,b),k}),v=b.converter._dispatch("codeSpans.after",v,w,b),v}),r.subParser("completeHTMLDocument",function(v,w,b){if(!w.completeHTMLDocument)return v;v=b.converter._dispatch("completeHTMLDocument.before",v,w,b);var m="html",$=`<!DOCTYPE HTML>
`,A="",C=`<meta charset="utf-8">
`,k="",I="";typeof b.metadata.parsed.doctype<"u"&&($="<!DOCTYPE "+b.metadata.parsed.doctype+`>
`,m=b.metadata.parsed.doctype.toString().toLowerCase(),(m==="html"||m==="html5")&&(C='<meta charset="utf-8">'));for(var L in b.metadata.parsed)if(b.metadata.parsed.hasOwnProperty(L))switch(L.toLowerCase()){case"doctype":break;case"title":A="<title>"+b.metadata.parsed.title+`</title>
`;break;case"charset":m==="html"||m==="html5"?C='<meta charset="'+b.metadata.parsed.charset+`">
`:C='<meta name="charset" content="'+b.metadata.parsed.charset+`">
`;break;case"language":case"lang":k=' lang="'+b.metadata.parsed[L]+'"',I+='<meta name="'+L+'" content="'+b.metadata.parsed[L]+`">
`;break;default:I+='<meta name="'+L+'" content="'+b.metadata.parsed[L]+`">
`}return v=$+"<html"+k+`>
<head>
`+A+C+I+`</head>
<body>
`+v.trim()+`
</body>
</html>`,v=b.converter._dispatch("completeHTMLDocument.after",v,w,b),v}),r.subParser("detab",function(v,w,b){return v=b.converter._dispatch("detab.before",v,w,b),v=v.replace(/\t(?=\t)/g," "),v=v.replace(/\t/g,"¨A¨B"),v=v.replace(/¨B(.+?)¨A/g,function(m,$){for(var A=$,C=4-A.length%4,k=0;k<C;k++)A+=" ";return A}),v=v.replace(/¨A/g," "),v=v.replace(/¨B/g,""),v=b.converter._dispatch("detab.after",v,w,b),v}),r.subParser("ellipsis",function(v,w,b){return w.ellipsis&&(v=b.converter._dispatch("ellipsis.before",v,w,b),v=v.replace(/\.\.\./g,"…"),v=b.converter._dispatch("ellipsis.after",v,w,b)),v}),r.subParser("emoji",function(v,w,b){if(!w.emoji)return v;v=b.converter._dispatch("emoji.before",v,w,b);var m=/:([\S]+?):/g;return v=v.replace(m,function($,A){return r.helper.emojis.hasOwnProperty(A)?r.helper.emojis[A]:$}),v=b.converter._dispatch("emoji.after",v,w,b),v}),r.subParser("encodeAmpsAndAngles",function(v,w,b){return v=b.converter._dispatch("encodeAmpsAndAngles.before",v,w,b),v=v.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;"),v=v.replace(/<(?![a-z\/?$!])/gi,"&lt;"),v=v.replace(/</g,"&lt;"),v=v.replace(/>/g,"&gt;"),v=b.converter._dispatch("encodeAmpsAndAngles.after",v,w,b),v}),r.subParser("encodeBackslashEscapes",function(v,w,b){return v=b.converter._dispatch("encodeBackslashEscapes.before",v,w,b),v=v.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),v=v.replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,r.helper.escapeCharactersCallback),v=b.converter._dispatch("encodeBackslashEscapes.after",v,w,b),v}),r.subParser("encodeCode",function(v,w,b){return v=b.converter._dispatch("encodeCode.before",v,w,b),v=v.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),v=b.converter._dispatch("encodeCode.after",v,w,b),v}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(v,w,b){v=b.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",v,w,b);var m=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,$=/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return v=v.replace(m,function(A){return A.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),v=v.replace($,function(A){return A.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),v=b.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",v,w,b),v}),r.subParser("githubCodeBlocks",function(v,w,b){return w.ghCodeBlocks?(v=b.converter._dispatch("githubCodeBlocks.before",v,w,b),v+="¨0",v=v.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(m,$,A,C){var k=w.omitExtraWLInCodeBlocks?"":`
`;return C=r.subParser("encodeCode")(C,w,b),C=r.subParser("detab")(C,w,b),C=C.replace(/^\n+/g,""),C=C.replace(/\n+$/g,""),C="<pre><code"+(A?' class="'+A+" language-"+A+'"':"")+">"+C+k+"</code></pre>",C=r.subParser("hashBlock")(C,w,b),`
¨G`+(b.ghCodeBlocks.push({text:m,codeblock:C})-1)+`G
`}),v=v.replace(/¨0/,""),b.converter._dispatch("githubCodeBlocks.after",v,w,b)):v}),r.subParser("hashBlock",function(v,w,b){return v=b.converter._dispatch("hashBlock.before",v,w,b),v=v.replace(/(^\n+|\n+$)/g,""),v=`
¨K`+(b.gHtmlBlocks.push(v)-1)+`K
`,v=b.converter._dispatch("hashBlock.after",v,w,b),v}),r.subParser("hashCodeTags",function(v,w,b){v=b.converter._dispatch("hashCodeTags.before",v,w,b);var m=function($,A,C,k){var I=C+r.subParser("encodeCode")(A,w,b)+k;return"¨C"+(b.gHtmlSpans.push(I)-1)+"C"};return v=r.helper.replaceRecursiveRegExp(v,m,"<code\\b[^>]*>","</code>","gim"),v=b.converter._dispatch("hashCodeTags.after",v,w,b),v}),r.subParser("hashElement",function(v,w,b){return function(m,$){var A=$;return A=A.replace(/\n\n/g,`
`),A=A.replace(/^\n/,""),A=A.replace(/\n+$/g,""),A=`
¨K`+(b.gHtmlBlocks.push(A)-1)+`K
`,A}}),r.subParser("hashHTMLBlocks",function(v,w,b){v=b.converter._dispatch("hashHTMLBlocks.before",v,w,b);var m=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],$=function(P,D,N,B){var Z=P;return N.search(/\bmarkdown\b/)!==-1&&(Z=N+b.converter.makeHtml(D)+B),`
¨K`+(b.gHtmlBlocks.push(Z)-1)+`K
`};w.backslashEscapesHTMLTags&&(v=v.replace(/\\<(\/?[^>]+?)>/g,function(P,D){return"&lt;"+D+"&gt;"}));for(var A=0;A<m.length;++A)for(var C,k=new RegExp("^ {0,3}(<"+m[A]+"\\b[^>]*>)","im"),I="<"+m[A]+"\\b[^>]*>",L="</"+m[A]+">";(C=r.helper.regexIndexOf(v,k))!==-1;){var T=r.helper.splitAtIndex(v,C),R=r.helper.replaceRecursiveRegExp(T[1],$,I,L,"im");if(R===T[1])break;v=T[0].concat(R)}return v=v.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(v,w,b)),v=r.helper.replaceRecursiveRegExp(v,function(P){return`
¨K`+(b.gHtmlBlocks.push(P)-1)+`K
`},"^ {0,3}<!--","-->","gm"),v=v.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(v,w,b)),v=b.converter._dispatch("hashHTMLBlocks.after",v,w,b),v}),r.subParser("hashHTMLSpans",function(v,w,b){v=b.converter._dispatch("hashHTMLSpans.before",v,w,b);function m($){return"¨C"+(b.gHtmlSpans.push($)-1)+"C"}return v=v.replace(/<[^>]+?\/>/gi,function($){return m($)}),v=v.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function($){return m($)}),v=v.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function($){return m($)}),v=v.replace(/<[^>]+?>/gi,function($){return m($)}),v=b.converter._dispatch("hashHTMLSpans.after",v,w,b),v}),r.subParser("unhashHTMLSpans",function(v,w,b){v=b.converter._dispatch("unhashHTMLSpans.before",v,w,b);for(var m=0;m<b.gHtmlSpans.length;++m){for(var $=b.gHtmlSpans[m],A=0;/¨C(\d+)C/.test($);){var C=RegExp.$1;if($=$.replace("¨C"+C+"C",b.gHtmlSpans[C]),A===10){console.error("maximum nesting of 10 spans reached!!!");break}++A}v=v.replace("¨C"+m+"C",$)}return v=b.converter._dispatch("unhashHTMLSpans.after",v,w,b),v}),r.subParser("hashPreCodeTags",function(v,w,b){v=b.converter._dispatch("hashPreCodeTags.before",v,w,b);var m=function($,A,C,k){var I=C+r.subParser("encodeCode")(A,w,b)+k;return`
¨G`+(b.ghCodeBlocks.push({text:$,codeblock:I})-1)+`G
`};return v=r.helper.replaceRecursiveRegExp(v,m,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),v=b.converter._dispatch("hashPreCodeTags.after",v,w,b),v}),r.subParser("headers",function(v,w,b){v=b.converter._dispatch("headers.before",v,w,b);var m=isNaN(parseInt(w.headerLevelStart))?1:parseInt(w.headerLevelStart),$=w.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,A=w.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;v=v.replace($,function(I,L){var T=r.subParser("spanGamut")(L,w,b),R=w.noHeaderId?"":' id="'+k(L)+'"',P=m,D="<h"+P+R+">"+T+"</h"+P+">";return r.subParser("hashBlock")(D,w,b)}),v=v.replace(A,function(I,L){var T=r.subParser("spanGamut")(L,w,b),R=w.noHeaderId?"":' id="'+k(L)+'"',P=m+1,D="<h"+P+R+">"+T+"</h"+P+">";return r.subParser("hashBlock")(D,w,b)});var C=w.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;v=v.replace(C,function(I,L,T){var R=T;w.customizedHeaderId&&(R=T.replace(/\s?\{([^{]+?)}\s*$/,""));var P=r.subParser("spanGamut")(R,w,b),D=w.noHeaderId?"":' id="'+k(T)+'"',N=m-1+L.length,B="<h"+N+D+">"+P+"</h"+N+">";return r.subParser("hashBlock")(B,w,b)});function k(I){var L,T;if(w.customizedHeaderId){var R=I.match(/\{([^{]+?)}\s*$/);R&&R[1]&&(I=R[1])}return L=I,r.helper.isString(w.prefixHeaderId)?T=w.prefixHeaderId:w.prefixHeaderId===!0?T="section-":T="",w.rawPrefixHeaderId||(L=T+L),w.ghCompatibleHeaderId?L=L.replace(/ /g,"-").replace(/&amp;/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():w.rawHeaderId?L=L.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/¨T/g,"¨").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():L=L.replace(/[^\w]/g,"").toLowerCase(),w.rawPrefixHeaderId&&(L=T+L),b.hashLinkCounts[L]?L=L+"-"+b.hashLinkCounts[L]++:b.hashLinkCounts[L]=1,L}return v=b.converter._dispatch("headers.after",v,w,b),v}),r.subParser("horizontalRule",function(v,w,b){v=b.converter._dispatch("horizontalRule.before",v,w,b);var m=r.subParser("hashBlock")("<hr />",w,b);return v=v.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,m),v=v.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,m),v=v.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,m),v=b.converter._dispatch("horizontalRule.after",v,w,b),v}),r.subParser("images",function(v,w,b){v=b.converter._dispatch("images.before",v,w,b);var m=/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,$=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,A=/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,C=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,k=/!\[([^\[\]]+)]()()()()()/g;function I(T,R,P,D,N,B,Z,U){return D=D.replace(/\s/g,""),L(T,R,P,D,N,B,Z,U)}function L(T,R,P,D,N,B,Z,U){var X=b.gUrls,W=b.gTitles,q=b.gDimensions;if(P=P.toLowerCase(),U||(U=""),T.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)D="";else if(D===""||D===null)if((P===""||P===null)&&(P=R.toLowerCase().replace(/ ?\n/g," ")),D="#"+P,!r.helper.isUndefined(X[P]))D=X[P],r.helper.isUndefined(W[P])||(U=W[P]),r.helper.isUndefined(q[P])||(N=q[P].width,B=q[P].height);else return T;R=R.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),D=D.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var Q='<img src="'+D+'" alt="'+R+'"';return U&&r.helper.isString(U)&&(U=U.replace(/"/g,"&quot;").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),Q+=' title="'+U+'"'),N&&B&&(N=N==="*"?"auto":N,B=B==="*"?"auto":B,Q+=' width="'+N+'"',Q+=' height="'+B+'"'),Q+=" />",Q}return v=v.replace(C,L),v=v.replace(A,I),v=v.replace($,L),v=v.replace(m,L),v=v.replace(k,L),v=b.converter._dispatch("images.after",v,w,b),v}),r.subParser("italicsAndBold",function(v,w,b){v=b.converter._dispatch("italicsAndBold.before",v,w,b);function m($,A,C){return A+$+C}return w.literalMidWordUnderscores?(v=v.replace(/\b___(\S[\s\S]*?)___\b/g,function($,A){return m(A,"<strong><em>","</em></strong>")}),v=v.replace(/\b__(\S[\s\S]*?)__\b/g,function($,A){return m(A,"<strong>","</strong>")}),v=v.replace(/\b_(\S[\s\S]*?)_\b/g,function($,A){return m(A,"<em>","</em>")})):(v=v.replace(/___(\S[\s\S]*?)___/g,function($,A){return/\S$/.test(A)?m(A,"<strong><em>","</em></strong>"):$}),v=v.replace(/__(\S[\s\S]*?)__/g,function($,A){return/\S$/.test(A)?m(A,"<strong>","</strong>"):$}),v=v.replace(/_([^\s_][\s\S]*?)_/g,function($,A){return/\S$/.test(A)?m(A,"<em>","</em>"):$})),w.literalMidWordAsterisks?(v=v.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function($,A,C){return m(C,A+"<strong><em>","</em></strong>")}),v=v.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function($,A,C){return m(C,A+"<strong>","</strong>")}),v=v.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function($,A,C){return m(C,A+"<em>","</em>")})):(v=v.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function($,A){return/\S$/.test(A)?m(A,"<strong><em>","</em></strong>"):$}),v=v.replace(/\*\*(\S[\s\S]*?)\*\*/g,function($,A){return/\S$/.test(A)?m(A,"<strong>","</strong>"):$}),v=v.replace(/\*([^\s*][\s\S]*?)\*/g,function($,A){return/\S$/.test(A)?m(A,"<em>","</em>"):$})),v=b.converter._dispatch("italicsAndBold.after",v,w,b),v}),r.subParser("lists",function(v,w,b){function m(C,k){b.gListLevel++,C=C.replace(/\n{2,}$/,`
`),C+="¨0";var I=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,L=/\n[ \t]*\n(?!¨0)/.test(C);return w.disableForced4SpacesIndentedSublists&&(I=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),C=C.replace(I,function(T,R,P,D,N,B,Z){Z=Z&&Z.trim()!=="";var U=r.subParser("outdent")(N,w,b),X="";return B&&w.tasklists&&(X=' class="task-list-item" style="list-style-type: none;"',U=U.replace(/^[ \t]*\[(x|X| )?]/m,function(){var W='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return Z&&(W+=" checked"),W+=">",W})),U=U.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(W){return"¨A"+W}),R||U.search(/\n{2,}/)>-1?(U=r.subParser("githubCodeBlocks")(U,w,b),U=r.subParser("blockGamut")(U,w,b)):(U=r.subParser("lists")(U,w,b),U=U.replace(/\n$/,""),U=r.subParser("hashHTMLBlocks")(U,w,b),U=U.replace(/\n\n+/g,`
`),L?U=r.subParser("paragraphs")(U,w,b):U=r.subParser("spanGamut")(U,w,b)),U=U.replace("¨A",""),U="<li"+X+">"+U+`</li>
`,U}),C=C.replace(/¨0/g,""),b.gListLevel--,k&&(C=C.replace(/\s+$/,"")),C}function $(C,k){if(k==="ol"){var I=C.match(/^ *(\d+)\./);if(I&&I[1]!=="1")return' start="'+I[1]+'"'}return""}function A(C,k,I){var L=w.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,T=w.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,R=k==="ul"?L:T,P="";if(C.search(R)!==-1)(function N(B){var Z=B.search(R),U=$(C,k);Z!==-1?(P+=`
<`+k+U+`>
`+m(B.slice(0,Z),!!I)+"</"+k+`>
`,k=k==="ul"?"ol":"ul",R=k==="ul"?L:T,N(B.slice(Z))):P+=`
<`+k+U+`>
`+m(B,!!I)+"</"+k+`>
`})(C);else{var D=$(C,k);P=`
<`+k+D+`>
`+m(C,!!I)+"</"+k+`>
`}return P}return v=b.converter._dispatch("lists.before",v,w,b),v+="¨0",b.gListLevel?v=v.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,k,I){var L=I.search(/[*+-]/g)>-1?"ul":"ol";return A(k,L,!0)}):v=v.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(C,k,I,L){var T=L.search(/[*+-]/g)>-1?"ul":"ol";return A(I,T,!1)}),v=v.replace(/¨0/,""),v=b.converter._dispatch("lists.after",v,w,b),v}),r.subParser("metadata",function(v,w,b){if(!w.metadata)return v;v=b.converter._dispatch("metadata.before",v,w,b);function m($){b.metadata.raw=$,$=$.replace(/&/g,"&amp;").replace(/"/g,"&quot;"),$=$.replace(/\n {4}/g," "),$.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(A,C,k){return b.metadata.parsed[C]=k,""})}return v=v.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function($,A,C){return m(C),"¨M"}),v=v.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function($,A,C){return A&&(b.metadata.format=A),m(C),"¨M"}),v=v.replace(/¨M/g,""),v=b.converter._dispatch("metadata.after",v,w,b),v}),r.subParser("outdent",function(v,w,b){return v=b.converter._dispatch("outdent.before",v,w,b),v=v.replace(/^(\t|[ ]{1,4})/gm,"¨0"),v=v.replace(/¨0/g,""),v=b.converter._dispatch("outdent.after",v,w,b),v}),r.subParser("paragraphs",function(v,w,b){v=b.converter._dispatch("paragraphs.before",v,w,b),v=v.replace(/^\n+/g,""),v=v.replace(/\n+$/g,"");for(var m=v.split(/\n{2,}/g),$=[],A=m.length,C=0;C<A;C++){var k=m[C];k.search(/¨(K|G)(\d+)\1/g)>=0?$.push(k):k.search(/\S/)>=0&&(k=r.subParser("spanGamut")(k,w,b),k=k.replace(/^([ \t]*)/g,"<p>"),k+="</p>",$.push(k))}for(A=$.length,C=0;C<A;C++){for(var I="",L=$[C],T=!1;/¨(K|G)(\d+)\1/.test(L);){var R=RegExp.$1,P=RegExp.$2;R==="K"?I=b.gHtmlBlocks[P]:T?I=r.subParser("encodeCode")(b.ghCodeBlocks[P].text,w,b):I=b.ghCodeBlocks[P].codeblock,I=I.replace(/\$/g,"$$$$"),L=L.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,I),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(L)&&(T=!0)}$[C]=L}return v=$.join(`
`),v=v.replace(/^\n+/g,""),v=v.replace(/\n+$/g,""),b.converter._dispatch("paragraphs.after",v,w,b)}),r.subParser("runExtension",function(v,w,b,m){if(v.filter)w=v.filter(w,m.converter,b);else if(v.regex){var $=v.regex;$ instanceof RegExp||($=new RegExp($,"g")),w=w.replace($,v.replace)}return w}),r.subParser("spanGamut",function(v,w,b){return v=b.converter._dispatch("spanGamut.before",v,w,b),v=r.subParser("codeSpans")(v,w,b),v=r.subParser("escapeSpecialCharsWithinTagAttributes")(v,w,b),v=r.subParser("encodeBackslashEscapes")(v,w,b),v=r.subParser("images")(v,w,b),v=r.subParser("anchors")(v,w,b),v=r.subParser("autoLinks")(v,w,b),v=r.subParser("simplifiedAutoLinks")(v,w,b),v=r.subParser("emoji")(v,w,b),v=r.subParser("underline")(v,w,b),v=r.subParser("italicsAndBold")(v,w,b),v=r.subParser("strikethrough")(v,w,b),v=r.subParser("ellipsis")(v,w,b),v=r.subParser("hashHTMLSpans")(v,w,b),v=r.subParser("encodeAmpsAndAngles")(v,w,b),w.simpleLineBreaks?/\n\n¨K/.test(v)||(v=v.replace(/\n+/g,`<br />
`)):v=v.replace(/ +\n/g,`<br />
`),v=b.converter._dispatch("spanGamut.after",v,w,b),v}),r.subParser("strikethrough",function(v,w,b){function m($){return w.simplifiedAutoLink&&($=r.subParser("simplifiedAutoLinks")($,w,b)),"<del>"+$+"</del>"}return w.strikethrough&&(v=b.converter._dispatch("strikethrough.before",v,w,b),v=v.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function($,A){return m(A)}),v=b.converter._dispatch("strikethrough.after",v,w,b)),v}),r.subParser("stripLinkDefinitions",function(v,w,b){var m=/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,$=/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;v+="¨0";var A=function(C,k,I,L,T,R,P){return k=k.toLowerCase(),v.toLowerCase().split(k).length-1<2?C:(I.match(/^data:.+?\/.+?;base64,/)?b.gUrls[k]=I.replace(/\s/g,""):b.gUrls[k]=r.subParser("encodeAmpsAndAngles")(I,w,b),R?R+P:(P&&(b.gTitles[k]=P.replace(/"|'/g,"&quot;")),w.parseImgDimensions&&L&&T&&(b.gDimensions[k]={width:L,height:T}),""))};return v=v.replace($,A),v=v.replace(m,A),v=v.replace(/¨0/,""),v}),r.subParser("tables",function(v,w,b){if(!w.tables)return v;var m=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,$=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function A(T){return/^:[ \t]*--*$/.test(T)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(T)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(T)?' style="text-align:center;"':""}function C(T,R){var P="";return T=T.trim(),(w.tablesHeaderId||w.tableHeaderId)&&(P=' id="'+T.replace(/ /g,"_").toLowerCase()+'"'),T=r.subParser("spanGamut")(T,w,b),"<th"+P+R+">"+T+`</th>
`}function k(T,R){var P=r.subParser("spanGamut")(T,w,b);return"<td"+R+">"+P+`</td>
`}function I(T,R){for(var P=`<table>
<thead>
<tr>
`,D=T.length,N=0;N<D;++N)P+=T[N];for(P+=`</tr>
</thead>
<tbody>
`,N=0;N<R.length;++N){P+=`<tr>
`;for(var B=0;B<D;++B)P+=R[N][B];P+=`</tr>
`}return P+=`</tbody>
</table>
`,P}function L(T){var R,P=T.split(`
`);for(R=0;R<P.length;++R)/^ {0,3}\|/.test(P[R])&&(P[R]=P[R].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(P[R])&&(P[R]=P[R].replace(/\|[ \t]*$/,"")),P[R]=r.subParser("codeSpans")(P[R],w,b);var D=P[0].split("|").map(function(Q){return Q.trim()}),N=P[1].split("|").map(function(Q){return Q.trim()}),B=[],Z=[],U=[],X=[];for(P.shift(),P.shift(),R=0;R<P.length;++R)P[R].trim()!==""&&B.push(P[R].split("|").map(function(Q){return Q.trim()}));if(D.length<N.length)return T;for(R=0;R<N.length;++R)U.push(A(N[R]));for(R=0;R<D.length;++R)r.helper.isUndefined(U[R])&&(U[R]=""),Z.push(C(D[R],U[R]));for(R=0;R<B.length;++R){for(var W=[],q=0;q<Z.length;++q)r.helper.isUndefined(B[R][q]),W.push(k(B[R][q],U[q]));X.push(W)}return I(Z,X)}return v=b.converter._dispatch("tables.before",v,w,b),v=v.replace(/\\(\|)/g,r.helper.escapeCharactersCallback),v=v.replace(m,L),v=v.replace($,L),v=b.converter._dispatch("tables.after",v,w,b),v}),r.subParser("underline",function(v,w,b){return w.underline&&(v=b.converter._dispatch("underline.before",v,w,b),w.literalMidWordUnderscores?(v=v.replace(/\b___(\S[\s\S]*?)___\b/g,function(m,$){return"<u>"+$+"</u>"}),v=v.replace(/\b__(\S[\s\S]*?)__\b/g,function(m,$){return"<u>"+$+"</u>"})):(v=v.replace(/___(\S[\s\S]*?)___/g,function(m,$){return/\S$/.test($)?"<u>"+$+"</u>":m}),v=v.replace(/__(\S[\s\S]*?)__/g,function(m,$){return/\S$/.test($)?"<u>"+$+"</u>":m})),v=v.replace(/(_)/g,r.helper.escapeCharactersCallback),v=b.converter._dispatch("underline.after",v,w,b)),v}),r.subParser("unescapeSpecialChars",function(v,w,b){return v=b.converter._dispatch("unescapeSpecialChars.before",v,w,b),v=v.replace(/¨E(\d+)E/g,function(m,$){var A=parseInt($);return String.fromCharCode(A)}),v=b.converter._dispatch("unescapeSpecialChars.after",v,w,b),v}),r.subParser("makeMarkdown.blockquote",function(v,w){var b="";if(v.hasChildNodes())for(var m=v.childNodes,$=m.length,A=0;A<$;++A){var C=r.subParser("makeMarkdown.node")(m[A],w);C!==""&&(b+=C)}return b=b.trim(),b="> "+b.split(`
`).join(`
> `),b}),r.subParser("makeMarkdown.codeBlock",function(v,w){var b=v.getAttribute("language"),m=v.getAttribute("precodenum");return"```"+b+`
`+w.preList[m]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(v){return"`"+v.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(v,w){var b="";if(v.hasChildNodes()){b+="*";for(var m=v.childNodes,$=m.length,A=0;A<$;++A)b+=r.subParser("makeMarkdown.node")(m[A],w);b+="*"}return b}),r.subParser("makeMarkdown.header",function(v,w,b){var m=new Array(b+1).join("#"),$="";if(v.hasChildNodes()){$=m+" ";for(var A=v.childNodes,C=A.length,k=0;k<C;++k)$+=r.subParser("makeMarkdown.node")(A[k],w)}return $}),r.subParser("makeMarkdown.hr",function(){return"---"}),r.subParser("makeMarkdown.image",function(v){var w="";return v.hasAttribute("src")&&(w+="!["+v.getAttribute("alt")+"](",w+="<"+v.getAttribute("src")+">",v.hasAttribute("width")&&v.hasAttribute("height")&&(w+=" ="+v.getAttribute("width")+"x"+v.getAttribute("height")),v.hasAttribute("title")&&(w+=' "'+v.getAttribute("title")+'"'),w+=")"),w}),r.subParser("makeMarkdown.links",function(v,w){var b="";if(v.hasChildNodes()&&v.hasAttribute("href")){var m=v.childNodes,$=m.length;b="[";for(var A=0;A<$;++A)b+=r.subParser("makeMarkdown.node")(m[A],w);b+="](",b+="<"+v.getAttribute("href")+">",v.hasAttribute("title")&&(b+=' "'+v.getAttribute("title")+'"'),b+=")"}return b}),r.subParser("makeMarkdown.list",function(v,w,b){var m="";if(!v.hasChildNodes())return"";for(var $=v.childNodes,A=$.length,C=v.getAttribute("start")||1,k=0;k<A;++k)if(!(typeof $[k].tagName>"u"||$[k].tagName.toLowerCase()!=="li")){var I="";b==="ol"?I=C.toString()+". ":I="- ",m+=I+r.subParser("makeMarkdown.listItem")($[k],w),++C}return m+=`
<!-- -->
`,m.trim()}),r.subParser("makeMarkdown.listItem",function(v,w){for(var b="",m=v.childNodes,$=m.length,A=0;A<$;++A)b+=r.subParser("makeMarkdown.node")(m[A],w);return/\n$/.test(b)?b=b.split(`
`).join(`
`).replace(/^ {4}$/gm,"").replace(/\n\n+/g,`
`):b+=`
`,b}),r.subParser("makeMarkdown.node",function(v,w,b){b=b||!1;var m="";if(v.nodeType===3)return r.subParser("makeMarkdown.txt")(v,w);if(v.nodeType===8)return"<!--"+v.data+`-->
`;if(v.nodeType!==1)return"";var $=v.tagName.toLowerCase();switch($){case"h1":b||(m=r.subParser("makeMarkdown.header")(v,w,1)+`
`);break;case"h2":b||(m=r.subParser("makeMarkdown.header")(v,w,2)+`
`);break;case"h3":b||(m=r.subParser("makeMarkdown.header")(v,w,3)+`
`);break;case"h4":b||(m=r.subParser("makeMarkdown.header")(v,w,4)+`
`);break;case"h5":b||(m=r.subParser("makeMarkdown.header")(v,w,5)+`
`);break;case"h6":b||(m=r.subParser("makeMarkdown.header")(v,w,6)+`
`);break;case"p":b||(m=r.subParser("makeMarkdown.paragraph")(v,w)+`
`);break;case"blockquote":b||(m=r.subParser("makeMarkdown.blockquote")(v,w)+`
`);break;case"hr":b||(m=r.subParser("makeMarkdown.hr")(v,w)+`
`);break;case"ol":b||(m=r.subParser("makeMarkdown.list")(v,w,"ol")+`
`);break;case"ul":b||(m=r.subParser("makeMarkdown.list")(v,w,"ul")+`
`);break;case"precode":b||(m=r.subParser("makeMarkdown.codeBlock")(v,w)+`
`);break;case"pre":b||(m=r.subParser("makeMarkdown.pre")(v,w)+`
`);break;case"table":b||(m=r.subParser("makeMarkdown.table")(v,w)+`
`);break;case"code":m=r.subParser("makeMarkdown.codeSpan")(v,w);break;case"em":case"i":m=r.subParser("makeMarkdown.emphasis")(v,w);break;case"strong":case"b":m=r.subParser("makeMarkdown.strong")(v,w);break;case"del":m=r.subParser("makeMarkdown.strikethrough")(v,w);break;case"a":m=r.subParser("makeMarkdown.links")(v,w);break;case"img":m=r.subParser("makeMarkdown.image")(v,w);break;default:m=v.outerHTML+`
`}return m}),r.subParser("makeMarkdown.paragraph",function(v,w){var b="";if(v.hasChildNodes())for(var m=v.childNodes,$=m.length,A=0;A<$;++A)b+=r.subParser("makeMarkdown.node")(m[A],w);return b=b.trim(),b}),r.subParser("makeMarkdown.pre",function(v,w){var b=v.getAttribute("prenum");return"<pre>"+w.preList[b]+"</pre>"}),r.subParser("makeMarkdown.strikethrough",function(v,w){var b="";if(v.hasChildNodes()){b+="~~";for(var m=v.childNodes,$=m.length,A=0;A<$;++A)b+=r.subParser("makeMarkdown.node")(m[A],w);b+="~~"}return b}),r.subParser("makeMarkdown.strong",function(v,w){var b="";if(v.hasChildNodes()){b+="**";for(var m=v.childNodes,$=m.length,A=0;A<$;++A)b+=r.subParser("makeMarkdown.node")(m[A],w);b+="**"}return b}),r.subParser("makeMarkdown.table",function(v,w){var b="",m=[[],[]],$=v.querySelectorAll("thead>tr>th"),A=v.querySelectorAll("tbody>tr"),C,k;for(C=0;C<$.length;++C){var I=r.subParser("makeMarkdown.tableCell")($[C],w),L="---";if($[C].hasAttribute("style")){var T=$[C].getAttribute("style").toLowerCase().replace(/\s/g,"");switch(T){case"text-align:left;":L=":---";break;case"text-align:right;":L="---:";break;case"text-align:center;":L=":---:";break}}m[0][C]=I.trim(),m[1][C]=L}for(C=0;C<A.length;++C){var R=m.push([])-1,P=A[C].getElementsByTagName("td");for(k=0;k<$.length;++k){var D=" ";typeof P[k]<"u"&&(D=r.subParser("makeMarkdown.tableCell")(P[k],w)),m[R].push(D)}}var N=3;for(C=0;C<m.length;++C)for(k=0;k<m[C].length;++k){var B=m[C][k].length;B>N&&(N=B)}for(C=0;C<m.length;++C){for(k=0;k<m[C].length;++k)C===1?m[C][k].slice(-1)===":"?m[C][k]=r.helper.padEnd(m[C][k].slice(-1),N-1,"-")+":":m[C][k]=r.helper.padEnd(m[C][k],N,"-"):m[C][k]=r.helper.padEnd(m[C][k],N);b+="| "+m[C].join(" | ")+` |
`}return b.trim()}),r.subParser("makeMarkdown.tableCell",function(v,w){var b="";if(!v.hasChildNodes())return"";for(var m=v.childNodes,$=m.length,A=0;A<$;++A)b+=r.subParser("makeMarkdown.node")(m[A],w,!0);return b.trim()}),r.subParser("makeMarkdown.txt",function(v){var w=v.nodeValue;return w=w.replace(/ +/g," "),w=w.replace(/¨NBSP;/g," "),w=r.helper.unescapeHTMLEntities(w),w=w.replace(/([*_~|`])/g,"\\$1"),w=w.replace(/^(\s*)>/g,"\\$1>"),w=w.replace(/^#/gm,"\\#"),w=w.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),w=w.replace(/^( {0,3}\d+)\./gm,"$1\\."),w=w.replace(/^( {0,3})([+-])/gm,"$1\\$2"),w=w.replace(/]([\s]*)\(/g,"\\]$1\\("),w=w.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),w});var E=this;e.exports?e.exports=r:E.showdown=r}).call(Ue)})(a2);var PR=a2.exports;const IR=ki(PR);var s2={exports:{}};/*!
* jQuery JavaScript Library v3.7.0
* https://jquery.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2023-05-11T18:29Z
*/(function(e){(function(t,n){e.exports=t.document?n(t,!0):function(r){if(!r.document)throw new Error("jQuery requires a window with a document");return n(r)}})(typeof window<"u"?window:Ue,function(t,n){var r=[],i=Object.getPrototypeOf,o=r.slice,s=r.flat?function(_){return r.flat.call(_)}:function(_){return r.concat.apply([],_)},d=r.push,a=r.indexOf,c={},u=c.toString,l=c.hasOwnProperty,f=l.toString,h=f.call(Object),p={},g=function(M){return typeof M=="function"&&typeof M.nodeType!="number"&&typeof M.item!="function"},y=function(M){return M!=null&&M===M.window},x=t.document,S={type:!0,src:!0,nonce:!0,noModule:!0};function E(_,M,O){O=O||x;var z,H,V=O.createElement("script");if(V.text=_,M)for(z in S)H=M[z]||M.getAttribute&&M.getAttribute(z),H&&V.setAttribute(z,H);O.head.appendChild(V).parentNode.removeChild(V)}function v(_){return _==null?_+"":typeof _=="object"||typeof _=="function"?c[u.call(_)]||"object":typeof _}var w="3.7.0",b=/HTML$/i,m=function(_,M){return new m.fn.init(_,M)};m.fn=m.prototype={jquery:w,constructor:m,length:0,toArray:function(){return o.call(this)},get:function(_){return _==null?o.call(this):_<0?this[_+this.length]:this[_]},pushStack:function(_){var M=m.merge(this.constructor(),_);return M.prevObject=this,M},each:function(_){return m.each(this,_)},map:function(_){return this.pushStack(m.map(this,function(M,O){return _.call(M,O,M)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(m.grep(this,function(_,M){return(M+1)%2}))},odd:function(){return this.pushStack(m.grep(this,function(_,M){return M%2}))},eq:function(_){var M=this.length,O=+_+(_<0?M:0);return this.pushStack(O>=0&&O<M?[this[O]]:[])},end:function(){return this.prevObject||this.constructor()},push:d,sort:r.sort,splice:r.splice},m.extend=m.fn.extend=function(){var _,M,O,z,H,V,Y=arguments[0]||{},ie=1,re=arguments.length,ue=!1;for(typeof Y=="boolean"&&(ue=Y,Y=arguments[ie]||{},ie++),typeof Y!="object"&&!g(Y)&&(Y={}),ie===re&&(Y=this,ie--);ie<re;ie++)if((_=arguments[ie])!=null)for(M in _)z=_[M],!(M==="__proto__"||Y===z)&&(ue&&z&&(m.isPlainObject(z)||(H=Array.isArray(z)))?(O=Y[M],H&&!Array.isArray(O)?V=[]:!H&&!m.isPlainObject(O)?V={}:V=O,H=!1,Y[M]=m.extend(ue,V,z)):z!==void 0&&(Y[M]=z));return Y},m.extend({expando:"jQuery"+(w+Math.random()).replace(/\D/g,""),isReady:!0,error:function(_){throw new Error(_)},noop:function(){},isPlainObject:function(_){var M,O;return!_||u.call(_)!=="[object Object]"?!1:(M=i(_),M?(O=l.call(M,"constructor")&&M.constructor,typeof O=="function"&&f.call(O)===h):!0)},isEmptyObject:function(_){var M;for(M in _)return!1;return!0},globalEval:function(_,M,O){E(_,{nonce:M&&M.nonce},O)},each:function(_,M){var O,z=0;if($(_))for(O=_.length;z<O&&M.call(_[z],z,_[z])!==!1;z++);else for(z in _)if(M.call(_[z],z,_[z])===!1)break;return _},text:function(_){var M,O="",z=0,H=_.nodeType;if(H){if(H===1||H===9||H===11)return _.textContent;if(H===3||H===4)return _.nodeValue}else for(;M=_[z++];)O+=m.text(M);return O},makeArray:function(_,M){var O=M||[];return _!=null&&($(Object(_))?m.merge(O,typeof _=="string"?[_]:_):d.call(O,_)),O},inArray:function(_,M,O){return M==null?-1:a.call(M,_,O)},isXMLDoc:function(_){var M=_&&_.namespaceURI,O=_&&(_.ownerDocument||_).documentElement;return!b.test(M||O&&O.nodeName||"HTML")},merge:function(_,M){for(var O=+M.length,z=0,H=_.length;z<O;z++)_[H++]=M[z];return _.length=H,_},grep:function(_,M,O){for(var z,H=[],V=0,Y=_.length,ie=!O;V<Y;V++)z=!M(_[V],V),z!==ie&&H.push(_[V]);return H},map:function(_,M,O){var z,H,V=0,Y=[];if($(_))for(z=_.length;V<z;V++)H=M(_[V],V,O),H!=null&&Y.push(H);else for(V in _)H=M(_[V],V,O),H!=null&&Y.push(H);return s(Y)},guid:1,support:p}),typeof Symbol=="function"&&(m.fn[Symbol.iterator]=r[Symbol.iterator]),m.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(_,M){c["[object "+M+"]"]=M.toLowerCase()});function $(_){var M=!!_&&"length"in _&&_.length,O=v(_);return g(_)||y(_)?!1:O==="array"||M===0||typeof M=="number"&&M>0&&M-1 in _}function A(_,M){return _.nodeName&&_.nodeName.toLowerCase()===M.toLowerCase()}var C=r.pop,k=r.sort,I=r.splice,L="[\\x20\\t\\r\\n\\f]",T=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g");m.contains=function(_,M){var O=M&&M.parentNode;return _===O||!!(O&&O.nodeType===1&&(_.contains?_.contains(O):_.compareDocumentPosition&&_.compareDocumentPosition(O)&16))};var R=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function P(_,M){return M?_==="\0"?"<22>":_.slice(0,-1)+"\\"+_.charCodeAt(_.length-1).toString(16)+" ":"\\"+_}m.escapeSelector=function(_){return(_+"").replace(R,P)};var D=x,N=d;(function(){var _,M,O,z,H,V=N,Y,ie,re,ue,we,Ce=m.expando,ge=0,$e=0,st=ff(),St=ff(),dt=ff(),Tn=ff(),gn=function(J,ae){return J===ae&&(H=!0),0},Ri="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",Pi="(?:\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",yt="\\["+L+"*("+Pi+")(?:"+L+"*([*^$|!~]?=)"+L+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+Pi+"))|)"+L+"*\\]",os=":("+Pi+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+yt+")*)|.*)\\)|)",_t=new RegExp(L+"+","g"),en=new RegExp("^"+L+"*,"+L+"*"),Ju=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),Rm=new RegExp(L+"|>"),Ii=new RegExp(os),ec=new RegExp("^"+Pi+"$"),Oi={ID:new RegExp("^#("+Pi+")"),CLASS:new RegExp("^\\.("+Pi+")"),TAG:new RegExp("^("+Pi+"|[*])"),ATTR:new RegExp("^"+yt),PSEUDO:new RegExp("^"+os),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+Ri+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},ta=/^(?:input|select|textarea|button)$/i,na=/^h\d$/i,Vr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Pm=/[+~]/,po=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),go=function(J,ae){var pe="0x"+J.slice(1)-65536;return ae||(pe<0?String.fromCharCode(pe+65536):String.fromCharCode(pe>>10|55296,pe&1023|56320))},xR=function(){ra()},_R=gf(function(J){return J.disabled===!0&&A(J,"fieldset")},{dir:"parentNode",next:"legend"});function CR(){try{return Y.activeElement}catch{}}try{V.apply(r=o.call(D.childNodes),D.childNodes),r[D.childNodes.length].nodeType}catch{V={apply:function(ae,pe){N.apply(ae,o.call(pe))},call:function(ae){N.apply(ae,o.call(arguments,1))}}}function Nt(J,ae,pe,ye){var _e,Me,Ie,He,Oe,gt,rt,ut=ae&&ae.ownerDocument,mt=ae?ae.nodeType:9;if(pe=pe||[],typeof J!="string"||!J||mt!==1&&mt!==9&&mt!==11)return pe;if(!ye&&(ra(ae),ae=ae||Y,re)){if(mt!==11&&(Oe=Vr.exec(J)))if(_e=Oe[1]){if(mt===9)if(Ie=ae.getElementById(_e)){if(Ie.id===_e)return V.call(pe,Ie),pe}else return pe;else if(ut&&(Ie=ut.getElementById(_e))&&Nt.contains(ae,Ie)&&Ie.id===_e)return V.call(pe,Ie),pe}else{if(Oe[2])return V.apply(pe,ae.getElementsByTagName(J)),pe;if((_e=Oe[3])&&ae.getElementsByClassName)return V.apply(pe,ae.getElementsByClassName(_e)),pe}if(!Tn[J+" "]&&(!ue||!ue.test(J))){if(rt=J,ut=ae,mt===1&&(Rm.test(J)||Ju.test(J))){for(ut=Pm.test(J)&&Im(ae.parentNode)||ae,(ut!=ae||!p.scope)&&((He=ae.getAttribute("id"))?He=m.escapeSelector(He):ae.setAttribute("id",He=Ce)),gt=hf(J),Me=gt.length;Me--;)gt[Me]=(He?"#"+He:":scope")+" "+pf(gt[Me]);rt=gt.join(",")}try{return V.apply(pe,ut.querySelectorAll(rt)),pe}catch{Tn(J,!0)}finally{He===Ce&&ae.removeAttribute("id")}}}return rS(J.replace(T,"$1"),ae,pe,ye)}function ff(){var J=[];function ae(pe,ye){return J.push(pe+" ")>M.cacheLength&&delete ae[J.shift()],ae[pe+" "]=ye}return ae}function fi(J){return J[Ce]=!0,J}function yl(J){var ae=Y.createElement("fieldset");try{return!!J(ae)}catch{return!1}finally{ae.parentNode&&ae.parentNode.removeChild(ae),ae=null}}function kR(J){return function(ae){return A(ae,"input")&&ae.type===J}}function ER(J){return function(ae){return(A(ae,"input")||A(ae,"button"))&&ae.type===J}}function tS(J){return function(ae){return"form"in ae?ae.parentNode&&ae.disabled===!1?"label"in ae?"label"in ae.parentNode?ae.parentNode.disabled===J:ae.disabled===J:ae.isDisabled===J||ae.isDisabled!==!J&&_R(ae)===J:ae.disabled===J:"label"in ae?ae.disabled===J:!1}}function as(J){return fi(function(ae){return ae=+ae,fi(function(pe,ye){for(var _e,Me=J([],pe.length,ae),Ie=Me.length;Ie--;)pe[_e=Me[Ie]]&&(pe[_e]=!(ye[_e]=pe[_e]))})})}function Im(J){return J&&typeof J.getElementsByTagName<"u"&&J}function ra(J){var ae,pe=J?J.ownerDocument||J:D;return pe==Y||pe.nodeType!==9||!pe.documentElement||(Y=pe,ie=Y.documentElement,re=!m.isXMLDoc(Y),we=ie.matches||ie.webkitMatchesSelector||ie.msMatchesSelector,D!=Y&&(ae=Y.defaultView)&&ae.top!==ae&&ae.addEventListener("unload",xR),p.getById=yl(function(ye){return ie.appendChild(ye).id=m.expando,!Y.getElementsByName||!Y.getElementsByName(m.expando).length}),p.disconnectedMatch=yl(function(ye){return we.call(ye,"*")}),p.scope=yl(function(){return Y.querySelectorAll(":scope")}),p.cssHas=yl(function(){try{return Y.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),p.getById?(M.filter.ID=function(ye){var _e=ye.replace(po,go);return function(Me){return Me.getAttribute("id")===_e}},M.find.ID=function(ye,_e){if(typeof _e.getElementById<"u"&&re){var Me=_e.getElementById(ye);return Me?[Me]:[]}}):(M.filter.ID=function(ye){var _e=ye.replace(po,go);return function(Me){var Ie=typeof Me.getAttributeNode<"u"&&Me.getAttributeNode("id");return Ie&&Ie.value===_e}},M.find.ID=function(ye,_e){if(typeof _e.getElementById<"u"&&re){var Me,Ie,He,Oe=_e.getElementById(ye);if(Oe){if(Me=Oe.getAttributeNode("id"),Me&&Me.value===ye)return[Oe];for(He=_e.getElementsByName(ye),Ie=0;Oe=He[Ie++];)if(Me=Oe.getAttributeNode("id"),Me&&Me.value===ye)return[Oe]}return[]}}),M.find.TAG=function(ye,_e){return typeof _e.getElementsByTagName<"u"?_e.getElementsByTagName(ye):_e.querySelectorAll(ye)},M.find.CLASS=function(ye,_e){if(typeof _e.getElementsByClassName<"u"&&re)return _e.getElementsByClassName(ye)},ue=[],yl(function(ye){var _e;ie.appendChild(ye).innerHTML="<a id='"+Ce+"' href='' disabled='disabled'></a><select id='"+Ce+"-\r\\' disabled='disabled'><option selected=''></option></select>",ye.querySelectorAll("[selected]").length||ue.push("\\["+L+"*(?:value|"+Ri+")"),ye.querySelectorAll("[id~="+Ce+"-]").length||ue.push("~="),ye.querySelectorAll("a#"+Ce+"+*").length||ue.push(".#.+[+~]"),ye.querySelectorAll(":checked").length||ue.push(":checked"),_e=Y.createElement("input"),_e.setAttribute("type","hidden"),ye.appendChild(_e).setAttribute("name","D"),ie.appendChild(ye).disabled=!0,ye.querySelectorAll(":disabled").length!==2&&ue.push(":enabled",":disabled"),_e=Y.createElement("input"),_e.setAttribute("name",""),ye.appendChild(_e),ye.querySelectorAll("[name='']").length||ue.push("\\["+L+"*name"+L+"*="+L+`*(?:''|"")`)}),p.cssHas||ue.push(":has"),ue=ue.length&&new RegExp(ue.join("|")),gn=function(ye,_e){if(ye===_e)return H=!0,0;var Me=!ye.compareDocumentPosition-!_e.compareDocumentPosition;return Me||(Me=(ye.ownerDocument||ye)==(_e.ownerDocument||_e)?ye.compareDocumentPosition(_e):1,Me&1||!p.sortDetached&&_e.compareDocumentPosition(ye)===Me?ye===Y||ye.ownerDocument==D&&Nt.contains(D,ye)?-1:_e===Y||_e.ownerDocument==D&&Nt.contains(D,_e)?1:z?a.call(z,ye)-a.call(z,_e):0:Me&4?-1:1)}),Y}Nt.matches=function(J,ae){return Nt(J,null,null,ae)},Nt.matchesSelector=function(J,ae){if(ra(J),re&&!Tn[ae+" "]&&(!ue||!ue.test(ae)))try{var pe=we.call(J,ae);if(pe||p.disconnectedMatch||J.document&&J.document.nodeType!==11)return pe}catch{Tn(ae,!0)}return Nt(ae,Y,null,[J]).length>0},Nt.contains=function(J,ae){return(J.ownerDocument||J)!=Y&&ra(J),m.contains(J,ae)},Nt.attr=function(J,ae){(J.ownerDocument||J)!=Y&&ra(J);var pe=M.attrHandle[ae.toLowerCase()],ye=pe&&l.call(M.attrHandle,ae.toLowerCase())?pe(J,ae,!re):void 0;return ye!==void 0?ye:J.getAttribute(ae)},Nt.error=function(J){throw new Error("Syntax error, unrecognized expression: "+J)},m.uniqueSort=function(J){var ae,pe=[],ye=0,_e=0;if(H=!p.sortStable,z=!p.sortStable&&o.call(J,0),k.call(J,gn),H){for(;ae=J[_e++];)ae===J[_e]&&(ye=pe.push(_e));for(;ye--;)I.call(J,pe[ye],1)}return z=null,J},m.fn.uniqueSort=function(){return this.pushStack(m.uniqueSort(o.apply(this)))},M=m.expr={cacheLength:50,createPseudo:fi,match:Oi,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(J){return J[1]=J[1].replace(po,go),J[3]=(J[3]||J[4]||J[5]||"").replace(po,go),J[2]==="~="&&(J[3]=" "+J[3]+" "),J.slice(0,4)},CHILD:function(J){return J[1]=J[1].toLowerCase(),J[1].slice(0,3)==="nth"?(J[3]||Nt.error(J[0]),J[4]=+(J[4]?J[5]+(J[6]||1):2*(J[3]==="even"||J[3]==="odd")),J[5]=+(J[7]+J[8]||J[3]==="odd")):J[3]&&Nt.error(J[0]),J},PSEUDO:function(J){var ae,pe=!J[6]&&J[2];return Oi.CHILD.test(J[0])?null:(J[3]?J[2]=J[4]||J[5]||"":pe&&Ii.test(pe)&&(ae=hf(pe,!0))&&(ae=pe.indexOf(")",pe.length-ae)-pe.length)&&(J[0]=J[0].slice(0,ae),J[2]=pe.slice(0,ae)),J.slice(0,3))}},filter:{TAG:function(J){var ae=J.replace(po,go).toLowerCase();return J==="*"?function(){return!0}:function(pe){return A(pe,ae)}},CLASS:function(J){var ae=st[J+" "];return ae||(ae=new RegExp("(^|"+L+")"+J+"("+L+"|$)"))&&st(J,function(pe){return ae.test(typeof pe.className=="string"&&pe.className||typeof pe.getAttribute<"u"&&pe.getAttribute("class")||"")})},ATTR:function(J,ae,pe){return function(ye){var _e=Nt.attr(ye,J);return _e==null?ae==="!=":ae?(_e+="",ae==="="?_e===pe:ae==="!="?_e!==pe:ae==="^="?pe&&_e.indexOf(pe)===0:ae==="*="?pe&&_e.indexOf(pe)>-1:ae==="$="?pe&&_e.slice(-pe.length)===pe:ae==="~="?(" "+_e.replace(_t," ")+" ").indexOf(pe)>-1:ae==="|="?_e===pe||_e.slice(0,pe.length+1)===pe+"-":!1):!0}},CHILD:function(J,ae,pe,ye,_e){var Me=J.slice(0,3)!=="nth",Ie=J.slice(-4)!=="last",He=ae==="of-type";return ye===1&&_e===0?function(Oe){return!!Oe.parentNode}:function(Oe,gt,rt){var ut,mt,Ye,jt,sr,Bn=Me!==Ie?"nextSibling":"previousSibling",Wr=Oe.parentNode,Fi=He&&Oe.nodeName.toLowerCase(),bl=!rt&&!He,qn=!1;if(Wr){if(Me){for(;Bn;){for(Ye=Oe;Ye=Ye[Bn];)if(He?A(Ye,Fi):Ye.nodeType===1)return!1;sr=Bn=J==="only"&&!sr&&"nextSibling"}return!0}if(sr=[Ie?Wr.firstChild:Wr.lastChild],Ie&&bl){for(mt=Wr[Ce]||(Wr[Ce]={}),ut=mt[J]||[],jt=ut[0]===ge&&ut[1],qn=jt&&ut[2],Ye=jt&&Wr.childNodes[jt];Ye=++jt&&Ye&&Ye[Bn]||(qn=jt=0)||sr.pop();)if(Ye.nodeType===1&&++qn&&Ye===Oe){mt[J]=[ge,jt,qn];break}}else if(bl&&(mt=Oe[Ce]||(Oe[Ce]={}),ut=mt[J]||[],jt=ut[0]===ge&&ut[1],qn=jt),qn===!1)for(;(Ye=++jt&&Ye&&Ye[Bn]||(qn=jt=0)||sr.pop())&&!((He?A(Ye,Fi):Ye.nodeType===1)&&++qn&&(bl&&(mt=Ye[Ce]||(Ye[Ce]={}),mt[J]=[ge,qn]),Ye===Oe)););return qn-=_e,qn===ye||qn%ye===0&&qn/ye>=0}}},PSEUDO:function(J,ae){var pe,ye=M.pseudos[J]||M.setFilters[J.toLowerCase()]||Nt.error("unsupported pseudo: "+J);return ye[Ce]?ye(ae):ye.length>1?(pe=[J,J,"",ae],M.setFilters.hasOwnProperty(J.toLowerCase())?fi(function(_e,Me){for(var Ie,He=ye(_e,ae),Oe=He.length;Oe--;)Ie=a.call(_e,He[Oe]),_e[Ie]=!(Me[Ie]=He[Oe])}):function(_e){return ye(_e,0,pe)}):ye}},pseudos:{not:fi(function(J){var ae=[],pe=[],ye=Nm(J.replace(T,"$1"));return ye[Ce]?fi(function(_e,Me,Ie,He){for(var Oe,gt=ye(_e,null,He,[]),rt=_e.length;rt--;)(Oe=gt[rt])&&(_e[rt]=!(Me[rt]=Oe))}):function(_e,Me,Ie){return ae[0]=_e,ye(ae,null,Ie,pe),ae[0]=null,!pe.pop()}}),has:fi(function(J){return function(ae){return Nt(J,ae).length>0}}),contains:fi(function(J){return J=J.replace(po,go),function(ae){return(ae.textContent||m.text(ae)).indexOf(J)>-1}}),lang:fi(function(J){return ec.test(J||"")||Nt.error("unsupported lang: "+J),J=J.replace(po,go).toLowerCase(),function(ae){var pe;do if(pe=re?ae.lang:ae.getAttribute("xml:lang")||ae.getAttribute("lang"))return pe=pe.toLowerCase(),pe===J||pe.indexOf(J+"-")===0;while((ae=ae.parentNode)&&ae.nodeType===1);return!1}}),target:function(J){var ae=t.location&&t.location.hash;return ae&&ae.slice(1)===J.id},root:function(J){return J===ie},focus:function(J){return J===CR()&&Y.hasFocus()&&!!(J.type||J.href||~J.tabIndex)},enabled:tS(!1),disabled:tS(!0),checked:function(J){return A(J,"input")&&!!J.checked||A(J,"option")&&!!J.selected},selected:function(J){return J.parentNode&&J.parentNode.selectedIndex,J.selected===!0},empty:function(J){for(J=J.firstChild;J;J=J.nextSibling)if(J.nodeType<6)return!1;return!0},parent:function(J){return!M.pseudos.empty(J)},header:function(J){return na.test(J.nodeName)},input:function(J){return ta.test(J.nodeName)},button:function(J){return A(J,"input")&&J.type==="button"||A(J,"button")},text:function(J){var ae;return A(J,"input")&&J.type==="text"&&((ae=J.getAttribute("type"))==null||ae.toLowerCase()==="text")},first:as(function(){return[0]}),last:as(function(J,ae){return[ae-1]}),eq:as(function(J,ae,pe){return[pe<0?pe+ae:pe]}),even:as(function(J,ae){for(var pe=0;pe<ae;pe+=2)J.push(pe);return J}),odd:as(function(J,ae){for(var pe=1;pe<ae;pe+=2)J.push(pe);return J}),lt:as(function(J,ae,pe){var ye;for(pe<0?ye=pe+ae:pe>ae?ye=ae:ye=pe;--ye>=0;)J.push(ye);return J}),gt:as(function(J,ae,pe){for(var ye=pe<0?pe+ae:pe;++ye<ae;)J.push(ye);return J})}},M.pseudos.nth=M.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})M.pseudos[_]=kR(_);for(_ in{submit:!0,reset:!0})M.pseudos[_]=ER(_);function nS(){}nS.prototype=M.filters=M.pseudos,M.setFilters=new nS;function hf(J,ae){var pe,ye,_e,Me,Ie,He,Oe,gt=St[J+" "];if(gt)return ae?0:gt.slice(0);for(Ie=J,He=[],Oe=M.preFilter;Ie;){(!pe||(ye=en.exec(Ie)))&&(ye&&(Ie=Ie.slice(ye[0].length)||Ie),He.push(_e=[])),pe=!1,(ye=Ju.exec(Ie))&&(pe=ye.shift(),_e.push({value:pe,type:ye[0].replace(T," ")}),Ie=Ie.slice(pe.length));for(Me in M.filter)(ye=Oi[Me].exec(Ie))&&(!Oe[Me]||(ye=Oe[Me](ye)))&&(pe=ye.shift(),_e.push({value:pe,type:Me,matches:ye}),Ie=Ie.slice(pe.length));if(!pe)break}return ae?Ie.length:Ie?Nt.error(J):St(J,He).slice(0)}function pf(J){for(var ae=0,pe=J.length,ye="";ae<pe;ae++)ye+=J[ae].value;return ye}function gf(J,ae,pe){var ye=ae.dir,_e=ae.next,Me=_e||ye,Ie=pe&&Me==="parentNode",He=$e++;return ae.first?function(Oe,gt,rt){for(;Oe=Oe[ye];)if(Oe.nodeType===1||Ie)return J(Oe,gt,rt);return!1}:function(Oe,gt,rt){var ut,mt,Ye=[ge,He];if(rt){for(;Oe=Oe[ye];)if((Oe.nodeType===1||Ie)&&J(Oe,gt,rt))return!0}else for(;Oe=Oe[ye];)if(Oe.nodeType===1||Ie)if(mt=Oe[Ce]||(Oe[Ce]={}),_e&&A(Oe,_e))Oe=Oe[ye]||Oe;else{if((ut=mt[Me])&&ut[0]===ge&&ut[1]===He)return Ye[2]=ut[2];if(mt[Me]=Ye,Ye[2]=J(Oe,gt,rt))return!0}return!1}}function Om(J){return J.length>1?function(ae,pe,ye){for(var _e=J.length;_e--;)if(!J[_e](ae,pe,ye))return!1;return!0}:J[0]}function $R(J,ae,pe){for(var ye=0,_e=ae.length;ye<_e;ye++)Nt(J,ae[ye],pe);return pe}function mf(J,ae,pe,ye,_e){for(var Me,Ie=[],He=0,Oe=J.length,gt=ae!=null;He<Oe;He++)(Me=J[He])&&(!pe||pe(Me,ye,_e))&&(Ie.push(Me),gt&&ae.push(He));return Ie}function Fm(J,ae,pe,ye,_e,Me){return ye&&!ye[Ce]&&(ye=Fm(ye)),_e&&!_e[Ce]&&(_e=Fm(_e,Me)),fi(function(Ie,He,Oe,gt){var rt,ut,mt,Ye,jt=[],sr=[],Bn=He.length,Wr=Ie||$R(ae||"*",Oe.nodeType?[Oe]:Oe,[]),Fi=J&&(Ie||!ae)?mf(Wr,jt,J,Oe,gt):Wr;if(pe?(Ye=_e||(Ie?J:Bn||ye)?[]:He,pe(Fi,Ye,Oe,gt)):Ye=Fi,ye)for(rt=mf(Ye,sr),ye(rt,[],Oe,gt),ut=rt.length;ut--;)(mt=rt[ut])&&(Ye[sr[ut]]=!(Fi[sr[ut]]=mt));if(Ie){if(_e||J){if(_e){for(rt=[],ut=Ye.length;ut--;)(mt=Ye[ut])&&rt.push(Fi[ut]=mt);_e(null,Ye=[],rt,gt)}for(ut=Ye.length;ut--;)(mt=Ye[ut])&&(rt=_e?a.call(Ie,mt):jt[ut])>-1&&(Ie[rt]=!(He[rt]=mt))}}else Ye=mf(Ye===He?Ye.splice(Bn,Ye.length):Ye),_e?_e(null,He,Ye,gt):V.apply(He,Ye)})}function Dm(J){for(var ae,pe,ye,_e=J.length,Me=M.relative[J[0].type],Ie=Me||M.relative[" "],He=Me?1:0,Oe=gf(function(ut){return ut===ae},Ie,!0),gt=gf(function(ut){return a.call(ae,ut)>-1},Ie,!0),rt=[function(ut,mt,Ye){var jt=!Me&&(Ye||mt!=O)||((ae=mt).nodeType?Oe(ut,mt,Ye):gt(ut,mt,Ye));return ae=null,jt}];He<_e;He++)if(pe=M.relative[J[He].type])rt=[gf(Om(rt),pe)];else{if(pe=M.filter[J[He].type].apply(null,J[He].matches),pe[Ce]){for(ye=++He;ye<_e&&!M.relative[J[ye].type];ye++);return Fm(He>1&&Om(rt),He>1&&pf(J.slice(0,He-1).concat({value:J[He-2].type===" "?"*":""})).replace(T,"$1"),pe,He<ye&&Dm(J.slice(He,ye)),ye<_e&&Dm(J=J.slice(ye)),ye<_e&&pf(J))}rt.push(pe)}return Om(rt)}function TR(J,ae){var pe=ae.length>0,ye=J.length>0,_e=function(Me,Ie,He,Oe,gt){var rt,ut,mt,Ye=0,jt="0",sr=Me&&[],Bn=[],Wr=O,Fi=Me||ye&&M.find.TAG("*",gt),bl=ge+=Wr==null?1:Math.random()||.1,qn=Fi.length;for(gt&&(O=Ie==Y||Ie||gt);jt!==qn&&(rt=Fi[jt])!=null;jt++){if(ye&&rt){for(ut=0,!Ie&&rt.ownerDocument!=Y&&(ra(rt),He=!re);mt=J[ut++];)if(mt(rt,Ie||Y,He)){V.call(Oe,rt);break}gt&&(ge=bl)}pe&&((rt=!mt&&rt)&&Ye--,Me&&sr.push(rt))}if(Ye+=jt,pe&&jt!==Ye){for(ut=0;mt=ae[ut++];)mt(sr,Bn,Ie,He);if(Me){if(Ye>0)for(;jt--;)sr[jt]||Bn[jt]||(Bn[jt]=C.call(Oe));Bn=mf(Bn)}V.apply(Oe,Bn),gt&&!Me&&Bn.length>0&&Ye+ae.length>1&&m.uniqueSort(Oe)}return gt&&(ge=bl,O=Wr),sr};return pe?fi(_e):_e}function Nm(J,ae){var pe,ye=[],_e=[],Me=dt[J+" "];if(!Me){for(ae||(ae=hf(J)),pe=ae.length;pe--;)Me=Dm(ae[pe]),Me[Ce]?ye.push(Me):_e.push(Me);Me=dt(J,TR(_e,ye)),Me.selector=J}return Me}function rS(J,ae,pe,ye){var _e,Me,Ie,He,Oe,gt=typeof J=="function"&&J,rt=!ye&&hf(J=gt.selector||J);if(pe=pe||[],rt.length===1){if(Me=rt[0]=rt[0].slice(0),Me.length>2&&(Ie=Me[0]).type==="ID"&&ae.nodeType===9&&re&&M.relative[Me[1].type]){if(ae=(M.find.ID(Ie.matches[0].replace(po,go),ae)||[])[0],ae)gt&&(ae=ae.parentNode);else return pe;J=J.slice(Me.shift().value.length)}for(_e=Oi.needsContext.test(J)?0:Me.length;_e--&&(Ie=Me[_e],!M.relative[He=Ie.type]);)if((Oe=M.find[He])&&(ye=Oe(Ie.matches[0].replace(po,go),Pm.test(Me[0].type)&&Im(ae.parentNode)||ae))){if(Me.splice(_e,1),J=ye.length&&pf(Me),!J)return V.apply(pe,ye),pe;break}}return(gt||Nm(J,rt))(ye,ae,!re,pe,!ae||Pm.test(J)&&Im(ae.parentNode)||ae),pe}p.sortStable=Ce.split("").sort(gn).join("")===Ce,ra(),p.sortDetached=yl(function(J){return J.compareDocumentPosition(Y.createElement("fieldset"))&1}),m.find=Nt,m.expr[":"]=m.expr.pseudos,m.unique=m.uniqueSort,Nt.compile=Nm,Nt.select=rS,Nt.setDocument=ra,Nt.escape=m.escapeSelector,Nt.getText=m.text,Nt.isXML=m.isXMLDoc,Nt.selectors=m.expr,Nt.support=m.support,Nt.uniqueSort=m.uniqueSort})();var B=function(_,M,O){for(var z=[],H=O!==void 0;(_=_[M])&&_.nodeType!==9;)if(_.nodeType===1){if(H&&m(_).is(O))break;z.push(_)}return z},Z=function(_,M){for(var O=[];_;_=_.nextSibling)_.nodeType===1&&_!==M&&O.push(_);return O},U=m.expr.match.needsContext,X=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function W(_,M,O){return g(M)?m.grep(_,function(z,H){return!!M.call(z,H,z)!==O}):M.nodeType?m.grep(_,function(z){return z===M!==O}):typeof M!="string"?m.grep(_,function(z){return a.call(M,z)>-1!==O}):m.filter(M,_,O)}m.filter=function(_,M,O){var z=M[0];return O&&(_=":not("+_+")"),M.length===1&&z.nodeType===1?m.find.matchesSelector(z,_)?[z]:[]:m.find.matches(_,m.grep(M,function(H){return H.nodeType===1}))},m.fn.extend({find:function(_){var M,O,z=this.length,H=this;if(typeof _!="string")return this.pushStack(m(_).filter(function(){for(M=0;M<z;M++)if(m.contains(H[M],this))return!0}));for(O=this.pushStack([]),M=0;M<z;M++)m.find(_,H[M],O);return z>1?m.uniqueSort(O):O},filter:function(_){return this.pushStack(W(this,_||[],!1))},not:function(_){return this.pushStack(W(this,_||[],!0))},is:function(_){return!!W(this,typeof _=="string"&&U.test(_)?m(_):_||[],!1).length}});var q,Q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=m.fn.init=function(_,M,O){var z,H;if(!_)return this;if(O=O||q,typeof _=="string")if(_[0]==="<"&&_[_.length-1]===">"&&_.length>=3?z=[null,_,null]:z=Q.exec(_),z&&(z[1]||!M))if(z[1]){if(M=M instanceof m?M[0]:M,m.merge(this,m.parseHTML(z[1],M&&M.nodeType?M.ownerDocument||M:x,!0)),X.test(z[1])&&m.isPlainObject(M))for(z in M)g(this[z])?this[z](M[z]):this.attr(z,M[z]);return this}else return H=x.getElementById(z[2]),H&&(this[0]=H,this.length=1),this;else return!M||M.jquery?(M||O).find(_):this.constructor(M).find(_);else{if(_.nodeType)return this[0]=_,this.length=1,this;if(g(_))return O.ready!==void 0?O.ready(_):_(m)}return m.makeArray(_,this)};G.prototype=m.fn,q=m(x);var oe=/^(?:parents|prev(?:Until|All))/,ne={children:!0,contents:!0,next:!0,prev:!0};m.fn.extend({has:function(_){var M=m(_,this),O=M.length;return this.filter(function(){for(var z=0;z<O;z++)if(m.contains(this,M[z]))return!0})},closest:function(_,M){var O,z=0,H=this.length,V=[],Y=typeof _!="string"&&m(_);if(!U.test(_)){for(;z<H;z++)for(O=this[z];O&&O!==M;O=O.parentNode)if(O.nodeType<11&&(Y?Y.index(O)>-1:O.nodeType===1&&m.find.matchesSelector(O,_))){V.push(O);break}}return this.pushStack(V.length>1?m.uniqueSort(V):V)},index:function(_){return _?typeof _=="string"?a.call(m(_),this[0]):a.call(this,_.jquery?_[0]:_):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(_,M){return this.pushStack(m.uniqueSort(m.merge(this.get(),m(_,M))))},addBack:function(_){return this.add(_==null?this.prevObject:this.prevObject.filter(_))}});function ce(_,M){for(;(_=_[M])&&_.nodeType!==1;);return _}m.each({parent:function(_){var M=_.parentNode;return M&&M.nodeType!==11?M:null},parents:function(_){return B(_,"parentNode")},parentsUntil:function(_,M,O){return B(_,"parentNode",O)},next:function(_){return ce(_,"nextSibling")},prev:function(_){return ce(_,"previousSibling")},nextAll:function(_){return B(_,"nextSibling")},prevAll:function(_){return B(_,"previousSibling")},nextUntil:function(_,M,O){return B(_,"nextSibling",O)},prevUntil:function(_,M,O){return B(_,"previousSibling",O)},siblings:function(_){return Z((_.parentNode||{}).firstChild,_)},children:function(_){return Z(_.firstChild)},contents:function(_){return _.contentDocument!=null&&i(_.contentDocument)?_.contentDocument:(A(_,"template")&&(_=_.content||_),m.merge([],_.childNodes))}},function(_,M){m.fn[_]=function(O,z){var H=m.map(this,M,O);return _.slice(-5)!=="Until"&&(z=O),z&&typeof z=="string"&&(H=m.filter(z,H)),this.length>1&&(ne[_]||m.uniqueSort(H),oe.test(_)&&H.reverse()),this.pushStack(H)}});var fe=/[^\x20\t\r\n\f]+/g;function he(_){var M={};return m.each(_.match(fe)||[],function(O,z){M[z]=!0}),M}m.Callbacks=function(_){_=typeof _=="string"?he(_):m.extend({},_);var M,O,z,H,V=[],Y=[],ie=-1,re=function(){for(H=H||_.once,z=M=!0;Y.length;ie=-1)for(O=Y.shift();++ie<V.length;)V[ie].apply(O[0],O[1])===!1&&_.stopOnFalse&&(ie=V.length,O=!1);_.memory||(O=!1),M=!1,H&&(O?V=[]:V="")},ue={add:function(){return V&&(O&&!M&&(ie=V.length-1,Y.push(O)),function we(Ce){m.each(Ce,function(ge,$e){g($e)?(!_.unique||!ue.has($e))&&V.push($e):$e&&$e.length&&v($e)!=="string"&&we($e)})}(arguments),O&&!M&&re()),this},remove:function(){return m.each(arguments,function(we,Ce){for(var ge;(ge=m.inArray(Ce,V,ge))>-1;)V.splice(ge,1),ge<=ie&&ie--}),this},has:function(we){return we?m.inArray(we,V)>-1:V.length>0},empty:function(){return V&&(V=[]),this},disable:function(){return H=Y=[],V=O="",this},disabled:function(){return!V},lock:function(){return H=Y=[],!O&&!M&&(V=O=""),this},locked:function(){return!!H},fireWith:function(we,Ce){return H||(Ce=Ce||[],Ce=[we,Ce.slice?Ce.slice():Ce],Y.push(Ce),M||re()),this},fire:function(){return ue.fireWith(this,arguments),this},fired:function(){return!!z}};return ue};function me(_){return _}function Pe(_){throw _}function Ee(_,M,O,z){var H;try{_&&g(H=_.promise)?H.call(_).done(M).fail(O):_&&g(H=_.then)?H.call(_,M,O):M.apply(void 0,[_].slice(z))}catch(V){O.apply(void 0,[V])}}m.extend({Deferred:function(_){var M=[["notify","progress",m.Callbacks("memory"),m.Callbacks("memory"),2],["resolve","done",m.Callbacks("once memory"),m.Callbacks("once memory"),0,"resolved"],["reject","fail",m.Callbacks("once memory"),m.Callbacks("once memory"),1,"rejected"]],O="pending",z={state:function(){return O},always:function(){return H.done(arguments).fail(arguments),this},catch:function(V){return z.then(null,V)},pipe:function(){var V=arguments;return m.Deferred(function(Y){m.each(M,function(ie,re){var ue=g(V[re[4]])&&V[re[4]];H[re[1]](function(){var we=ue&&ue.apply(this,arguments);we&&g(we.promise)?we.promise().progress(Y.notify).done(Y.resolve).fail(Y.reject):Y[re[0]+"With"](this,ue?[we]:arguments)})}),V=null}).promise()},then:function(V,Y,ie){var re=0;function ue(we,Ce,ge,$e){return function(){var st=this,St=arguments,dt=function(){var gn,Ri;if(!(we<re)){if(gn=ge.apply(st,St),gn===Ce.promise())throw new TypeError("Thenable self-resolution");Ri=gn&&(typeof gn=="object"||typeof gn=="function")&&gn.then,g(Ri)?$e?Ri.call(gn,ue(re,Ce,me,$e),ue(re,Ce,Pe,$e)):(re++,Ri.call(gn,ue(re,Ce,me,$e),ue(re,Ce,Pe,$e),ue(re,Ce,me,Ce.notifyWith))):(ge!==me&&(st=void 0,St=[gn]),($e||Ce.resolveWith)(st,St))}},Tn=$e?dt:function(){try{dt()}catch(gn){m.Deferred.exceptionHook&&m.Deferred.exceptionHook(gn,Tn.error),we+1>=re&&(ge!==Pe&&(st=void 0,St=[gn]),Ce.rejectWith(st,St))}};we?Tn():(m.Deferred.getErrorHook?Tn.error=m.Deferred.getErrorHook():m.Deferred.getStackHook&&(Tn.error=m.Deferred.getStackHook()),t.setTimeout(Tn))}}return m.Deferred(function(we){M[0][3].add(ue(0,we,g(ie)?ie:me,we.notifyWith)),M[1][3].add(ue(0,we,g(V)?V:me)),M[2][3].add(ue(0,we,g(Y)?Y:Pe))}).promise()},promise:function(V){return V!=null?m.extend(V,z):z}},H={};return m.each(M,function(V,Y){var ie=Y[2],re=Y[5];z[Y[1]]=ie.add,re&&ie.add(function(){O=re},M[3-V][2].disable,M[3-V][3].disable,M[0][2].lock,M[0][3].lock),ie.add(Y[3].fire),H[Y[0]]=function(){return H[Y[0]+"With"](this===H?void 0:this,arguments),this},H[Y[0]+"With"]=ie.fireWith}),z.promise(H),_&&_.call(H,H),H},when:function(_){var M=arguments.length,O=M,z=Array(O),H=o.call(arguments),V=m.Deferred(),Y=function(ie){return function(re){z[ie]=this,H[ie]=arguments.length>1?o.call(arguments):re,--M||V.resolveWith(z,H)}};if(M<=1&&(Ee(_,V.done(Y(O)).resolve,V.reject,!M),V.state()==="pending"||g(H[O]&&H[O].then)))return V.then();for(;O--;)Ee(H[O],Y(O),V.reject);return V.promise()}});var Ae=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;m.Deferred.exceptionHook=function(_,M){t.console&&t.console.warn&&_&&Ae.test(_.name)&&t.console.warn("jQuery.Deferred exception: "+_.message,_.stack,M)},m.readyException=function(_){t.setTimeout(function(){throw _})};var Fe=m.Deferred();m.fn.ready=function(_){return Fe.then(_).catch(function(M){m.readyException(M)}),this},m.extend({isReady:!1,readyWait:1,ready:function(_){(_===!0?--m.readyWait:m.isReady)||(m.isReady=!0,!(_!==!0&&--m.readyWait>0)&&Fe.resolveWith(x,[m]))}}),m.ready.then=Fe.then;function Be(){x.removeEventListener("DOMContentLoaded",Be),t.removeEventListener("load",Be),m.ready()}x.readyState==="complete"||x.readyState!=="loading"&&!x.documentElement.doScroll?t.setTimeout(m.ready):(x.addEventListener("DOMContentLoaded",Be),t.addEventListener("load",Be));var lt=function(_,M,O,z,H,V,Y){var ie=0,re=_.length,ue=O==null;if(v(O)==="object"){H=!0;for(ie in O)lt(_,M,ie,O[ie],!0,V,Y)}else if(z!==void 0&&(H=!0,g(z)||(Y=!0),ue&&(Y?(M.call(_,z),M=null):(ue=M,M=function(we,Ce,ge){return ue.call(m(we),ge)})),M))for(;ie<re;ie++)M(_[ie],O,Y?z:z.call(_[ie],ie,M(_[ie],O)));return H?_:ue?M.call(_):re?M(_[0],O):V},qt=/^-ms-/,pt=/-([a-z])/g;function on(_,M){return M.toUpperCase()}function xt(_){return _.replace(qt,"ms-").replace(pt,on)}var ve=function(_){return _.nodeType===1||_.nodeType===9||!+_.nodeType};function Se(){this.expando=m.expando+Se.uid++}Se.uid=1,Se.prototype={cache:function(_){var M=_[this.expando];return M||(M={},ve(_)&&(_.nodeType?_[this.expando]=M:Object.defineProperty(_,this.expando,{value:M,configurable:!0}))),M},set:function(_,M,O){var z,H=this.cache(_);if(typeof M=="string")H[xt(M)]=O;else for(z in M)H[xt(z)]=M[z];return H},get:function(_,M){return M===void 0?this.cache(_):_[this.expando]&&_[this.expando][xt(M)]},access:function(_,M,O){return M===void 0||M&&typeof M=="string"&&O===void 0?this.get(_,M):(this.set(_,M,O),O!==void 0?O:M)},remove:function(_,M){var O,z=_[this.expando];if(z!==void 0){if(M!==void 0)for(Array.isArray(M)?M=M.map(xt):(M=xt(M),M=M in z?[M]:M.match(fe)||[]),O=M.length;O--;)delete z[M[O]];(M===void 0||m.isEmptyObject(z))&&(_.nodeType?_[this.expando]=void 0:delete _[this.expando])}},hasData:function(_){var M=_[this.expando];return M!==void 0&&!m.isEmptyObject(M)}};var be=new Se,De=new Se,ot=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,xe=/[A-Z]/g;function Re(_){return _==="true"?!0:_==="false"?!1:_==="null"?null:_===+_+""?+_:ot.test(_)?JSON.parse(_):_}function Ve(_,M,O){var z;if(O===void 0&&_.nodeType===1)if(z="data-"+M.replace(xe,"-$&").toLowerCase(),O=_.getAttribute(z),typeof O=="string"){try{O=Re(O)}catch{}De.set(_,M,O)}else O=void 0;return O}m.extend({hasData:function(_){return De.hasData(_)||be.hasData(_)},data:function(_,M,O){return De.access(_,M,O)},removeData:function(_,M){De.remove(_,M)},_data:function(_,M,O){return be.access(_,M,O)},_removeData:function(_,M){be.remove(_,M)}}),m.fn.extend({data:function(_,M){var O,z,H,V=this[0],Y=V&&V.attributes;if(_===void 0){if(this.length&&(H=De.get(V),V.nodeType===1&&!be.get(V,"hasDataAttrs"))){for(O=Y.length;O--;)Y[O]&&(z=Y[O].name,z.indexOf("data-")===0&&(z=xt(z.slice(5)),Ve(V,z,H[z])));be.set(V,"hasDataAttrs",!0)}return H}return typeof _=="object"?this.each(function(){De.set(this,_)}):lt(this,function(ie){var re;if(V&&ie===void 0)return re=De.get(V,_),re!==void 0||(re=Ve(V,_),re!==void 0)?re:void 0;this.each(function(){De.set(this,_,ie)})},null,M,arguments.length>1,null,!0)},removeData:function(_){return this.each(function(){De.remove(this,_)})}}),m.extend({queue:function(_,M,O){var z;if(_)return M=(M||"fx")+"queue",z=be.get(_,M),O&&(!z||Array.isArray(O)?z=be.access(_,M,m.makeArray(O)):z.push(O)),z||[]},dequeue:function(_,M){M=M||"fx";var O=m.queue(_,M),z=O.length,H=O.shift(),V=m._queueHooks(_,M),Y=function(){m.dequeue(_,M)};H==="inprogress"&&(H=O.shift(),z--),H&&(M==="fx"&&O.unshift("inprogress"),delete V.stop,H.call(_,Y,V)),!z&&V&&V.empty.fire()},_queueHooks:function(_,M){var O=M+"queueHooks";return be.get(_,O)||be.access(_,O,{empty:m.Callbacks("once memory").add(function(){be.remove(_,[M+"queue",O])})})}}),m.fn.extend({queue:function(_,M){var O=2;return typeof _!="string"&&(M=_,_="fx",O--),arguments.length<O?m.queue(this[0],_):M===void 0?this:this.each(function(){var z=m.queue(this,_,M);m._queueHooks(this,_),_==="fx"&&z[0]!=="inprogress"&&m.dequeue(this,_)})},dequeue:function(_){return this.each(function(){m.dequeue(this,_)})},clearQueue:function(_){return this.queue(_||"fx",[])},promise:function(_,M){var O,z=1,H=m.Deferred(),V=this,Y=this.length,ie=function(){--z||H.resolveWith(V,[V])};for(typeof _!="string"&&(M=_,_=void 0),_=_||"fx";Y--;)O=be.get(V[Y],_+"queueHooks"),O&&O.empty&&(z++,O.empty.add(ie));return ie(),H.promise(M)}});var et=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,at=new RegExp("^(?:([+-])=|)("+et+")([a-z%]*)$","i"),At=["Top","Right","Bottom","Left"],un=x.documentElement,Dn=function(_){return m.contains(_.ownerDocument,_)},Dr={composed:!0};un.getRootNode&&(Dn=function(_){return m.contains(_.ownerDocument,_)||_.getRootNode(Dr)===_.ownerDocument});var Nr=function(_,M){return _=M||_,_.style.display==="none"||_.style.display===""&&Dn(_)&&m.css(_,"display")==="none"};function Zs(_,M,O,z){var H,V,Y=20,ie=z?function(){return z.cur()}:function(){return m.css(_,M,"")},re=ie(),ue=O&&O[3]||(m.cssNumber[M]?"":"px"),we=_.nodeType&&(m.cssNumber[M]||ue!=="px"&&+re)&&at.exec(m.css(_,M));if(we&&we[3]!==ue){for(re=re/2,ue=ue||we[3],we=+re||1;Y--;)m.style(_,M,we+ue),(1-V)*(1-(V=ie()/re||.5))<=0&&(Y=0),we=we/V;we=we*2,m.style(_,M,we+ue),O=O||[]}return O&&(we=+we||+re||0,H=O[1]?we+(O[1]+1)*O[2]:+O[2],z&&(z.unit=ue,z.start=we,z.end=H)),H}var wr={};function Qs(_){var M,O=_.ownerDocument,z=_.nodeName,H=wr[z];return H||(M=O.body.appendChild(O.createElement(z)),H=m.css(M,"display"),M.parentNode.removeChild(M),H==="none"&&(H="block"),wr[z]=H,H)}function ai(_,M){for(var O,z,H=[],V=0,Y=_.length;V<Y;V++)z=_[V],z.style&&(O=z.style.display,M?(O==="none"&&(H[V]=be.get(z,"display")||null,H[V]||(z.style.display="")),z.style.display===""&&Nr(z)&&(H[V]=Qs(z))):O!=="none"&&(H[V]="none",be.set(z,"display",O)));for(V=0;V<Y;V++)H[V]!=null&&(_[V].style.display=H[V]);return _}m.fn.extend({show:function(){return ai(this,!0)},hide:function(){return ai(this)},toggle:function(_){return typeof _=="boolean"?_?this.show():this.hide():this.each(function(){Nr(this)?m(this).show():m(this).hide()})}});var Sr=/^(?:checkbox|radio)$/i,Uo=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Nn=/^$|^module$|\/(?:java|ecma)script/i;(function(){var _=x.createDocumentFragment(),M=_.appendChild(x.createElement("div")),O=x.createElement("input");O.setAttribute("type","radio"),O.setAttribute("checked","checked"),O.setAttribute("name","t"),M.appendChild(O),p.checkClone=M.cloneNode(!0).cloneNode(!0).lastChild.checked,M.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!M.cloneNode(!0).lastChild.defaultValue,M.innerHTML="<option></option>",p.option=!!M.lastChild})();var Sn={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Sn.tbody=Sn.tfoot=Sn.colgroup=Sn.caption=Sn.thead,Sn.th=Sn.td,p.option||(Sn.optgroup=Sn.option=[1,"<select multiple='multiple'>","</select>"]);function cn(_,M){var O;return typeof _.getElementsByTagName<"u"?O=_.getElementsByTagName(M||"*"):typeof _.querySelectorAll<"u"?O=_.querySelectorAll(M||"*"):O=[],M===void 0||M&&A(_,M)?m.merge([_],O):O}function oo(_,M){for(var O=0,z=_.length;O<z;O++)be.set(_[O],"globalEval",!M||be.get(M[O],"globalEval"))}var ao=/<|&#?\w+;/;function Js(_,M,O,z,H){for(var V,Y,ie,re,ue,we,Ce=M.createDocumentFragment(),ge=[],$e=0,st=_.length;$e<st;$e++)if(V=_[$e],V||V===0)if(v(V)==="object")m.merge(ge,V.nodeType?[V]:V);else if(!ao.test(V))ge.push(M.createTextNode(V));else{for(Y=Y||Ce.appendChild(M.createElement("div")),ie=(Uo.exec(V)||["",""])[1].toLowerCase(),re=Sn[ie]||Sn._default,Y.innerHTML=re[1]+m.htmlPrefilter(V)+re[2],we=re[0];we--;)Y=Y.lastChild;m.merge(ge,Y.childNodes),Y=Ce.firstChild,Y.textContent=""}for(Ce.textContent="",$e=0;V=ge[$e++];){if(z&&m.inArray(V,z)>-1){H&&H.push(V);continue}if(ue=Dn(V),Y=cn(Ce.appendChild(V),"script"),ue&&oo(Y),O)for(we=0;V=Y[we++];)Nn.test(V.type||"")&&O.push(V)}return Ce}var ir=/^([^.]*)(?:\.(.+)|)/;function Ei(){return!0}function $i(){return!1}function qa(_,M,O,z,H,V){var Y,ie;if(typeof M=="object"){typeof O!="string"&&(z=z||O,O=void 0);for(ie in M)qa(_,ie,O,z,M[ie],V);return _}if(z==null&&H==null?(H=O,z=O=void 0):H==null&&(typeof O=="string"?(H=z,z=void 0):(H=z,z=O,O=void 0)),H===!1)H=$i;else if(!H)return _;return V===1&&(Y=H,H=function(re){return m().off(re),Y.apply(this,arguments)},H.guid=Y.guid||(Y.guid=m.guid++)),_.each(function(){m.event.add(this,M,H,z,O)})}m.event={global:{},add:function(_,M,O,z,H){var V,Y,ie,re,ue,we,Ce,ge,$e,st,St,dt=be.get(_);if(ve(_))for(O.handler&&(V=O,O=V.handler,H=V.selector),H&&m.find.matchesSelector(un,H),O.guid||(O.guid=m.guid++),(re=dt.events)||(re=dt.events=Object.create(null)),(Y=dt.handle)||(Y=dt.handle=function(Tn){return typeof m<"u"&&m.event.triggered!==Tn.type?m.event.dispatch.apply(_,arguments):void 0}),M=(M||"").match(fe)||[""],ue=M.length;ue--;)ie=ir.exec(M[ue])||[],$e=St=ie[1],st=(ie[2]||"").split(".").sort(),$e&&(Ce=m.event.special[$e]||{},$e=(H?Ce.delegateType:Ce.bindType)||$e,Ce=m.event.special[$e]||{},we=m.extend({type:$e,origType:St,data:z,handler:O,guid:O.guid,selector:H,needsContext:H&&m.expr.match.needsContext.test(H),namespace:st.join(".")},V),(ge=re[$e])||(ge=re[$e]=[],ge.delegateCount=0,(!Ce.setup||Ce.setup.call(_,z,st,Y)===!1)&&_.addEventListener&&_.addEventListener($e,Y)),Ce.add&&(Ce.add.call(_,we),we.handler.guid||(we.handler.guid=O.guid)),H?ge.splice(ge.delegateCount++,0,we):ge.push(we),m.event.global[$e]=!0)},remove:function(_,M,O,z,H){var V,Y,ie,re,ue,we,Ce,ge,$e,st,St,dt=be.hasData(_)&&be.get(_);if(!(!dt||!(re=dt.events))){for(M=(M||"").match(fe)||[""],ue=M.length;ue--;){if(ie=ir.exec(M[ue])||[],$e=St=ie[1],st=(ie[2]||"").split(".").sort(),!$e){for($e in re)m.event.remove(_,$e+M[ue],O,z,!0);continue}for(Ce=m.event.special[$e]||{},$e=(z?Ce.delegateType:Ce.bindType)||$e,ge=re[$e]||[],ie=ie[2]&&new RegExp("(^|\\.)"+st.join("\\.(?:.*\\.|)")+"(\\.|$)"),Y=V=ge.length;V--;)we=ge[V],(H||St===we.origType)&&(!O||O.guid===we.guid)&&(!ie||ie.test(we.namespace))&&(!z||z===we.selector||z==="**"&&we.selector)&&(ge.splice(V,1),we.selector&&ge.delegateCount--,Ce.remove&&Ce.remove.call(_,we));Y&&!ge.length&&((!Ce.teardown||Ce.teardown.call(_,st,dt.handle)===!1)&&m.removeEvent(_,$e,dt.handle),delete re[$e])}m.isEmptyObject(re)&&be.remove(_,"handle events")}},dispatch:function(_){var M,O,z,H,V,Y,ie=new Array(arguments.length),re=m.event.fix(_),ue=(be.get(this,"events")||Object.create(null))[re.type]||[],we=m.event.special[re.type]||{};for(ie[0]=re,M=1;M<arguments.length;M++)ie[M]=arguments[M];if(re.delegateTarget=this,!(we.preDispatch&&we.preDispatch.call(this,re)===!1)){for(Y=m.event.handlers.call(this,re,ue),M=0;(H=Y[M++])&&!re.isPropagationStopped();)for(re.currentTarget=H.elem,O=0;(V=H.handlers[O++])&&!re.isImmediatePropagationStopped();)(!re.rnamespace||V.namespace===!1||re.rnamespace.test(V.namespace))&&(re.handleObj=V,re.data=V.data,z=((m.event.special[V.origType]||{}).handle||V.handler).apply(H.elem,ie),z!==void 0&&(re.result=z)===!1&&(re.preventDefault(),re.stopPropagation()));return we.postDispatch&&we.postDispatch.call(this,re),re.result}},handlers:function(_,M){var O,z,H,V,Y,ie=[],re=M.delegateCount,ue=_.target;if(re&&ue.nodeType&&!(_.type==="click"&&_.button>=1)){for(;ue!==this;ue=ue.parentNode||this)if(ue.nodeType===1&&!(_.type==="click"&&ue.disabled===!0)){for(V=[],Y={},O=0;O<re;O++)z=M[O],H=z.selector+" ",Y[H]===void 0&&(Y[H]=z.needsContext?m(H,this).index(ue)>-1:m.find(H,this,null,[ue]).length),Y[H]&&V.push(z);V.length&&ie.push({elem:ue,handlers:V})}}return ue=this,re<M.length&&ie.push({elem:ue,handlers:M.slice(re)}),ie},addProp:function(_,M){Object.defineProperty(m.Event.prototype,_,{enumerable:!0,configurable:!0,get:g(M)?function(){if(this.originalEvent)return M(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[_]},set:function(O){Object.defineProperty(this,_,{enumerable:!0,configurable:!0,writable:!0,value:O})}})},fix:function(_){return _[m.expando]?_:new m.Event(_)},special:{load:{noBubble:!0},click:{setup:function(_){var M=this||_;return Sr.test(M.type)&&M.click&&A(M,"input")&&so(M,"click",!0),!1},trigger:function(_){var M=this||_;return Sr.test(M.type)&&M.click&&A(M,"input")&&so(M,"click"),!0},_default:function(_){var M=_.target;return Sr.test(M.type)&&M.click&&A(M,"input")&&be.get(M,"click")||A(M,"a")}},beforeunload:{postDispatch:function(_){_.result!==void 0&&_.originalEvent&&(_.originalEvent.returnValue=_.result)}}}};function so(_,M,O){if(!O){be.get(_,M)===void 0&&m.event.add(_,M,Ei);return}be.set(_,M,!1),m.event.add(_,M,{namespace:!1,handler:function(z){var H,V=be.get(this,M);if(z.isTrigger&1&&this[M]){if(V)(m.event.special[M]||{}).delegateType&&z.stopPropagation();else if(V=o.call(arguments),be.set(this,M,V),this[M](),H=be.get(this,M),be.set(this,M,!1),V!==H)return z.stopImmediatePropagation(),z.preventDefault(),H}else V&&(be.set(this,M,m.event.trigger(V[0],V.slice(1),this)),z.stopPropagation(),z.isImmediatePropagationStopped=Ei)}})}m.removeEvent=function(_,M,O){_.removeEventListener&&_.removeEventListener(M,O)},m.Event=function(_,M){if(!(this instanceof m.Event))return new m.Event(_,M);_&&_.type?(this.originalEvent=_,this.type=_.type,this.isDefaultPrevented=_.defaultPrevented||_.defaultPrevented===void 0&&_.returnValue===!1?Ei:$i,this.target=_.target&&_.target.nodeType===3?_.target.parentNode:_.target,this.currentTarget=_.currentTarget,this.relatedTarget=_.relatedTarget):this.type=_,M&&m.extend(this,M),this.timeStamp=_&&_.timeStamp||Date.now(),this[m.expando]=!0},m.Event.prototype={constructor:m.Event,isDefaultPrevented:$i,isPropagationStopped:$i,isImmediatePropagationStopped:$i,isSimulated:!1,preventDefault:function(){var _=this.originalEvent;this.isDefaultPrevented=Ei,_&&!this.isSimulated&&_.preventDefault()},stopPropagation:function(){var _=this.originalEvent;this.isPropagationStopped=Ei,_&&!this.isSimulated&&_.stopPropagation()},stopImmediatePropagation:function(){var _=this.originalEvent;this.isImmediatePropagationStopped=Ei,_&&!this.isSimulated&&_.stopImmediatePropagation(),this.stopPropagation()}},m.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},m.event.addProp),m.each({focus:"focusin",blur:"focusout"},function(_,M){function O(z){if(x.documentMode){var H=be.get(this,"handle"),V=m.event.fix(z);V.type=z.type==="focusin"?"focus":"blur",V.isSimulated=!0,H(z),V.target===V.currentTarget&&H(V)}else m.event.simulate(M,z.target,m.event.fix(z))}m.event.special[_]={setup:function(){var z;if(so(this,_,!0),x.documentMode)z=be.get(this,M),z||this.addEventListener(M,O),be.set(this,M,(z||0)+1);else return!1},trigger:function(){return so(this,_),!0},teardown:function(){var z;if(x.documentMode)z=be.get(this,M)-1,z?be.set(this,M,z):(this.removeEventListener(M,O),be.remove(this,M));else return!1},_default:function(z){return be.get(z.target,_)},delegateType:M},m.event.special[M]={setup:function(){var z=this.ownerDocument||this.document||this,H=x.documentMode?this:z,V=be.get(H,M);V||(x.documentMode?this.addEventListener(M,O):z.addEventListener(_,O,!0)),be.set(H,M,(V||0)+1)},teardown:function(){var z=this.ownerDocument||this.document||this,H=x.documentMode?this:z,V=be.get(H,M)-1;V?be.set(H,M,V):(x.documentMode?this.removeEventListener(M,O):z.removeEventListener(_,O,!0),be.remove(H,M))}}}),m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(_,M){m.event.special[_]={delegateType:M,bindType:M,handle:function(O){var z,H=this,V=O.relatedTarget,Y=O.handleObj;return(!V||V!==H&&!m.contains(H,V))&&(O.type=Y.origType,z=Y.handler.apply(this,arguments),O.type=M),z}}}),m.fn.extend({on:function(_,M,O,z){return qa(this,_,M,O,z)},one:function(_,M,O,z){return qa(this,_,M,O,z,1)},off:function(_,M,O){var z,H;if(_&&_.preventDefault&&_.handleObj)return z=_.handleObj,m(_.delegateTarget).off(z.namespace?z.origType+"."+z.namespace:z.origType,z.selector,z.handler),this;if(typeof _=="object"){for(H in _)this.off(H,M,_[H]);return this}return(M===!1||typeof M=="function")&&(O=M,M=void 0),O===!1&&(O=$i),this.each(function(){m.event.remove(this,_,O,M)})}});var Ya=/<script|<style|<link/i,zn=/checked\s*(?:[^=]|=\s*.checked.)/i,qu=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function el(_,M){return A(_,"table")&&A(M.nodeType!==11?M:M.firstChild,"tr")&&m(_).children("tbody")[0]||_}function Yu(_){return _.type=(_.getAttribute("type")!==null)+"/"+_.type,_}function Xu(_){return(_.type||"").slice(0,5)==="true/"?_.type=_.type.slice(5):_.removeAttribute("type"),_}function tl(_,M){var O,z,H,V,Y,ie,re;if(M.nodeType===1){if(be.hasData(_)&&(V=be.get(_),re=V.events,re)){be.remove(M,"handle events");for(H in re)for(O=0,z=re[H].length;O<z;O++)m.event.add(M,H,re[H][O])}De.hasData(_)&&(Y=De.access(_),ie=m.extend({},Y),De.set(M,ie))}}function xn(_,M){var O=M.nodeName.toLowerCase();O==="input"&&Sr.test(_.type)?M.checked=_.checked:(O==="input"||O==="textarea")&&(M.defaultValue=_.defaultValue)}function Ti(_,M,O,z){M=s(M);var H,V,Y,ie,re,ue,we=0,Ce=_.length,ge=Ce-1,$e=M[0],st=g($e);if(st||Ce>1&&typeof $e=="string"&&!p.checkClone&&zn.test($e))return _.each(function(St){var dt=_.eq(St);st&&(M[0]=$e.call(this,St,dt.html())),Ti(dt,M,O,z)});if(Ce&&(H=Js(M,_[0].ownerDocument,!1,_,z),V=H.firstChild,H.childNodes.length===1&&(H=V),V||z)){for(Y=m.map(cn(H,"script"),Yu),ie=Y.length;we<Ce;we++)re=H,we!==ge&&(re=m.clone(re,!0,!0),ie&&m.merge(Y,cn(re,"script"))),O.call(_[we],re,we);if(ie)for(ue=Y[Y.length-1].ownerDocument,m.map(Y,Xu),we=0;we<ie;we++)re=Y[we],Nn.test(re.type||"")&&!be.access(re,"globalEval")&&m.contains(ue,re)&&(re.src&&(re.type||"").toLowerCase()!=="module"?m._evalUrl&&!re.noModule&&m._evalUrl(re.src,{nonce:re.nonce||re.getAttribute("nonce")},ue):E(re.textContent.replace(qu,""),re,ue))}return _}function nl(_,M,O){for(var z,H=M?m.filter(M,_):_,V=0;(z=H[V])!=null;V++)!O&&z.nodeType===1&&m.cleanData(cn(z)),z.parentNode&&(O&&Dn(z)&&oo(cn(z,"script")),z.parentNode.removeChild(z));return _}m.extend({htmlPrefilter:function(_){return _},clone:function(_,M,O){var z,H,V,Y,ie=_.cloneNode(!0),re=Dn(_);if(!p.noCloneChecked&&(_.nodeType===1||_.nodeType===11)&&!m.isXMLDoc(_))for(Y=cn(ie),V=cn(_),z=0,H=V.length;z<H;z++)xn(V[z],Y[z]);if(M)if(O)for(V=V||cn(_),Y=Y||cn(ie),z=0,H=V.length;z<H;z++)tl(V[z],Y[z]);else tl(_,ie);return Y=cn(ie,"script"),Y.length>0&&oo(Y,!re&&cn(_,"script")),ie},cleanData:function(_){for(var M,O,z,H=m.event.special,V=0;(O=_[V])!==void 0;V++)if(ve(O)){if(M=O[be.expando]){if(M.events)for(z in M.events)H[z]?m.event.remove(O,z):m.removeEvent(O,z,M.handle);O[be.expando]=void 0}O[De.expando]&&(O[De.expando]=void 0)}}}),m.fn.extend({detach:function(_){return nl(this,_,!0)},remove:function(_){return nl(this,_)},text:function(_){return lt(this,function(M){return M===void 0?m.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=M)})},null,_,arguments.length)},append:function(){return Ti(this,arguments,function(_){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var M=el(this,_);M.appendChild(_)}})},prepend:function(){return Ti(this,arguments,function(_){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var M=el(this,_);M.insertBefore(_,M.firstChild)}})},before:function(){return Ti(this,arguments,function(_){this.parentNode&&this.parentNode.insertBefore(_,this)})},after:function(){return Ti(this,arguments,function(_){this.parentNode&&this.parentNode.insertBefore(_,this.nextSibling)})},empty:function(){for(var _,M=0;(_=this[M])!=null;M++)_.nodeType===1&&(m.cleanData(cn(_,!1)),_.textContent="");return this},clone:function(_,M){return _=_??!1,M=M??_,this.map(function(){return m.clone(this,_,M)})},html:function(_){return lt(this,function(M){var O=this[0]||{},z=0,H=this.length;if(M===void 0&&O.nodeType===1)return O.innerHTML;if(typeof M=="string"&&!Ya.test(M)&&!Sn[(Uo.exec(M)||["",""])[1].toLowerCase()]){M=m.htmlPrefilter(M);try{for(;z<H;z++)O=this[z]||{},O.nodeType===1&&(m.cleanData(cn(O,!1)),O.innerHTML=M);O=0}catch{}}O&&this.empty().append(M)},null,_,arguments.length)},replaceWith:function(){var _=[];return Ti(this,arguments,function(M){var O=this.parentNode;m.inArray(this,_)<0&&(m.cleanData(cn(this)),O&&O.replaceChild(M,this))},_)}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(_,M){m.fn[_]=function(O){for(var z,H=[],V=m(O),Y=V.length-1,ie=0;ie<=Y;ie++)z=ie===Y?this:this.clone(!0),m(V[ie])[M](z),d.apply(H,z.get());return this.pushStack(H)}});var Xa=new RegExp("^("+et+")(?!px)[a-z%]+$","i"),Za=/^--/,Go=function(_){var M=_.ownerDocument.defaultView;return(!M||!M.opener)&&(M=t),M.getComputedStyle(_)},zr=function(_,M,O){var z,H,V={};for(H in M)V[H]=_.style[H],_.style[H]=M[H];z=O.call(_);for(H in M)_.style[H]=V[H];return z},Qa=new RegExp(At.join("|"),"i");(function(){function _(){if(ue){re.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",ue.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",un.appendChild(re).appendChild(ue);var we=t.getComputedStyle(ue);O=we.top!=="1%",ie=M(we.marginLeft)===12,ue.style.right="60%",V=M(we.right)===36,z=M(we.width)===36,ue.style.position="absolute",H=M(ue.offsetWidth/3)===12,un.removeChild(re),ue=null}}function M(we){return Math.round(parseFloat(we))}var O,z,H,V,Y,ie,re=x.createElement("div"),ue=x.createElement("div");ue.style&&(ue.style.backgroundClip="content-box",ue.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle=ue.style.backgroundClip==="content-box",m.extend(p,{boxSizingReliable:function(){return _(),z},pixelBoxStyles:function(){return _(),V},pixelPosition:function(){return _(),O},reliableMarginLeft:function(){return _(),ie},scrollboxSize:function(){return _(),H},reliableTrDimensions:function(){var we,Ce,ge,$e;return Y==null&&(we=x.createElement("table"),Ce=x.createElement("tr"),ge=x.createElement("div"),we.style.cssText="position:absolute;left:-11111px;border-collapse:separate",Ce.style.cssText="border:1px solid",Ce.style.height="1px",ge.style.height="9px",ge.style.display="block",un.appendChild(we).appendChild(Ce).appendChild(ge),$e=t.getComputedStyle(Ce),Y=parseInt($e.height,10)+parseInt($e.borderTopWidth,10)+parseInt($e.borderBottomWidth,10)===Ce.offsetHeight,un.removeChild(we)),Y}}))})();function lo(_,M,O){var z,H,V,Y,ie=Za.test(M),re=_.style;return O=O||Go(_),O&&(Y=O.getPropertyValue(M)||O[M],ie&&Y&&(Y=Y.replace(T,"$1")||void 0),Y===""&&!Dn(_)&&(Y=m.style(_,M)),!p.pixelBoxStyles()&&Xa.test(Y)&&Qa.test(M)&&(z=re.width,H=re.minWidth,V=re.maxWidth,re.minWidth=re.maxWidth=re.width=Y,Y=O.width,re.width=z,re.minWidth=H,re.maxWidth=V)),Y!==void 0?Y+"":Y}function uo(_,M){return{get:function(){if(_()){delete this.get;return}return(this.get=M).apply(this,arguments)}}}var Ko=["Webkit","Moz","ms"],rl=x.createElement("div").style,jr={};function il(_){for(var M=_[0].toUpperCase()+_.slice(1),O=Ko.length;O--;)if(_=Ko[O]+M,_ in rl)return _}function Ja(_){var M=m.cssProps[_]||jr[_];return M||(_ in rl?_:jr[_]=il(_)||_)}var Br=/^(none|table(?!-c[ea]).+)/,Zu={position:"absolute",visibility:"hidden",display:"block"},es={letterSpacing:"0",fontWeight:"400"};function ol(_,M,O){var z=at.exec(M);return z?Math.max(0,z[2]-(O||0))+(z[3]||"px"):M}function ts(_,M,O,z,H,V){var Y=M==="width"?1:0,ie=0,re=0,ue=0;if(O===(z?"border":"content"))return 0;for(;Y<4;Y+=2)O==="margin"&&(ue+=m.css(_,O+At[Y],!0,H)),z?(O==="content"&&(re-=m.css(_,"padding"+At[Y],!0,H)),O!=="margin"&&(re-=m.css(_,"border"+At[Y]+"Width",!0,H))):(re+=m.css(_,"padding"+At[Y],!0,H),O!=="padding"?re+=m.css(_,"border"+At[Y]+"Width",!0,H):ie+=m.css(_,"border"+At[Y]+"Width",!0,H));return!z&&V>=0&&(re+=Math.max(0,Math.ceil(_["offset"+M[0].toUpperCase()+M.slice(1)]-V-re-ie-.5))||0),re+ue}function al(_,M,O){var z=Go(_),H=!p.boxSizingReliable()||O,V=H&&m.css(_,"boxSizing",!1,z)==="border-box",Y=V,ie=lo(_,M,z),re="offset"+M[0].toUpperCase()+M.slice(1);if(Xa.test(ie)){if(!O)return ie;ie="auto"}return(!p.boxSizingReliable()&&V||!p.reliableTrDimensions()&&A(_,"tr")||ie==="auto"||!parseFloat(ie)&&m.css(_,"display",!1,z)==="inline")&&_.getClientRects().length&&(V=m.css(_,"boxSizing",!1,z)==="border-box",Y=re in _,Y&&(ie=_[re])),ie=parseFloat(ie)||0,ie+ts(_,M,O||(V?"border":"content"),Y,z,ie)+"px"}m.extend({cssHooks:{opacity:{get:function(_,M){if(M){var O=lo(_,"opacity");return O===""?"1":O}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(_,M,O,z){if(!(!_||_.nodeType===3||_.nodeType===8||!_.style)){var H,V,Y,ie=xt(M),re=Za.test(M),ue=_.style;if(re||(M=Ja(ie)),Y=m.cssHooks[M]||m.cssHooks[ie],O!==void 0){if(V=typeof O,V==="string"&&(H=at.exec(O))&&H[1]&&(O=Zs(_,M,H),V="number"),O==null||O!==O)return;V==="number"&&!re&&(O+=H&&H[3]||(m.cssNumber[ie]?"":"px")),!p.clearCloneStyle&&O===""&&M.indexOf("background")===0&&(ue[M]="inherit"),(!Y||!("set"in Y)||(O=Y.set(_,O,z))!==void 0)&&(re?ue.setProperty(M,O):ue[M]=O)}else return Y&&"get"in Y&&(H=Y.get(_,!1,z))!==void 0?H:ue[M]}},css:function(_,M,O,z){var H,V,Y,ie=xt(M),re=Za.test(M);return re||(M=Ja(ie)),Y=m.cssHooks[M]||m.cssHooks[ie],Y&&"get"in Y&&(H=Y.get(_,!0,O)),H===void 0&&(H=lo(_,M,z)),H==="normal"&&M in es&&(H=es[M]),O===""||O?(V=parseFloat(H),O===!0||isFinite(V)?V||0:H):H}}),m.each(["height","width"],function(_,M){m.cssHooks[M]={get:function(O,z,H){if(z)return Br.test(m.css(O,"display"))&&(!O.getClientRects().length||!O.getBoundingClientRect().width)?zr(O,Zu,function(){return al(O,M,H)}):al(O,M,H)},set:function(O,z,H){var V,Y=Go(O),ie=!p.scrollboxSize()&&Y.position==="absolute",re=ie||H,ue=re&&m.css(O,"boxSizing",!1,Y)==="border-box",we=H?ts(O,M,H,ue,Y):0;return ue&&ie&&(we-=Math.ceil(O["offset"+M[0].toUpperCase()+M.slice(1)]-parseFloat(Y[M])-ts(O,M,"border",!1,Y)-.5)),we&&(V=at.exec(z))&&(V[3]||"px")!=="px"&&(O.style[M]=z,z=m.css(O,M)),ol(O,z,we)}}}),m.cssHooks.marginLeft=uo(p.reliableMarginLeft,function(_,M){if(M)return(parseFloat(lo(_,"marginLeft"))||_.getBoundingClientRect().left-zr(_,{marginLeft:0},function(){return _.getBoundingClientRect().left}))+"px"}),m.each({margin:"",padding:"",border:"Width"},function(_,M){m.cssHooks[_+M]={expand:function(O){for(var z=0,H={},V=typeof O=="string"?O.split(" "):[O];z<4;z++)H[_+At[z]+M]=V[z]||V[z-2]||V[0];return H}},_!=="margin"&&(m.cssHooks[_+M].set=ol)}),m.fn.extend({css:function(_,M){return lt(this,function(O,z,H){var V,Y,ie={},re=0;if(Array.isArray(z)){for(V=Go(O),Y=z.length;re<Y;re++)ie[z[re]]=m.css(O,z[re],!1,V);return ie}return H!==void 0?m.style(O,z,H):m.css(O,z)},_,M,arguments.length>1)}});function _n(_,M,O,z,H){return new _n.prototype.init(_,M,O,z,H)}m.Tween=_n,_n.prototype={constructor:_n,init:function(_,M,O,z,H,V){this.elem=_,this.prop=O,this.easing=H||m.easing._default,this.options=M,this.start=this.now=this.cur(),this.end=z,this.unit=V||(m.cssNumber[O]?"":"px")},cur:function(){var _=_n.propHooks[this.prop];return _&&_.get?_.get(this):_n.propHooks._default.get(this)},run:function(_){var M,O=_n.propHooks[this.prop];return this.options.duration?this.pos=M=m.easing[this.easing](_,this.options.duration*_,0,1,this.options.duration):this.pos=M=_,this.now=(this.end-this.start)*M+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),O&&O.set?O.set(this):_n.propHooks._default.set(this),this}},_n.prototype.init.prototype=_n.prototype,_n.propHooks={_default:{get:function(_){var M;return _.elem.nodeType!==1||_.elem[_.prop]!=null&&_.elem.style[_.prop]==null?_.elem[_.prop]:(M=m.css(_.elem,_.prop,""),!M||M==="auto"?0:M)},set:function(_){m.fx.step[_.prop]?m.fx.step[_.prop](_):_.elem.nodeType===1&&(m.cssHooks[_.prop]||_.elem.style[Ja(_.prop)]!=null)?m.style(_.elem,_.prop,_.now+_.unit):_.elem[_.prop]=_.now}}},_n.propHooks.scrollTop=_n.propHooks.scrollLeft={set:function(_){_.elem.nodeType&&_.elem.parentNode&&(_.elem[_.prop]=_.now)}},m.easing={linear:function(_){return _},swing:function(_){return .5-Math.cos(_*Math.PI)/2},_default:"swing"},m.fx=_n.prototype.init,m.fx.step={};var xr,qo,co=/^(?:toggle|show|hide)$/,sl=/queueHooks$/;function Yo(){qo&&(x.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(Yo):t.setTimeout(Yo,m.fx.interval),m.fx.tick())}function ll(){return t.setTimeout(function(){xr=void 0}),xr=Date.now()}function si(_,M){var O,z=0,H={height:_};for(M=M?1:0;z<4;z+=2-M)O=At[z],H["margin"+O]=H["padding"+O]=_;return M&&(H.opacity=H.width=_),H}function Xo(_,M,O){for(var z,H=(jn.tweeners[M]||[]).concat(jn.tweeners["*"]),V=0,Y=H.length;V<Y;V++)if(z=H[V].call(O,M,_))return z}function Qu(_,M,O){var z,H,V,Y,ie,re,ue,we,Ce="width"in M||"height"in M,ge=this,$e={},st=_.style,St=_.nodeType&&Nr(_),dt=be.get(_,"fxshow");O.queue||(Y=m._queueHooks(_,"fx"),Y.unqueued==null&&(Y.unqueued=0,ie=Y.empty.fire,Y.empty.fire=function(){Y.unqueued||ie()}),Y.unqueued++,ge.always(function(){ge.always(function(){Y.unqueued--,m.queue(_,"fx").length||Y.empty.fire()})}));for(z in M)if(H=M[z],co.test(H)){if(delete M[z],V=V||H==="toggle",H===(St?"hide":"show"))if(H==="show"&&dt&&dt[z]!==void 0)St=!0;else continue;$e[z]=dt&&dt[z]||m.style(_,z)}if(re=!m.isEmptyObject(M),!(!re&&m.isEmptyObject($e))){Ce&&_.nodeType===1&&(O.overflow=[st.overflow,st.overflowX,st.overflowY],ue=dt&&dt.display,ue==null&&(ue=be.get(_,"display")),we=m.css(_,"display"),we==="none"&&(ue?we=ue:(ai([_],!0),ue=_.style.display||ue,we=m.css(_,"display"),ai([_]))),(we==="inline"||we==="inline-block"&&ue!=null)&&m.css(_,"float")==="none"&&(re||(ge.done(function(){st.display=ue}),ue==null&&(we=st.display,ue=we==="none"?"":we)),st.display="inline-block")),O.overflow&&(st.overflow="hidden",ge.always(function(){st.overflow=O.overflow[0],st.overflowX=O.overflow[1],st.overflowY=O.overflow[2]})),re=!1;for(z in $e)re||(dt?"hidden"in dt&&(St=dt.hidden):dt=be.access(_,"fxshow",{display:ue}),V&&(dt.hidden=!St),St&&ai([_],!0),ge.done(function(){St||ai([_]),be.remove(_,"fxshow");for(z in $e)m.style(_,z,$e[z])})),re=Xo(St?dt[z]:0,z,ge),z in dt||(dt[z]=re.start,St&&(re.end=re.start,re.start=0))}}function ul(_,M){var O,z,H,V,Y;for(O in _)if(z=xt(O),H=M[z],V=_[O],Array.isArray(V)&&(H=V[1],V=_[O]=V[0]),O!==z&&(_[z]=V,delete _[O]),Y=m.cssHooks[z],Y&&"expand"in Y){V=Y.expand(V),delete _[z];for(O in V)O in _||(_[O]=V[O],M[O]=H)}else M[z]=H}function jn(_,M,O){var z,H,V=0,Y=jn.prefilters.length,ie=m.Deferred().always(function(){delete re.elem}),re=function(){if(H)return!1;for(var Ce=xr||ll(),ge=Math.max(0,ue.startTime+ue.duration-Ce),$e=ge/ue.duration||0,st=1-$e,St=0,dt=ue.tweens.length;St<dt;St++)ue.tweens[St].run(st);return ie.notifyWith(_,[ue,st,ge]),st<1&&dt?ge:(dt||ie.notifyWith(_,[ue,1,0]),ie.resolveWith(_,[ue]),!1)},ue=ie.promise({elem:_,props:m.extend({},M),opts:m.extend(!0,{specialEasing:{},easing:m.easing._default},O),originalProperties:M,originalOptions:O,startTime:xr||ll(),duration:O.duration,tweens:[],createTween:function(Ce,ge){var $e=m.Tween(_,ue.opts,Ce,ge,ue.opts.specialEasing[Ce]||ue.opts.easing);return ue.tweens.push($e),$e},stop:function(Ce){var ge=0,$e=Ce?ue.tweens.length:0;if(H)return this;for(H=!0;ge<$e;ge++)ue.tweens[ge].run(1);return Ce?(ie.notifyWith(_,[ue,1,0]),ie.resolveWith(_,[ue,Ce])):ie.rejectWith(_,[ue,Ce]),this}}),we=ue.props;for(ul(we,ue.opts.specialEasing);V<Y;V++)if(z=jn.prefilters[V].call(ue,_,we,ue.opts),z)return g(z.stop)&&(m._queueHooks(ue.elem,ue.opts.queue).stop=z.stop.bind(z)),z;return m.map(we,Xo,ue),g(ue.opts.start)&&ue.opts.start.call(_,ue),ue.progress(ue.opts.progress).done(ue.opts.done,ue.opts.complete).fail(ue.opts.fail).always(ue.opts.always),m.fx.timer(m.extend(re,{elem:_,anim:ue,queue:ue.opts.queue})),ue}m.Animation=m.extend(jn,{tweeners:{"*":[function(_,M){var O=this.createTween(_,M);return Zs(O.elem,_,at.exec(M),O),O}]},tweener:function(_,M){g(_)?(M=_,_=["*"]):_=_.match(fe);for(var O,z=0,H=_.length;z<H;z++)O=_[z],jn.tweeners[O]=jn.tweeners[O]||[],jn.tweeners[O].unshift(M)},prefilters:[Qu],prefilter:function(_,M){M?jn.prefilters.unshift(_):jn.prefilters.push(_)}}),m.speed=function(_,M,O){var z=_&&typeof _=="object"?m.extend({},_):{complete:O||!O&&M||g(_)&&_,duration:_,easing:O&&M||M&&!g(M)&&M};return m.fx.off?z.duration=0:typeof z.duration!="number"&&(z.duration in m.fx.speeds?z.duration=m.fx.speeds[z.duration]:z.duration=m.fx.speeds._default),(z.queue==null||z.queue===!0)&&(z.queue="fx"),z.old=z.complete,z.complete=function(){g(z.old)&&z.old.call(this),z.queue&&m.dequeue(this,z.queue)},z},m.fn.extend({fadeTo:function(_,M,O,z){return this.filter(Nr).css("opacity",0).show().end().animate({opacity:M},_,O,z)},animate:function(_,M,O,z){var H=m.isEmptyObject(_),V=m.speed(M,O,z),Y=function(){var ie=jn(this,m.extend({},_),V);(H||be.get(this,"finish"))&&ie.stop(!0)};return Y.finish=Y,H||V.queue===!1?this.each(Y):this.queue(V.queue,Y)},stop:function(_,M,O){var z=function(H){var V=H.stop;delete H.stop,V(O)};return typeof _!="string"&&(O=M,M=_,_=void 0),M&&this.queue(_||"fx",[]),this.each(function(){var H=!0,V=_!=null&&_+"queueHooks",Y=m.timers,ie=be.get(this);if(V)ie[V]&&ie[V].stop&&z(ie[V]);else for(V in ie)ie[V]&&ie[V].stop&&sl.test(V)&&z(ie[V]);for(V=Y.length;V--;)Y[V].elem===this&&(_==null||Y[V].queue===_)&&(Y[V].anim.stop(O),H=!1,Y.splice(V,1));(H||!O)&&m.dequeue(this,_)})},finish:function(_){return _!==!1&&(_=_||"fx"),this.each(function(){var M,O=be.get(this),z=O[_+"queue"],H=O[_+"queueHooks"],V=m.timers,Y=z?z.length:0;for(O.finish=!0,m.queue(this,_,[]),H&&H.stop&&H.stop.call(this,!0),M=V.length;M--;)V[M].elem===this&&V[M].queue===_&&(V[M].anim.stop(!0),V.splice(M,1));for(M=0;M<Y;M++)z[M]&&z[M].finish&&z[M].finish.call(this);delete O.finish})}}),m.each(["toggle","show","hide"],function(_,M){var O=m.fn[M];m.fn[M]=function(z,H,V){return z==null||typeof z=="boolean"?O.apply(this,arguments):this.animate(si(M,!0),z,H,V)}}),m.each({slideDown:si("show"),slideUp:si("hide"),slideToggle:si("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(_,M){m.fn[_]=function(O,z,H){return this.animate(M,O,z,H)}}),m.timers=[],m.fx.tick=function(){var _,M=0,O=m.timers;for(xr=Date.now();M<O.length;M++)_=O[M],!_()&&O[M]===_&&O.splice(M--,1);O.length||m.fx.stop(),xr=void 0},m.fx.timer=function(_){m.timers.push(_),m.fx.start()},m.fx.interval=13,m.fx.start=function(){qo||(qo=!0,Yo())},m.fx.stop=function(){qo=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(_,M){return _=m.fx&&m.fx.speeds[_]||_,M=M||"fx",this.queue(M,function(O,z){var H=t.setTimeout(O,_);z.stop=function(){t.clearTimeout(H)}})},function(){var _=x.createElement("input"),M=x.createElement("select"),O=M.appendChild(x.createElement("option"));_.type="checkbox",p.checkOn=_.value!=="",p.optSelected=O.selected,_=x.createElement("input"),_.value="t",_.type="radio",p.radioValue=_.value==="t"}();var cl,Ai=m.expr.attrHandle;m.fn.extend({attr:function(_,M){return lt(this,m.attr,_,M,arguments.length>1)},removeAttr:function(_){return this.each(function(){m.removeAttr(this,_)})}}),m.extend({attr:function(_,M,O){var z,H,V=_.nodeType;if(!(V===3||V===8||V===2)){if(typeof _.getAttribute>"u")return m.prop(_,M,O);if((V!==1||!m.isXMLDoc(_))&&(H=m.attrHooks[M.toLowerCase()]||(m.expr.match.bool.test(M)?cl:void 0)),O!==void 0){if(O===null){m.removeAttr(_,M);return}return H&&"set"in H&&(z=H.set(_,O,M))!==void 0?z:(_.setAttribute(M,O+""),O)}return H&&"get"in H&&(z=H.get(_,M))!==null?z:(z=m.find.attr(_,M),z??void 0)}},attrHooks:{type:{set:function(_,M){if(!p.radioValue&&M==="radio"&&A(_,"input")){var O=_.value;return _.setAttribute("type",M),O&&(_.value=O),M}}}},removeAttr:function(_,M){var O,z=0,H=M&&M.match(fe);if(H&&_.nodeType===1)for(;O=H[z++];)_.removeAttribute(O)}}),cl={set:function(_,M,O){return M===!1?m.removeAttr(_,O):_.setAttribute(O,O),O}},m.each(m.expr.match.bool.source.match(/\w+/g),function(_,M){var O=Ai[M]||m.find.attr;Ai[M]=function(z,H,V){var Y,ie,re=H.toLowerCase();return V||(ie=Ai[re],Ai[re]=Y,Y=O(z,H,V)!=null?re:null,Ai[re]=ie),Y}});var Zo=/^(?:input|select|textarea|button)$/i,li=/^(?:a|area)$/i;m.fn.extend({prop:function(_,M){return lt(this,m.prop,_,M,arguments.length>1)},removeProp:function(_){return this.each(function(){delete this[m.propFix[_]||_]})}}),m.extend({prop:function(_,M,O){var z,H,V=_.nodeType;if(!(V===3||V===8||V===2))return(V!==1||!m.isXMLDoc(_))&&(M=m.propFix[M]||M,H=m.propHooks[M]),O!==void 0?H&&"set"in H&&(z=H.set(_,O,M))!==void 0?z:_[M]=O:H&&"get"in H&&(z=H.get(_,M))!==null?z:_[M]},propHooks:{tabIndex:{get:function(_){var M=m.find.attr(_,"tabindex");return M?parseInt(M,10):Zo.test(_.nodeName)||li.test(_.nodeName)&&_.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(m.propHooks.selected={get:function(_){var M=_.parentNode;return M&&M.parentNode&&M.parentNode.selectedIndex,null},set:function(_){var M=_.parentNode;M&&(M.selectedIndex,M.parentNode&&M.parentNode.selectedIndex)}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this});function ui(_){var M=_.match(fe)||[];return M.join(" ")}function ci(_){return _.getAttribute&&_.getAttribute("class")||""}function or(_){return Array.isArray(_)?_:typeof _=="string"?_.match(fe)||[]:[]}m.fn.extend({addClass:function(_){var M,O,z,H,V,Y;return g(_)?this.each(function(ie){m(this).addClass(_.call(this,ie,ci(this)))}):(M=or(_),M.length?this.each(function(){if(z=ci(this),O=this.nodeType===1&&" "+ui(z)+" ",O){for(V=0;V<M.length;V++)H=M[V],O.indexOf(" "+H+" ")<0&&(O+=H+" ");Y=ui(O),z!==Y&&this.setAttribute("class",Y)}}):this)},removeClass:function(_){var M,O,z,H,V,Y;return g(_)?this.each(function(ie){m(this).removeClass(_.call(this,ie,ci(this)))}):arguments.length?(M=or(_),M.length?this.each(function(){if(z=ci(this),O=this.nodeType===1&&" "+ui(z)+" ",O){for(V=0;V<M.length;V++)for(H=M[V];O.indexOf(" "+H+" ")>-1;)O=O.replace(" "+H+" "," ");Y=ui(O),z!==Y&&this.setAttribute("class",Y)}}):this):this.attr("class","")},toggleClass:function(_,M){var O,z,H,V,Y=typeof _,ie=Y==="string"||Array.isArray(_);return g(_)?this.each(function(re){m(this).toggleClass(_.call(this,re,ci(this),M),M)}):typeof M=="boolean"&&ie?M?this.addClass(_):this.removeClass(_):(O=or(_),this.each(function(){if(ie)for(V=m(this),H=0;H<O.length;H++)z=O[H],V.hasClass(z)?V.removeClass(z):V.addClass(z);else(_===void 0||Y==="boolean")&&(z=ci(this),z&&be.set(this,"__className__",z),this.setAttribute&&this.setAttribute("class",z||_===!1?"":be.get(this,"__className__")||""))}))},hasClass:function(_){var M,O,z=0;for(M=" "+_+" ";O=this[z++];)if(O.nodeType===1&&(" "+ui(ci(O))+" ").indexOf(M)>-1)return!0;return!1}});var ns=/\r/g;m.fn.extend({val:function(_){var M,O,z,H=this[0];return arguments.length?(z=g(_),this.each(function(V){var Y;this.nodeType===1&&(z?Y=_.call(this,V,m(this).val()):Y=_,Y==null?Y="":typeof Y=="number"?Y+="":Array.isArray(Y)&&(Y=m.map(Y,function(ie){return ie==null?"":ie+""})),M=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],(!M||!("set"in M)||M.set(this,Y,"value")===void 0)&&(this.value=Y))})):H?(M=m.valHooks[H.type]||m.valHooks[H.nodeName.toLowerCase()],M&&"get"in M&&(O=M.get(H,"value"))!==void 0?O:(O=H.value,typeof O=="string"?O.replace(ns,""):O??"")):void 0}}),m.extend({valHooks:{option:{get:function(_){var M=m.find.attr(_,"value");return M??ui(m.text(_))}},select:{get:function(_){var M,O,z,H=_.options,V=_.selectedIndex,Y=_.type==="select-one",ie=Y?null:[],re=Y?V+1:H.length;for(V<0?z=re:z=Y?V:0;z<re;z++)if(O=H[z],(O.selected||z===V)&&!O.disabled&&(!O.parentNode.disabled||!A(O.parentNode,"optgroup"))){if(M=m(O).val(),Y)return M;ie.push(M)}return ie},set:function(_,M){for(var O,z,H=_.options,V=m.makeArray(M),Y=H.length;Y--;)z=H[Y],(z.selected=m.inArray(m.valHooks.option.get(z),V)>-1)&&(O=!0);return O||(_.selectedIndex=-1),V}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(_,M){if(Array.isArray(M))return _.checked=m.inArray(m(_).val(),M)>-1}},p.checkOn||(m.valHooks[this].get=function(_){return _.getAttribute("value")===null?"on":_.value})});var fo=t.location,dl={guid:Date.now()},rs=/\?/;m.parseXML=function(_){var M,O;if(!_||typeof _!="string")return null;try{M=new t.DOMParser().parseFromString(_,"text/xml")}catch{}return O=M&&M.getElementsByTagName("parsererror")[0],(!M||O)&&m.error("Invalid XML: "+(O?m.map(O.childNodes,function(z){return z.textContent}).join(`
`):_)),M};var ho=/^(?:focusinfocus|focusoutblur)$/,ar=function(_){_.stopPropagation()};m.extend(m.event,{trigger:function(_,M,O,z){var H,V,Y,ie,re,ue,we,Ce,ge=[O||x],$e=l.call(_,"type")?_.type:_,st=l.call(_,"namespace")?_.namespace.split("."):[];if(V=Ce=Y=O=O||x,!(O.nodeType===3||O.nodeType===8)&&!ho.test($e+m.event.triggered)&&($e.indexOf(".")>-1&&(st=$e.split("."),$e=st.shift(),st.sort()),re=$e.indexOf(":")<0&&"on"+$e,_=_[m.expando]?_:new m.Event($e,typeof _=="object"&&_),_.isTrigger=z?2:3,_.namespace=st.join("."),_.rnamespace=_.namespace?new RegExp("(^|\\.)"+st.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,_.result=void 0,_.target||(_.target=O),M=M==null?[_]:m.makeArray(M,[_]),we=m.event.special[$e]||{},!(!z&&we.trigger&&we.trigger.apply(O,M)===!1))){if(!z&&!we.noBubble&&!y(O)){for(ie=we.delegateType||$e,ho.test(ie+$e)||(V=V.parentNode);V;V=V.parentNode)ge.push(V),Y=V;Y===(O.ownerDocument||x)&&ge.push(Y.defaultView||Y.parentWindow||t)}for(H=0;(V=ge[H++])&&!_.isPropagationStopped();)Ce=V,_.type=H>1?ie:we.bindType||$e,ue=(be.get(V,"events")||Object.create(null))[_.type]&&be.get(V,"handle"),ue&&ue.apply(V,M),ue=re&&V[re],ue&&ue.apply&&ve(V)&&(_.result=ue.apply(V,M),_.result===!1&&_.preventDefault());return _.type=$e,!z&&!_.isDefaultPrevented()&&(!we._default||we._default.apply(ge.pop(),M)===!1)&&ve(O)&&re&&g(O[$e])&&!y(O)&&(Y=O[re],Y&&(O[re]=null),m.event.triggered=$e,_.isPropagationStopped()&&Ce.addEventListener($e,ar),O[$e](),_.isPropagationStopped()&&Ce.removeEventListener($e,ar),m.event.triggered=void 0,Y&&(O[re]=Y)),_.result}},simulate:function(_,M,O){var z=m.extend(new m.Event,O,{type:_,isSimulated:!0});m.event.trigger(z,null,M)}}),m.fn.extend({trigger:function(_,M){return this.each(function(){m.event.trigger(_,M,this)})},triggerHandler:function(_,M){var O=this[0];if(O)return m.event.trigger(_,M,O,!0)}});var Qo=/\[\]$/,Jo=/\r?\n/g,ea=/^(?:submit|button|image|reset|file)$/i,fl=/^(?:input|select|textarea|keygen)/i;function di(_,M,O,z){var H;if(Array.isArray(M))m.each(M,function(V,Y){O||Qo.test(_)?z(_,Y):di(_+"["+(typeof Y=="object"&&Y!=null?V:"")+"]",Y,O,z)});else if(!O&&v(M)==="object")for(H in M)di(_+"["+H+"]",M[H],O,z);else z(_,M)}m.param=function(_,M){var O,z=[],H=function(V,Y){var ie=g(Y)?Y():Y;z[z.length]=encodeURIComponent(V)+"="+encodeURIComponent(ie??"")};if(_==null)return"";if(Array.isArray(_)||_.jquery&&!m.isPlainObject(_))m.each(_,function(){H(this.name,this.value)});else for(O in _)di(O,_[O],M,H);return z.join("&")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var _=m.prop(this,"elements");return _?m.makeArray(_):this}).filter(function(){var _=this.type;return this.name&&!m(this).is(":disabled")&&fl.test(this.nodeName)&&!ea.test(_)&&(this.checked||!Sr.test(_))}).map(function(_,M){var O=m(this).val();return O==null?null:Array.isArray(O)?m.map(O,function(z){return{name:M.name,value:z.replace(Jo,`\r
`)}}):{name:M.name,value:O.replace(Jo,`\r
`)}}).get()}});var hl=/%20/g,Hr=/#.*$/,Mi=/([?&])_=[^&]*/,pl=/^(.*?):[ \t]*([^\r\n]*)$/mg,Li=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,gl=/^(?:GET|HEAD)$/,ml=/^\/\//,vl={},is={},ee="*/".concat("*"),le=x.createElement("a");le.href=fo.href;function K(_){return function(M,O){typeof M!="string"&&(O=M,M="*");var z,H=0,V=M.toLowerCase().match(fe)||[];if(g(O))for(;z=V[H++];)z[0]==="+"?(z=z.slice(1)||"*",(_[z]=_[z]||[]).unshift(O)):(_[z]=_[z]||[]).push(O)}}function te(_,M,O,z){var H={},V=_===is;function Y(ie){var re;return H[ie]=!0,m.each(_[ie]||[],function(ue,we){var Ce=we(M,O,z);if(typeof Ce=="string"&&!V&&!H[Ce])return M.dataTypes.unshift(Ce),Y(Ce),!1;if(V)return!(re=Ce)}),re}return Y(M.dataTypes[0])||!H["*"]&&Y("*")}function de(_,M){var O,z,H=m.ajaxSettings.flatOptions||{};for(O in M)M[O]!==void 0&&((H[O]?_:z||(z={}))[O]=M[O]);return z&&m.extend(!0,_,z),_}function ke(_,M,O){for(var z,H,V,Y,ie=_.contents,re=_.dataTypes;re[0]==="*";)re.shift(),z===void 0&&(z=_.mimeType||M.getResponseHeader("Content-Type"));if(z){for(H in ie)if(ie[H]&&ie[H].test(z)){re.unshift(H);break}}if(re[0]in O)V=re[0];else{for(H in O){if(!re[0]||_.converters[H+" "+re[0]]){V=H;break}Y||(Y=H)}V=V||Y}if(V)return V!==re[0]&&re.unshift(V),O[V]}function We(_,M,O,z){var H,V,Y,ie,re,ue={},we=_.dataTypes.slice();if(we[1])for(Y in _.converters)ue[Y.toLowerCase()]=_.converters[Y];for(V=we.shift();V;)if(_.responseFields[V]&&(O[_.responseFields[V]]=M),!re&&z&&_.dataFilter&&(M=_.dataFilter(M,_.dataType)),re=V,V=we.shift(),V){if(V==="*")V=re;else if(re!=="*"&&re!==V){if(Y=ue[re+" "+V]||ue["* "+V],!Y){for(H in ue)if(ie=H.split(" "),ie[1]===V&&(Y=ue[re+" "+ie[0]]||ue["* "+ie[0]],Y)){Y===!0?Y=ue[H]:ue[H]!==!0&&(V=ie[0],we.unshift(ie[1]));break}}if(Y!==!0)if(Y&&_.throws)M=Y(M);else try{M=Y(M)}catch(Ce){return{state:"parsererror",error:Y?Ce:"No conversion from "+re+" to "+V}}}}return{state:"success",data:M}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fo.href,type:"GET",isLocal:Li.test(fo.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ee,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(_,M){return M?de(de(_,m.ajaxSettings),M):de(m.ajaxSettings,_)},ajaxPrefilter:K(vl),ajaxTransport:K(is),ajax:function(_,M){typeof _=="object"&&(M=_,_=void 0),M=M||{};var O,z,H,V,Y,ie,re,ue,we,Ce,ge=m.ajaxSetup({},M),$e=ge.context||ge,st=ge.context&&($e.nodeType||$e.jquery)?m($e):m.event,St=m.Deferred(),dt=m.Callbacks("once memory"),Tn=ge.statusCode||{},gn={},Ri={},Pi="canceled",yt={readyState:0,getResponseHeader:function(_t){var en;if(re){if(!V)for(V={};en=pl.exec(H);)V[en[1].toLowerCase()+" "]=(V[en[1].toLowerCase()+" "]||[]).concat(en[2]);en=V[_t.toLowerCase()+" "]}return en==null?null:en.join(", ")},getAllResponseHeaders:function(){return re?H:null},setRequestHeader:function(_t,en){return re==null&&(_t=Ri[_t.toLowerCase()]=Ri[_t.toLowerCase()]||_t,gn[_t]=en),this},overrideMimeType:function(_t){return re==null&&(ge.mimeType=_t),this},statusCode:function(_t){var en;if(_t)if(re)yt.always(_t[yt.status]);else for(en in _t)Tn[en]=[Tn[en],_t[en]];return this},abort:function(_t){var en=_t||Pi;return O&&O.abort(en),os(0,en),this}};if(St.promise(yt),ge.url=((_||ge.url||fo.href)+"").replace(ml,fo.protocol+"//"),ge.type=M.method||M.type||ge.method||ge.type,ge.dataTypes=(ge.dataType||"*").toLowerCase().match(fe)||[""],ge.crossDomain==null){ie=x.createElement("a");try{ie.href=ge.url,ie.href=ie.href,ge.crossDomain=le.protocol+"//"+le.host!=ie.protocol+"//"+ie.host}catch{ge.crossDomain=!0}}if(ge.data&&ge.processData&&typeof ge.data!="string"&&(ge.data=m.param(ge.data,ge.traditional)),te(vl,ge,M,yt),re)return yt;ue=m.event&&ge.global,ue&&m.active++===0&&m.event.trigger("ajaxStart"),ge.type=ge.type.toUpperCase(),ge.hasContent=!gl.test(ge.type),z=ge.url.replace(Hr,""),ge.hasContent?ge.data&&ge.processData&&(ge.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(ge.data=ge.data.replace(hl,"+")):(Ce=ge.url.slice(z.length),ge.data&&(ge.processData||typeof ge.data=="string")&&(z+=(rs.test(z)?"&":"?")+ge.data,delete ge.data),ge.cache===!1&&(z=z.replace(Mi,"$1"),Ce=(rs.test(z)?"&":"?")+"_="+dl.guid+++Ce),ge.url=z+Ce),ge.ifModified&&(m.lastModified[z]&&yt.setRequestHeader("If-Modified-Since",m.lastModified[z]),m.etag[z]&&yt.setRequestHeader("If-None-Match",m.etag[z])),(ge.data&&ge.hasContent&&ge.contentType!==!1||M.contentType)&&yt.setRequestHeader("Content-Type",ge.contentType),yt.setRequestHeader("Accept",ge.dataTypes[0]&&ge.accepts[ge.dataTypes[0]]?ge.accepts[ge.dataTypes[0]]+(ge.dataTypes[0]!=="*"?", "+ee+"; q=0.01":""):ge.accepts["*"]);for(we in ge.headers)yt.setRequestHeader(we,ge.headers[we]);if(ge.beforeSend&&(ge.beforeSend.call($e,yt,ge)===!1||re))return yt.abort();if(Pi="abort",dt.add(ge.complete),yt.done(ge.success),yt.fail(ge.error),O=te(is,ge,M,yt),!O)os(-1,"No Transport");else{if(yt.readyState=1,ue&&st.trigger("ajaxSend",[yt,ge]),re)return yt;ge.async&&ge.timeout>0&&(Y=t.setTimeout(function(){yt.abort("timeout")},ge.timeout));try{re=!1,O.send(gn,os)}catch(_t){if(re)throw _t;os(-1,_t)}}function os(_t,en,Ju,Rm){var Ii,ec,Oi,ta,na,Vr=en;re||(re=!0,Y&&t.clearTimeout(Y),O=void 0,H=Rm||"",yt.readyState=_t>0?4:0,Ii=_t>=200&&_t<300||_t===304,Ju&&(ta=ke(ge,yt,Ju)),!Ii&&m.inArray("script",ge.dataTypes)>-1&&m.inArray("json",ge.dataTypes)<0&&(ge.converters["text script"]=function(){}),ta=We(ge,ta,yt,Ii),Ii?(ge.ifModified&&(na=yt.getResponseHeader("Last-Modified"),na&&(m.lastModified[z]=na),na=yt.getResponseHeader("etag"),na&&(m.etag[z]=na)),_t===204||ge.type==="HEAD"?Vr="nocontent":_t===304?Vr="notmodified":(Vr=ta.state,ec=ta.data,Oi=ta.error,Ii=!Oi)):(Oi=Vr,(_t||!Vr)&&(Vr="error",_t<0&&(_t=0))),yt.status=_t,yt.statusText=(en||Vr)+"",Ii?St.resolveWith($e,[ec,Vr,yt]):St.rejectWith($e,[yt,Vr,Oi]),yt.statusCode(Tn),Tn=void 0,ue&&st.trigger(Ii?"ajaxSuccess":"ajaxError",[yt,ge,Ii?ec:Oi]),dt.fireWith($e,[yt,Vr]),ue&&(st.trigger("ajaxComplete",[yt,ge]),--m.active||m.event.trigger("ajaxStop")))}return yt},getJSON:function(_,M,O){return m.get(_,M,O,"json")},getScript:function(_,M){return m.get(_,void 0,M,"script")}}),m.each(["get","post"],function(_,M){m[M]=function(O,z,H,V){return g(z)&&(V=V||H,H=z,z=void 0),m.ajax(m.extend({url:O,type:M,dataType:V,data:z,success:H},m.isPlainObject(O)&&O))}}),m.ajaxPrefilter(function(_){var M;for(M in _.headers)M.toLowerCase()==="content-type"&&(_.contentType=_.headers[M]||"")}),m._evalUrl=function(_,M,O){return m.ajax({url:_,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(z){m.globalEval(z,M,O)}})},m.fn.extend({wrapAll:function(_){var M;return this[0]&&(g(_)&&(_=_.call(this[0])),M=m(_,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&M.insertBefore(this[0]),M.map(function(){for(var O=this;O.firstElementChild;)O=O.firstElementChild;return O}).append(this)),this},wrapInner:function(_){return g(_)?this.each(function(M){m(this).wrapInner(_.call(this,M))}):this.each(function(){var M=m(this),O=M.contents();O.length?O.wrapAll(_):M.append(_)})},wrap:function(_){var M=g(_);return this.each(function(O){m(this).wrapAll(M?_.call(this,O):_)})},unwrap:function(_){return this.parent(_).not("body").each(function(){m(this).replaceWith(this.childNodes)}),this}}),m.expr.pseudos.hidden=function(_){return!m.expr.pseudos.visible(_)},m.expr.pseudos.visible=function(_){return!!(_.offsetWidth||_.offsetHeight||_.getClientRects().length)},m.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var tt={0:200,1223:204},nt=m.ajaxSettings.xhr();p.cors=!!nt&&"withCredentials"in nt,p.ajax=nt=!!nt,m.ajaxTransport(function(_){var M,O;if(p.cors||nt&&!_.crossDomain)return{send:function(z,H){var V,Y=_.xhr();if(Y.open(_.type,_.url,_.async,_.username,_.password),_.xhrFields)for(V in _.xhrFields)Y[V]=_.xhrFields[V];_.mimeType&&Y.overrideMimeType&&Y.overrideMimeType(_.mimeType),!_.crossDomain&&!z["X-Requested-With"]&&(z["X-Requested-With"]="XMLHttpRequest");for(V in z)Y.setRequestHeader(V,z[V]);M=function(ie){return function(){M&&(M=O=Y.onload=Y.onerror=Y.onabort=Y.ontimeout=Y.onreadystatechange=null,ie==="abort"?Y.abort():ie==="error"?typeof Y.status!="number"?H(0,"error"):H(Y.status,Y.statusText):H(tt[Y.status]||Y.status,Y.statusText,(Y.responseType||"text")!=="text"||typeof Y.responseText!="string"?{binary:Y.response}:{text:Y.responseText},Y.getAllResponseHeaders()))}},Y.onload=M(),O=Y.onerror=Y.ontimeout=M("error"),Y.onabort!==void 0?Y.onabort=O:Y.onreadystatechange=function(){Y.readyState===4&&t.setTimeout(function(){M&&O()})},M=M("abort");try{Y.send(_.hasContent&&_.data||null)}catch(ie){if(M)throw ie}},abort:function(){M&&M()}}}),m.ajaxPrefilter(function(_){_.crossDomain&&(_.contents.script=!1)}),m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(_){return m.globalEval(_),_}}}),m.ajaxPrefilter("script",function(_){_.cache===void 0&&(_.cache=!1),_.crossDomain&&(_.type="GET")}),m.ajaxTransport("script",function(_){if(_.crossDomain||_.scriptAttrs){var M,O;return{send:function(z,H){M=m("<script>").attr(_.scriptAttrs||{}).prop({charset:_.scriptCharset,src:_.url}).on("load error",O=function(V){M.remove(),O=null,V&&H(V.type==="error"?404:200,V.type)}),x.head.appendChild(M[0])},abort:function(){O&&O()}}}});var je=[],ct=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var _=je.pop()||m.expando+"_"+dl.guid++;return this[_]=!0,_}}),m.ajaxPrefilter("json jsonp",function(_,M,O){var z,H,V,Y=_.jsonp!==!1&&(ct.test(_.url)?"url":typeof _.data=="string"&&(_.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&ct.test(_.data)&&"data");if(Y||_.dataTypes[0]==="jsonp")return z=_.jsonpCallback=g(_.jsonpCallback)?_.jsonpCallback():_.jsonpCallback,Y?_[Y]=_[Y].replace(ct,"$1"+z):_.jsonp!==!1&&(_.url+=(rs.test(_.url)?"&":"?")+_.jsonp+"="+z),_.converters["script json"]=function(){return V||m.error(z+" was not called"),V[0]},_.dataTypes[0]="json",H=t[z],t[z]=function(){V=arguments},O.always(function(){H===void 0?m(t).removeProp(z):t[z]=H,_[z]&&(_.jsonpCallback=M.jsonpCallback,je.push(z)),V&&g(H)&&H(V[0]),V=H=void 0}),"script"}),p.createHTMLDocument=function(){var _=x.implementation.createHTMLDocument("").body;return _.innerHTML="<form></form><form></form>",_.childNodes.length===2}(),m.parseHTML=function(_,M,O){if(typeof _!="string")return[];typeof M=="boolean"&&(O=M,M=!1);var z,H,V;return M||(p.createHTMLDocument?(M=x.implementation.createHTMLDocument(""),z=M.createElement("base"),z.href=x.location.href,M.head.appendChild(z)):M=x),H=X.exec(_),V=!O&&[],H?[M.createElement(H[1])]:(H=Js([_],M,V),V&&V.length&&m(V).remove(),m.merge([],H.childNodes))},m.fn.load=function(_,M,O){var z,H,V,Y=this,ie=_.indexOf(" ");return ie>-1&&(z=ui(_.slice(ie)),_=_.slice(0,ie)),g(M)?(O=M,M=void 0):M&&typeof M=="object"&&(H="POST"),Y.length>0&&m.ajax({url:_,type:H||"GET",dataType:"html",data:M}).done(function(re){V=arguments,Y.html(z?m("<div>").append(m.parseHTML(re)).find(z):re)}).always(O&&function(re,ue){Y.each(function(){O.apply(this,V||[re.responseText,ue,re])})}),this},m.expr.pseudos.animated=function(_){return m.grep(m.timers,function(M){return _===M.elem}).length},m.offset={setOffset:function(_,M,O){var z,H,V,Y,ie,re,ue,we=m.css(_,"position"),Ce=m(_),ge={};we==="static"&&(_.style.position="relative"),ie=Ce.offset(),V=m.css(_,"top"),re=m.css(_,"left"),ue=(we==="absolute"||we==="fixed")&&(V+re).indexOf("auto")>-1,ue?(z=Ce.position(),Y=z.top,H=z.left):(Y=parseFloat(V)||0,H=parseFloat(re)||0),g(M)&&(M=M.call(_,O,m.extend({},ie))),M.top!=null&&(ge.top=M.top-ie.top+Y),M.left!=null&&(ge.left=M.left-ie.left+H),"using"in M?M.using.call(_,ge):Ce.css(ge)}},m.fn.extend({offset:function(_){if(arguments.length)return _===void 0?this:this.each(function(H){m.offset.setOffset(this,_,H)});var M,O,z=this[0];if(z)return z.getClientRects().length?(M=z.getBoundingClientRect(),O=z.ownerDocument.defaultView,{top:M.top+O.pageYOffset,left:M.left+O.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var _,M,O,z=this[0],H={top:0,left:0};if(m.css(z,"position")==="fixed")M=z.getBoundingClientRect();else{for(M=this.offset(),O=z.ownerDocument,_=z.offsetParent||O.documentElement;_&&(_===O.body||_===O.documentElement)&&m.css(_,"position")==="static";)_=_.parentNode;_&&_!==z&&_.nodeType===1&&(H=m(_).offset(),H.top+=m.css(_,"borderTopWidth",!0),H.left+=m.css(_,"borderLeftWidth",!0))}return{top:M.top-H.top-m.css(z,"marginTop",!0),left:M.left-H.left-m.css(z,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var _=this.offsetParent;_&&m.css(_,"position")==="static";)_=_.offsetParent;return _||un})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(_,M){var O=M==="pageYOffset";m.fn[_]=function(z){return lt(this,function(H,V,Y){var ie;if(y(H)?ie=H:H.nodeType===9&&(ie=H.defaultView),Y===void 0)return ie?ie[M]:H[V];ie?ie.scrollTo(O?ie.pageXOffset:Y,O?Y:ie.pageYOffset):H[V]=Y},_,z,arguments.length)}}),m.each(["top","left"],function(_,M){m.cssHooks[M]=uo(p.pixelPosition,function(O,z){if(z)return z=lo(O,M),Xa.test(z)?m(O).position()[M]+"px":z})}),m.each({Height:"height",Width:"width"},function(_,M){m.each({padding:"inner"+_,content:M,"":"outer"+_},function(O,z){m.fn[z]=function(H,V){var Y=arguments.length&&(O||typeof H!="boolean"),ie=O||(H===!0||V===!0?"margin":"border");return lt(this,function(re,ue,we){var Ce;return y(re)?z.indexOf("outer")===0?re["inner"+_]:re.document.documentElement["client"+_]:re.nodeType===9?(Ce=re.documentElement,Math.max(re.body["scroll"+_],Ce["scroll"+_],re.body["offset"+_],Ce["offset"+_],Ce["client"+_])):we===void 0?m.css(re,ue,ie):m.style(re,ue,we,ie)},M,Y?H:void 0,Y)}})}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(_,M){m.fn[M]=function(O){return this.on(M,O)}}),m.fn.extend({bind:function(_,M,O){return this.on(_,null,M,O)},unbind:function(_,M){return this.off(_,null,M)},delegate:function(_,M,O,z){return this.on(M,_,O,z)},undelegate:function(_,M,O){return arguments.length===1?this.off(_,"**"):this.off(M,_||"**",O)},hover:function(_,M){return this.mouseenter(_).mouseleave(M||_)}}),m.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(_,M){m.fn[M]=function(O,z){return arguments.length>0?this.on(M,null,O,z):this.trigger(M)}});var zt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;m.proxy=function(_,M){var O,z,H;if(typeof M=="string"&&(O=_[M],M=_,_=O),!!g(_))return z=o.call(arguments,2),H=function(){return _.apply(M||this,z.concat(o.call(arguments)))},H.guid=_.guid=_.guid||m.guid++,H},m.holdReady=function(_){_?m.readyWait++:m.ready(!0)},m.isArray=Array.isArray,m.parseJSON=JSON.parse,m.nodeName=A,m.isFunction=g,m.isWindow=y,m.camelCase=xt,m.type=v,m.now=Date.now,m.isNumeric=function(_){var M=m.type(_);return(M==="number"||M==="string")&&!isNaN(_-parseFloat(_))},m.trim=function(_){return _==null?"":(_+"").replace(zt,"$1")};var kt=t.jQuery,dn=t.$;return m.noConflict=function(_){return t.$===m&&(t.$=dn),_&&t.jQuery===m&&(t.jQuery=kt),m},typeof n>"u"&&(t.jQuery=t.$=m),m})})(s2);var OR=s2.exports;const Jn=ki(OR);class hg{static init(t){return new hg(t)}enable(){this.enabled=!0}disable(){this.enabled=!1}group(t){this.enabled&&console.group(t)}groupEnd(){this.enabled&&console.groupEnd()}debug(...t){this.enabled&&console.log("CozyNest:DEBUG:",...t)}log(...t){console.log("CozyNest:",...t)}error(...t){console.error("CozyNest:",...t)}constructor(t){this.enabled=t}}const FR=!1,$t=hg.init(FR),ss=hg.init({}.PROMPT_LOGGING===1);window.CozyLogger=$t;const ys=class{static time(t){return ys.timers[t]=new ys(t),ys.timers[t]}static end(t){const n=ys.timers[t].end();return $t.debug(`SimpleTimer: end ${t} in ${n}ms`),n}static last(t){return localStorage.getItem(t)&&Number(localStorage.getItem(t))}static get(t){return ys.timers[t].get()}constructor(t){this.timerName=t,this.startTime=new Date}get(){return new Date-this.startTime}end(){const n=new Date-this.startTime;return localStorage.setItem(this.timerName,`${n}`),n}};let Cr=ys;zm(Cr,"timers",{});const Xh="CozyNest:tweakLoadDuration",bu="CozyNest:gradioLoadDuration",iS=420,oS=320,Zh=200,DR="unknown",Fa="sd.next",l2="auto1111",u2={clear_prompt(e){return`${e}_clear_prompt`},extra_networks_btn(e){return`${e}_extra_networks`}},c2={clear_prompt(e){return`${e}_clear_prompt_btn`},extra_networks_btn(e){return`${e}_extra_networks_btn`}},sh=Object.keys(u2),lh=Object.keys(c2),NR=sh.length,zR=lh.length;NR!==zR?(console.warn("Cozy-Nest: a1111 and sdNext do not have the same number of keys."),console.warn("Cozy-Nest: a1111 keys: ",sh),console.warn("Cozy-Nest: sdNext keys: ",lh)):sh.forEach((e,t)=>{e!==lh[t]&&(console.warn("Cozy-Nest: a1111 and sdNext do not have the same keys."),console.warn("Cozy-Nest: a1111 keys: ",sh),console.warn("Cozy-Nest: sdNext keys: ",lh))});const wu={get(e){let t;return COZY_NEST_CONFIG.webui===Fa?t=c2:t=u2,t[e]||console.warn(`Cozy-Nest: DOM ID ${e} not found.`),t[e]}};var d2={exports:{}},pg={},f2={exports:{}},bt={};/**
* @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 zd=Symbol.for("react.element"),jR=Symbol.for("react.portal"),BR=Symbol.for("react.fragment"),HR=Symbol.for("react.strict_mode"),VR=Symbol.for("react.profiler"),WR=Symbol.for("react.provider"),UR=Symbol.for("react.context"),GR=Symbol.for("react.forward_ref"),KR=Symbol.for("react.suspense"),qR=Symbol.for("react.memo"),YR=Symbol.for("react.lazy"),aS=Symbol.iterator;function XR(e){return e===null||typeof e!="object"?null:(e=aS&&e[aS]||e["@@iterator"],typeof e=="function"?e:null)}var h2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p2=Object.assign,g2={};function Bu(e,t,n){this.props=e,this.context=t,this.refs=g2,this.updater=n||h2}Bu.prototype.isReactComponent={};Bu.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")};Bu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function m2(){}m2.prototype=Bu.prototype;function kb(e,t,n){this.props=e,this.context=t,this.refs=g2,this.updater=n||h2}var Eb=kb.prototype=new m2;Eb.constructor=kb;p2(Eb,Bu.prototype);Eb.isPureReactComponent=!0;var sS=Array.isArray,v2=Object.prototype.hasOwnProperty,$b={current:null},y2={key:!0,ref:!0,__self:!0,__source:!0};function b2(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)v2.call(t,r)&&!y2.hasOwnProperty(r)&&(i[r]=t[r]);var d=arguments.length-2;if(d===1)i.children=n;else if(1<d){for(var a=Array(d),c=0;c<d;c++)a[c]=arguments[c+2];i.children=a}if(e&&e.defaultProps)for(r in d=e.defaultProps,d)i[r]===void 0&&(i[r]=d[r]);return{$$typeof:zd,type:e,key:o,ref:s,props:i,_owner:$b.current}}function ZR(e,t){return{$$typeof:zd,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Tb(e){return typeof e=="object"&&e!==null&&e.$$typeof===zd}function QR(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var lS=/\/+/g;function jm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?QR(""+e.key):t.toString(36)}function uh(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case zd:case jR:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+jm(s,0):r,sS(i)?(n="",e!=null&&(n=e.replace(lS,"$&/")+"/"),uh(i,t,n,"",function(c){return c})):i!=null&&(Tb(i)&&(i=ZR(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(lS,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",sS(e))for(var d=0;d<e.length;d++){o=e[d];var a=r+jm(o,d);s+=uh(o,t,n,a,i)}else if(a=XR(e),typeof a=="function")for(e=a.call(e),d=0;!(o=e.next()).done;)o=o.value,a=r+jm(o,d++),s+=uh(o,t,n,a,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function vf(e,t,n){if(e==null)return e;var r=[],i=0;return uh(e,r,"","",function(o){return t.call(n,o,i++)}),r}function JR(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var nr={current:null},ch={transition:null},eP={ReactCurrentDispatcher:nr,ReactCurrentBatchConfig:ch,ReactCurrentOwner:$b};bt.Children={map:vf,forEach:function(e,t,n){vf(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return vf(e,function(){t++}),t},toArray:function(e){return vf(e,function(t){return t})||[]},only:function(e){if(!Tb(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};bt.Component=Bu;bt.Fragment=BR;bt.Profiler=VR;bt.PureComponent=kb;bt.StrictMode=HR;bt.Suspense=KR;bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eP;bt.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=p2({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=$b.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var d=e.type.defaultProps;for(a in t)v2.call(t,a)&&!y2.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&d!==void 0?d[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){d=Array(a);for(var c=0;c<a;c++)d[c]=arguments[c+2];r.children=d}return{$$typeof:zd,type:e.type,key:i,ref:o,props:r,_owner:s}};bt.createContext=function(e){return e={$$typeof:UR,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:WR,_context:e},e.Consumer=e};bt.createElement=b2;bt.createFactory=function(e){var t=b2.bind(null,e);return t.type=e,t};bt.createRef=function(){return{current:null}};bt.forwardRef=function(e){return{$$typeof:GR,render:e}};bt.isValidElement=Tb;bt.lazy=function(e){return{$$typeof:YR,_payload:{_status:-1,_result:e},_init:JR}};bt.memo=function(e,t){return{$$typeof:qR,type:e,compare:t===void 0?null:t}};bt.startTransition=function(e){var t=ch.transition;ch.transition={};try{e()}finally{ch.transition=t}};bt.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};bt.useCallback=function(e,t){return nr.current.useCallback(e,t)};bt.useContext=function(e){return nr.current.useContext(e)};bt.useDebugValue=function(){};bt.useDeferredValue=function(e){return nr.current.useDeferredValue(e)};bt.useEffect=function(e,t){return nr.current.useEffect(e,t)};bt.useId=function(){return nr.current.useId()};bt.useImperativeHandle=function(e,t,n){return nr.current.useImperativeHandle(e,t,n)};bt.useInsertionEffect=function(e,t){return nr.current.useInsertionEffect(e,t)};bt.useLayoutEffect=function(e,t){return nr.current.useLayoutEffect(e,t)};bt.useMemo=function(e,t){return nr.current.useMemo(e,t)};bt.useReducer=function(e,t,n){return nr.current.useReducer(e,t,n)};bt.useRef=function(e){return nr.current.useRef(e)};bt.useState=function(e){return nr.current.useState(e)};bt.useSyncExternalStore=function(e,t,n){return nr.current.useSyncExternalStore(e,t,n)};bt.useTransition=function(){return nr.current.useTransition()};bt.version="18.2.0";f2.exports=bt;var F=f2.exports;const Le=ki(F),uS=LR({__proto__:null,default:Le},[F]);/**
* @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 tP=F,nP=Symbol.for("react.element"),rP=Symbol.for("react.fragment"),iP=Object.prototype.hasOwnProperty,oP=tP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,aP={key:!0,ref:!0,__self:!0,__source:!0};function w2(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)iP.call(t,r)&&!aP.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:nP,type:e,key:o,ref:s,props:i,_owner:oP.current}}pg.Fragment=rP;pg.jsx=w2;pg.jsxs=w2;d2.exports=pg;var j=d2.exports,Da={},S2={exports:{}},Rr={},x2={exports:{}},_2={};/**
* @license React
* scheduler.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.
*/(function(e){function t(N,B){var Z=N.length;N.push(B);e:for(;0<Z;){var U=Z-1>>>1,X=N[U];if(0<i(X,B))N[U]=B,N[Z]=X,Z=U;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var B=N[0],Z=N.pop();if(Z!==B){N[0]=Z;e:for(var U=0,X=N.length,W=X>>>1;U<W;){var q=2*(U+1)-1,Q=N[q],G=q+1,oe=N[G];if(0>i(Q,Z))G<X&&0>i(oe,Q)?(N[U]=oe,N[G]=Z,U=G):(N[U]=Q,N[q]=Z,U=q);else if(G<X&&0>i(oe,Z))N[U]=oe,N[G]=Z,U=G;else break e}}return B}function i(N,B){var Z=N.sortIndex-B.sortIndex;return Z!==0?Z:N.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,d=s.now();e.unstable_now=function(){return s.now()-d}}var a=[],c=[],u=1,l=null,f=3,h=!1,p=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(N){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=N)r(c),B.sortIndex=B.expirationTime,t(a,B);else break;B=n(c)}}function v(N){if(g=!1,E(N),!p)if(n(a)!==null)p=!0,P(w);else{var B=n(c);B!==null&&D(v,B.startTime-N)}}function w(N,B){p=!1,g&&(g=!1,x($),$=-1),h=!0;var Z=f;try{for(E(B),l=n(a);l!==null&&(!(l.expirationTime>B)||N&&!k());){var U=l.callback;if(typeof U=="function"){l.callback=null,f=l.priorityLevel;var X=U(l.expirationTime<=B);B=e.unstable_now(),typeof X=="function"?l.callback=X:l===n(a)&&r(a),E(B)}else r(a);l=n(a)}if(l!==null)var W=!0;else{var q=n(c);q!==null&&D(v,q.startTime-B),W=!1}return W}finally{l=null,f=Z,h=!1}}var b=!1,m=null,$=-1,A=5,C=-1;function k(){return!(e.unstable_now()-C<A)}function I(){if(m!==null){var N=e.unstable_now();C=N;var B=!0;try{B=m(!0,N)}finally{B?L():(b=!1,m=null)}}else b=!1}var L;if(typeof S=="function")L=function(){S(I)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,R=T.port2;T.port1.onmessage=I,L=function(){R.postMessage(null)}}else L=function(){y(I,0)};function P(N){m=N,b||(b=!0,L())}function D(N,B){$=y(function(){N(e.unstable_now())},B)}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(N){N.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,P(w))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var B=3;break;default:B=f}var Z=f;f=B;try{return N()}finally{f=Z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,B){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var Z=f;f=N;try{return B()}finally{f=Z}},e.unstable_scheduleCallback=function(N,B,Z){var U=e.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?U+Z:U):Z=U,N){case 1:var X=-1;break;case 2:X=250;break;case 5:X=1073741823;break;case 4:X=1e4;break;default:X=5e3}return X=Z+X,N={id:u++,callback:B,priorityLevel:N,startTime:Z,expirationTime:X,sortIndex:-1},Z>U?(N.sortIndex=Z,t(c,N),n(a)===null&&N===n(c)&&(g?(x($),$=-1):g=!0,D(v,Z-U))):(N.sortIndex=X,t(a,N),p||h||(p=!0,P(w))),N},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(N){var B=f;return function(){var Z=f;f=B;try{return N.apply(this,arguments)}finally{f=Z}}}})(_2);x2.exports=_2;var sP=x2.exports;/**
* @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 C2=F,Mr=sP;function Te(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var k2=new Set,td={};function Us(e,t){Su(e,t),Su(e+"Capture",t)}function Su(e,t){for(td[e]=t,e=0;e<t.length;e++)k2.add(t[e])}var Fo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sy=Object.prototype.hasOwnProperty,lP=/^[: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]*$/,cS={},dS={};function uP(e){return Sy.call(dS,e)?!0:Sy.call(cS,e)?!1:lP.test(e)?dS[e]=!0:(cS[e]=!0,!1)}function cP(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 dP(e,t,n,r){if(t===null||typeof t>"u"||cP(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 rr(e,t,n,r,i,o,s){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=s}var Fn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Fn[e]=new rr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Fn[t]=new rr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Fn[e]=new rr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Fn[e]=new rr(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){Fn[e]=new rr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Fn[e]=new rr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Fn[e]=new rr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Fn[e]=new rr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Fn[e]=new rr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ab=/[\-:]([a-z])/g;function Mb(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(Ab,Mb);Fn[t]=new rr(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(Ab,Mb);Fn[t]=new rr(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(Ab,Mb);Fn[t]=new rr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Fn[e]=new rr(e,1,!1,e.toLowerCase(),null,!1,!1)});Fn.xlinkHref=new rr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Fn[e]=new rr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Lb(e,t,n,r){var i=Fn.hasOwnProperty(t)?Fn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(dP(t,n,i,r)&&(n=null),r||i===null?uP(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ho=C2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,yf=Symbol.for("react.element"),Pl=Symbol.for("react.portal"),Il=Symbol.for("react.fragment"),Rb=Symbol.for("react.strict_mode"),xy=Symbol.for("react.profiler"),E2=Symbol.for("react.provider"),$2=Symbol.for("react.context"),Pb=Symbol.for("react.forward_ref"),_y=Symbol.for("react.suspense"),Cy=Symbol.for("react.suspense_list"),Ib=Symbol.for("react.memo"),fa=Symbol.for("react.lazy"),T2=Symbol.for("react.offscreen"),fS=Symbol.iterator;function tc(e){return e===null||typeof e!="object"?null:(e=fS&&e[fS]||e["@@iterator"],typeof e=="function"?e:null)}var Jt=Object.assign,Bm;function yc(e){if(Bm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Bm=t&&t[1]||""}return`
`+Bm+e}var Hm=!1;function Vm(e,t){if(!e||Hm)return"";Hm=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
`),o=r.stack.split(`
`),s=i.length-1,d=o.length-1;1<=s&&0<=d&&i[s]!==o[d];)d--;for(;1<=s&&0<=d;s--,d--)if(i[s]!==o[d]){if(s!==1||d!==1)do if(s--,d--,0>d||i[s]!==o[d]){var a=`
`+i[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=d);break}}}finally{Hm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yc(e):""}function fP(e){switch(e.tag){case 5:return yc(e.type);case 16:return yc("Lazy");case 13:return yc("Suspense");case 19:return yc("SuspenseList");case 0:case 2:case 15:return e=Vm(e.type,!1),e;case 11:return e=Vm(e.type.render,!1),e;case 1:return e=Vm(e.type,!0),e;default:return""}}function ky(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 Il:return"Fragment";case Pl:return"Portal";case xy:return"Profiler";case Rb:return"StrictMode";case _y:return"Suspense";case Cy:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $2:return(e.displayName||"Context")+".Consumer";case E2:return(e._context.displayName||"Context")+".Provider";case Pb:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ib:return t=e.displayName||null,t!==null?t:ky(e.type)||"Memo";case fa:t=e._payload,e=e._init;try{return ky(e(t))}catch{}}return null}function hP(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 ky(t);case 8:return t===Rb?"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 Na(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function A2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pP(e){var t=A2(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(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bf(e){e._valueTracker||(e._valueTracker=pP(e))}function M2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=A2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Qh(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 Ey(e,t){var n=t.checked;return Jt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function hS(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Na(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 L2(e,t){t=t.checked,t!=null&&Lb(e,"checked",t,!1)}function $y(e,t){L2(e,t);var n=Na(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")?Ty(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ty(e,t.type,Na(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function pS(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 Ty(e,t,n){(t!=="number"||Qh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bc=Array.isArray;function ru(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Na(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ay(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Te(91));return Jt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gS(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Te(92));if(bc(n)){if(1<n.length)throw Error(Te(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Na(n)}}function R2(e,t){var n=Na(t.value),r=Na(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function mS(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function P2(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function My(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?P2(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wf,I2=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(wf=wf||document.createElement("div"),wf.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pc={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},gP=["Webkit","ms","Moz","O"];Object.keys(Pc).forEach(function(e){gP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pc[t]=Pc[e]})});function O2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pc.hasOwnProperty(e)&&Pc[e]?(""+t).trim():t+"px"}function F2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=O2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var mP=Jt({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 Ly(e,t){if(t){if(mP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Te(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Te(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Te(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Te(62))}}function Ry(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 Py=null;function Ob(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Iy=null,iu=null,ou=null;function vS(e){if(e=Hd(e)){if(typeof Iy!="function")throw Error(Te(280));var t=e.stateNode;t&&(t=bg(t),Iy(e.stateNode,e.type,t))}}function D2(e){iu?ou?ou.push(e):ou=[e]:iu=e}function N2(){if(iu){var e=iu,t=ou;if(ou=iu=null,vS(e),t)for(e=0;e<t.length;e++)vS(t[e])}}function z2(e,t){return e(t)}function j2(){}var Wm=!1;function B2(e,t,n){if(Wm)return e(t,n);Wm=!0;try{return z2(e,t,n)}finally{Wm=!1,(iu!==null||ou!==null)&&(j2(),N2())}}function rd(e,t){var n=e.stateNode;if(n===null)return null;var r=bg(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Te(231,t,typeof n));return n}var Oy=!1;if(Fo)try{var nc={};Object.defineProperty(nc,"passive",{get:function(){Oy=!0}}),window.addEventListener("test",nc,nc),window.removeEventListener("test",nc,nc)}catch{Oy=!1}function vP(e,t,n,r,i,o,s,d,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Ic=!1,Jh=null,ep=!1,Fy=null,yP={onError:function(e){Ic=!0,Jh=e}};function bP(e,t,n,r,i,o,s,d,a){Ic=!1,Jh=null,vP.apply(yP,arguments)}function wP(e,t,n,r,i,o,s,d,a){if(bP.apply(this,arguments),Ic){if(Ic){var c=Jh;Ic=!1,Jh=null}else throw Error(Te(198));ep||(ep=!0,Fy=c)}}function Gs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function H2(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function yS(e){if(Gs(e)!==e)throw Error(Te(188))}function SP(e){var t=e.alternate;if(!t){if(t=Gs(e),t===null)throw Error(Te(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return yS(i),e;if(o===r)return yS(i),t;o=o.sibling}throw Error(Te(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,d=i.child;d;){if(d===n){s=!0,n=i,r=o;break}if(d===r){s=!0,r=i,n=o;break}d=d.sibling}if(!s){for(d=o.child;d;){if(d===n){s=!0,n=o,r=i;break}if(d===r){s=!0,r=o,n=i;break}d=d.sibling}if(!s)throw Error(Te(189))}}if(n.alternate!==r)throw Error(Te(190))}if(n.tag!==3)throw Error(Te(188));return n.stateNode.current===n?e:t}function V2(e){return e=SP(e),e!==null?W2(e):null}function W2(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=W2(e);if(t!==null)return t;e=e.sibling}return null}var U2=Mr.unstable_scheduleCallback,bS=Mr.unstable_cancelCallback,xP=Mr.unstable_shouldYield,_P=Mr.unstable_requestPaint,sn=Mr.unstable_now,CP=Mr.unstable_getCurrentPriorityLevel,Fb=Mr.unstable_ImmediatePriority,G2=Mr.unstable_UserBlockingPriority,tp=Mr.unstable_NormalPriority,kP=Mr.unstable_LowPriority,K2=Mr.unstable_IdlePriority,gg=null,Yi=null;function EP(e){if(Yi&&typeof Yi.onCommitFiberRoot=="function")try{Yi.onCommitFiberRoot(gg,e,void 0,(e.current.flags&128)===128)}catch{}}var xi=Math.clz32?Math.clz32:AP,$P=Math.log,TP=Math.LN2;function AP(e){return e>>>=0,e===0?32:31-($P(e)/TP|0)|0}var Sf=64,xf=4194304;function wc(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 np(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var d=s&~i;d!==0?r=wc(d):(o&=s,o!==0&&(r=wc(o)))}else s=n&~i,s!==0?r=wc(s):o!==0&&(r=wc(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-xi(t),i=1<<n,r|=e[n],t&=~i;return r}function MP(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function LP(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-xi(o),d=1<<s,a=i[s];a===-1?(!(d&n)||d&r)&&(i[s]=MP(d,t)):a<=t&&(e.expiredLanes|=d),o&=~d}}function Dy(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function q2(){var e=Sf;return Sf<<=1,!(Sf&4194240)&&(Sf=64),e}function Um(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jd(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-xi(t),e[t]=n}function RP(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<n;){var i=31-xi(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Db(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xi(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ft=0;function Y2(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var X2,Nb,Z2,Q2,J2,Ny=!1,_f=[],_a=null,Ca=null,ka=null,id=new Map,od=new Map,ma=[],PP="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function wS(e,t){switch(e){case"focusin":case"focusout":_a=null;break;case"dragenter":case"dragleave":Ca=null;break;case"mouseover":case"mouseout":ka=null;break;case"pointerover":case"pointerout":id.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":od.delete(t.pointerId)}}function rc(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Hd(t),t!==null&&Nb(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function IP(e,t,n,r,i){switch(t){case"focusin":return _a=rc(_a,e,t,n,r,i),!0;case"dragenter":return Ca=rc(Ca,e,t,n,r,i),!0;case"mouseover":return ka=rc(ka,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return id.set(o,rc(id.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,od.set(o,rc(od.get(o)||null,e,t,n,r,i)),!0}return!1}function eE(e){var t=bs(e.target);if(t!==null){var n=Gs(t);if(n!==null){if(t=n.tag,t===13){if(t=H2(n),t!==null){e.blockedOn=t,J2(e.priority,function(){Z2(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function dh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=zy(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Py=r,n.target.dispatchEvent(r),Py=null}else return t=Hd(n),t!==null&&Nb(t),e.blockedOn=n,!1;t.shift()}return!0}function SS(e,t,n){dh(e)&&n.delete(t)}function OP(){Ny=!1,_a!==null&&dh(_a)&&(_a=null),Ca!==null&&dh(Ca)&&(Ca=null),ka!==null&&dh(ka)&&(ka=null),id.forEach(SS),od.forEach(SS)}function ic(e,t){e.blockedOn===t&&(e.blockedOn=null,Ny||(Ny=!0,Mr.unstable_scheduleCallback(Mr.unstable_NormalPriority,OP)))}function ad(e){function t(i){return ic(i,e)}if(0<_f.length){ic(_f[0],e);for(var n=1;n<_f.length;n++){var r=_f[n];r.blockedOn===e&&(r.blockedOn=null)}}for(_a!==null&&ic(_a,e),Ca!==null&&ic(Ca,e),ka!==null&&ic(ka,e),id.forEach(t),od.forEach(t),n=0;n<ma.length;n++)r=ma[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ma.length&&(n=ma[0],n.blockedOn===null);)eE(n),n.blockedOn===null&&ma.shift()}var au=Ho.ReactCurrentBatchConfig,rp=!0;function FP(e,t,n,r){var i=Ft,o=au.transition;au.transition=null;try{Ft=1,zb(e,t,n,r)}finally{Ft=i,au.transition=o}}function DP(e,t,n,r){var i=Ft,o=au.transition;au.transition=null;try{Ft=4,zb(e,t,n,r)}finally{Ft=i,au.transition=o}}function zb(e,t,n,r){if(rp){var i=zy(e,t,n,r);if(i===null)tv(e,t,r,ip,n),wS(e,r);else if(IP(i,e,t,n,r))r.stopPropagation();else if(wS(e,r),t&4&&-1<PP.indexOf(e)){for(;i!==null;){var o=Hd(i);if(o!==null&&X2(o),o=zy(e,t,n,r),o===null&&tv(e,t,r,ip,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else tv(e,t,r,null,n)}}var ip=null;function zy(e,t,n,r){if(ip=null,e=Ob(r),e=bs(e),e!==null)if(t=Gs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=H2(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ip=e,null}function tE(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(CP()){case Fb:return 1;case G2:return 4;case tp:case kP:return 16;case K2:return 536870912;default:return 16}default:return 16}}var ba=null,jb=null,fh=null;function nE(){if(fh)return fh;var e,t=jb,n=t.length,r,i="value"in ba?ba.value:ba.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return fh=i.slice(e,1<r?1-r:void 0)}function hh(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Cf(){return!0}function xS(){return!1}function Pr(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(o):o[d]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Cf:xS,this.isPropagationStopped=xS,this}return Jt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Cf)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Cf)},persist:function(){},isPersistent:Cf}),t}var Hu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bb=Pr(Hu),Bd=Jt({},Hu,{view:0,detail:0}),NP=Pr(Bd),Gm,Km,oc,mg=Jt({},Bd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hb,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==oc&&(oc&&e.type==="mousemove"?(Gm=e.screenX-oc.screenX,Km=e.screenY-oc.screenY):Km=Gm=0,oc=e),Gm)},movementY:function(e){return"movementY"in e?e.movementY:Km}}),_S=Pr(mg),zP=Jt({},mg,{dataTransfer:0}),jP=Pr(zP),BP=Jt({},Bd,{relatedTarget:0}),qm=Pr(BP),HP=Jt({},Hu,{animationName:0,elapsedTime:0,pseudoElement:0}),VP=Pr(HP),WP=Jt({},Hu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),UP=Pr(WP),GP=Jt({},Hu,{data:0}),CS=Pr(GP),KP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qP={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},YP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function XP(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=YP[e])?!!t[e]:!1}function Hb(){return XP}var ZP=Jt({},Bd,{key:function(e){if(e.key){var t=KP[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=hh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?qP[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hb,charCode:function(e){return e.type==="keypress"?hh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),QP=Pr(ZP),JP=Jt({},mg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kS=Pr(JP),eI=Jt({},Bd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hb}),tI=Pr(eI),nI=Jt({},Hu,{propertyName:0,elapsedTime:0,pseudoElement:0}),rI=Pr(nI),iI=Jt({},mg,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),oI=Pr(iI),aI=[9,13,27,32],Vb=Fo&&"CompositionEvent"in window,Oc=null;Fo&&"documentMode"in document&&(Oc=document.documentMode);var sI=Fo&&"TextEvent"in window&&!Oc,rE=Fo&&(!Vb||Oc&&8<Oc&&11>=Oc),ES=String.fromCharCode(32),$S=!1;function iE(e,t){switch(e){case"keyup":return aI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oE(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ol=!1;function lI(e,t){switch(e){case"compositionend":return oE(t);case"keypress":return t.which!==32?null:($S=!0,ES);case"textInput":return e=t.data,e===ES&&$S?null:e;default:return null}}function uI(e,t){if(Ol)return e==="compositionend"||!Vb&&iE(e,t)?(e=nE(),fh=jb=ba=null,Ol=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return rE&&t.locale!=="ko"?null:t.data;default:return null}}var cI={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function TS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cI[e.type]:t==="textarea"}function aE(e,t,n,r){D2(r),t=op(t,"onChange"),0<t.length&&(n=new Bb("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Fc=null,sd=null;function dI(e){vE(e,0)}function vg(e){var t=Nl(e);if(M2(t))return e}function fI(e,t){if(e==="change")return t}var sE=!1;if(Fo){var Ym;if(Fo){var Xm="oninput"in document;if(!Xm){var AS=document.createElement("div");AS.setAttribute("oninput","return;"),Xm=typeof AS.oninput=="function"}Ym=Xm}else Ym=!1;sE=Ym&&(!document.documentMode||9<document.documentMode)}function MS(){Fc&&(Fc.detachEvent("onpropertychange",lE),sd=Fc=null)}function lE(e){if(e.propertyName==="value"&&vg(sd)){var t=[];aE(t,sd,e,Ob(e)),B2(dI,t)}}function hI(e,t,n){e==="focusin"?(MS(),Fc=t,sd=n,Fc.attachEvent("onpropertychange",lE)):e==="focusout"&&MS()}function pI(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vg(sd)}function gI(e,t){if(e==="click")return vg(t)}function mI(e,t){if(e==="input"||e==="change")return vg(t)}function vI(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ci=typeof Object.is=="function"?Object.is:vI;function ld(e,t){if(Ci(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Sy.call(t,i)||!Ci(e[i],t[i]))return!1}return!0}function LS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function RS(e,t){var n=LS(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=LS(n)}}function uE(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uE(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cE(){for(var e=window,t=Qh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Qh(e.document)}return t}function Wb(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 yI(e){var t=cE(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&uE(n.ownerDocument.documentElement,n)){if(r!==null&&Wb(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=RS(n,o);var s=RS(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var bI=Fo&&"documentMode"in document&&11>=document.documentMode,Fl=null,jy=null,Dc=null,By=!1;function PS(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;By||Fl==null||Fl!==Qh(r)||(r=Fl,"selectionStart"in r&&Wb(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}),Dc&&ld(Dc,r)||(Dc=r,r=op(jy,"onSelect"),0<r.length&&(t=new Bb("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Fl)))}function kf(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Dl={animationend:kf("Animation","AnimationEnd"),animationiteration:kf("Animation","AnimationIteration"),animationstart:kf("Animation","AnimationStart"),transitionend:kf("Transition","TransitionEnd")},Zm={},dE={};Fo&&(dE=document.createElement("div").style,"AnimationEvent"in window||(delete Dl.animationend.animation,delete Dl.animationiteration.animation,delete Dl.animationstart.animation),"TransitionEvent"in window||delete Dl.transitionend.transition);function yg(e){if(Zm[e])return Zm[e];if(!Dl[e])return e;var t=Dl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in dE)return Zm[e]=t[n];return e}var fE=yg("animationend"),hE=yg("animationiteration"),pE=yg("animationstart"),gE=yg("transitionend"),mE=new Map,IS="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Wa(e,t){mE.set(e,t),Us(t,[e])}for(var Qm=0;Qm<IS.length;Qm++){var Jm=IS[Qm],wI=Jm.toLowerCase(),SI=Jm[0].toUpperCase()+Jm.slice(1);Wa(wI,"on"+SI)}Wa(fE,"onAnimationEnd");Wa(hE,"onAnimationIteration");Wa(pE,"onAnimationStart");Wa("dblclick","onDoubleClick");Wa("focusin","onFocus");Wa("focusout","onBlur");Wa(gE,"onTransitionEnd");Su("onMouseEnter",["mouseout","mouseover"]);Su("onMouseLeave",["mouseout","mouseover"]);Su("onPointerEnter",["pointerout","pointerover"]);Su("onPointerLeave",["pointerout","pointerover"]);Us("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Us("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Us("onBeforeInput",["compositionend","keypress","textInput","paste"]);Us("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Us("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Us("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),xI=new Set("cancel close invalid load scroll toggle".split(" ").concat(Sc));function OS(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,wP(r,t,void 0,e),e.currentTarget=null}function vE(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var d=r[s],a=d.instance,c=d.currentTarget;if(d=d.listener,a!==o&&i.isPropagationStopped())break e;OS(i,d,c),o=a}else for(s=0;s<r.length;s++){if(d=r[s],a=d.instance,c=d.currentTarget,d=d.listener,a!==o&&i.isPropagationStopped())break e;OS(i,d,c),o=a}}}if(ep)throw e=Fy,ep=!1,Fy=null,e}function Vt(e,t){var n=t[Gy];n===void 0&&(n=t[Gy]=new Set);var r=e+"__bubble";n.has(r)||(yE(t,e,2,!1),n.add(r))}function ev(e,t,n){var r=0;t&&(r|=4),yE(n,e,r,t)}var Ef="_reactListening"+Math.random().toString(36).slice(2);function ud(e){if(!e[Ef]){e[Ef]=!0,k2.forEach(function(n){n!=="selectionchange"&&(xI.has(n)||ev(n,!1,e),ev(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ef]||(t[Ef]=!0,ev("selectionchange",!1,t))}}function yE(e,t,n,r){switch(tE(t)){case 1:var i=FP;break;case 4:i=DP;break;default:i=zb}n=i.bind(null,t,n,e),i=void 0,!Oy||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function tv(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var d=r.stateNode.containerInfo;if(d===i||d.nodeType===8&&d.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;s=s.return}for(;d!==null;){if(s=bs(d),s===null)return;if(a=s.tag,a===5||a===6){r=o=s;continue e}d=d.parentNode}}r=r.return}B2(function(){var c=o,u=Ob(n),l=[];e:{var f=mE.get(e);if(f!==void 0){var h=Bb,p=e;switch(e){case"keypress":if(hh(n)===0)break e;case"keydown":case"keyup":h=QP;break;case"focusin":p="focus",h=qm;break;case"focusout":p="blur",h=qm;break;case"beforeblur":case"afterblur":h=qm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=_S;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=jP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=tI;break;case fE:case hE:case pE:h=VP;break;case gE:h=rI;break;case"scroll":h=NP;break;case"wheel":h=oI;break;case"copy":case"cut":case"paste":h=UP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=kS}var g=(t&4)!==0,y=!g&&e==="scroll",x=g?f!==null?f+"Capture":null:f;g=[];for(var S=c,E;S!==null;){E=S;var v=E.stateNode;if(E.tag===5&&v!==null&&(E=v,x!==null&&(v=rd(S,x),v!=null&&g.push(cd(S,v,E)))),y)break;S=S.return}0<g.length&&(f=new h(f,p,null,n,u),l.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Py&&(p=n.relatedTarget||n.fromElement)&&(bs(p)||p[Do]))break e;if((h||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=c,p=p?bs(p):null,p!==null&&(y=Gs(p),p!==y||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=c),h!==p)){if(g=_S,v="onMouseLeave",x="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(g=kS,v="onPointerLeave",x="onPointerEnter",S="pointer"),y=h==null?f:Nl(h),E=p==null?f:Nl(p),f=new g(v,S+"leave",h,n,u),f.target=y,f.relatedTarget=E,v=null,bs(u)===c&&(g=new g(x,S+"enter",p,n,u),g.target=E,g.relatedTarget=y,v=g),y=v,h&&p)t:{for(g=h,x=p,S=0,E=g;E;E=wl(E))S++;for(E=0,v=x;v;v=wl(v))E++;for(;0<S-E;)g=wl(g),S--;for(;0<E-S;)x=wl(x),E--;for(;S--;){if(g===x||x!==null&&g===x.alternate)break t;g=wl(g),x=wl(x)}g=null}else g=null;h!==null&&FS(l,f,h,g,!1),p!==null&&y!==null&&FS(l,y,p,g,!0)}}e:{if(f=c?Nl(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var w=fI;else if(TS(f))if(sE)w=mI;else{w=pI;var b=hI}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(w=gI);if(w&&(w=w(e,c))){aE(l,w,n,u);break e}b&&b(e,f,c),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&Ty(f,"number",f.value)}switch(b=c?Nl(c):window,e){case"focusin":(TS(b)||b.contentEditable==="true")&&(Fl=b,jy=c,Dc=null);break;case"focusout":Dc=jy=Fl=null;break;case"mousedown":By=!0;break;case"contextmenu":case"mouseup":case"dragend":By=!1,PS(l,n,u);break;case"selectionchange":if(bI)break;case"keydown":case"keyup":PS(l,n,u)}var m;if(Vb)e:{switch(e){case"compositionstart":var $="onCompositionStart";break e;case"compositionend":$="onCompositionEnd";break e;case"compositionupdate":$="onCompositionUpdate";break e}$=void 0}else Ol?iE(e,n)&&($="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&($="onCompositionStart");$&&(rE&&n.locale!=="ko"&&(Ol||$!=="onCompositionStart"?$==="onCompositionEnd"&&Ol&&(m=nE()):(ba=u,jb="value"in ba?ba.value:ba.textContent,Ol=!0)),b=op(c,$),0<b.length&&($=new CS($,e,null,n,u),l.push({event:$,listeners:b}),m?$.data=m:(m=oE(n),m!==null&&($.data=m)))),(m=sI?lI(e,n):uI(e,n))&&(c=op(c,"onBeforeInput"),0<c.length&&(u=new CS("onBeforeInput","beforeinput",null,n,u),l.push({event:u,listeners:c}),u.data=m))}vE(l,t)})}function cd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function op(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=rd(e,n),o!=null&&r.unshift(cd(e,o,i)),o=rd(e,t),o!=null&&r.push(cd(e,o,i))),e=e.return}return r}function wl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function FS(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var d=n,a=d.alternate,c=d.stateNode;if(a!==null&&a===r)break;d.tag===5&&c!==null&&(d=c,i?(a=rd(n,o),a!=null&&s.unshift(cd(n,a,d))):i||(a=rd(n,o),a!=null&&s.push(cd(n,a,d)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var _I=/\r\n?/g,CI=/\u0000|\uFFFD/g;function DS(e){return(typeof e=="string"?e:""+e).replace(_I,`
`).replace(CI,"")}function $f(e,t,n){if(t=DS(t),DS(e)!==t&&n)throw Error(Te(425))}function ap(){}var Hy=null,Vy=null;function Wy(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Uy=typeof setTimeout=="function"?setTimeout:void 0,kI=typeof clearTimeout=="function"?clearTimeout:void 0,NS=typeof Promise=="function"?Promise:void 0,EI=typeof queueMicrotask=="function"?queueMicrotask:typeof NS<"u"?function(e){return NS.resolve(null).then(e).catch($I)}:Uy;function $I(e){setTimeout(function(){throw e})}function nv(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ad(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ad(t)}function Ea(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function zS(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Vu=Math.random().toString(36).slice(2),Wi="__reactFiber$"+Vu,dd="__reactProps$"+Vu,Do="__reactContainer$"+Vu,Gy="__reactEvents$"+Vu,TI="__reactListeners$"+Vu,AI="__reactHandles$"+Vu;function bs(e){var t=e[Wi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Do]||n[Wi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=zS(e);e!==null;){if(n=e[Wi])return n;e=zS(e)}return t}e=n,n=e.parentNode}return null}function Hd(e){return e=e[Wi]||e[Do],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Nl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Te(33))}function bg(e){return e[dd]||null}var Ky=[],zl=-1;function Ua(e){return{current:e}}function Ut(e){0>zl||(e.current=Ky[zl],Ky[zl]=null,zl--)}function Ht(e,t){zl++,Ky[zl]=e.current,e.current=t}var za={},Kn=Ua(za),hr=Ua(!1),Ds=za;function xu(e,t){var n=e.type.contextTypes;if(!n)return za;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 pr(e){return e=e.childContextTypes,e!=null}function sp(){Ut(hr),Ut(Kn)}function jS(e,t,n){if(Kn.current!==za)throw Error(Te(168));Ht(Kn,t),Ht(hr,n)}function bE(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(Te(108,hP(e)||"Unknown",i));return Jt({},n,r)}function lp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||za,Ds=Kn.current,Ht(Kn,e),Ht(hr,hr.current),!0}function BS(e,t,n){var r=e.stateNode;if(!r)throw Error(Te(169));n?(e=bE(e,t,Ds),r.__reactInternalMemoizedMergedChildContext=e,Ut(hr),Ut(Kn),Ht(Kn,e)):Ut(hr),Ht(hr,n)}var xo=null,wg=!1,rv=!1;function wE(e){xo===null?xo=[e]:xo.push(e)}function MI(e){wg=!0,wE(e)}function Ga(){if(!rv&&xo!==null){rv=!0;var e=0,t=Ft;try{var n=xo;for(Ft=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}xo=null,wg=!1}catch(i){throw xo!==null&&(xo=xo.slice(e+1)),U2(Fb,Ga),i}finally{Ft=t,rv=!1}}return null}var jl=[],Bl=0,up=null,cp=0,Xr=[],Zr=0,Ns=null,Eo=1,$o="";function us(e,t){jl[Bl++]=cp,jl[Bl++]=up,up=e,cp=t}function SE(e,t,n){Xr[Zr++]=Eo,Xr[Zr++]=$o,Xr[Zr++]=Ns,Ns=e;var r=Eo;e=$o;var i=32-xi(r)-1;r&=~(1<<i),n+=1;var o=32-xi(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Eo=1<<32-xi(t)+i|n<<i|r,$o=o+e}else Eo=1<<o|n<<i|r,$o=e}function Ub(e){e.return!==null&&(us(e,1),SE(e,1,0))}function Gb(e){for(;e===up;)up=jl[--Bl],jl[Bl]=null,cp=jl[--Bl],jl[Bl]=null;for(;e===Ns;)Ns=Xr[--Zr],Xr[Zr]=null,$o=Xr[--Zr],Xr[Zr]=null,Eo=Xr[--Zr],Xr[Zr]=null}var $r=null,kr=null,Gt=!1,vi=null;function xE(e,t){var n=Jr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function HS(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,$r=e,kr=Ea(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,$r=e,kr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ns!==null?{id:Eo,overflow:$o}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Jr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,$r=e,kr=null,!0):!1;default:return!1}}function qy(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Yy(e){if(Gt){var t=kr;if(t){var n=t;if(!HS(e,t)){if(qy(e))throw Error(Te(418));t=Ea(n.nextSibling);var r=$r;t&&HS(e,t)?xE(r,n):(e.flags=e.flags&-4097|2,Gt=!1,$r=e)}}else{if(qy(e))throw Error(Te(418));e.flags=e.flags&-4097|2,Gt=!1,$r=e}}}function VS(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;$r=e}function Tf(e){if(e!==$r)return!1;if(!Gt)return VS(e),Gt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Wy(e.type,e.memoizedProps)),t&&(t=kr)){if(qy(e))throw _E(),Error(Te(418));for(;t;)xE(e,t),t=Ea(t.nextSibling)}if(VS(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Te(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){kr=Ea(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}kr=null}}else kr=$r?Ea(e.stateNode.nextSibling):null;return!0}function _E(){for(var e=kr;e;)e=Ea(e.nextSibling)}function _u(){kr=$r=null,Gt=!1}function Kb(e){vi===null?vi=[e]:vi.push(e)}var LI=Ho.ReactCurrentBatchConfig;function gi(e,t){if(e&&e.defaultProps){t=Jt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var dp=Ua(null),fp=null,Hl=null,qb=null;function Yb(){qb=Hl=fp=null}function Xb(e){var t=dp.current;Ut(dp),e._currentValue=t}function Xy(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function su(e,t){fp=e,qb=Hl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(dr=!0),e.firstContext=null)}function ii(e){var t=e._currentValue;if(qb!==e)if(e={context:e,memoizedValue:t,next:null},Hl===null){if(fp===null)throw Error(Te(308));Hl=e,fp.dependencies={lanes:0,firstContext:e}}else Hl=Hl.next=e;return t}var ws=null;function Zb(e){ws===null?ws=[e]:ws.push(e)}function CE(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Zb(t)):(n.next=i.next,i.next=n),t.interleaved=n,No(e,r)}function No(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ha=!1;function Qb(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kE(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function $a(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ct&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,No(e,n)}return i=r.interleaved,i===null?(t.next=t,Zb(r)):(t.next=i.next,i.next=t),r.interleaved=t,No(e,n)}function ph(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Db(e,n)}}function WS(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hp(e,t,n,r){var i=e.updateQueue;ha=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,d=i.shared.pending;if(d!==null){i.shared.pending=null;var a=d,c=a.next;a.next=null,s===null?o=c:s.next=c,s=a;var u=e.alternate;u!==null&&(u=u.updateQueue,d=u.lastBaseUpdate,d!==s&&(d===null?u.firstBaseUpdate=c:d.next=c,u.lastBaseUpdate=a))}if(o!==null){var l=i.baseState;s=0,u=c=a=null,d=o;do{var f=d.lane,h=d.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:h,lane:0,tag:d.tag,payload:d.payload,callback:d.callback,next:null});e:{var p=e,g=d;switch(f=t,h=n,g.tag){case 1:if(p=g.payload,typeof p=="function"){l=p.call(h,l,f);break e}l=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(h,l,f):p,f==null)break e;l=Jt({},l,f);break e;case 2:ha=!0}}d.callback!==null&&d.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[d]:f.push(d))}else h={eventTime:h,lane:f,tag:d.tag,payload:d.payload,callback:d.callback,next:null},u===null?(c=u=h,a=l):u=u.next=h,s|=f;if(d=d.next,d===null){if(d=i.shared.pending,d===null)break;f=d,d=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(a=l),i.baseState=a,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);js|=s,e.lanes=s,e.memoizedState=l}}function US(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Te(191,i));i.call(r)}}}var EE=new C2.Component().refs;function Zy(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Jt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sg={isMounted:function(e){return(e=e._reactInternals)?Gs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=er(),i=Aa(e),o=Lo(r,i);o.payload=t,n!=null&&(o.callback=n),t=$a(e,o,i),t!==null&&(_i(t,e,i,r),ph(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=er(),i=Aa(e),o=Lo(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=$a(e,o,i),t!==null&&(_i(t,e,i,r),ph(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=er(),r=Aa(e),i=Lo(n,r);i.tag=2,t!=null&&(i.callback=t),t=$a(e,i,r),t!==null&&(_i(t,e,r,n),ph(t,e,r))}};function GS(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!ld(n,r)||!ld(i,o):!0}function $E(e,t,n){var r=!1,i=za,o=t.contextType;return typeof o=="object"&&o!==null?o=ii(o):(i=pr(t)?Ds:Kn.current,r=t.contextTypes,o=(r=r!=null)?xu(e,i):za),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Sg,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function KS(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Sg.enqueueReplaceState(t,t.state,null)}function Qy(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=EE,Qb(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=ii(o):(o=pr(t)?Ds:Kn.current,i.context=xu(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Zy(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Sg.enqueueReplaceState(i,i.state,null),hp(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ac(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Te(309));var r=n.stateNode}if(!r)throw Error(Te(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var d=i.refs;d===EE&&(d=i.refs={}),s===null?delete d[o]:d[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(Te(284));if(!n._owner)throw Error(Te(290,e))}return e}function Af(e,t){throw e=Object.prototype.toString.call(t),Error(Te(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function qS(e){var t=e._init;return t(e._payload)}function TE(e){function t(x,S){if(e){var E=x.deletions;E===null?(x.deletions=[S],x.flags|=16):E.push(S)}}function n(x,S){if(!e)return null;for(;S!==null;)t(x,S),S=S.sibling;return null}function r(x,S){for(x=new Map;S!==null;)S.key!==null?x.set(S.key,S):x.set(S.index,S),S=S.sibling;return x}function i(x,S){return x=Ma(x,S),x.index=0,x.sibling=null,x}function o(x,S,E){return x.index=E,e?(E=x.alternate,E!==null?(E=E.index,E<S?(x.flags|=2,S):E):(x.flags|=2,S)):(x.flags|=1048576,S)}function s(x){return e&&x.alternate===null&&(x.flags|=2),x}function d(x,S,E,v){return S===null||S.tag!==6?(S=cv(E,x.mode,v),S.return=x,S):(S=i(S,E),S.return=x,S)}function a(x,S,E,v){var w=E.type;return w===Il?u(x,S,E.props.children,v,E.key):S!==null&&(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===fa&&qS(w)===S.type)?(v=i(S,E.props),v.ref=ac(x,S,E),v.return=x,v):(v=wh(E.type,E.key,E.props,null,x.mode,v),v.ref=ac(x,S,E),v.return=x,v)}function c(x,S,E,v){return S===null||S.tag!==4||S.stateNode.containerInfo!==E.containerInfo||S.stateNode.implementation!==E.implementation?(S=dv(E,x.mode,v),S.return=x,S):(S=i(S,E.children||[]),S.return=x,S)}function u(x,S,E,v,w){return S===null||S.tag!==7?(S=Ts(E,x.mode,v,w),S.return=x,S):(S=i(S,E),S.return=x,S)}function l(x,S,E){if(typeof S=="string"&&S!==""||typeof S=="number")return S=cv(""+S,x.mode,E),S.return=x,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case yf:return E=wh(S.type,S.key,S.props,null,x.mode,E),E.ref=ac(x,null,S),E.return=x,E;case Pl:return S=dv(S,x.mode,E),S.return=x,S;case fa:var v=S._init;return l(x,v(S._payload),E)}if(bc(S)||tc(S))return S=Ts(S,x.mode,E,null),S.return=x,S;Af(x,S)}return null}function f(x,S,E,v){var w=S!==null?S.key:null;if(typeof E=="string"&&E!==""||typeof E=="number")return w!==null?null:d(x,S,""+E,v);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case yf:return E.key===w?a(x,S,E,v):null;case Pl:return E.key===w?c(x,S,E,v):null;case fa:return w=E._init,f(x,S,w(E._payload),v)}if(bc(E)||tc(E))return w!==null?null:u(x,S,E,v,null);Af(x,E)}return null}function h(x,S,E,v,w){if(typeof v=="string"&&v!==""||typeof v=="number")return x=x.get(E)||null,d(S,x,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case yf:return x=x.get(v.key===null?E:v.key)||null,a(S,x,v,w);case Pl:return x=x.get(v.key===null?E:v.key)||null,c(S,x,v,w);case fa:var b=v._init;return h(x,S,E,b(v._payload),w)}if(bc(v)||tc(v))return x=x.get(E)||null,u(S,x,v,w,null);Af(S,v)}return null}function p(x,S,E,v){for(var w=null,b=null,m=S,$=S=0,A=null;m!==null&&$<E.length;$++){m.index>$?(A=m,m=null):A=m.sibling;var C=f(x,m,E[$],v);if(C===null){m===null&&(m=A);break}e&&m&&C.alternate===null&&t(x,m),S=o(C,S,$),b===null?w=C:b.sibling=C,b=C,m=A}if($===E.length)return n(x,m),Gt&&us(x,$),w;if(m===null){for(;$<E.length;$++)m=l(x,E[$],v),m!==null&&(S=o(m,S,$),b===null?w=m:b.sibling=m,b=m);return Gt&&us(x,$),w}for(m=r(x,m);$<E.length;$++)A=h(m,x,$,E[$],v),A!==null&&(e&&A.alternate!==null&&m.delete(A.key===null?$:A.key),S=o(A,S,$),b===null?w=A:b.sibling=A,b=A);return e&&m.forEach(function(k){return t(x,k)}),Gt&&us(x,$),w}function g(x,S,E,v){var w=tc(E);if(typeof w!="function")throw Error(Te(150));if(E=w.call(E),E==null)throw Error(Te(151));for(var b=w=null,m=S,$=S=0,A=null,C=E.next();m!==null&&!C.done;$++,C=E.next()){m.index>$?(A=m,m=null):A=m.sibling;var k=f(x,m,C.value,v);if(k===null){m===null&&(m=A);break}e&&m&&k.alternate===null&&t(x,m),S=o(k,S,$),b===null?w=k:b.sibling=k,b=k,m=A}if(C.done)return n(x,m),Gt&&us(x,$),w;if(m===null){for(;!C.done;$++,C=E.next())C=l(x,C.value,v),C!==null&&(S=o(C,S,$),b===null?w=C:b.sibling=C,b=C);return Gt&&us(x,$),w}for(m=r(x,m);!C.done;$++,C=E.next())C=h(m,x,$,C.value,v),C!==null&&(e&&C.alternate!==null&&m.delete(C.key===null?$:C.key),S=o(C,S,$),b===null?w=C:b.sibling=C,b=C);return e&&m.forEach(function(I){return t(x,I)}),Gt&&us(x,$),w}function y(x,S,E,v){if(typeof E=="object"&&E!==null&&E.type===Il&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case yf:e:{for(var w=E.key,b=S;b!==null;){if(b.key===w){if(w=E.type,w===Il){if(b.tag===7){n(x,b.sibling),S=i(b,E.props.children),S.return=x,x=S;break e}}else if(b.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===fa&&qS(w)===b.type){n(x,b.sibling),S=i(b,E.props),S.ref=ac(x,b,E),S.return=x,x=S;break e}n(x,b);break}else t(x,b);b=b.sibling}E.type===Il?(S=Ts(E.props.children,x.mode,v,E.key),S.return=x,x=S):(v=wh(E.type,E.key,E.props,null,x.mode,v),v.ref=ac(x,S,E),v.return=x,x=v)}return s(x);case Pl:e:{for(b=E.key;S!==null;){if(S.key===b)if(S.tag===4&&S.stateNode.containerInfo===E.containerInfo&&S.stateNode.implementation===E.implementation){n(x,S.sibling),S=i(S,E.children||[]),S.return=x,x=S;break e}else{n(x,S);break}else t(x,S);S=S.sibling}S=dv(E,x.mode,v),S.return=x,x=S}return s(x);case fa:return b=E._init,y(x,S,b(E._payload),v)}if(bc(E))return p(x,S,E,v);if(tc(E))return g(x,S,E,v);Af(x,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,S!==null&&S.tag===6?(n(x,S.sibling),S=i(S,E),S.return=x,x=S):(n(x,S),S=cv(E,x.mode,v),S.return=x,x=S),s(x)):n(x,S)}return y}var Cu=TE(!0),AE=TE(!1),Vd={},Xi=Ua(Vd),fd=Ua(Vd),hd=Ua(Vd);function Ss(e){if(e===Vd)throw Error(Te(174));return e}function Jb(e,t){switch(Ht(hd,t),Ht(fd,e),Ht(Xi,Vd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:My(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=My(t,e)}Ut(Xi),Ht(Xi,t)}function ku(){Ut(Xi),Ut(fd),Ut(hd)}function ME(e){Ss(hd.current);var t=Ss(Xi.current),n=My(t,e.type);t!==n&&(Ht(fd,e),Ht(Xi,n))}function e1(e){fd.current===e&&(Ut(Xi),Ut(fd))}var Xt=Ua(0);function pp(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)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 iv=[];function t1(){for(var e=0;e<iv.length;e++)iv[e]._workInProgressVersionPrimary=null;iv.length=0}var gh=Ho.ReactCurrentDispatcher,ov=Ho.ReactCurrentBatchConfig,zs=0,Qt=null,mn=null,kn=null,gp=!1,Nc=!1,pd=0,RI=0;function Hn(){throw Error(Te(321))}function n1(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ci(e[n],t[n]))return!1;return!0}function r1(e,t,n,r,i,o){if(zs=o,Qt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,gh.current=e===null||e.memoizedState===null?FI:DI,e=n(r,i),Nc){o=0;do{if(Nc=!1,pd=0,25<=o)throw Error(Te(301));o+=1,kn=mn=null,t.updateQueue=null,gh.current=NI,e=n(r,i)}while(Nc)}if(gh.current=mp,t=mn!==null&&mn.next!==null,zs=0,kn=mn=Qt=null,gp=!1,t)throw Error(Te(300));return e}function i1(){var e=pd!==0;return pd=0,e}function zi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kn===null?Qt.memoizedState=kn=e:kn=kn.next=e,kn}function oi(){if(mn===null){var e=Qt.alternate;e=e!==null?e.memoizedState:null}else e=mn.next;var t=kn===null?Qt.memoizedState:kn.next;if(t!==null)kn=t,mn=e;else{if(e===null)throw Error(Te(310));mn=e,e={memoizedState:mn.memoizedState,baseState:mn.baseState,baseQueue:mn.baseQueue,queue:mn.queue,next:null},kn===null?Qt.memoizedState=kn=e:kn=kn.next=e}return kn}function gd(e,t){return typeof t=="function"?t(e):t}function av(e){var t=oi(),n=t.queue;if(n===null)throw Error(Te(311));n.lastRenderedReducer=e;var r=mn,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var d=s=null,a=null,c=o;do{var u=c.lane;if((zs&u)===u)a!==null&&(a=a.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var l={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};a===null?(d=a=l,s=r):a=a.next=l,Qt.lanes|=u,js|=u}c=c.next}while(c!==null&&c!==o);a===null?s=r:a.next=d,Ci(r,t.memoizedState)||(dr=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Qt.lanes|=o,js|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function sv(e){var t=oi(),n=t.queue;if(n===null)throw Error(Te(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Ci(o,t.memoizedState)||(dr=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function LE(){}function RE(e,t){var n=Qt,r=oi(),i=t(),o=!Ci(r.memoizedState,i);if(o&&(r.memoizedState=i,dr=!0),r=r.queue,o1(OE.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||kn!==null&&kn.memoizedState.tag&1){if(n.flags|=2048,md(9,IE.bind(null,n,r,i,t),void 0,null),En===null)throw Error(Te(349));zs&30||PE(n,t,i)}return i}function PE(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Qt.updateQueue,t===null?(t={lastEffect:null,stores:null},Qt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function IE(e,t,n,r){t.value=n,t.getSnapshot=r,FE(t)&&DE(e)}function OE(e,t,n){return n(function(){FE(t)&&DE(e)})}function FE(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ci(e,n)}catch{return!0}}function DE(e){var t=No(e,1);t!==null&&_i(t,e,1,-1)}function YS(e){var t=zi();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gd,lastRenderedState:e},t.queue=e,e=e.dispatch=OI.bind(null,Qt,e),[t.memoizedState,e]}function md(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Qt.updateQueue,t===null?(t={lastEffect:null,stores:null},Qt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function NE(){return oi().memoizedState}function mh(e,t,n,r){var i=zi();Qt.flags|=e,i.memoizedState=md(1|t,n,void 0,r===void 0?null:r)}function xg(e,t,n,r){var i=oi();r=r===void 0?null:r;var o=void 0;if(mn!==null){var s=mn.memoizedState;if(o=s.destroy,r!==null&&n1(r,s.deps)){i.memoizedState=md(t,n,o,r);return}}Qt.flags|=e,i.memoizedState=md(1|t,n,o,r)}function XS(e,t){return mh(8390656,8,e,t)}function o1(e,t){return xg(2048,8,e,t)}function zE(e,t){return xg(4,2,e,t)}function jE(e,t){return xg(4,4,e,t)}function BE(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function HE(e,t,n){return n=n!=null?n.concat([e]):null,xg(4,4,BE.bind(null,t,e),n)}function a1(){}function VE(e,t){var n=oi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&n1(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function WE(e,t){var n=oi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&n1(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function UE(e,t,n){return zs&21?(Ci(n,t)||(n=q2(),Qt.lanes|=n,js|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,dr=!0),e.memoizedState=n)}function PI(e,t){var n=Ft;Ft=n!==0&&4>n?n:4,e(!0);var r=ov.transition;ov.transition={};try{e(!1),t()}finally{Ft=n,ov.transition=r}}function GE(){return oi().memoizedState}function II(e,t,n){var r=Aa(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},KE(e))qE(t,n);else if(n=CE(e,t,n,r),n!==null){var i=er();_i(n,e,r,i),YE(n,t,r)}}function OI(e,t,n){var r=Aa(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(KE(e))qE(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,d=o(s,n);if(i.hasEagerState=!0,i.eagerState=d,Ci(d,s)){var a=t.interleaved;a===null?(i.next=i,Zb(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=CE(e,t,i,r),n!==null&&(i=er(),_i(n,e,r,i),YE(n,t,r))}}function KE(e){var t=e.alternate;return e===Qt||t!==null&&t===Qt}function qE(e,t){Nc=gp=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function YE(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Db(e,n)}}var mp={readContext:ii,useCallback:Hn,useContext:Hn,useEffect:Hn,useImperativeHandle:Hn,useInsertionEffect:Hn,useLayoutEffect:Hn,useMemo:Hn,useReducer:Hn,useRef:Hn,useState:Hn,useDebugValue:Hn,useDeferredValue:Hn,useTransition:Hn,useMutableSource:Hn,useSyncExternalStore:Hn,useId:Hn,unstable_isNewReconciler:!1},FI={readContext:ii,useCallback:function(e,t){return zi().memoizedState=[e,t===void 0?null:t],e},useContext:ii,useEffect:XS,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,mh(4194308,4,BE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return mh(4194308,4,e,t)},useInsertionEffect:function(e,t){return mh(4,2,e,t)},useMemo:function(e,t){var n=zi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zi();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=II.bind(null,Qt,e),[r.memoizedState,e]},useRef:function(e){var t=zi();return e={current:e},t.memoizedState=e},useState:YS,useDebugValue:a1,useDeferredValue:function(e){return zi().memoizedState=e},useTransition:function(){var e=YS(!1),t=e[0];return e=PI.bind(null,e[1]),zi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Qt,i=zi();if(Gt){if(n===void 0)throw Error(Te(407));n=n()}else{if(n=t(),En===null)throw Error(Te(349));zs&30||PE(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,XS(OE.bind(null,r,o,e),[e]),r.flags|=2048,md(9,IE.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=zi(),t=En.identifierPrefix;if(Gt){var n=$o,r=Eo;n=(r&~(1<<32-xi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pd++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=RI++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},DI={readContext:ii,useCallback:VE,useContext:ii,useEffect:o1,useImperativeHandle:HE,useInsertionEffect:zE,useLayoutEffect:jE,useMemo:WE,useReducer:av,useRef:NE,useState:function(){return av(gd)},useDebugValue:a1,useDeferredValue:function(e){var t=oi();return UE(t,mn.memoizedState,e)},useTransition:function(){var e=av(gd)[0],t=oi().memoizedState;return[e,t]},useMutableSource:LE,useSyncExternalStore:RE,useId:GE,unstable_isNewReconciler:!1},NI={readContext:ii,useCallback:VE,useContext:ii,useEffect:o1,useImperativeHandle:HE,useInsertionEffect:zE,useLayoutEffect:jE,useMemo:WE,useReducer:sv,useRef:NE,useState:function(){return sv(gd)},useDebugValue:a1,useDeferredValue:function(e){var t=oi();return mn===null?t.memoizedState=e:UE(t,mn.memoizedState,e)},useTransition:function(){var e=sv(gd)[0],t=oi().memoizedState;return[e,t]},useMutableSource:LE,useSyncExternalStore:RE,useId:GE,unstable_isNewReconciler:!1};function Eu(e,t){try{var n="",r=t;do n+=fP(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function lv(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Jy(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var zI=typeof WeakMap=="function"?WeakMap:Map;function XE(e,t,n){n=Lo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yp||(yp=!0,u0=r),Jy(e,t)},n}function ZE(e,t,n){n=Lo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Jy(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Jy(e,t),typeof r!="function"&&(Ta===null?Ta=new Set([this]):Ta.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function ZS(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zI;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=JI.bind(null,e,t,n),t.then(e,e))}function QS(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function JS(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Lo(-1,1),t.tag=2,$a(n,t,1))),n.lanes|=1),e)}var jI=Ho.ReactCurrentOwner,dr=!1;function Zn(e,t,n,r){t.child=e===null?AE(t,null,n,r):Cu(t,e.child,n,r)}function ex(e,t,n,r,i){n=n.render;var o=t.ref;return su(t,i),r=r1(e,t,n,r,o,i),n=i1(),e!==null&&!dr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,zo(e,t,i)):(Gt&&n&&Ub(t),t.flags|=1,Zn(e,t,r,i),t.child)}function tx(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!p1(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,QE(e,t,o,r,i)):(e=wh(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:ld,n(s,r)&&e.ref===t.ref)return zo(e,t,i)}return t.flags|=1,e=Ma(o,r),e.ref=t.ref,e.return=t,t.child=e}function QE(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(ld(o,r)&&e.ref===t.ref)if(dr=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(dr=!0);else return t.lanes=e.lanes,zo(e,t,i)}return e0(e,t,n,r,i)}function JE(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ht(Wl,_r),_r|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ht(Wl,_r),_r|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Ht(Wl,_r),_r|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ht(Wl,_r),_r|=r;return Zn(e,t,i,n),t.child}function e$(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function e0(e,t,n,r,i){var o=pr(n)?Ds:Kn.current;return o=xu(t,o),su(t,i),n=r1(e,t,n,r,o,i),r=i1(),e!==null&&!dr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,zo(e,t,i)):(Gt&&r&&Ub(t),t.flags|=1,Zn(e,t,n,i),t.child)}function nx(e,t,n,r,i){if(pr(n)){var o=!0;lp(t)}else o=!1;if(su(t,i),t.stateNode===null)vh(e,t),$E(t,n,r),Qy(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,d=t.memoizedProps;s.props=d;var a=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=ii(c):(c=pr(n)?Ds:Kn.current,c=xu(t,c));var u=n.getDerivedStateFromProps,l=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";l||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d!==r||a!==c)&&KS(t,s,r,c),ha=!1;var f=t.memoizedState;s.state=f,hp(t,r,s,i),a=t.memoizedState,d!==r||f!==a||hr.current||ha?(typeof u=="function"&&(Zy(t,n,u,r),a=t.memoizedState),(d=ha||GS(t,n,d,r,f,a,c))?(l||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=c,r=d):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,kE(e,t),d=t.memoizedProps,c=t.type===t.elementType?d:gi(t.type,d),s.props=c,l=t.pendingProps,f=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=ii(a):(a=pr(n)?Ds:Kn.current,a=xu(t,a));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d!==l||f!==a)&&KS(t,s,r,a),ha=!1,f=t.memoizedState,s.state=f,hp(t,r,s,i);var p=t.memoizedState;d!==l||f!==p||hr.current||ha?(typeof h=="function"&&(Zy(t,n,h,r),p=t.memoizedState),(c=ha||GS(t,n,c,r,f,p,a)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,p,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,p,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=a,r=c):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return t0(e,t,n,r,o,i)}function t0(e,t,n,r,i,o){e$(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&BS(t,n,!1),zo(e,t,o);r=t.stateNode,jI.current=t;var d=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Cu(t,e.child,null,o),t.child=Cu(t,null,d,o)):Zn(e,t,d,o),t.memoizedState=r.state,i&&BS(t,n,!0),t.child}function t$(e){var t=e.stateNode;t.pendingContext?jS(e,t.pendingContext,t.pendingContext!==t.context):t.context&&jS(e,t.context,!1),Jb(e,t.containerInfo)}function rx(e,t,n,r,i){return _u(),Kb(i),t.flags|=256,Zn(e,t,n,r),t.child}var n0={dehydrated:null,treeContext:null,retryLane:0};function r0(e){return{baseLanes:e,cachePool:null,transitions:null}}function n$(e,t,n){var r=t.pendingProps,i=Xt.current,o=!1,s=(t.flags&128)!==0,d;if((d=s)||(d=e!==null&&e.memoizedState===null?!1:(i&2)!==0),d?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ht(Xt,i&1),e===null)return Yy(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=kg(s,r,0,null),e=Ts(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=r0(n),t.memoizedState=n0,e):s1(t,s));if(i=e.memoizedState,i!==null&&(d=i.dehydrated,d!==null))return BI(e,t,s,r,d,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,d=i.sibling;var a={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Ma(i,a),r.subtreeFlags=i.subtreeFlags&14680064),d!==null?o=Ma(d,o):(o=Ts(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?r0(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=n0,r}return o=e.child,e=o.sibling,r=Ma(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function s1(e,t){return t=kg({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Mf(e,t,n,r){return r!==null&&Kb(r),Cu(t,e.child,null,n),e=s1(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function BI(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=lv(Error(Te(422))),Mf(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=kg({mode:"visible",children:r.children},i,0,null),o=Ts(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Cu(t,e.child,null,s),t.child.memoizedState=r0(s),t.memoizedState=n0,o);if(!(t.mode&1))return Mf(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var d=r.dgst;return r=d,o=Error(Te(419)),r=lv(o,r,void 0),Mf(e,t,s,r)}if(d=(s&e.childLanes)!==0,dr||d){if(r=En,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,No(e,i),_i(r,e,i,-1))}return h1(),r=lv(Error(Te(421))),Mf(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=eO.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,kr=Ea(i.nextSibling),$r=t,Gt=!0,vi=null,e!==null&&(Xr[Zr++]=Eo,Xr[Zr++]=$o,Xr[Zr++]=Ns,Eo=e.id,$o=e.overflow,Ns=t),t=s1(t,r.children),t.flags|=4096,t)}function ix(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xy(e.return,t,n)}function uv(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function r$(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Zn(e,t,r.children,n),r=Xt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ix(e,n,t);else if(e.tag===19)ix(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ht(Xt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&pp(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),uv(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&pp(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}uv(t,!0,n,null,o);break;case"together":uv(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function vh(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),js|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Te(153));if(t.child!==null){for(e=t.child,n=Ma(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ma(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function HI(e,t,n){switch(t.tag){case 3:t$(t),_u();break;case 5:ME(t);break;case 1:pr(t.type)&&lp(t);break;case 4:Jb(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ht(dp,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ht(Xt,Xt.current&1),t.flags|=128,null):n&t.child.childLanes?n$(e,t,n):(Ht(Xt,Xt.current&1),e=zo(e,t,n),e!==null?e.sibling:null);Ht(Xt,Xt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return r$(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ht(Xt,Xt.current),r)break;return null;case 22:case 23:return t.lanes=0,JE(e,t,n)}return zo(e,t,n)}var i$,i0,o$,a$;i$=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};i0=function(){};o$=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ss(Xi.current);var o=null;switch(n){case"input":i=Ey(e,i),r=Ey(e,r),o=[];break;case"select":i=Jt({},i,{value:void 0}),r=Jt({},r,{value:void 0}),o=[];break;case"textarea":i=Ay(e,i),r=Ay(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ap)}Ly(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var d=i[c];for(s in d)d.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(td.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var a=r[c];if(d=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&a!==d&&(a!=null||d!=null))if(c==="style")if(d){for(s in d)!d.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&d[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(o||(o=[]),o.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,d=d?d.__html:void 0,a!=null&&d!==a&&(o=o||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(td.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&Vt("scroll",e),o||d===a||(o=[])):(o=o||[]).push(c,a))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};a$=function(e,t,n,r){n!==r&&(t.flags|=4)};function sc(e,t){if(!Gt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Vn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function VI(e,t,n){var r=t.pendingProps;switch(Gb(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vn(t),null;case 1:return pr(t.type)&&sp(),Vn(t),null;case 3:return r=t.stateNode,ku(),Ut(hr),Ut(Kn),t1(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Tf(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,vi!==null&&(f0(vi),vi=null))),i0(e,t),Vn(t),null;case 5:e1(t);var i=Ss(hd.current);if(n=t.type,e!==null&&t.stateNode!=null)o$(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Te(166));return Vn(t),null}if(e=Ss(Xi.current),Tf(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Wi]=t,r[dd]=o,e=(t.mode&1)!==0,n){case"dialog":Vt("cancel",r),Vt("close",r);break;case"iframe":case"object":case"embed":Vt("load",r);break;case"video":case"audio":for(i=0;i<Sc.length;i++)Vt(Sc[i],r);break;case"source":Vt("error",r);break;case"img":case"image":case"link":Vt("error",r),Vt("load",r);break;case"details":Vt("toggle",r);break;case"input":hS(r,o),Vt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Vt("invalid",r);break;case"textarea":gS(r,o),Vt("invalid",r)}Ly(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var d=o[s];s==="children"?typeof d=="string"?r.textContent!==d&&(o.suppressHydrationWarning!==!0&&$f(r.textContent,d,e),i=["children",d]):typeof d=="number"&&r.textContent!==""+d&&(o.suppressHydrationWarning!==!0&&$f(r.textContent,d,e),i=["children",""+d]):td.hasOwnProperty(s)&&d!=null&&s==="onScroll"&&Vt("scroll",r)}switch(n){case"input":bf(r),pS(r,o,!0);break;case"textarea":bf(r),mS(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=ap)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=P2(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Wi]=t,e[dd]=r,i$(e,t,!1,!1),t.stateNode=e;e:{switch(s=Ry(n,r),n){case"dialog":Vt("cancel",e),Vt("close",e),i=r;break;case"iframe":case"object":case"embed":Vt("load",e),i=r;break;case"video":case"audio":for(i=0;i<Sc.length;i++)Vt(Sc[i],e);i=r;break;case"source":Vt("error",e),i=r;break;case"img":case"image":case"link":Vt("error",e),Vt("load",e),i=r;break;case"details":Vt("toggle",e),i=r;break;case"input":hS(e,r),i=Ey(e,r),Vt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Jt({},r,{value:void 0}),Vt("invalid",e);break;case"textarea":gS(e,r),i=Ay(e,r),Vt("invalid",e);break;default:i=r}Ly(n,i),d=i;for(o in d)if(d.hasOwnProperty(o)){var a=d[o];o==="style"?F2(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&I2(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&nd(e,a):typeof a=="number"&&nd(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(td.hasOwnProperty(o)?a!=null&&o==="onScroll"&&Vt("scroll",e):a!=null&&Lb(e,o,a,s))}switch(n){case"input":bf(e),pS(e,r,!1);break;case"textarea":bf(e),mS(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Na(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?ru(e,!!r.multiple,o,!1):r.defaultValue!=null&&ru(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ap)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Vn(t),null;case 6:if(e&&t.stateNode!=null)a$(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Te(166));if(n=Ss(hd.current),Ss(Xi.current),Tf(t)){if(r=t.stateNode,n=t.memoizedProps,r[Wi]=t,(o=r.nodeValue!==n)&&(e=$r,e!==null))switch(e.tag){case 3:$f(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&$f(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Wi]=t,t.stateNode=r}return Vn(t),null;case 13:if(Ut(Xt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Gt&&kr!==null&&t.mode&1&&!(t.flags&128))_E(),_u(),t.flags|=98560,o=!1;else if(o=Tf(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Te(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Te(317));o[Wi]=t}else _u(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vn(t),o=!1}else vi!==null&&(f0(vi),vi=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Xt.current&1?yn===0&&(yn=3):h1())),t.updateQueue!==null&&(t.flags|=4),Vn(t),null);case 4:return ku(),i0(e,t),e===null&&ud(t.stateNode.containerInfo),Vn(t),null;case 10:return Xb(t.type._context),Vn(t),null;case 17:return pr(t.type)&&sp(),Vn(t),null;case 19:if(Ut(Xt),o=t.memoizedState,o===null)return Vn(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)sc(o,!1);else{if(yn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=pp(e),s!==null){for(t.flags|=128,sc(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ht(Xt,Xt.current&1|2),t.child}e=e.sibling}o.tail!==null&&sn()>$u&&(t.flags|=128,r=!0,sc(o,!1),t.lanes=4194304)}else{if(!r)if(e=pp(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),sc(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Gt)return Vn(t),null}else 2*sn()-o.renderingStartTime>$u&&n!==1073741824&&(t.flags|=128,r=!0,sc(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=sn(),t.sibling=null,n=Xt.current,Ht(Xt,r?n&1|2:n&1),t):(Vn(t),null);case 22:case 23:return f1(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?_r&1073741824&&(Vn(t),t.subtreeFlags&6&&(t.flags|=8192)):Vn(t),null;case 24:return null;case 25:return null}throw Error(Te(156,t.tag))}function WI(e,t){switch(Gb(t),t.tag){case 1:return pr(t.type)&&sp(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ku(),Ut(hr),Ut(Kn),t1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return e1(t),null;case 13:if(Ut(Xt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Te(340));_u()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ut(Xt),null;case 4:return ku(),null;case 10:return Xb(t.type._context),null;case 22:case 23:return f1(),null;case 24:return null;default:return null}}var Lf=!1,Un=!1,UI=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Vl(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){nn(e,t,r)}else n.current=null}function o0(e,t,n){try{n()}catch(r){nn(e,t,r)}}var ox=!1;function GI(e,t){if(Hy=rp,e=cE(),Wb(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 s=0,d=-1,a=-1,c=0,u=0,l=e,f=null;t:for(;;){for(var h;l!==n||i!==0&&l.nodeType!==3||(d=s+i),l!==o||r!==0&&l.nodeType!==3||(a=s+r),l.nodeType===3&&(s+=l.nodeValue.length),(h=l.firstChild)!==null;)f=l,l=h;for(;;){if(l===e)break t;if(f===n&&++c===i&&(d=s),f===o&&++u===r&&(a=s),(h=l.nextSibling)!==null)break;l=f,f=l.parentNode}l=h}n=d===-1||a===-1?null:{start:d,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Vy={focusedElem:e,selectionRange:n},rp=!1,Ne=t;Ne!==null;)if(t=Ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ne=e;else for(;Ne!==null;){t=Ne;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,y=p.memoizedState,x=t.stateNode,S=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:gi(t.type,g),y);x.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Te(163))}}catch(v){nn(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,Ne=e;break}Ne=t.return}return p=ox,ox=!1,p}function zc(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&&o0(t,n,o)}i=i.next}while(i!==r)}}function _g(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 a0(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 s$(e){var t=e.alternate;t!==null&&(e.alternate=null,s$(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wi],delete t[dd],delete t[Gy],delete t[TI],delete t[AI])),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 l$(e){return e.tag===5||e.tag===3||e.tag===4}function ax(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||l$(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 s0(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=ap));else if(r!==4&&(e=e.child,e!==null))for(s0(e,t,n),e=e.sibling;e!==null;)s0(e,t,n),e=e.sibling}function l0(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(l0(e,t,n),e=e.sibling;e!==null;)l0(e,t,n),e=e.sibling}var Ln=null,mi=!1;function ia(e,t,n){for(n=n.child;n!==null;)u$(e,t,n),n=n.sibling}function u$(e,t,n){if(Yi&&typeof Yi.onCommitFiberUnmount=="function")try{Yi.onCommitFiberUnmount(gg,n)}catch{}switch(n.tag){case 5:Un||Vl(n,t);case 6:var r=Ln,i=mi;Ln=null,ia(e,t,n),Ln=r,mi=i,Ln!==null&&(mi?(e=Ln,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ln.removeChild(n.stateNode));break;case 18:Ln!==null&&(mi?(e=Ln,n=n.stateNode,e.nodeType===8?nv(e.parentNode,n):e.nodeType===1&&nv(e,n),ad(e)):nv(Ln,n.stateNode));break;case 4:r=Ln,i=mi,Ln=n.stateNode.containerInfo,mi=!0,ia(e,t,n),Ln=r,mi=i;break;case 0:case 11:case 14:case 15:if(!Un&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&o0(n,t,s),i=i.next}while(i!==r)}ia(e,t,n);break;case 1:if(!Un&&(Vl(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(d){nn(n,t,d)}ia(e,t,n);break;case 21:ia(e,t,n);break;case 22:n.mode&1?(Un=(r=Un)||n.memoizedState!==null,ia(e,t,n),Un=r):ia(e,t,n);break;default:ia(e,t,n)}}function sx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new UI),t.forEach(function(r){var i=tO.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hi(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,d=s;e:for(;d!==null;){switch(d.tag){case 5:Ln=d.stateNode,mi=!1;break e;case 3:Ln=d.stateNode.containerInfo,mi=!0;break e;case 4:Ln=d.stateNode.containerInfo,mi=!0;break e}d=d.return}if(Ln===null)throw Error(Te(160));u$(o,s,i),Ln=null,mi=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(c){nn(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)c$(t,e),t=t.sibling}function c$(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hi(t,e),Di(e),r&4){try{zc(3,e,e.return),_g(3,e)}catch(g){nn(e,e.return,g)}try{zc(5,e,e.return)}catch(g){nn(e,e.return,g)}}break;case 1:hi(t,e),Di(e),r&512&&n!==null&&Vl(n,n.return);break;case 5:if(hi(t,e),Di(e),r&512&&n!==null&&Vl(n,n.return),e.flags&32){var i=e.stateNode;try{nd(i,"")}catch(g){nn(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,d=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{d==="input"&&o.type==="radio"&&o.name!=null&&L2(i,o),Ry(d,s);var c=Ry(d,o);for(s=0;s<a.length;s+=2){var u=a[s],l=a[s+1];u==="style"?F2(i,l):u==="dangerouslySetInnerHTML"?I2(i,l):u==="children"?nd(i,l):Lb(i,u,l,c)}switch(d){case"input":$y(i,o);break;case"textarea":R2(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?ru(i,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?ru(i,!!o.multiple,o.defaultValue,!0):ru(i,!!o.multiple,o.multiple?[]:"",!1))}i[dd]=o}catch(g){nn(e,e.return,g)}}break;case 6:if(hi(t,e),Di(e),r&4){if(e.stateNode===null)throw Error(Te(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){nn(e,e.return,g)}}break;case 3:if(hi(t,e),Di(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ad(t.containerInfo)}catch(g){nn(e,e.return,g)}break;case 4:hi(t,e),Di(e);break;case 13:hi(t,e),Di(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(c1=sn())),r&4&&sx(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Un=(c=Un)||u,hi(t,e),Un=c):hi(t,e),Di(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(Ne=e,u=e.child;u!==null;){for(l=Ne=u;Ne!==null;){switch(f=Ne,h=f.child,f.tag){case 0:case 11:case 14:case 15:zc(4,f,f.return);break;case 1:Vl(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){nn(r,n,g)}}break;case 5:Vl(f,f.return);break;case 22:if(f.memoizedState!==null){ux(l);continue}}h!==null?(h.return=f,Ne=h):ux(l)}u=u.sibling}e:for(u=null,l=e;;){if(l.tag===5){if(u===null){u=l;try{i=l.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(d=l.stateNode,a=l.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,d.style.display=O2("display",s))}catch(g){nn(e,e.return,g)}}}else if(l.tag===6){if(u===null)try{l.stateNode.nodeValue=c?"":l.memoizedProps}catch(g){nn(e,e.return,g)}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===e)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break e;for(;l.sibling===null;){if(l.return===null||l.return===e)break e;u===l&&(u=null),l=l.return}u===l&&(u=null),l.sibling.return=l.return,l=l.sibling}}break;case 19:hi(t,e),Di(e),r&4&&sx(e);break;case 21:break;default:hi(t,e),Di(e)}}function Di(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(l$(n)){var r=n;break e}n=n.return}throw Error(Te(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(nd(i,""),r.flags&=-33);var o=ax(e);l0(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,d=ax(e);s0(e,d,s);break;default:throw Error(Te(161))}}catch(a){nn(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function KI(e,t,n){Ne=e,d$(e)}function d$(e,t,n){for(var r=(e.mode&1)!==0;Ne!==null;){var i=Ne,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Lf;if(!s){var d=i.alternate,a=d!==null&&d.memoizedState!==null||Un;d=Lf;var c=Un;if(Lf=s,(Un=a)&&!c)for(Ne=i;Ne!==null;)s=Ne,a=s.child,s.tag===22&&s.memoizedState!==null?cx(i):a!==null?(a.return=s,Ne=a):cx(i);for(;o!==null;)Ne=o,d$(o),o=o.sibling;Ne=i,Lf=d,Un=c}lx(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,Ne=o):lx(e)}}function lx(e){for(;Ne!==null;){var t=Ne;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Un||_g(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Un)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:gi(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&US(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}US(t,s,n)}break;case 5:var d=t.stateNode;if(n===null&&t.flags&4){n=d;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var l=u.dehydrated;l!==null&&ad(l)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Te(163))}Un||t.flags&512&&a0(t)}catch(f){nn(t,t.return,f)}}if(t===e){Ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function ux(e){for(;Ne!==null;){var t=Ne;if(t===e){Ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Ne=n;break}Ne=t.return}}function cx(e){for(;Ne!==null;){var t=Ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{_g(4,t)}catch(a){nn(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){nn(t,i,a)}}var o=t.return;try{a0(t)}catch(a){nn(t,o,a)}break;case 5:var s=t.return;try{a0(t)}catch(a){nn(t,s,a)}}}catch(a){nn(t,t.return,a)}if(t===e){Ne=null;break}var d=t.sibling;if(d!==null){d.return=t.return,Ne=d;break}Ne=t.return}}var qI=Math.ceil,vp=Ho.ReactCurrentDispatcher,l1=Ho.ReactCurrentOwner,ni=Ho.ReactCurrentBatchConfig,Ct=0,En=null,pn=null,On=0,_r=0,Wl=Ua(0),yn=0,vd=null,js=0,Cg=0,u1=0,jc=null,ur=null,c1=0,$u=1/0,So=null,yp=!1,u0=null,Ta=null,Rf=!1,wa=null,bp=0,Bc=0,c0=null,yh=-1,bh=0;function er(){return Ct&6?sn():yh!==-1?yh:yh=sn()}function Aa(e){return e.mode&1?Ct&2&&On!==0?On&-On:LI.transition!==null?(bh===0&&(bh=q2()),bh):(e=Ft,e!==0||(e=window.event,e=e===void 0?16:tE(e.type)),e):1}function _i(e,t,n,r){if(50<Bc)throw Bc=0,c0=null,Error(Te(185));jd(e,n,r),(!(Ct&2)||e!==En)&&(e===En&&(!(Ct&2)&&(Cg|=n),yn===4&&va(e,On)),gr(e,r),n===1&&Ct===0&&!(t.mode&1)&&($u=sn()+500,wg&&Ga()))}function gr(e,t){var n=e.callbackNode;LP(e,t);var r=np(e,e===En?On:0);if(r===0)n!==null&&bS(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&bS(n),t===1)e.tag===0?MI(dx.bind(null,e)):wE(dx.bind(null,e)),EI(function(){!(Ct&6)&&Ga()}),n=null;else{switch(Y2(r)){case 1:n=Fb;break;case 4:n=G2;break;case 16:n=tp;break;case 536870912:n=K2;break;default:n=tp}n=b$(n,f$.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function f$(e,t){if(yh=-1,bh=0,Ct&6)throw Error(Te(327));var n=e.callbackNode;if(lu()&&e.callbackNode!==n)return null;var r=np(e,e===En?On:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=wp(e,r);else{t=r;var i=Ct;Ct|=2;var o=p$();(En!==e||On!==t)&&(So=null,$u=sn()+500,$s(e,t));do try{ZI();break}catch(d){h$(e,d)}while(1);Yb(),vp.current=o,Ct=i,pn!==null?t=0:(En=null,On=0,t=yn)}if(t!==0){if(t===2&&(i=Dy(e),i!==0&&(r=i,t=d0(e,i))),t===1)throw n=vd,$s(e,0),va(e,r),gr(e,sn()),n;if(t===6)va(e,r);else{if(i=e.current.alternate,!(r&30)&&!YI(i)&&(t=wp(e,r),t===2&&(o=Dy(e),o!==0&&(r=o,t=d0(e,o))),t===1))throw n=vd,$s(e,0),va(e,r),gr(e,sn()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Te(345));case 2:cs(e,ur,So);break;case 3:if(va(e,r),(r&130023424)===r&&(t=c1+500-sn(),10<t)){if(np(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){er(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Uy(cs.bind(null,e,ur,So),t);break}cs(e,ur,So);break;case 4:if(va(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-xi(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=sn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*qI(r/1960))-r,10<r){e.timeoutHandle=Uy(cs.bind(null,e,ur,So),r);break}cs(e,ur,So);break;case 5:cs(e,ur,So);break;default:throw Error(Te(329))}}}return gr(e,sn()),e.callbackNode===n?f$.bind(null,e):null}function d0(e,t){var n=jc;return e.current.memoizedState.isDehydrated&&($s(e,t).flags|=256),e=wp(e,t),e!==2&&(t=ur,ur=n,t!==null&&f0(t)),e}function f0(e){ur===null?ur=e:ur.push.apply(ur,e)}function YI(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Ci(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function va(e,t){for(t&=~u1,t&=~Cg,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-xi(t),r=1<<n;e[n]=-1,t&=~r}}function dx(e){if(Ct&6)throw Error(Te(327));lu();var t=np(e,0);if(!(t&1))return gr(e,sn()),null;var n=wp(e,t);if(e.tag!==0&&n===2){var r=Dy(e);r!==0&&(t=r,n=d0(e,r))}if(n===1)throw n=vd,$s(e,0),va(e,t),gr(e,sn()),n;if(n===6)throw Error(Te(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,cs(e,ur,So),gr(e,sn()),null}function d1(e,t){var n=Ct;Ct|=1;try{return e(t)}finally{Ct=n,Ct===0&&($u=sn()+500,wg&&Ga())}}function Bs(e){wa!==null&&wa.tag===0&&!(Ct&6)&&lu();var t=Ct;Ct|=1;var n=ni.transition,r=Ft;try{if(ni.transition=null,Ft=1,e)return e()}finally{Ft=r,ni.transition=n,Ct=t,!(Ct&6)&&Ga()}}function f1(){_r=Wl.current,Ut(Wl)}function $s(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,kI(n)),pn!==null)for(n=pn.return;n!==null;){var r=n;switch(Gb(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&sp();break;case 3:ku(),Ut(hr),Ut(Kn),t1();break;case 5:e1(r);break;case 4:ku();break;case 13:Ut(Xt);break;case 19:Ut(Xt);break;case 10:Xb(r.type._context);break;case 22:case 23:f1()}n=n.return}if(En=e,pn=e=Ma(e.current,null),On=_r=t,yn=0,vd=null,u1=Cg=js=0,ur=jc=null,ws!==null){for(t=0;t<ws.length;t++)if(n=ws[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}ws=null}return e}function h$(e,t){do{var n=pn;try{if(Yb(),gh.current=mp,gp){for(var r=Qt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}gp=!1}if(zs=0,kn=mn=Qt=null,Nc=!1,pd=0,l1.current=null,n===null||n.return===null){yn=1,vd=t,pn=null;break}e:{var o=e,s=n.return,d=n,a=t;if(t=On,d.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,u=d,l=u.tag;if(!(u.mode&1)&&(l===0||l===11||l===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=QS(s);if(h!==null){h.flags&=-257,JS(h,s,d,o,t),h.mode&1&&ZS(o,c,t),t=h,a=c;var p=t.updateQueue;if(p===null){var g=new Set;g.add(a),t.updateQueue=g}else p.add(a);break e}else{if(!(t&1)){ZS(o,c,t),h1();break e}a=Error(Te(426))}}else if(Gt&&d.mode&1){var y=QS(s);if(y!==null){!(y.flags&65536)&&(y.flags|=256),JS(y,s,d,o,t),Kb(Eu(a,d));break e}}o=a=Eu(a,d),yn!==4&&(yn=2),jc===null?jc=[o]:jc.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var x=XE(o,a,t);WS(o,x);break e;case 1:d=a;var S=o.type,E=o.stateNode;if(!(o.flags&128)&&(typeof S.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(Ta===null||!Ta.has(E)))){o.flags|=65536,t&=-t,o.lanes|=t;var v=ZE(o,d,t);WS(o,v);break e}}o=o.return}while(o!==null)}m$(n)}catch(w){t=w,pn===n&&n!==null&&(pn=n=n.return);continue}break}while(1)}function p$(){var e=vp.current;return vp.current=mp,e===null?mp:e}function h1(){(yn===0||yn===3||yn===2)&&(yn=4),En===null||!(js&268435455)&&!(Cg&268435455)||va(En,On)}function wp(e,t){var n=Ct;Ct|=2;var r=p$();(En!==e||On!==t)&&(So=null,$s(e,t));do try{XI();break}catch(i){h$(e,i)}while(1);if(Yb(),Ct=n,vp.current=r,pn!==null)throw Error(Te(261));return En=null,On=0,yn}function XI(){for(;pn!==null;)g$(pn)}function ZI(){for(;pn!==null&&!xP();)g$(pn)}function g$(e){var t=y$(e.alternate,e,_r);e.memoizedProps=e.pendingProps,t===null?m$(e):pn=t,l1.current=null}function m$(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=WI(n,t),n!==null){n.flags&=32767,pn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{yn=6,pn=null;return}}else if(n=VI(n,t,_r),n!==null){pn=n;return}if(t=t.sibling,t!==null){pn=t;return}pn=t=e}while(t!==null);yn===0&&(yn=5)}function cs(e,t,n){var r=Ft,i=ni.transition;try{ni.transition=null,Ft=1,QI(e,t,n,r)}finally{ni.transition=i,Ft=r}return null}function QI(e,t,n,r){do lu();while(wa!==null);if(Ct&6)throw Error(Te(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Te(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(RP(e,o),e===En&&(pn=En=null,On=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Rf||(Rf=!0,b$(tp,function(){return lu(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=ni.transition,ni.transition=null;var s=Ft;Ft=1;var d=Ct;Ct|=4,l1.current=null,GI(e,n),c$(n,e),yI(Vy),rp=!!Hy,Vy=Hy=null,e.current=n,KI(n),_P(),Ct=d,Ft=s,ni.transition=o}else e.current=n;if(Rf&&(Rf=!1,wa=e,bp=i),o=e.pendingLanes,o===0&&(Ta=null),EP(n.stateNode),gr(e,sn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(yp)throw yp=!1,e=u0,u0=null,e;return bp&1&&e.tag!==0&&lu(),o=e.pendingLanes,o&1?e===c0?Bc++:(Bc=0,c0=e):Bc=0,Ga(),null}function lu(){if(wa!==null){var e=Y2(bp),t=ni.transition,n=Ft;try{if(ni.transition=null,Ft=16>e?16:e,wa===null)var r=!1;else{if(e=wa,wa=null,bp=0,Ct&6)throw Error(Te(331));var i=Ct;for(Ct|=4,Ne=e.current;Ne!==null;){var o=Ne,s=o.child;if(Ne.flags&16){var d=o.deletions;if(d!==null){for(var a=0;a<d.length;a++){var c=d[a];for(Ne=c;Ne!==null;){var u=Ne;switch(u.tag){case 0:case 11:case 15:zc(8,u,o)}var l=u.child;if(l!==null)l.return=u,Ne=l;else for(;Ne!==null;){u=Ne;var f=u.sibling,h=u.return;if(s$(u),u===c){Ne=null;break}if(f!==null){f.return=h,Ne=f;break}Ne=h}}}var p=o.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}Ne=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Ne=s;else e:for(;Ne!==null;){if(o=Ne,o.flags&2048)switch(o.tag){case 0:case 11:case 15:zc(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,Ne=x;break e}Ne=o.return}}var S=e.current;for(Ne=S;Ne!==null;){s=Ne;var E=s.child;if(s.subtreeFlags&2064&&E!==null)E.return=s,Ne=E;else e:for(s=S;Ne!==null;){if(d=Ne,d.flags&2048)try{switch(d.tag){case 0:case 11:case 15:_g(9,d)}}catch(w){nn(d,d.return,w)}if(d===s){Ne=null;break e}var v=d.sibling;if(v!==null){v.return=d.return,Ne=v;break e}Ne=d.return}}if(Ct=i,Ga(),Yi&&typeof Yi.onPostCommitFiberRoot=="function")try{Yi.onPostCommitFiberRoot(gg,e)}catch{}r=!0}return r}finally{Ft=n,ni.transition=t}}return!1}function fx(e,t,n){t=Eu(n,t),t=XE(e,t,1),e=$a(e,t,1),t=er(),e!==null&&(jd(e,1,t),gr(e,t))}function nn(e,t,n){if(e.tag===3)fx(e,e,n);else for(;t!==null;){if(t.tag===3){fx(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ta===null||!Ta.has(r))){e=Eu(n,e),e=ZE(t,e,1),t=$a(t,e,1),e=er(),t!==null&&(jd(t,1,e),gr(t,e));break}}t=t.return}}function JI(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=er(),e.pingedLanes|=e.suspendedLanes&n,En===e&&(On&n)===n&&(yn===4||yn===3&&(On&130023424)===On&&500>sn()-c1?$s(e,0):u1|=n),gr(e,t)}function v$(e,t){t===0&&(e.mode&1?(t=xf,xf<<=1,!(xf&130023424)&&(xf=4194304)):t=1);var n=er();e=No(e,t),e!==null&&(jd(e,t,n),gr(e,n))}function eO(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),v$(e,n)}function tO(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(Te(314))}r!==null&&r.delete(t),v$(e,n)}var y$;y$=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||hr.current)dr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dr=!1,HI(e,t,n);dr=!!(e.flags&131072)}else dr=!1,Gt&&t.flags&1048576&&SE(t,cp,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;vh(e,t),e=t.pendingProps;var i=xu(t,Kn.current);su(t,n),i=r1(null,t,r,e,i,n);var o=i1();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,pr(r)?(o=!0,lp(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Qb(t),i.updater=Sg,t.stateNode=i,i._reactInternals=t,Qy(t,r,e,n),t=t0(null,t,r,!0,o,n)):(t.tag=0,Gt&&o&&Ub(t),Zn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(vh(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=rO(r),e=gi(r,e),i){case 0:t=e0(null,t,r,e,n);break e;case 1:t=nx(null,t,r,e,n);break e;case 11:t=ex(null,t,r,e,n);break e;case 14:t=tx(null,t,r,gi(r.type,e),n);break e}throw Error(Te(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gi(r,i),e0(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gi(r,i),nx(e,t,r,i,n);case 3:e:{if(t$(t),e===null)throw Error(Te(387));r=t.pendingProps,o=t.memoizedState,i=o.element,kE(e,t),hp(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Eu(Error(Te(423)),t),t=rx(e,t,r,n,i);break e}else if(r!==i){i=Eu(Error(Te(424)),t),t=rx(e,t,r,n,i);break e}else for(kr=Ea(t.stateNode.containerInfo.firstChild),$r=t,Gt=!0,vi=null,n=AE(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_u(),r===i){t=zo(e,t,n);break e}Zn(e,t,r,n)}t=t.child}return t;case 5:return ME(t),e===null&&Yy(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Wy(r,i)?s=null:o!==null&&Wy(r,o)&&(t.flags|=32),e$(e,t),Zn(e,t,s,n),t.child;case 6:return e===null&&Yy(t),null;case 13:return n$(e,t,n);case 4:return Jb(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Cu(t,null,r,n):Zn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gi(r,i),ex(e,t,r,i,n);case 7:return Zn(e,t,t.pendingProps,n),t.child;case 8:return Zn(e,t,t.pendingProps.children,n),t.child;case 12:return Zn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Ht(dp,r._currentValue),r._currentValue=s,o!==null)if(Ci(o.value,s)){if(o.children===i.children&&!hr.current){t=zo(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var d=o.dependencies;if(d!==null){s=o.child;for(var a=d.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Lo(-1,n&-n),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?a.next=a:(a.next=u.next,u.next=a),c.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Xy(o.return,n,t),d.lanes|=n;break}a=a.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Te(341));s.lanes|=n,d=s.alternate,d!==null&&(d.lanes|=n),Xy(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Zn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,su(t,n),i=ii(i),r=r(i),t.flags|=1,Zn(e,t,r,n),t.child;case 14:return r=t.type,i=gi(r,t.pendingProps),i=gi(r.type,i),tx(e,t,r,i,n);case 15:return QE(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gi(r,i),vh(e,t),t.tag=1,pr(r)?(e=!0,lp(t)):e=!1,su(t,n),$E(t,r,i),Qy(t,r,i,n),t0(null,t,r,!0,e,n);case 19:return r$(e,t,n);case 22:return JE(e,t,n)}throw Error(Te(156,t.tag))};function b$(e,t){return U2(e,t)}function nO(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 Jr(e,t,n,r){return new nO(e,t,n,r)}function p1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rO(e){if(typeof e=="function")return p1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pb)return 11;if(e===Ib)return 14}return 2}function Ma(e,t){var n=e.alternate;return n===null?(n=Jr(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 wh(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")p1(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Il:return Ts(n.children,i,o,t);case Rb:s=8,i|=8;break;case xy:return e=Jr(12,n,t,i|2),e.elementType=xy,e.lanes=o,e;case _y:return e=Jr(13,n,t,i),e.elementType=_y,e.lanes=o,e;case Cy:return e=Jr(19,n,t,i),e.elementType=Cy,e.lanes=o,e;case T2:return kg(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case E2:s=10;break e;case $2:s=9;break e;case Pb:s=11;break e;case Ib:s=14;break e;case fa:s=16,r=null;break e}throw Error(Te(130,e==null?e:typeof e,""))}return t=Jr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ts(e,t,n,r){return e=Jr(7,e,r,t),e.lanes=n,e}function kg(e,t,n,r){return e=Jr(22,e,r,t),e.elementType=T2,e.lanes=n,e.stateNode={isHidden:!1},e}function cv(e,t,n){return e=Jr(6,e,null,t),e.lanes=n,e}function dv(e,t,n){return t=Jr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function iO(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=Um(0),this.expirationTimes=Um(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Um(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function g1(e,t,n,r,i,o,s,d,a){return e=new iO(e,t,n,d,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Jr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qb(o),e}function oO(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Pl,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function w$(e){if(!e)return za;e=e._reactInternals;e:{if(Gs(e)!==e||e.tag!==1)throw Error(Te(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Te(171))}if(e.tag===1){var n=e.type;if(pr(n))return bE(e,n,t)}return t}function S$(e,t,n,r,i,o,s,d,a){return e=g1(n,r,!0,e,i,o,s,d,a),e.context=w$(null),n=e.current,r=er(),i=Aa(n),o=Lo(r,i),o.callback=t??null,$a(n,o,i),e.current.lanes=i,jd(e,i,r),gr(e,r),e}function Eg(e,t,n,r){var i=t.current,o=er(),s=Aa(i);return n=w$(n),t.context===null?t.context=n:t.pendingContext=n,t=Lo(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=$a(i,t,s),e!==null&&(_i(e,i,s,o),ph(e,i,s)),s}function Sp(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function hx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function m1(e,t){hx(e,t),(e=e.alternate)&&hx(e,t)}function aO(){return null}var x$=typeof reportError=="function"?reportError:function(e){console.error(e)};function v1(e){this._internalRoot=e}$g.prototype.render=v1.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Te(409));Eg(e,t,null,null)};$g.prototype.unmount=v1.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Bs(function(){Eg(null,e,null,null)}),t[Do]=null}};function $g(e){this._internalRoot=e}$g.prototype.unstable_scheduleHydration=function(e){if(e){var t=Q2();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ma.length&&t!==0&&t<ma[n].priority;n++);ma.splice(n,0,e),n===0&&eE(e)}};function y1(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Tg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function px(){}function sO(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=Sp(s);o.call(c)}}var s=S$(t,r,e,0,null,!1,!1,"",px);return e._reactRootContainer=s,e[Do]=s.current,ud(e.nodeType===8?e.parentNode:e),Bs(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var d=r;r=function(){var c=Sp(a);d.call(c)}}var a=g1(e,0,!1,null,null,!1,!1,"",px);return e._reactRootContainer=a,e[Do]=a.current,ud(e.nodeType===8?e.parentNode:e),Bs(function(){Eg(t,a,n,r)}),a}function Ag(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var d=i;i=function(){var a=Sp(s);d.call(a)}}Eg(t,s,e,i)}else s=sO(n,t,e,i,r);return Sp(s)}X2=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wc(t.pendingLanes);n!==0&&(Db(t,n|1),gr(t,sn()),!(Ct&6)&&($u=sn()+500,Ga()))}break;case 13:Bs(function(){var r=No(e,1);if(r!==null){var i=er();_i(r,e,1,i)}}),m1(e,1)}};Nb=function(e){if(e.tag===13){var t=No(e,134217728);if(t!==null){var n=er();_i(t,e,134217728,n)}m1(e,134217728)}};Z2=function(e){if(e.tag===13){var t=Aa(e),n=No(e,t);if(n!==null){var r=er();_i(n,e,t,r)}m1(e,t)}};Q2=function(){return Ft};J2=function(e,t){var n=Ft;try{return Ft=e,t()}finally{Ft=n}};Iy=function(e,t,n){switch(t){case"input":if($y(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=bg(r);if(!i)throw Error(Te(90));M2(r),$y(r,i)}}}break;case"textarea":R2(e,n);break;case"select":t=n.value,t!=null&&ru(e,!!n.multiple,t,!1)}};z2=d1;j2=Bs;var lO={usingClientEntryPoint:!1,Events:[Hd,Nl,bg,D2,N2,d1]},lc={findFiberByHostInstance:bs,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},uO={bundleType:lc.bundleType,version:lc.version,rendererPackageName:lc.rendererPackageName,rendererConfig:lc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ho.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=V2(e),e===null?null:e.stateNode},findFiberByHostInstance:lc.findFiberByHostInstance||aO,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pf.isDisabled&&Pf.supportsFiber)try{gg=Pf.inject(uO),Yi=Pf}catch{}}Rr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lO;Rr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y1(t))throw Error(Te(200));return oO(e,t,null,n)};Rr.createRoot=function(e,t){if(!y1(e))throw Error(Te(299));var n=!1,r="",i=x$;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=g1(e,1,!1,null,null,n,!1,r,i),e[Do]=t.current,ud(e.nodeType===8?e.parentNode:e),new v1(t)};Rr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Te(188)):(e=Object.keys(e).join(","),Error(Te(268,e)));return e=V2(t),e=e===null?null:e.stateNode,e};Rr.flushSync=function(e){return Bs(e)};Rr.hydrate=function(e,t,n){if(!Tg(t))throw Error(Te(200));return Ag(null,e,t,!0,n)};Rr.hydrateRoot=function(e,t,n){if(!y1(e))throw Error(Te(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=x$;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=S$(t,null,e,1,n??null,i,!1,o,s),e[Do]=t.current,ud(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $g(t)};Rr.render=function(e,t,n){if(!Tg(t))throw Error(Te(200));return Ag(null,e,t,!1,n)};Rr.unmountComponentAtNode=function(e){if(!Tg(e))throw Error(Te(40));return e._reactRootContainer?(Bs(function(){Ag(null,null,e,!1,function(){e._reactRootContainer=null,e[Do]=null})}),!0):!1};Rr.unstable_batchedUpdates=d1;Rr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Tg(n))throw Error(Te(200));if(e==null||e._reactInternals===void 0)throw Error(Te(38));return Ag(e,t,n,!1,r)};Rr.version="18.2.0-next-9e3b772b8-20220608";function _$(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_$)}catch(e){console.error(e)}}_$(),S2.exports=Rr;var Wd=S2.exports;const If=ki(Wd);var gx=Wd;Da.createRoot=gx.createRoot,Da.hydrateRoot=gx.hydrateRoot;function cO(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function dO(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fO=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(dO(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=cO(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Wn="-ms-",xp="-moz-",Lt="-webkit-",C$="comm",b1="rule",w1="decl",hO="@import",k$="@keyframes",pO="@layer",gO=Math.abs,Mg=String.fromCharCode,mO=Object.assign;function vO(e,t){return Pn(e,0)^45?(((t<<2^Pn(e,0))<<2^Pn(e,1))<<2^Pn(e,2))<<2^Pn(e,3):0}function E$(e){return e.trim()}function yO(e,t){return(e=t.exec(e))?e[0]:e}function Rt(e,t,n){return e.replace(t,n)}function h0(e,t){return e.indexOf(t)}function Pn(e,t){return e.charCodeAt(t)|0}function yd(e,t,n){return e.slice(t,n)}function Hi(e){return e.length}function S1(e){return e.length}function Of(e,t){return t.push(e),e}function bO(e,t){return e.map(t).join("")}var Lg=1,Tu=1,$$=0,yr=0,hn=0,Wu="";function Rg(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Lg,column:Tu,length:s,return:""}}function uc(e,t){return mO(Rg("",null,null,"",null,null,0),e,{length:-e.length},t)}function wO(){return hn}function SO(){return hn=yr>0?Pn(Wu,--yr):0,Tu--,hn===10&&(Tu=1,Lg--),hn}function Tr(){return hn=yr<$$?Pn(Wu,yr++):0,Tu++,hn===10&&(Tu=1,Lg++),hn}function Zi(){return Pn(Wu,yr)}function Sh(){return yr}function Ud(e,t){return yd(Wu,e,t)}function bd(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function T$(e){return Lg=Tu=1,$$=Hi(Wu=e),yr=0,[]}function A$(e){return Wu="",e}function xh(e){return E$(Ud(yr-1,p0(e===91?e+2:e===40?e+1:e)))}function xO(e){for(;(hn=Zi())&&hn<33;)Tr();return bd(e)>2||bd(hn)>3?"":" "}function _O(e,t){for(;--t&&Tr()&&!(hn<48||hn>102||hn>57&&hn<65||hn>70&&hn<97););return Ud(e,Sh()+(t<6&&Zi()==32&&Tr()==32))}function p0(e){for(;Tr();)switch(hn){case e:return yr;case 34:case 39:e!==34&&e!==39&&p0(hn);break;case 40:e===41&&p0(e);break;case 92:Tr();break}return yr}function CO(e,t){for(;Tr()&&e+hn!==47+10;)if(e+hn===42+42&&Zi()===47)break;return"/*"+Ud(t,yr-1)+"*"+Mg(e===47?e:Tr())}function kO(e){for(;!bd(Zi());)Tr();return Ud(e,yr)}function EO(e){return A$(_h("",null,null,null,[""],e=T$(e),0,[0],e))}function _h(e,t,n,r,i,o,s,d,a){for(var c=0,u=0,l=s,f=0,h=0,p=0,g=1,y=1,x=1,S=0,E="",v=i,w=o,b=r,m=E;y;)switch(p=S,S=Tr()){case 40:if(p!=108&&Pn(m,l-1)==58){h0(m+=Rt(xh(S),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:m+=xh(S);break;case 9:case 10:case 13:case 32:m+=xO(p);break;case 92:m+=_O(Sh()-1,7);continue;case 47:switch(Zi()){case 42:case 47:Of($O(CO(Tr(),Sh()),t,n),a);break;default:m+="/"}break;case 123*g:d[c++]=Hi(m)*x;case 125*g:case 59:case 0:switch(S){case 0:case 125:y=0;case 59+u:x==-1&&(m=Rt(m,/\f/g,"")),h>0&&Hi(m)-l&&Of(h>32?vx(m+";",r,n,l-1):vx(Rt(m," ","")+";",r,n,l-2),a);break;case 59:m+=";";default:if(Of(b=mx(m,t,n,c,u,i,d,E,v=[],w=[],l),o),S===123)if(u===0)_h(m,t,b,b,v,o,l,d,w);else switch(f===99&&Pn(m,3)===110?100:f){case 100:case 108:case 109:case 115:_h(e,b,b,r&&Of(mx(e,b,b,0,0,i,d,E,i,v=[],l),w),i,w,l,d,r?v:w);break;default:_h(m,b,b,b,[""],w,0,d,w)}}c=u=h=0,g=x=1,E=m="",l=s;break;case 58:l=1+Hi(m),h=p;default:if(g<1){if(S==123)--g;else if(S==125&&g++==0&&SO()==125)continue}switch(m+=Mg(S),S*g){case 38:x=u>0?1:(m+="\f",-1);break;case 44:d[c++]=(Hi(m)-1)*x,x=1;break;case 64:Zi()===45&&(m+=xh(Tr())),f=Zi(),u=l=Hi(E=m+=kO(Sh())),S++;break;case 45:p===45&&Hi(m)==2&&(g=0)}}return o}function mx(e,t,n,r,i,o,s,d,a,c,u){for(var l=i-1,f=i===0?o:[""],h=S1(f),p=0,g=0,y=0;p<r;++p)for(var x=0,S=yd(e,l+1,l=gO(g=s[p])),E=e;x<h;++x)(E=E$(g>0?f[x]+" "+S:Rt(S,/&\f/g,f[x])))&&(a[y++]=E);return Rg(e,t,n,i===0?b1:d,a,c,u)}function $O(e,t,n){return Rg(e,t,n,C$,Mg(wO()),yd(e,2,-2),0)}function vx(e,t,n,r){return Rg(e,t,n,w1,yd(e,0,r),yd(e,r+1,-1),r)}function uu(e,t){for(var n="",r=S1(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function TO(e,t,n,r){switch(e.type){case pO:if(e.children.length)break;case hO:case w1:return e.return=e.return||e.value;case C$:return"";case k$:return e.return=e.value+"{"+uu(e.children,r)+"}";case b1:e.value=e.props.join(",")}return Hi(n=uu(e.children,r))?e.return=e.value+"{"+n+"}":""}function AO(e){var t=S1(e);return function(n,r,i,o){for(var s="",d=0;d<t;d++)s+=e[d](n,r,i,o)||"";return s}}function MO(e){return function(t){t.root||(t=t.return)&&e(t)}}var yx=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var i=t(r);return n.set(r,i),i}};function M$(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var LO=function(t,n,r){for(var i=0,o=0;i=o,o=Zi(),i===38&&o===12&&(n[r]=1),!bd(o);)Tr();return Ud(t,yr)},RO=function(t,n){var r=-1,i=44;do switch(bd(i)){case 0:i===38&&Zi()===12&&(n[r]=1),t[r]+=LO(yr-1,n,r);break;case 2:t[r]+=xh(i);break;case 4:if(i===44){t[++r]=Zi()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Mg(i)}while(i=Tr());return t},PO=function(t,n){return A$(RO(T$(t),n))},bx=new WeakMap,IO=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!bx.get(r))&&!i){bx.set(t,!0);for(var o=[],s=PO(n,o),d=r.props,a=0,c=0;a<s.length;a++)for(var u=0;u<d.length;u++,c++)t.props[c]=o[a]?s[a].replace(/&\f/g,d[u]):d[u]+" "+s[a]}}},OO=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function L$(e,t){switch(vO(e,t)){case 5103:return Lt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Lt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Lt+e+xp+e+Wn+e+e;case 6828:case 4268:return Lt+e+Wn+e+e;case 6165:return Lt+e+Wn+"flex-"+e+e;case 5187:return Lt+e+Rt(e,/(\w+).+(:[^]+)/,Lt+"box-$1$2"+Wn+"flex-$1$2")+e;case 5443:return Lt+e+Wn+"flex-item-"+Rt(e,/flex-|-self/,"")+e;case 4675:return Lt+e+Wn+"flex-line-pack"+Rt(e,/align-content|flex-|-self/,"")+e;case 5548:return Lt+e+Wn+Rt(e,"shrink","negative")+e;case 5292:return Lt+e+Wn+Rt(e,"basis","preferred-size")+e;case 6060:return Lt+"box-"+Rt(e,"-grow","")+Lt+e+Wn+Rt(e,"grow","positive")+e;case 4554:return Lt+Rt(e,/([^-])(transform)/g,"$1"+Lt+"$2")+e;case 6187:return Rt(Rt(Rt(e,/(zoom-|grab)/,Lt+"$1"),/(image-set)/,Lt+"$1"),e,"")+e;case 5495:case 3959:return Rt(e,/(image-set\([^]*)/,Lt+"$1$`$1");case 4968:return Rt(Rt(e,/(.+:)(flex-)?(.*)/,Lt+"box-pack:$3"+Wn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Lt+e+e;case 4095:case 3583:case 4068:case 2532:return Rt(e,/(.+)-inline(.+)/,Lt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Hi(e)-1-t>6)switch(Pn(e,t+1)){case 109:if(Pn(e,t+4)!==45)break;case 102:return Rt(e,/(.+:)(.+)-([^]+)/,"$1"+Lt+"$2-$3$1"+xp+(Pn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~h0(e,"stretch")?L$(Rt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Pn(e,t+1)!==115)break;case 6444:switch(Pn(e,Hi(e)-3-(~h0(e,"!important")&&10))){case 107:return Rt(e,":",":"+Lt)+e;case 101:return Rt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Lt+(Pn(e,14)===45?"inline-":"")+"box$3$1"+Lt+"$2$3$1"+Wn+"$2box$3")+e}break;case 5936:switch(Pn(e,t+11)){case 114:return Lt+e+Wn+Rt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Lt+e+Wn+Rt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Lt+e+Wn+Rt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Lt+e+Wn+e+e}return e}var FO=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case w1:t.return=L$(t.value,t.length);break;case k$:return uu([uc(t,{value:Rt(t.value,"@","@"+Lt)})],i);case b1:if(t.length)return bO(t.props,function(o){switch(yO(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return uu([uc(t,{props:[Rt(o,/:(read-\w+)/,":"+xp+"$1")]})],i);case"::placeholder":return uu([uc(t,{props:[Rt(o,/:(plac\w+)/,":"+Lt+"input-$1")]}),uc(t,{props:[Rt(o,/:(plac\w+)/,":"+xp+"$1")]}),uc(t,{props:[Rt(o,/:(plac\w+)/,Wn+"input-$1")]})],i)}return""})}},DO=[FO],NO=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(g){var y=g.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||DO,o={},s,d=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var y=g.getAttribute("data-emotion").split(" "),x=1;x<y.length;x++)o[y[x]]=!0;d.push(g)});var a,c=[IO,OO];{var u,l=[TO,MO(function(g){u.insert(g)})],f=AO(c.concat(i,l)),h=function(y){return uu(EO(y),f)};a=function(y,x,S,E){u=S,h(y?y+"{"+x.styles+"}":x.styles),E&&(p.inserted[x.name]=!0)}}var p={key:n,sheet:new fO({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:a};return p.sheet.hydrate(d),p};function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ze.apply(this,arguments)}var R$={exports:{}},Dt={};/** @license React v16.13.1
* 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 $n=typeof Symbol=="function"&&Symbol.for,x1=$n?Symbol.for("react.element"):60103,_1=$n?Symbol.for("react.portal"):60106,Pg=$n?Symbol.for("react.fragment"):60107,Ig=$n?Symbol.for("react.strict_mode"):60108,Og=$n?Symbol.for("react.profiler"):60114,Fg=$n?Symbol.for("react.provider"):60109,Dg=$n?Symbol.for("react.context"):60110,C1=$n?Symbol.for("react.async_mode"):60111,Ng=$n?Symbol.for("react.concurrent_mode"):60111,zg=$n?Symbol.for("react.forward_ref"):60112,jg=$n?Symbol.for("react.suspense"):60113,zO=$n?Symbol.for("react.suspense_list"):60120,Bg=$n?Symbol.for("react.memo"):60115,Hg=$n?Symbol.for("react.lazy"):60116,jO=$n?Symbol.for("react.block"):60121,BO=$n?Symbol.for("react.fundamental"):60117,HO=$n?Symbol.for("react.responder"):60118,VO=$n?Symbol.for("react.scope"):60119;function Ir(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case x1:switch(e=e.type,e){case C1:case Ng:case Pg:case Og:case Ig:case jg:return e;default:switch(e=e&&e.$$typeof,e){case Dg:case zg:case Hg:case Bg:case Fg:return e;default:return t}}case _1:return t}}}function P$(e){return Ir(e)===Ng}Dt.AsyncMode=C1;Dt.ConcurrentMode=Ng;Dt.ContextConsumer=Dg;Dt.ContextProvider=Fg;Dt.Element=x1;Dt.ForwardRef=zg;Dt.Fragment=Pg;Dt.Lazy=Hg;Dt.Memo=Bg;Dt.Portal=_1;Dt.Profiler=Og;Dt.StrictMode=Ig;Dt.Suspense=jg;Dt.isAsyncMode=function(e){return P$(e)||Ir(e)===C1};Dt.isConcurrentMode=P$;Dt.isContextConsumer=function(e){return Ir(e)===Dg};Dt.isContextProvider=function(e){return Ir(e)===Fg};Dt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===x1};Dt.isForwardRef=function(e){return Ir(e)===zg};Dt.isFragment=function(e){return Ir(e)===Pg};Dt.isLazy=function(e){return Ir(e)===Hg};Dt.isMemo=function(e){return Ir(e)===Bg};Dt.isPortal=function(e){return Ir(e)===_1};Dt.isProfiler=function(e){return Ir(e)===Og};Dt.isStrictMode=function(e){return Ir(e)===Ig};Dt.isSuspense=function(e){return Ir(e)===jg};Dt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pg||e===Ng||e===Og||e===Ig||e===jg||e===zO||typeof e=="object"&&e!==null&&(e.$$typeof===Hg||e.$$typeof===Bg||e.$$typeof===Fg||e.$$typeof===Dg||e.$$typeof===zg||e.$$typeof===BO||e.$$typeof===HO||e.$$typeof===VO||e.$$typeof===jO)};Dt.typeOf=Ir;R$.exports=Dt;var k1=R$.exports,E1=k1,WO={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},UO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},GO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},I$={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$1={};$1[E1.ForwardRef]=GO;$1[E1.Memo]=I$;function wx(e){return E1.isMemo(e)?I$:$1[e.$$typeof]||WO}var KO=Object.defineProperty,qO=Object.getOwnPropertyNames,Sx=Object.getOwnPropertySymbols,YO=Object.getOwnPropertyDescriptor,XO=Object.getPrototypeOf,xx=Object.prototype;function O$(e,t,n){if(typeof t!="string"){if(xx){var r=XO(t);r&&r!==xx&&O$(e,r,n)}var i=qO(t);Sx&&(i=i.concat(Sx(t)));for(var o=wx(e),s=wx(t),d=0;d<i.length;++d){var a=i[d];if(!UO[a]&&!(n&&n[a])&&!(s&&s[a])&&!(o&&o[a])){var c=YO(t,a);try{KO(e,a,c)}catch{}}}}return e}var ZO=O$;const QO=ki(ZO);var JO=!0;function F$(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var T1=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||JO===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},A1=function(t,n,r){T1(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function e8(e){for(var t=0,n,r=0,i=e.length;i>=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 t8={animationIterationCount:1,aspectRatio: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},n8=/[A-Z]|^ms/g,r8=/_EMO_([^_]+?)_([^]*?)_EMO_/g,D$=function(t){return t.charCodeAt(1)===45},_x=function(t){return t!=null&&typeof t!="boolean"},fv=M$(function(e){return D$(e)?e:e.replace(n8,"-$&").toLowerCase()}),Cx=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(r8,function(r,i,o){return Vi={name:i,styles:o,next:Vi},i})}return t8[t]!==1&&!D$(t)&&typeof n=="number"&&n!==0?n+"px":n};function wd(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 Vi={name:n.name,styles:n.styles,next:Vi},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Vi={name:r.name,styles:r.styles,next:Vi},r=r.next;var i=n.styles+";";return i}return i8(e,t,n)}case"function":{if(e!==void 0){var o=Vi,s=n(e);return Vi=o,wd(e,t,s)}break}}if(t==null)return n;var d=t[n];return d!==void 0?d:n}function i8(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=wd(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object")t!=null&&t[s]!==void 0?r+=o+"{"+t[s]+"}":_x(s)&&(r+=fv(o)+":"+Cx(o,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var d=0;d<s.length;d++)_x(s[d])&&(r+=fv(o)+":"+Cx(o,s[d])+";");else{var a=wd(e,t,s);switch(o){case"animation":case"animationName":{r+=fv(o)+":"+a+";";break}default:r+=o+"{"+a+"}"}}}return r}var kx=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Vi,Vg=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Vi=void 0;var s=t[0];s==null||s.raw===void 0?(i=!1,o+=wd(r,n,s)):o+=s[0];for(var d=1;d<t.length;d++)o+=wd(r,n,t[d]),i&&(o+=s[d]);kx.lastIndex=0;for(var a="",c;(c=kx.exec(o))!==null;)a+="-"+c[1];var u=e8(o)+a;return{name:u,styles:o,next:Vi}},o8=function(t){return t()},N$=uS["useInsertionEffect"]?uS["useInsertionEffect"]:!1,z$=N$||o8,Ex=N$||F.useLayoutEffect,M1={}.hasOwnProperty,j$=F.createContext(typeof HTMLElement<"u"?NO({key:"css"}):null);j$.Provider;var L1=function(t){return F.forwardRef(function(n,r){var i=F.useContext(j$);return t(n,i,r)})},Au=F.createContext({}),a8=function(t,n){if(typeof n=="function"){var r=n(t);return r}return ze({},t,n)},s8=yx(function(e){return yx(function(t){return a8(e,t)})}),l8=function(t){var n=F.useContext(Au);return t.theme!==n&&(n=s8(n)(t.theme)),F.createElement(Au.Provider,{value:n},t.children)},g0="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",u8=function(t,n){var r={};for(var i in n)M1.call(n,i)&&(r[i]=n[i]);return r[g0]=t,r},c8=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return T1(n,r,i),z$(function(){return A1(n,r,i)}),null},d8=L1(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[g0],o=[r],s="";typeof e.className=="string"?s=F$(t.registered,o,e.className):e.className!=null&&(s=e.className+" ");var d=Vg(o,void 0,F.useContext(Au));s+=t.key+"-"+d.name;var a={};for(var c in e)M1.call(e,c)&&c!=="css"&&c!==g0&&(a[c]=e[c]);return a.ref=n,a.className=s,F.createElement(F.Fragment,null,F.createElement(c8,{cache:t,serialized:d,isStringTag:typeof i=="string"}),F.createElement(i,a))}),f8=d8,Qe=function(t,n){var r=arguments;if(n==null||!M1.call(n,"css"))return F.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=f8,o[1]=u8(t,n);for(var s=2;s<i;s++)o[s]=r[s];return F.createElement.apply(null,o)},Wg=L1(function(e,t){var n=e.styles,r=Vg([n],void 0,F.useContext(Au)),i=F.useRef();return Ex(function(){var o=t.key+"-global",s=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),d=!1,a=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),a!==null&&(d=!0,a.setAttribute("data-emotion",o),s.hydrate([a])),i.current=[s,d],function(){s.flush()}},[t]),Ex(function(){var o=i.current,s=o[0],d=o[1];if(d){o[1]=!1;return}if(r.next!==void 0&&A1(t,r.next,!0),s.tags.length){var a=s.tags[s.tags.length-1].nextElementSibling;s.before=a,s.flush()}t.insert("",r,s,!1)},[t,r.name]),null});function R1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Vg(t)}var Gd=function(){var t=R1.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},B$=String.raw,H$=B$`
:root,
:host {
--chakra-vh: 100vh;
}
@supports (height: -webkit-fill-available) {
:root,
:host {
--chakra-vh: -webkit-fill-available;
}
}
@supports (height: -moz-fill-available) {
:root,
:host {
--chakra-vh: -moz-fill-available;
}
}
@supports (height: 100dvh) {
:root,
:host {
--chakra-vh: 100dvh;
}
}
`,h8=()=>j.jsx(Wg,{styles:H$}),p8=({scope:e=""})=>j.jsx(Wg,{styles:B$`
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%;
margin: 0;
font-feature-settings: "kern";
}
${e} :where(*, *::before, *::after) {
border-width: 0;
border-style: solid;
box-sizing: border-box;
word-wrap: break-word;
}
main {
display: block;
}
${e} hr {
border-top-width: 1px;
box-sizing: content-box;
height: 0;
overflow: visible;
}
${e} :where(pre, code, kbd,samp) {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
font-size: 1em;
}
${e} a {
background-color: transparent;
color: inherit;
text-decoration: inherit;
}
${e} abbr[title] {
border-bottom: none;
text-decoration: underline;
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}
${e} :where(b, strong) {
font-weight: bold;
}
${e} small {
font-size: 80%;
}
${e} :where(sub,sup) {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
${e} sub {
bottom: -0.25em;
}
${e} sup {
top: -0.5em;
}
${e} img {
border-style: none;
}
${e} :where(button, input, optgroup, select, textarea) {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}
${e} :where(button, input) {
overflow: visible;
}
${e} :where(button, select) {
text-transform: none;
}
${e} :where(
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner
) {
border-style: none;
padding: 0;
}
${e} fieldset {
padding: 0.35em 0.75em 0.625em;
}
${e} legend {
box-sizing: border-box;
color: inherit;
display: table;
max-width: 100%;
padding: 0;
white-space: normal;
}
${e} progress {
vertical-align: baseline;
}
${e} textarea {
overflow: auto;
}
${e} :where([type="checkbox"], [type="radio"]) {
box-sizing: border-box;
padding: 0;
}
${e} input[type="number"]::-webkit-inner-spin-button,
${e} input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important;
}
${e} input[type="number"] {
-moz-appearance: textfield;
}
${e} input[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
${e} input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none !important;
}
${e} ::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
${e} details {
display: block;
}
${e} summary {
display: list-item;
}
template {
display: none;
}
[hidden] {
display: none !important;
}
${e} :where(
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre
) {
margin: 0;
}
${e} button {
background: transparent;
padding: 0;
}
${e} fieldset {
margin: 0;
padding: 0;
}
${e} :where(ol, ul) {
margin: 0;
padding: 0;
}
${e} textarea {
resize: vertical;
}
${e} :where(button, [role="button"]) {
cursor: pointer;
}
${e} button::-moz-focus-inner {
border: 0 !important;
}
${e} table {
border-collapse: collapse;
}
${e} :where(h1, h2, h3, h4, h5, h6) {
font-size: inherit;
font-weight: inherit;
}
${e} :where(button, input, optgroup, select, textarea) {
padding: 0;
line-height: inherit;
color: inherit;
}
${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
display: block;
}
${e} :where(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;
}
${e} select::-ms-expand {
display: none;
}
${H$}
`});function g8(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function bn(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o,defaultValue:s}=e,d=F.createContext(s);d.displayName=t;function a(){var c;const u=F.useContext(d);if(!u&&n){const l=new Error(o??g8(r,i));throw l.name="ContextError",(c=Error.captureStackTrace)==null||c.call(Error,l,a),l}return u}return[d.Provider,a,d]}var[m8,v8]=bn({strict:!1,name:"PortalManagerContext"});function V$(e){const{children:t,zIndex:n}=e;return j.jsx(m8,{value:{zIndex:n},children:t})}V$.displayName="PortalManager";var La=globalThis!=null&&globalThis.document?F.useLayoutEffect:F.useEffect,[W$,y8]=bn({strict:!1,name:"PortalContext"}),P1="chakra-portal",b8=".chakra-portal",w8=e=>j.jsx("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children}),S8=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=F.useState(null),o=F.useRef(null),[,s]=F.useState({});F.useEffect(()=>s({}),[]);const d=y8(),a=v8();La(()=>{if(!r)return;const u=r.ownerDocument,l=t?d??u.body:u.body;if(!l)return;o.current=u.createElement("div"),o.current.className=P1,l.appendChild(o.current),s({});const f=o.current;return()=>{l.contains(f)&&l.removeChild(f)}},[r]);const c=a!=null&&a.zIndex?j.jsx(w8,{zIndex:a==null?void 0:a.zIndex,children:n}):n;return o.current?Wd.createPortal(j.jsx(W$,{value:o.current,children:c}),o.current):j.jsx("span",{ref:u=>{u&&i(u)}})},x8=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i??(typeof window<"u"?document.body:void 0),s=F.useMemo(()=>{const a=i==null?void 0:i.ownerDocument.createElement("div");return a&&(a.className=P1),a},[i]),[,d]=F.useState({});return La(()=>d({}),[]),La(()=>{if(!(!s||!o))return o.appendChild(s),()=>{o.removeChild(s)}},[s,o]),o&&s?Wd.createPortal(j.jsx(W$,{value:r?s:null,children:t}),s):null};function Kd(e){const t={appendToParentPortal:!0,...e},{containerRef:n,...r}=t;return n?j.jsx(x8,{containerRef:n,...r}):j.jsx(S8,{...r})}Kd.className=P1;Kd.selector=b8;Kd.displayName="Portal";function _8(){const e=F.useContext(Au);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}var I1=F.createContext({});I1.displayName="ColorModeContext";function O1(){const e=F.useContext(I1);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}var Ff={light:"chakra-ui-light",dark:"chakra-ui-dark"};function C8(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==null||i()},setClassName(r){document.body.classList.add(r?Ff.dark:Ff.light),document.body.classList.remove(r?Ff.light:Ff.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var i;return((i=n.query().matches)!=null?i:r==="dark")?"dark":"light"},addListener(r){const i=n.query(),o=s=>{r(s.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 k8="chakra-ui-color-mode";function E8(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&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 $8=E8(k8),$x=()=>{};function Tx(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function U$(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:s=$8}=e,d=i==="dark"?"dark":"light",[a,c]=F.useState(()=>Tx(s,d)),[u,l]=F.useState(()=>Tx(s)),{getSystemTheme:f,setClassName:h,setDataset:p,addListener:g}=F.useMemo(()=>C8({preventTransition:o}),[o]),y=i==="system"&&!a?u:a,x=F.useCallback(v=>{const w=v==="system"?f():v;c(w),h(w==="dark"),p(w),s.set(w)},[s,f,h,p]);La(()=>{i==="system"&&l(f())},[]),F.useEffect(()=>{const v=s.get();if(v){x(v);return}if(i==="system"){x("system");return}x(d)},[s,d,i,x]);const S=F.useCallback(()=>{x(y==="dark"?"light":"dark")},[y,x]);F.useEffect(()=>{if(r)return g(x)},[r,g,x]);const E=F.useMemo(()=>({colorMode:t??y,toggleColorMode:t?$x:S,setColorMode:t?$x:x,forced:t!==void 0}),[y,S,x,t]);return j.jsx(I1.Provider,{value:E,children:n})}U$.displayName="ColorModeProvider";function G$(){const e=O1(),t=_8();return{...e,theme:t}}var wt=(...e)=>e.filter(Boolean).join(" ");function mr(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function Ki(e,...t){return T8(e)?e(...t):e}var T8=e=>typeof e=="function",ht=e=>e?"":void 0,Ro=e=>e?!0:void 0;function ft(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function K$(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}var _p={exports:{}};_p.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,s=9007199254740991,d="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",l="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",g="[object Map]",y="[object Number]",x="[object Null]",S="[object Object]",E="[object Proxy]",v="[object RegExp]",w="[object Set]",b="[object String]",m="[object Undefined]",$="[object WeakMap]",A="[object ArrayBuffer]",C="[object DataView]",k="[object Float32Array]",I="[object Float64Array]",L="[object Int8Array]",T="[object Int16Array]",R="[object Int32Array]",P="[object Uint8Array]",D="[object Uint8ClampedArray]",N="[object Uint16Array]",B="[object Uint32Array]",Z=/[\\^$.*+?()[\]{}|]/g,U=/^\[object .+?Constructor\]$/,X=/^(?:0|[1-9]\d*)$/,W={};W[k]=W[I]=W[L]=W[T]=W[R]=W[P]=W[D]=W[N]=W[B]=!0,W[d]=W[a]=W[A]=W[u]=W[C]=W[l]=W[f]=W[h]=W[g]=W[y]=W[S]=W[v]=W[w]=W[b]=W[$]=!1;var q=typeof Ue=="object"&&Ue&&Ue.Object===Object&&Ue,Q=typeof self=="object"&&self&&self.Object===Object&&self,G=q||Q||Function("return this")(),oe=t&&!t.nodeType&&t,ne=oe&&!0&&e&&!e.nodeType&&e,ce=ne&&ne.exports===oe,fe=ce&&q.process,he=function(){try{var K=ne&&ne.require&&ne.require("util").types;return K||fe&&fe.binding&&fe.binding("util")}catch{}}(),me=he&&he.isTypedArray;function Pe(K,te,de){switch(de.length){case 0:return K.call(te);case 1:return K.call(te,de[0]);case 2:return K.call(te,de[0],de[1]);case 3:return K.call(te,de[0],de[1],de[2])}return K.apply(te,de)}function Ee(K,te){for(var de=-1,ke=Array(K);++de<K;)ke[de]=te(de);return ke}function Ae(K){return function(te){return K(te)}}function Fe(K,te){return K==null?void 0:K[te]}function Be(K,te){return function(de){return K(te(de))}}var lt=Array.prototype,qt=Function.prototype,pt=Object.prototype,on=G["__core-js_shared__"],xt=qt.toString,ve=pt.hasOwnProperty,Se=function(){var K=/[^.]+$/.exec(on&&on.keys&&on.keys.IE_PROTO||"");return K?"Symbol(src)_1."+K:""}(),be=pt.toString,De=xt.call(Object),ot=RegExp("^"+xt.call(ve).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xe=ce?G.Buffer:void 0,Re=G.Symbol,Ve=G.Uint8Array,et=xe?xe.allocUnsafe:void 0,at=Be(Object.getPrototypeOf,Object),At=Object.create,un=pt.propertyIsEnumerable,Dn=lt.splice,Dr=Re?Re.toStringTag:void 0,Nr=function(){try{var K=Xo(Object,"defineProperty");return K({},"",{}),K}catch{}}(),Zs=xe?xe.isBuffer:void 0,wr=Math.max,Qs=Date.now,ai=Xo(G,"Map"),Sr=Xo(Object,"create"),Uo=function(){function K(){}return function(te){if(!Hr(te))return{};if(At)return At(te);K.prototype=te;var de=new K;return K.prototype=void 0,de}}();function Nn(K){var te=-1,de=K==null?0:K.length;for(this.clear();++te<de;){var ke=K[te];this.set(ke[0],ke[1])}}function Sn(){this.__data__=Sr?Sr(null):{},this.size=0}function cn(K){var te=this.has(K)&&delete this.__data__[K];return this.size-=te?1:0,te}function oo(K){var te=this.__data__;if(Sr){var de=te[K];return de===r?void 0:de}return ve.call(te,K)?te[K]:void 0}function ao(K){var te=this.__data__;return Sr?te[K]!==void 0:ve.call(te,K)}function Js(K,te){var de=this.__data__;return this.size+=this.has(K)?0:1,de[K]=Sr&&te===void 0?r:te,this}Nn.prototype.clear=Sn,Nn.prototype.delete=cn,Nn.prototype.get=oo,Nn.prototype.has=ao,Nn.prototype.set=Js;function ir(K){var te=-1,de=K==null?0:K.length;for(this.clear();++te<de;){var ke=K[te];this.set(ke[0],ke[1])}}function Ei(){this.__data__=[],this.size=0}function $i(K){var te=this.__data__,de=uo(te,K);if(de<0)return!1;var ke=te.length-1;return de==ke?te.pop():Dn.call(te,de,1),--this.size,!0}function qa(K){var te=this.__data__,de=uo(te,K);return de<0?void 0:te[de][1]}function so(K){return uo(this.__data__,K)>-1}function Ya(K,te){var de=this.__data__,ke=uo(de,K);return ke<0?(++this.size,de.push([K,te])):de[ke][1]=te,this}ir.prototype.clear=Ei,ir.prototype.delete=$i,ir.prototype.get=qa,ir.prototype.has=so,ir.prototype.set=Ya;function zn(K){var te=-1,de=K==null?0:K.length;for(this.clear();++te<de;){var ke=K[te];this.set(ke[0],ke[1])}}function qu(){this.size=0,this.__data__={hash:new Nn,map:new(ai||ir),string:new Nn}}function el(K){var te=si(this,K).delete(K);return this.size-=te?1:0,te}function Yu(K){return si(this,K).get(K)}function Xu(K){return si(this,K).has(K)}function tl(K,te){var de=si(this,K),ke=de.size;return de.set(K,te),this.size+=de.size==ke?0:1,this}zn.prototype.clear=qu,zn.prototype.delete=el,zn.prototype.get=Yu,zn.prototype.has=Xu,zn.prototype.set=tl;function xn(K){var te=this.__data__=new ir(K);this.size=te.size}function Ti(){this.__data__=new ir,this.size=0}function nl(K){var te=this.__data__,de=te.delete(K);return this.size=te.size,de}function Xa(K){return this.__data__.get(K)}function Za(K){return this.__data__.has(K)}function Go(K,te){var de=this.__data__;if(de instanceof ir){var ke=de.__data__;if(!ai||ke.length<n-1)return ke.push([K,te]),this.size=++de.size,this;de=this.__data__=new zn(ke)}return de.set(K,te),this.size=de.size,this}xn.prototype.clear=Ti,xn.prototype.delete=nl,xn.prototype.get=Xa,xn.prototype.has=Za,xn.prototype.set=Go;function zr(K,te){var de=Qo(K),ke=!de&&ar(K),We=!de&&!ke&&fl(K),tt=!de&&!ke&&!We&&Li(K),nt=de||ke||We||tt,je=nt?Ee(K.length,String):[],ct=je.length;for(var zt in K)(te||ve.call(K,zt))&&!(nt&&(zt=="length"||We&&(zt=="offset"||zt=="parent")||tt&&(zt=="buffer"||zt=="byteLength"||zt=="byteOffset")||jn(zt,ct)))&&je.push(zt);return je}function Qa(K,te,de){(de!==void 0&&!ho(K[te],de)||de===void 0&&!(te in K))&&Ko(K,te,de)}function lo(K,te,de){var ke=K[te];(!(ve.call(K,te)&&ho(ke,de))||de===void 0&&!(te in K))&&Ko(K,te,de)}function uo(K,te){for(var de=K.length;de--;)if(ho(K[de][0],te))return de;return-1}function Ko(K,te,de){te=="__proto__"&&Nr?Nr(K,te,{configurable:!0,enumerable:!0,value:de,writable:!0}):K[te]=de}var rl=ll();function jr(K){return K==null?K===void 0?m:x:Dr&&Dr in Object(K)?Qu(K):ci(K)}function il(K){return Mi(K)&&jr(K)==d}function Ja(K){if(!Hr(K)||Zo(K))return!1;var te=di(K)?ot:U;return te.test(rs(K))}function Br(K){return Mi(K)&&hl(K.length)&&!!W[jr(K)]}function Zu(K){if(!Hr(K))return ui(K);var te=li(K),de=[];for(var ke in K)ke=="constructor"&&(te||!ve.call(K,ke))||de.push(ke);return de}function es(K,te,de,ke,We){K!==te&&rl(te,function(tt,nt){if(We||(We=new xn),Hr(tt))ol(K,te,nt,de,es,ke,We);else{var je=ke?ke(ns(K,nt),tt,nt+"",K,te,We):void 0;je===void 0&&(je=tt),Qa(K,nt,je)}},ml)}function ol(K,te,de,ke,We,tt,nt){var je=ns(K,de),ct=ns(te,de),zt=nt.get(ct);if(zt){Qa(K,de,zt);return}var kt=tt?tt(je,ct,de+"",K,te,nt):void 0,dn=kt===void 0;if(dn){var _=Qo(ct),M=!_&&fl(ct),O=!_&&!M&&Li(ct);kt=ct,_||M||O?Qo(je)?kt=je:ea(je)?kt=co(je):M?(dn=!1,kt=_n(ct,!0)):O?(dn=!1,kt=qo(ct,!0)):kt=[]:pl(ct)||ar(ct)?(kt=je,ar(je)?kt=gl(je):(!Hr(je)||di(je))&&(kt=ul(ct))):dn=!1}dn&&(nt.set(ct,kt),We(kt,ct,ke,tt,nt),nt.delete(ct)),Qa(K,de,kt)}function ts(K,te){return fo(or(K,te,ee),K+"")}var al=Nr?function(K,te){return Nr(K,"toString",{configurable:!0,enumerable:!1,value:is(te),writable:!0})}:ee;function _n(K,te){if(te)return K.slice();var de=K.length,ke=et?et(de):new K.constructor(de);return K.copy(ke),ke}function xr(K){var te=new K.constructor(K.byteLength);return new Ve(te).set(new Ve(K)),te}function qo(K,te){var de=te?xr(K.buffer):K.buffer;return new K.constructor(de,K.byteOffset,K.length)}function co(K,te){var de=-1,ke=K.length;for(te||(te=Array(ke));++de<ke;)te[de]=K[de];return te}function sl(K,te,de,ke){var We=!de;de||(de={});for(var tt=-1,nt=te.length;++tt<nt;){var je=te[tt],ct=ke?ke(de[je],K[je],je,de,K):void 0;ct===void 0&&(ct=K[je]),We?Ko(de,je,ct):lo(de,je,ct)}return de}function Yo(K){return ts(function(te,de){var ke=-1,We=de.length,tt=We>1?de[We-1]:void 0,nt=We>2?de[2]:void 0;for(tt=K.length>3&&typeof tt=="function"?(We--,tt):void 0,nt&&cl(de[0],de[1],nt)&&(tt=We<3?void 0:tt,We=1),te=Object(te);++ke<We;){var je=de[ke];je&&K(te,je,ke,tt)}return te})}function ll(K){return function(te,de,ke){for(var We=-1,tt=Object(te),nt=ke(te),je=nt.length;je--;){var ct=nt[K?je:++We];if(de(tt[ct],ct,tt)===!1)break}return te}}function si(K,te){var de=K.__data__;return Ai(te)?de[typeof te=="string"?"string":"hash"]:de.map}function Xo(K,te){var de=Fe(K,te);return Ja(de)?de:void 0}function Qu(K){var te=ve.call(K,Dr),de=K[Dr];try{K[Dr]=void 0;var ke=!0}catch{}var We=be.call(K);return ke&&(te?K[Dr]=de:delete K[Dr]),We}function ul(K){return typeof K.constructor=="function"&&!li(K)?Uo(at(K)):{}}function jn(K,te){var de=typeof K;return te=te??s,!!te&&(de=="number"||de!="symbol"&&X.test(K))&&K>-1&&K%1==0&&K<te}function cl(K,te,de){if(!Hr(de))return!1;var ke=typeof te;return(ke=="number"?Jo(de)&&jn(te,de.length):ke=="string"&&te in de)?ho(de[te],K):!1}function Ai(K){var te=typeof K;return te=="string"||te=="number"||te=="symbol"||te=="boolean"?K!=="__proto__":K===null}function Zo(K){return!!Se&&Se in K}function li(K){var te=K&&K.constructor,de=typeof te=="function"&&te.prototype||pt;return K===de}function ui(K){var te=[];if(K!=null)for(var de in Object(K))te.push(de);return te}function ci(K){return be.call(K)}function or(K,te,de){return te=wr(te===void 0?K.length-1:te,0),function(){for(var ke=arguments,We=-1,tt=wr(ke.length-te,0),nt=Array(tt);++We<tt;)nt[We]=ke[te+We];We=-1;for(var je=Array(te+1);++We<te;)je[We]=ke[We];return je[te]=de(nt),Pe(K,this,je)}}function ns(K,te){if(!(te==="constructor"&&typeof K[te]=="function")&&te!="__proto__")return K[te]}var fo=dl(al);function dl(K){var te=0,de=0;return function(){var ke=Qs(),We=o-(ke-de);if(de=ke,We>0){if(++te>=i)return arguments[0]}else te=0;return K.apply(void 0,arguments)}}function rs(K){if(K!=null){try{return xt.call(K)}catch{}try{return K+""}catch{}}return""}function ho(K,te){return K===te||K!==K&&te!==te}var ar=il(function(){return arguments}())?il:function(K){return Mi(K)&&ve.call(K,"callee")&&!un.call(K,"callee")},Qo=Array.isArray;function Jo(K){return K!=null&&hl(K.length)&&!di(K)}function ea(K){return Mi(K)&&Jo(K)}var fl=Zs||le;function di(K){if(!Hr(K))return!1;var te=jr(K);return te==h||te==p||te==c||te==E}function hl(K){return typeof K=="number"&&K>-1&&K%1==0&&K<=s}function Hr(K){var te=typeof K;return K!=null&&(te=="object"||te=="function")}function Mi(K){return K!=null&&typeof K=="object"}function pl(K){if(!Mi(K)||jr(K)!=S)return!1;var te=at(K);if(te===null)return!0;var de=ve.call(te,"constructor")&&te.constructor;return typeof de=="function"&&de instanceof de&&xt.call(de)==De}var Li=me?Ae(me):Br;function gl(K){return sl(K,ml(K))}function ml(K){return Jo(K)?zr(K,!0):Zu(K)}var vl=Yo(function(K,te,de,ke){es(K,te,de,ke)});function is(K){return function(){return K}}function ee(K){return K}function le(){return!1}e.exports=vl})(_p,_p.exports);var A8=_p.exports;const ei=ki(A8);var M8=e=>/!(important)?$/.test(e),Ax=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,L8=(e,t)=>n=>{const r=String(t),i=M8(r),o=Ax(r),s=e?`${e}.${o}`:o;let d=mr(n.__cssMap)&&s in n.__cssMap?n.__cssMap[s].varRef:t;return d=Ax(d),i?`${d} !important`:d};function F1(e){const{scale:t,transform:n,compose:r}=e;return(o,s)=>{var d;const a=L8(t,o)(s);let c=(d=n==null?void 0:n(a,s))!=null?d:a;return r&&(c=r(c,s)),c}}var Df=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Ur(e,t){return n=>{const r={property:n,scale:e};return r.transform=F1({scale:e,transform:t}),r}}var R8=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function P8(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:R8(t),transform:n?F1({scale:n,compose:r}):r}}var q$=["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 I8(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...q$].join(" ")}function O8(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...q$].join(" ")}var F8={"--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(" ")},D8={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 N8(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 z8={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},m0={"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"},j8=new Set(Object.values(m0)),v0=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),B8=e=>e.trim();function H8(e,t){if(e==null||v0.has(e))return e;if(!(y0(e)||v0.has(e)))return`url('${e}')`;const i=/(^[a-z-A-Z]+)\((.*)\)/g.exec(e),o=i==null?void 0:i[1],s=i==null?void 0:i[2];if(!o||!s)return e;const d=o.includes("-gradient")?o:`${o}-gradient`,[a,...c]=s.split(",").map(B8).filter(Boolean);if((c==null?void 0:c.length)===0)return e;const u=a in m0?m0[a]:a;c.unshift(u);const l=c.map(f=>{if(j8.has(f))return f;const h=f.indexOf(" "),[p,g]=h!==-1?[f.substr(0,h),f.substr(h+1)]:[f],y=y0(g)?g:g&&g.split(" "),x=`colors.${p}`,S=x in t.__cssMap?t.__cssMap[x].varRef:p;return y?[S,...Array.isArray(y)?y:[y]].join(" "):S});return`${d}(${l.join(", ")})`}var y0=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),V8=(e,t)=>H8(e,t??{});function W8(e){return/^var\(--.+\)$/.test(e)}var U8=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Ni=e=>t=>`${e}(${t})`,Et={filter(e){return e!=="auto"?e:F8},backdropFilter(e){return e!=="auto"?e:D8},ring(e){return N8(Et.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?I8():e==="auto-gpu"?O8():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=U8(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(W8(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:V8,blur:Ni("blur"),opacity:Ni("opacity"),brightness:Ni("brightness"),contrast:Ni("contrast"),dropShadow:Ni("drop-shadow"),grayscale:Ni("grayscale"),hueRotate:Ni("hue-rotate"),invert:Ni("invert"),saturate:Ni("saturate"),sepia:Ni("sepia"),bgImage(e){return e==null||y0(e)||v0.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){var t;const{space:n,divide:r}=(t=z8[e])!=null?t:{},i={flexDirection:e};return n&&(i[n]=1),r&&(i[r]=1),i}},se={borderWidths:Ur("borderWidths"),borderStyles:Ur("borderStyles"),colors:Ur("colors"),borders:Ur("borders"),gradients:Ur("gradients",Et.gradient),radii:Ur("radii",Et.px),space:Ur("space",Df(Et.vh,Et.px)),spaceT:Ur("space",Df(Et.vh,Et.px)),degreeT(e){return{property:e,transform:Et.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:F1({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Ur("sizes",Df(Et.vh,Et.px)),sizesT:Ur("sizes",Df(Et.vh,Et.fraction)),shadows:Ur("shadows"),logical:P8,blur:Ur("blur",Et.blur)},Ch={background:se.colors("background"),backgroundColor:se.colors("backgroundColor"),backgroundImage:se.gradients("backgroundImage"),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Et.bgClip},bgSize:se.prop("backgroundSize"),bgPosition:se.prop("backgroundPosition"),bg:se.colors("background"),bgColor:se.colors("backgroundColor"),bgPos:se.prop("backgroundPosition"),bgRepeat:se.prop("backgroundRepeat"),bgAttachment:se.prop("backgroundAttachment"),bgGradient:se.gradients("backgroundImage"),bgClip:{transform:Et.bgClip}};Object.assign(Ch,{bgImage:Ch.backgroundImage,bgImg:Ch.backgroundImage});var Mt={border:se.borders("border"),borderWidth:se.borderWidths("borderWidth"),borderStyle:se.borderStyles("borderStyle"),borderColor:se.colors("borderColor"),borderRadius:se.radii("borderRadius"),borderTop:se.borders("borderTop"),borderBlockStart:se.borders("borderBlockStart"),borderTopLeftRadius:se.radii("borderTopLeftRadius"),borderStartStartRadius:se.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:se.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:se.radii("borderTopRightRadius"),borderStartEndRadius:se.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:se.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:se.borders("borderRight"),borderInlineEnd:se.borders("borderInlineEnd"),borderBottom:se.borders("borderBottom"),borderBlockEnd:se.borders("borderBlockEnd"),borderBottomLeftRadius:se.radii("borderBottomLeftRadius"),borderBottomRightRadius:se.radii("borderBottomRightRadius"),borderLeft:se.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:se.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:se.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:se.borders(["borderLeft","borderRight"]),borderInline:se.borders("borderInline"),borderY:se.borders(["borderTop","borderBottom"]),borderBlock:se.borders("borderBlock"),borderTopWidth:se.borderWidths("borderTopWidth"),borderBlockStartWidth:se.borderWidths("borderBlockStartWidth"),borderTopColor:se.colors("borderTopColor"),borderBlockStartColor:se.colors("borderBlockStartColor"),borderTopStyle:se.borderStyles("borderTopStyle"),borderBlockStartStyle:se.borderStyles("borderBlockStartStyle"),borderBottomWidth:se.borderWidths("borderBottomWidth"),borderBlockEndWidth:se.borderWidths("borderBlockEndWidth"),borderBottomColor:se.colors("borderBottomColor"),borderBlockEndColor:se.colors("borderBlockEndColor"),borderBottomStyle:se.borderStyles("borderBottomStyle"),borderBlockEndStyle:se.borderStyles("borderBlockEndStyle"),borderLeftWidth:se.borderWidths("borderLeftWidth"),borderInlineStartWidth:se.borderWidths("borderInlineStartWidth"),borderLeftColor:se.colors("borderLeftColor"),borderInlineStartColor:se.colors("borderInlineStartColor"),borderLeftStyle:se.borderStyles("borderLeftStyle"),borderInlineStartStyle:se.borderStyles("borderInlineStartStyle"),borderRightWidth:se.borderWidths("borderRightWidth"),borderInlineEndWidth:se.borderWidths("borderInlineEndWidth"),borderRightColor:se.colors("borderRightColor"),borderInlineEndColor:se.colors("borderInlineEndColor"),borderRightStyle:se.borderStyles("borderRightStyle"),borderInlineEndStyle:se.borderStyles("borderInlineEndStyle"),borderTopRadius:se.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:se.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:se.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:se.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Mt,{rounded:Mt.borderRadius,roundedTop:Mt.borderTopRadius,roundedTopLeft:Mt.borderTopLeftRadius,roundedTopRight:Mt.borderTopRightRadius,roundedTopStart:Mt.borderStartStartRadius,roundedTopEnd:Mt.borderStartEndRadius,roundedBottom:Mt.borderBottomRadius,roundedBottomLeft:Mt.borderBottomLeftRadius,roundedBottomRight:Mt.borderBottomRightRadius,roundedBottomStart:Mt.borderEndStartRadius,roundedBottomEnd:Mt.borderEndEndRadius,roundedLeft:Mt.borderLeftRadius,roundedRight:Mt.borderRightRadius,roundedStart:Mt.borderInlineStartRadius,roundedEnd:Mt.borderInlineEndRadius,borderStart:Mt.borderInlineStart,borderEnd:Mt.borderInlineEnd,borderTopStartRadius:Mt.borderStartStartRadius,borderTopEndRadius:Mt.borderStartEndRadius,borderBottomStartRadius:Mt.borderEndStartRadius,borderBottomEndRadius:Mt.borderEndEndRadius,borderStartRadius:Mt.borderInlineStartRadius,borderEndRadius:Mt.borderInlineEndRadius,borderStartWidth:Mt.borderInlineStartWidth,borderEndWidth:Mt.borderInlineEndWidth,borderStartColor:Mt.borderInlineStartColor,borderEndColor:Mt.borderInlineEndColor,borderStartStyle:Mt.borderInlineStartStyle,borderEndStyle:Mt.borderInlineEndStyle});var G8={color:se.colors("color"),textColor:se.colors("color"),fill:se.colors("fill"),stroke:se.colors("stroke")},b0={boxShadow:se.shadows("boxShadow"),mixBlendMode:!0,blendMode:se.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:se.prop("backgroundBlendMode"),opacity:!0};Object.assign(b0,{shadow:b0.boxShadow});var K8={filter:{transform:Et.filter},blur:se.blur("--chakra-blur"),brightness:se.propT("--chakra-brightness",Et.brightness),contrast:se.propT("--chakra-contrast",Et.contrast),hueRotate:se.degreeT("--chakra-hue-rotate"),invert:se.propT("--chakra-invert",Et.invert),saturate:se.propT("--chakra-saturate",Et.saturate),dropShadow:se.propT("--chakra-drop-shadow",Et.dropShadow),backdropFilter:{transform:Et.backdropFilter},backdropBlur:se.blur("--chakra-backdrop-blur"),backdropBrightness:se.propT("--chakra-backdrop-brightness",Et.brightness),backdropContrast:se.propT("--chakra-backdrop-contrast",Et.contrast),backdropHueRotate:se.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:se.propT("--chakra-backdrop-invert",Et.invert),backdropSaturate:se.propT("--chakra-backdrop-saturate",Et.saturate)},Cp={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Et.flexDirection},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:se.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:se.space("gap"),rowGap:se.space("rowGap"),columnGap:se.space("columnGap")};Object.assign(Cp,{flexDir:Cp.flexDirection});var Y$={gridGap:se.space("gridGap"),gridColumnGap:se.space("gridColumnGap"),gridRowGap:se.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},q8={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Et.outline},outlineOffset:!0,outlineColor:se.colors("outlineColor")},Kr={width:se.sizesT("width"),inlineSize:se.sizesT("inlineSize"),height:se.sizes("height"),blockSize:se.sizes("blockSize"),boxSize:se.sizes(["width","height"]),minWidth:se.sizes("minWidth"),minInlineSize:se.sizes("minInlineSize"),minHeight:se.sizes("minHeight"),minBlockSize:se.sizes("minBlockSize"),maxWidth:se.sizes("maxWidth"),maxInlineSize:se.sizes("maxInlineSize"),maxHeight:se.sizes("maxHeight"),maxBlockSize:se.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,aspectRatio:!0,hideFrom:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (min-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r.minW)!=null?i:e})`]:{display:"none"}}}},hideBelow:{scale:"breakpoints",transform:(e,t)=>{var n,r,i;return{[`@media screen and (max-width: ${(i=(r=(n=t.__breakpoints)==null?void 0:n.get(e))==null?void 0:r._minW)!=null?i:e})`]:{display:"none"}}}},verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:se.propT("float",Et.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(Kr,{w:Kr.width,h:Kr.height,minW:Kr.minWidth,maxW:Kr.maxWidth,minH:Kr.minHeight,maxH:Kr.maxHeight,overscroll:Kr.overscrollBehavior,overscrollX:Kr.overscrollBehaviorX,overscrollY:Kr.overscrollBehaviorY});var Y8={listStyleType:!0,listStylePosition:!0,listStylePos:se.prop("listStylePosition"),listStyleImage:!0,listStyleImg:se.prop("listStyleImage")};function X8(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var Z8=e=>{const t=new WeakMap;return(r,i,o,s)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const d=t.get(r);if(d.has(i))return d.get(i);const a=e(r,i,o,s);return d.set(i,a),a}},Q8=Z8(X8),J8={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},e4={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},hv=(e,t,n)=>{const r={},i=Q8(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},t4={srOnly:{transform(e){return e===!0?J8:e==="focusable"?e4:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>hv(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>hv(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>hv(t,e,n)}},Hc={position:!0,pos:se.prop("position"),zIndex:se.prop("zIndex","zIndices"),inset:se.spaceT("inset"),insetX:se.spaceT(["left","right"]),insetInline:se.spaceT("insetInline"),insetY:se.spaceT(["top","bottom"]),insetBlock:se.spaceT("insetBlock"),top:se.spaceT("top"),insetBlockStart:se.spaceT("insetBlockStart"),bottom:se.spaceT("bottom"),insetBlockEnd:se.spaceT("insetBlockEnd"),left:se.spaceT("left"),insetInlineStart:se.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:se.spaceT("right"),insetInlineEnd:se.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(Hc,{insetStart:Hc.insetInlineStart,insetEnd:Hc.insetInlineEnd});var n4={ring:{transform:Et.ring},ringColor:se.colors("--chakra-ring-color"),ringOffset:se.prop("--chakra-ring-offset-width"),ringOffsetColor:se.colors("--chakra-ring-offset-color"),ringInset:se.prop("--chakra-ring-inset")},Wt={margin:se.spaceT("margin"),marginTop:se.spaceT("marginTop"),marginBlockStart:se.spaceT("marginBlockStart"),marginRight:se.spaceT("marginRight"),marginInlineEnd:se.spaceT("marginInlineEnd"),marginBottom:se.spaceT("marginBottom"),marginBlockEnd:se.spaceT("marginBlockEnd"),marginLeft:se.spaceT("marginLeft"),marginInlineStart:se.spaceT("marginInlineStart"),marginX:se.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:se.spaceT("marginInline"),marginY:se.spaceT(["marginTop","marginBottom"]),marginBlock:se.spaceT("marginBlock"),padding:se.space("padding"),paddingTop:se.space("paddingTop"),paddingBlockStart:se.space("paddingBlockStart"),paddingRight:se.space("paddingRight"),paddingBottom:se.space("paddingBottom"),paddingBlockEnd:se.space("paddingBlockEnd"),paddingLeft:se.space("paddingLeft"),paddingInlineStart:se.space("paddingInlineStart"),paddingInlineEnd:se.space("paddingInlineEnd"),paddingX:se.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:se.space("paddingInline"),paddingY:se.space(["paddingTop","paddingBottom"]),paddingBlock:se.space("paddingBlock")};Object.assign(Wt,{m:Wt.margin,mt:Wt.marginTop,mr:Wt.marginRight,me:Wt.marginInlineEnd,marginEnd:Wt.marginInlineEnd,mb:Wt.marginBottom,ml:Wt.marginLeft,ms:Wt.marginInlineStart,marginStart:Wt.marginInlineStart,mx:Wt.marginX,my:Wt.marginY,p:Wt.padding,pt:Wt.paddingTop,py:Wt.paddingY,px:Wt.paddingX,pb:Wt.paddingBottom,pl:Wt.paddingLeft,ps:Wt.paddingInlineStart,paddingStart:Wt.paddingInlineStart,pr:Wt.paddingRight,pe:Wt.paddingInlineEnd,paddingEnd:Wt.paddingInlineEnd});var r4={textDecorationColor:se.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:se.shadows("textShadow")},i4={clipPath:!0,transform:se.propT("transform",Et.transform),transformOrigin:!0,translateX:se.spaceT("--chakra-translate-x"),translateY:se.spaceT("--chakra-translate-y"),skewX:se.degreeT("--chakra-skew-x"),skewY:se.degreeT("--chakra-skew-y"),scaleX:se.prop("--chakra-scale-x"),scaleY:se.prop("--chakra-scale-y"),scale:se.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:se.degreeT("--chakra-rotate")},o4={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:se.prop("transitionDuration","transition.duration"),transitionProperty:se.prop("transitionProperty","transition.property"),transitionTimingFunction:se.prop("transitionTimingFunction","transition.easing")},a4={fontFamily:se.prop("fontFamily","fonts"),fontSize:se.prop("fontSize","fontSizes",Et.px),fontWeight:se.prop("fontWeight","fontWeights"),lineHeight:se.prop("lineHeight","lineHeights"),letterSpacing:se.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,textIndent:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,isTruncated:{transform(e){if(e===!0)return{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}},noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},s4={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:se.spaceT("scrollMargin"),scrollMarginTop:se.spaceT("scrollMarginTop"),scrollMarginBottom:se.spaceT("scrollMarginBottom"),scrollMarginLeft:se.spaceT("scrollMarginLeft"),scrollMarginRight:se.spaceT("scrollMarginRight"),scrollMarginX:se.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:se.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:se.spaceT("scrollPadding"),scrollPaddingTop:se.spaceT("scrollPaddingTop"),scrollPaddingBottom:se.spaceT("scrollPaddingBottom"),scrollPaddingLeft:se.spaceT("scrollPaddingLeft"),scrollPaddingRight:se.spaceT("scrollPaddingRight"),scrollPaddingX:se.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:se.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function X$(e){return mr(e)&&e.reference?e.reference:String(e)}var Ug=(e,...t)=>t.map(X$).join(` ${e} `).replace(/calc/g,""),Mx=(...e)=>`calc(${Ug("+",...e)})`,Lx=(...e)=>`calc(${Ug("-",...e)})`,w0=(...e)=>`calc(${Ug("*",...e)})`,Rx=(...e)=>`calc(${Ug("/",...e)})`,Px=e=>{const t=X$(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:w0(t,-1)},ms=Object.assign(e=>({add:(...t)=>ms(Mx(e,...t)),subtract:(...t)=>ms(Lx(e,...t)),multiply:(...t)=>ms(w0(e,...t)),divide:(...t)=>ms(Rx(e,...t)),negate:()=>ms(Px(e)),toString:()=>e.toString()}),{add:Mx,subtract:Lx,multiply:w0,divide:Rx,negate:Px});function l4(e,t="-"){return e.replace(/\s+/g,t)}function u4(e){const t=l4(e.toString());return d4(c4(t))}function c4(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function d4(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function f4(e,t=""){return[t,e].filter(Boolean).join("-")}function h4(e,t){return`var(${e}${t?`, ${t}`:""})`}function p4(e,t=""){return u4(`--${f4(e,t)}`)}function it(e,t,n){const r=p4(e,n);return{variable:r,reference:h4(r,t)}}function g4(e,t){const n={};for(const r of t){if(Array.isArray(r)){const[i,o]=r;n[i]=it(`${e}-${i}`,o);continue}n[r]=it(`${e}-${r}`)}return n}function m4(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function v4(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function S0(e){if(e==null)return e;const{unitless:t}=v4(e);return t||typeof e=="number"?`${e}px`:e}var Z$=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,D1=e=>Object.fromEntries(Object.entries(e).sort(Z$));function Ix(e){const t=D1(e);return Object.assign(Object.values(t),t)}function y4(e){const t=Object.keys(D1(e));return new Set(t)}function Ox(e){var t;if(!e)return e;e=(t=S0(e))!=null?t:e;const n=-.02;return typeof e=="number"?`${e+n}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+n}`)}function xc(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${S0(e)})`),t&&n.push("and",`(max-width: ${S0(t)})`),n.join(" ")}function b4(e){var t;if(!e)return null;e.base=(t=e.base)!=null?t:"0px";const n=Ix(e),r=Object.entries(e).sort(Z$).map(([s,d],a,c)=>{var u;let[,l]=(u=c[a+1])!=null?u:[];return l=parseFloat(l)>0?Ox(l):void 0,{_minW:Ox(d),breakpoint:s,minW:d,maxW:l,maxWQuery:xc(null,l),minWQuery:xc(d),minMaxQuery:xc(d,l)}}),i=y4(e),o=Array.from(i.values());return{keys:i,normalized:n,isResponsive(s){const d=Object.keys(s);return d.length>0&&d.every(a=>i.has(a))},asObject:D1(e),asArray:Ix(e),details:r,get(s){return r.find(d=>d.breakpoint===s)},media:[null,...n.map(s=>xc(s)).slice(1)],toArrayValue(s){if(!mr(s))throw new Error("toArrayValue: value must be an object");const d=o.map(a=>{var c;return(c=s[a])!=null?c:null});for(;m4(d)===null;)d.pop();return d},toObjectValue(s){if(!Array.isArray(s))throw new Error("toObjectValue: value must be an array");return s.reduce((d,a,c)=>{const u=o[c];return u!=null&&a!=null&&(d[u]=a),d},{})}}}var An={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}`},oa=e=>Q$(t=>e(t,"&"),"[role=group]","[data-group]",".group"),mo=e=>Q$(t=>e(t,"~ &"),"[data-peer]",".peer"),Q$=(e,...t)=>t.map(e).join(", "),Gg={_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",_firstLetter:"&::first-letter",_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:oa(An.hover),_peerHover:mo(An.hover),_groupFocus:oa(An.focus),_peerFocus:mo(An.focus),_groupFocusVisible:oa(An.focusVisible),_peerFocusVisible:mo(An.focusVisible),_groupActive:oa(An.active),_peerActive:mo(An.active),_groupDisabled:oa(An.disabled),_peerDisabled:mo(An.disabled),_groupInvalid:oa(An.invalid),_peerInvalid:mo(An.invalid),_groupChecked:oa(An.checked),_peerChecked:mo(An.checked),_groupFocusWithin:oa(An.focusWithin),_peerFocusWithin:mo(An.focusWithin),_peerPlaceholderShown:mo(An.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]",_horizontal:"&[data-orientation=horizontal]",_vertical:"&[data-orientation=vertical]"},J$=Object.keys(Gg);function Fx(e,t){return it(String(e).replace(/\./g,"-"),void 0,t)}function w4(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:s,value:d}=o,{variable:a,reference:c}=Fx(i,t==null?void 0:t.cssVarPrefix);if(!s){if(i.startsWith("space")){const f=i.split("."),[h,...p]=f,g=`${h}.-${p.join(".")}`,y=ms.negate(d),x=ms.negate(c);r[g]={value:y,var:a,varRef:x}}n[a]=d,r[i]={value:d,var:a,varRef:c};continue}const u=f=>{const p=[String(i).split(".")[0],f].join(".");if(!e[p])return f;const{reference:y}=Fx(p,t==null?void 0:t.cssVarPrefix);return y},l=mr(d)?d:{default:d};n=ei(n,Object.entries(l).reduce((f,[h,p])=>{var g,y;if(!p)return f;const x=u(`${p}`);if(h==="default")return f[a]=x,f;const S=(y=(g=Gg)==null?void 0:g[h])!=null?y:h;return f[S]={[a]:x},f},{})),r[i]={value:c,var:a,varRef:c}}return{cssVars:n,cssMap:r}}function S4(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function x4(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function _4(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}function Dx(e,t,n={}){const{stop:r,getKey:i}=n;function o(s,d=[]){var a;if(_4(s)||Array.isArray(s)){const c={};for(const[u,l]of Object.entries(s)){const f=(a=i==null?void 0:i(u))!=null?a:u,h=[...d,f];if(r!=null&&r(s,h))return t(s,d);c[f]=o(l,h)}return c}return t(s,d)}return o(e)}var C4=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","gradients","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur","breakpoints"];function k4(e){return x4(e,C4)}function E4(e){return e.semanticTokens}function $4(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}var T4=e=>J$.includes(e)||e==="default";function A4({tokens:e,semanticTokens:t}){const n={};return Dx(e,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!1,value:r})}),Dx(t,(r,i)=>{r!=null&&(n[i.join(".")]={isSemantic:!0,value:r})},{stop:r=>Object.keys(r).every(T4)}),n}function M4(e){var t;const n=$4(e),r=k4(n),i=E4(n),o=A4({tokens:r,semanticTokens:i}),s=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:d,cssVars:a}=w4(o,{cssVarPrefix:s});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"},...a},__cssMap:d,__breakpoints:b4(n.breakpoints)}),n}var N1=ei({},Ch,Mt,G8,Cp,Kr,K8,n4,q8,Y$,t4,Hc,b0,Wt,s4,a4,r4,i4,Y8,o4),L4=Object.assign({},Wt,Kr,Cp,Y$,Hc),R4=Object.keys(L4),P4=[...Object.keys(N1),...J$],I4={...N1,...Gg},O4=e=>e in I4,F4=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const s in e){let d=Ki(e[s],t);if(d==null)continue;if(d=mr(d)&&n(d)?r(d):d,!Array.isArray(d)){o[s]=d;continue}const a=d.slice(0,i.length).length;for(let c=0;c<a;c+=1){const u=i==null?void 0:i[c];if(!u){o[s]=d[c];continue}o[u]=o[u]||{},d[c]!=null&&(o[u][s]=d[c])}}return o};function D4(e){const t=[];let n="",r=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(r=!0,n+=o):o===")"?(r=!1,n+=o):o===","&&!r?(t.push(n),n=""):n+=o}return n=n.trim(),n&&t.push(n),t}function N4(e){return/^var\(--.+\)$/.test(e)}var z4=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!N4(t),j4=(e,t)=>{var n,r;if(t==null)return t;const i=a=>{var c,u;return(u=(c=e.__cssMap)==null?void 0:c[a])==null?void 0:u.varRef},o=a=>{var c;return(c=i(a))!=null?c:a},[s,d]=D4(t);return t=(r=(n=i(s))!=null?n:o(d))!=null?r:o(t),t};function B4(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,s=!1)=>{var d,a,c;const u=Ki(o,r),l=F4(u)(r);let f={};for(let h in l){const p=l[h];let g=Ki(p,r);h in n&&(h=n[h]),z4(h,g)&&(g=j4(r,g));let y=t[h];if(y===!0&&(y={property:h}),mr(g)){f[h]=(d=f[h])!=null?d:{},f[h]=ei({},f[h],i(g,!0));continue}let x=(c=(a=y==null?void 0:y.transform)==null?void 0:a.call(y,g,r,u))!=null?c:g;x=y!=null&&y.processResult?i(x,!0):x;const S=Ki(y==null?void 0:y.property,r);if(!s&&(y!=null&&y.static)){const E=Ki(y.static,r);f=ei({},f,E)}if(S&&Array.isArray(S)){for(const E of S)f[E]=x;continue}if(S){S==="&"&&mr(x)?f=ei({},f,x):f[S]=x;continue}if(mr(x)){f=ei({},f,x);continue}f[h]=x}return f};return i}var eT=e=>t=>B4({theme:t,pseudos:Gg,configs:N1})(e);function Tt(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function H4(e,t){if(Array.isArray(e))return e;if(mr(e))return t(e);if(e!=null)return[e]}function V4(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function W4(e){const t=e.__breakpoints;return function(r,i,o,s){var d,a;if(!t)return;const c={},u=H4(o,t.toArrayValue);if(!u)return c;const l=u.length,f=l===1,h=!!r.parts;for(let p=0;p<l;p++){const g=t.details[p],y=t.details[V4(u,p)],x=xc(g.minW,y==null?void 0:y._minW),S=Ki((d=r[i])==null?void 0:d[u[p]],s);if(S){if(h){(a=r.parts)==null||a.forEach(E=>{ei(c,{[E]:f?S[E]:{[x]:S[E]}})});continue}if(!h){f?ei(c,S):c[x]=S;continue}c[x]=S}}return c}}function U4(e){return t=>{var n;const{variant:r,size:i,theme:o}=t,s=W4(o);return ei({},Ki((n=e.baseStyle)!=null?n:{},t),s(e,"sizes",i,t),s(e,"variants",r,t))}}function G4(e,t,n){var r,i,o;return(o=(i=(r=e.__cssMap)==null?void 0:r[`${t}.${n}`])==null?void 0:i.varRef)!=null?o:n}function Or(e){return S4(e,["styleConfig","size","variant","colorScheme"])}var K4=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function q4(e){return mr(e)?K4.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var Y4={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"},X4={"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)"},Z4={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},Q4={property:Y4,easing:X4,duration:Z4},J4=Q4,e5={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},t5=e5,n5={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},r5=n5,i5={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},o5=i5,a5={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"}},s5=a5,l5={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},u5=l5,c5={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"},d5=c5,f5={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},h5=f5,p5={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"}},tT=p5,nT={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"},g5={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"},m5={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},v5={...nT,...g5,container:m5},rT=v5,y5={breakpoints:o5,zIndices:t5,radii:u5,blur:h5,colors:s5,...tT,sizes:rT,shadows:d5,space:nT,borders:r5,transition:J4},{defineMultiStyleConfig:b5,definePartsStyle:_c}=Tt(["stepper","step","title","description","indicator","separator","icon","number"]),_o=it("stepper-indicator-size"),Ul=it("stepper-icon-size"),Gl=it("stepper-title-font-size"),Cc=it("stepper-description-font-size"),cc=it("stepper-accent-color"),w5=_c(({colorScheme:e})=>({stepper:{display:"flex",justifyContent:"space-between",gap:"4","&[data-orientation=vertical]":{flexDirection:"column",alignItems:"flex-start"},"&[data-orientation=horizontal]":{flexDirection:"row",alignItems:"center"},[cc.variable]:`colors.${e}.500`,_dark:{[cc.variable]:`colors.${e}.200`}},title:{fontSize:Gl.reference,fontWeight:"medium"},description:{fontSize:Cc.reference,color:"chakra-subtle-text"},number:{fontSize:Gl.reference},step:{flexShrink:0,position:"relative",display:"flex",gap:"2","&[data-orientation=horizontal]":{alignItems:"center"},flex:"1","&:last-of-type:not([data-stretch])":{flex:"initial"}},icon:{flexShrink:0,width:Ul.reference,height:Ul.reference},indicator:{flexShrink:0,borderRadius:"full",width:_o.reference,height:_o.reference,display:"flex",justifyContent:"center",alignItems:"center","&[data-status=active]":{borderWidth:"2px",borderColor:cc.reference},"&[data-status=complete]":{bg:cc.reference,color:"chakra-inverse-text"},"&[data-status=incomplete]":{borderWidth:"2px"}},separator:{bg:"chakra-border-color",flex:"1","&[data-status=complete]":{bg:cc.reference},"&[data-orientation=horizontal]":{width:"100%",height:"2px",marginStart:"2"},"&[data-orientation=vertical]":{width:"2px",position:"absolute",height:"100%",maxHeight:`calc(100% - ${_o.reference} - 8px)`,top:`calc(${_o.reference} + 4px)`,insetStart:`calc(${_o.reference} / 2 - 1px)`}}})),S5=b5({baseStyle:w5,sizes:{xs:_c({stepper:{[_o.variable]:"sizes.4",[Ul.variable]:"sizes.3",[Gl.variable]:"fontSizes.xs",[Cc.variable]:"fontSizes.xs"}}),sm:_c({stepper:{[_o.variable]:"sizes.6",[Ul.variable]:"sizes.4",[Gl.variable]:"fontSizes.sm",[Cc.variable]:"fontSizes.xs"}}),md:_c({stepper:{[_o.variable]:"sizes.8",[Ul.variable]:"sizes.5",[Gl.variable]:"fontSizes.md",[Cc.variable]:"fontSizes.sm"}}),lg:_c({stepper:{[_o.variable]:"sizes.10",[Ul.variable]:"sizes.6",[Gl.variable]:"fontSizes.lg",[Cc.variable]:"fontSizes.md"}})},defaultProps:{size:"md",colorScheme:"blue"}});function Ot(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...u){r();for(const l of u)t[l]=a(l);return Ot(e,t)}function o(...u){for(const l of u)l in t||(t[l]=a(l));return Ot(e,t)}function s(){return Object.fromEntries(Object.entries(t).map(([l,f])=>[l,f.selector]))}function d(){return Object.fromEntries(Object.entries(t).map(([l,f])=>[l,f.className]))}function a(u){const h=`chakra-${(["container","root"].includes(u??"")?[e]:[e,u]).filter(Boolean).join("__")}`;return{className:h,selector:`.${h}`,toString:()=>u}}return{parts:i,toPart:a,extend:o,selectors:s,classnames:d,get keys(){return Object.keys(t)},__type:{}}}var x5=Ot("accordion").parts("root","container","button","panel").extend("icon"),_5=Ot("alert").parts("title","description","container").extend("icon","spinner"),C5=Ot("avatar").parts("label","badge","container").extend("excessLabel","group"),k5=Ot("breadcrumb").parts("link","item","container").extend("separator");Ot("button").parts();var iT=Ot("checkbox").parts("control","icon","container").extend("label");Ot("progress").parts("track","filledTrack").extend("label");var E5=Ot("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),$5=Ot("editable").parts("preview","input","textarea"),T5=Ot("form").parts("container","requiredIndicator","helperText"),A5=Ot("formError").parts("text","icon"),oT=Ot("input").parts("addon","field","element"),M5=Ot("list").parts("container","item","icon"),L5=Ot("menu").parts("button","list","item").extend("groupTitle","command","divider"),aT=Ot("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),sT=Ot("numberinput").parts("root","field","stepperGroup","stepper");Ot("pininput").parts("field");var R5=Ot("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),P5=Ot("progress").parts("label","filledTrack","track"),lT=Ot("radio").parts("container","control","label"),I5=Ot("select").parts("field","icon"),O5=Ot("slider").parts("container","track","thumb","filledTrack","mark"),F5=Ot("stat").parts("container","label","helpText","number","icon"),D5=Ot("switch").parts("container","track","thumb"),N5=Ot("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),uT=Ot("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),z5=Ot("tag").parts("container","label","closeButton"),j5=Ot("card").parts("container","header","body","footer");function xs(e,t,n){return Math.min(Math.max(e,n),t)}class B5 extends Error{constructor(t){super(`Failed to parse color: "${t}"`)}}var kc=B5;function z1(e){if(typeof e!="string")throw new kc(e);if(e.trim().toLowerCase()==="transparent")return[0,0,0,0];let t=e.trim();t=Y5.test(e)?W5(e):e;const n=U5.exec(t);if(n){const s=Array.from(n).slice(1);return[...s.slice(0,3).map(d=>parseInt(Sd(d,2),16)),parseInt(Sd(s[3]||"f",2),16)/255]}const r=G5.exec(t);if(r){const s=Array.from(r).slice(1);return[...s.slice(0,3).map(d=>parseInt(d,16)),parseInt(s[3]||"ff",16)/255]}const i=K5.exec(t);if(i){const s=Array.from(i).slice(1);return[...s.slice(0,3).map(d=>parseInt(d,10)),parseFloat(s[3]||"1")]}const o=q5.exec(t);if(o){const[s,d,a,c]=Array.from(o).slice(1).map(parseFloat);if(xs(0,100,d)!==d)throw new kc(e);if(xs(0,100,a)!==a)throw new kc(e);return[...X5(s,d,a),Number.isNaN(c)?1:c]}throw new kc(e)}function H5(e){let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return(t>>>0)%2341}const Nx=e=>parseInt(e.replace(/_/g,""),36),V5="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e,t)=>{const n=Nx(t.substring(0,3)),r=Nx(t.substring(3)).toString(16);let i="";for(let o=0;o<6-r.length;o++)i+="0";return e[n]=`${i}${r}`,e},{});function W5(e){const t=e.toLowerCase().trim(),n=V5[H5(t)];if(!n)throw new kc(e);return`#${n}`}const Sd=(e,t)=>Array.from(Array(t)).map(()=>e).join(""),U5=new RegExp(`^#${Sd("([a-f0-9])",3)}([a-f0-9])?$`,"i"),G5=new RegExp(`^#${Sd("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),K5=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Sd(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),q5=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Y5=/^[a-z]+$/i,zx=e=>Math.round(e*255),X5=(e,t,n)=>{let r=n/100;if(t===0)return[r,r,r].map(zx);const i=(e%360+360)%360/60,o=(1-Math.abs(2*r-1))*(t/100),s=o*(1-Math.abs(i%2-1));let d=0,a=0,c=0;i>=0&&i<1?(d=o,a=s):i>=1&&i<2?(d=s,a=o):i>=2&&i<3?(a=o,c=s):i>=3&&i<4?(a=s,c=o):i>=4&&i<5?(d=s,c=o):i>=5&&i<6&&(d=o,c=s);const u=r-o/2,l=d+u,f=a+u,h=c+u;return[l,f,h].map(zx)};function Z5(e,t,n,r){return`rgba(${xs(0,255,e).toFixed()}, ${xs(0,255,t).toFixed()}, ${xs(0,255,n).toFixed()}, ${parseFloat(xs(0,1,r).toFixed(3))})`}function Q5(e,t){const[n,r,i,o]=z1(e);return Z5(n,r,i,o-t)}function J5(e){const[t,n,r,i]=z1(e);let o=s=>{const d=xs(0,255,s).toString(16);return d.length===1?`0${d}`:d};return`#${o(t)}${o(n)}${o(r)}${i<1?o(Math.round(i*255)):""}`}function eF(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var tF=e=>Object.keys(e).length===0,kp=(e,t,n)=>{const r=eF(e,`colors.${t}`,t);try{return J5(r),r}catch{return n??"#000000"}},wi=(e,t,n)=>{var r;return(r=G4(e,"colors",t))!=null?r:n},nF=e=>{const[t,n,r]=z1(e);return(t*299+n*587+r*114)/1e3},rF=e=>t=>{const n=kp(t,e);return nF(n)<128?"dark":"light"},iF=e=>t=>rF(e)(t)==="dark",Mu=(e,t)=>n=>{const r=kp(n,e);return Q5(r,1-t)};function jx(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}`}}var oF=()=>`#${Math.floor(Math.random()*16777215).toString(16).padEnd(6,"0")}`;function aF(e){const t=oF();return!e||tF(e)?t:e.string&&e.colors?lF(e.string,e.colors):e.string&&!e.colors?sF(e.string):e.colors&&!e.string?uF(e.colors):t}function sF(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t=t&t;let n="#";for(let r=0;r<3;r+=1){const i=t>>r*8&255;n+=`00${i.toString(16)}`.substr(-2)}return n}function lF(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n=n&n;return n=(n%t.length+t.length)%t.length,t[n]}function uF(e){return e[Math.floor(Math.random()*e.length)]}function Xe(e,t){return n=>n.colorMode==="dark"?t:e}function j1(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function cT(e){return mr(e)&&e.reference?e.reference:String(e)}var Kg=(e,...t)=>t.map(cT).join(` ${e} `).replace(/calc/g,""),Bx=(...e)=>`calc(${Kg("+",...e)})`,Hx=(...e)=>`calc(${Kg("-",...e)})`,x0=(...e)=>`calc(${Kg("*",...e)})`,Vx=(...e)=>`calc(${Kg("/",...e)})`,Wx=e=>{const t=cT(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:x0(t,-1)},Co=Object.assign(e=>({add:(...t)=>Co(Bx(e,...t)),subtract:(...t)=>Co(Hx(e,...t)),multiply:(...t)=>Co(x0(e,...t)),divide:(...t)=>Co(Vx(e,...t)),negate:()=>Co(Wx(e)),toString:()=>e.toString()}),{add:Bx,subtract:Hx,multiply:x0,divide:Vx,negate:Wx});function cF(e){return!Number.isInteger(parseFloat(e.toString()))}function dF(e,t="-"){return e.replace(/\s+/g,t)}function dT(e){const t=dF(e.toString());return t.includes("\\.")?e:cF(e)?t.replace(".","\\."):e}function fF(e,t=""){return[t,dT(e)].filter(Boolean).join("-")}function hF(e,t){return`var(${dT(e)}${t?`, ${t}`:""})`}function pF(e,t=""){return`--${fF(e,t)}`}function wn(e,t){const n=pF(e,t==null?void 0:t.prefix);return{variable:n,reference:hF(n,gF(t==null?void 0:t.fallback))}}function gF(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{defineMultiStyleConfig:mF,definePartsStyle:kh}=Tt(D5.keys),Vc=wn("switch-track-width"),As=wn("switch-track-height"),pv=wn("switch-track-diff"),vF=Co.subtract(Vc,As),_0=wn("switch-thumb-x"),dc=wn("switch-bg"),yF=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Vc.reference],height:[As.reference],transitionProperty:"common",transitionDuration:"fast",[dc.variable]:"colors.gray.300",_dark:{[dc.variable]:"colors.whiteAlpha.400"},_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{[dc.variable]:`colors.${t}.500`,_dark:{[dc.variable]:`colors.${t}.200`}},bg:dc.reference}},bF={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[As.reference],height:[As.reference],_checked:{transform:`translateX(${_0.reference})`}},wF=kh(e=>({container:{[pv.variable]:vF,[_0.variable]:pv.reference,_rtl:{[_0.variable]:Co(pv).negate().toString()}},track:yF(e),thumb:bF})),SF={sm:kh({container:{[Vc.variable]:"1.375rem",[As.variable]:"sizes.3"}}),md:kh({container:{[Vc.variable]:"1.875rem",[As.variable]:"sizes.4"}}),lg:kh({container:{[Vc.variable]:"2.875rem",[As.variable]:"sizes.6"}})},xF=mF({baseStyle:wF,sizes:SF,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:_F,definePartsStyle:cu}=Tt(N5.keys),CF=cu({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"}}),Ep={"&[data-is-numeric=true]":{textAlign:"end"}},kF=cu(e=>{const{colorScheme:t}=e;return{th:{color:Xe("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Xe(`${t}.100`,`${t}.700`)(e),...Ep},td:{borderBottom:"1px",borderColor:Xe(`${t}.100`,`${t}.700`)(e),...Ep},caption:{color:Xe("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),EF=cu(e=>{const{colorScheme:t}=e;return{th:{color:Xe("gray.600","gray.400")(e),borderBottom:"1px",borderColor:Xe(`${t}.100`,`${t}.700`)(e),...Ep},td:{borderBottom:"1px",borderColor:Xe(`${t}.100`,`${t}.700`)(e),...Ep},caption:{color:Xe("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:Xe(`${t}.100`,`${t}.700`)(e)},td:{background:Xe(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),$F={simple:kF,striped:EF,unstyled:{}},TF={sm:cu({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:cu({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:cu({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},AF=_F({baseStyle:CF,variants:$F,sizes:TF,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),cr=it("tabs-color"),bi=it("tabs-bg"),Nf=it("tabs-border-color"),{defineMultiStyleConfig:MF,definePartsStyle:Qi}=Tt(uT.keys),LF=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},RF=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}}},PF=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},IF={p:4},OF=Qi(e=>({root:LF(e),tab:RF(e),tablist:PF(e),tabpanel:IF})),FF={sm:Qi({tab:{py:1,px:4,fontSize:"sm"}}),md:Qi({tab:{fontSize:"md",py:2,px:4}}),lg:Qi({tab:{fontSize:"lg",py:3,px:4}})},DF=Qi(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=r?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{[cr.variable]:`colors.${t}.600`,_dark:{[cr.variable]:`colors.${t}.300`},borderColor:"currentColor"},_active:{[bi.variable]:"colors.gray.200",_dark:{[bi.variable]:"colors.whiteAlpha.300"}},_disabled:{_active:{bg:"none"}},color:cr.reference,bg:bi.reference}}}),NF=Qi(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",[Nf.variable]:"transparent",_selected:{[cr.variable]:`colors.${t}.600`,[Nf.variable]:"colors.white",_dark:{[cr.variable]:`colors.${t}.300`,[Nf.variable]:"colors.gray.800"},borderColor:"inherit",borderBottomColor:Nf.reference},color:cr.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),zF=Qi(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",[bi.variable]:"colors.gray.50",_dark:{[bi.variable]:"colors.whiteAlpha.50"},mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{[bi.variable]:"colors.white",[cr.variable]:`colors.${t}.600`,_dark:{[bi.variable]:"colors.gray.800",[cr.variable]:`colors.${t}.300`},borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"},color:cr.reference,bg:bi.reference},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),jF=Qi(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:kp(n,`${t}.700`),bg:kp(n,`${t}.100`)}}}}),BF=Qi(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",[cr.variable]:"colors.gray.600",_dark:{[cr.variable]:"inherit"},_selected:{[cr.variable]:"colors.white",[bi.variable]:`colors.${t}.600`,_dark:{[cr.variable]:"colors.gray.800",[bi.variable]:`colors.${t}.300`}},color:cr.reference,bg:bi.reference}}}),HF=Qi({}),VF={line:DF,enclosed:NF,"enclosed-colored":zF,"soft-rounded":jF,"solid-rounded":BF,unstyled:HF},WF=MF({baseStyle:OF,sizes:FF,variants:VF,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),ln=g4("badge",["bg","color","shadow"]),UF={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold",bg:ln.bg.reference,color:ln.color.reference,boxShadow:ln.shadow.reference},GF=e=>{const{colorScheme:t,theme:n}=e,r=Mu(`${t}.500`,.6)(n);return{[ln.bg.variable]:`colors.${t}.500`,[ln.color.variable]:"colors.white",_dark:{[ln.bg.variable]:r,[ln.color.variable]:"colors.whiteAlpha.800"}}},KF=e=>{const{colorScheme:t,theme:n}=e,r=Mu(`${t}.200`,.16)(n);return{[ln.bg.variable]:`colors.${t}.100`,[ln.color.variable]:`colors.${t}.800`,_dark:{[ln.bg.variable]:r,[ln.color.variable]:`colors.${t}.200`}}},qF=e=>{const{colorScheme:t,theme:n}=e,r=Mu(`${t}.200`,.8)(n);return{[ln.color.variable]:`colors.${t}.500`,_dark:{[ln.color.variable]:r},[ln.shadow.variable]:`inset 0 0 0px 1px ${ln.color.reference}`}},YF={solid:GF,subtle:KF,outline:qF},Wc={baseStyle:UF,variants:YF,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:XF,definePartsStyle:Ms}=Tt(z5.keys),Ux=it("tag-bg"),Gx=it("tag-color"),gv=it("tag-shadow"),Eh=it("tag-min-height"),$h=it("tag-min-width"),Th=it("tag-font-size"),Ah=it("tag-padding-inline"),ZF={fontWeight:"medium",lineHeight:1.2,outline:0,[Gx.variable]:ln.color.reference,[Ux.variable]:ln.bg.reference,[gv.variable]:ln.shadow.reference,color:Gx.reference,bg:Ux.reference,boxShadow:gv.reference,borderRadius:"md",minH:Eh.reference,minW:$h.reference,fontSize:Th.reference,px:Ah.reference,_focusVisible:{[gv.variable]:"shadows.outline"}},QF={lineHeight:1.2,overflow:"visible"},JF={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}},eD=Ms({container:ZF,label:QF,closeButton:JF}),tD={sm:Ms({container:{[Eh.variable]:"sizes.5",[$h.variable]:"sizes.5",[Th.variable]:"fontSizes.xs",[Ah.variable]:"space.2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:Ms({container:{[Eh.variable]:"sizes.6",[$h.variable]:"sizes.6",[Th.variable]:"fontSizes.sm",[Ah.variable]:"space.2"}}),lg:Ms({container:{[Eh.variable]:"sizes.8",[$h.variable]:"sizes.8",[Th.variable]:"fontSizes.md",[Ah.variable]:"space.3"}})},nD={subtle:Ms(e=>{var t;return{container:(t=Wc.variants)==null?void 0:t.subtle(e)}}),solid:Ms(e=>{var t;return{container:(t=Wc.variants)==null?void 0:t.solid(e)}}),outline:Ms(e=>{var t;return{container:(t=Wc.variants)==null?void 0:t.outline(e)}})},rD=XF({variants:nD,baseStyle:eD,sizes:tD,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),{definePartsStyle:To,defineMultiStyleConfig:iD}=Tt(oT.keys),oD=To({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),aa={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"}},aD={lg:To({field:aa.lg,addon:aa.lg}),md:To({field:aa.md,addon:aa.md}),sm:To({field:aa.sm,addon:aa.sm}),xs:To({field:aa.xs,addon:aa.xs})};function B1(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||Xe("blue.500","blue.300")(e),errorBorderColor:n||Xe("red.500","red.300")(e)}}var sD=To(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B1(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:Xe("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:wi(t,r),boxShadow:`0 0 0 1px ${wi(t,r)}`},_focusVisible:{zIndex:1,borderColor:wi(t,n),boxShadow:`0 0 0 1px ${wi(t,n)}`}},addon:{border:"1px solid",borderColor:Xe("inherit","whiteAlpha.50")(e),bg:Xe("gray.100","whiteAlpha.300")(e)}}}),lD=To(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B1(e);return{field:{border:"2px solid",borderColor:"transparent",bg:Xe("gray.100","whiteAlpha.50")(e),_hover:{bg:Xe("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:wi(t,r)},_focusVisible:{bg:"transparent",borderColor:wi(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:Xe("gray.100","whiteAlpha.50")(e)}}}),uD=To(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=B1(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:wi(t,r),boxShadow:`0px 1px 0px 0px ${wi(t,r)}`},_focusVisible:{borderColor:wi(t,n),boxShadow:`0px 1px 0px 0px ${wi(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),cD=To({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),dD={outline:sD,filled:lD,flushed:uD,unstyled:cD},Pt=iD({baseStyle:oD,sizes:aD,variants:dD,defaultProps:{size:"md",variant:"outline"}}),Kx,fD={...(Kx=Pt.baseStyle)==null?void 0:Kx.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},qx,Yx,hD={outline:e=>{var t,n;return(n=(t=Pt.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var t,n;return(n=(t=Pt.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var t,n;return(n=(t=Pt.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(Yx=(qx=Pt.variants)==null?void 0:qx.unstyled.field)!=null?Yx:{}},Xx,Zx,Qx,Jx,e_,t_,n_,r_,pD={xs:(Zx=(Xx=Pt.sizes)==null?void 0:Xx.xs.field)!=null?Zx:{},sm:(Jx=(Qx=Pt.sizes)==null?void 0:Qx.sm.field)!=null?Jx:{},md:(t_=(e_=Pt.sizes)==null?void 0:e_.md.field)!=null?t_:{},lg:(r_=(n_=Pt.sizes)==null?void 0:n_.lg.field)!=null?r_:{}},gD={baseStyle:fD,sizes:pD,variants:hD,defaultProps:{size:"md",variant:"outline"}},zf=wn("tooltip-bg"),mv=wn("tooltip-fg"),mD=wn("popper-arrow-bg"),vD={bg:zf.reference,color:mv.reference,[zf.variable]:"colors.gray.700",[mv.variable]:"colors.whiteAlpha.900",_dark:{[zf.variable]:"colors.gray.300",[mv.variable]:"colors.gray.900"},[mD.variable]:zf.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"},yD={baseStyle:vD},{defineMultiStyleConfig:bD,definePartsStyle:Ec}=Tt(P5.keys),wD=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=Xe(jx(),jx("1rem","rgba(0,0,0,0.1)"))(e),s=Xe(`${t}.500`,`${t}.200`)(e),d=`linear-gradient(
to right,
transparent 0%,
${wi(n,s)} 50%,
transparent 100%
)`;return{...!r&&i&&o,...r?{bgImage:d}:{bgColor:s}}},SD={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},xD=e=>({bg:Xe("gray.100","whiteAlpha.300")(e)}),_D=e=>({transitionProperty:"common",transitionDuration:"slow",...wD(e)}),CD=Ec(e=>({label:SD,filledTrack:_D(e),track:xD(e)})),kD={xs:Ec({track:{h:"1"}}),sm:Ec({track:{h:"2"}}),md:Ec({track:{h:"3"}}),lg:Ec({track:{h:"4"}})},ED=bD({sizes:kD,baseStyle:CD,defaultProps:{size:"md",colorScheme:"blue"}}),$D=e=>typeof e=="function";function tr(e,...t){return $D(e)?e(...t):e}var{definePartsStyle:Mh,defineMultiStyleConfig:TD}=Tt(iT.keys),Uc=it("checkbox-size"),AD=e=>{const{colorScheme:t}=e;return{w:Uc.reference,h:Uc.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:Xe(`${t}.500`,`${t}.200`)(e),borderColor:Xe(`${t}.500`,`${t}.200`)(e),color:Xe("white","gray.900")(e),_hover:{bg:Xe(`${t}.600`,`${t}.300`)(e),borderColor:Xe(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:Xe("gray.200","transparent")(e),bg:Xe("gray.200","whiteAlpha.300")(e),color:Xe("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:Xe(`${t}.500`,`${t}.200`)(e),borderColor:Xe(`${t}.500`,`${t}.200`)(e),color:Xe("white","gray.900")(e)},_disabled:{bg:Xe("gray.100","whiteAlpha.100")(e),borderColor:Xe("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:Xe("red.500","red.300")(e)}}},MD={_disabled:{cursor:"not-allowed"}},LD={userSelect:"none",_disabled:{opacity:.4}},RD={transitionProperty:"transform",transitionDuration:"normal"},PD=Mh(e=>({icon:RD,container:MD,control:tr(AD,e),label:LD})),ID={sm:Mh({control:{[Uc.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Mh({control:{[Uc.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Mh({control:{[Uc.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},$p=TD({baseStyle:PD,sizes:ID,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:OD,definePartsStyle:Lh}=Tt(lT.keys),FD=e=>{var t;const n=(t=tr($p.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},DD=Lh(e=>{var t,n,r,i;return{label:(n=(t=$p).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=$p).baseStyle)==null?void 0:i.call(r,e).container,control:FD(e)}}),ND={md:Lh({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:Lh({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:Lh({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},zD=OD({baseStyle:DD,sizes:ND,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:jD,definePartsStyle:BD}=Tt(I5.keys),jf=it("select-bg"),i_,HD={...(i_=Pt.baseStyle)==null?void 0:i_.field,appearance:"none",paddingBottom:"1px",lineHeight:"normal",bg:jf.reference,[jf.variable]:"colors.white",_dark:{[jf.variable]:"colors.gray.700"},"> option, > optgroup":{bg:jf.reference}},VD={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},WD=BD({field:HD,icon:VD}),Bf={paddingInlineEnd:"8"},o_,a_,s_,l_,u_,c_,d_,f_,UD={lg:{...(o_=Pt.sizes)==null?void 0:o_.lg,field:{...(a_=Pt.sizes)==null?void 0:a_.lg.field,...Bf}},md:{...(s_=Pt.sizes)==null?void 0:s_.md,field:{...(l_=Pt.sizes)==null?void 0:l_.md.field,...Bf}},sm:{...(u_=Pt.sizes)==null?void 0:u_.sm,field:{...(c_=Pt.sizes)==null?void 0:c_.sm.field,...Bf}},xs:{...(d_=Pt.sizes)==null?void 0:d_.xs,field:{...(f_=Pt.sizes)==null?void 0:f_.xs.field,...Bf},icon:{insetEnd:"1"}}},GD=jD({baseStyle:WD,sizes:UD,variants:Pt.variants,defaultProps:Pt.defaultProps}),vv=it("skeleton-start-color"),yv=it("skeleton-end-color"),KD={[vv.variable]:"colors.gray.100",[yv.variable]:"colors.gray.400",_dark:{[vv.variable]:"colors.gray.800",[yv.variable]:"colors.gray.600"},background:vv.reference,borderColor:yv.reference,opacity:.7,borderRadius:"sm"},qD={baseStyle:KD},bv=it("skip-link-bg"),YD={borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",[bv.variable]:"colors.white",_dark:{[bv.variable]:"colors.gray.700"},bg:bv.reference}},XD={baseStyle:YD},{defineMultiStyleConfig:ZD,definePartsStyle:qg}=Tt(O5.keys),xd=it("slider-thumb-size"),_d=it("slider-track-size"),ya=it("slider-bg"),QD=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...j1({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},JD=e=>({...j1({orientation:e.orientation,horizontal:{h:_d.reference},vertical:{w:_d.reference}}),overflow:"hidden",borderRadius:"sm",[ya.variable]:"colors.gray.200",_dark:{[ya.variable]:"colors.whiteAlpha.200"},_disabled:{[ya.variable]:"colors.gray.300",_dark:{[ya.variable]:"colors.whiteAlpha.300"}},bg:ya.reference}),eN=e=>{const{orientation:t}=e;return{...j1({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:xd.reference,h:xd.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"}}},tN=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",[ya.variable]:`colors.${t}.500`,_dark:{[ya.variable]:`colors.${t}.200`},bg:ya.reference}},nN=qg(e=>({container:QD(e),track:JD(e),thumb:eN(e),filledTrack:tN(e)})),rN=qg({container:{[xd.variable]:"sizes.4",[_d.variable]:"sizes.1"}}),iN=qg({container:{[xd.variable]:"sizes.3.5",[_d.variable]:"sizes.1"}}),oN=qg({container:{[xd.variable]:"sizes.2.5",[_d.variable]:"sizes.0.5"}}),aN={lg:rN,md:iN,sm:oN},sN=ZD({baseStyle:nN,sizes:aN,defaultProps:{size:"md",colorScheme:"blue"}}),vs=wn("spinner-size"),lN={width:[vs.reference],height:[vs.reference]},uN={xs:{[vs.variable]:"sizes.3"},sm:{[vs.variable]:"sizes.4"},md:{[vs.variable]:"sizes.6"},lg:{[vs.variable]:"sizes.8"},xl:{[vs.variable]:"sizes.12"}},cN={baseStyle:lN,sizes:uN,defaultProps:{size:"md"}},{defineMultiStyleConfig:dN,definePartsStyle:fT}=Tt(F5.keys),fN={fontWeight:"medium"},hN={opacity:.8,marginBottom:"2"},pN={verticalAlign:"baseline",fontWeight:"semibold"},gN={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},mN=fT({container:{},label:fN,helpText:hN,number:pN,icon:gN}),vN={md:fT({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},yN=dN({baseStyle:mN,sizes:vN,defaultProps:{size:"md"}}),wv=it("kbd-bg"),bN={[wv.variable]:"colors.gray.100",_dark:{[wv.variable]:"colors.whiteAlpha.100"},bg:wv.reference,borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"},wN={baseStyle:bN},SN={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},xN={baseStyle:SN},{defineMultiStyleConfig:_N,definePartsStyle:CN}=Tt(M5.keys),kN={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},EN=CN({icon:kN}),$N=_N({baseStyle:EN}),{defineMultiStyleConfig:TN,definePartsStyle:AN}=Tt(L5.keys),Bi=it("menu-bg"),Sv=it("menu-shadow"),MN={[Bi.variable]:"#fff",[Sv.variable]:"shadows.sm",_dark:{[Bi.variable]:"colors.gray.700",[Sv.variable]:"shadows.dark-lg"},color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px",bg:Bi.reference,boxShadow:Sv.reference},LN={py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{[Bi.variable]:"colors.gray.100",_dark:{[Bi.variable]:"colors.whiteAlpha.100"}},_active:{[Bi.variable]:"colors.gray.200",_dark:{[Bi.variable]:"colors.whiteAlpha.200"}},_expanded:{[Bi.variable]:"colors.gray.100",_dark:{[Bi.variable]:"colors.whiteAlpha.100"}},_disabled:{opacity:.4,cursor:"not-allowed"},bg:Bi.reference},RN={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},PN={opacity:.6},IN={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},ON={transitionProperty:"common",transitionDuration:"normal"},FN=AN({button:ON,list:MN,item:LN,groupTitle:RN,command:PN,divider:IN}),DN=TN({baseStyle:FN}),{defineMultiStyleConfig:NN,definePartsStyle:C0}=Tt(aT.keys),xv=it("modal-bg"),_v=it("modal-shadow"),zN={bg:"blackAlpha.600",zIndex:"modal"},jN=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto",overscrollBehaviorY:"none"}},BN=e=>{const{isCentered:t,scrollBehavior:n}=e;return{borderRadius:"md",color:"inherit",my:t?"auto":"16",mx:t?"auto":void 0,zIndex:"modal",maxH:n==="inside"?"calc(100% - 7.5rem)":void 0,[xv.variable]:"colors.white",[_v.variable]:"shadows.lg",_dark:{[xv.variable]:"colors.gray.700",[_v.variable]:"shadows.dark-lg"},bg:xv.reference,boxShadow:_v.reference}},HN={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},VN={position:"absolute",top:"2",insetEnd:"3"},WN=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},UN={px:"6",py:"4"},GN=C0(e=>({overlay:zN,dialogContainer:tr(jN,e),dialog:tr(BN,e),header:HN,closeButton:VN,body:tr(WN,e),footer:UN}));function pi(e){return C0(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var KN={xs:pi("xs"),sm:pi("sm"),md:pi("md"),lg:pi("lg"),xl:pi("xl"),"2xl":pi("2xl"),"3xl":pi("3xl"),"4xl":pi("4xl"),"5xl":pi("5xl"),"6xl":pi("6xl"),full:pi("full")},qN=NN({baseStyle:GN,sizes:KN,defaultProps:{size:"md"}}),{defineMultiStyleConfig:YN,definePartsStyle:hT}=Tt(sT.keys),H1=wn("number-input-stepper-width"),pT=wn("number-input-input-padding"),XN=Co(H1).add("0.5rem").toString(),Cv=wn("number-input-bg"),kv=wn("number-input-color"),Ev=wn("number-input-border-color"),ZN={[H1.variable]:"sizes.6",[pT.variable]:XN},QN=e=>{var t,n;return(n=(t=tr(Pt.baseStyle,e))==null?void 0:t.field)!=null?n:{}},JN={width:H1.reference},e6={borderStart:"1px solid",borderStartColor:Ev.reference,color:kv.reference,bg:Cv.reference,[kv.variable]:"colors.chakra-body-text",[Ev.variable]:"colors.chakra-border-color",_dark:{[kv.variable]:"colors.whiteAlpha.800",[Ev.variable]:"colors.whiteAlpha.300"},_active:{[Cv.variable]:"colors.gray.200",_dark:{[Cv.variable]:"colors.whiteAlpha.300"}},_disabled:{opacity:.4,cursor:"not-allowed"}},t6=hT(e=>{var t;return{root:ZN,field:(t=tr(QN,e))!=null?t:{},stepperGroup:JN,stepper:e6}});function Hf(e){var t,n,r;const i=(t=Pt.sizes)==null?void 0:t[e],o={lg:"md",md:"md",sm:"sm",xs:"sm"},s=(r=(n=i.field)==null?void 0:n.fontSize)!=null?r:"md",d=tT.fontSizes[s];return hT({field:{...i.field,paddingInlineEnd:pT.reference,verticalAlign:"top"},stepper:{fontSize:Co(d).multiply(.75).toString(),_first:{borderTopEndRadius:o[e]},_last:{borderBottomEndRadius:o[e],mt:"-1px",borderTopWidth:1}}})}var n6={xs:Hf("xs"),sm:Hf("sm"),md:Hf("md"),lg:Hf("lg")},r6=YN({baseStyle:t6,sizes:n6,variants:Pt.variants,defaultProps:Pt.defaultProps}),h_,i6={...(h_=Pt.baseStyle)==null?void 0:h_.field,textAlign:"center"},o6={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"}},p_,g_,a6={outline:e=>{var t,n,r;return(r=(n=tr((t=Pt.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var t,n,r;return(r=(n=tr((t=Pt.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var t,n,r;return(r=(n=tr((t=Pt.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(g_=(p_=Pt.variants)==null?void 0:p_.unstyled.field)!=null?g_:{}},s6={baseStyle:i6,sizes:o6,variants:a6,defaultProps:Pt.defaultProps},{defineMultiStyleConfig:l6,definePartsStyle:u6}=Tt(R5.keys),Vf=wn("popper-bg"),c6=wn("popper-arrow-bg"),m_=wn("popper-arrow-shadow-color"),d6={zIndex:10},f6={[Vf.variable]:"colors.white",bg:Vf.reference,[c6.variable]:Vf.reference,[m_.variable]:"colors.gray.200",_dark:{[Vf.variable]:"colors.gray.700",[m_.variable]:"colors.whiteAlpha.300"},width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}},h6={px:3,py:2,borderBottomWidth:"1px"},p6={px:3,py:2},g6={px:3,py:2,borderTopWidth:"1px"},m6={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},v6=u6({popper:d6,content:f6,header:h6,body:p6,footer:g6,closeButton:m6}),y6=l6({baseStyle:v6}),{definePartsStyle:k0,defineMultiStyleConfig:b6}=Tt(E5.keys),$v=it("drawer-bg"),Tv=it("drawer-box-shadow");function Sl(e){return k0(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var w6={bg:"blackAlpha.600",zIndex:"overlay"},S6={display:"flex",zIndex:"modal",justifyContent:"center"},x6=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",color:"inherit",[$v.variable]:"colors.white",[Tv.variable]:"shadows.lg",_dark:{[$v.variable]:"colors.gray.700",[Tv.variable]:"shadows.dark-lg"},bg:$v.reference,boxShadow:Tv.reference}},_6={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},C6={position:"absolute",top:"2",insetEnd:"3"},k6={px:"6",py:"2",flex:"1",overflow:"auto"},E6={px:"6",py:"4"},$6=k0(e=>({overlay:w6,dialogContainer:S6,dialog:tr(x6,e),header:_6,closeButton:C6,body:k6,footer:E6})),T6={xs:Sl("xs"),sm:Sl("md"),md:Sl("lg"),lg:Sl("2xl"),xl:Sl("4xl"),full:Sl("full")},A6=b6({baseStyle:$6,sizes:T6,defaultProps:{size:"xs"}}),{definePartsStyle:M6,defineMultiStyleConfig:L6}=Tt($5.keys),R6={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},P6={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},I6={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},O6=M6({preview:R6,input:P6,textarea:I6}),F6=L6({baseStyle:O6}),{definePartsStyle:D6,defineMultiStyleConfig:N6}=Tt(T5.keys),du=it("form-control-color"),z6={marginStart:"1",[du.variable]:"colors.red.500",_dark:{[du.variable]:"colors.red.300"},color:du.reference},j6={mt:"2",[du.variable]:"colors.gray.600",_dark:{[du.variable]:"colors.whiteAlpha.600"},color:du.reference,lineHeight:"normal",fontSize:"sm"},B6=D6({container:{width:"100%",position:"relative"},requiredIndicator:z6,helperText:j6}),H6=N6({baseStyle:B6}),{definePartsStyle:V6,defineMultiStyleConfig:W6}=Tt(A5.keys),fu=it("form-error-color"),U6={[fu.variable]:"colors.red.500",_dark:{[fu.variable]:"colors.red.300"},color:fu.reference,mt:"2",fontSize:"sm",lineHeight:"normal"},G6={marginEnd:"0.5em",[fu.variable]:"colors.red.500",_dark:{[fu.variable]:"colors.red.300"},color:fu.reference},K6=V6({text:U6,icon:G6}),q6=W6({baseStyle:K6}),Y6={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},X6={baseStyle:Y6},Z6={fontFamily:"heading",fontWeight:"bold"},Q6={"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}},J6={baseStyle:Z6,sizes:Q6,defaultProps:{size:"xl"}},{defineMultiStyleConfig:ez,definePartsStyle:tz}=Tt(k5.keys),Av=it("breadcrumb-link-decor"),nz={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",outline:"none",color:"inherit",textDecoration:Av.reference,[Av.variable]:"none","&:not([aria-current=page])":{cursor:"pointer",_hover:{[Av.variable]:"underline"},_focusVisible:{boxShadow:"outline"}}},rz=tz({link:nz}),iz=ez({baseStyle:rz}),oz={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"}}},gT=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:Xe("gray.800","whiteAlpha.900")(e),_hover:{bg:Xe("gray.100","whiteAlpha.200")(e)},_active:{bg:Xe("gray.200","whiteAlpha.300")(e)}};const r=Mu(`${t}.200`,.12)(n),i=Mu(`${t}.200`,.24)(n);return{color:Xe(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:Xe(`${t}.50`,r)(e)},_active:{bg:Xe(`${t}.100`,i)(e)}}},az=e=>{const{colorScheme:t}=e,n=Xe("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)":{marginEnd:"-1px"},".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)":{marginBottom:"-1px"},...tr(gT,e)}},sz={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},lz=e=>{var t;const{colorScheme:n}=e;if(n==="gray"){const a=Xe("gray.100","whiteAlpha.200")(e);return{bg:a,color:Xe("gray.800","whiteAlpha.900")(e),_hover:{bg:Xe("gray.200","whiteAlpha.300")(e),_disabled:{bg:a}},_active:{bg:Xe("gray.300","whiteAlpha.400")(e)}}}const{bg:r=`${n}.500`,color:i="white",hoverBg:o=`${n}.600`,activeBg:s=`${n}.700`}=(t=sz[n])!=null?t:{},d=Xe(r,`${n}.200`)(e);return{bg:d,color:Xe(i,"gray.800")(e),_hover:{bg:Xe(o,`${n}.300`)(e),_disabled:{bg:d}},_active:{bg:Xe(s,`${n}.400`)(e)}}},uz=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:Xe(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:Xe(`${t}.700`,`${t}.500`)(e)}}},cz={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},dz={ghost:gT,outline:az,solid:lz,link:uz,unstyled:cz},fz={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"}},hz={baseStyle:oz,variants:dz,sizes:fz,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Ls,defineMultiStyleConfig:pz}=Tt(j5.keys),Tp=it("card-bg"),Po=it("card-padding"),mT=it("card-shadow"),Rh=it("card-radius"),vT=it("card-border-width","0"),yT=it("card-border-color"),gz=Ls({container:{[Tp.variable]:"colors.chakra-body-bg",backgroundColor:Tp.reference,boxShadow:mT.reference,borderRadius:Rh.reference,color:"chakra-body-text",borderWidth:vT.reference,borderColor:yT.reference},body:{padding:Po.reference,flex:"1 1 0%"},header:{padding:Po.reference},footer:{padding:Po.reference}}),mz={sm:Ls({container:{[Rh.variable]:"radii.base",[Po.variable]:"space.3"}}),md:Ls({container:{[Rh.variable]:"radii.md",[Po.variable]:"space.5"}}),lg:Ls({container:{[Rh.variable]:"radii.xl",[Po.variable]:"space.7"}})},vz={elevated:Ls({container:{[mT.variable]:"shadows.base",_dark:{[Tp.variable]:"colors.gray.700"}}}),outline:Ls({container:{[vT.variable]:"1px",[yT.variable]:"colors.chakra-border-color"}}),filled:Ls({container:{[Tp.variable]:"colors.chakra-subtle-bg"}}),unstyled:{body:{[Po.variable]:0},header:{[Po.variable]:0},footer:{[Po.variable]:0}}},yz=pz({baseStyle:gz,variants:vz,sizes:mz,defaultProps:{variant:"elevated",size:"md"}}),Gc=wn("close-button-size"),fc=wn("close-button-bg"),bz={w:[Gc.reference],h:[Gc.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{[fc.variable]:"colors.blackAlpha.100",_dark:{[fc.variable]:"colors.whiteAlpha.100"}},_active:{[fc.variable]:"colors.blackAlpha.200",_dark:{[fc.variable]:"colors.whiteAlpha.200"}},_focusVisible:{boxShadow:"outline"},bg:fc.reference},wz={lg:{[Gc.variable]:"sizes.10",fontSize:"md"},md:{[Gc.variable]:"sizes.8",fontSize:"xs"},sm:{[Gc.variable]:"sizes.6",fontSize:"2xs"}},Sz={baseStyle:bz,sizes:wz,defaultProps:{size:"md"}},{variants:xz,defaultProps:_z}=Wc,Cz={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm",bg:ln.bg.reference,color:ln.color.reference,boxShadow:ln.shadow.reference},kz={baseStyle:Cz,variants:xz,defaultProps:_z},Ez={w:"100%",mx:"auto",maxW:"prose",px:"4"},$z={baseStyle:Ez},Tz={opacity:.6,borderColor:"inherit"},Az={borderStyle:"solid"},Mz={borderStyle:"dashed"},Lz={solid:Az,dashed:Mz},Rz={baseStyle:Tz,variants:Lz,defaultProps:{variant:"solid"}},{definePartsStyle:Pz,defineMultiStyleConfig:Iz}=Tt(x5.keys),Oz={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},Fz={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},Dz={pt:"2",px:"4",pb:"5"},Nz={fontSize:"1.25em"},zz=Pz({container:Oz,button:Fz,panel:Dz,icon:Nz}),jz=Iz({baseStyle:zz}),{definePartsStyle:qd,defineMultiStyleConfig:Bz}=Tt(_5.keys),Ar=it("alert-fg"),jo=it("alert-bg"),Hz=qd({container:{bg:jo.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Ar.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Ar.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function V1(e){const{theme:t,colorScheme:n}=e,r=Mu(`${n}.200`,.16)(t);return{light:`colors.${n}.100`,dark:r}}var Vz=qd(e=>{const{colorScheme:t}=e,n=V1(e);return{container:{[Ar.variable]:`colors.${t}.500`,[jo.variable]:n.light,_dark:{[Ar.variable]:`colors.${t}.200`,[jo.variable]:n.dark}}}}),Wz=qd(e=>{const{colorScheme:t}=e,n=V1(e);return{container:{[Ar.variable]:`colors.${t}.500`,[jo.variable]:n.light,_dark:{[Ar.variable]:`colors.${t}.200`,[jo.variable]:n.dark},paddingStart:"3",borderStartWidth:"4px",borderStartColor:Ar.reference}}}),Uz=qd(e=>{const{colorScheme:t}=e,n=V1(e);return{container:{[Ar.variable]:`colors.${t}.500`,[jo.variable]:n.light,_dark:{[Ar.variable]:`colors.${t}.200`,[jo.variable]:n.dark},pt:"2",borderTopWidth:"4px",borderTopColor:Ar.reference}}}),Gz=qd(e=>{const{colorScheme:t}=e;return{container:{[Ar.variable]:"colors.white",[jo.variable]:`colors.${t}.500`,_dark:{[Ar.variable]:"colors.gray.900",[jo.variable]:`colors.${t}.200`},color:Ar.reference}}}),Kz={subtle:Vz,"left-accent":Wz,"top-accent":Uz,solid:Gz},qz=Bz({baseStyle:Hz,variants:Kz,defaultProps:{variant:"subtle",colorScheme:"blue"}}),{definePartsStyle:bT,defineMultiStyleConfig:Yz}=Tt(C5.keys),hu=it("avatar-border-color"),Kc=it("avatar-bg"),Cd=it("avatar-font-size"),Lu=it("avatar-size"),Xz={borderRadius:"full",border:"0.2em solid",borderColor:hu.reference,[hu.variable]:"white",_dark:{[hu.variable]:"colors.gray.800"}},Zz={bg:Kc.reference,fontSize:Cd.reference,width:Lu.reference,height:Lu.reference,lineHeight:"1",[Kc.variable]:"colors.gray.200",_dark:{[Kc.variable]:"colors.whiteAlpha.400"}},Qz=e=>{const{name:t,theme:n}=e,r=t?aF({string:t}):"colors.gray.400",i=iF(r)(n);let o="white";return i||(o="gray.800"),{bg:Kc.reference,fontSize:Cd.reference,color:o,borderColor:hu.reference,verticalAlign:"top",width:Lu.reference,height:Lu.reference,"&:not([data-loaded])":{[Kc.variable]:r},[hu.variable]:"colors.white",_dark:{[hu.variable]:"colors.gray.800"}}},Jz={fontSize:Cd.reference,lineHeight:"1"},ej=bT(e=>({badge:tr(Xz,e),excessLabel:tr(Zz,e),container:tr(Qz,e),label:Jz}));function sa(e){const t=e!=="100%"?rT[e]:void 0;return bT({container:{[Lu.variable]:t??e,[Cd.variable]:`calc(${t??e} / 2.5)`},excessLabel:{[Lu.variable]:t??e,[Cd.variable]:`calc(${t??e} / 2.5)`}})}var tj={"2xs":sa(4),xs:sa(6),sm:sa(8),md:sa(12),lg:sa(16),xl:sa(24),"2xl":sa(32),full:sa("100%")},nj=Yz({baseStyle:ej,sizes:tj,defaultProps:{size:"md"}}),rj={Accordion:jz,Alert:qz,Avatar:nj,Badge:Wc,Breadcrumb:iz,Button:hz,Checkbox:$p,CloseButton:Sz,Code:kz,Container:$z,Divider:Rz,Drawer:A6,Editable:F6,Form:H6,FormError:q6,FormLabel:X6,Heading:J6,Input:Pt,Kbd:wN,Link:xN,List:$N,Menu:DN,Modal:qN,NumberInput:r6,PinInput:s6,Popover:y6,Progress:ED,Radio:zD,Select:GD,Skeleton:qD,SkipLink:XD,Slider:sN,Spinner:cN,Stat:yN,Switch:xF,Table:AF,Tabs:WF,Tag:rD,Textarea:gD,Tooltip:yD,Card:yz,Stepper:S5},ij={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-inverse-text":{_light:"white",_dark:"gray.800"},"chakra-subtle-bg":{_light:"gray.100",_dark:"gray.700"},"chakra-subtle-text":{_light:"gray.600",_dark:"gray.400"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},oj={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"}}},aj="ltr",sj={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},wT={semanticTokens:ij,direction:aj,...y5,components:rj,styles:oj,config:sj};function $c(e){return typeof e=="function"}function lj(...e){return t=>e.reduce((n,r)=>r(n),t)}var uj=e=>function(...n){let r=[...n],i=n[n.length-1];return q4(i)&&r.length>1?r=r.slice(0,r.length-1):i=e,lj(...r.map(o=>s=>$c(o)?o(s):dj(s,o)))(i)},cj=uj(wT);function dj(...e){return ei({},...e,ST)}function ST(e,t,n,r){if(($c(e)||$c(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...i)=>{const o=$c(e)?e(...i):e,s=$c(t)?t(...i):t;return ei({},o,s,ST)}}function fj(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var hj=fj();function pj(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function gj(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var mj=e=>{const t=new WeakMap;return(r,i,o,s)=>{if(typeof r>"u")return e(r,i,o);t.has(r)||t.set(r,new Map);const d=t.get(r);if(d.has(i))return d.get(i);const a=e(r,i,o,s);return d.set(i,a),a}},xT=mj(gj);function _T(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var CT=e=>_T(e,t=>t!=null);function vj(e){return typeof e=="function"}function kT(e,...t){return vj(e)?e(...t):e}function yj(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var bj=typeof Element<"u",wj=typeof Map=="function",Sj=typeof Set=="function",xj=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Ph(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(!Ph(e[r],t[r]))return!1;return!0}var o;if(wj&&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(!Ph(r.value[1],t.get(r.value[0])))return!1;return!0}if(Sj&&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(xj&&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&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")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(bj&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!Ph(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var _j=function(t,n){try{return Ph(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const Cj=ki(_j);function ET(e,t={}){var n;const{styleConfig:r,...i}=t,{theme:o,colorMode:s}=G$(),d=e?xT(o,`components.${e}`):void 0,a=r||d,c=ei({theme:o,colorMode:s},(n=a==null?void 0:a.defaultProps)!=null?n:{},CT(pj(i,["children"]))),u=F.useRef({});if(a){const f=U4(a)(c);Cj(u.current,f)||(u.current=f)}return u.current}function Yd(e,t={}){return ET(e,t)}function no(e,t={}){return ET(e,t)}var kj=new Set([...P4,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),Ej=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function $j(e){return Ej.has(e)||!kj.has(e)}function Tj(e,...t){if(e==null)throw new TypeError("Cannot convert undefined or null to object");const n={...e};for(const r of t)if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i in n&&delete n[i],n[i]=r[i]);return n}function Aj(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}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)-.*))$/,E0=M$(function(e){return Mj.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Lj=E0,Rj=function(t){return t!=="theme"},v_=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Lj:Rj},y_=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},Pj=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return T1(n,r,i),z$(function(){return A1(n,r,i)}),null},Ij=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var d=y_(t,n,r),a=d||v_(i),c=!a("as");return function(){var u=arguments,l=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&l.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)l.push.apply(l,u);else{l.push(u[0][0]);for(var f=u.length,h=1;h<f;h++)l.push(u[h],u[0][h])}var p=L1(function(g,y,x){var S=c&&g.as||i,E="",v=[],w=g;if(g.theme==null){w={};for(var b in g)w[b]=g[b];w.theme=F.useContext(Au)}typeof g.className=="string"?E=F$(y.registered,v,g.className):g.className!=null&&(E=g.className+" ");var m=Vg(l.concat(v),y.registered,w);E+=y.key+"-"+m.name,s!==void 0&&(E+=" "+s);var $=c&&d===void 0?v_(S):a,A={};for(var C in g)c&&C==="as"||$(C)&&(A[C]=g[C]);return A.className=E,A.ref=x,F.createElement(F.Fragment,null,F.createElement(Pj,{cache:y,serialized:m,isStringTag:typeof S=="string"}),F.createElement(S,A))});return p.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=i,p.__emotion_styles=l,p.__emotion_forwardProp=d,Object.defineProperty(p,"toString",{value:function(){return"."+s}}),p.withComponent=function(g,y){return e(g,ze({},n,y,{shouldForwardProp:y_(p,y,!0)})).apply(void 0,l)},p}},Oj=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Ap=Ij.bind();Oj.forEach(function(e){Ap[e]=Ap(e)});var b_,Fj=(b_=Ap.default)!=null?b_:Ap,Dj=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...s}=t,d=_T(s,(l,f)=>O4(f)),a=kT(e,t),c=Tj({},i,a,CT(d),o),u=eT(c)(t.theme);return r?[u,r]:u};function Mv(e,t){const{baseStyle:n,...r}=t??{};r.shouldForwardProp||(r.shouldForwardProp=$j);const i=Dj({baseStyle:n}),o=Fj(e,r)(i);return Le.forwardRef(function(a,c){const{colorMode:u,forced:l}=O1();return Le.createElement(o,{ref:c,"data-theme":l?u:void 0,...a})})}function Nj(){const e=new Map;return new Proxy(Mv,{apply(t,n,r){return Mv(...r)},get(t,n){return e.has(n)||e.set(n,Mv(n)),e.get(n)}})}var qe=Nj();function vt(e){return F.forwardRef(e)}function zj(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=F.createContext(void 0);i.displayName=r;function o(){var s;const d=F.useContext(i);if(!d&&t){const a=new Error(n);throw a.name="ContextError",(s=Error.captureStackTrace)==null||s.call(Error,a,o),a}return d}return[i.Provider,o,i]}function jj(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=F.useMemo(()=>M4(n),[n]);return j.jsxs(l8,{theme:i,children:[j.jsx(Bj,{root:t}),r]})}function Bj({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return j.jsx(Wg,{styles:n=>({[t]:n.__cssVars})})}zj({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function Hj(){const{colorMode:e}=O1();return j.jsx(Wg,{styles:t=>{const n=xT(t,"styles.global"),r=kT(n,{theme:t,colorMode:e});return r?eT(r)(t):void 0}})}var $T=F.createContext({getDocument(){return document},getWindow(){return window}});$T.displayName="EnvironmentContext";function TT(e){const{children:t,environment:n,disabled:r}=e,i=F.useRef(null),o=F.useMemo(()=>n||{getDocument:()=>{var d,a;return(a=(d=i.current)==null?void 0:d.ownerDocument)!=null?a:document},getWindow:()=>{var d,a;return(a=(d=i.current)==null?void 0:d.ownerDocument.defaultView)!=null?a:window}},[n]),s=!r||!n;return j.jsxs($T.Provider,{value:o,children:[t,s&&j.jsx("span",{id:"__chakra_env",hidden:!0,ref:i})]})}TT.displayName="EnvironmentProvider";var Vj=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetScope:i,resetCSS:o=!0,theme:s={},environment:d,cssVarsRoot:a,disableEnvironment:c,disableGlobalStyle:u}=e,l=j.jsx(TT,{environment:d,disabled:c,children:t});return j.jsx(jj,{theme:s,cssVarsRoot:a,children:j.jsxs(U$,{colorModeManager:n,options:s.config,children:[o?j.jsx(p8,{scope:i}):j.jsx(h8,{}),!u&&j.jsx(Hj,{}),r?j.jsx(V$,{zIndex:r,children:l}):l]})})},Wj=(e,t)=>e.find(n=>n.id===t);function w_(e,t){const n=AT(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function AT(e,t){for(const[n,r]of Object.entries(e))if(Wj(r,t))return n}function Uj(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 Gj(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)",s=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:"var(--toast-z-index, 5500)",pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:s}}function Qn(e,t=[]){const n=F.useRef(e);return F.useEffect(()=>{n.current=e}),F.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Kj(e,t){const n=Qn(e);F.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function Mp(e,t){const n=F.useRef(!1),r=F.useRef(!1);F.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),F.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}const MT=F.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Yg=F.createContext({}),Xd=F.createContext(null),Xg=typeof document<"u",Lp=Xg?F.useLayoutEffect:F.useEffect,LT=F.createContext({strict:!1});function qj(e,t,n,r){const{visualElement:i}=F.useContext(Yg),o=F.useContext(LT),s=F.useContext(Xd),d=F.useContext(MT).reducedMotion,a=F.useRef();r=r||o.renderer,!a.current&&r&&(a.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:d}));const c=a.current;return F.useInsertionEffect(()=>{c&&c.update(n,s)}),Lp(()=>{c&&c.render()}),F.useEffect(()=>{c&&c.updateFeatures()}),(window.HandoffAppearAnimations?Lp:F.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function Kl(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Yj(e,t,n){return F.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Kl(n)&&(n.current=r))},[t])}function kd(e){return typeof e=="string"||Array.isArray(e)}function Zg(e){return typeof e=="object"&&typeof e.start=="function"}const W1=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],U1=["initial",...W1];function Qg(e){return Zg(e.animate)||U1.some(t=>kd(e[t]))}function RT(e){return!!(Qg(e)||e.variants)}function Xj(e,t){if(Qg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||kd(n)?n:void 0,animate:kd(r)?r:void 0}}return e.inherit!==!1?t:{}}function Zj(e){const{initial:t,animate:n}=Xj(e,F.useContext(Yg));return F.useMemo(()=>({initial:t,animate:n}),[S_(t),S_(n)])}function S_(e){return Array.isArray(e)?e.join(" "):e}const x_={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ed={};for(const e in x_)Ed[e]={isEnabled:t=>x_[e].some(n=>!!t[n])};function Qj(e){for(const t in e)Ed[t]={...Ed[t],...e[t]}}const G1=F.createContext({}),PT=F.createContext({}),Jj=Symbol.for("motionComponentSymbol");function eB({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Qj(e);function o(d,a){let c;const u={...F.useContext(MT),...d,layoutId:tB(d)},{isStatic:l}=u,f=Zj(d),h=r(d,l);if(!l&&Xg){f.visualElement=qj(i,h,u,t);const p=F.useContext(PT),g=F.useContext(LT).strict;f.visualElement&&(c=f.visualElement.loadFeatures(u,g,e,p))}return F.createElement(Yg.Provider,{value:f},c&&f.visualElement?F.createElement(c,{visualElement:f.visualElement,...u}):null,n(i,d,Yj(h,f.visualElement,a),h,l,f.visualElement))}const s=F.forwardRef(o);return s[Jj]=i,s}function tB({layoutId:e}){const t=F.useContext(G1).id;return t&&e!==void 0?t+"-"+e:e}function nB(e){function t(r,i={}){return eB(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 rB=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function K1(e){return typeof e!="string"||e.includes("-")?!1:!!(rB.indexOf(e)>-1||/[A-Z]/.test(e))}const Rp={};function iB(e){Object.assign(Rp,e)}const Zd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ks=new Set(Zd);function IT(e,{layout:t,layoutId:n}){return Ks.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Rp[e]||e==="opacity")}const br=e=>!!(e&&e.getVelocity),oB={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aB=Zd.length;function sB(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<aB;s++){const d=Zd[s];if(e[d]!==void 0){const a=oB[d]||d;o+=`${a}(${e[d]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const OT=e=>t=>typeof t=="string"&&t.startsWith(e),FT=OT("--"),$0=OT("var(--"),lB=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,uB=(e,t)=>t&&typeof e=="number"?t.transform(e):e,ja=(e,t,n)=>Math.min(Math.max(n,e),t),qs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qc={...qs,transform:e=>ja(0,1,e)},Wf={...qs,default:1},Yc=e=>Math.round(e*1e5)/1e5,Jg=/(-)?([\d]*\.?[\d])+/g,DT=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,cB=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Qd(e){return typeof e=="string"}const Jd=e=>({test:t=>Qd(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ua=Jd("deg"),Ji=Jd("%"),Je=Jd("px"),dB=Jd("vh"),fB=Jd("vw"),__={...Ji,parse:e=>Ji.parse(e)/100,transform:e=>Ji.transform(e*100)},C_={...qs,transform:Math.round},NT={borderWidth:Je,borderTopWidth:Je,borderRightWidth:Je,borderBottomWidth:Je,borderLeftWidth:Je,borderRadius:Je,radius:Je,borderTopLeftRadius:Je,borderTopRightRadius:Je,borderBottomRightRadius:Je,borderBottomLeftRadius:Je,width:Je,maxWidth:Je,height:Je,maxHeight:Je,size:Je,top:Je,right:Je,bottom:Je,left:Je,padding:Je,paddingTop:Je,paddingRight:Je,paddingBottom:Je,paddingLeft:Je,margin:Je,marginTop:Je,marginRight:Je,marginBottom:Je,marginLeft:Je,rotate:ua,rotateX:ua,rotateY:ua,rotateZ:ua,scale:Wf,scaleX:Wf,scaleY:Wf,scaleZ:Wf,skew:ua,skewX:ua,skewY:ua,distance:Je,translateX:Je,translateY:Je,translateZ:Je,x:Je,y:Je,z:Je,perspective:Je,transformPerspective:Je,opacity:qc,originX:__,originY:__,originZ:Je,zIndex:C_,fillOpacity:qc,strokeOpacity:qc,numOctaves:C_};function q1(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:d}=e;let a=!1,c=!1,u=!0;for(const l in t){const f=t[l];if(FT(l)){o[l]=f;continue}const h=NT[l],p=uB(f,h);if(Ks.has(l)){if(a=!0,s[l]=p,!u)continue;f!==(h.default||0)&&(u=!1)}else l.startsWith("origin")?(c=!0,d[l]=p):i[l]=p}if(t.transform||(a||r?i.transform=sB(e.transform,n,u,r):i.transform&&(i.transform="none")),c){const{originX:l="50%",originY:f="50%",originZ:h=0}=d;i.transformOrigin=`${l} ${f} ${h}`}}const Y1=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function zT(e,t,n){for(const r in t)!br(t[r])&&!IT(r,n)&&(e[r]=t[r])}function hB({transformTemplate:e},t,n){return F.useMemo(()=>{const r=Y1();return q1(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function pB(e,t,n){const r=e.style||{},i={};return zT(i,r,e),Object.assign(i,hB(e,t,n)),e.transformValues?e.transformValues(i):i}function gB(e,t,n){const r={},i=pB(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"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const mB=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Pp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||mB.has(e)}let jT=e=>!Pp(e);function vB(e){e&&(jT=t=>t.startsWith("on")?!Pp(t):e(t))}try{vB(require("@emotion/is-prop-valid").default)}catch{}function yB(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(jT(i)||n===!0&&Pp(i)||!t&&!Pp(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function k_(e,t,n){return typeof e=="string"?e:Je.transform(t+n*e)}function bB(e,t,n){const r=k_(t,e.x,e.width),i=k_(n,e.y,e.height);return`${r} ${i}`}const wB={offset:"stroke-dashoffset",array:"stroke-dasharray"},SB={offset:"strokeDashoffset",array:"strokeDasharray"};function xB(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?wB:SB;e[o.offset]=Je.transform(-r);const s=Je.transform(t),d=Je.transform(n);e[o.array]=`${s} ${d}`}function X1(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:d=1,pathOffset:a=0,...c},u,l,f){if(q1(e,c,u,f),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:g}=e;h.transform&&(g&&(p.transform=h.transform),delete h.transform),g&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=bB(g,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&xB(h,s,d,a,!1)}const BT=()=>({...Y1(),attrs:{}}),Z1=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _B(e,t,n,r){const i=F.useMemo(()=>{const o=BT();return X1(o,t,{enableHardwareAcceleration:!1},Z1(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};zT(o,e.style,e),i.style={...o,...i.style}}return i}function CB(e=!1){return(n,r,i,{latestValues:o},s)=>{const a=(K1(n)?_B:gB)(r,o,s,n),u={...yB(r,typeof n=="string",e),...a,ref:i},{children:l}=r,f=F.useMemo(()=>br(l)?l.get():l,[l]);return F.createElement(n,{...u,children:f})}}const Q1=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function HT(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 VT=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function WT(e,t,n,r){HT(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(VT.has(i)?i:Q1(i),t.attrs[i])}function J1(e,t){const{style:n}=e,r={};for(const i in n)(br(n[i])||t.style&&br(t.style[i])||IT(i,e))&&(r[i]=n[i]);return r}function UT(e,t){const n=J1(e,t);for(const r in e)if(br(e[r])||br(t[r])){const i=Zd.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function ew(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}function GT(e){const t=F.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ip=e=>Array.isArray(e),kB=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),EB=e=>Ip(e)?e[e.length-1]||0:e;function Ih(e){const t=br(e)?e.get():e;return kB(t)?t.toValue():t}function $B({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:TB(r,i,o,e),renderState:t()};return n&&(s.mount=d=>n(r,d,s)),s}const KT=e=>(t,n)=>{const r=F.useContext(Yg),i=F.useContext(Xd),o=()=>$B(e,t,r,i);return n?o():GT(o)};function TB(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=Ih(o[f]);let{initial:s,animate:d}=e;const a=Qg(e),c=RT(e);t&&c&&!a&&e.inherit!==!1&&(s===void 0&&(s=t.initial),d===void 0&&(d=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const l=u?d:s;return l&&typeof l!="boolean"&&!Zg(l)&&(Array.isArray(l)?l:[l]).forEach(h=>{const p=ew(e,h);if(!p)return;const{transitionEnd:g,transition:y,...x}=p;for(const S in x){let E=x[S];if(Array.isArray(E)){const v=u?E.length-1:0;E=E[v]}E!==null&&(i[S]=E)}for(const S in g)i[S]=g[S]}),i}const AB={useVisualState:KT({scrapeMotionValuesFromProps:UT,createRenderState:BT,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}}X1(n,r,{enableHardwareAcceleration:!1},Z1(t.tagName),e.transformTemplate),WT(t,n)}})},MB={useVisualState:KT({scrapeMotionValuesFromProps:J1,createRenderState:Y1})};function LB(e,{forwardMotionProps:t=!1},n,r){return{...K1(e)?AB:MB,preloadedFeatures:n,useRender:CB(t),createVisualElement:r,Component:e}}function Ao(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const qT=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function em(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const RB=e=>t=>qT(t)&&e(t,em(t));function Io(e,t,n,r){return Ao(e,t,RB(n),r)}const PB=(e,t)=>n=>t(e(n)),Ra=(...e)=>e.reduce(PB);function YT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const E_=YT("dragHorizontal"),$_=YT("dragVertical");function XT(e){let t=!1;if(e==="y")t=$_();else if(e==="x")t=E_();else{const n=E_(),r=$_();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function ZT(){const e=XT(!0);return e?(e(),!1):!0}class Ka{constructor(t){this.isMounted=!1,this.node=t}update(){}}function IB(e){let t=[],n=[],r=0,i=!1,o=!1;const s=new WeakSet,d={schedule:(a,c=!1,u=!1)=>{const l=u&&i,f=l?t:n;return c&&s.add(a),f.indexOf(a)===-1&&(f.push(a),l&&i&&(r=t.length)),a},cancel:a=>{const c=n.indexOf(a);c!==-1&&n.splice(c,1),s.delete(a)},process:a=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c<r;c++){const u=t[c];u(a),s.has(u)&&(d.schedule(u),e())}i=!1,o&&(o=!1,d.process(a))}};return d}const Yt={delta:0,timestamp:0,isProcessing:!1},OB=40;let T0=!0,$d=!1;const tm=["read","update","preRender","render","postRender"],pu=tm.reduce((e,t)=>(e[t]=IB(()=>$d=!0),e),{}),FB=e=>pu[e].process(Yt),QT=e=>{$d=!1,Yt.delta=T0?1e3/60:Math.max(Math.min(e-Yt.timestamp,OB),1),Yt.timestamp=e,Yt.isProcessing=!0,tm.forEach(FB),Yt.isProcessing=!1,$d&&(T0=!1,requestAnimationFrame(QT))},DB=()=>{$d=!0,T0=!0,Yt.isProcessing||requestAnimationFrame(QT)},Kt=tm.reduce((e,t)=>{const n=pu[t];return e[t]=(r,i=!1,o=!1)=>($d||DB(),n.schedule(r,i,o)),e},{});function Bo(e){tm.forEach(t=>pu[t].cancel(e))}function T_(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||ZT())return;const d=e.getProps();e.animationState&&d.whileHover&&e.animationState.setActive("whileHover",t),d[r]&&Kt.update(()=>d[r](o,s))};return Io(e.current,n,i,{passive:!e.getProps()[r]})}class NB extends Ka{mount(){this.unmount=Ra(T_(this.node,!0),T_(this.node,!1))}unmount(){}}class zB extends Ka{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ra(Ao(this.node.current,"focus",()=>this.onFocus()),Ao(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const JT=(e,t)=>t?e===t?!0:JT(e,t.parentElement):!1,vn=e=>e;function Lv(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,em(n))}class jB extends Ka{constructor(){super(...arguments),this.removeStartListeners=vn,this.removeEndListeners=vn,this.removeAccessibleListeners=vn,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=Io(window,"pointerup",(d,a)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u}=this.node.getProps();Kt.update(()=>{JT(this.node.current,d.target)?c&&c(d,a):u&&u(d,a)})},{passive:!(r.onTap||r.onPointerUp)}),s=Io(window,"pointercancel",(d,a)=>this.cancelPress(d,a),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Ra(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=d=>{d.key!=="Enter"||!this.checkPressEnd()||Lv("up",(a,c)=>{const{onTap:u}=this.node.getProps();u&&Kt.update(()=>u(a,c))})};this.removeEndListeners(),this.removeEndListeners=Ao(this.node.current,"keyup",s),Lv("down",(d,a)=>{this.startPress(d,a)})},n=Ao(this.node.current,"keydown",t),r=()=>{this.isPressing&&Lv("cancel",(o,s)=>this.cancelPress(o,s))},i=Ao(this.node.current,"blur",r);this.removeAccessibleListeners=Ra(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Kt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ZT()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Kt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Io(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Ao(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ra(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const A0=new WeakMap,Rv=new WeakMap,BB=e=>{const t=A0.get(e.target);t&&t(e)},HB=e=>{e.forEach(BB)};function VB({root:e,...t}){const n=e||document;Rv.has(n)||Rv.set(n,{});const r=Rv.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(HB,{root:e,...t})),r[i]}function WB(e,t,n){const r=VB(t);return A0.set(e,n),r.observe(e),()=>{A0.delete(e),r.unobserve(e)}}const UB={some:0,all:1};class GB extends Ka{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:UB[i]},d=a=>{const{isIntersecting:c}=a;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:l}=this.node.getProps(),f=c?u:l;f&&f(a)};return WB(this.node.current,s,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(KB(t,n))&&this.startObserver()}unmount(){}}function KB({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const qB={inView:{Feature:GB},tap:{Feature:jB},focus:{Feature:zB},hover:{Feature:NB}};function eA(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function YB(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function XB(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function nm(e,t,n){const r=e.getProps();return ew(r,t,n!==void 0?n:r.custom,YB(e),XB(e))}const ZB="framerAppearId",QB="data-"+Q1(ZB);let JB=vn,tw=vn;const Pa=e=>e*1e3,Oo=e=>e/1e3,eH={current:!1},tA=e=>Array.isArray(e)&&typeof e[0]=="number";function nA(e){return!!(!e||typeof e=="string"&&rA[e]||tA(e)||Array.isArray(e)&&e.every(nA))}const Tc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,rA={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Tc([0,.65,.55,1]),circOut:Tc([.55,0,1,.45]),backIn:Tc([.31,.01,.66,-.59]),backOut:Tc([.33,1.53,.69,.99])};function iA(e){if(e)return tA(e)?Tc(e):Array.isArray(e)?e.map(iA):rA[e]}function tH(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:d,times:a}={}){const c={[t]:n};a&&(c.offset=a);const u=iA(d);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}const A_={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Pv={},oA={};for(const e in A_)oA[e]=()=>(Pv[e]===void 0&&(Pv[e]=A_[e]()),Pv[e]);function nH(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const aA=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rH=1e-7,iH=12;function oH(e,t,n,r,i){let o,s,d=0;do s=t+(n-t)/2,o=aA(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>rH&&++d<iH);return s}function ef(e,t,n,r){if(e===t&&n===r)return vn;const i=o=>oH(o,0,1,e,n);return o=>o===0||o===1?o:aA(i(o),t,r)}const aH=ef(.42,0,1,1),sH=ef(0,0,.58,1),sA=ef(.42,0,.58,1),lH=e=>Array.isArray(e)&&typeof e[0]!="number",lA=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uA=e=>t=>1-e(1-t),cA=e=>1-Math.sin(Math.acos(e)),nw=uA(cA),uH=lA(nw),dA=ef(.33,1.53,.69,.99),rw=uA(dA),cH=lA(rw),dH=e=>(e*=2)<1?.5*rw(e):.5*(2-Math.pow(2,-10*(e-1))),fH={linear:vn,easeIn:aH,easeInOut:sA,easeOut:sH,circIn:cA,circInOut:uH,circOut:nw,backIn:rw,backInOut:cH,backOut:dA,anticipate:dH},M_=e=>{if(Array.isArray(e)){tw(e.length===4);const[t,n,r,i]=e;return ef(t,n,r,i)}else if(typeof e=="string")return fH[e];return e},iw=(e,t)=>n=>!!(Qd(n)&&cB.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),fA=(e,t,n)=>r=>{if(!Qd(r))return r;const[i,o,s,d]=r.match(Jg);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:d!==void 0?parseFloat(d):1}},hH=e=>ja(0,255,e),Iv={...qs,transform:e=>Math.round(hH(e))},_s={test:iw("rgb","red"),parse:fA("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Iv.transform(e)+", "+Iv.transform(t)+", "+Iv.transform(n)+", "+Yc(qc.transform(r))+")"};function pH(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),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 M0={test:iw("#"),parse:pH,transform:_s.transform},ql={test:iw("hsl","hue"),parse:fA("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ji.transform(Yc(t))+", "+Ji.transform(Yc(n))+", "+Yc(qc.transform(r))+")"},Xn={test:e=>_s.test(e)||M0.test(e)||ql.test(e),parse:e=>_s.test(e)?_s.parse(e):ql.test(e)?ql.parse(e):M0.parse(e),transform:e=>Qd(e)?e:e.hasOwnProperty("red")?_s.transform(e):ql.transform(e)},Zt=(e,t,n)=>-n*e+n*t+e;function Ov(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 gH({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const d=n<.5?n*(1+t):n+t-n*t,a=2*n-d;i=Ov(a,d,e+1/3),o=Ov(a,d,e),s=Ov(a,d,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Fv=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},mH=[M0,_s,ql],vH=e=>mH.find(t=>t.test(e));function L_(e){const t=vH(e);let n=t.parse(e);return t===ql&&(n=gH(n)),n}const hA=(e,t)=>{const n=L_(e),r=L_(t),i={...n};return o=>(i.red=Fv(n.red,r.red,o),i.green=Fv(n.green,r.green,o),i.blue=Fv(n.blue,r.blue,o),i.alpha=Zt(n.alpha,r.alpha,o),_s.transform(i))};function yH(e){var t,n;return isNaN(e)&&Qd(e)&&(((t=e.match(Jg))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(DT))===null||n===void 0?void 0:n.length)||0)>0}const pA={regex:lB,countKey:"Vars",token:"${v}",parse:vn},gA={regex:DT,countKey:"Colors",token:"${c}",parse:Xn.parse},mA={regex:Jg,countKey:"Numbers",token:"${n}",parse:qs.parse};function Dv(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function Op(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Dv(n,pA),Dv(n,gA),Dv(n,mA),n}function vA(e){return Op(e).values}function yA(e){const{values:t,numColors:n,numVars:r,tokenised:i}=Op(e),o=t.length;return s=>{let d=i;for(let a=0;a<o;a++)a<r?d=d.replace(pA.token,s[a]):a<r+n?d=d.replace(gA.token,Xn.transform(s[a])):d=d.replace(mA.token,Yc(s[a]));return d}}const bH=e=>typeof e=="number"?0:e;function wH(e){const t=vA(e);return yA(e)(t.map(bH))}const Ba={test:yH,parse:vA,createTransformer:yA,getAnimatableNone:wH},bA=(e,t)=>n=>`${n>0?t:e}`;function wA(e,t){return typeof e=="number"?n=>Zt(e,t,n):Xn.test(e)?hA(e,t):e.startsWith("var(")?bA(e,t):xA(e,t)}const SA=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>wA(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},SH=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=wA(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},xA=(e,t)=>{const n=Ba.createTransformer(t),r=Op(e),i=Op(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Ra(SA(r.values,i.values),n):bA(e,t)},Td=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},R_=(e,t)=>n=>Zt(e,t,n);function xH(e){return typeof e=="number"?R_:typeof e=="string"?Xn.test(e)?hA:xA:Array.isArray(e)?SA:typeof e=="object"?SH:R_}function _H(e,t,n){const r=[],i=n||xH(e[0]),o=e.length-1;for(let s=0;s<o;s++){let d=i(e[s],e[s+1]);if(t){const a=Array.isArray(t)?t[s]||vn:t;d=Ra(a,d)}r.push(d)}return r}function _A(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(tw(o===t.length),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=_H(t,r,i),d=s.length,a=c=>{let u=0;if(d>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const l=Td(e[u],e[u+1],c);return s[u](l)};return n?c=>a(ja(e[0],e[o-1],c)):a}function CH(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Td(0,t,r);e.push(Zt(n,1,i))}}function kH(e){const t=[0];return CH(t,e.length-1),t}function EH(e,t){return e.map(n=>n*t)}function $H(e,t){return e.map(()=>t||sA).splice(0,e.length-1)}function Fp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=lH(r)?r.map(M_):M_(r),o={done:!1,value:t[0]},s=EH(n&&n.length===t.length?n:kH(t),e),d=_A(s,t,{ease:Array.isArray(i)?i:$H(t,i)});return{calculatedDuration:e,next:a=>(o.value=d(a),o.done=a>=e,o)}}function CA(e,t){return t?e*(1e3/t):0}const TH=5;function kA(e,t,n){const r=Math.max(t-TH,0);return CA(n-e(r),t-r)}const Nv=.001,AH=.01,P_=10,MH=.05,LH=1;function RH({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;JB(e<=Pa(P_));let s=1-t;s=ja(MH,LH,s),e=ja(AH,P_,Oo(e)),s<1?(i=c=>{const u=c*s,l=u*e,f=u-n,h=L0(c,s),p=Math.exp(-l);return Nv-f/h*p},o=c=>{const l=c*s*e,f=l*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,p=Math.exp(-l),g=L0(Math.pow(c,2),s);return(-i(c)+Nv>0?-1:1)*((f-h)*p)/g}):(i=c=>{const u=Math.exp(-c*e),l=(c-n)*e+1;return-Nv+u*l},o=c=>{const u=Math.exp(-c*e),l=(n-c)*(e*e);return u*l});const d=5/e,a=IH(i,o,d);if(e=Pa(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(a,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const PH=12;function IH(e,t,n){let r=n;for(let i=1;i<PH;i++)r=r-e(r)/t(r);return r}function L0(e,t){return e*Math.sqrt(1-t*t)}const OH=["duration","bounce"],FH=["stiffness","damping","mass"];function I_(e,t){return t.some(n=>e[n]!==void 0)}function DH(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!I_(e,FH)&&I_(e,OH)){const n=RH(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function EA({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:d,damping:a,mass:c,velocity:u,duration:l,isResolvedFromDuration:f}=DH(r),h=u?-Oo(u):0,p=a/(2*Math.sqrt(d*c)),g=o-i,y=Oo(Math.sqrt(d/c)),x=Math.abs(g)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let S;if(p<1){const E=L0(y,p);S=v=>{const w=Math.exp(-p*y*v);return o-w*((h+p*y*g)/E*Math.sin(E*v)+g*Math.cos(E*v))}}else if(p===1)S=E=>o-Math.exp(-y*E)*(g+(h+y*g)*E);else{const E=y*Math.sqrt(p*p-1);S=v=>{const w=Math.exp(-p*y*v),b=Math.min(E*v,300);return o-w*((h+p*y*g)*Math.sinh(b)+E*g*Math.cosh(b))/E}}return{calculatedDuration:f&&l||null,next:E=>{const v=S(E);if(f)s.done=E>=l;else{let w=h;E!==0&&(p<1?w=kA(S,E,v):w=0);const b=Math.abs(w)<=n,m=Math.abs(o-v)<=t;s.done=b&&m}return s.value=s.done?o:v,s}}}function O_({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:d,max:a,restDelta:c=.5,restSpeed:u}){const l=e[0],f={done:!1,value:l},h=$=>d!==void 0&&$<d||a!==void 0&&$>a,p=$=>d===void 0?a:a===void 0||Math.abs(d-$)<Math.abs(a-$)?d:a;let g=n*t;const y=l+g,x=s===void 0?y:s(y);x!==y&&(g=x-l);const S=$=>-g*Math.exp(-$/r),E=$=>x+S($),v=$=>{const A=S($),C=E($);f.done=Math.abs(A)<=c,f.value=f.done?x:C};let w,b;const m=$=>{h(f.value)&&(w=$,b=EA({keyframes:[f.value,p(f.value)],velocity:kA(E,$,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return m(0),{calculatedDuration:null,next:$=>{let A=!1;return!b&&w===void 0&&(A=!0,v($),m($)),w!==void 0&&$>w?b.next($-w):(!A&&v($),f)}}}const NH=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Kt.update(t,!0),stop:()=>Bo(t),now:()=>Yt.isProcessing?Yt.timestamp:performance.now()}},F_=2e4;function D_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<F_;)t+=n,r=e.next(t);return t>=F_?1/0:t}const zH={decay:O_,inertia:O_,tween:Fp,keyframes:Fp,spring:EA};function Dp({autoplay:e=!0,delay:t=0,driver:n=NH,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:d="loop",onPlay:a,onStop:c,onComplete:u,onUpdate:l,...f}){let h=1,p=!1,g,y;const x=()=>{g&&g(),y=new Promise(U=>{g=U})};x();let S;const E=zH[i]||Fp;let v;E!==Fp&&typeof r[0]!="number"&&(v=_A([0,100],r,{clamp:!1}),r=[0,100]);const w=E({...f,keyframes:r});let b;d==="mirror"&&(b=E({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let m="idle",$=null,A=null,C=null;w.calculatedDuration===null&&o&&(w.calculatedDuration=D_(w));const{calculatedDuration:k}=w;let I=1/0,L=1/0;k!==null&&(I=k+s,L=I*(o+1)-s);let T=0;const R=U=>{if(A===null)return;h>0&&(A=Math.min(A,U)),$!==null?T=$:T=(U-A)*h;const X=T-t,W=X<0;T=Math.max(X,0),m==="finished"&&$===null&&(T=L);let q=T,Q=w;if(o){const ce=T/I;let fe=Math.floor(ce),he=ce%1;!he&&ce>=1&&(he=1),he===1&&fe--,fe=Math.min(fe,o+1);const me=!!(fe%2);me&&(d==="reverse"?(he=1-he,s&&(he-=s/I)):d==="mirror"&&(Q=b));let Pe=ja(0,1,he);T>L&&(Pe=d==="reverse"&&me?1:0),q=Pe*I}const G=W?{done:!1,value:r[0]}:Q.next(q);v&&(G.value=v(G.value));let{done:oe}=G;!W&&k!==null&&(oe=T>=L);const ne=$===null&&(m==="finished"||m==="running"&&oe||h<0&&T<=0);return l&&l(G.value),ne&&N(),G},P=()=>{S&&S.stop(),S=void 0},D=()=>{m="idle",P(),x(),A=C=null},N=()=>{m="finished",u&&u(),P(),x()},B=()=>{if(p)return;S||(S=n(R));const U=S.now();a&&a(),$!==null?A=U-$:(!A||m==="finished")&&(A=U),C=A,$=null,m="running",S.start()};e&&B();const Z={then(U,X){return y.then(U,X)},get time(){return Oo(T)},set time(U){U=Pa(U),T=U,$!==null||!S||h===0?$=U:A=S.now()-U/h},get duration(){const U=w.calculatedDuration===null?D_(w):w.calculatedDuration;return Oo(U)},get speed(){return h},set speed(U){U===h||!S||(h=U,Z.time=Oo(T))},get state(){return m},play:B,pause:()=>{m="paused",$=T},stop:()=>{p=!0,m!=="idle"&&(m="idle",c&&c(),D())},cancel:()=>{C!==null&&R(C),D()},complete:()=>{m="finished"},sample:U=>(A=0,R(U))};return Z}const jH=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Uf=10,BH=2e4,HH=(e,t)=>t.type==="spring"||e==="backgroundColor"||!nA(t.ease);function VH(e,t,{onUpdate:n,onComplete:r,...i}){if(!(oA.waapi()&&jH.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,d,a;const c=()=>{a=new Promise(x=>{d=x})};c();let{keyframes:u,duration:l=300,ease:f,times:h}=i;if(HH(t,i)){const x=Dp({...i,repeat:0,delay:0});let S={done:!1,value:u[0]};const E=[];let v=0;for(;!S.done&&v<BH;)S=x.sample(v),E.push(S.value),v+=Uf;h=void 0,u=E,l=v-Uf,f="linear"}const p=tH(e.owner.current,t,u,{...i,duration:l,ease:f,times:h}),g=()=>p.cancel(),y=()=>{Kt.update(g),d(),c()};return p.onfinish=()=>{e.set(nH(u,i)),r&&r(),y()},{then(x,S){return a.then(x,S)},get time(){return Oo(p.currentTime||0)},set time(x){p.currentTime=Pa(x)},get speed(){return p.playbackRate},set speed(x){p.playbackRate=x},get duration(){return Oo(l)},play:()=>{s||(p.play(),Bo(g))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:x}=p;if(x){const S=Dp({...i,autoplay:!1});e.setWithVelocity(S.sample(x-Uf).value,S.sample(x).value,Uf)}y()},complete:()=>p.finish(),cancel:y}}function WH({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:vn,pause:vn,stop:vn,then:o=>(o(),Promise.resolve()),cancel:vn,complete:vn});return t?Dp({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const UH={type:"spring",stiffness:500,damping:25,restSpeed:10},GH=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),KH={type:"keyframes",duration:.8},qH={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},YH=(e,{keyframes:t})=>t.length>2?KH:Ks.has(e)?e.startsWith("scale")?GH(t[1]):UH:qH,R0=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ba.test(t)||t==="0")&&!t.startsWith("url(")),XH=new Set(["brightness","contrast","saturate","opacity"]);function ZH(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Jg)||[];if(!r)return e;const i=n.replace(r,"");let o=XH.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const QH=/([a-z-]*)\(.*?\)/g,P0={...Ba,getAnimatableNone:e=>{const t=e.match(QH);return t?t.map(ZH).join(" "):e}},JH={...NT,color:Xn,backgroundColor:Xn,outlineColor:Xn,fill:Xn,stroke:Xn,borderColor:Xn,borderTopColor:Xn,borderRightColor:Xn,borderBottomColor:Xn,borderLeftColor:Xn,filter:P0,WebkitFilter:P0},ow=e=>JH[e];function $A(e,t){let n=ow(e);return n!==P0&&(n=Ba),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const TA=e=>/^0[^.\s]+$/.test(e);function e9(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||TA(e)}function t9(e,t,n,r){const i=R0(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let d;const a=[];for(let c=0;c<o.length;c++)o[c]===null&&(o[c]=c===0?s:o[c-1]),e9(o[c])&&a.push(c),typeof o[c]=="string"&&o[c]!=="none"&&o[c]!=="0"&&(d=o[c]);if(i&&a.length&&d)for(let c=0;c<a.length;c++){const u=a[c];o[u]=$A(t,d)}return o}function n9({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:d,from:a,elapsed:c,...u}){return!!Object.keys(u).length}function AA(e,t){return e[t]||e.default||e}const aw=(e,t,n,r={})=>i=>{const o=AA(r,e)||{},s=o.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Pa(s);const a=t9(t,e,n,o),c=a[0],u=a[a.length-1],l=R0(e,c),f=R0(e,u);let h={keyframes:a,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-d,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(n9(o)||(h={...h,...YH(e,h)}),h.duration&&(h.duration=Pa(h.duration)),h.repeatDelay&&(h.repeatDelay=Pa(h.repeatDelay)),!l||!f||eH.current||o.type===!1)return WH(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=VH(t,e,h);if(p)return p}return Dp(h)};function Np(e){return!!(br(e)&&e.add)}const r9=e=>/^\-?\d*\.?\d+$/.test(e);function sw(e,t){e.indexOf(t)===-1&&e.push(t)}function lw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class uw{constructor(){this.subscriptions=[]}add(t){return sw(this.subscriptions,t),()=>lw(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<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const i9=e=>!isNaN(parseFloat(e));class o9{constructor(t,n={}){this.version="10.12.16",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=Yt;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,Kt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Kt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=i9(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new uw);const r=this.events[t].add(n);return t==="change"?()=>{r(),Kt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?CA(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ru(e,t){return new o9(e,t)}const MA=e=>t=>t.test(e),a9={test:e=>e==="auto",parse:e=>e},LA=[qs,Je,Ji,ua,fB,dB,a9],hc=e=>LA.find(MA(e)),s9=[...LA,Xn,Ba],l9=e=>s9.find(MA(e));function u9(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ru(n))}function c9(e,t){const n=nm(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const d=EB(o[s]);u9(e,s,d)}}function d9(e,t,n){var r,i;const o=Object.keys(t).filter(d=>!e.hasValue(d)),s=o.length;if(s)for(let d=0;d<s;d++){const a=o[d],c=t[a];let u=null;Array.isArray(c)&&(u=c[0]),u===null&&(u=(i=(r=n[a])!==null&&r!==void 0?r:e.readValue(a))!==null&&i!==void 0?i:t[a]),u!=null&&(typeof u=="string"&&(r9(u)||TA(u))?u=parseFloat(u):!l9(u)&&Ba.test(c)&&(u=$A(a,c)),e.addValue(a,Ru(u,{owner:e})),n[a]===void 0&&(n[a]=u),u!==null&&e.setBaseTarget(a,u))}}function f9(e,t){return t?(t[e]||t.default||t).from:void 0}function h9(e,t,n){const r={};for(const i in e){const o=f9(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function p9({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function RA(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...d}=e.makeTargetAnimatable(t);const a=e.getValue("willChange");r&&(o=r);const c=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const l in d){const f=e.getValue(l),h=d[l];if(!f||h===void 0||u&&p9(u,l))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const y=e.getProps()[QB];y&&(p.elapsed=window.HandoffAppearAnimations(y,l,f,Kt))}f.start(aw(l,f,h,e.shouldReduceMotion&&Ks.has(l)?{type:!1}:p));const g=f.animation;Np(a)&&(a.add(l),g.then(()=>a.remove(l))),c.push(g)}return s&&Promise.all(c).then(()=>{s&&c9(e,s)}),c}function I0(e,t,n={}){const r=nm(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(RA(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(a=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:l}=i;return g9(e,t,c+a,u,l,n)}:()=>Promise.resolve(),{when:d}=i;if(d){const[a,c]=d==="beforeChildren"?[o,s]:[s,o];return a().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function g9(e,t,n=0,r=0,i=1,o){const s=[],d=(e.variantChildren.size-1)*r,a=i===1?(c=0)=>c*r:(c=0)=>d-c*r;return Array.from(e.variantChildren).sort(m9).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(I0(c,t,{...o,delay:n+a(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function m9(e,t){return e.sortNodePosition(t)}function v9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>I0(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=I0(e,t,n);else{const i=typeof t=="function"?nm(e,t,n.custom):t;r=Promise.all(RA(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const y9=[...W1].reverse(),b9=W1.length;function w9(e){return t=>Promise.all(t.map(({animation:n,options:r})=>v9(e,n,r)))}function S9(e){let t=w9(e);const n=_9();let r=!0;const i=(a,c)=>{const u=nm(e,c);if(u){const{transition:l,transitionEnd:f,...h}=u;a={...a,...h,...f}}return a};function o(a){t=a(e)}function s(a,c){const u=e.getProps(),l=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},g=1/0;for(let x=0;x<b9;x++){const S=y9[x],E=n[S],v=u[S]!==void 0?u[S]:l[S],w=kd(v),b=S===c?E.isActive:null;b===!1&&(g=x);let m=v===l[S]&&v!==u[S]&&w;if(m&&r&&e.manuallyAnimateOnMount&&(m=!1),E.protectedKeys={...p},!E.isActive&&b===null||!v&&!E.prevProp||Zg(v)||typeof v=="boolean")continue;const $=x9(E.prevProp,v);let A=$||S===c&&E.isActive&&!m&&w||x>g&&w;const C=Array.isArray(v)?v:[v];let k=C.reduce(i,{});b===!1&&(k={});const{prevResolvedValues:I={}}=E,L={...I,...k},T=R=>{A=!0,h.delete(R),E.needsAnimating[R]=!0};for(const R in L){const P=k[R],D=I[R];p.hasOwnProperty(R)||(P!==D?Ip(P)&&Ip(D)?!eA(P,D)||$?T(R):E.protectedKeys[R]=!0:P!==void 0?T(R):h.add(R):P!==void 0&&h.has(R)?T(R):E.protectedKeys[R]=!0)}E.prevProp=v,E.prevResolvedValues=k,E.isActive&&(p={...p,...k}),r&&e.blockInitialAnimation&&(A=!1),A&&!m&&f.push(...C.map(R=>({animation:R,options:{type:S,...a}})))}if(h.size){const x={};h.forEach(S=>{const E=e.getBaseTarget(S);E!==void 0&&(x[S]=E)}),f.push({animation:x})}let y=!!f.length;return r&&u.initial===!1&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function d(a,c,u){var l;if(n[a].isActive===c)return Promise.resolve();(l=e.variantChildren)===null||l===void 0||l.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(a,c)}),n[a].isActive=c;const f=s(u,a);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:d,setAnimateFunction:o,getState:()=>n}}function x9(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!eA(t,e):!1}function ls(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _9(){return{animate:ls(!0),whileInView:ls(),whileHover:ls(),whileTap:ls(),whileDrag:ls(),whileFocus:ls(),exit:ls()}}class C9 extends Ka{constructor(t){super(t),t.animationState||(t.animationState=S9(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Zg(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let k9=0;class E9 extends Ka{constructor(){super(...arguments),this.id=k9++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const $9={animation:{Feature:C9},exit:{Feature:E9}},N_=(e,t)=>Math.abs(e-t);function T9(e,t){const n=N_(e.x,t.x),r=N_(e.y,t.y);return Math.sqrt(n**2+r**2)}class PA{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 c=jv(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,l=T9(c.offset,{x:0,y:0})>=3;if(!u&&!l)return;const{point:f}=c,{timestamp:h}=Yt;this.history.push({...f,timestamp:h});const{onStart:p,onMove:g}=this.handlers;u||(p&&p(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c)},this.handlePointerMove=(c,u)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=zv(u,this.transformPagePoint),Kt.update(this.updatePoint,!0)},this.handlePointerUp=(c,u)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:l,onSessionEnd:f}=this.handlers,h=jv(c.type==="pointercancel"?this.lastMoveEventInfo:zv(u,this.transformPagePoint),this.history);this.startEvent&&l&&l(c,h),f&&f(c,h)},!qT(t))return;this.handlers=n,this.transformPagePoint=r;const i=em(t),o=zv(i,this.transformPagePoint),{point:s}=o,{timestamp:d}=Yt;this.history=[{...s,timestamp:d}];const{onSessionStart:a}=n;a&&a(t,jv(o,this.history)),this.removeListeners=Ra(Io(window,"pointermove",this.handlePointerMove),Io(window,"pointerup",this.handlePointerUp),Io(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Bo(this.updatePoint)}}function zv(e,t){return t?{point:t(e.point)}:e}function z_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jv({point:e},t){return{point:e,delta:z_(e,IA(t)),offset:z_(e,A9(t)),velocity:M9(t,.1)}}function A9(e){return e[0]}function IA(e){return e[e.length-1]}function M9(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=IA(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Pa(t)));)n--;if(!r)return{x:0,y:0};const o=Oo(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Lr(e){return e.max-e.min}function O0(e,t=0,n=.01){return Math.abs(e-t)<=n}function j_(e,t,n,r=.5){e.origin=r,e.originPoint=Zt(t.min,t.max,e.origin),e.scale=Lr(n)/Lr(t),(O0(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Zt(n.min,n.max,e.origin)-e.originPoint,(O0(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Xc(e,t,n,r){j_(e.x,t.x,n.x,r?r.originX:void 0),j_(e.y,t.y,n.y,r?r.originY:void 0)}function B_(e,t,n){e.min=n.min+t.min,e.max=e.min+Lr(t)}function L9(e,t,n){B_(e.x,t.x,n.x),B_(e.y,t.y,n.y)}function H_(e,t,n){e.min=t.min-n.min,e.max=e.min+Lr(t)}function Zc(e,t,n){H_(e.x,t.x,n.x),H_(e.y,t.y,n.y)}function R9(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Zt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Zt(n,e,r.max):Math.min(e,n)),e}function V_(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 P9(e,{top:t,left:n,bottom:r,right:i}){return{x:V_(e.x,n,i),y:V_(e.y,t,r)}}function W_(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function I9(e,t){return{x:W_(e.x,t.x),y:W_(e.y,t.y)}}function O9(e,t){let n=.5;const r=Lr(e),i=Lr(t);return i>r?n=Td(t.min,t.max-r,e.min):r>i&&(n=Td(e.min,e.max-i,t.min)),ja(0,1,n)}function F9(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 F0=.35;function D9(e=F0){return e===!1?e=0:e===!0&&(e=F0),{x:U_(e,"left","right"),y:U_(e,"top","bottom")}}function U_(e,t,n){return{min:G_(e,t),max:G_(e,n)}}function G_(e,t){return typeof e=="number"?e:e[t]||0}const K_=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yl=()=>({x:K_(),y:K_()}),q_=()=>({min:0,max:0}),fn=()=>({x:q_(),y:q_()});function ji(e){return[e("x"),e("y")]}function OA({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function N9({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function z9(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 Bv(e){return e===void 0||e===1}function D0({scale:e,scaleX:t,scaleY:n}){return!Bv(e)||!Bv(t)||!Bv(n)}function ds(e){return D0(e)||FA(e)||e.z||e.rotate||e.rotateX||e.rotateY}function FA(e){return Y_(e.x)||Y_(e.y)}function Y_(e){return e&&e!=="0%"}function zp(e,t,n){const r=e-n,i=t*r;return n+i}function X_(e,t,n,r,i){return i!==void 0&&(e=zp(e,i,r)),zp(e,n,r)+t}function N0(e,t=0,n=1,r,i){e.min=X_(e.min,t,n,r,i),e.max=X_(e.max,t,n,r,i)}function DA(e,{x:t,y:n}){N0(e.x,t.translate,t.scale,t.originPoint),N0(e.y,n.translate,n.scale,n.originPoint)}function j9(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let d=0;d<i;d++){o=n[d],s=o.projectionDelta;const a=o.instance;a&&a.style&&a.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Xl(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,DA(e,s)),r&&ds(o.latestValues)&&Xl(e,o.latestValues))}t.x=Z_(t.x),t.y=Z_(t.y)}function Z_(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function pa(e,t){e.min=e.min+t,e.max=e.max+t}function Q_(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=Zt(e.min,e.max,o);N0(e,t[n],t[r],s,t.scale)}const B9=["x","scaleX","originX"],H9=["y","scaleY","originY"];function Xl(e,t){Q_(e.x,t,B9),Q_(e.y,t,H9)}function NA(e,t){return OA(z9(e.getBoundingClientRect(),t))}function V9(e,t,n){const r=NA(e,n),{scroll:i}=t;return i&&(pa(r.x,i.offset.x),pa(r.y,i.offset.y)),r}const W9=new WeakMap;class U9{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=fn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=a=>{this.stopAnimation(),n&&this.snapToCursor(em(a,"page").point)},o=(a,c)=>{const{drag:u,dragPropagation:l,onDragStart:f}=this.getProps();if(u&&!l&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=XT(u),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ji(p=>{let g=this.getAxisMotionValue(p).get()||0;if(Ji.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const x=y.layout.layoutBox[p];x&&(g=Lr(x)*(parseFloat(g)/100))}}this.originPoint[p]=g}),f&&Kt.update(()=>f(a,c),!1,!0);const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(a,c)=>{const{dragPropagation:u,dragDirectionLock:l,onDirectionLock:f,onDrag:h}=this.getProps();if(!u&&!this.openGlobalLock)return;const{offset:p}=c;if(l&&this.currentDirection===null){this.currentDirection=G9(p),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",c.point,p),this.updateAxis("y",c.point,p),this.visualElement.render(),h&&h(a,c)},d=(a,c)=>this.stop(a,c);this.panSession=new PA(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:d},{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&&Kt.update(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Gf(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=R9(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&Kl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=P9(r.layoutBox,t):this.constraints=!1,this.elastic=D9(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ji(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=F9(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Kl(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=V9(r,i.root,this.visualElement.getTransformPagePoint());let s=I9(i.layout.layoutBox,o);if(n){const d=n(N9(s));this.hasMutatedConstraints=!!d,d&&(s=OA(d))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:d}=this.getProps(),a=this.constraints||{},c=ji(u=>{if(!Gf(u,n,this.currentDirection))return;let l=a&&a[u]||{};s&&(l={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(d)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(aw(t,r,0,n))}stopAnimation(){ji(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ji(n=>{const{drag:r}=this.getProps();if(!Gf(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:d}=i.layout.layoutBox[n];o.set(t[n]-Zt(s,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Kl(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ji(s=>{const d=this.getAxisMotionValue(s);if(d){const a=d.get();i[s]=O9({min:a,max:a},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ji(s=>{if(!Gf(s,t,null))return;const d=this.getAxisMotionValue(s),{min:a,max:c}=this.constraints[s];d.set(Zt(a,c,i[s]))})}addListeners(){if(!this.visualElement.current)return;W9.set(this.visualElement,this);const t=this.visualElement.current,n=Io(t,"pointerdown",a=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(a)}),r=()=>{const{dragConstraints:a}=this.getProps();Kl(a)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=Ao(window,"resize",()=>this.scalePositionWithinConstraints()),d=i.addEventListener("didUpdate",({delta:a,hasLayoutChanged:c})=>{this.isDragging&&c&&(ji(u=>{const l=this.getAxisMotionValue(u);l&&(this.originPoint[u]+=a[u].translate,l.set(l.get()+a[u].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),d&&d()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=F0,dragMomentum:d=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:d}}}function Gf(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function G9(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class K9 extends Ka{constructor(t){super(t),this.removeGroupControls=vn,this.removeListeners=vn,this.controls=new U9(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vn}unmount(){this.removeGroupControls(),this.removeListeners()}}const J_=e=>(t,n)=>{e&&Kt.update(()=>e(t,n))};class q9 extends Ka{constructor(){super(...arguments),this.removePointerDownListener=vn}onPointerDown(t){this.session=new PA(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:J_(t),onStart:J_(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Kt.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=Io(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function zA(){const e=F.useContext(Xd);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=F.useId();return F.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Y9(){return X9(F.useContext(Xd))}function X9(e){return e===null?!0:e.isPresent}const Oh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function eC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const pc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Je.test(e))e=parseFloat(e);else return e;const n=eC(e,t.target.x),r=eC(e,t.target.y);return`${n}% ${r}%`}},Z9={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ba.parse(e);if(i.length>5)return r;const o=Ba.createTransformer(e),s=typeof i[0]!="number"?1:0,d=n.x.scale*t.x,a=n.y.scale*t.y;i[0+s]/=d,i[1+s]/=a;const c=Zt(d,a,.5);return typeof i[2+s]=="number"&&(i[2+s]/=c),typeof i[3+s]=="number"&&(i[3+s]/=c),o(i)}};class Q9 extends Le.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;iB(J9),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()})),Oh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||Kt.postRender(()=>{const d=s.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function jA(e){const[t,n]=zA(),r=F.useContext(G1);return Le.createElement(Q9,{...e,layoutGroup:r,switchLayoutGroup:F.useContext(PT),isPresent:t,safeToRemove:n})}const J9={borderRadius:{...pc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:pc,borderTopRightRadius:pc,borderBottomLeftRadius:pc,borderBottomRightRadius:pc,boxShadow:Z9},BA=["TopLeft","TopRight","BottomLeft","BottomRight"],eV=BA.length,tC=e=>typeof e=="string"?parseFloat(e):e,nC=e=>typeof e=="number"||Je.test(e);function tV(e,t,n,r,i,o){i?(e.opacity=Zt(0,n.opacity!==void 0?n.opacity:1,nV(r)),e.opacityExit=Zt(t.opacity!==void 0?t.opacity:1,0,rV(r))):o&&(e.opacity=Zt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<eV;s++){const d=`border${BA[s]}Radius`;let a=rC(t,d),c=rC(n,d);if(a===void 0&&c===void 0)continue;a||(a=0),c||(c=0),a===0||c===0||nC(a)===nC(c)?(e[d]=Math.max(Zt(tC(a),tC(c),r),0),(Ji.test(c)||Ji.test(a))&&(e[d]+="%")):e[d]=c}(t.rotate||n.rotate)&&(e.rotate=Zt(t.rotate||0,n.rotate||0,r))}function rC(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nV=HA(0,.5,nw),rV=HA(.5,.95,vn);function HA(e,t,n){return r=>r<e?0:r>t?1:n(Td(e,t,r))}function iC(e,t){e.min=t.min,e.max=t.max}function Gr(e,t){iC(e.x,t.x),iC(e.y,t.y)}function oC(e,t,n,r,i){return e-=t,e=zp(e,1/n,r),i!==void 0&&(e=zp(e,1/i,r)),e}function iV(e,t=0,n=1,r=.5,i,o=e,s=e){if(Ji.test(t)&&(t=parseFloat(t),t=Zt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let d=Zt(o.min,o.max,r);e===o&&(d-=t),e.min=oC(e.min,t,n,d,i),e.max=oC(e.max,t,n,d,i)}function aC(e,t,[n,r,i],o,s){iV(e,t[n],t[r],t[i],t.scale,o,s)}const oV=["x","scaleX","originX"],aV=["y","scaleY","originY"];function sC(e,t,n,r){aC(e.x,t,oV,n?n.x:void 0,r?r.x:void 0),aC(e.y,t,aV,n?n.y:void 0,r?r.y:void 0)}function lC(e){return e.translate===0&&e.scale===1}function VA(e){return lC(e.x)&&lC(e.y)}function z0(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 uC(e){return Lr(e.x)/Lr(e.y)}class sV{constructor(){this.members=[]}add(t){sw(this.members,t),t.scheduleRender()}remove(t){if(lw(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){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function cC(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:a,rotateX:c,rotateY:u}=n;a&&(r+=`rotate(${a}deg) `),c&&(r+=`rotateX(${c}deg) `),u&&(r+=`rotateY(${u}deg) `)}const s=e.x.scale*t.x,d=e.y.scale*t.y;return(s!==1||d!==1)&&(r+=`scale(${s}, ${d})`),r||"none"}const lV=(e,t)=>e.depth-t.depth;class uV{constructor(){this.children=[],this.isDirty=!1}add(t){sw(this.children,t),this.isDirty=!0}remove(t){lw(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(lV),this.isDirty=!1,this.children.forEach(t)}}function cV(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Bo(r),e(o-t))};return Kt.read(r,!0),()=>Bo(r)}function dV(e){window.MotionDebug&&window.MotionDebug.record(e)}function fV(e){return e instanceof SVGElement&&e.tagName!=="svg"}function hV(e,t,n){const r=br(e)?e:Ru(e);return r.start(aw("",r,t,n)),r.animation}const dC=["","X","Y","Z"],fC=1e3;let pV=0;const fs={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function WA({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},d=t==null?void 0:t()){this.id=pV++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!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.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{fs.totalNodes=fs.resolvedTargetDeltas=fs.recalculatedProjection=0,this.nodes.forEach(vV),this.nodes.forEach(xV),this.nodes.forEach(_V),this.nodes.forEach(yV),dV(fs)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new uV)}addEventListener(s,d){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new uw),this.eventHandlers.get(s).add(d)}notifyListeners(s,...d){const a=this.eventHandlers.get(s);a&&a.notify(...d)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,d=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fV(s),this.instance=s;const{layoutId:a,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),d&&(c||a)&&(this.isLayoutDirty=!0),e){let l;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,l&&l(),l=cV(f,250),Oh.hasAnimatedSinceResize&&(Oh.hasAnimatedSinceResize=!1,this.nodes.forEach(pC))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||TV,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),S=!this.targetLayout||!z0(this.targetLayout,p)||h,E=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||E||f&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(l,E);const v={...AA(g,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v)}else f||pC(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Bo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(CV),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const l=this.path[u];l.shouldResetTransform=!0,l.updateScroll("snapshot"),l.options.layoutRoot&&l.willUpdate(!1)}const{layoutId:d,layout:a}=this.options;if(d===void 0&&!a)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(hC);return}this.isUpdating||this.nodes.forEach(wV),this.isUpdating=!1,this.nodes.forEach(SV),this.nodes.forEach(gV),this.nodes.forEach(mV),this.clearAllSnapshots();const d=performance.now();Yt.delta=ja(0,1e3/60,d-Yt.timestamp),Yt.timestamp=d,Yt.isProcessing=!0,pu.update.process(Yt),pu.preRender.process(Yt),pu.render.process(Yt),Yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(bV),this.sharedNodes.forEach(kV)}scheduleUpdateProjection(){Kt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Kt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let a=0;a<this.path.length;a++)this.path[a].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=fn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let d=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(d=!1),d&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,d=this.projectionDelta&&!VA(this.projectionDelta),a=this.getTransformTemplate(),c=a?a(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(d||ds(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const d=this.measurePageBox();let a=this.removeElementScroll(d);return s&&(a=this.removeTransform(a)),AV(a),{animationId:this.root.animationId,measuredBox:d,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return fn();const d=s.measureViewportBox(),{scroll:a}=this.root;return a&&(pa(d.x,a.offset.x),pa(d.y,a.offset.y)),d}removeElementScroll(s){const d=fn();Gr(d,s);for(let a=0;a<this.path.length;a++){const c=this.path[a],{scroll:u,options:l}=c;if(c!==this.root&&u&&l.layoutScroll){if(u.isRoot){Gr(d,s);const{scroll:f}=this.root;f&&(pa(d.x,-f.offset.x),pa(d.y,-f.offset.y))}pa(d.x,u.offset.x),pa(d.y,u.offset.y)}}return d}applyTransform(s,d=!1){const a=fn();Gr(a,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!d&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Xl(a,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ds(u.latestValues)&&Xl(a,u.latestValues)}return ds(this.latestValues)&&Xl(a,this.latestValues),a}removeTransform(s){const d=fn();Gr(d,s);for(let a=0;a<this.path.length;a++){const c=this.path[a];if(!c.instance||!ds(c.latestValues))continue;D0(c.latestValues)&&c.updateSnapshot();const u=fn(),l=c.measurePageBox();Gr(u,l),sC(d,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ds(this.latestValues)&&sC(d,this.latestValues),d}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:l,layoutId:f}=this.options;if(!(!this.layout||!(l||f))){if(this.resolvedRelativeTargetAt=Yt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=fn(),this.relativeTargetOrigin=fn(),Zc(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Gr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=fn(),this.targetWithTransforms=fn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),L9(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Gr(this.target,this.layout.layoutBox),DA(this.target,this.targetDelta)):Gr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=fn(),this.relativeTargetOrigin=fn(),Zc(this.relativeTargetOrigin,this.target,h.target),Gr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}fs.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||D0(this.parent.latestValues)||FA(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const d=this.getLead(),a=!!this.resumingFrom||this!==d;let c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Yt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||l))return;Gr(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;j9(this.layoutCorrected,this.treeScale,this.path,a),d.layout&&!d.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(d.target=d.layout.layoutBox);const{target:p}=d;if(!p){this.projectionTransform&&(this.projectionDelta=Yl(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Yl(),this.projectionDeltaWithTransform=Yl());const g=this.projectionTransform;Xc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),this.projectionTransform=cC(this.projectionDelta,this.treeScale),(this.projectionTransform!==g||this.treeScale.x!==f||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),fs.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const d=this.getStack();d&&d.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,d=!1){const a=this.snapshot,c=a?a.latestValues:{},u={...this.latestValues},l=Yl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const f=fn(),h=a?a.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,y=this.getStack(),x=!y||y.members.length<=1,S=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some($V));this.animationProgress=0;let E;this.mixTargetDelta=v=>{const w=v/1e3;gC(l.x,s.x,w),gC(l.y,s.y,w),this.setTargetDelta(l),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),EV(this.relativeTarget,this.relativeTargetOrigin,f,w),E&&z0(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=fn()),Gr(E,this.relativeTarget)),g&&(this.animationValues=u,tV(u,c,this.latestValues,w,S,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Bo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Kt.update(()=>{Oh.hasAnimatedSinceResize=!0,this.currentAnimation=hV(0,fC,{...s,onUpdate:d=>{this.mixTargetDelta(d),s.onUpdate&&s.onUpdate(d)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fC),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:d,target:a,layout:c,latestValues:u}=s;if(!(!d||!a||!c)){if(this!==s&&this.layout&&c&&UA(this.options.animationType,this.layout.layoutBox,c.layoutBox)){a=this.target||fn();const l=Lr(this.layout.layoutBox.x);a.x.min=s.target.x.min,a.x.max=a.x.min+l;const f=Lr(this.layout.layoutBox.y);a.y.min=s.target.y.min,a.y.max=a.y.min+f}Gr(d,a),Xl(d,u),Xc(this.projectionDeltaWithTransform,this.layoutCorrected,d,u)}}registerSharedNode(s,d){this.sharedNodes.has(s)||this.sharedNodes.set(s,new sV),this.sharedNodes.get(s).add(d);const c=d.options.initialPromotionConfig;d.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(d):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:d}=this.options;return d?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:d}=this.options;return d?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:d,preserveFollowOpacity:a}={}){const c=this.getStack();c&&c.promote(this,a),s&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let d=!1;const{latestValues:a}=s;if((a.rotate||a.rotateX||a.rotateY||a.rotateZ)&&(d=!0),!d)return;const c={};for(let u=0;u<dC.length;u++){const l="rotate"+dC[u];a[l]&&(c[l]=a[l],s.setStaticValue(l,0))}s.render();for(const u in c)s.setStaticValue(u,c[u]);s.scheduleRender()}getProjectionStyles(s={}){var d,a;const c={};if(!this.instance||this.isSVG)return c;if(this.isVisible)c.visibility="";else return{visibility:"hidden"};const u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Ih(s.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Ih(s.pointerEvents)||""),this.hasProjected&&!ds(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const f=l.animationValues||l.latestValues;this.applyTransformsToTarget(),c.transform=cC(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:h,y:p}=this.projectionDelta;c.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,l.animationValues?c.opacity=l===this?(a=(d=f.opacity)!==null&&d!==void 0?d:this.latestValues.opacity)!==null&&a!==void 0?a:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=l===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in Rp){if(f[g]===void 0)continue;const{correct:y,applyTo:x}=Rp[g],S=c.transform==="none"?f[g]:y(f[g],l);if(x){const E=x.length;for(let v=0;v<E;v++)c[x[v]]=S}else c[g]=S}return this.options.layoutId&&(c.pointerEvents=l===this?Ih(s.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var d;return(d=s.currentAnimation)===null||d===void 0?void 0:d.stop()}),this.root.nodes.forEach(hC),this.root.sharedNodes.clear()}}}function gV(e){e.updateLayout()}function mV(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?ji(l=>{const f=s?n.measuredBox[l]:n.layoutBox[l],h=Lr(f);f.min=r[l].min,f.max=f.min+h}):UA(o,n.layoutBox,r)&&ji(l=>{const f=s?n.measuredBox[l]:n.layoutBox[l],h=Lr(r[l]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[l].max=e.relativeTarget[l].min+h)});const d=Yl();Xc(d,r,n.layoutBox);const a=Yl();s?Xc(a,e.applyTransform(i,!0),n.measuredBox):Xc(a,r,n.layoutBox);const c=!VA(d);let u=!1;if(!e.resumeFrom){const l=e.getClosestProjectingParent();if(l&&!l.resumeFrom){const{snapshot:f,layout:h}=l;if(f&&h){const p=fn();Zc(p,n.layoutBox,f.layoutBox);const g=fn();Zc(g,r,h.layoutBox),z0(p,g)||(u=!0),l.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,e.relativeParent=l)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:a,layoutDelta:d,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vV(e){fs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function yV(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function bV(e){e.clearSnapshot()}function hC(e){e.clearMeasurements()}function wV(e){e.isLayoutDirty=!1}function SV(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function pC(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xV(e){e.resolveTargetDelta()}function _V(e){e.calcProjection()}function CV(e){e.resetRotation()}function kV(e){e.removeLeadSnapshot()}function gC(e,t,n){e.translate=Zt(t.translate,0,n),e.scale=Zt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function mC(e,t,n,r){e.min=Zt(t.min,n.min,r),e.max=Zt(t.max,n.max,r)}function EV(e,t,n,r){mC(e.x,t.x,n.x,r),mC(e.y,t.y,n.y,r)}function $V(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const TV={duration:.45,ease:[.4,0,.1,1]};function vC(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function AV(e){vC(e.x),vC(e.y)}function UA(e,t,n){return e==="position"||e==="preserve-aspect"&&!O0(uC(t),uC(n),.2)}const MV=WA({attachResizeListener:(e,t)=>Ao(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hv={current:void 0},GA=WA({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Hv.current){const e=new MV({});e.mount(window),e.setOptions({layoutScroll:!0}),Hv.current=e}return Hv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),LV={pan:{Feature:q9},drag:{Feature:K9,ProjectionNode:GA,MeasureLayout:jA}},RV=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function PV(e){const t=RV.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function j0(e,t,n=1){const[r,i]=PV(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():$0(i)?j0(i,t,n+1):i}function IV(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!$0(o))return;const s=j0(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!$0(o))continue;const s=j0(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const OV=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),KA=e=>OV.has(e),FV=e=>Object.keys(e).some(KA),yC=e=>e===qs||e===Je,bC=(e,t)=>parseFloat(e.split(", ")[t]),wC=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return bC(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?bC(o[1],e):0}},DV=new Set(["x","y","z"]),NV=Zd.filter(e=>!DV.has(e));function zV(e){const t=[];return NV.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.render(),t}const SC={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:wC(4,13),y:wC(5,14)},jV=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,d={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{d[c]=SC[c](r,o)}),t.render();const a=t.measureViewportBox();return n.forEach(c=>{const u=t.getValue(c);u&&u.jump(d[c]),e[c]=SC[c](a,o)}),e},BV=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(KA);let o=[],s=!1;const d=[];if(i.forEach(a=>{const c=e.getValue(a);if(!e.hasValue(a))return;let u=n[a],l=hc(u);const f=t[a];let h;if(Ip(f)){const p=f.length,g=f[0]===null?1:0;u=f[g],l=hc(u);for(let y=g;y<p&&f[y]!==null;y++)h?tw(hc(f[y])===h):h=hc(f[y])}else h=hc(f);if(l!==h)if(yC(l)&&yC(h)){const p=c.get();typeof p=="string"&&c.set(parseFloat(p)),typeof f=="string"?t[a]=parseFloat(f):Array.isArray(f)&&h===Je&&(t[a]=f.map(parseFloat))}else l!=null&&l.transform&&(h!=null&&h.transform)&&(u===0||f===0)?u===0?c.set(h.transform(u)):t[a]=l.transform(f):(s||(o=zV(e),s=!0),d.push(a),r[a]=r[a]!==void 0?r[a]:t[a],c.jump(f))}),d.length){const a=d.indexOf("height")>=0?window.pageYOffset:null,c=jV(t,e,d);return o.length&&o.forEach(([u,l])=>{e.getValue(u).set(l)}),e.render(),Xg&&a!==null&&window.scrollTo({top:a}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function HV(e,t,n,r){return FV(t)?BV(e,t,n,r):{target:t,transitionEnd:r}}const VV=(e,t,n,r)=>{const i=IV(e,t,r);return t=i.target,r=i.transitionEnd,HV(e,t,n,r)},B0={current:null},qA={current:!1};function WV(){if(qA.current=!0,!!Xg)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>B0.current=e.matches;e.addListener(t),t()}else B0.current=!1}function UV(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(br(o))e.addValue(i,o),Np(r)&&r.add(i);else if(br(s))e.addValue(i,Ru(o,{owner:e})),Np(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const d=e.getValue(i);!d.hasAnimated&&d.set(o)}else{const d=e.getStaticValue(i);e.addValue(i,Ru(d!==void 0?d:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const xC=new WeakMap,YA=Object.keys(Ed),GV=YA.length,_C=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],KV=U1.length;class qV{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Kt.render(this.render,!1,!0);const{latestValues:d,renderState:a}=o;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=a,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=Qg(n),this.isVariantNode=RT(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(n,{});for(const l in u){const f=u[l];d[l]!==void 0&&br(f)&&(f.set(d[l],!1),Np(c)&&c.add(l))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,xC.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),qA.current||WV(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:B0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){xC.delete(this.current),this.projection&&this.projection.unmount(),Bo(this.notifyUpdate),Bo(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Ks.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Kt.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,d;for(let a=0;a<GV;a++){const c=YA[a],{isEnabled:u,Feature:l,ProjectionNode:f,MeasureLayout:h}=Ed[c];f&&(s=f),u(n)&&(!this.features[c]&&l&&(this.features[c]=new l(this)),h&&(d=h))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:a,layout:c,drag:u,dragConstraints:l,layoutScroll:f,layoutRoot:h}=n;this.projection.setOptions({layoutId:a,layout:c,alwaysMeasureLayout:!!u||l&&Kl(l),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return d}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):fn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<_C.length;r++){const i=_C[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=UV(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<KV;r++){const i=U1[r],o=this.props[i];(kd(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ru(n,{owner:this}),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=ew(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!br(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new uw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class XA extends qV{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=h9(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){d9(this,r,s);const d=VV(this,r,s,n);n=d.transitionEnd,r=d.target}return{transition:t,transitionEnd:n,...r}}}function YV(e){return window.getComputedStyle(e)}class XV extends XA{readValueFromInstance(t,n){if(Ks.has(n)){const r=ow(n);return r&&r.default||0}else{const r=YV(t),i=(FT(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return NA(t,n)}build(t,n,r,i){q1(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return J1(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;br(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){HT(t,n,r,i)}}class ZV extends XA{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ks.has(n)){const r=ow(n);return r&&r.default||0}return n=VT.has(n)?n:Q1(n),t.getAttribute(n)}measureInstanceViewportBox(){return fn()}scrapeMotionValuesFromProps(t,n){return UT(t,n)}build(t,n,r,i){X1(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){WT(t,n,r,i)}mount(t){this.isSVGTag=Z1(t.tagName),super.mount(t)}}const QV=(e,t)=>K1(e)?new ZV(t,{enableHardwareAcceleration:!1}):new XV(t,{enableHardwareAcceleration:!0}),JV={layout:{ProjectionNode:GA,MeasureLayout:jA}},e7={...$9,...qB,...LV,...JV},Uu=nB((e,t)=>LB(e,t,e7,QV));function ZA(){const e=F.useRef(!1);return Lp(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function t7(){const e=ZA(),[t,n]=F.useState(0),r=F.useCallback(()=>{e.current&&n(t+1)},[t]);return[F.useCallback(()=>Kt.postRender(r),[r]),t]}class n7 extends F.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 r7({children:e,isPresent:t}){const n=F.useId(),r=F.useRef(null),i=F.useRef({width:0,height:0,top:0,left:0});return F.useInsertionEffect(()=>{const{width:o,height:s,top:d,left:a}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${o}px !important;
height: ${s}px !important;
top: ${d}px !important;
left: ${a}px !important;
}
`),()=>{document.head.removeChild(c)}},[t]),F.createElement(n7,{isPresent:t,childRef:r,sizeRef:i},F.cloneElement(e,{ref:r}))}const Vv=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const d=GT(i7),a=F.useId(),c=F.useMemo(()=>({id:a,initial:t,isPresent:n,custom:i,onExitComplete:u=>{d.set(u,!0);for(const l of d.values())if(!l)return;r&&r()},register:u=>(d.set(u,!1),()=>d.delete(u))}),o?void 0:[n]);return F.useMemo(()=>{d.forEach((u,l)=>d.set(l,!1))},[n]),F.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),s==="popLayout"&&(e=F.createElement(r7,{isPresent:n},e)),F.createElement(Xd.Provider,{value:c},e)};function i7(){return new Map}function o7(e){return F.useEffect(()=>()=>e(),[])}const Al=e=>e.key||"";function a7(e,t){e.forEach(n=>{const r=Al(n);t.set(r,n)})}function s7(e){const t=[];return F.Children.forEach(e,n=>{F.isValidElement(n)&&t.push(n)}),t}const tf=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{const d=F.useContext(G1).forceRender||t7()[0],a=ZA(),c=s7(e);let u=c;const l=F.useRef(new Map).current,f=F.useRef(u),h=F.useRef(new Map).current,p=F.useRef(!0);if(Lp(()=>{p.current=!1,a7(c,h),f.current=u}),o7(()=>{p.current=!0,h.clear(),l.clear()}),p.current)return F.createElement(F.Fragment,null,u.map(S=>F.createElement(Vv,{key:Al(S),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},S)));u=[...u];const g=f.current.map(Al),y=c.map(Al),x=g.length;for(let S=0;S<x;S++){const E=g[S];y.indexOf(E)===-1&&!l.has(E)&&l.set(E,void 0)}return s==="wait"&&l.size&&(u=[]),l.forEach((S,E)=>{if(y.indexOf(E)!==-1)return;const v=h.get(E);if(!v)return;const w=g.indexOf(E);let b=S;if(!b){const m=()=>{h.delete(E),l.delete(E);const $=f.current.findIndex(A=>A.key===E);if(f.current.splice($,1),!l.size){if(f.current=c,a.current===!1)return;d(),r&&r()}};b=F.createElement(Vv,{key:Al(v),isPresent:!1,onExitComplete:m,custom:t,presenceAffectsLayout:o,mode:s},v),l.set(E,b)}u.splice(w,0,b)}),u=u.map(S=>{const E=S.key;return l.has(E)?S:F.createElement(Vv,{key:Al(S),isPresent:!0,presenceAffectsLayout:o,mode:s},S)}),F.createElement(F.Fragment,null,l.size?u:u.map(S=>F.cloneElement(S)))};var l7={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]}}},QA=F.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:s="bottom",duration:d=5e3,containerStyle:a,motionVariants:c=l7,toastSpacing:u="0.5rem"}=e,[l,f]=F.useState(d),h=Y9();Mp(()=>{h||r==null||r()},[h]),Mp(()=>{f(d)},[d]);const p=()=>f(null),g=()=>f(d),y=()=>{h&&i()};F.useEffect(()=>{h&&o&&i()},[h,o,i]),Kj(y,l);const x=F.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:u,...a}),[a,u]),S=F.useMemo(()=>Uj(s),[s]);return j.jsx(Uu.div,{layout:!0,className:"chakra-toast",variants:c,initial:"initial",animate:"animate",exit:"exit",onHoverStart:p,onHoverEnd:g,custom:{position:s},style:S,children:j.jsx(qe.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:x,children:Ki(n,{id:t,onClose:y})})})});QA.displayName="ToastComponent";function u7(e,t){var n;const r=e??"bottom",o={"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"}}[r];return(n=o==null?void 0:o[t])!=null?n:r}var CC={path:j.jsxs("g",{stroke:"currentColor",strokeWidth:"1.5",children:[j.jsx("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"}),j.jsx("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),j.jsx("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},Ys=vt((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:s,className:d,__css:a,...c}=e,u=wt("chakra-icon",d),l=Yd("Icon",e),f={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...a,...l},h={ref:t,focusable:o,className:u,__css:f},p=r??CC.viewBox;if(n&&typeof n!="string")return j.jsx(qe.svg,{as:n,...h,...c});const g=s??CC.path;return j.jsx(qe.svg,{verticalAlign:"middle",viewBox:p,...h,...c,children:g})});Ys.displayName="Icon";function c7(e){return j.jsx(Ys,{viewBox:"0 0 24 24",...e,children:j.jsx("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 d7(e){return j.jsx(Ys,{viewBox:"0 0 24 24",...e,children:j.jsx("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 kC(e){return j.jsx(Ys,{viewBox:"0 0 24 24",...e,children:j.jsx("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 f7=Gd({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),cw=vt((e,t)=>{const n=Yd("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:s="transparent",className:d,...a}=Or(e),c=wt("chakra-spinner",d),u={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:s,borderLeftColor:s,animation:`${f7} ${o} linear infinite`,...n};return j.jsx(qe.div,{ref:t,__css:u,className:c,...a,children:r&&j.jsx(qe.span,{srOnly:!0,children:r})})});cw.displayName="Spinner";var[h7,dw]=bn({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[p7,fw]=bn({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),JA={info:{icon:d7,colorScheme:"blue"},warning:{icon:kC,colorScheme:"orange"},success:{icon:c7,colorScheme:"green"},error:{icon:kC,colorScheme:"red"},loading:{icon:cw,colorScheme:"blue"}};function g7(e){return JA[e].colorScheme}function m7(e){return JA[e].icon}var e3=vt(function(t,n){const r=fw(),{status:i}=dw(),o={display:"inline",...r.description};return j.jsx(qe.div,{ref:n,"data-status":i,...t,className:wt("chakra-alert__desc",t.className),__css:o})});e3.displayName="AlertDescription";function t3(e){const{status:t}=dw(),n=m7(t),r=fw(),i=t==="loading"?r.spinner:r.icon;return j.jsx(qe.span,{display:"inherit","data-status":t,...e,className:wt("chakra-alert__icon",e.className),__css:i,children:e.children||j.jsx(n,{h:"100%",w:"100%"})})}t3.displayName="AlertIcon";var n3=vt(function(t,n){const r=fw(),{status:i}=dw();return j.jsx(qe.div,{ref:n,"data-status":i,...t,className:wt("chakra-alert__title",t.className),__css:r.title})});n3.displayName="AlertTitle";var r3=vt(function(t,n){var r;const{status:i="info",addRole:o=!0,...s}=Or(t),d=(r=t.colorScheme)!=null?r:g7(i),a=no("Alert",{...t,colorScheme:d}),c={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...a.container};return j.jsx(h7,{value:{status:i},children:j.jsx(p7,{value:a,children:j.jsx(qe.div,{"data-status":i,role:o?"alert":void 0,ref:n,...s,className:wt("chakra-alert",t.className),__css:c})})})});r3.displayName="Alert";function v7(e){return j.jsx(Ys,{focusable:"false","aria-hidden":!0,...e,children:j.jsx("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 i3=vt(function(t,n){const r=Yd("CloseButton",t),{children:i,isDisabled:o,__css:s,...d}=Or(t),a={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return j.jsx(qe.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...a,...r,...s},...d,children:i||j.jsx(v7,{width:"1em",height:"1em"})})});i3.displayName="CloseButton";var y7={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},Ui=b7(y7);function b7(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(s=>({...s,[o]:s[o].filter(d=>d.id!=i)}))},notify:(i,o)=>{const s=w7(i,o),{position:d,id:a}=s;return r(c=>{var u,l;const h=d.includes("top")?[s,...(u=c[d])!=null?u:[]]:[...(l=c[d])!=null?l:[],s];return{...c,[d]:h}}),a},update:(i,o)=>{i&&r(s=>{const d={...s},{position:a,index:c}=w_(d,i);return a&&c!==-1&&(d[a][c]={...d[a][c],...o,message:o3(o)}),d})},closeAll:({positions:i}={})=>{r(o=>(i??["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((a,c)=>(a[c]=o[c].map(u=>({...u,requestClose:!0})),a),{...o}))},close:i=>{r(o=>{const s=AT(o,i);return s?{...o,[s]:o[s].map(d=>d.id==i?{...d,requestClose:!0}:d)}:o})},isActive:i=>!!w_(Ui.getState(),i).position}}var EC=0;function w7(e,t={}){var n,r;EC+=1;const i=(n=t.id)!=null?n:EC,o=(r=t.position)!=null?r:"bottom";return{id:i,message:e,position:o,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>Ui.removeToast(String(i),o),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var S7=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:s,description:d,colorScheme:a,icon:c}=e,u=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return j.jsxs(r3,{addRole:!1,status:t,variant:n,id:u==null?void 0:u.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",colorScheme:a,children:[j.jsx(t3,{children:c}),j.jsxs(qe.div,{flex:"1",maxWidth:"100%",children:[i&&j.jsx(n3,{id:u==null?void 0:u.title,children:i}),d&&j.jsx(e3,{id:u==null?void 0:u.description,display:"block",children:d})]}),o&&j.jsx(i3,{size:"sm",onClick:s,position:"absolute",insetEnd:1,top:1})]})};function o3(e={}){const{render:t,toastComponent:n=S7}=e;return i=>typeof t=="function"?t({...i,...e}):j.jsx(n,{...i,...e})}function x7(e,t){const n=i=>{var o;return{...t,...i,position:u7((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),s=o3(o);return Ui.notify(s,o)};return r.update=(i,o)=>{Ui.update(i,n(o))},r.promise=(i,o)=>{const s=r({...o.loading,status:"loading",duration:null});i.then(d=>r.update(s,{status:"success",duration:5e3,...Ki(o.success,d)})).catch(d=>r.update(s,{status:"error",duration:5e3,...Ki(o.error,d)}))},r.closeAll=Ui.closeAll,r.close=Ui.close,r.isActive=Ui.isActive,r}var[_7,C7]=bn({name:"ToastOptionsContext",strict:!1}),k7=e=>{const t=F.useSyncExternalStore(Ui.subscribe,Ui.getState,Ui.getState),{motionVariants:n,component:r=QA,portalProps:i}=e,s=Object.keys(t).map(d=>{const a=t[d];return j.jsx("div",{role:"region","aria-live":"polite",id:`chakra-toast-manager-${d}`,style:Gj(d),children:j.jsx(tf,{initial:!1,children:a.map(c=>j.jsx(r,{motionVariants:n,...c},c.id))})},d)});return j.jsx(Kd,{...i,children:s})};function E7(e){const{theme:t}=G$(),n=C7();return F.useMemo(()=>x7(t.direction,{...n,...e}),[e,t.direction,n])}var $7=e=>function({children:n,theme:r=e,toastOptions:i,...o}){return j.jsxs(Vj,{theme:r,...o,children:[j.jsx(_7,{value:i==null?void 0:i.defaultOptions,children:n}),j.jsx(k7,{...i})]})},nf=$7(wT),T7=Object.defineProperty,A7=(e,t,n)=>t in e?T7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tn=(e,t,n)=>(A7(e,typeof t!="symbol"?t+"":t,n),n);function $C(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 M7=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function TC(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function AC(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var H0=typeof window<"u"?F.useLayoutEffect:F.useEffect,jp=e=>e,L7=class{constructor(){tn(this,"descendants",new Map),tn(this,"register",e=>{if(e!=null)return M7(e)?this.registerNode(e):t=>{this.registerNode(t,e)}}),tn(this,"unregister",e=>{this.descendants.delete(e);const t=$C(Array.from(this.descendants.keys()));this.assignIndex(t)}),tn(this,"destroy",()=>{this.descendants.clear()}),tn(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})}),tn(this,"count",()=>this.descendants.size),tn(this,"enabledCount",()=>this.enabledValues().length),tn(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index)),tn(this,"enabledValues",()=>this.values().filter(e=>!e.disabled)),tn(this,"item",e=>{if(this.count()!==0)return this.values()[e]}),tn(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]}),tn(this,"first",()=>this.item(0)),tn(this,"firstEnabled",()=>this.enabledItem(0)),tn(this,"last",()=>this.item(this.descendants.size-1)),tn(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)}),tn(this,"indexOf",e=>{var t,n;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1}),tn(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e))),tn(this,"next",(e,t=!0)=>{const n=TC(e,this.count(),t);return this.item(n)}),tn(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=TC(r,this.enabledCount(),t);return this.enabledItem(i)}),tn(this,"prev",(e,t=!0)=>{const n=AC(e,this.count()-1,t);return this.item(n)}),tn(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=AC(r,this.enabledCount()-1,t);return this.enabledItem(i)}),tn(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=$C(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function R7(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 vr(...e){return t=>{e.forEach(n=>{R7(n,t)})}}function P7(...e){return F.useMemo(()=>vr(...e),e)}function I7(){const e=F.useRef(new L7);return H0(()=>()=>e.current.destroy()),e.current}var[O7,a3]=bn({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function F7(e){const t=a3(),[n,r]=F.useState(-1),i=F.useRef(null);H0(()=>()=>{i.current&&t.unregister(i.current)},[]),H0(()=>{if(!i.current)return;const s=Number(i.current.dataset.index);n!=s&&!Number.isNaN(s)&&r(s)});const o=jp(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:vr(o,i)}}function D7(){return[jp(O7),()=>jp(a3()),()=>I7(),i=>F7(i)]}function N7(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(f,h)=>f!==h}=e,o=Qn(r),s=Qn(i),[d,a]=F.useState(n),c=t!==void 0,u=c?t:d,l=Qn(f=>{const p=typeof f=="function"?f(u):f;s(u,p)&&(c||a(p),o(p))},[c,o,u,s]);return[u,l]}var MC={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},Rs={enter:{duration:.2,ease:MC.easeOut},exit:{duration:.1,ease:MC.easeIn}},Ps={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},z7={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:Ps.enter(Rs.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:Ps.exit(Rs.exit,n),transitionEnd:t==null?void 0:t.exit}}},s3={initial:"exit",animate:"enter",exit:"exit",variants:z7},j7=F.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:s,transitionEnd:d,delay:a,...c}=t,u=i||r?"enter":"exit",l=r?i&&r:!0,f={transition:s,transitionEnd:d,delay:a};return j.jsx(tf,{custom:f,children:l&&j.jsx(Uu.div,{ref:n,className:wt("chakra-fade",o),custom:f,...s3,animate:u,...c})})});j7.displayName="Fade";var B7={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(o=n==null?void 0:n.exit)!=null?o:Ps.exit(Rs.exit,i)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:Ps.enter(Rs.enter,n),transitionEnd:e==null?void 0:e.enter}}},l3={initial:"exit",animate:"enter",exit:"exit",variants:B7},H7=F.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:s=.95,className:d,transition:a,transitionEnd:c,delay:u,...l}=t,f=r?i&&r:!0,h=i||r?"enter":"exit",p={initialScale:s,reverse:o,transition:a,transitionEnd:c,delay:u};return j.jsx(tf,{custom:p,children:f&&j.jsx(Uu.div,{ref:n,className:wt("chakra-offset-slide",d),...l3,animate:h,custom:p,...l})})});H7.displayName="ScaleFade";var V7={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,x:e,y:t,transition:(o=n==null?void 0:n.exit)!=null?o:Ps.exit(Rs.exit,i),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:Ps.enter(Rs.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{var s;const d={x:t,y:e};return{opacity:0,transition:(s=n==null?void 0:n.exit)!=null?s:Ps.exit(Rs.exit,o),...i?{...d,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...d,...r==null?void 0:r.exit}}}}},V0={initial:"initial",animate:"enter",exit:"exit",variants:V7},W7=F.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:s,offsetX:d=0,offsetY:a=8,transition:c,transitionEnd:u,delay:l,...f}=t,h=r?i&&r:!0,p=i||r?"enter":"exit",g={offsetX:d,offsetY:a,reverse:o,transition:c,transitionEnd:u,delay:l};return j.jsx(tf,{custom:g,children:h&&j.jsx(Uu.div,{ref:n,className:wt("chakra-offset-slide",s),custom:g,...V0,animate:p,...f})})});W7.displayName="SlideFade";function hw(e){return F.Children.toArray(e).filter(t=>F.isValidElement(t))}var[ine,U7]=bn({strict:!1,name:"ButtonGroupContext"});function G7(e){const[t,n]=F.useState(!e);return{ref:F.useCallback(o=>{o&&n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}function W0(e){const{children:t,className:n,...r}=e,i=F.isValidElement(t)?F.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=wt("chakra-button__icon",n);return j.jsx(qe.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o,children:i})}W0.displayName="ButtonIcon";function U0(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=j.jsx(cw,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:s,...d}=e,a=wt("chakra-button__spinner",o),c=n==="start"?"marginEnd":"marginStart",u=F.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[c]:t?r:0,fontSize:"1em",lineHeight:"normal",...s}),[s,t,c,r]);return j.jsx(qe.div,{className:a,...d,__css:u,children:i})}U0.displayName="ButtonSpinner";var pw=vt((e,t)=>{const n=U7(),r=Yd("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:s,children:d,leftIcon:a,rightIcon:c,loadingText:u,iconSpacing:l="0.5rem",type:f,spinner:h,spinnerPlacement:p="start",className:g,as:y,...x}=Or(e),S=F.useMemo(()=>{const b={...r==null?void 0: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:b}}},[r,n]),{ref:E,type:v}=G7(y),w={rightIcon:c,leftIcon:a,iconSpacing:l,children:d};return j.jsxs(qe.button,{ref:P7(t,E),as:y,type:f??v,"data-active":ht(s),"data-loading":ht(o),__css:S,className:wt("chakra-button",g),...x,disabled:i||o,children:[o&&p==="start"&&j.jsx(U0,{className:"chakra-button__spinner--start",label:u,placement:"start",spacing:l,children:h}),o?u||j.jsx(qe.span,{opacity:0,children:j.jsx(LC,{...w})}):j.jsx(LC,{...w}),o&&p==="end"&&j.jsx(U0,{className:"chakra-button__spinner--end",label:u,placement:"end",spacing:l,children:h})]})});pw.displayName="Button";function LC(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return j.jsxs(j.Fragment,{children:[t&&j.jsx(W0,{marginEnd:i,children:t}),r,n&&j.jsx(W0,{marginStart:i,children:n})]})}var[one,K7]=bn({name:"CheckboxGroupContext",strict:!1});function q7(e){const[t,n]=F.useState(e),[r,i]=F.useState(!1);return e!==t&&(i(!0),n(e)),r}function Y7(e){return j.jsx(qe.svg,{width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16},...e,children:j.jsx("polyline",{points:"1.5 6 4.5 9 10.5 1"})})}function X7(e){return j.jsx(qe.svg,{width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4},...e,children:j.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})})}function Z7(e){const{isIndeterminate:t,isChecked:n,...r}=e,i=t?X7:Y7;return n||t?j.jsx(qe.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:j.jsx(i,{...r})}):null}var[Q7,u3]=bn({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[J7,rf]=bn({strict:!1,name:"FormControlContext"});function eW(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...s}=e,d=F.useId(),a=t||`field-${d}`,c=`${a}-label`,u=`${a}-feedback`,l=`${a}-helptext`,[f,h]=F.useState(!1),[p,g]=F.useState(!1),[y,x]=F.useState(!1),S=F.useCallback((m={},$=null)=>({id:l,...m,ref:vr($,A=>{A&&g(!0)})}),[l]),E=F.useCallback((m={},$=null)=>({...m,ref:$,"data-focus":ht(y),"data-disabled":ht(i),"data-invalid":ht(r),"data-readonly":ht(o),id:m.id!==void 0?m.id:c,htmlFor:m.htmlFor!==void 0?m.htmlFor:a}),[a,i,y,r,o,c]),v=F.useCallback((m={},$=null)=>({id:u,...m,ref:vr($,A=>{A&&h(!0)}),"aria-live":"polite"}),[u]),w=F.useCallback((m={},$=null)=>({...m,...s,ref:$,role:"group"}),[s]),b=F.useCallback((m={},$=null)=>({...m,ref:$,role:"presentation","aria-hidden":!0,children:m.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!y,onFocus:()=>x(!0),onBlur:()=>x(!1),hasFeedbackText:f,setHasFeedbackText:h,hasHelpText:p,setHasHelpText:g,id:a,labelId:c,feedbackId:u,helpTextId:l,htmlProps:s,getHelpTextProps:S,getErrorMessageProps:v,getRootProps:w,getLabelProps:E,getRequiredIndicatorProps:b}}var Ml=vt(function(t,n){const r=no("Form",t),i=Or(t),{getRootProps:o,htmlProps:s,...d}=eW(i),a=wt("chakra-form-control",t.className);return j.jsx(J7,{value:d,children:j.jsx(Q7,{value:r,children:j.jsx(qe.div,{...o({},n),className:a,__css:r.container})})})});Ml.displayName="FormControl";var tW=vt(function(t,n){const r=rf(),i=u3(),o=wt("chakra-form__helper-text",t.className);return j.jsx(qe.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});tW.displayName="FormHelperText";var ca=vt(function(t,n){var r;const i=Yd("FormLabel",t),o=Or(t),{className:s,children:d,requiredIndicator:a=j.jsx(c3,{}),optionalIndicator:c=null,...u}=o,l=rf(),f=(r=l==null?void 0:l.getLabelProps(u,n))!=null?r:{ref:n,...u};return j.jsxs(qe.label,{...f,className:wt("chakra-form__label",o.className),__css:{display:"block",textAlign:"start",...i},children:[d,l!=null&&l.isRequired?a:c]})});ca.displayName="FormLabel";var c3=vt(function(t,n){const r=rf(),i=u3();if(!(r!=null&&r.isRequired))return null;const o=wt("chakra-form__required-indicator",t.className);return j.jsx(qe.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});c3.displayName="RequiredIndicator";function nW(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=gw(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Ro(n),"aria-required":Ro(i),"aria-readonly":Ro(r)}}function gw(e){var t,n,r;const i=rf(),{id:o,disabled:s,readOnly:d,required:a,isRequired:c,isInvalid:u,isReadOnly:l,isDisabled:f,onFocus:h,onBlur:p,...g}=e,y=e["aria-describedby"]?[e["aria-describedby"]]:[];return i!=null&&i.hasFeedbackText&&(i!=null&&i.isInvalid)&&y.push(i.feedbackId),i!=null&&i.hasHelpText&&y.push(i.helpTextId),{...g,"aria-describedby":y.join(" ")||void 0,id:o??(i==null?void 0:i.id),isDisabled:(t=s??f)!=null?t:i==null?void 0:i.isDisabled,isReadOnly:(n=d??l)!=null?n:i==null?void 0:i.isReadOnly,isRequired:(r=a??c)!=null?r:i==null?void 0:i.isRequired,isInvalid:u??(i==null?void 0:i.isInvalid),onFocus:ft(i==null?void 0:i.onFocus,h),onBlur:ft(i==null?void 0:i.onBlur,p)}}var rW={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},RC=!1,of=null,Hs=!1,G0=!1,K0=new Set;function mw(e,t){K0.forEach(n=>n(e,t))}var iW=typeof window<"u"&&window.navigator!=null?/^Mac/.test(window.navigator.platform):!1;function oW(e){return!(e.metaKey||!iW&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function PC(e){Hs=!0,oW(e)&&(of="keyboard",mw("keyboard",e))}function xl(e){if(of="pointer",e.type==="mousedown"||e.type==="pointerdown"){Hs=!0;const t=e.composedPath?e.composedPath()[0]:e.target;let n=!1;try{n=t.matches(":focus-visible")}catch{}if(n)return;mw("pointer",e)}}function aW(e){return e.mozInputSource===0&&e.isTrusted?!0:e.detail===0&&!e.pointerType}function sW(e){aW(e)&&(Hs=!0,of="virtual")}function lW(e){e.target===window||e.target===document||(!Hs&&!G0&&(of="virtual",mw("virtual",e)),Hs=!1,G0=!1)}function uW(){Hs=!1,G0=!0}function IC(){return of!=="pointer"}function cW(){if(typeof window>"u"||RC)return;const{focus:e}=HTMLElement.prototype;HTMLElement.prototype.focus=function(...n){Hs=!0,e.apply(this,n)},document.addEventListener("keydown",PC,!0),document.addEventListener("keyup",PC,!0),document.addEventListener("click",sW,!0),window.addEventListener("focus",lW,!0),window.addEventListener("blur",uW,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",xl,!0),document.addEventListener("pointermove",xl,!0),document.addEventListener("pointerup",xl,!0)):(document.addEventListener("mousedown",xl,!0),document.addEventListener("mousemove",xl,!0),document.addEventListener("mouseup",xl,!0)),RC=!0}function d3(e){cW(),e(IC());const t=()=>e(IC());return K0.add(t),()=>{K0.delete(t)}}function dW(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function f3(e={}){const t=gw(e),{isDisabled:n,isReadOnly:r,isRequired:i,isInvalid:o,id:s,onBlur:d,onFocus:a,"aria-describedby":c}=t,{defaultChecked:u,isChecked:l,isFocusable:f,onChange:h,isIndeterminate:p,name:g,value:y,tabIndex:x=void 0,"aria-label":S,"aria-labelledby":E,"aria-invalid":v,...w}=e,b=dW(w,["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),m=Qn(h),$=Qn(d),A=Qn(a),[C,k]=F.useState(!1),[I,L]=F.useState(!1),[T,R]=F.useState(!1),[P,D]=F.useState(!1);F.useEffect(()=>d3(k),[]);const N=F.useRef(null),[B,Z]=F.useState(!0),[U,X]=F.useState(!!u),W=l!==void 0,q=W?l:U,Q=F.useCallback(Ee=>{if(r||n){Ee.preventDefault();return}W||X(q?Ee.target.checked:p?!0:Ee.target.checked),m==null||m(Ee)},[r,n,q,W,p,m]);La(()=>{N.current&&(N.current.indeterminate=!!p)},[p]),Mp(()=>{n&&L(!1)},[n,L]),La(()=>{const Ee=N.current;Ee!=null&&Ee.form&&(Ee.form.onreset=()=>{X(!!u)})},[]);const G=n&&!f,oe=F.useCallback(Ee=>{Ee.key===" "&&D(!0)},[D]),ne=F.useCallback(Ee=>{Ee.key===" "&&D(!1)},[D]);La(()=>{if(!N.current)return;N.current.checked!==q&&X(N.current.checked)},[N.current]);const ce=F.useCallback((Ee={},Ae=null)=>{const Fe=Be=>{I&&Be.preventDefault(),D(!0)};return{...Ee,ref:Ae,"data-active":ht(P),"data-hover":ht(T),"data-checked":ht(q),"data-focus":ht(I),"data-focus-visible":ht(I&&C),"data-indeterminate":ht(p),"data-disabled":ht(n),"data-invalid":ht(o),"data-readonly":ht(r),"aria-hidden":!0,onMouseDown:ft(Ee.onMouseDown,Fe),onMouseUp:ft(Ee.onMouseUp,()=>D(!1)),onMouseEnter:ft(Ee.onMouseEnter,()=>R(!0)),onMouseLeave:ft(Ee.onMouseLeave,()=>R(!1))}},[P,q,n,I,C,T,p,o,r]),fe=F.useCallback((Ee={},Ae=null)=>({...b,...Ee,ref:vr(Ae,Fe=>{Fe&&Z(Fe.tagName==="LABEL")}),onClick:ft(Ee.onClick,()=>{var Fe;B||((Fe=N.current)==null||Fe.click(),requestAnimationFrame(()=>{var Be;(Be=N.current)==null||Be.focus({preventScroll:!0})}))}),"data-disabled":ht(n),"data-checked":ht(q),"data-invalid":ht(o)}),[b,n,q,o,B]),he=F.useCallback((Ee={},Ae=null)=>({...Ee,ref:vr(N,Ae),type:"checkbox",name:g,value:y,id:s,tabIndex:x,onChange:ft(Ee.onChange,Q),onBlur:ft(Ee.onBlur,$,()=>L(!1)),onFocus:ft(Ee.onFocus,A,()=>L(!0)),onKeyDown:ft(Ee.onKeyDown,oe),onKeyUp:ft(Ee.onKeyUp,ne),required:i,checked:q,disabled:G,readOnly:r,"aria-label":S,"aria-labelledby":E,"aria-invalid":v?!!v:o,"aria-describedby":c,"aria-disabled":n,style:rW}),[g,y,s,Q,$,A,oe,ne,i,q,G,r,S,E,v,o,c,n,x]),me=F.useCallback((Ee={},Ae=null)=>({...Ee,ref:Ae,onMouseDown:ft(Ee.onMouseDown,fW),"data-disabled":ht(n),"data-checked":ht(q),"data-invalid":ht(o)}),[q,n,o]);return{state:{isInvalid:o,isFocused:I,isChecked:q,isActive:P,isHovered:T,isIndeterminate:p,isDisabled:n,isReadOnly:r,isRequired:i},getRootProps:fe,getCheckboxProps:ce,getInputProps:he,getLabelProps:me,htmlProps:b}}function fW(e){e.preventDefault(),e.stopPropagation()}var hW={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},pW={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},gW=Gd({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),mW=Gd({from:{opacity:0},to:{opacity:1}}),vW=Gd({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),Mn=vt(function(t,n){const r=K7(),i={...r,...t},o=no("Checkbox",i),s=Or(t),{spacing:d="0.5rem",className:a,children:c,iconColor:u,iconSize:l,icon:f=j.jsx(Z7,{}),isChecked:h,isDisabled:p=r==null?void 0:r.isDisabled,onChange:g,inputProps:y,...x}=s;let S=h;r!=null&&r.value&&s.value&&(S=r.value.includes(s.value));let E=g;r!=null&&r.onChange&&s.value&&(E=K$(r.onChange,g));const{state:v,getInputProps:w,getCheckboxProps:b,getLabelProps:m,getRootProps:$}=f3({...x,isDisabled:p,isChecked:S,onChange:E}),A=q7(v.isChecked),C=F.useMemo(()=>({animation:A?v.isIndeterminate?`${mW} 20ms linear, ${vW} 200ms linear`:`${gW} 200ms linear`:void 0,fontSize:l,color:u,...o.icon}),[u,l,A,v.isIndeterminate,o.icon]),k=F.cloneElement(f,{__css:C,isIndeterminate:v.isIndeterminate,isChecked:v.isChecked});return j.jsxs(qe.label,{__css:{...pW,...o.container},className:wt("chakra-checkbox",a),...$(),children:[j.jsx("input",{className:"chakra-checkbox__input",...w(y,n)}),j.jsx(qe.span,{__css:{...hW,...o.control},className:"chakra-checkbox__control",...b(),children:k}),c&&j.jsx(qe.span,{className:"chakra-checkbox__label",...m(),__css:{marginStart:d,...o.label},children:c})]})});Mn.displayName="Checkbox";function yW(e){const t=parseFloat(e);return typeof t!="number"||Number.isNaN(t)?0:t}function h3(e,t){let n=yW(e);const r=10**(t??10);return n=Math.round(n*r)/r,t?n.toFixed(t):n.toString()}function OC(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 bW(e,t,n){return e==null?e:(n<t&&console.warn("clamp: max cannot be less than min"),Math.min(Math.max(e,t),n))}function wW(e={}){const{onChange:t,precision:n,defaultValue:r,value:i,step:o=1,min:s=Number.MIN_SAFE_INTEGER,max:d=Number.MAX_SAFE_INTEGER,keepWithinRange:a=!0}=e,c=Qn(t),[u,l]=F.useState(()=>{var C;return r==null?"":(C=Wv(r,o,n))!=null?C:""}),f=typeof i<"u",h=f?i:u,p=p3(da(h),o),g=n??p,y=F.useCallback(C=>{C!==h&&(f||l(C.toString()),c==null||c(C.toString(),da(C)))},[c,f,h]),x=F.useCallback(C=>{let k=C;return a&&(k=bW(k,s,d)),h3(k,g)},[g,a,d,s]),S=F.useCallback((C=o)=>{let k;h===""?k=da(C):k=da(h)+C,k=x(k),y(k)},[x,o,y,h]),E=F.useCallback((C=o)=>{let k;h===""?k=da(-C):k=da(h)-C,k=x(k),y(k)},[x,o,y,h]),v=F.useCallback(()=>{var C;let k;r==null?k="":k=(C=Wv(r,o,n))!=null?C:s,y(k)},[r,n,o,y,s]),w=F.useCallback(C=>{var k;const I=(k=Wv(C,o,g))!=null?k:s;y(I)},[g,o,y,s]),b=da(h);return{isOutOfRange:b>d||b<s,isAtMax:b===d,isAtMin:b===s,precision:g,value:h,valueAsNumber:b,update:y,reset:v,increment:S,decrement:E,clamp:x,cast:w,setValue:l}}function da(e){return parseFloat(e.toString().replace(/[^\w.-]+/g,""))}function p3(e,t){return Math.max(OC(t),OC(e))}function Wv(e,t,n){const r=da(e);if(Number.isNaN(r))return;const i=p3(r,t);return h3(r,n??i)}function SW(e,t,n,r){const i=Qn(n);return F.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==null||o.removeEventListener(t,i,r)}}function rm(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var g3={exports:{}},xW="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_W=xW,CW=_W;function m3(){}function v3(){}v3.resetWarningCache=m3;var kW=function(){function e(r,i,o,s,d,a){if(a!==CW){var c=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 c.name="Invariant Violation",c}}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:v3,resetWarningCache:m3};return n.PropTypes=n,n};g3.exports=kW();var im=g3.exports;const an=ki(im);var q0="data-focus-lock",y3="data-focus-lock-disabled",EW="data-no-focus-lock",$W="data-autofocus-inside",TW="data-no-autofocus";function AW(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function MW(e,t){var n=F.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 b3(e,t){return MW(t||null,function(n){return e.forEach(function(r){return AW(r,n)})})}var Uv={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Gi=function(){return Gi=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Gi.apply(this,arguments)};function w3(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);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function LW(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function S3(e){return e}function x3(e,t){t===void 0&&(t=S3);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 s=t(o,r);return n.push(s),function(){n=n.filter(function(d){return d!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(d){return o(d)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var d=n;n=[],d.forEach(o),s=n}var a=function(){var u=s;s=[],u.forEach(o)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(u){s.push(u),c()},filter:function(u){return s=s.filter(u),n}}}};return i}function vw(e,t){return t===void 0&&(t=S3),x3(e,t)}function _3(e){e===void 0&&(e={});var t=x3(null);return t.options=Gi({async:!0,ssr:!1},e),t}var C3=function(e){var t=e.sideCar,n=w3(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 F.createElement(r,Gi({},n))};C3.isSideCarExport=!0;function RW(e,t){return e.useMedium(t),C3}var k3=vw({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),E3=vw(),PW=vw(),IW=_3({async:!0}),OW=[],yw=F.forwardRef(function(t,n){var r,i=F.useState(),o=i[0],s=i[1],d=F.useRef(),a=F.useRef(!1),c=F.useRef(null),u=t.children,l=t.disabled,f=t.noFocusGuards,h=t.persistentFocus,p=t.crossFrame,g=t.autoFocus;t.allowTextSelection;var y=t.group,x=t.className,S=t.whiteList,E=t.hasPositiveIndices,v=t.shards,w=v===void 0?OW:v,b=t.as,m=b===void 0?"div":b,$=t.lockProps,A=$===void 0?{}:$,C=t.sideCar,k=t.returnFocus,I=t.focusOptions,L=t.onActivation,T=t.onDeactivation,R=F.useState({}),P=R[0],D=F.useCallback(function(){c.current=c.current||document&&document.activeElement,d.current&&L&&L(d.current),a.current=!0},[L]),N=F.useCallback(function(){a.current=!1,T&&T(d.current)},[T]);F.useEffect(function(){l||(c.current=null)},[]);var B=F.useCallback(function(oe){var ne=c.current;if(ne&&ne.focus){var ce=typeof k=="function"?k(ne):k;if(ce){var fe=typeof ce=="object"?ce:void 0;c.current=null,oe?Promise.resolve().then(function(){return ne.focus(fe)}):ne.focus(fe)}}},[k]),Z=F.useCallback(function(oe){a.current&&k3.useMedium(oe)},[]),U=E3.useMedium,X=F.useCallback(function(oe){d.current!==oe&&(d.current=oe,s(oe))},[]),W=ze((r={},r[y3]=l&&"disabled",r[q0]=y,r),A),q=f!==!0,Q=q&&f!=="tail",G=b3([n,X]);return F.createElement(F.Fragment,null,q&&[F.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:l?-1:0,style:Uv}),E?F.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:l?-1:1,style:Uv}):null],!l&&F.createElement(C,{id:P,sideCar:IW,observed:o,disabled:l,persistentFocus:h,crossFrame:p,autoFocus:g,whiteList:S,shards:w,onActivation:D,onDeactivation:N,returnFocus:B,focusOptions:I}),F.createElement(m,ze({ref:G},W,{className:x,onBlur:U,onFocus:Z}),u),Q&&F.createElement("div",{"data-focus-guard":!0,tabIndex:l?-1:0,style:Uv}))});yw.propTypes={};yw.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 $3=yw;function Bp(e,t){return Bp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Bp(e,t)}function bw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Bp(e,t)}function Vs(e){"@babel/helpers - typeof";return Vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}function FW(e,t){if(Vs(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Vs(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T3(e){var t=FW(e,"string");return Vs(t)==="symbol"?t:String(t)}function Zl(e,t,n){return t=T3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DW(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],s;function d(){s=e(o.map(function(c){return c.props})),t(s)}var a=function(c){bw(u,c);function u(){return c.apply(this,arguments)||this}u.peek=function(){return s};var l=u.prototype;return l.componentDidMount=function(){o.push(this),d()},l.componentDidUpdate=function(){d()},l.componentWillUnmount=function(){var h=o.indexOf(this);o.splice(h,1),d()},l.render=function(){return Le.createElement(i,this.props)},u}(F.PureComponent);return Zl(a,"displayName","SideEffect("+n(i)+")"),a}}var ro=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},Hp=function(e){return Array.isArray(e)?e:[e]},A3=function(e){return Array.isArray(e)?e[0]:e},NW=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},M3=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},L3=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},zW=function(e,t){return!e||L3(e)||!NW(e)&&t(M3(e))},R3=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=zW(t,R3.bind(void 0,e));return e.set(t,r),r},jW=function(e,t){return e&&!L3(e)?VW(e)?t(M3(e)):!1:!0},P3=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=jW(t,P3.bind(void 0,e));return e.set(t,r),r},I3=function(e){return e.dataset},BW=function(e){return e.tagName==="BUTTON"},O3=function(e){return e.tagName==="INPUT"},F3=function(e){return O3(e)&&e.type==="radio"},HW=function(e){return!((O3(e)||BW(e))&&(e.type==="hidden"||e.disabled))},VW=function(e){var t=e.getAttribute(TW);return![!0,"true",""].includes(t)},ww=function(e){var t;return!!(e&&(!((t=I3(e))===null||t===void 0)&&t.focusGuard))},Vp=function(e){return!ww(e)},WW=function(e){return!!e},UW=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},D3=function(e,t,n){return ro(e).map(function(r,i){return{node:r,index:i,tabIndex:n&&r.tabIndex===-1?(r.dataset||{}).focusGuard?0:-1:r.tabIndex}}).filter(function(r){return!t||r.tabIndex>=0}).sort(UW)},GW=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],Sw=GW.join(","),KW="".concat(Sw,", [data-focus-guard]"),N3=function(e,t){return ro((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?KW:Sw)?[r]:[],N3(r))},[])},qW=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?om([e.contentDocument.body],t):[e]},om=function(e,t){return e.reduce(function(n,r){var i,o=N3(r,t),s=(i=[]).concat.apply(i,o.map(function(d){return qW(d,t)}));return n.concat(s,r.parentNode?ro(r.parentNode.querySelectorAll(Sw)).filter(function(d){return d===r}):[])},[])},YW=function(e){var t=e.querySelectorAll("[".concat($W,"]"));return ro(t).map(function(n){return om([n])}).reduce(function(n,r){return n.concat(r)},[])},xw=function(e,t){return ro(e).filter(function(n){return R3(t,n)}).filter(function(n){return HW(n)})},FC=function(e,t){return t===void 0&&(t=new Map),ro(e).filter(function(n){return P3(t,n)})},Y0=function(e,t,n){return D3(xw(om(e,n),t),!0,n)},DC=function(e,t){return D3(xw(om(e),t),!1)},XW=function(e,t){return xw(YW(e),t)},gu=function(e,t){return e.shadowRoot?gu(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:ro(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var i=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return i?gu(i,t):!1}return gu(n,t)})},ZW=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(s,d){return!t.has(d)})},z3=function(e){return e.parentNode?z3(e.parentNode):e},_w=function(e){var t=Hp(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(q0);return n.push.apply(n,i?ZW(ro(z3(r).querySelectorAll("[".concat(q0,'="').concat(i,'"]:not([').concat(y3,'="disabled"])')))):[r]),n},[])},QW=function(e){try{return e()}catch{return}},Ad=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?Ad(t.shadowRoot):t instanceof HTMLIFrameElement&&QW(function(){return t.contentWindow.document})?Ad(t.contentWindow.document):t}},JW=function(e,t){return e===t},eU=function(e,t){return!!ro(e.querySelectorAll("iframe")).some(function(n){return JW(n,t)})},j3=function(e,t){return t===void 0&&(t=Ad(A3(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:_w(e).some(function(n){return gu(n,t)||eU(n,t)})},tU=function(e){e===void 0&&(e=document);var t=Ad(e);return t?ro(e.querySelectorAll("[".concat(EW,"]"))).some(function(n){return gu(n,t)}):!1},nU=function(e,t){return t.filter(F3).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},Cw=function(e,t){return F3(e)&&e.name?nU(e,t):e},rU=function(e){var t=new Set;return e.forEach(function(n){return t.add(Cw(n,e))}),e.filter(function(n){return t.has(n)})},NC=function(e){return e[0]&&e.length>1?Cw(e[0],e):e[0]},zC=function(e,t){return e.length>1?e.indexOf(Cw(e[t],e)):t},B3="NEW_FOCUS",iU=function(e,t,n,r){var i=e.length,o=e[0],s=e[i-1],d=ww(n);if(!(n&&e.indexOf(n)>=0)){var a=n!==void 0?t.indexOf(n):-1,c=r?t.indexOf(r):a,u=r?e.indexOf(r):-1,l=a-c,f=t.indexOf(o),h=t.indexOf(s),p=rU(t),g=n!==void 0?p.indexOf(n):-1,y=g-(r?p.indexOf(r):a),x=zC(e,0),S=zC(e,i-1);if(a===-1||u===-1)return B3;if(!l&&u>=0)return u;if(a<=f&&d&&Math.abs(l)>1)return S;if(a>=h&&d&&Math.abs(l)>1)return x;if(l&&Math.abs(y)>1)return u;if(a<=f)return S;if(a>h)return x;if(l)return Math.abs(l)>1?u:(i+u+l)%i}},oU=function(e){return function(t){var n,r=(n=I3(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},aU=function(e,t,n){var r=e.map(function(o){var s=o.node;return s}),i=FC(r.filter(oU(n)));return i&&i.length?NC(i):NC(FC(t))},X0=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&X0(e.parentNode.host||e.parentNode,t),t},Gv=function(e,t){for(var n=X0(e),r=X0(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},H3=function(e,t,n){var r=Hp(e),i=Hp(t),o=r[0],s=!1;return i.filter(Boolean).forEach(function(d){s=Gv(s||d,d)||s,n.filter(Boolean).forEach(function(a){var c=Gv(o,a);c&&(!s||gu(c,s)?s=c:s=Gv(c,s))})}),s},sU=function(e,t){return e.reduce(function(n,r){return n.concat(XW(r,t))},[])},lU=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(WW)},uU=function(e,t){var n=Ad(Hp(e).length>0?document:A3(e).ownerDocument),r=_w(e).filter(Vp),i=H3(n||e,e,r),o=new Map,s=DC(r,o),d=Y0(r,o).filter(function(h){var p=h.node;return Vp(p)});if(!(!d[0]&&(d=s,!d[0]))){var a=DC([i],o).map(function(h){var p=h.node;return p}),c=lU(a,d),u=c.map(function(h){var p=h.node;return p}),l=iU(u,a,n,t);if(l===B3){var f=aU(s,u,sU(r,o));if(f)return{node:f};console.warn("focus-lock: cannot find any node to move focus into");return}return l===void 0?l:c[l]}},cU=function(e){var t=_w(e).filter(Vp),n=H3(e,e,t),r=new Map,i=Y0([n],r,!0),o=Y0(t,r).filter(function(s){var d=s.node;return Vp(d)}).map(function(s){var d=s.node;return d});return i.map(function(s){var d=s.node,a=s.index;return{node:d,index:a,lockItem:o.indexOf(d)>=0,guard:ww(d)}})},dU=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},Kv=0,qv=!1,V3=function(e,t,n){n===void 0&&(n={});var r=uU(e,t);if(!qv&&r){if(Kv>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),qv=!0,setTimeout(function(){qv=!1},1);return}Kv++,dU(r.node,n.focusOptions),Kv--}};function W3(e){var t=window,n=t.setImmediate;typeof n<"u"?n(e):setTimeout(e,1)}var fU=function(){return document&&document.activeElement===document.body},hU=function(){return fU()||tU()},mu=null,Ql=null,vu=null,Md=!1,pU=function(){return!0},gU=function(t){return(mu.whiteList||pU)(t)},mU=function(t,n){vu={observerNode:t,portaledElement:n}},vU=function(t){return vu&&vu.portaledElement===t};function jC(e,t,n,r){var i=null,o=e;do{var s=r[o];if(s.guard)s.node.dataset.focusAutoGuard&&(i=s);else if(s.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var yU=function(t){return t&&"current"in t?t.current:t},bU=function(t){return t?!!Md:Md==="meanwhile"},wU=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},SU=function(t,n){return n.some(function(r){return wU(t,r,r)})},Wp=function(){var t=!1;if(mu){var n=mu,r=n.observed,i=n.persistentFocus,o=n.autoFocus,s=n.shards,d=n.crossFrame,a=n.focusOptions,c=r||vu&&vu.portaledElement,u=document&&document.activeElement;if(c){var l=[c].concat(s.map(yU).filter(Boolean));if((!u||gU(u))&&(i||bU(d)||!hU()||!Ql&&o)&&(c&&!(j3(l)||u&&SU(u,l)||vU(u))&&(document&&!Ql&&u&&!o?(u.blur&&u.blur(),document.body.focus()):(t=V3(l,Ql,{focusOptions:a}),vu={})),Md=!1,Ql=document&&document.activeElement),document){var f=document&&document.activeElement,h=cU(l),p=h.map(function(g){var y=g.node;return y}).indexOf(f);p>-1&&(h.filter(function(g){var y=g.guard,x=g.node;return y&&x.dataset.focusAutoGuard}).forEach(function(g){var y=g.node;return y.removeAttribute("tabIndex")}),jC(p,h.length,1,h),jC(p,-1,-1,h))}}}return t},U3=function(t){Wp()&&t&&(t.stopPropagation(),t.preventDefault())},kw=function(){return W3(Wp)},xU=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||mU(r,n)},_U=function(){return null},G3=function(){Md="just",setTimeout(function(){Md="meanwhile"},0)},CU=function(){document.addEventListener("focusin",U3),document.addEventListener("focusout",kw),window.addEventListener("blur",G3)},kU=function(){document.removeEventListener("focusin",U3),document.removeEventListener("focusout",kw),window.removeEventListener("blur",G3)};function EU(e){return e.filter(function(t){var n=t.disabled;return!n})}function $U(e){var t=e.slice(-1)[0];t&&!mu&&CU();var n=mu,r=n&&t&&t.id===n.id;mu=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Ql=null,(!r||n.observed!==t.observed)&&t.onActivation(),Wp(),W3(Wp)):(kU(),Ql=null)}k3.assignSyncMedium(xU);E3.assignMedium(kw);PW.assignMedium(function(e){return e({moveFocusInside:V3,focusInside:j3})});const TU=DW(EU,$U)(_U);var K3=F.forwardRef(function(t,n){return F.createElement($3,ze({sideCar:TU,ref:n},t))}),q3=$3.propTypes||{};q3.sideCar;rm(q3,["sideCar"]);K3.propTypes={};const BC=K3;function AU(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function MU(e){var t;if(!AU(e))return!1;const n=(t=e.ownerDocument.defaultView)!=null?t:window;return e instanceof n.HTMLElement}var LU=e=>e.hasAttribute("tabindex");function RU(e){return!!e.getAttribute("disabled")||!!e.getAttribute("aria-disabled")}function Y3(e){return e.parentElement&&Y3(e.parentElement)?!0:e.hidden}function PU(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function IU(e){if(!MU(e)||Y3(e)||RU(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]():PU(e)?!0:LU(e)}var OU=["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]"],FU=OU.join(),DU=e=>e.offsetWidth>0&&e.offsetHeight>0;function NU(e){const t=Array.from(e.querySelectorAll(FU));return t.unshift(e),t.filter(n=>IU(n)&&DU(n))}var HC,zU=(HC=BC.default)!=null?HC:BC,X3=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:s,autoFocus:d,persistentFocus:a,lockFocusAcrossFrames:c}=e,u=F.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&NU(r.current).length===0&&requestAnimationFrame(()=>{var p;(p=r.current)==null||p.focus()})},[t,r]),l=F.useCallback(()=>{var h;(h=n==null?void 0:n.current)==null||h.focus()},[n]),f=i&&!n;return j.jsx(zU,{crossFrame:c,persistentFocus:a,autoFocus:d,disabled:s,onActivation:u,onDeactivation:l,returnFocus:f,children:o})};X3.displayName="FocusLock";var jU=hj?F.useLayoutEffect:F.useEffect;function VC(e,t=[]){const n=F.useRef(e);return jU(()=>{n.current=e}),F.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function BU(e,t){const n=F.useId();return F.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function HU(e,t){const n=e!==void 0;return[n,n&&typeof e<"u"?e:t]}function Z3(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=VC(n),s=VC(t),[d,a]=F.useState(e.defaultIsOpen||!1),[c,u]=HU(r,d),l=BU(i,"disclosure"),f=F.useCallback(()=>{c||a(!1),s==null||s()},[c,s]),h=F.useCallback(()=>{c||a(!0),o==null||o()},[c,o]),p=F.useCallback(()=>{(u?f:h)()},[u,h,f]);return{isOpen:!!u,onOpen:h,onClose:f,onToggle:p,isControlled:c,getButtonProps:(g={})=>({...g,"aria-expanded":u,"aria-controls":l,onClick:yj(g.onClick,p)}),getDisclosureProps:(g={})=>({...g,hidden:!u,id:l})}}var[VU,WU]=bn({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),Z0=vt(function(t,n){const r=no("Input",t),{children:i,className:o,...s}=Or(t),d=wt("chakra-input__group",o),a={},c=hw(i),u=r.field;c.forEach(f=>{var h,p;r&&(u&&f.type.id==="InputLeftElement"&&(a.paddingStart=(h=u.height)!=null?h:u.h),u&&f.type.id==="InputRightElement"&&(a.paddingEnd=(p=u.height)!=null?p:u.h),f.type.id==="InputRightAddon"&&(a.borderEndRadius=0),f.type.id==="InputLeftAddon"&&(a.borderStartRadius=0))});const l=c.map(f=>{var h,p;const g=Aj({size:((h=f.props)==null?void 0:h.size)||t.size,variant:((p=f.props)==null?void 0:p.variant)||t.variant});return f.type.id!=="Input"?F.cloneElement(f,g):F.cloneElement(f,Object.assign(g,a,f.props))});return j.jsx(qe.div,{className:d,ref:n,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate"},"data-group":!0,...s,children:j.jsx(VU,{value:r,children:l})})});Z0.displayName="InputGroup";var UU=qe("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),am=vt(function(t,n){var r,i;const{placement:o="left",...s}=t,d=WU(),a=d.field,u={[o==="left"?"insetStart":"insetEnd"]:"0",width:(r=a==null?void 0:a.height)!=null?r:a==null?void 0:a.h,height:(i=a==null?void 0:a.height)!=null?i:a==null?void 0:a.h,fontSize:a==null?void 0:a.fontSize,...d.element};return j.jsx(UU,{ref:n,__css:u,...s})});am.id="InputElement";am.displayName="InputElement";var Q3=vt(function(t,n){const{className:r,...i}=t,o=wt("chakra-input__left-element",r);return j.jsx(am,{ref:n,placement:"left",className:o,...i})});Q3.id="InputLeftElement";Q3.displayName="InputLeftElement";var Up=vt(function(t,n){const{className:r,...i}=t,o=wt("chakra-input__right-element",r);return j.jsx(am,{ref:n,placement:"right",className:o,...i})});Up.id="InputRightElement";Up.displayName="InputRightElement";var Pu=vt(function(t,n){const{htmlSize:r,...i}=t,o=no("Input",i),s=Or(i),d=nW(s),a=wt("chakra-input",t.className);return j.jsx(qe.input,{size:r,...d,__css:o.field,ref:n,className:a})});Pu.displayName="Input";Pu.id="Input";function GU(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):mr(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var J3=e=>j.jsx(qe.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});J3.displayName="StackItem";function KU(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{"&":GU(n,i=>r[i])}}var Fh=vt((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:s="0.5rem",wrap:d,children:a,divider:c,className:u,shouldWrapChildren:l,...f}=e,h=n?"row":r??"column",p=F.useMemo(()=>KU({spacing:s,direction:h}),[s,h]),g=!!c,y=!l&&!g,x=F.useMemo(()=>{const E=hw(a);return y?E:E.map((v,w)=>{const b=typeof v.key<"u"?v.key:w,m=w+1===E.length,A=l?j.jsx(J3,{children:v},b):v;if(!g)return A;const C=F.cloneElement(c,{__css:p}),k=m?null:C;return j.jsxs(F.Fragment,{children:[A,k]},b)})},[c,p,g,y,l,a]),S=wt("chakra-stack",u);return j.jsx(qe.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:h,flexWrap:d,gap:g?void 0:s,className:S,...f,children:x})});Fh.displayName="Stack";function qU(){const e=F.useRef(new Map),t=e.current,n=F.useCallback((i,o,s,d)=>{e.current.set(s,{type:o,el:i,options:d}),i.addEventListener(o,s,d)},[]),r=F.useCallback((i,o,s,d)=>{i.removeEventListener(o,s,d),e.current.delete(s)},[]);return F.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function Yv(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function YU(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:s,onMouseUp:d,onClick:a,onKeyDown:c,onKeyUp:u,tabIndex:l,onMouseOver:f,onMouseLeave:h,...p}=e,[g,y]=F.useState(!0),[x,S]=F.useState(!1),E=qU(),v=D=>{D&&D.tagName!=="BUTTON"&&y(!1)},w=g?l:l||0,b=n&&!r,m=F.useCallback(D=>{if(n){D.stopPropagation(),D.preventDefault();return}D.currentTarget.focus(),a==null||a(D)},[n,a]),$=F.useCallback(D=>{x&&Yv(D)&&(D.preventDefault(),D.stopPropagation(),S(!1),E.remove(document,"keyup",$,!1))},[x,E]),A=F.useCallback(D=>{if(c==null||c(D),n||D.defaultPrevented||D.metaKey||!Yv(D.nativeEvent)||g)return;const N=i&&D.key==="Enter";o&&D.key===" "&&(D.preventDefault(),S(!0)),N&&(D.preventDefault(),D.currentTarget.click()),E.add(document,"keyup",$,!1)},[n,g,c,i,o,E,$]),C=F.useCallback(D=>{if(u==null||u(D),n||D.defaultPrevented||D.metaKey||!Yv(D.nativeEvent)||g)return;o&&D.key===" "&&(D.preventDefault(),S(!1),D.currentTarget.click())},[o,g,n,u]),k=F.useCallback(D=>{D.button===0&&(S(!1),E.remove(document,"mouseup",k,!1))},[E]),I=F.useCallback(D=>{if(D.button!==0)return;if(n){D.stopPropagation(),D.preventDefault();return}g||S(!0),D.currentTarget.focus({preventScroll:!0}),E.add(document,"mouseup",k,!1),s==null||s(D)},[n,g,s,E,k]),L=F.useCallback(D=>{D.button===0&&(g||S(!1),d==null||d(D))},[d,g]),T=F.useCallback(D=>{if(n){D.preventDefault();return}f==null||f(D)},[n,f]),R=F.useCallback(D=>{x&&(D.preventDefault(),S(!1)),h==null||h(D)},[x,h]),P=vr(t,v);return g?{...p,ref:P,type:"button","aria-disabled":b?void 0:n,disabled:b,onClick:m,onMouseDown:s,onMouseUp:d,onKeyUp:u,onKeyDown:c,onMouseOver:f,onMouseLeave:h}:{...p,ref:P,role:"button","data-active":ht(x),"aria-disabled":n?"true":void 0,tabIndex:b?void 0:w,onClick:m,onMouseDown:I,onMouseUp:L,onKeyUp:C,onKeyDown:A,onMouseOver:T,onMouseLeave:R}}function XU(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var ZU={slideInBottom:{...V0,custom:{offsetY:16,reverse:!0}},slideInRight:{...V0,custom:{offsetX:16,reverse:!0}},scale:{...l3,custom:{initialScale:.95,reverse:!0}},none:{}},QU=qe(Uu.section),JU=e=>ZU[e||"none"],eM=F.forwardRef((e,t)=>{const{preset:n,motionProps:r=JU(n),...i}=e;return j.jsx(QU,{ref:t,...r,...i})});eM.displayName="ModalTransition";var eG=Object.defineProperty,tG=(e,t,n)=>t in e?eG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nG=(e,t,n)=>(tG(e,typeof t!="symbol"?t+"":t,n),n),rG=class{constructor(){nG(this,"modals"),this.modals=new Map}add(e){return this.modals.set(e,this.modals.size+1),this.modals.size}remove(e){this.modals.delete(e)}isTopModal(e){return e?this.modals.get(e)===this.modals.size:!1}},Q0=new rG;function tM(e,t){const[n,r]=F.useState(0);return F.useEffect(()=>{const i=e.current;if(i){if(t){const o=Q0.add(i);r(o)}return()=>{Q0.remove(i),r(0)}}},[t,e]),n}var iG=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_l=new WeakMap,Kf=new WeakMap,qf={},Xv=0,nM=function(e){return e&&(e.host||nM(e.parentNode))},oG=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=nM(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},aG=function(e,t,n,r){var i=oG(t,Array.isArray(e)?e:[e]);qf[n]||(qf[n]=new WeakMap);var o=qf[n],s=[],d=new Set,a=new Set(i),c=function(l){!l||d.has(l)||(d.add(l),c(l.parentNode))};i.forEach(c);var u=function(l){!l||a.has(l)||Array.prototype.forEach.call(l.children,function(f){if(d.has(f))u(f);else{var h=f.getAttribute(r),p=h!==null&&h!=="false",g=(_l.get(f)||0)+1,y=(o.get(f)||0)+1;_l.set(f,g),o.set(f,y),s.push(f),g===1&&p&&Kf.set(f,!0),y===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}})};return u(t),d.clear(),Xv++,function(){s.forEach(function(l){var f=_l.get(l)-1,h=o.get(l)-1;_l.set(l,f),o.set(l,h),f||(Kf.has(l)||l.removeAttribute(r),Kf.delete(l)),h||l.removeAttribute(n)}),Xv--,Xv||(_l=new WeakMap,_l=new WeakMap,Kf=new WeakMap,qf={})}},sG=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||iG(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),aG(r,i,n,"aria-hidden")):function(){return null}};function lG(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:s=!0,onOverlayClick:d,onEsc:a}=e,c=F.useRef(null),u=F.useRef(null),[l,f,h]=cG(r,"chakra-modal","chakra-modal--header","chakra-modal--body");uG(c,t&&s);const p=tM(c,t),g=F.useRef(null),y=F.useCallback(A=>{g.current=A.target},[]),x=F.useCallback(A=>{A.key==="Escape"&&(A.stopPropagation(),o&&(n==null||n()),a==null||a())},[o,n,a]),[S,E]=F.useState(!1),[v,w]=F.useState(!1),b=F.useCallback((A={},C=null)=>({role:"dialog",...A,ref:vr(C,c),id:l,tabIndex:-1,"aria-modal":!0,"aria-labelledby":S?f:void 0,"aria-describedby":v?h:void 0,onClick:ft(A.onClick,k=>k.stopPropagation())}),[h,v,l,f,S]),m=F.useCallback(A=>{A.stopPropagation(),g.current===A.target&&Q0.isTopModal(c.current)&&(i&&(n==null||n()),d==null||d())},[n,i,d]),$=F.useCallback((A={},C=null)=>({...A,ref:vr(C,u),onClick:ft(A.onClick,m),onKeyDown:ft(A.onKeyDown,x),onMouseDown:ft(A.onMouseDown,y)}),[x,y,m]);return{isOpen:t,onClose:n,headerId:f,bodyId:h,setBodyMounted:w,setHeaderMounted:E,dialogRef:c,overlayRef:u,getDialogProps:b,getDialogContainerProps:$,index:p}}function uG(e,t){const n=e.current;F.useEffect(()=>{if(!(!e.current||!t))return sG(e.current)},[t,e,n])}function cG(e,...t){const n=F.useId(),r=e||n;return F.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[dG,af]=bn({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[fG,Iu]=bn({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),rM=e=>{const t={scrollBehavior:"outside",autoFocus:!0,trapFocus:!0,returnFocusOnClose:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale",lockFocusAcrossFrames:!0,...e},{portalProps:n,children:r,autoFocus:i,trapFocus:o,initialFocusRef:s,finalFocusRef:d,returnFocusOnClose:a,blockScrollOnMount:c,allowPinchZoom:u,preserveScrollBarGap:l,motionPreset:f,lockFocusAcrossFrames:h,onCloseComplete:p}=t,g=no("Modal",t),x={...lG(t),autoFocus:i,trapFocus:o,initialFocusRef:s,finalFocusRef:d,returnFocusOnClose:a,blockScrollOnMount:c,allowPinchZoom:u,preserveScrollBarGap:l,motionPreset:f,lockFocusAcrossFrames:h};return j.jsx(fG,{value:x,children:j.jsx(dG,{value:g,children:j.jsx(tf,{onExitComplete:p,children:x.isOpen&&j.jsx(Kd,{...n,children:r})})})})};rM.displayName="Modal";var Dh="right-scroll-bar-position",Nh="width-before-scroll-bar",hG="with-scroll-bars-hidden",pG="--removed-body-scroll-bar-size",iM=_3(),Zv=function(){},sm=F.forwardRef(function(e,t){var n=F.useRef(null),r=F.useState({onScrollCapture:Zv,onWheelCapture:Zv,onTouchMoveCapture:Zv}),i=r[0],o=r[1],s=e.forwardProps,d=e.children,a=e.className,c=e.removeScrollBar,u=e.enabled,l=e.shards,f=e.sideCar,h=e.noIsolation,p=e.inert,g=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,S=e.gapMode,E=w3(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),v=f,w=b3([n,t]),b=Gi(Gi({},E),i);return F.createElement(F.Fragment,null,u&&F.createElement(v,{sideCar:iM,removeScrollBar:c,shards:l,noIsolation:h,inert:p,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:S}),s?F.cloneElement(F.Children.only(d),Gi(Gi({},b),{ref:w})):F.createElement(x,Gi({},b,{className:a,ref:w}),d))});sm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};sm.classNames={fullWidth:Nh,zeroRight:Dh};var WC,gG=function(){if(WC)return WC;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gG();return t&&e.setAttribute("nonce",t),e}function vG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bG=function(){var e=0,t=null;return{add:function(n){e==0&&(t=mG())&&(vG(t,n),yG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wG=function(){var e=bG();return function(t,n){F.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},oM=function(){var e=wG(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},SG={left:0,top:0,right:0,gap:0},Qv=function(e){return parseInt(e||"",10)||0},xG=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[Qv(n),Qv(r),Qv(i)]},_G=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return SG;var t=xG(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])}},CG=oM(),kG=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,d=e.gap;return n===void 0&&(n="margin"),`
.`.concat(hG,` {
overflow: hidden `).concat(r,`;
padding-right: `).concat(d,"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(s,`px;
margin-left:0;
margin-top:0;
margin-right: `).concat(d,"px ").concat(r,`;
`),n==="padding"&&"padding-right: ".concat(d,"px ").concat(r,";")].filter(Boolean).join(""),`
}
.`).concat(Dh,` {
right: `).concat(d,"px ").concat(r,`;
}
.`).concat(Nh,` {
margin-right: `).concat(d,"px ").concat(r,`;
}
.`).concat(Dh," .").concat(Dh,` {
right: 0 `).concat(r,`;
}
.`).concat(Nh," .").concat(Nh,` {
margin-right: 0 `).concat(r,`;
}
body {
`).concat(pG,": ").concat(d,`px;
}
`)},EG=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=F.useMemo(function(){return _G(i)},[i]);return F.createElement(CG,{styles:kG(o,!t,i,n?"":"!important")})},J0=!1;if(typeof window<"u")try{var Yf=Object.defineProperty({},"passive",{get:function(){return J0=!0,!0}});window.addEventListener("test",Yf,Yf),window.removeEventListener("test",Yf,Yf)}catch{J0=!1}var Cl=J0?{passive:!1}:!1,$G=function(e){return e.tagName==="TEXTAREA"},aM=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$G(e)&&n[t]==="visible")},TG=function(e){return aM(e,"overflowY")},AG=function(e){return aM(e,"overflowX")},UC=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=sM(e,r);if(i){var o=lM(e,r),s=o[1],d=o[2];if(s>d)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},MG=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},LG=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},sM=function(e,t){return e==="v"?TG(t):AG(t)},lM=function(e,t){return e==="v"?MG(t):LG(t)},RG=function(e,t){return e==="h"&&t==="rtl"?-1:1},PG=function(e,t,n,r,i){var o=RG(e,window.getComputedStyle(t).direction),s=o*r,d=n.target,a=t.contains(d),c=!1,u=s>0,l=0,f=0;do{var h=lM(e,d),p=h[0],g=h[1],y=h[2],x=g-y-o*p;(p||x)&&sM(e,d)&&(l+=x,f+=p),d=d.parentNode}while(!a&&d!==document.body||a&&(t.contains(d)||t===d));return(u&&(i&&l===0||!i&&s>l)||!u&&(i&&f===0||!i&&-s>f))&&(c=!0),c},Xf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},GC=function(e){return[e.deltaX,e.deltaY]},KC=function(e){return e&&"current"in e?e.current:e},IG=function(e,t){return e[0]===t[0]&&e[1]===t[1]},OG=function(e){return`
.block-interactivity-`.concat(e,` {pointer-events: none;}
.allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},FG=0,kl=[];function DG(e){var t=F.useRef([]),n=F.useRef([0,0]),r=F.useRef(),i=F.useState(FG++)[0],o=F.useState(oM)[0],s=F.useRef(e);F.useEffect(function(){s.current=e},[e]),F.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var g=LW([e.lockRef.current],(e.shards||[]).map(KC),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var d=F.useCallback(function(g,y){if("touches"in g&&g.touches.length===2)return!s.current.allowPinchZoom;var x=Xf(g),S=n.current,E="deltaX"in g?g.deltaX:S[0]-x[0],v="deltaY"in g?g.deltaY:S[1]-x[1],w,b=g.target,m=Math.abs(E)>Math.abs(v)?"h":"v";if("touches"in g&&m==="h"&&b.type==="range")return!1;var $=UC(m,b);if(!$)return!0;if($?w=m:(w=m==="v"?"h":"v",$=UC(m,b)),!$)return!1;if(!r.current&&"changedTouches"in g&&(E||v)&&(r.current=w),!w)return!0;var A=r.current||w;return PG(A,y,g,A==="h"?E:v,!0)},[]),a=F.useCallback(function(g){var y=g;if(!(!kl.length||kl[kl.length-1]!==o)){var x="deltaY"in y?GC(y):Xf(y),S=t.current.filter(function(w){return w.name===y.type&&w.target===y.target&&IG(w.delta,x)})[0];if(S&&S.should){y.cancelable&&y.preventDefault();return}if(!S){var E=(s.current.shards||[]).map(KC).filter(Boolean).filter(function(w){return w.contains(y.target)}),v=E.length>0?d(y,E[0]):!s.current.noIsolation;v&&y.cancelable&&y.preventDefault()}}},[]),c=F.useCallback(function(g,y,x,S){var E={name:g,delta:y,target:x,should:S};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(v){return v!==E})},1)},[]),u=F.useCallback(function(g){n.current=Xf(g),r.current=void 0},[]),l=F.useCallback(function(g){c(g.type,GC(g),g.target,d(g,e.lockRef.current))},[]),f=F.useCallback(function(g){c(g.type,Xf(g),g.target,d(g,e.lockRef.current))},[]);F.useEffect(function(){return kl.push(o),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:f}),document.addEventListener("wheel",a,Cl),document.addEventListener("touchmove",a,Cl),document.addEventListener("touchstart",u,Cl),function(){kl=kl.filter(function(g){return g!==o}),document.removeEventListener("wheel",a,Cl),document.removeEventListener("touchmove",a,Cl),document.removeEventListener("touchstart",u,Cl)}},[]);var h=e.removeScrollBar,p=e.inert;return F.createElement(F.Fragment,null,p?F.createElement(o,{styles:OG(i)}):null,h?F.createElement(EG,{gapMode:e.gapMode}):null)}const NG=RW(iM,DG);var uM=F.forwardRef(function(e,t){return F.createElement(sm,Gi({},e,{ref:t,sideCar:NG}))});uM.classNames=sm.classNames;const zG=uM;function jG(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:s,finalFocusRef:d,returnFocusOnClose:a,preserveScrollBarGap:c,lockFocusAcrossFrames:u,isOpen:l}=Iu(),[f,h]=zA();F.useEffect(()=>{!f&&h&&setTimeout(h)},[f,h]);const p=tM(r,l);return j.jsx(X3,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:d,restoreFocus:a,contentRef:r,lockFocusAcrossFrames:u,children:j.jsx(zG,{removeScrollBar:!c,allowPinchZoom:s,enabled:p===1&&o,forwardProps:!0,children:e.children})})}var cM=vt((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...s}=e,{getDialogProps:d,getDialogContainerProps:a}=Iu(),c=d(s,t),u=a(i),l=wt("chakra-modal__content",n),f=af(),h={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...f.dialog},p={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...f.dialogContainer},{motionPreset:g}=Iu();return j.jsx(jG,{children:j.jsx(qe.div,{...u,className:"chakra-modal__content-container",tabIndex:-1,__css:p,children:j.jsx(eM,{preset:g,motionProps:o,className:l,...c,__css:h,children:r})})})});cM.displayName="ModalContent";function dM(e){const{leastDestructiveRef:t,...n}=e;return j.jsx(rM,{...n,initialFocusRef:t})}var fM=vt((e,t)=>j.jsx(cM,{ref:t,role:"alertdialog",...e})),hM=vt((e,t)=>{const{className:n,...r}=e,i=wt("chakra-modal__footer",n),s={display:"flex",alignItems:"center",justifyContent:"flex-end",...af().footer};return j.jsx(qe.footer,{ref:t,...r,__css:s,className:i})});hM.displayName="ModalFooter";var pM=vt((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=Iu();F.useEffect(()=>(o(!0),()=>o(!1)),[o]);const s=wt("chakra-modal__header",n),a={flex:0,...af().header};return j.jsx(qe.header,{ref:t,className:s,id:i,...r,__css:a})});pM.displayName="ModalHeader";var BG=qe(Uu.div),Ew=vt((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,s=wt("chakra-modal__overlay",n),a={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...af().overlay},{motionPreset:c}=Iu(),l=i||(c==="none"?{}:s3);return j.jsx(BG,{...l,__css:a,ref:t,className:s,...o})});Ew.displayName="ModalOverlay";var $w=vt((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=Iu();F.useEffect(()=>(o(!0),()=>o(!1)),[o]);const s=wt("chakra-modal__body",n),d=af();return j.jsx(qe.div,{ref:t,className:s,id:i,...r,__css:d.body})});$w.displayName="ModalBody";var HG=e=>j.jsx(Ys,{viewBox:"0 0 24 24",...e,children:j.jsx("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"})}),VG=e=>j.jsx(Ys,{viewBox:"0 0 24 24",...e,children:j.jsx("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 qC(e,t,n,r){F.useEffect(()=>{var i;if(!e.current||!r)return;const o=(i=e.current.ownerDocument.defaultView)!=null?i:window,s=Array.isArray(t)?t:[t],d=new o.MutationObserver(a=>{for(const c of a)c.type==="attributes"&&c.attributeName&&s.includes(c.attributeName)&&n(c)});return d.observe(e.current,{attributes:!0,attributeFilter:s}),()=>d.disconnect()})}function WG(e,t){const n=Qn(e);F.useEffect(()=>{let r=null;const i=()=>n();return t!==null&&(r=window.setInterval(i,t)),()=>{r&&window.clearInterval(r)}},[t,n])}var UG=50,YC=300;function GG(e,t){const[n,r]=F.useState(!1),[i,o]=F.useState(null),[s,d]=F.useState(!0),a=F.useRef(null),c=()=>clearTimeout(a.current);WG(()=>{i==="increment"&&e(),i==="decrement"&&t()},n?UG:null);const u=F.useCallback(()=>{s&&e(),a.current=setTimeout(()=>{d(!1),r(!0),o("increment")},YC)},[e,s]),l=F.useCallback(()=>{s&&t(),a.current=setTimeout(()=>{d(!1),r(!0),o("decrement")},YC)},[t,s]),f=F.useCallback(()=>{d(!0),r(!1),c()},[]);return F.useEffect(()=>()=>c(),[]),{up:u,down:l,stop:f,isSpinning:n}}var KG=/^[Ee0-9+\-.]$/;function qG(e){return KG.test(e)}function YG(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 XG(e={}){const{focusInputOnChange:t=!0,clampValueOnBlur:n=!0,keepWithinRange:r=!0,min:i=Number.MIN_SAFE_INTEGER,max:o=Number.MAX_SAFE_INTEGER,step:s=1,isReadOnly:d,isDisabled:a,isRequired:c,isInvalid:u,pattern:l="[0-9]*(.[0-9]+)?",inputMode:f="decimal",allowMouseWheel:h,id:p,onChange:g,precision:y,name:x,"aria-describedby":S,"aria-label":E,"aria-labelledby":v,onFocus:w,onBlur:b,onInvalid:m,getAriaValueText:$,isValidCharacter:A,format:C,parse:k,...I}=e,L=Qn(w),T=Qn(b),R=Qn(m),P=Qn(A??qG),D=Qn($),N=wW(e),{update:B,increment:Z,decrement:U}=N,[X,W]=F.useState(!1),q=!(d||a),Q=F.useRef(null),G=F.useRef(null),oe=F.useRef(null),ne=F.useRef(null),ce=F.useCallback(xe=>xe.split("").filter(P).join(""),[P]),fe=F.useCallback(xe=>{var Re;return(Re=k==null?void 0:k(xe))!=null?Re:xe},[k]),he=F.useCallback(xe=>{var Re;return((Re=C==null?void 0:C(xe))!=null?Re:xe).toString()},[C]);Mp(()=>{(N.valueAsNumber>o||N.valueAsNumber<i)&&(R==null||R("rangeOverflow",he(N.value),N.valueAsNumber))},[N.valueAsNumber,N.value,he,R]),La(()=>{if(!Q.current)return;if(Q.current.value!=N.value){const Re=fe(Q.current.value);N.setValue(ce(Re))}},[fe,ce]);const me=F.useCallback((xe=s)=>{q&&Z(xe)},[Z,q,s]),Pe=F.useCallback((xe=s)=>{q&&U(xe)},[U,q,s]),Ee=GG(me,Pe);qC(oe,"disabled",Ee.stop,Ee.isSpinning),qC(ne,"disabled",Ee.stop,Ee.isSpinning);const Ae=F.useCallback(xe=>{if(xe.nativeEvent.isComposing)return;const Ve=fe(xe.currentTarget.value);B(ce(Ve)),G.current={start:xe.currentTarget.selectionStart,end:xe.currentTarget.selectionEnd}},[B,ce,fe]),Fe=F.useCallback(xe=>{var Re,Ve,et;L==null||L(xe),G.current&&(xe.target.selectionStart=(Ve=G.current.start)!=null?Ve:(Re=xe.currentTarget.value)==null?void 0:Re.length,xe.currentTarget.selectionEnd=(et=G.current.end)!=null?et:xe.currentTarget.selectionStart)},[L]),Be=F.useCallback(xe=>{if(xe.nativeEvent.isComposing)return;YG(xe,P)||xe.preventDefault();const Re=lt(xe)*s,Ve=xe.key,at={ArrowUp:()=>me(Re),ArrowDown:()=>Pe(Re),Home:()=>B(i),End:()=>B(o)}[Ve];at&&(xe.preventDefault(),at(xe))},[P,s,me,Pe,B,i,o]),lt=xe=>{let Re=1;return(xe.metaKey||xe.ctrlKey)&&(Re=.1),xe.shiftKey&&(Re=10),Re},qt=F.useMemo(()=>{const xe=D==null?void 0:D(N.value);if(xe!=null)return xe;const Re=N.value.toString();return Re||void 0},[N.value,D]),pt=F.useCallback(()=>{let xe=N.value;if(N.value==="")return;/^[eE]/.test(N.value.toString())?N.setValue(""):(N.valueAsNumber<i&&(xe=i),N.valueAsNumber>o&&(xe=o),N.cast(xe))},[N,o,i]),on=F.useCallback(()=>{W(!1),n&&pt()},[n,W,pt]),xt=F.useCallback(()=>{t&&requestAnimationFrame(()=>{var xe;(xe=Q.current)==null||xe.focus()})},[t]),ve=F.useCallback(xe=>{xe.preventDefault(),Ee.up(),xt()},[xt,Ee]),Se=F.useCallback(xe=>{xe.preventDefault(),Ee.down(),xt()},[xt,Ee]);SW(()=>Q.current,"wheel",xe=>{var Re,Ve;const at=((Ve=(Re=Q.current)==null?void 0:Re.ownerDocument)!=null?Ve:document).activeElement===Q.current;if(!h||!at)return;xe.preventDefault();const At=lt(xe)*s,un=Math.sign(xe.deltaY);un===-1?me(At):un===1&&Pe(At)},{passive:!1});const be=F.useCallback((xe={},Re=null)=>{const Ve=a||r&&N.isAtMax;return{...xe,ref:vr(Re,oe),role:"button",tabIndex:-1,onPointerDown:ft(xe.onPointerDown,et=>{et.button!==0||Ve||ve(et)}),onPointerLeave:ft(xe.onPointerLeave,Ee.stop),onPointerUp:ft(xe.onPointerUp,Ee.stop),disabled:Ve,"aria-disabled":Ro(Ve)}},[N.isAtMax,r,ve,Ee.stop,a]),De=F.useCallback((xe={},Re=null)=>{const Ve=a||r&&N.isAtMin;return{...xe,ref:vr(Re,ne),role:"button",tabIndex:-1,onPointerDown:ft(xe.onPointerDown,et=>{et.button!==0||Ve||Se(et)}),onPointerLeave:ft(xe.onPointerLeave,Ee.stop),onPointerUp:ft(xe.onPointerUp,Ee.stop),disabled:Ve,"aria-disabled":Ro(Ve)}},[N.isAtMin,r,Se,Ee.stop,a]),ot=F.useCallback((xe={},Re=null)=>{var Ve,et,at,At;return{name:x,inputMode:f,type:"text",pattern:l,"aria-labelledby":v,"aria-label":E,"aria-describedby":S,id:p,disabled:a,...xe,readOnly:(Ve=xe.readOnly)!=null?Ve:d,"aria-readonly":(et=xe.readOnly)!=null?et:d,"aria-required":(at=xe.required)!=null?at:c,required:(At=xe.required)!=null?At:c,ref:vr(Q,Re),value:he(N.value),role:"spinbutton","aria-valuemin":i,"aria-valuemax":o,"aria-valuenow":Number.isNaN(N.valueAsNumber)?void 0:N.valueAsNumber,"aria-invalid":Ro(u??N.isOutOfRange),"aria-valuetext":qt,autoComplete:"off",autoCorrect:"off",onChange:ft(xe.onChange,Ae),onKeyDown:ft(xe.onKeyDown,Be),onFocus:ft(xe.onFocus,Fe,()=>W(!0)),onBlur:ft(xe.onBlur,T,on)}},[x,f,l,v,E,he,S,p,a,c,d,u,N.value,N.valueAsNumber,N.isOutOfRange,i,o,qt,Ae,Be,Fe,T,on]);return{value:he(N.value),valueAsNumber:N.valueAsNumber,isFocused:X,isDisabled:a,isReadOnly:d,getIncrementButtonProps:be,getDecrementButtonProps:De,getInputProps:ot,htmlProps:I}}var[ZG,lm]=bn({name:"NumberInputStylesContext",errorMessage:`useNumberInputStyles returned is 'undefined'. Seems you forgot to wrap the components in "<NumberInput />" `}),[QG,Tw]=bn({name:"NumberInputContext",errorMessage:"useNumberInputContext: `context` is undefined. Seems you forgot to wrap number-input's components within <NumberInput />"}),zh=vt(function(t,n){const r=no("NumberInput",t),i=Or(t),o=gw(i),{htmlProps:s,...d}=XG(o),a=F.useMemo(()=>d,[d]);return j.jsx(QG,{value:a,children:j.jsx(ZG,{value:r,children:j.jsx(qe.div,{...s,ref:n,className:wt("chakra-numberinput",t.className),__css:{position:"relative",zIndex:0,...r.root}})})})});zh.displayName="NumberInput";var jh=vt(function(t,n){const r=lm();return j.jsx(qe.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}})});jh.displayName="NumberInputStepper";var Bh=vt(function(t,n){const{getInputProps:r}=Tw(),i=r(t,n),o=lm();return j.jsx(qe.input,{...i,className:wt("chakra-numberinput__field",t.className),__css:{width:"100%",...o.field}})});Bh.displayName="NumberInputField";var gM=qe("div",{baseStyle:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,transitionProperty:"common",transitionDuration:"normal",userSelect:"none",cursor:"pointer",lineHeight:"normal"}}),Hh=vt(function(t,n){var r;const i=lm(),{getDecrementButtonProps:o}=Tw(),s=o(t,n);return j.jsx(gM,{...s,__css:i.stepper,children:(r=t.children)!=null?r:j.jsx(HG,{})})});Hh.displayName="NumberDecrementStepper";var Vh=vt(function(t,n){var r;const{getIncrementButtonProps:i}=Tw(),o=i(t,n),s=lm();return j.jsx(gM,{...o,__css:s.stepper,children:(r=t.children)!=null?r:j.jsx(VG,{})})});Vh.displayName="NumberIncrementStepper";function JG(e){return e&&mr(e)&&mr(e.target)}function eK(e={}){const{onChange:t,value:n,defaultValue:r,name:i,isDisabled:o,isFocusable:s,isNative:d,...a}=e,[c,u]=F.useState(r||""),l=typeof n<"u",f=l?n:c,h=F.useRef(null),p=F.useCallback(()=>{const w=h.current;if(!w)return;let b="input:not(:disabled):checked";const m=w.querySelector(b);if(m){m.focus();return}b="input:not(:disabled)";const $=w.querySelector(b);$==null||$.focus()},[]),y=`radio-${F.useId()}`,x=i||y,S=F.useCallback(w=>{const b=JG(w)?w.target.value:w;l||u(b),t==null||t(String(b))},[t,l]),E=F.useCallback((w={},b=null)=>({...w,ref:vr(b,h),role:"radiogroup"}),[]),v=F.useCallback((w={},b=null)=>({...w,ref:b,name:x,[d?"checked":"isChecked"]:f!=null?w.value===f:void 0,onChange($){S($)},"data-radiogroup":!0}),[d,x,S,f]);return{getRootProps:E,getRadioProps:v,name:x,ref:h,focus:p,setValue:u,value:f,onChange:S,isDisabled:o,isFocusable:s,htmlProps:a}}var[tK,mM]=bn({name:"RadioGroupContext",strict:!1}),Wh=vt((e,t)=>{const{colorScheme:n,size:r,variant:i,children:o,className:s,isDisabled:d,isFocusable:a,...c}=e,{value:u,onChange:l,getRootProps:f,name:h,htmlProps:p}=eK(c),g=F.useMemo(()=>({name:h,size:r,onChange:l,colorScheme:n,value:u,variant:i,isDisabled:d,isFocusable:a}),[h,r,l,n,u,i,d,a]);return j.jsx(tK,{value:g,children:j.jsx(qe.div,{...f(p,t),className:wt("chakra-radio-group",s),children:o})})});Wh.displayName="RadioGroup";var nK={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"};function rK(e={}){const{defaultChecked:t,isChecked:n,isFocusable:r,isDisabled:i,isReadOnly:o,isRequired:s,onChange:d,isInvalid:a,name:c,value:u,id:l,"data-radiogroup":f,"aria-describedby":h,...p}=e,g=`radio-${F.useId()}`,y=rf(),S=!!mM()||!!f;let v=!!y&&!S?y.id:g;v=l??v;const w=i??(y==null?void 0:y.isDisabled),b=o??(y==null?void 0:y.isReadOnly),m=s??(y==null?void 0:y.isRequired),$=a??(y==null?void 0:y.isInvalid),[A,C]=F.useState(!1),[k,I]=F.useState(!1),[L,T]=F.useState(!1),[R,P]=F.useState(!1),[D,N]=F.useState(!!t),B=typeof n<"u",Z=B?n:D;F.useEffect(()=>d3(C),[]);const U=F.useCallback(he=>{if(b||w){he.preventDefault();return}B||N(he.target.checked),d==null||d(he)},[B,w,b,d]),X=F.useCallback(he=>{he.key===" "&&P(!0)},[P]),W=F.useCallback(he=>{he.key===" "&&P(!1)},[P]),q=F.useCallback((he={},me=null)=>({...he,ref:me,"data-active":ht(R),"data-hover":ht(L),"data-disabled":ht(w),"data-invalid":ht($),"data-checked":ht(Z),"data-focus":ht(k),"data-focus-visible":ht(k&&A),"data-readonly":ht(b),"aria-hidden":!0,onMouseDown:ft(he.onMouseDown,()=>P(!0)),onMouseUp:ft(he.onMouseUp,()=>P(!1)),onMouseEnter:ft(he.onMouseEnter,()=>T(!0)),onMouseLeave:ft(he.onMouseLeave,()=>T(!1))}),[R,L,w,$,Z,k,b,A]),{onFocus:Q,onBlur:G}=y??{},oe=F.useCallback((he={},me=null)=>{const Pe=w&&!r;return{...he,id:v,ref:me,type:"radio",name:c,value:u,onChange:ft(he.onChange,U),onBlur:ft(G,he.onBlur,()=>I(!1)),onFocus:ft(Q,he.onFocus,()=>I(!0)),onKeyDown:ft(he.onKeyDown,X),onKeyUp:ft(he.onKeyUp,W),checked:Z,disabled:Pe,readOnly:b,required:m,"aria-invalid":Ro($),"aria-disabled":Ro(Pe),"aria-required":Ro(m),"data-readonly":ht(b),"aria-describedby":h,style:nK}},[w,r,v,c,u,U,G,Q,X,W,Z,b,m,$,h]);return{state:{isInvalid:$,isFocused:k,isChecked:Z,isActive:R,isHovered:L,isDisabled:w,isReadOnly:b,isRequired:m},getCheckboxProps:q,getRadioProps:q,getInputProps:oe,getLabelProps:(he={},me=null)=>({...he,ref:me,onMouseDown:ft(he.onMouseDown,iK),"data-disabled":ht(w),"data-checked":ht(Z),"data-invalid":ht($)}),getRootProps:(he,me=null)=>({...he,ref:me,"data-disabled":ht(w),"data-checked":ht(Z),"data-invalid":ht($)}),htmlProps:p}}function iK(e){e.preventDefault(),e.stopPropagation()}function oK(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 bo=vt((e,t)=>{var n;const r=mM(),{onChange:i,value:o}=e,s=no("Radio",{...r,...e}),d=Or(e),{spacing:a="0.5rem",children:c,isDisabled:u=r==null?void 0:r.isDisabled,isFocusable:l=r==null?void 0:r.isFocusable,inputProps:f,...h}=d;let p=e.isChecked;(r==null?void 0:r.value)!=null&&o!=null&&(p=r.value===o);let g=i;r!=null&&r.onChange&&o!=null&&(g=K$(r.onChange,i));const y=(n=e==null?void 0:e.name)!=null?n:r==null?void 0:r.name,{getInputProps:x,getCheckboxProps:S,getLabelProps:E,getRootProps:v,htmlProps:w}=rK({...h,isChecked:p,isFocusable:l,isDisabled:u,onChange:g,name:y}),[b,m]=oK(w,R4),$=S(m),A=x(f,t),C=E(),k=Object.assign({},b,v()),I={display:"inline-flex",alignItems:"center",verticalAlign:"top",cursor:"pointer",position:"relative",...s.container},L={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,...s.control},T={userSelect:"none",marginStart:a,...s.label};return j.jsxs(qe.label,{className:"chakra-radio",...k,__css:I,children:[j.jsx("input",{className:"chakra-radio__input",...A}),j.jsx(qe.span,{className:"chakra-radio__control",...$,__css:L}),c&&j.jsx(qe.span,{className:"chakra-radio__label",...C,__css:T,children:c})]})});bo.displayName="Radio";var vM=vt(function(t,n){const r=no("Switch",t),{spacing:i="0.5rem",children:o,...s}=Or(t),{state:d,getInputProps:a,getCheckboxProps:c,getRootProps:u,getLabelProps:l}=f3(s),f=F.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0,...r.container}),[r.container]),h=F.useMemo(()=>({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer",...r.track}),[r.track]),p=F.useMemo(()=>({userSelect:"none",marginStart:i,...r.label}),[i,r.label]);return j.jsxs(qe.label,{...u(),className:wt("chakra-switch",t.className),__css:f,children:[j.jsx("input",{className:"chakra-switch__input",...a({},n)}),j.jsx(qe.span,{...c(),className:"chakra-switch__track",__css:h,children:j.jsx(qe.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":ht(d.isChecked),"data-hover":ht(d.isHovered)})}),o&&j.jsx(qe.span,{className:"chakra-switch__label",...l(),__css:p,children:o})]})});vM.displayName="Switch";var[aK,sK,lK,uK]=D7();function cK(e){var t;const{defaultIndex:n,onChange:r,index:i,isManual:o,isLazy:s,lazyBehavior:d="unmount",orientation:a="horizontal",direction:c="ltr",...u}=e,[l,f]=F.useState(n??0),[h,p]=N7({defaultValue:n??0,value:i,onChange:r});F.useEffect(()=>{i!=null&&f(i)},[i]);const g=lK(),y=F.useId();return{id:`tabs-${(t=e.id)!=null?t:y}`,selectedIndex:h,focusedIndex:l,setSelectedIndex:p,setFocusedIndex:f,isManual:o,isLazy:s,lazyBehavior:d,orientation:a,descendants:g,direction:c,htmlProps:u}}var[dK,um]=bn({name:"TabsContext",errorMessage:"useTabsContext: `context` is undefined. Seems you forgot to wrap all tabs components within <Tabs />"});function fK(e){const{focusedIndex:t,orientation:n,direction:r}=um(),i=sK(),o=F.useCallback(s=>{const d=()=>{var S;const E=i.nextEnabled(t);E&&((S=E.node)==null||S.focus())},a=()=>{var S;const E=i.prevEnabled(t);E&&((S=E.node)==null||S.focus())},c=()=>{var S;const E=i.firstEnabled();E&&((S=E.node)==null||S.focus())},u=()=>{var S;const E=i.lastEnabled();E&&((S=E.node)==null||S.focus())},l=n==="horizontal",f=n==="vertical",h=s.key,p=r==="ltr"?"ArrowLeft":"ArrowRight",g=r==="ltr"?"ArrowRight":"ArrowLeft",x={[p]:()=>l&&a(),[g]:()=>l&&d(),ArrowDown:()=>f&&d(),ArrowUp:()=>f&&a(),Home:c,End:u}[h];x&&(s.preventDefault(),x(s))},[i,t,n,r]);return{...e,role:"tablist","aria-orientation":n,onKeyDown:ft(e.onKeyDown,o)}}function hK(e){const{isDisabled:t,isFocusable:n,...r}=e,{setSelectedIndex:i,isManual:o,id:s,setFocusedIndex:d,selectedIndex:a}=um(),{index:c,register:u}=uK({disabled:t&&!n}),l=c===a,f=()=>{i(c)},h=()=>{d(c),!o&&!(t&&n)&&i(c)},p=YU({...r,ref:vr(u,e.ref),isDisabled:t,isFocusable:n,onClick:ft(e.onClick,f)}),g="button";return{...p,id:yM(s,c),role:"tab",tabIndex:l?0:-1,type:g,"aria-selected":l,"aria-controls":bM(s,c),onFocus:t?void 0:ft(e.onFocus,h)}}var[pK,gK]=bn({});function mK(e){const t=um(),{id:n,selectedIndex:r}=t,o=hw(e.children).map((s,d)=>F.createElement(pK,{key:d,value:{isSelected:d===r,id:bM(n,d),tabId:yM(n,d),selectedIndex:r}},s));return{...e,children:o}}function vK(e){const{children:t,...n}=e,{isLazy:r,lazyBehavior:i}=um(),{isSelected:o,id:s,tabId:d}=gK(),a=F.useRef(!1);o&&(a.current=!0);const c=XU({wasSelected:a.current,isSelected:o,enabled:r,mode:i});return{tabIndex:0,...n,children:c?t:null,role:"tabpanel","aria-labelledby":d,hidden:!o,id:s}}function yM(e,t){return`${e}--tab-${t}`}function bM(e,t){return`${e}--tabpanel-${t}`}var[yK,cm]=bn({name:"TabsStylesContext",errorMessage:`useTabsStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Tabs />" `}),Aw=vt(function(t,n){const r=no("Tabs",t),{children:i,className:o,...s}=Or(t),{htmlProps:d,descendants:a,...c}=cK(s),u=F.useMemo(()=>c,[c]),{isFitted:l,...f}=d;return j.jsx(aK,{value:a,children:j.jsx(dK,{value:u,children:j.jsx(yK,{value:r,children:j.jsx(qe.div,{className:wt("chakra-tabs",o),ref:n,...f,__css:r.root,children:i})})})})});Aw.displayName="Tabs";var Mw=vt(function(t,n){const r=fK({...t,ref:n}),o={display:"flex",...cm().tablist};return j.jsx(qe.div,{...r,className:wt("chakra-tabs__tablist",t.className),__css:o})});Mw.displayName="TabList";var Jl=vt(function(t,n){const r=vK({...t,ref:n}),i=cm();return j.jsx(qe.div,{outline:"0",...r,className:wt("chakra-tabs__tab-panel",t.className),__css:i.tabpanel})});Jl.displayName="TabPanel";var Lw=vt(function(t,n){const r=mK(t),i=cm();return j.jsx(qe.div,{...r,width:"100%",ref:n,className:wt("chakra-tabs__tab-panels",t.className),__css:i.tabpanels})});Lw.displayName="TabPanels";var eu=vt(function(t,n){const r=cm(),i=hK({...t,ref:n}),o={outline:"0",display:"flex",alignItems:"center",justifyContent:"center",...r.tab};return j.jsx(qe.button,{...i,className:wt("chakra-tabs__tab",t.className),__css:o})});eu.displayName="Tab";let{definePartsStyle:bK,defineMultiStyleConfig:wK}=Tt(oT.keys);const SK=wK({defaultProps:{variant:"nevysha"},variants:{nevysha:bK({field:{outline:"none!important",boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",borderRadius:"0 !important",backgroundColor:"var(--input-background-fill) !important",padding:"var(--input-padding) !important",width:"100%",color:"var(--body-text-color)",fontSize:"var(--input-text-size)",lineHeight:"var(--line-sm)",fontFamily:"monospace !important"}})}}),{definePartsStyle:xK,defineMultiStyleConfig:_K}=Tt(sT.keys),CK=_K({defaultProps:{variant:"nevysha"},variants:{nevysha:xK({field:{outline:"none!important",boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",borderRadius:"0 !important",backgroundColor:"var(--input-background-fill) !important",padding:"var(--input-padding) !important",width:"100%",color:"var(--body-text-color)",fontSize:"var(--input-text-size) !important",lineHeight:"var(--line-sm)",fontFamily:"monospace !important"},stepperGroup:{border:"1px solid var(--ae-input-border-color) !important",borderTop:"none !important",borderRight:"none !important"},stepper:{color:"var(--body-text-color)",borderTop:"none !important",borderLeft:"none !important"}})}}),{definePartsStyle:XC,defineMultiStyleConfig:kK}=Tt(uT.keys),EK=kK({defaultProps:{variant:"nevysha"},variants:{nevysha:XC({tab:{marginBottom:"-1px",border:"1px solid transparent",borderColor:"transparent",borderBottom:"none",borderRadius:"0 !important",padding:"var(--size-1) var(--size-4) !important",color:"var(--body-text-color-subdued) !important",fontWeight:"var(--section-header-text-weight) !important",fontSize:"var(--section-header-text-size) !important",borderTop:"2px solid transparent !important",_selected:{borderTop:"2px solid var(--ae-primary-color) !important",backgroundColor:"var(--tab-nav-background-color-selected) !important",color:"var(--body-text-color) !important"},_focus:{outline:"none"},_hover:{outline:"none",borderRight:"1px solid transparent",borderLeft:"1px solid transparent"}},tabpanel:{border:"1px solid var(--border-color-primary)",borderTop:"none",borderBottomRightRadius:"var(--container-radius)",borderBottomLeftRadius:"var(--container-radius)",padding:"var(--block-padding)",backgroundColor:"var(--tab-nav-background-color-selected) !important",gap:"20px",display:"flex",flexDirection:"column",height:"500px",overflowY:"auto"}}),nevyshaExtraNetwork:XC({root:{height:"100% !important",display:"flex",flexDirection:"column"},tabpanels:{height:"100% !important"},tab:{marginBottom:"-1px",border:"1px solid transparent",borderColor:"transparent",borderBottom:"none",borderRadius:"0 !important",padding:"var(--size-1) var(--size-4) !important",color:"var(--body-text-color-subdued) !important",fontWeight:"var(--section-header-text-weight) !important",fontSize:"var(--section-header-text-size) !important",borderTop:"2px solid transparent !important",_selected:{borderTop:"2px solid var(--ae-primary-color) !important",backgroundColor:"var(--tab-nav-background-color-selected) !important",color:"var(--body-text-color) !important"},_focus:{outline:"none"},_hover:{outline:"none",borderRight:"1px solid transparent",borderLeft:"1px solid transparent"}},tabpanel:{border:"1px solid var(--border-color-primary)",borderTop:"none",borderBottomRightRadius:"var(--container-radius)",borderBottomLeftRadius:"var(--container-radius)",padding:"var(--block-padding)",backgroundColor:"var(--tab-nav-background-color-selected) !important",gap:"20px",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto"}})}}),{definePartsStyle:$K,defineMultiStyleConfig:TK}=Tt(iT.keys),AK=TK({defaultProps:{variant:"nevysha"},variants:{nevysha:$K({control:{boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",borderRadius:"var(--checkbox-border-radius)",backgroundColor:"var(--checkbox-background-color)",lineHeight:"var(--line-sm)"}})}}),{definePartsStyle:MK,defineMultiStyleConfig:LK}=Tt(lT.keys),RK=LK({defaultProps:{variant:"nevysha"},variants:{nevysha:MK({control:{boxShadow:"var(--input-shadow)",border:"1px solid var(--ae-input-border-color) !important",backgroundColor:"var(--checkbox-background-color)",lineHeight:"var(--line-sm)"}})}});let{definePartsStyle:ZC,defineMultiStyleConfig:PK}=Tt(aT.keys);const IK=PK({defaultProps:{variant:"nevysha"},variants:{nevysha:ZC({dialog:{opacity:1,width:"800px",marginRight:"auto",marginLeft:"auto",transform:"none",maxWidth:"fit-content",background:"none"}}),"nevysha-confirm":ZC({dialog:{opacity:1,width:"800px",marginRight:"auto",marginLeft:"auto",transform:"none",maxWidth:"fit-content",border:"1px solid var(--ae-input-border-color)",backgroundColor:"var(--block-background-fill)",color:"var(--body-text-color)",borderRadius:"0 !important",fontSize:"var(--body-text-size)"},footer:{display:"flex !important",gap:"5px"}})}}),sf=cj({fontSizes:{md:"var(--body-text-size)"},components:{Input:SK,Tabs:EK,Checkbox:AK,NumberInput:CK,Radio:RK,Modal:IK}});function OK({registerReady:e}){const t="CozyToast",n=E7();return F.useEffect(()=>{const r=({title:i,msg:o,status:s,duration:d})=>{d=d||9e3,n({title:i,description:o,status:s,duration:d,isClosable:!0})};return Gp.on(t,r),e(),()=>{Gp.off(t,r)}},[]),j.jsx("div",{className:"CozyToast"})}var wM={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(a,c,u){this.fn=a,this.context=c,this.once=u||!1}function o(a,c,u,l,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,l||a,f),p=n?n+c:c;return a._events[p]?a._events[p].fn?a._events[p]=[a._events[p],h]:a._events[p].push(h):(a._events[p]=h,a._eventsCount++),a}function s(a,c){--a._eventsCount===0?a._events=new r:delete a._events[c]}function d(){this._events=new r,this._eventsCount=0}d.prototype.eventNames=function(){var c=[],u,l;if(this._eventsCount===0)return c;for(l in u=this._events)t.call(u,l)&&c.push(n?l.slice(1):l);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},d.prototype.listeners=function(c){var u=n?n+c:c,l=this._events[u];if(!l)return[];if(l.fn)return[l.fn];for(var f=0,h=l.length,p=new Array(h);f<h;f++)p[f]=l[f].fn;return p},d.prototype.listenerCount=function(c){var u=n?n+c:c,l=this._events[u];return l?l.fn?1:l.length:0},d.prototype.emit=function(c,u,l,f,h,p){var g=n?n+c:c;if(!this._events[g])return!1;var y=this._events[g],x=arguments.length,S,E;if(y.fn){switch(y.once&&this.removeListener(c,y.fn,void 0,!0),x){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,u),!0;case 3:return y.fn.call(y.context,u,l),!0;case 4:return y.fn.call(y.context,u,l,f),!0;case 5:return y.fn.call(y.context,u,l,f,h),!0;case 6:return y.fn.call(y.context,u,l,f,h,p),!0}for(E=1,S=new Array(x-1);E<x;E++)S[E-1]=arguments[E];y.fn.apply(y.context,S)}else{var v=y.length,w;for(E=0;E<v;E++)switch(y[E].once&&this.removeListener(c,y[E].fn,void 0,!0),x){case 1:y[E].fn.call(y[E].context);break;case 2:y[E].fn.call(y[E].context,u);break;case 3:y[E].fn.call(y[E].context,u,l);break;case 4:y[E].fn.call(y[E].context,u,l,f);break;default:if(!S)for(w=1,S=new Array(x-1);w<x;w++)S[w-1]=arguments[w];y[E].fn.apply(y[E].context,S)}}return!0},d.prototype.on=function(c,u,l){return o(this,c,u,l,!1)},d.prototype.once=function(c,u,l){return o(this,c,u,l,!0)},d.prototype.removeListener=function(c,u,l,f){var h=n?n+c:c;if(!this._events[h])return this;if(!u)return s(this,h),this;var p=this._events[h];if(p.fn)p.fn===u&&(!f||p.once)&&(!l||p.context===l)&&s(this,h);else{for(var g=0,y=[],x=p.length;g<x;g++)(p[g].fn!==u||f&&!p[g].once||l&&p[g].context!==l)&&y.push(p[g]);y.length?this._events[h]=y.length===1?y[0]:y:s(this,h)}return this},d.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&s(this,u)):(this._events=new r,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=n,d.EventEmitter=d,e.exports=d})(wM);var FK=wM.exports;const SM=ki(FK);class DK extends SM{constructor(){super()}}const Gp=new DK;async function NK(){return new Promise((e,t)=>{zK(e)})}function zK(e){const t='<div id="CozyToast"/>';document.body.insertAdjacentHTML("beforeend",t);let n=0,r=0;const i=()=>(r++,()=>{n++,n===r&&e()});Da.createRoot(document.getElementById("CozyToast")).render(j.jsx(Le.StrictMode,{children:j.jsx(nf,{theme:sf,children:j.jsx(OK,{registerReady:i()})})}))}let Ld={prepareReactHost:NK,showToast:(e,t,n,r)=>Gp.emit("CozyToast",{status:e,title:t,msg:n,duration:r})};window.ModalEventBus=Gp;window.CozyModal=Ld;const eb=e=>(e=e||COZY_NEST_CONFIG.color_mode,e),lf=e=>{const t=parseInt(e.replace("#",""),16),n=t>>16&255,r=t>>8&255,i=t&255;return`${n} ${r} ${i}`},jK=(e,t)=>{const n=e.split("."),r=t.split(".");for(let i=0;i<Math.max(n.length,r.length);i++){const o=parseInt(n[i])||0,s=parseInt(r[i])||0;if(o<s)return!1;if(o>s)return!0}return!0},Rw=e=>{const t=e.replace("#",""),n=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),i=parseInt(t.substr(4,2),16);return(.2126*n+.7152*r+.0722*i)/255};function QC(e,t){let n=e.parentElement;for(;n!==null;){if(n.matches(t))return n;n=n.parentElement}return null}const Jv=.75,BK=e=>{e=e.replace("#","");const t=parseInt(e.substr(0,2),16),n=parseInt(e.substr(2,2),16),r=parseInt(e.substr(4,2),16),i=Math.floor(t*Jv),o=Math.floor(n*Jv),s=Math.floor(r*Jv);return`rgb(${i},${o},${s})`},HK=()=>new URLSearchParams(window.location.search).get("CozyNest")==="No"||window.location.hash.includes("CozyNest=No")?($t.log("Cozy Nest disabled by url param"),document.querySelectorAll("link").forEach(n=>{n.href.includes("Cozy-Nest")&&n.remove()}),!0):!1;function tb(e){const t=document.querySelector(`button#${wu.get("extra_networks_btn")(e)}`);t.style.display="none";const n=document.querySelector(`div#${e}_extra_networks`);n.style.display="none"}function VK(){if(window.location.href.includes("__theme")&&Ld.showToast("warning","Warning","The __theme parameter is deprecated for CozyNest. Please remove it from URL and use Cozy Nest settings instead."),document.querySelector("#setting_gradio_theme input")){const e=document.querySelector("#setting_gradio_theme input").value;e!=="gradio/default"&&e!==""&&e!=="Default"&&Ld.showToast("error","Incompatible theme",'Cozy Nest may not be compatible with this theme. Please switch to the default theme. You can do this by going to the settings tab and selecting "gradio/default" or "Default" from the dropdown menu under "User interface > UI theme".',9e4)}}const xM="<div id='nevy_waves'><div class='wave'></div> <div class='wave'></div><div class='wave'></div></div>",WK='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z"/></svg>',UK='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9c-.1-2.7-.2-5.4-.2-8.1c0-88.4 71.6-160 160-160c59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96c0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128H144zm79-167l80 80c9.4 9.4 24.6 9.4 33.9 0l80-80c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-39 39V184c0-13.3-10.7-24-24-24s-24 10.7-24 24V318.1l-39-39c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9z"/></svg>',GK='<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>',KK='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>';function _M(e){COZY_NEST_CONFIG.waves_color=e;const t=lf(e);document.querySelectorAll(".wave").forEach(n=>{n.setAttribute("style",`background: rgb(${t} / 16%)`)})}function CM(e){COZY_NEST_CONFIG.color_mode==="dark"?COZY_NEST_CONFIG.font_color=e:COZY_NEST_CONFIG.font_color_light=e;const t=lf(e);document.querySelector(":root").style.setProperty("--nevysha-font-color",`rgb(${t})`),document.querySelector(":root").style.setProperty("--nevysha-font-color-subdued",BK(e))}function qK(e){COZY_NEST_CONFIG.color_mode=e,eb(e)==="light"?document.querySelector("body").classList.add("nevysha-light"):(document.querySelector("body").classList.remove("nevysha-light"),document.querySelector("body").classList.add("dark"))}function kM(e){COZY_NEST_CONFIG.bg_gradiant_color=e;const t=lf(e);document.querySelector(":root").style.setProperty("--nevysha-gradiant-1",`rgb(${t})`)}function EM(e,t){COZY_NEST_CONFIG.accent_color=e;const n=lf(e);document.querySelector(":root").style.setProperty("--ae-primary-color",`rgb(${n})`),Rw(t)>.5?document.querySelector(":root").style.setProperty("--nevysha-color-from-luminance","black"):document.querySelector(":root").style.setProperty("--nevysha-color-from-luminance","white")}function YK(e){COZY_NEST_CONFIG.secondary_accent_color=e;const t=lf(e);document.querySelector(":root").style.setProperty("--secondary-accent-color",`rgb(${t})`),Rw(e)>.5?document.querySelector(":root").style.setProperty("--secondary-accent-color-from-luminance","black"):document.querySelector(":root").style.setProperty("--secondary-accent-color-from-luminance","white")}const XK=e=>{COZY_NEST_CONFIG.disable_waves_and_gradiant=e;const t=Jn(".wave"),n=Jn("body");e?(t.css("animation","none"),n.css("animation","none"),n.css("background-position","75% 75%")):(t.css("animation",""),n.css("animation",""),n.css("background-position",""))},ZK=(e,t)=>{COZY_NEST_CONFIG.accent_generate_button=e,document.querySelectorAll('button[id$="_generate"]').forEach(n=>{if(e){let r="";Rw(t)>.5&&(r="color: black !important"),n.setAttribute("style",`background: var(--ae-primary-color) !important; ${r}`)}else n.setAttribute("style","")})},QK=e=>{COZY_NEST_CONFIG.font_size=e,document.querySelector(":root").style.setProperty("--nevysha-text-md",`${e}px`),dm()},JK=e=>{COZY_NEST_CONFIG.card_height=e,document.querySelector(":root").style.setProperty("--extra-network-card-height",`${e}em`)},eq=e=>{COZY_NEST_CONFIG.card_width=e,document.querySelector(":root").style.setProperty("--extra-network-card-width",`${e}em`)},tq=e=>{var t,n;COZY_NEST_CONFIG.main_menu_position=e,e==="top"||e==="top_centered"?(document.querySelector(".nevysha.nevysha-tabnav").classList.add("menu-fix-top"),document.querySelector(".gradio-container.app").classList.add("menu-fix-top"),(t=document.querySelector("#nevysha-btn-menu-wrapper"))==null||t.classList.add("menu-fix-top"),document.querySelector(":root").style.setProperty("--nevysha-margin-left","0"),document.querySelector(":root").style.setProperty("--menu-top-height","25px"),e==="top_centered"?document.querySelector(".nevysha.nevysha-tabnav").classList.add("center-menu-items"):document.querySelector(".nevysha.nevysha-tabnav").classList.remove("center-menu-items")):(document.querySelector(".nevysha.nevysha-tabnav").classList.remove("center-menu-items"),document.querySelector(".nevysha.nevysha-tabnav").classList.remove("menu-fix-top"),document.querySelector(".gradio-container.app").classList.remove("menu-fix-top"),(n=document.querySelector("#nevysha-btn-menu-wrapper"))==null||n.classList.remove("menu-fix-top"),document.querySelector(":root").style.setProperty("--nevysha-margin-left","175px"),document.querySelector(":root").style.setProperty("--menu-top-height","1px")),dm()},nq=e=>{COZY_NEST_CONFIG.quicksettings_position=e,e==="split"?(document.querySelector("#quicksettings_gap").classList.add("nevysha-quicksettings-gap"),document.querySelector("#quicksettings").classList.remove("centered-quicksettings")):e==="centered"?(document.querySelector("#quicksettings_gap").classList.remove("nevysha-quicksettings-gap"),document.querySelector("#quicksettings").classList.add("centered-quicksettings")):(document.querySelector("#quicksettings_gap").classList.remove("nevysha-quicksettings-gap"),document.querySelector("#quicksettings").classList.remove("centered-quicksettings"))},rq=e=>{COZY_NEST_CONFIG.sfw_mode=e,e?document.querySelector("body").classList.add("nsfw"):document.querySelector("body").classList.remove("nsfw")},dm=()=>{let e=0;const t=document.getElementById("tabs"),n=document.querySelector("#footer #footer");let r;if(n?r=n.offsetHeight:COZY_NEST_CONFIG.webui===Fa?r=5:r=0,COZY_NEST_CONFIG.main_menu_position!=="left"){e=document.querySelector(".tab-nav.nevysha-tabnav").offsetHeight+2,document.querySelector(":root").style.setProperty("--menu-top-height",`${e}px`);const o=Jn(".gradio-container.app");o.attr("style",`${o.attr("style")} padding-top: ${e}px !important;`);const d=t.getBoundingClientRect().top;document.querySelector(":root").style.setProperty("--main-container-height",`${window.innerHeight-(d+r)}px`),window.troubleshootSize={menuHeight:e,footerHeight:r,tabsTop:d,WindowInnerHeight:window.innerHeight,bodyHeight:window.innerHeight-(d+r),"main-container-height":`${window.innerHeight-(d+r)}px`}}else{document.querySelector(":root").style.setProperty("--menu-top-height","1px");const i=Jn(".gradio-container.app");i.attr("style",`${i.attr("style")} padding-top: ${e}px !important;`);const s=t.getBoundingClientRect().top;document.querySelector(":root").style.setProperty("--main-container-height",`${window.innerHeight-(s+r)}px`),window.troubleshootSize={menuHeight:e,footerHeight:r,tabsTop:s,WindowInnerHeight:window.innerHeight,bodyHeight:window.innerHeight-(s+r),"main-container-height":`${window.innerHeight-(s+r)}px`}}},iq=({prefix:e})=>{const t=document.querySelectorAll(`#tab_${e} div#${e}_results > *:not(#${e}_results)`),n=t[1].querySelectorAll(`#html_info_${e}, #html_log_${e}`),r=document.createElement("div");r.classList.add("preview-block-wrapper");const i=document.createElement("button");i.id="toggleGenInfoButton",i.classList.add("nevysha","lg","primary","gradio-button","btn"),i.textContent="Show/Hide Generation Info",i.addEventListener("click",()=>{n.forEach(o=>o.style.display=o.style.display==="none"?"":"none")}),r.appendChild(i),n.forEach(o=>r.appendChild(o)),t[1].appendChild(r),n.forEach(o=>o.style.display="none"),t[1].style=""};function oq({prefix:e}){const t=document.getElementById(`${e}_settings`);t.parentElement.classList.add("nevysha","settings-gradio-parent");const n=document.getElementById(`${e}_toprow`),r=document.getElementById(`${e}_generate`),i=t.querySelectorAll(`:scope > :not(#${e}_toprow)`),o=document.createElement("div");o.classList.add("nevysha","settings-wrapper");for(let c of i)c.classList.add("nevysha","settings-child"),o.appendChild(c);t.appendChild(o),o.insertBefore(n,o.firstChild),r.classList.add("nevysha","generate-button"),t.insertBefore(r,t.firstChild);const s=document.getElementById(`${e}_skip`);s.classList.add("nevysha","skip-button");const d=document.getElementById(`${e}_interrupt`);d.classList.add("nevysha","interrupt-button");const a=document.createElement("div");a.classList.add("nevysha","skip-interrupt-wrapper"),a.appendChild(s),a.appendChild(d),t.insertBefore(a,t.firstChild)}function $M(){const e=document.createElement("div");e.classList.add("vertical-line-wrapper");const t=document.createElement("div");return t.classList.add("vertical-line"),e.appendChild(t),e}var Yr;let Uh=(Yr=class{static start(){Yr._instance||(Yr._instance=new Yr),Yr._instance.pushLoading(),Yr._instance.setupObserver()}static stop(){Yr._instance&&Yr._instance.observer.disconnect(),document.querySelector("#nevysha-loading-wrap").remove()}constructor(){this.observer=null}setupObserver(){const t=Cr.last(bu)+2e3,n=t||15e3;this.observer=new MutationObserver(i=>{if(i[0].target.id!=="loading_step_estimator"){const o=Cr.get(bu);if(o<n+1e3){const s=Math.min(Math.round(o/n*100),99);document.querySelector("#loading_step_estimator").innerText=`${s}%`}else document.querySelector("#loading_step_estimator").innerText="Woops, it's taking longer than expected...";this.pushLoading()}});const r={attributes:!0,childList:!0,subtree:!0};this.observer.observe(document.body,r)}pushLoading(){if(document.querySelector("#nevysha-loading"))return;const n=`<div id='nevysha-loading-wrap' class='nevysha ${eb()==="light"?"nevysha-light":""}'>
<div id='nevysha-loading' class='nevysha'>
<div class="nevysha-loading-progress">
<div class="nevysha-cozy-nest-app-name animate__animated animate__backInLeft">
Cozy Nest
</div>
${GK}
<div id="loading_step_estimator" class="subtext3 animate__animated animate__pulse animate__infinite">
1
</div>
<div class="subtext1 animate__animated animate__pulse animate__infinite">
Loading The Magic
</div>
<div class="subtext2 animate__animated animate__pulse animate__infinite">
(and gradio)
</div>
</div>
${xM}
<div class="footer">Made by Nevysha with <span class="heart">❤</span> and <span class="coffee">☕</span></div>
</div>
</div>`;document.querySelector("body").insertAdjacentHTML("beforeend",n);let r=JSON.parse(localStorage.getItem("COZY_NEST_CONFIG"));r={waves_color:"#ffffff",bg_gradiant_color:"#ffffff",accent_color:"#ffffff",font_color:"#ffffff",font_color_light:"#000000",...r},_M(r.waves_color),kM(r.bg_gradiant_color),EM(r.accent_color,r.accent_color),CM(eb()==="light"?r.font_color_light:r.font_color)}},zm(Yr,"_instance",null),Yr);function aq(){const e=`
<div id="dialog-message-wrap" title="🥺 Woops - Cozy Nest Error ?" style="display:none;">
<div id="dialog-message">
<div class="header">
<h1>🥺 Woops - Cozy Nest Error ?</h1>
<button class="lg primary gradio-button svelte-1ipelgc nevysha" onClick="hideInstanceInfoDialog();return false;">Close</button>
</div>
<p class="cozynest-error-tips">Want to report an issue ? Screenshot me and post me on <a href="https://github.com/Nevysha/Cozy-Nest">Github</a></p>
<fieldset>
<legend>Instance info</legend>
<div class="versions cozyerror" id="cozynest-error-instance-info"></div>
</fieldset>
<fieldset class="extensions-list">
<legend>Extensions</legend>
<div class="cozyerror" id="cozynest-error-extentions"></div>
</fieldset>
<div id="cozy_nest_error_handling_display"></div>
<div id="cozy_nest_error_handling_display_stack" /></div>
</div>
</div>
`;document.querySelector("body").insertAdjacentHTML("beforeend",e)}function TM(){document.querySelector("#cozy_nest_error_handling_display").innerHTML="",document.querySelector("#cozy_nest_error_handling_display_stack").innerHTML="",document.querySelector("#cozy_nest_error_handling_display_stack").setAttribute("style","display: none;"),document.querySelector("#cozynest-error-instance-info").innerHTML=document.querySelector(".versions").innerHTML+`<br><br>Browser: <span>${navigator.userAgent}</span><br><br>Window size: <span>${window.innerWidth}x${window.innerHeight}</span><br><br>WebUI: <span>${COZY_NEST_CONFIG.webui}</span>`,document.querySelector("#cozynest-error-extentions").innerHTML=document.querySelector("#tabs_extensions").querySelector("#extensions").parentElement.innerHTML,document.querySelector("#cozynest-error-extentions > table").querySelectorAll("tr").forEach(e=>{var n;if(!e.querySelector("td"))return;let t=e.querySelector("td").querySelector("label > input");t||(t=e.querySelector("td").querySelector("input"),(n=e.querySelector("button"))==null||n.setAttribute("disabled","disabled")),t.checked?t.setAttribute("disabled","disabled"):e.setAttribute("style","display: none;")})}function AM(){Jn("#dialog-message-wrap").css("display","flex")}function sq(){Jn("#dialog-message-wrap").css("display","none")}window.hideInstanceInfoDialog=sq;function lq(){TM(),AM()}window.gatherInfoAndShowDialog=lq;function JC({prefix:e}){if(!COZY_NEST_CONFIG.enable_clear_button){$t.debug("Clear button is disabled");return}const t=document.querySelector(`#${e}_gallery`);function n(c){a.style.display="block"}const r={childList:!0,subtree:!0};function i(c,u){var l;for(const f of c)f.type==="childList"&&f.removedNodes.length>0&&(l=f.removedNodes[0].classList)!=null&&l.contains("empty")&&n()}new MutationObserver(i).observe(t,r);function s(){const c=document.createElement("button");return c.id=`${e}_gallery_clear_button`,c.classList.add("nevysha","lg","primary","gradio-button"),c.style.display="none",c.title="Clear generated images gallery",c.innerHTML=KK,c.addEventListener("click",()=>{t.querySelectorAll("img").forEach(u=>{u&&(u.parentNode.style.display="none",d(u))}),c.style.display="none"}),t.insertAdjacentElement("beforebegin",c),c}function d(c){function u(h,p){for(const g of h)g.type==="attributes"&&g.attributeName==="src"&&(c.parentNode.style.display="block",p.disconnect(),a.style.display="block")}const l={attributes:!0,attributeFilter:["src"]};new MutationObserver(u).observe(c,l)}const a=s()}let nb,MM,LM;function uq(){const e=`
<div id="cozy-alert-wrap" title="Cozy Alert" style="display:none;">
<div>
<div class="header">
<h1 id="cozy-alert-title"></h1>
</div>
<p id="cozy-alert-msg"></p>
<button class="lg primary gradio-button svelte-1ipelgc nevysha" id="cozy-alert-close">Close</button>
</div>
</div>
`;document.querySelector("body").insertAdjacentHTML("beforeend",e),nb=document.querySelector("#cozy-alert-wrap"),MM=document.querySelector("#cozy-alert-title"),LM=document.querySelector("#cozy-alert-msg"),document.querySelector("#cozy-alert-close").addEventListener("click",()=>{nb.setAttribute("style","display: none;"),Gh&&(Gh(),Gh=null)})}let Gh=null;function Kp(e,t,n){MM.innerHTML=e,LM.innerHTML=t,nb.setAttribute("style","display: flex;"),Gh=n}window.showAlert=Kp;class cq extends SM{constructor(){super()}}const Rd=new cq;window.$=window.jQuery=Jn;const dq=({prefix:e})=>{const t=document.getElementById(`${e}_settings`);t.style.minWidth=`min(${iS}px, 100%)`;const n=$M();t.insertAdjacentElement("afterend",n);const r=t.parentElement;r.classList.add("nevysha","resizable-children-container");const i=document.getElementById(`${e}_results`);t.style.minWidth=`min(${oS}px, 100%)`;let o=localStorage.getItem(`${e}_linePosition`);o||(o=50,localStorage.setItem(`${e}_linePosition`,`${o}`)),t.style.flexBasis=`${o}%`,i.style.flexBasis=`${100-o}%`;let s=!1;n.addEventListener("mousedown",d=>{s=!0,d.preventDefault()}),document.addEventListener("mousemove",d=>{if(!s)return;const a=document.querySelector(`#tab_${e}`);let c=a.offsetLeft,u=a.offsetParent;for(;u;)c+=u.offsetLeft,u=u.offsetParent;const l=r.offsetWidth,h=(d.clientX-c)/l*100;h<=iS/l*100||h>=(1-oS/l)*100||(localStorage.setItem(`${e}_linePosition`,`${h}`),t.style.flexBasis=`${h}%`,i.style.flexBasis=`${100-h}%`)}),document.addEventListener("mouseup",()=>{s=!1})},fq=()=>{document.querySelectorAll("button").forEach(e=>{e.textContent.includes("📂")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M0 96C0 60.7 28.7 32 64 32H196.1c19.1 0 37.4 7.6 50.9 21.1L289.9 96H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM64 80c-8.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16H286.6c-10.6 0-20.8-4.2-28.3-11.7L213.1 87c-4.5-4.5-10.6-7-17-7H64z"/></svg>'),e.textContent.includes("🔄")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"/></svg>'),e.textContent.includes("↙️")&&(e.innerHTML='<svg class="nevysha svg-icon rotate" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"/></svg>'),e.textContent.includes("🗑️")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M135.2 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8c-12.1 0-23.2 6.8-28.6 17.7zM416 128H32L53.2 467c1.6 25.3 22.6 45 47.9 45H346.9c25.3 0 46.3-19.7 47.9-45L416 128z"/></svg>'),e.textContent.includes("🎴")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"/></svg>'),e.textContent.includes("📋")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M280 64h40c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128C0 92.7 28.7 64 64 64h40 9.6C121 27.5 153.3 0 192 0s71 27.5 78.4 64H280zM64 112c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320c8.8 0 16-7.2 16-16V128c0-8.8-7.2-16-16-16H304v24c0 13.3-10.7 24-24 24H192 104c-13.3 0-24-10.7-24-24V112H64zm128-8a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"/></svg>'),e.textContent.includes("💾")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M48 96V416c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V170.5c0-4.2-1.7-8.3-4.7-11.3l33.9-33.9c12 12 18.7 28.3 18.7 45.3V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96C0 60.7 28.7 32 64 32H309.5c17 0 33.3 6.7 45.3 18.7l74.5 74.5-33.9 33.9L320.8 84.7c-.3-.3-.5-.5-.8-.8V184c0 13.3-10.7 24-24 24H104c-13.3 0-24-10.7-24-24V80H64c-8.8 0-16 7.2-16 16zm80-16v80H272V80H128zm32 240a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"/></svg>'),e.textContent.includes("🎲️")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!-- Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M592 192H473.26c12.69 29.59 7.12 65.2-17 89.32L320 417.58V464c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V240c0-26.51-21.49-48-48-48zM480 376c-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 24zm-46.37-186.7L258.7 14.37c-19.16-19.16-50.23-19.16-69.39 0L14.37 189.3c-19.16 19.16-19.16 50.23 0 69.39L189.3 433.63c19.16 19.16 50.23 19.16 69.39 0L433.63 258.7c19.16-19.17 19.16-50.24 0-69.4zM96 248c-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 24zm128 128c-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 24zm0-128c-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 24zm0-128c-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 24zm128 128c-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"/></svg>'),e.textContent.includes("♻️")&&(e.innerHTML='<svg class="nevysha svg-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M174.7 45.1C192.2 17 223 0 256 0s63.8 17 81.3 45.1l38.6 61.7 27-15.6c8.4-4.9 18.9-4.2 26.6 1.7s11.1 15.9 8.6 25.3l-23.4 87.4c-3.4 12.8-16.6 20.4-29.4 17l-87.4-23.4c-9.4-2.5-16.3-10.4-17.6-20s3.4-19.1 11.8-23.9l28.4-16.4L283 79c-5.8-9.3-16-15-27-15s-21.2 5.7-27 15l-17.5 28c-9.2 14.8-28.6 19.5-43.6 10.5c-15.3-9.2-20.2-29.2-10.7-44.4l17.5-28zM429.5 251.9c15-9 34.4-4.3 43.6 10.5l24.4 39.1c9.4 15.1 14.4 32.4 14.6 50.2c.3 53.1-42.7 96.4-95.8 96.4L320 448v32c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-64-64c-9.4-9.4-9.4-24.6 0-33.9l64-64c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2v32l96.2 0c17.6 0 31.9-14.4 31.8-32c0-5.9-1.7-11.7-4.8-16.7l-24.4-39.1c-9.5-15.2-4.7-35.2 10.7-44.4zm-364.6-31L36 204.2c-8.4-4.9-13.1-14.3-11.8-23.9s8.2-17.5 17.6-20l87.4-23.4c12.8-3.4 26 4.2 29.4 17L182 241.2c2.5 9.4-.9 19.3-8.6 25.3s-18.2 6.6-26.6 1.7l-26.5-15.3L68.8 335.3c-3.1 5-4.8 10.8-4.8 16.7c-.1 17.6 14.2 32 31.8 32l32.2 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32.2 0C42.7 448-.3 404.8 0 351.6c.1-17.8 5.1-35.1 14.6-50.2l50.3-80.5z"/></svg>')})};function hq(){const e=document.getElementById("img2maskimg"),t=document.createElement("button");t.setAttribute("id","expendBtn"),t.setAttribute("class","nevysha lg primary gradio-button btn"),t.textContent="Expand",e.insertAdjacentElement("beforeend",t);const n=document.getElementById("img2maskimg");let r=n.getAttribute("style"),i=[],o=!1;t.addEventListener("click",()=>{if(document.querySelectorAll("canvas")){if(o)t.textContent="Expand",t.style.position="absolute",n.setAttribute("style",r),document.querySelector("#img2maskimg > .image-container").querySelector("button:nth-child(3)").style.display="block",i.forEach(s=>{document.getElementById(s.id).setAttribute("style",s.defaultStyle)});else{t.textContent="Reduce",t.style.position="fixed",n.style.position="fixed",n.style.zIndex=999,n.style.top="5px",n.style.left="5px",n.style.width="calc(100vw - 10px)",n.style.height="calc(100vh - 10px)",n.style.overflow="",document.querySelector("#img2maskimg > .image-container").querySelector("button:nth-child(3)").style.display="none";const s=document.querySelectorAll("canvas");i=[],s.forEach(d=>{let a=`nevysha-${d.getAttribute("key")}-canvas`;d.setAttribute("id",a),d.classList.add("nevysha"),i.push({id:a,defaultStyle:d.getAttribute("style")}),d.style.maxWidth="calc(100vw - 20px)",d.style.width="",d.style.maxHeight="calc(100vh - 20px)",d.style.height=""})}o=!o}})}function pq(e){document.getElementById(`${e.prefix}_gallery_container`).classList.add("nevysha","nevysha-scrollable")}function gq(){const e=new MutationObserver((r,i)=>{for(const o of r)if(o.type==="childList"&&Array.from(o.addedNodes).find(a=>a.id==="AWQ-container")){i.disconnect(),n();break}}),t={childList:!0,subtree:!0};e.observe(document.documentElement,t);const n=()=>{const r=document.querySelector("#AWQ-container"),i=document.createElement("div");i.id="nevysha_awq_wrapper",i.style.zIndex="9999",i.style.display="none",i.style.position="fixed",i.style.bottom="30px",document.body.appendChild(i),i.appendChild(r);const o=document.createElement("button");o.classList.add("nevysha-btn-menu","nevysha-btn-menu-awq","gradio-button","primary","nevysha"),o.id="nevyui_awq_btn",o.innerHTML="Show/Hide AWQ",o.title="Show/Hide AWQ",o.setAttribute("style","position: fixed; bottom: 0; left: calc(50% - 75px); width: 150px;"),document.querySelector("div.app").insertAdjacentElement("beforeend",o),o.addEventListener("click",()=>{i.style.display==="none"?i.style.display="block":i.style.display="none"})}}const mq=()=>{const e=document.createElement("div");e.classList.add("nevysha-btn-menu-wrapper"),e.id="nevysha-btn-menu-wrapper";const t=`<button class="nevysha-btn-menu" id="nevyui_update_info" title="Nevysha Cozy Nest Update Info">${UK}</button>`;e.insertAdjacentHTML("beforeend",t),document.querySelector("#tabs > div.tab-nav").insertAdjacentElement("beforeend",e);const n=document.createElement("div");n.classList.add("nevysha-update-tab","nevysha","nevysha-tab","nevysha-tab-settings"),n.id="nevyui_update_info_panel",n.style="display: none;",document.querySelector("#tabs").insertAdjacentElement("beforeend",n);function r(){let i=!1;document.querySelector("#nevyui_update_info").addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),document.querySelector("#tab_nevyui").style.display="block",i?Jn("#nevyui_update_info_panel").slideUp(Zh):Jn("#nevyui_update_info_panel").slideDown(Zh),i=!i})}r(),vq().then(i=>i)};async function vq(){const e=await(await fetch(`file=extensions/Cozy-Nest/version_data.json?${new Date}`)).json(),t=await(await fetch(`https://raw.githubusercontent.com/Nevysha/Cozy-Nest/main/version_data.json?${new Date}`)).json();let n=await(await fetch(`https://raw.githubusercontent.com/Nevysha/Cozy-Nest/main/PATCHNOTE.md?t=${new Date}`)).text(),r=`<div class="nevysha-tabnav nevysha-tabnav-settings"><h2 class="nevysha-tabnav-title">Patchnote [${t.version}]</h2></div>`;document.querySelector("#nevyui_update_info_panel").insertAdjacentHTML("beforeend",r);const i=/\[x\]/g;n=n.replace(i,"");const o=/\[ \]/g;n=n.replace(o,"");const d=`<article class="markdown-body nevysha nevysha-scrollable">${new IR.Converter().makeHtml(n)}</article>`;document.querySelector("#nevyui_update_info_panel").insertAdjacentHTML("beforeend",d);const a=document.createElement("div");a.classList.add("nevysha-version-info","nevysha-emphasis"),a.id="nevysha-version-info",document.querySelector("#nevyui_update_info_panel").insertAdjacentElement("afterbegin",a);const c='<button class="nevysha-btn-menu lg primary gradio-button nevysha generate-button" id="nevyui_update_btn" title="Update Cozy Nest">Update</button>';if(document.querySelector("#nevysha-version-info").insertAdjacentHTML("beforeend",c),document.querySelector("#nevyui_update_btn").addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),document.querySelector("#nevyui_sh_options_update").click(),document.querySelector("#nevyui_update_btn").innerHTML="Update in progress...",setTimeout(()=>{document.querySelector("#settings_restart_gradio").click()},5e3)}),jK(e.version,t.version)){const l=`<p class="nevysha-version-info-text">You are up to date! (installed: v${e.version})</p>`;document.querySelector("#nevysha-version-info").insertAdjacentHTML("afterbegin",l),document.querySelector("#nevyui_update_btn").style.display="none",document.getElementsByClassName("versions")[0].innerHTML+='Cozy Nest: <a href="https://github.com/Nevysha/Cozy-Nest" target="_blank">v'+e.version+"</a>"}else{const l=`<p class="nevysha-version-info-text">An update is available! (installed: v${e.version}, new : v${t.version})</p>`;document.querySelector("#nevysha-version-info").insertAdjacentHTML("afterbegin",l),document.querySelector("#nevyui_update_info > svg").style.fill="red",document.getElementsByClassName("versions")[0].innerHTML+=`Cozy Nest:<span style="color: #f9e02d; text-decoration: underline;" title="Nevysha's Cozy Nest Update Available! Latest version: v`+t.version+`.
View update info in the top-right corner for more details.">v`+e.version+"</span>"}const u='<button class="nevysha-btn-menu lg primary gradio-button nevysha generate-button" id="nevyui_update_info_close_btn" title="Close">Close</button>';document.querySelector("#nevysha-version-info").insertAdjacentHTML("afterbegin",u),document.querySelector("#nevyui_update_info_close_btn").addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),document.querySelector("#nevyui_update_info").click()})}const yq=()=>{const e=document.createElement("button"),t=document.querySelector("div#tabs > .tab-nav");e.setAttribute("id","nevysha_tab_wrapper"),e.classList.add("nevysha","tab-wrapper"),t.querySelector("button").classList.forEach(h=>{h.startsWith("svelte-")&&e.classList.add(h)}),e.innerHTML="Others",t.insertBefore(e,t.lastChild);const n=document.createElement("div");n.setAttribute("id","nevysha_other_tabs"),n.classList.add("nevysha","other-tabs"),n.style.display="none",e.appendChild(n);let r=!1;e.addEventListener("click",h=>{h.preventDefault(),h.stopPropagation(),r?Jn("#nevysha_other_tabs").slideUp(100):Jn("#nevysha_other_tabs").slideDown(200),r=!r});function i(h){h.dataTransfer.setData("text/plain",h.target.id)}function o(h){const p=JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[];p.includes(h.target.id)||(p.push(h.target.id),localStorage.setItem("nevysha_moved_tabs",JSON.stringify(p)))}function s(h){h.preventDefault()}function d(h){if(n.querySelector(`button #${h.id}`))return;const p=document.createElement("button");p.setAttribute("id",h.id),p.classList.add("nevysha","tab-nav","nevysha-other-tab"),p.setAttribute("draggable",!0),p.addEventListener("dragstart",i),p.addEventListener("dragend",o),p.addEventListener("click",x=>{x.preventDefault(),x.stopPropagation(),document.querySelector(`div#tabs > .tab-nav > #${h.id}`).click(),Jn("#nevysha_other_tabs").slideUp(),r=!r}),h.style.display="none",n.appendChild(p);const g=document.createElement("span");g.setAttribute("id",`remove-${h.id}`),g.classList.add("remove-nevysha-other-tab"),g.innerHTML="X",g.addEventListener("click",x=>{x.preventDefault(),x.stopPropagation(),n.removeChild(p),document.querySelector(`div#tabs > .tab-nav > #${h.id}`).style.display="block";const S=JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[],E=S.indexOf(h.id);E>-1&&S.splice(E,1),localStorage.setItem("nevysha_moved_tabs",JSON.stringify(S))}),p.appendChild(g);const y=document.createElement("span");y.classList.add("nevysha-other-tab-text"),y.innerHTML=h.innerHTML,p.appendChild(y)}function a(h){h.preventDefault();const p=document.querySelector(`button#${h.dataTransfer.getData("text/plain")}`);d(p),r=!r}n.addEventListener("dragover",s),n.addEventListener("drop",a);const c=t.querySelectorAll("button");function u(h){h.id||!h.innerText||(h.id=h.innerText.toLowerCase().replace(/\s/g,"_").replace(/[0-9]/g,""),h.setAttribute("draggable",!0),h.addEventListener("dragstart",i),h.addEventListener("dragend",o))}c.forEach(h=>{u(h),(JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[]).includes(h.id)&&d(h)});const l=new MutationObserver(h=>{h.forEach(p=>{if(p.type!=="childList"||p.addedNodes.length===0)return;const g=p.addedNodes[0];u(g),(JSON.parse(localStorage.getItem("nevysha_moved_tabs"))||[]).includes(g.id)&&(g.style.display="none",d(g))})}),f={attributes:!1,childList:!0,subtree:!1};l.observe(t,f)};function Zf(e,t,n,r,i){const o=document.createElement("button");o.setAttribute("id",`${e}_right_button`),o.classList.add("nevysha","lg","primary","gradio-button"),o.innerHTML=`<div>${t}</div>`,n.appendChild(o);const s=`<div id="${e}_panel" class="nevysha slide-right-browser-panel" style="display: none">
<div class="nevysha slide-right-browser-panel-container nevysha-scrollable ${e}_panel_inner">
<div class="nevysha" id="${e}-react"/>
</div>
</div>`;r.insertAdjacentHTML("beforeend",s);const d=$M(),a=document.querySelector(`#${e}_panel`),c=localStorage.getItem(`${e}_panelWidth`);if(c)a.style.width=c;else{const p=window.innerWidth;a.style.width=`${Math.round(p/2)}px`}a.appendChild(d);const u=document.createElement("button");u.setAttribute("id",`floating_close_${e}__panel_button`),u.classList.add("nevysha","lg","primary","gradio-button","nevysha-extra-network-floating-btn"),u.innerHTML="<div>Close</div>",u.addEventListener("click",p=>{o.click()}),d.insertBefore(u,d.firstChild),d.addEventListener("mousedown",function(p){p.preventDefault();let g=a.offsetWidth,y=p.clientX;document.addEventListener("mousemove",x),document.addEventListener("mouseup",S);function x(E){const v=E.clientX-y;a.style.width=g-v+"px"}function S(){localStorage.setItem(`${e}_panelWidth`,a.style.width),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",S)}});function l(){const p=document.querySelector(`#${e}_panel`);p.style.display==="none"?(p.style.display="flex",p.style.marginRight=`-${p.offsetWidth}px`,Jn(p).animate({"margin-right":`+=${p.offsetWidth}`},Zh)):Jn(p).animate({"margin-right":`-=${p.offsetWidth}`},Zh,()=>{p.style.display="none"})}function f(){const p=document.querySelector(`#${e}_panel`);p.style.display!=="none"&&Jn(p).animate({"margin-right":`-=${p.offsetWidth}`},150,()=>{p.style.display="none"})}function h(){return document.querySelector(`#${e}_panel`).style.display!=="none"}Pd[e]={toggle:l,close:f,isOpen:h},o.addEventListener("click",p=>{p.preventDefault(),p.stopPropagation(),Rd.emit(`extra_network-open:${i}`,i),l()})}let Pd={};function bq(){Pd={};const e=document.querySelector("div#tabs"),t=document.createElement("div");if(t.setAttribute("id","right_button_wrapper"),t.classList.add("nevysha","nevysha-right-button-wrapper"),e.insertAdjacentElement("beforeend",t),Gn.enable_extra_network_tweaks===!0&&(Zf("cozy-txt2img-extra-network","Extra Networks",t,e,"txt2img"),document.getElementById("cozy-txt2img-extra-network-react").classList.add("cozy-extra-network"),Zf("cozy-img2img-extra-network","Extra Network",t,e,"img2img"),document.getElementById("cozy-img2img-extra-network-react").classList.add("cozy-extra-network"),document.querySelector("#cozy-img2img-extra-network_right_button").style.display="none"),Gn.enable_cozy_extra_networks===!0){const n=Gn.enable_extra_network_tweaks?"Cozy Extra Networks":"Extra Networks";Zf("cozy-extra-network",n,t,e)}Gn.disable_image_browser!==!0&&Zf("cozy-img-browser","Cozy Image Browser",t,e),document.addEventListener("keydown",n=>{n.key==="Escape"&&Object.values(Pd).forEach(r=>{r.isOpen()&&(n.preventDefault(),n.stopPropagation(),r.close())})})}function wq(e){$t.debug(`setButtonVisibilityFromCurrentTab(${e})`),document.querySelector("#cozy-txt2img-extra-network_right_button").style.display="none",document.querySelector("#cozy-img2img-extra-network_right_button").style.display="none",e==="tab_txt2img"?document.querySelector("#cozy-txt2img-extra-network_right_button").style.display="flex":e==="tab_img2img"&&(document.querySelector("#cozy-img2img-extra-network_right_button").style.display="flex")}function Sq(e){TM(),document.querySelector("#cozy_nest_error_handling_display").innerHTML="An error in socket handler",document.querySelector("#cozy_nest_error_handling_display_stack").innerHTML=e.error,document.querySelector("#cozy_nest_error_handling_display_stack").setAttribute("style","display: block;"),AM()}window.errorPipe=Sq;async function xq(e,t){class n{constructor(d){this.files=[d]}}let r=document.querySelector("#nevysha-send-to > #nevysha_pnginfo_image > div.image-container > div");const i=await fetch(t.src).then(s=>s.blob());let o=new DragEvent("drop",{bubbles:!0,cancelable:!0});Object.defineProperty(o,"dataTransfer",{value:new n(i)}),r.dispatchEvent(o),e==="txt2img"?document.querySelector("#tabs > div.tab-nav").querySelector("#txtimg").click():e==="img2img"?(document.querySelector("#tabs > div.tab-nav").querySelector("#imgimg").click(),document.querySelectorAll("#mode_img2img > div > button")[0].click()):e==="inpainting"&&(document.querySelector("#tabs > div.tab-nav").querySelector("#imgimg").click(),document.querySelectorAll("#mode_img2img > div > button")[2].click()),setTimeout(()=>{let s;e==="txt2img"?s=document.querySelector("#nevysha-send-to-button > button#txt2img_tab"):e==="img2img"?s=document.querySelector("#nevysha-send-to-button > button#img2img_tab"):e==="inpainting"&&(s=document.querySelector("#nevysha-send-to-button > button#inpaint_tab")),s.click()},1e3)}window.sendToPipe=xq;window.troubleshootSize={};function _q(){const e=document.body;function t(o){const s=o;s.style.position="fixed";const d=s.parentElement;s.style.width=d.offsetWidth+"px";const a=d.getBoundingClientRect(),c=window.innerHeight,u=a.top,l=c-a.bottom;u<l?s.style.top=a.top+a.height+"px":s.style.bottom=window.innerHeight-a.top+"px"}const n=function(o,s){for(const d of o)if(d.type==="childList")for(const a of d.addedNodes)a.nodeType===1&&a.classList.contains("options")&&t(a)},r=new MutationObserver(n),i={childList:!0,subtree:!0};r.observe(e,i)}const rb=(e,t)=>{try{Eq(e,t)}catch(n){console.error("Failed to init Cozy Nest",n),t()}};function Cq(){document.querySelectorAll(".gradio-accordion > .label-wrap").forEach(t=>{t.addEventListener("click",()=>{t.classList.contains("open")?(t.parentElement.classList.add("nevysha-accordion-open"),t.parentElement.setAttribute("style",`${t.parentElement.getAttribute("style")} border-width: 2px 2px 0px !important;`)):(t.parentElement.classList.remove("nevysha-accordion-open"),t.parentElement.setAttribute("style",`${t.parentElement.getAttribute("style").replace("border-width: 2px 2px 0px !important;","")}`))})})}function kq(){const e=document.querySelectorAll("#script_list");e.forEach(n=>{n.setAttribute("style",`${n.getAttribute("style")} border-width: 2px 2px 0px !important;`);let r=n.parentElement.nextElementSibling;for(;r!==null;)r.classList.add("nevysha-scripts"),r=r.nextElementSibling});const t=new MutationObserver(n=>{n.forEach(r=>{var i,o;if(r.type==="subtree"&&$t.debug(`subtree mutation: ${r.removedNodes}`),r.type==="attributes"){let s=r.target;if(!r.target instanceof HTMLInputElement&&(s=r.target.querySelector("input")),!s)return;const d=s.value;d&&d!=="None"&&d.length>0?($t.debug("script: newValue",d),(i=QC(s,"#script_list"))==null||i.classList.add("nevysha-script-selected")):d==="None"&&($t.debug("script deselected"),(o=QC(s,"#script_list"))==null||o.classList.remove("nevysha-script-selected"))}})});e.forEach(n=>{t.observe(n,{attributes:!0,childList:!0,subtree:!0})})}const Eq=(e,t)=>{let n=window.gradioApp;if(typeof n!="function"){setTimeout(()=>rb(e,t),200);return}if(!n().getElementById("quicksettings")){setTimeout(()=>rb(e,t),200);return}Cr.time(Xh);const i=document.querySelector("#refresh_sd_model_checkpoint"),o="<div id='quicksettings_gap' class='nevysha' />";i.insertAdjacentHTML("afterend",o);const s=document.querySelector("body");s.style="",s.insertAdjacentHTML("beforeend",xM),document.querySelectorAll("#tabs > .tabitem").forEach(y=>y.setAttribute("class",`${y.getAttribute("class")} nevysha`)),document.querySelectorAll("#tabs > div.tab-nav").forEach(y=>y.setAttribute("class",`${y.getAttribute("class")} nevysha nevysha-tabnav`)),document.querySelectorAll('input[type="number"]').forEach(y=>y.setAttribute("class",`${y.getAttribute("class")} nevysha`)),document.querySelectorAll(".extra-network-cards").forEach(y=>y.setAttribute("class",`${y.getAttribute("class")} nevysha nevysha-scrollable`)),document.querySelectorAll("#cozy_nest_settings_tabs > .tabitem").forEach(y=>y.classList.add("nevysha","nevysha-scrollable")),document.querySelector("#nevysha-send-to").setAttribute("style","display: none;"),bq();let a=get_uiCurrentTabContent().id;onUiTabChange(()=>{$t.debug(`onUiTabChange newTab:${get_uiCurrentTabContent().id}, lastTab:${a}`),a==="tab_txt2img"?Pd["cozy-txt2img-extra-network"].close():a==="tab_img2img"&&Pd["cozy-img2img-extra-network"].close(),Gn.enable_extra_network_tweaks&&wq(get_uiCurrentTabContent().id),a=get_uiCurrentTabContent().id});const c=y=>{oq(y),iq(y),dq(y),pq(y),JC(y)};c({prefix:"txt2img"}),c({prefix:"img2img"}),JC({prefix:"extras"}),fq();const u=document.querySelector(`#${wu.get("clear_prompt")("img2img")}`).parentElement;u.classList.add("nevysha","nevysha-prompt-tools");const l=document.querySelector(`#${wu.get("clear_prompt")("txt2img")}`).parentElement;l.classList.add("nevysha","nevysha-prompt-tools");const f=[],h=document.querySelector("#txt2img_styles_row"),p=document.querySelector("#img2img_styles_row");f.push(()=>{l.insertBefore(h,l.firstChild),u.insertBefore(p,u.firstChild)});const g=document.querySelector("#interrogate").parentElement;for(const y of g.children)f.push(()=>{y.classList.add("nevysha","nevysha-interrogate-btn"),y.id==="interrogate"?y.innerHTML="CLIP":y.id==="deepbooru"&&(y.innerHTML="DeepBooru"),u.appendChild(y)});f.forEach(y=>y()),hq(),mq(),dm(),Cq(),kq(),yq(),_q(),Gn.extensions&&Gn.extensions.length>0&&Gn.extensions.includes("SDAtom-WebUi-client-queue-ext")&&gq(),e()};async function RM(e){e=e||Gn,await fetch("/cozy-nest/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function $q(){var e;if(Gn.webui===DR){$t.debug("webui is UNKNOWN. Trying to detect it.");const t=(e=document.querySelector('meta[property="og:title"]'))==null?void 0:e.getAttribute("content");t&&t===Fa?(Gn.webui=Fa,PM=!0):Gn.webui=l2,await RM()}$t.debug(`webui is ${Gn.webui}`)}async function Tq(e){if(new URLSearchParams(window.location.search).get("CozyNest")==="No"){$t.log("disabled by url param"),document.querySelectorAll("link").forEach(r=>{r.href.includes("Cozy-Nest")&&r.remove()});return}return await IM(),await $q(),Uh.start(),uq(),aq(),Aq(),new Promise(r=>{rb(async()=>{await e(),Uh.stop(),$t.log("running."),Cr.end(Xh),Cr.end(bu),PM&&Kp("Warning","Cozy Nest detected that you are using SD.Next and running Cozy Nest for the first time. To ensure compatibility, please restart the server."),r()},()=>{$t.error("ERROR loading CozyNest.");try{Uh.stop(),Cr.end(Xh),Cr.end(bu)}catch{}Kp("Error","There was an error while loading Cozy Nest. Ui will fallback to default.",()=>{window.location.replace(`${window.location.href}#CozyNest=No`),window.location.reload()}),r()})})}function Aq(){let e=!1;Rd.on("cozy-nest-loaded",()=>{e=!1}),window.addEventListener("error",function({message:t,filename:n,lineno:r,colno:i,error:o}){if(!e){$t.error(o);return}if(n.toLowerCase().includes("cozy-nest")){try{Uh.stop(),Cr.end(Xh),Cr.end(bu)}catch{}Kp("Error","There was an error while loading Cozy Nest. Ui will fallback to default.",()=>{window.location.replace(`${window.location.href}#CozyNest=No`),window.location.reload()})}})}let Gn,PM=!1;async function IM(){const e=await fetch(`file=extensions/Cozy-Nest/nevyui_settings.json?t=${Date.now()}`);e.ok&&(Gn=await e.json(),localStorage.setItem("COZY_NEST_CONFIG",JSON.stringify(Gn)),window.COZY_NEST_CONFIG=Gn)}var qr={},Gu={},Vo={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isEventSourceSupported=e.isReactNative=e.ReadyState=e.UNPARSABLE_JSON_OBJECT=e.DEFAULT_RECONNECT_INTERVAL_MS=e.DEFAULT_RECONNECT_LIMIT=e.SOCKET_IO_PING_CODE=e.SOCKET_IO_PATH=e.SOCKET_IO_PING_INTERVAL=e.DEFAULT_EVENT_SOURCE_OPTIONS=e.EMPTY_EVENT_HANDLERS=e.DEFAULT_OPTIONS=void 0;var t=1,n=1e3*t;e.DEFAULT_OPTIONS={},e.EMPTY_EVENT_HANDLERS={},e.DEFAULT_EVENT_SOURCE_OPTIONS={withCredentials:!1,events:e.EMPTY_EVENT_HANDLERS},e.SOCKET_IO_PING_INTERVAL=25*n,e.SOCKET_IO_PATH="/socket.io/?EIO=3&transport=websocket",e.SOCKET_IO_PING_CODE="2",e.DEFAULT_RECONNECT_LIMIT=20,e.DEFAULT_RECONNECT_INTERVAL_MS=5e3,e.UNPARSABLE_JSON_OBJECT={},function(i){i[i.UNINSTANTIATED=-1]="UNINSTANTIATED",i[i.CONNECTING=0]="CONNECTING",i[i.OPEN=1]="OPEN",i[i.CLOSING=2]="CLOSING",i[i.CLOSED=3]="CLOSED"}(e.ReadyState||(e.ReadyState={}));var r=function(){try{return"EventSource"in globalThis}catch{return!1}};e.isReactNative=typeof navigator<"u"&&navigator.product==="ReactNative",e.isEventSourceSupported=!e.isReactNative&&r()})(Vo);var fm={},hm={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetWebSockets=e.sharedWebSockets=void 0,e.sharedWebSockets={},e.resetWebSockets=function(t){if(t&&e.sharedWebSockets.hasOwnProperty(t))delete e.sharedWebSockets[t];else for(var n in e.sharedWebSockets)e.sharedWebSockets.hasOwnProperty(n)&&delete e.sharedWebSockets[n]}})(hm);var pm={},eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.setUpSocketIOPing=eo.appendQueryParams=eo.parseSocketIOUrl=void 0;var qp=Vo;eo.parseSocketIOUrl=function(e){if(e){var t=/^https|wss/.test(e),n=e.replace(/^(https?|wss?)(:\/\/)?/,""),r=n.replace(/\/$/,""),i=t?"wss":"ws";return i+"://"+r+qp.SOCKET_IO_PATH}else if(e===""){var t=/^https/.test(window.location.protocol),i=t?"wss":"ws",o=window.location.port?":"+window.location.port:"";return i+"://"+window.location.hostname+o+qp.SOCKET_IO_PATH}return e};eo.appendQueryParams=function(e,t){t===void 0&&(t={});var n=/\?([\w]+=[\w]+)/,r=n.test(e),i=""+Object.entries(t).reduce(function(o,s){var d=s[0],a=s[1];return o+(d+"="+a+"&")},"").slice(0,-1);return""+e+(r?"&":"?")+i};eo.setUpSocketIOPing=function(e,t){t===void 0&&(t=qp.SOCKET_IO_PING_INTERVAL);var n=function(){return e(qp.SOCKET_IO_PING_CODE)};return setInterval(n,t)};var Ha={},gm={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetSubscribers=e.removeSubscriber=e.addSubscriber=e.hasSubscribers=e.getSubscribers=void 0;var t={},n=[];e.getSubscribers=function(r){return e.hasSubscribers(r)?Array.from(t[r]):n},e.hasSubscribers=function(r){var i;return((i=t[r])===null||i===void 0?void 0:i.size)>0},e.addSubscriber=function(r,i){t[r]=t[r]||new Set,t[r].add(i)},e.removeSubscriber=function(r,i){t[r].delete(i)},e.resetSubscribers=function(r){if(r&&t.hasOwnProperty(r))delete t[r];else for(var i in t)t.hasOwnProperty(i)&&delete t[i]}})(gm);Object.defineProperty(Ha,"__esModule",{value:!0});Ha.resetGlobalState=Ha.assertIsWebSocket=void 0;var Mq=hm,Lq=gm;function Rq(e){if(!(e instanceof WebSocket))throw new Error("")}Ha.assertIsWebSocket=Rq;function Pq(e){Lq.resetSubscribers(e),Mq.resetWebSockets(e)}Ha.resetGlobalState=Pq;var Yp=Ue&&Ue.__assign||function(){return Yp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Yp.apply(this,arguments)};Object.defineProperty(pm,"__esModule",{value:!0});pm.attachListeners=void 0;var Iq=eo,qi=Vo,Oq=Ha,Fq=function(e,t,n){e.onmessage=function(r){t.current.onMessage&&t.current.onMessage(r),!(typeof t.current.filter=="function"&&t.current.filter(r)!==!0)&&n(r)}},Dq=function(e,t,n,r){e.onopen=function(i){t.current.onOpen&&t.current.onOpen(i),r.current=0,n(qi.ReadyState.OPEN)}},Nq=function(e,t,n,r,i){if(qi.isEventSourceSupported&&e instanceof EventSource)return function(){};Oq.assertIsWebSocket(e);var o;return e.onclose=function(s){var d,a;if(t.current.onClose&&t.current.onClose(s),n(qi.ReadyState.CLOSED),t.current.shouldReconnect&&t.current.shouldReconnect(s)){var c=(d=t.current.reconnectAttempts)!==null&&d!==void 0?d:qi.DEFAULT_RECONNECT_LIMIT;i.current<c?o=window.setTimeout(function(){i.current++,r()},(a=t.current.reconnectInterval)!==null&&a!==void 0?a:qi.DEFAULT_RECONNECT_INTERVAL_MS):(t.current.onReconnectStop&&t.current.onReconnectStop(c),console.warn("Max reconnect attempts of "+c+" exceeded"))}},function(){return o&&window.clearTimeout(o)}},zq=function(e,t,n,r,i){var o;return e.onerror=function(s){var d,a;t.current.onError&&t.current.onError(s),qi.isEventSourceSupported&&e instanceof EventSource&&(t.current.onClose&&t.current.onClose(Yp(Yp({},s),{code:1006,reason:"An error occurred with the EventSource: "+s,wasClean:!1})),n(qi.ReadyState.CLOSED),e.close()),t.current.retryOnError&&(i.current<((d=t.current.reconnectAttempts)!==null&&d!==void 0?d:qi.DEFAULT_RECONNECT_LIMIT)?o=window.setTimeout(function(){i.current++,r()},(a=t.current.reconnectInterval)!==null&&a!==void 0?a:qi.DEFAULT_RECONNECT_INTERVAL_MS):(t.current.onReconnectStop&&t.current.onReconnectStop(t.current.reconnectAttempts),console.warn("Max reconnect attempts of "+t.current.reconnectAttempts+" exceeded")))},function(){return o&&window.clearTimeout(o)}};pm.attachListeners=function(e,t,n,r,i,o){var s=t.setLastMessage,d=t.setReadyState,a,c,u;return n.current.fromSocketIO&&(a=Iq.setUpSocketIOPing(o)),Fq(e,n,s),Dq(e,n,d,i),c=Nq(e,n,d,r,i),u=zq(e,n,d,r,i),function(){d(qi.ReadyState.CLOSING),c(),u(),e.close(),a&&clearInterval(a)}};var mm={},Xp=Ue&&Ue.__assign||function(){return Xp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Xp.apply(this,arguments)};Object.defineProperty(mm,"__esModule",{value:!0});mm.attachSharedListeners=void 0;var jq=hm,Is=Vo,Id=gm,Bq=eo,Hq=function(e,t){e.onmessage=function(n){Id.getSubscribers(t).forEach(function(r){r.optionsRef.current.onMessage&&r.optionsRef.current.onMessage(n),!(typeof r.optionsRef.current.filter=="function"&&r.optionsRef.current.filter(n)!==!0)&&r.setLastMessage(n)})}},Vq=function(e,t){e.onopen=function(n){Id.getSubscribers(t).forEach(function(r){r.reconnectCount.current=0,r.optionsRef.current.onOpen&&r.optionsRef.current.onOpen(n),r.setReadyState(Is.ReadyState.OPEN)})}},Wq=function(e,t){e instanceof WebSocket&&(e.onclose=function(n){Id.getSubscribers(t).forEach(function(r){r.optionsRef.current.onClose&&r.optionsRef.current.onClose(n),r.setReadyState(Is.ReadyState.CLOSED)}),delete jq.sharedWebSockets[t],Id.getSubscribers(t).forEach(function(r){var i,o;if(r.optionsRef.current.shouldReconnect&&r.optionsRef.current.shouldReconnect(n)){var s=(i=r.optionsRef.current.reconnectAttempts)!==null&&i!==void 0?i:Is.DEFAULT_RECONNECT_LIMIT;r.reconnectCount.current<s?setTimeout(function(){r.reconnectCount.current++,r.reconnect.current()},(o=r.optionsRef.current.reconnectInterval)!==null&&o!==void 0?o:Is.DEFAULT_RECONNECT_INTERVAL_MS):(r.optionsRef.current.onReconnectStop&&r.optionsRef.current.onReconnectStop(r.optionsRef.current.reconnectAttempts),console.warn("Max reconnect attempts of "+s+" exceeded"))}})})},Uq=function(e,t){e.onerror=function(n){Id.getSubscribers(t).forEach(function(r){r.optionsRef.current.onError&&r.optionsRef.current.onError(n),Is.isEventSourceSupported&&e instanceof EventSource&&(r.optionsRef.current.onClose&&r.optionsRef.current.onClose(Xp(Xp({},n),{code:1006,reason:"An error occurred with the EventSource: "+n,wasClean:!1})),r.setReadyState(Is.ReadyState.CLOSED))}),Is.isEventSourceSupported&&e instanceof EventSource&&e.close()}};mm.attachSharedListeners=function(e,t,n,r){var i;return n.current.fromSocketIO&&(i=Bq.setUpSocketIOPing(r)),Hq(e,t),Wq(e,t),Vq(e,t),Uq(e,t),function(){i&&clearInterval(i)}};Object.defineProperty(fm,"__esModule",{value:!0});fm.createOrJoinSocket=void 0;var ga=hm,Ac=Vo,Gq=pm,Kq=mm,ib=gm,qq=function(e,t,n,r,i){return function(){if(ib.removeSubscriber(e,t),!ib.hasSubscribers(e)){try{var o=ga.sharedWebSockets[e];o instanceof WebSocket&&(o.onclose=function(s){n.current.onClose&&n.current.onClose(s),r(Ac.ReadyState.CLOSED)}),o.close()}catch{}i&&i(),delete ga.sharedWebSockets[e]}}};fm.createOrJoinSocket=function(e,t,n,r,i,o,s,d){if(!Ac.isEventSourceSupported&&r.current.eventSourceOptions)throw Ac.isReactNative?new Error("EventSource is not supported in ReactNative"):new Error("EventSource is not supported");if(r.current.share){var a=null;ga.sharedWebSockets[t]===void 0?(ga.sharedWebSockets[t]=r.current.eventSourceOptions?new EventSource(t,r.current.eventSourceOptions):new WebSocket(t,r.current.protocols),e.current=ga.sharedWebSockets[t],n(Ac.ReadyState.CONNECTING),a=Kq.attachSharedListeners(ga.sharedWebSockets[t],t,r,d)):(e.current=ga.sharedWebSockets[t],n(ga.sharedWebSockets[t].readyState));var c={setLastMessage:i,setReadyState:n,optionsRef:r,reconnectCount:s,reconnect:o};return ib.addSubscriber(t,c),qq(t,c,r,n,a)}else{if(e.current=r.current.eventSourceOptions?new EventSource(t,r.current.eventSourceOptions):new WebSocket(t,r.current.protocols),n(Ac.ReadyState.CONNECTING),!e.current)throw new Error("WebSocket failed to be created");return Gq.attachListeners(e.current,{setLastMessage:i,setReadyState:n},r,o.current,s,d)}};var vm={},Yq=Ue&&Ue.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function d(u){try{c(r.next(u))}catch(l){s(l)}}function a(u){try{c(r.throw(u))}catch(l){s(l)}}function c(u){u.done?o(u.value):i(u.value).then(d,a)}c((r=r.apply(e,t||[])).next())})},Xq=Ue&&Ue.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function d(c){return function(u){return a([c,u])}}function a(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(vm,"__esModule",{value:!0});vm.getUrl=void 0;var ek=eo;vm.getUrl=function(e,t){return Yq(void 0,void 0,void 0,function(){var n,r,i;return Xq(this,function(o){switch(o.label){case 0:return typeof e!="function"?[3,2]:[4,e()];case 1:return n=o.sent(),[3,3];case 2:n=e,o.label=3;case 3:return r=t.current.fromSocketIO?ek.parseSocketIOUrl(n):n,i=t.current.queryParams?ek.appendQueryParams(r,t.current.queryParams):r,[2,i]}})})};var OM={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.websocketWrapper=void 0,e.websocketWrapper=function(t,n){return new Proxy(t,{get:function(r,i){var o=r[i];return i==="reconnect"?n:typeof o=="function"?(console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."),function(){}):o},set:function(r,i,o){return/^on/.test(i)?(console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."),!1):(r[i]=o,!0)}})},e.default=e.websocketWrapper})(OM);var tu=Ue&&Ue.__assign||function(){return tu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},tu.apply(this,arguments)},Zq=Ue&&Ue.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function d(u){try{c(r.next(u))}catch(l){s(l)}}function a(u){try{c(r.throw(u))}catch(l){s(l)}}function c(u){u.done?o(u.value):i(u.value).then(d,a)}c((r=r.apply(e,t||[])).next())})},Qq=Ue&&Ue.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function d(c){return function(u){return a([c,u])}}function a(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Jq=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gu,"__esModule",{value:!0});Gu.useWebSocket=void 0;var Yn=F,vo=Vo,eY=fm,tY=vm,nY=Jq(OM),tk=Ha;Gu.useWebSocket=function(e,t,n){t===void 0&&(t=vo.DEFAULT_OPTIONS),n===void 0&&(n=!0);var r=Yn.useState(null),i=r[0],o=r[1],s=Yn.useState({}),d=s[0],a=s[1],c=Yn.useMemo(function(){if(i)try{return JSON.parse(i.data)}catch{return vo.UNPARSABLE_JSON_OBJECT}return null},[i]),u=Yn.useRef(null),l=Yn.useRef(null),f=Yn.useRef(function(){}),h=Yn.useRef(0),p=Yn.useRef([]),g=Yn.useRef(null),y=Yn.useRef(t);y.current=t;var x=u.current&&d[u.current]!==void 0?d[u.current]:e!==null&&n===!0?vo.ReadyState.CONNECTING:vo.ReadyState.UNINSTANTIATED,S=t.queryParams?JSON.stringify(t.queryParams):null,E=Yn.useCallback(function(b,m){var $;if(m===void 0&&(m=!0),vo.isEventSourceSupported&&l.current instanceof EventSource){console.warn("Unable to send a message from an eventSource");return}(($=l.current)===null||$===void 0?void 0:$.readyState)===vo.ReadyState.OPEN?(tk.assertIsWebSocket(l.current),l.current.send(b)):m&&p.current.push(b)},[]),v=Yn.useCallback(function(b,m){m===void 0&&(m=!0),E(JSON.stringify(b),m)},[E]),w=Yn.useCallback(function(){return y.current.share!==!0||vo.isEventSourceSupported&&l.current instanceof EventSource?l.current:(g.current===null&&l.current&&(tk.assertIsWebSocket(l.current),g.current=nY.default(l.current,f)),g.current)},[]);return Yn.useEffect(function(){if(e!==null&&n===!0){var b,m=!1,$=function(){return Zq(void 0,void 0,void 0,function(){var A,C,k;return Qq(this,function(I){switch(I.label){case 0:return A=u,[4,tY.getUrl(e,y)];case 1:return A.current=I.sent(),C=function(L){m||o(L)},k=function(L){m||a(function(T){var R;return tu(tu({},T),u.current&&(R={},R[u.current]=L,R))})},b=eY.createOrJoinSocket(l,u.current,k,y,C,f,h,E),[2]}})})};return f.current=function(){m||(g.current&&(g.current=null),b==null||b(),$())},$(),function(){m=!0,g.current&&(g.current=null),b==null||b(),o(null)}}else(e===null||n===!1)&&(h.current=0,a(function(A){var C;return tu(tu({},A),u.current&&(C={},C[u.current]=vo.ReadyState.CLOSED,C))}))},[e,n,S,E]),Yn.useEffect(function(){x===vo.ReadyState.OPEN&&p.current.splice(0).forEach(function(b){E(b)})},[x]),{sendMessage:E,sendJsonMessage:v,lastMessage:i,lastJsonMessage:c,readyState:x,getWebSocket:w}};var ym={},Zp=Ue&&Ue.__assign||function(){return Zp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Zp.apply(this,arguments)};Object.defineProperty(ym,"__esModule",{value:!0});ym.useSocketIO=void 0;var nk=F,rY=Gu,iY=Vo,ey={type:"empty",payload:null},oY=function(e){if(!e||!e.data)return ey;var t=e.data.match(/\[.*]/);if(!t)return ey;var n=JSON.parse(t);return!Array.isArray(n)||!n[1]?ey:{type:n[0],payload:n[1]}};ym.useSocketIO=function(e,t,n){t===void 0&&(t=iY.DEFAULT_OPTIONS),n===void 0&&(n=!0);var r=nk.useMemo(function(){return Zp(Zp({},t),{fromSocketIO:!0})},[]),i=rY.useWebSocket(e,r,n),o=i.sendMessage,s=i.sendJsonMessage,d=i.lastMessage,a=i.readyState,c=i.getWebSocket,u=nk.useMemo(function(){return oY(d)},[d]);return{sendMessage:o,sendJsonMessage:s,lastMessage:u,lastJsonMessage:u,readyState:a,getWebSocket:c}};var bm={},Qp=Ue&&Ue.__assign||function(){return Qp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qp.apply(this,arguments)},aY=Ue&&Ue.__rest||function(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);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(bm,"__esModule",{value:!0});bm.useEventSource=void 0;var rk=F,sY=Gu,ik=Vo;bm.useEventSource=function(e,t,n){t===void 0&&(t=ik.DEFAULT_EVENT_SOURCE_OPTIONS),n===void 0&&(n=!0);var r=t.withCredentials,i=t.events,o=aY(t,["withCredentials","events"]),s=Qp(Qp({},o),{eventSourceOptions:{withCredentials:r}}),d=rk.useRef(ik.EMPTY_EVENT_HANDLERS);i&&(d.current=i);var a=sY.useWebSocket(e,s,n),c=a.lastMessage,u=a.readyState,l=a.getWebSocket;return rk.useEffect(function(){c!=null&&c.type&&Object.entries(d.current).forEach(function(f){var h=f[0],p=f[1];h===c.type&&p(c)})},[c]),{lastEvent:c,readyState:u,getEventSource:l}};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Gu;Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.useWebSocket}});var n=ym;Object.defineProperty(e,"useSocketIO",{enumerable:!0,get:function(){return n.useSocketIO}});var r=Vo;Object.defineProperty(e,"ReadyState",{enumerable:!0,get:function(){return r.ReadyState}});var i=bm;Object.defineProperty(e,"useEventSource",{enumerable:!0,get:function(){return i.useEventSource}});var o=Ha;Object.defineProperty(e,"resetGlobalState",{enumerable:!0,get:function(){return o.resetGlobalState}})})(qr);const lY=ki(qr);function Cn(e){const t=e.className?e.className+" flex-row":"flex-row";return j.jsx("div",{...e,className:t,children:e.children})}const wo=e=>{const t={width:"100%",justifyContent:"space-between",gap:"30px"};return e.style&&Object.assign(t,e.style),j.jsx(Cn,{...e,style:t})};function Qr(e){const t=e.className?e.className+" flex-column":"flex-column";return j.jsx("div",{...e,className:t,children:e.children})}var FM={exports:{}};(function(e,t){(function(){var n="ace",r=function(){return this}();!r&&typeof window<"u"&&(r=window);var i=function(u,l,f){if(typeof u!="string"){i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(f=l),i.modules[u]||(i.payloads[u]=f,i.modules[u]=null)};i.modules={},i.payloads={};var o=function(u,l,f){if(typeof l=="string"){var h=a(u,l);if(h!=null)return f&&f(),h}else if(Object.prototype.toString.call(l)==="[object Array]"){for(var p=[],g=0,y=l.length;g<y;++g){var x=a(u,l[g]);if(x==null&&s.original)return;p.push(x)}return f&&f.apply(null,p)||!0}},s=function(u,l){var f=o("",u,l);return f==null&&s.original?s.original.apply(this,arguments):f},d=function(u,l){if(l.indexOf("!")!==-1){var f=l.split("!");return d(u,f[0])+"!"+d(u,f[1])}if(l.charAt(0)=="."){var h=u.split("/").slice(0,-1).join("/");for(l=h+"/"+l;l.indexOf(".")!==-1&&p!=l;){var p=l;l=l.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return l},a=function(u,l){l=d(u,l);var f=i.modules[l];if(!f){if(f=i.payloads[l],typeof f=="function"){var h={},p={id:l,uri:"",exports:h,packaged:!0},g=function(x,S){return o(l,x,S)},y=f(g,h,p);h=y||p.exports,i.modules[l]=h,delete i.payloads[l]}f=i.modules[l]=h||f}return f};function c(u){var l=r;u&&(r[u]||(r[u]={}),l=r[u]),(!l.define||!l.define.packaged)&&(i.original=l.define,l.define=i,l.define.packaged=!0),(!l.require||!l.require.packaged)&&(s.original=l.require,l.require=s,l.require.packaged=!0)}c(n)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(n,r,i){function o(s,d,a){Object.defineProperty(s,d,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||o(String.prototype,"startsWith",function(s,d){return d=d||0,this.lastIndexOf(s,d)===d}),String.prototype.endsWith||o(String.prototype,"endsWith",function(s,d){var a=this;(d===void 0||d>a.length)&&(d=a.length),d-=s.length;var c=a.indexOf(s,d);return c!==-1&&c===d}),String.prototype.repeat||o(String.prototype,"repeat",function(s){for(var d="",a=this;s>0;)s&1&&(d+=a),(s>>=1)&&(a+=a);return d}),String.prototype.includes||o(String.prototype,"includes",function(s,d){return this.indexOf(s,d)!=-1}),Object.assign||(Object.assign=function(s){if(s==null)throw new TypeError("Cannot convert undefined or null to object");for(var d=Object(s),a=1;a<arguments.length;a++){var c=arguments[a];c!=null&&Object.keys(c).forEach(function(u){d[u]=c[u]})}return d}),Object.values||(Object.values=function(s){return Object.keys(s).map(function(d){return s[d]})}),Array.prototype.find||o(Array.prototype,"find",function(s){for(var d=this.length,a=arguments[1],c=0;c<d;c++){var u=this[c];if(s.call(a,u,c,this))return u}}),Array.prototype.findIndex||o(Array.prototype,"findIndex",function(s){for(var d=this.length,a=arguments[1],c=0;c<d;c++){var u=this[c];if(s.call(a,u,c,this))return c}}),Array.prototype.includes||o(Array.prototype,"includes",function(s,d){return this.indexOf(s,d)!=-1}),Array.prototype.fill||o(Array.prototype,"fill",function(s){for(var d=this,a=d.length>>>0,c=arguments[1],u=c>>0,l=u<0?Math.max(a+u,0):Math.min(u,a),f=arguments[2],h=f===void 0?a:f>>0,p=h<0?Math.max(a+h,0):Math.min(h,a);l<p;)d[l]=s,l++;return d}),Array.of||o(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(n,r,i){n("./es6-shim")}),ace.define("ace/lib/lang",["require","exports","module"],function(n,r,i){r.last=function(d){return d[d.length-1]},r.stringReverse=function(d){return d.split("").reverse().join("")},r.stringRepeat=function(d,a){for(var c="";a>0;)a&1&&(c+=d),(a>>=1)&&(d+=d);return c};var o=/^\s\s*/,s=/\s\s*$/;r.stringTrimLeft=function(d){return d.replace(o,"")},r.stringTrimRight=function(d){return d.replace(s,"")},r.copyObject=function(d){var a={};for(var c in d)a[c]=d[c];return a},r.copyArray=function(d){for(var a=[],c=0,u=d.length;c<u;c++)d[c]&&typeof d[c]=="object"?a[c]=this.copyObject(d[c]):a[c]=d[c];return a},r.deepCopy=function d(a){if(typeof a!="object"||!a)return a;var c;if(Array.isArray(a)){c=[];for(var u=0;u<a.length;u++)c[u]=d(a[u]);return c}if(Object.prototype.toString.call(a)!=="[object Object]")return a;c={};for(var u in a)c[u]=d(a[u]);return c},r.arrayToMap=function(d){for(var a={},c=0;c<d.length;c++)a[d[c]]=1;return a},r.createMap=function(d){var a=Object.create(null);for(var c in d)a[c]=d[c];return a},r.arrayRemove=function(d,a){for(var c=0;c<=d.length;c++)a===d[c]&&d.splice(c,1)},r.escapeRegExp=function(d){return d.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},r.escapeHTML=function(d){return(""+d).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},r.getMatchOffsets=function(d,a){var c=[];return d.replace(a,function(u){c.push({offset:arguments[arguments.length-2],length:u.length})}),c},r.deferredCall=function(d){var a=null,c=function(){a=null,d()},u=function(l){return u.cancel(),a=setTimeout(c,l||0),u};return u.schedule=u,u.call=function(){return this.cancel(),d(),u},u.cancel=function(){return clearTimeout(a),a=null,u},u.isPending=function(){return a},u},r.delayedCall=function(d,a){var c=null,u=function(){c=null,d()},l=function(f){c==null&&(c=setTimeout(u,f||a))};return l.delay=function(f){c&&clearTimeout(c),c=setTimeout(u,f||a)},l.schedule=l,l.call=function(){this.cancel(),d()},l.cancel=function(){c&&clearTimeout(c),c=null},l.isPending=function(){return c},l}}),ace.define("ace/lib/useragent",["require","exports","module"],function(n,r,i){r.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},r.getOS=function(){return r.isMac?r.OS.MAC:r.isLinux?r.OS.LINUX:r.OS.WINDOWS};var o=typeof navigator=="object"?navigator:{},s=(/mac|win|linux/i.exec(o.platform)||["other"])[0].toLowerCase(),d=o.userAgent||"",a=o.appName||"";r.isWin=s=="win",r.isMac=s=="mac",r.isLinux=s=="linux",r.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((d.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((d.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),r.isOldIE=r.isIE&&r.isIE<9,r.isGecko=r.isMozilla=d.match(/ Gecko\/\d+/),r.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",r.isWebKit=parseFloat(d.split("WebKit/")[1])||void 0,r.isChrome=parseFloat(d.split(" Chrome/")[1])||void 0,r.isEdge=parseFloat(d.split(" Edge/")[1])||void 0,r.isAIR=d.indexOf("AdobeAIR")>=0,r.isAndroid=d.indexOf("Android")>=0,r.isChromeOS=d.indexOf(" CrOS ")>=0,r.isIOS=/iPad|iPhone|iPod/.test(d)&&!window.MSStream,r.isIOS&&(r.isMac=!0),r.isMobile=r.isIOS||r.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(n,r,i){var o=n("./useragent"),s="http://www.w3.org/1999/xhtml";r.buildDom=function f(h,p,g){if(typeof h=="string"&&h){var y=document.createTextNode(h);return p&&p.appendChild(y),y}if(!Array.isArray(h))return h&&h.appendChild&&p&&p.appendChild(h),h;if(typeof h[0]!="string"||!h[0]){for(var x=[],S=0;S<h.length;S++){var E=f(h[S],p,g);E&&x.push(E)}return x}var v=document.createElement(h[0]),w=h[1],b=1;w&&typeof w=="object"&&!Array.isArray(w)&&(b=2);for(var S=b;S<h.length;S++)f(h[S],v,g);return b==2&&Object.keys(w).forEach(function(m){var $=w[m];m==="class"?v.className=Array.isArray($)?$.join(" "):$:typeof $=="function"||m=="value"||m[0]=="$"?v[m]=$:m==="ref"?g&&(g[$]=v):m==="style"?typeof $=="string"&&(v.style.cssText=$):$!=null&&v.setAttribute(m,$)}),p&&p.appendChild(v),v},r.getDocumentHead=function(f){return f||(f=document),f.head||f.getElementsByTagName("head")[0]||f.documentElement},r.createElement=function(f,h){return document.createElementNS?document.createElementNS(h||s,f):document.createElement(f)},r.removeChildren=function(f){f.innerHTML=""},r.createTextNode=function(f,h){var p=h?h.ownerDocument:document;return p.createTextNode(f)},r.createFragment=function(f){var h=f?f.ownerDocument:document;return h.createDocumentFragment()},r.hasCssClass=function(f,h){var p=(f.className+"").split(/\s+/g);return p.indexOf(h)!==-1},r.addCssClass=function(f,h){r.hasCssClass(f,h)||(f.className+=" "+h)},r.removeCssClass=function(f,h){for(var p=f.className.split(/\s+/g);;){var g=p.indexOf(h);if(g==-1)break;p.splice(g,1)}f.className=p.join(" ")},r.toggleCssClass=function(f,h){for(var p=f.className.split(/\s+/g),g=!0;;){var y=p.indexOf(h);if(y==-1)break;g=!1,p.splice(y,1)}return g&&p.push(h),f.className=p.join(" "),g},r.setCssClass=function(f,h,p){p?r.addCssClass(f,h):r.removeCssClass(f,h)},r.hasCssString=function(f,h){var p=0,g;if(h=h||document,g=h.querySelectorAll("style")){for(;p<g.length;)if(g[p++].id===f)return!0}},r.removeElementById=function(f,h){h=h||document,h.getElementById(f)&&h.getElementById(f).remove()};var d,a=[];r.useStrictCSP=function(f){d=f,f==!1?c():a||(a=[])};function c(){var f=a;a=null,f&&f.forEach(function(h){u(h[0],h[1])})}function u(f,h,p){if(!(typeof document>"u")){if(a){if(p)c();else if(p===!1)return a.push([f,h])}if(!d){var g=p;!p||!p.getRootNode?g=document:(g=p.getRootNode(),(!g||g==p)&&(g=document));var y=g.ownerDocument||g;if(h&&r.hasCssString(h,g))return null;h&&(f+=`
/*# sourceURL=ace/css/`+h+" */");var x=r.createElement("style");x.appendChild(y.createTextNode(f)),h&&(x.id=h),g==y&&(g=r.getDocumentHead(y)),g.insertBefore(x,g.firstChild)}}}if(r.importCssString=u,r.importCssStylsheet=function(f,h){r.buildDom(["link",{rel:"stylesheet",href:f}],r.getDocumentHead(h))},r.scrollbarWidth=function(f){var h=r.createElement("ace_inner");h.style.width="100%",h.style.minWidth="0px",h.style.height="200px",h.style.display="block";var p=r.createElement("ace_outer"),g=p.style;g.position="absolute",g.left="-10000px",g.overflow="hidden",g.width="200px",g.minWidth="0px",g.height="150px",g.display="block",p.appendChild(h);var y=f&&f.documentElement||document&&document.documentElement;if(!y)return 0;y.appendChild(p);var x=h.offsetWidth;g.overflow="scroll";var S=h.offsetWidth;return x===S&&(S=p.clientWidth),y.removeChild(p),x-S},r.computedStyle=function(f,h){return window.getComputedStyle(f,"")||{}},r.setStyle=function(f,h,p){f[h]!==p&&(f[h]=p)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=o.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,o.isChromeOS&&(r.HI_DPI=!1),typeof document<"u"){var l=document.createElement("div");r.HI_DPI&&l.style.transform!==void 0&&(r.HAS_CSS_TRANSFORMS=!0),!o.isEdge&&typeof l.style.animationName<"u"&&(r.HAS_CSS_ANIMATION=!0),l=null}r.HAS_CSS_TRANSFORMS?r.translate=function(f,h,p){f.style.transform="translate("+Math.round(h)+"px, "+Math.round(p)+"px)"}:r.translate=function(f,h,p){f.style.top=Math.round(p)+"px",f.style.left=Math.round(h)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(n,r,i){/*
* based on code from:
*
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/var o=n("./dom");r.get=function(s,d){var a=new XMLHttpRequest;a.open("GET",s,!0),a.onreadystatechange=function(){a.readyState===4&&d(a.responseText)},a.send(null)},r.loadScript=function(s,d){var a=o.getDocumentHead(),c=document.createElement("script");c.src=s,a.appendChild(c),c.onload=c.onreadystatechange=function(u,l){(l||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,l||d())}},r.qualifyURL=function(s){var d=document.createElement("a");return d.href=s,d.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(n,r,i){r.inherits=function(o,s){o.super_=s,o.prototype=Object.create(s.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}})},r.mixin=function(o,s){for(var d in s)o[d]=s[d];return o},r.implement=function(o,s){r.mixin(o,s)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(n,r,i){var o={},s=function(){this.propagationStopped=!0},d=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(a,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var u=this._eventRegistry[a]||[],l=this._defaultHandlers[a];if(!(!u.length&&!l)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=a),c.stopPropagation||(c.stopPropagation=s),c.preventDefault||(c.preventDefault=d),u=u.slice();for(var f=0;f<u.length&&(u[f](c,this),!c.propagationStopped);f++);if(l&&!c.defaultPrevented)return l(c,this)}},o._signal=function(a,c){var u=(this._eventRegistry||{})[a];if(u){u=u.slice();for(var l=0;l<u.length;l++)u[l](c,this)}},o.once=function(a,c){var u=this;if(this.on(a,function l(){u.off(a,l),c.apply(null,arguments)}),!c)return new Promise(function(l){c=l})},o.setDefaultHandler=function(a,c){var u=this._defaultHandlers;if(u||(u=this._defaultHandlers={_disabled_:{}}),u[a]){var l=u[a],f=u._disabled_[a];f||(u._disabled_[a]=f=[]),f.push(l);var h=f.indexOf(c);h!=-1&&f.splice(h,1)}u[a]=c},o.removeDefaultHandler=function(a,c){var u=this._defaultHandlers;if(u){var l=u._disabled_[a];if(u[a]==c)l&&this.setDefaultHandler(a,l.pop());else if(l){var f=l.indexOf(c);f!=-1&&l.splice(f,1)}}},o.on=o.addEventListener=function(a,c,u){this._eventRegistry=this._eventRegistry||{};var l=this._eventRegistry[a];return l||(l=this._eventRegistry[a]=[]),l.indexOf(c)==-1&&l[u?"unshift":"push"](c),c},o.off=o.removeListener=o.removeEventListener=function(a,c){this._eventRegistry=this._eventRegistry||{};var u=this._eventRegistry[a];if(u){var l=u.indexOf(c);l!==-1&&u.splice(l,1)}},o.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},r.EventEmitter=o}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){"no use strict";var o=n("./oop"),s=n("./event_emitter").EventEmitter,d={setOptions:function(f){Object.keys(f).forEach(function(h){this.setOption(h,f[h])},this)},getOptions:function(f){var h={};if(f)Array.isArray(f)||(h=f,f=Object.keys(h));else{var p=this.$options;f=Object.keys(p).filter(function(g){return!p[g].hidden})}return f.forEach(function(g){h[g]=this.getOption(g)},this),h},setOption:function(f,h){if(this["$"+f]!==h){var p=this.$options[f];if(!p)return a('misspelled option "'+f+'"');if(p.forwardTo)return this[p.forwardTo]&&this[p.forwardTo].setOption(f,h);p.handlesSet||(this["$"+f]=h),p&&p.set&&p.set.call(this,h)}},getOption:function(f){var h=this.$options[f];return h?h.forwardTo?this[h.forwardTo]&&this[h.forwardTo].getOption(f):h&&h.get?h.get.call(this):this["$"+f]:a('misspelled option "'+f+'"')}};function a(f){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}function c(f,h){var p=new Error(f);p.data=h,typeof console=="object"&&console.error&&console.error(p),setTimeout(function(){throw p})}var u,l=function(){function f(){this.$defaultOptions={}}return f.prototype.defineOptions=function(h,p,g){return h.$options||(this.$defaultOptions[p]=h.$options={}),Object.keys(g).forEach(function(y){var x=g[y];typeof x=="string"&&(x={forwardTo:x}),x.name||(x.name=y),h.$options[x.name]=x,"initialValue"in x&&(h["$"+x.name]=x.initialValue)}),o.implement(h,d),this},f.prototype.resetOptions=function(h){Object.keys(h.$options).forEach(function(p){var g=h.$options[p];"value"in g&&h.setOption(p,g.value)})},f.prototype.setDefaultValue=function(h,p,g){if(!h){for(h in this.$defaultOptions)if(this.$defaultOptions[h][p])break;if(!this.$defaultOptions[h][p])return!1}var y=this.$defaultOptions[h]||(this.$defaultOptions[h]={});y[p]&&(y.forwardTo?this.setDefaultValue(y.forwardTo,p,g):y[p].value=g)},f.prototype.setDefaultValues=function(h,p){Object.keys(p).forEach(function(g){this.setDefaultValue(h,g,p[g])},this)},f.prototype.setMessages=function(h){u=h},f.prototype.nls=function(h,p){var g=u&&u[h]||h;return p&&(g=g.replace(/\$(\$|[\d]+)/g,function(y,x){return x=="$"?"$":p[x]})),g},f}();l.prototype.warn=a,l.prototype.reportError=c,o.implement(l.prototype,s),r.AppConfig=l}),ace.define("ace/theme/textmate.css",["require","exports","module"],function(n,r,i){i.exports=`.ace-tm .ace_gutter {
background: #f0f0f0;
color: #333;
}
.ace-tm .ace_print-margin {
width: 1px;
background: #e8e8e8;
}
.ace-tm .ace_fold {
background-color: #6B72E6;
}
.ace-tm {
background-color: #FFFFFF;
color: black;
}
.ace-tm .ace_cursor {
color: black;
}
.ace-tm .ace_invisible {
color: rgb(191, 191, 191);
}
.ace-tm .ace_storage,
.ace-tm .ace_keyword {
color: blue;
}
.ace-tm .ace_constant {
color: rgb(197, 6, 11);
}
.ace-tm .ace_constant.ace_buildin {
color: rgb(88, 72, 246);
}
.ace-tm .ace_constant.ace_language {
color: rgb(88, 92, 246);
}
.ace-tm .ace_constant.ace_library {
color: rgb(6, 150, 14);
}
.ace-tm .ace_invalid {
background-color: rgba(255, 0, 0, 0.1);
color: red;
}
.ace-tm .ace_support.ace_function {
color: rgb(60, 76, 114);
}
.ace-tm .ace_support.ace_constant {
color: rgb(6, 150, 14);
}
.ace-tm .ace_support.ace_type,
.ace-tm .ace_support.ace_class {
color: rgb(109, 121, 222);
}
.ace-tm .ace_keyword.ace_operator {
color: rgb(104, 118, 135);
}
.ace-tm .ace_string {
color: rgb(3, 106, 7);
}
.ace-tm .ace_comment {
color: rgb(76, 136, 107);
}
.ace-tm .ace_comment.ace_doc {
color: rgb(0, 102, 255);
}
.ace-tm .ace_comment.ace_doc.ace_tag {
color: rgb(128, 159, 191);
}
.ace-tm .ace_constant.ace_numeric {
color: rgb(0, 0, 205);
}
.ace-tm .ace_variable {
color: rgb(49, 132, 149);
}
.ace-tm .ace_xml-pe {
color: rgb(104, 104, 91);
}
.ace-tm .ace_entity.ace_name.ace_function {
color: #0000A2;
}
.ace-tm .ace_heading {
color: rgb(12, 7, 255);
}
.ace-tm .ace_list {
color:rgb(185, 6, 144);
}
.ace-tm .ace_meta.ace_tag {
color:rgb(0, 22, 142);
}
.ace-tm .ace_string.ace_regex {
color: rgb(255, 0, 0)
}
.ace-tm .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
}
.ace-tm.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px white;
}
.ace-tm .ace_marker-layer .ace_step {
background: rgb(252, 255, 0);
}
.ace-tm .ace_marker-layer .ace_stack {
background: rgb(164, 229, 101);
}
.ace-tm .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid rgb(192, 192, 192);
}
.ace-tm .ace_marker-layer .ace_active-line {
background: rgba(0, 0, 0, 0.07);
}
.ace-tm .ace_gutter-active-line {
background-color : #dcdcdc;
}
.ace-tm .ace_marker-layer .ace_selected-word {
background: rgb(250, 250, 255);
border: 1px solid rgb(200, 200, 250);
}
.ace-tm .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
}
.ace-tm .ace_indent-guide-active {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
}
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],function(n,r,i){r.isDark=!1,r.cssClass="ace-tm",r.cssText=n("./textmate.css"),r.$id="ace/theme/textmate";var o=n("../lib/dom");o.importCssString(r.cssText,r.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(n,r,i){"no use strict";var o=n("./lib/lang"),s=n("./lib/net"),d=n("./lib/dom"),a=n("./lib/app_config").AppConfig;i.exports=r=new a;var c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};r.get=function(f){if(!c.hasOwnProperty(f))throw new Error("Unknown config key: "+f);return c[f]},r.set=function(f,h){if(c.hasOwnProperty(f))c[f]=h;else if(this.setDefaultValue("",f,h)==!1)throw new Error("Unknown config key: "+f);f=="useStrictCSP"&&d.useStrictCSP(h)},r.all=function(){return o.copyObject(c)},r.$modes={},r.moduleUrl=function(f,h){if(c.$moduleUrls[f])return c.$moduleUrls[f];var p=f.split("/");h=h||p[p.length-2]||"";var g=h=="snippets"?"/":"-",y=p[p.length-1];if(h=="worker"&&g=="-"){var x=new RegExp("^"+h+"[\\-_]|[\\-_]"+h+"$","g");y=y.replace(x,"")}(!y||y==h)&&p.length>1&&(y=p[p.length-2]);var S=c[h+"Path"];return S==null?S=c.basePath:g=="/"&&(h=g=""),S&&S.slice(-1)!="/"&&(S+="/"),S+h+g+y+this.get("suffix")},r.setModuleUrl=function(f,h){return c.$moduleUrls[f]=h};var u=function(f,h){return f==="ace/theme/textmate"||f==="./theme/textmate"?h(null,n("./theme/textmate")):console.error("loader is not configured")};r.setLoader=function(f){u=f},r.dynamicModules=Object.create(null),r.$loading={},r.loadModule=function(f,h){var p,g;Array.isArray(f)&&(g=f[0],f=f[1]);var y=function(x){if(x&&!r.$loading[f])return h&&h(x);if(r.$loading[f]||(r.$loading[f]=[]),r.$loading[f].push(h),!(r.$loading[f].length>1)){var S=function(){u(f,function(E,v){r._emit("load.module",{name:f,module:v});var w=r.$loading[f];r.$loading[f]=null,w.forEach(function(b){b&&b(v)})})};if(!r.get("packaged"))return S();s.loadScript(r.moduleUrl(f,g),S),l()}};if(r.dynamicModules[f])r.dynamicModules[f]().then(function(x){x.default?y(x.default):y(x)});else{try{p=n(f)}catch{}y(p)}},r.setModuleLoader=function(f,h){r.dynamicModules[f]=h};var l=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),l=function(){})};r.version="1.22.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(n,r,i){n("./lib/fixoldbrowsers");var o=n("./config");o.setLoader(function(c,u){n([c],function(l){u(null,l)})});var s=function(){return this||typeof window<"u"&&window}();i.exports=function(c){o.init=d,c.require=n},d(!0);function d(c){if(!(!s||!s.document)){o.set("packaged",c||n.packaged||i.packaged||s.define&&(void 0).packaged);var u={},l="",f=document.currentScript||document._currentScript,h=f&&f.ownerDocument||document;f&&f.src&&(l=f.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var p=h.getElementsByTagName("script"),g=0;g<p.length;g++){var y=p[g],x=y.src||y.getAttribute("src");if(x){for(var S=y.attributes,E=0,v=S.length;E<v;E++){var w=S[E];w.name.indexOf("data-ace-")===0&&(u[a(w.name.replace(/^data-ace-/,""))]=w.value)}var b=x.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);b&&(l=b[1])}}l&&(u.base=u.base||l,u.packaged=!0),u.basePath=u.base,u.workerPath=u.workerPath||u.base,u.modePath=u.modePath||u.base,u.themePath=u.themePath||u.base,delete u.base;for(var m in u)typeof u[m]<"u"&&o.set(m,u[m])}}function a(c){return c.replace(/-(.)/g,function(u,l){return l.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(n,r,i){var o=function(d,a){return d.row-a.row||d.column-a.column},s=function(){function d(a,c,u,l){this.start={row:a,column:c},this.end={row:u,column:l}}return d.prototype.isEqual=function(a){return this.start.row===a.start.row&&this.end.row===a.end.row&&this.start.column===a.start.column&&this.end.column===a.end.column},d.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},d.prototype.contains=function(a,c){return this.compare(a,c)==0},d.prototype.compareRange=function(a){var c,u=a.end,l=a.start;return c=this.compare(u.row,u.column),c==1?(c=this.compare(l.row,l.column),c==1?2:c==0?1:0):c==-1?-2:(c=this.compare(l.row,l.column),c==-1?-1:c==1?42:0)},d.prototype.comparePoint=function(a){return this.compare(a.row,a.column)},d.prototype.containsRange=function(a){return this.comparePoint(a.start)==0&&this.comparePoint(a.end)==0},d.prototype.intersects=function(a){var c=this.compareRange(a);return c==-1||c==0||c==1},d.prototype.isEnd=function(a,c){return this.end.row==a&&this.end.column==c},d.prototype.isStart=function(a,c){return this.start.row==a&&this.start.column==c},d.prototype.setStart=function(a,c){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=c)},d.prototype.setEnd=function(a,c){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=c)},d.prototype.inside=function(a,c){return this.compare(a,c)==0?!(this.isEnd(a,c)||this.isStart(a,c)):!1},d.prototype.insideStart=function(a,c){return this.compare(a,c)==0?!this.isEnd(a,c):!1},d.prototype.insideEnd=function(a,c){return this.compare(a,c)==0?!this.isStart(a,c):!1},d.prototype.compare=function(a,c){return!this.isMultiLine()&&a===this.start.row?c<this.start.column?-1:c>this.end.column?1:0:a<this.start.row?-1:a>this.end.row?1:this.start.row===a?c>=this.start.column?0:-1:this.end.row===a?c<=this.end.column?0:1:0},d.prototype.compareStart=function(a,c){return this.start.row==a&&this.start.column==c?-1:this.compare(a,c)},d.prototype.compareEnd=function(a,c){return this.end.row==a&&this.end.column==c?1:this.compare(a,c)},d.prototype.compareInside=function(a,c){return this.end.row==a&&this.end.column==c?1:this.start.row==a&&this.start.column==c?-1:this.compare(a,c)},d.prototype.clipRows=function(a,c){if(this.end.row>c)var u={row:c+1,column:0};else if(this.end.row<a)var u={row:a,column:0};if(this.start.row>c)var l={row:c+1,column:0};else if(this.start.row<a)var l={row:a,column:0};return d.fromPoints(l||this.start,u||this.end)},d.prototype.extend=function(a,c){var u=this.compare(a,c);if(u==0)return this;if(u==-1)var l={row:a,column:c};else var f={row:a,column:c};return d.fromPoints(l||this.start,f||this.end)},d.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},d.prototype.isMultiLine=function(){return this.start.row!==this.end.row},d.prototype.clone=function(){return d.fromPoints(this.start,this.end)},d.prototype.collapseRows=function(){return this.end.column==0?new d(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new d(this.start.row,0,this.end.row,0)},d.prototype.toScreenRange=function(a){var c=a.documentToScreenPosition(this.start),u=a.documentToScreenPosition(this.end);return new d(c.row,c.column,u.row,u.column)},d.prototype.moveBy=function(a,c){this.start.row+=a,this.start.column+=c,this.end.row+=a,this.end.column+=c},d}();s.fromPoints=function(d,a){return new s(d.row,d.column,a.row,a.column)},s.comparePoints=o,s.comparePoints=function(d,a){return d.row-a.row||d.column-a.column},r.Range=s}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(n,r,i){/*! @license
==========================================================================
SproutCore -- JavaScript Application Framework
copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.
For more information about SproutCore, visit http://www.sproutcore.com
==========================================================================
@license */var o=n("./oop"),s=function(){var d={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};d.PRINTABLE_KEYS[173]="-";var a,c;for(c in d.FUNCTION_KEYS)a=d.FUNCTION_KEYS[c].toLowerCase(),d[a]=parseInt(c,10);for(c in d.PRINTABLE_KEYS)a=d.PRINTABLE_KEYS[c].toLowerCase(),d[a]=parseInt(c,10);return o.mixin(d,d.MODIFIER_KEYS),o.mixin(d,d.PRINTABLE_KEYS),o.mixin(d,d.FUNCTION_KEYS),d.enter=d.return,d.escape=d.esc,d.del=d.delete,function(){for(var u=["cmd","ctrl","alt","shift"],l=Math.pow(2,u.length);l--;)d.KEY_MODS[l]=u.filter(function(f){return l&d.KEY_MODS[f]}).join("-")+"-"}(),d.KEY_MODS[0]="",d.KEY_MODS[-1]="input-",d}();o.mixin(r,s),r.keyCodeToString=function(d){var a=s[d];return typeof a!="string"&&(a=String.fromCharCode(d)),a.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,i){var o=n("./keys"),s=n("./useragent"),d=null,a=0,c;function u(){c=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){c={passive:!1}}})}catch{}}function l(){return c==null&&u(),c}function f(E,v,w){this.elem=E,this.type=v,this.callback=w}f.prototype.destroy=function(){p(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h=r.addListener=function(E,v,w,b){E.addEventListener(v,w,l()),b&&b.$toDestroy.push(new f(E,v,w))},p=r.removeListener=function(E,v,w){E.removeEventListener(v,w,l())};r.stopEvent=function(E){return r.stopPropagation(E),r.preventDefault(E),!1},r.stopPropagation=function(E){E.stopPropagation&&E.stopPropagation()},r.preventDefault=function(E){E.preventDefault&&E.preventDefault()},r.getButton=function(E){return E.type=="dblclick"?0:E.type=="contextmenu"||s.isMac&&E.ctrlKey&&!E.altKey&&!E.shiftKey?2:E.button},r.capture=function(E,v,w){var b=E&&E.ownerDocument||document;function m($){v&&v($),w&&w($),p(b,"mousemove",v),p(b,"mouseup",m),p(b,"dragstart",m)}return h(b,"mousemove",v),h(b,"mouseup",m),h(b,"dragstart",m),m},r.addMouseWheelListener=function(E,v,w){h(E,"wheel",function(b){var m=.15,$=b.deltaX||0,A=b.deltaY||0;switch(b.deltaMode){case b.DOM_DELTA_PIXEL:b.wheelX=$*m,b.wheelY=A*m;break;case b.DOM_DELTA_LINE:var C=15;b.wheelX=$*C,b.wheelY=A*C;break;case b.DOM_DELTA_PAGE:var k=150;b.wheelX=$*k,b.wheelY=A*k;break}v(b)},w)},r.addMultiMouseDownListener=function(E,v,w,b,m){var $=0,A,C,k,I={2:"dblclick",3:"tripleclick",4:"quadclick"};function L(T){if(r.getButton(T)!==0?$=0:T.detail>1?($++,$>4&&($=1)):$=1,s.isIE){var R=Math.abs(T.clientX-A)>5||Math.abs(T.clientY-C)>5;(!k||R)&&($=1),k&&clearTimeout(k),k=setTimeout(function(){k=null},v[$-1]||600),$==1&&(A=T.clientX,C=T.clientY)}if(T._clicks=$,w[b]("mousedown",T),$>4)$=0;else if($>1)return w[b](I[$],T)}Array.isArray(E)||(E=[E]),E.forEach(function(T){h(T,"mousedown",L,m)})};var g=function(E){return 0|(E.ctrlKey?1:0)|(E.altKey?2:0)|(E.shiftKey?4:0)|(E.metaKey?8:0)};r.getModifierString=function(E){return o.KEY_MODS[g(E)]};function y(E,v,w){var b=g(v);if(!s.isMac&&d){if(v.getModifierState&&(v.getModifierState("OS")||v.getModifierState("Win"))&&(b|=8),d.altGr)if((3&b)!=3)d.altGr=0;else return;if(w===18||w===17){var m="location"in v?v.location:v.keyLocation;if(w===17&&m===1)d[w]==1&&(a=v.timeStamp);else if(w===18&&b===3&&m===2){var $=v.timeStamp-a;$<50&&(d.altGr=!0)}}}if(w in o.MODIFIER_KEYS&&(w=-1),!b&&w===13){var m="location"in v?v.location:v.keyLocation;if(m===3&&(E(v,b,-w),v.defaultPrevented))return}if(s.isChromeOS&&b&8){if(E(v,b,w),v.defaultPrevented)return;b&=-9}return!b&&!(w in o.FUNCTION_KEYS)&&!(w in o.PRINTABLE_KEYS)?!1:E(v,b,w)}r.addCommandKeyListener=function(E,v,w){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var b=null;h(E,"keydown",function($){b=$.keyCode},w),h(E,"keypress",function($){return y(v,$,b)},w)}else{var m=null;h(E,"keydown",function($){d[$.keyCode]=(d[$.keyCode]||0)+1;var A=y(v,$,$.keyCode);return m=$.defaultPrevented,A},w),h(E,"keypress",function($){m&&($.ctrlKey||$.altKey||$.shiftKey||$.metaKey)&&(r.stopEvent($),m=null)},w),h(E,"keyup",function($){d[$.keyCode]=null},w),d||(x(),h(window,"focus",x))}};function x(){d=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!s.isOldIE){var S=1;r.nextTick=function(E,v){v=v||window;var w="zero-timeout-message-"+S++,b=function(m){m.data==w&&(r.stopPropagation(m),p(v,"message",b),E())};h(v,"message",b),v.postMessage(w,"*")}}r.$idleBlocked=!1,r.onIdle=function(E,v){return setTimeout(function w(){r.$idleBlocked?setTimeout(w,100):E()},v)},r.$idleBlockId=null,r.blockIdle=function(E){r.$idleBlockId&&clearTimeout(r.$idleBlockId),r.$idleBlocked=!0,r.$idleBlockId=setTimeout(function(){r.$idleBlocked=!1},E||100)},r.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),r.nextFrame?r.nextFrame=r.nextFrame.bind(window):r.nextFrame=function(E){setTimeout(E,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(n,r,i){var o;i.exports={lineMode:!1,pasteCancelled:function(){return o&&o>Date.now()-50?!0:o=!1},cancel:function(){o=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(n,r,i){var o=n("../lib/event"),s=n("../config").nls,d=n("../lib/useragent"),a=n("../lib/dom"),c=n("../lib/lang"),u=n("../clipboard"),l=d.isChrome<18,f=d.isIE,h=d.isChrome>63,p=400,g=n("../lib/keys"),y=g.KEY_MODS,x=d.isIOS,S=x?/\s/:/\n/,E=d.isMobile,v=function(w,b){var m=a.createElement("textarea");m.className="ace_text-input",m.setAttribute("wrap","off"),m.setAttribute("autocorrect","off"),m.setAttribute("autocapitalize","off"),m.setAttribute("spellcheck",!1),m.style.opacity="0",w.insertBefore(m,w.firstChild);var $=!1,A=!1,C=!1,k=!1,I="";E||(m.style.fontSize="1px");var L=!1,T=!1,R="",P=0,D=0,N=0;try{var B=document.activeElement===m}catch{}this.setAriaOptions=function(ve){ve.activeDescendant?(m.setAttribute("aria-haspopup","true"),m.setAttribute("aria-autocomplete",ve.inline?"both":"list"),m.setAttribute("aria-activedescendant",ve.activeDescendant)):(m.setAttribute("aria-haspopup","false"),m.setAttribute("aria-autocomplete","both"),m.removeAttribute("aria-activedescendant")),ve.role&&m.setAttribute("role",ve.role)},this.setAriaLabel=function(){if(b.session&&b.renderer.enableKeyboardAccessibility){var ve=b.session.selection.cursor.row;m.setAttribute("aria-roledescription",s("editor")),m.setAttribute("aria-label",s("Cursor at row $0",[ve+1]))}else m.removeAttribute("aria-roledescription"),m.removeAttribute("aria-label")},this.setAriaOptions({role:"textbox"}),this.setAriaLabel(),o.addListener(m,"blur",function(ve){T||(b.onBlur(ve),B=!1,E&&!x&&document.removeEventListener("selectionchange",W))},b),o.addListener(m,"focus",function(ve){if(!T){if(B=!0,d.isEdge)try{if(!document.hasFocus())return}catch{}b.onFocus(ve),d.isEdge?setTimeout(Z):Z(),E&&!x&&document.addEventListener("selectionchange",W)}},b),this.$focusScroll=!1,this.focus=function(){if(this.setAriaLabel(),I||h||this.$focusScroll=="browser")return m.focus({preventScroll:!0});var ve=m.style.top;m.style.position="fixed",m.style.top="0px";try{var Se=m.getBoundingClientRect().top!=0}catch{return}var be=[];if(Se)for(var De=m.parentElement;De&&De.nodeType==1;)be.push(De),De.setAttribute("ace_nocontext",!0),!De.parentElement&&De.getRootNode?De=De.getRootNode().host:De=De.parentElement;m.focus({preventScroll:!0}),Se&&be.forEach(function(ot){ot.removeAttribute("ace_nocontext")}),setTimeout(function(){m.style.position="",m.style.top=="0px"&&(m.style.top=ve)},0)},this.blur=function(){m.blur()},this.isFocused=function(){return B},b.on("beforeEndOperation",function(){var ve=b.curOp,Se=ve&&ve.command&&ve.command.name;if(Se!="insertstring"){var be=Se&&(ve.docChanged||ve.selectionChanged);C&&be&&(R=m.value="",Ae()),Z()}});var Z=x?function(ve){if(!(!B||$&&!ve||k)){ve||(ve="");var Se=`
ab`+ve+`cde fg
`;Se!=m.value&&(m.value=R=Se);var be=4,De=4+(ve.length||(b.selection.isEmpty()?0:1));(P!=be||D!=De)&&m.setSelectionRange(be,De),P=be,D=De}}:function(){if(!(C||k)&&!(!B&&!Q)){C=!0;var ve=0,Se=0,be="";if(b.session){var De=b.selection,ot=De.getRange(),xe=De.cursor.row;if(ve=ot.start.column,Se=ot.end.column,be=b.session.getLine(xe),ot.start.row!=xe){var Re=b.session.getLine(xe-1);ve=ot.start.row<xe-1?0:ve,Se+=Re.length+1,be=Re+`
`+be}else if(ot.end.row!=xe){var Ve=b.session.getLine(xe+1);Se=ot.end.row>xe+1?Ve.length:Se,Se+=be.length+1,be=be+`
`+Ve}else E&&xe>0&&(be=`
`+be,Se+=1,ve+=1);be.length>p&&(ve<p&&Se<p?be=be.slice(0,p):(be=`
`,ve==Se?ve=Se=0:(ve=0,Se=1)))}var et=be+`
`;if(et!=R&&(m.value=R=et,P=D=et.length),Q&&(P=m.selectionStart,D=m.selectionEnd),D!=Se||P!=ve||m.selectionEnd!=D)try{m.setSelectionRange(ve,Se),P=ve,D=Se}catch{}C=!1}};this.resetSelection=Z,B&&b.onFocus();var U=function(ve){return ve.selectionStart===0&&ve.selectionEnd>=R.length&&ve.value===R&&R&&ve.selectionEnd!==D},X=function(ve){C||($?$=!1:U(m)?(b.selectAll(),Z()):E&&m.selectionStart!=P&&Z())};function W(ve){if((!m||!m.parentNode)&&document.removeEventListener("selectionchange",W),!C&&m.selectionStart===m.selectionEnd){var Se=m.selectionStart-P,be=D-P;Se>0?Se=Math.max(Se-be,1):Se===0&&be&&(Se=-1);for(var De=Math.abs(Se),ot=Se>0?g.right:g.left,xe=0;xe<De;xe++)b.onCommandKey({},0,ot)}}var q=null;this.setInputHandler=function(ve){q=ve},this.getInputHandler=function(){return q};var Q=!1,G=function(ve,Se){if(Q&&(Q=!1),A)return Z(),ve&&b.onPaste(ve),A=!1,"";for(var be=m.selectionStart,De=m.selectionEnd,ot=P,xe=R.length-D,Re=ve,Ve=ve.length-be,et=ve.length-De,at=0;ot>0&&R[at]==ve[at];)at++,ot--;for(Re=Re.slice(at),at=1;xe>0&&R.length-at>P-1&&R[R.length-at]==ve[ve.length-at];)at++,xe--;Ve-=at-1,et-=at-1;var At=Re.length-at+1;if(At<0&&(ot=-At,At=0),Re=Re.slice(0,At),!Se&&!Re&&!Ve&&!ot&&!xe&&!et)return"";k=!0;var un=!1;return d.isAndroid&&Re==". "&&(Re=" ",un=!0),Re&&!ot&&!xe&&!Ve&&!et||L?b.onTextInput(Re):b.onTextInput(Re,{extendLeft:ot,extendRight:xe,restoreStart:Ve,restoreEnd:et}),k=!1,R=ve,P=be,D=De,N=et,un?`
`:Re},oe=function(ve){if(C)return Ee();if(ve&&ve.inputType){if(ve.inputType=="historyUndo")return b.execCommand("undo");if(ve.inputType=="historyRedo")return b.execCommand("redo")}var Se=m.value,be=G(Se,!0);(Se.length>p+100||S.test(be)||E&&P<1&&P==D)&&Z()},ne=function(ve,Se,be){var De=ve.clipboardData||window.clipboardData;if(!(!De||l)){var ot=f||be?"Text":"text/plain";try{return Se?De.setData(ot,Se)!==!1:De.getData(ot)}catch(xe){if(!be)return ne(xe,Se,!0)}}},ce=function(ve,Se){var be=b.getCopyText();if(!be)return o.preventDefault(ve);ne(ve,be)?(x&&(Z(be),$=be,setTimeout(function(){$=!1},10)),Se?b.onCut():b.onCopy(),o.preventDefault(ve)):($=!0,m.value=be,m.select(),setTimeout(function(){$=!1,Z(),Se?b.onCut():b.onCopy()}))},fe=function(ve){ce(ve,!0)},he=function(ve){ce(ve,!1)},me=function(ve){var Se=ne(ve);u.pasteCancelled()||(typeof Se=="string"?(Se&&b.onPaste(Se,ve),d.isIE&&setTimeout(Z),o.preventDefault(ve)):(m.value="",A=!0))};o.addCommandKeyListener(m,b.onCommandKey.bind(b),b),o.addListener(m,"select",X,b),o.addListener(m,"input",oe,b),o.addListener(m,"cut",fe,b),o.addListener(m,"copy",he,b),o.addListener(m,"paste",me,b),(!("oncut"in m)||!("oncopy"in m)||!("onpaste"in m))&&o.addListener(w,"keydown",function(ve){if(!(d.isMac&&!ve.metaKey||!ve.ctrlKey))switch(ve.keyCode){case 67:he(ve);break;case 86:me(ve);break;case 88:fe(ve);break}},b);var Pe=function(ve){if(!(C||!b.onCompositionStart||b.$readOnly)&&(C={},!L)){ve.data&&(C.useTextareaForIME=!1),setTimeout(Ee,0),b._signal("compositionStart"),b.on("mousedown",Fe);var Se=b.getSelectionRange();Se.end.row=Se.start.row,Se.end.column=Se.start.column,C.markerRange=Se,C.selectionStart=P,b.onCompositionStart(C),C.useTextareaForIME?(R=m.value="",P=0,D=0):(m.msGetInputContext&&(C.context=m.msGetInputContext()),m.getInputContext&&(C.context=m.getInputContext()))}},Ee=function(){if(!(!C||!b.onCompositionUpdate||b.$readOnly)){if(L)return Fe();if(C.useTextareaForIME)b.onCompositionUpdate(m.value);else{var ve=m.value;G(ve),C.markerRange&&(C.context&&(C.markerRange.start.column=C.selectionStart=C.context.compositionStartOffset),C.markerRange.end.column=C.markerRange.start.column+D-C.selectionStart+N)}}},Ae=function(ve){!b.onCompositionEnd||b.$readOnly||(C=!1,b.onCompositionEnd(),b.off("mousedown",Fe),ve&&oe())};function Fe(){T=!0,m.blur(),m.focus(),T=!1}var Be=c.delayedCall(Ee,50).schedule.bind(null,null);function lt(ve){ve.keyCode==27&&m.value.length<m.selectionStart&&(C||(R=m.value),P=D=-1,Z()),Be()}o.addListener(m,"compositionstart",Pe,b),o.addListener(m,"compositionupdate",Ee,b),o.addListener(m,"keyup",lt,b),o.addListener(m,"keydown",Be,b),o.addListener(m,"compositionend",Ae,b),this.getElement=function(){return m},this.setCommandMode=function(ve){L=ve,m.readOnly=!1},this.setReadOnly=function(ve){L||(m.readOnly=ve)},this.setCopyWithEmptySelection=function(ve){},this.onContextMenu=function(ve){Q=!0,Z(),b._emit("nativecontextmenu",{target:b,domEvent:ve}),this.moveToMouse(ve,!0)},this.moveToMouse=function(ve,Se){I||(I=m.style.cssText),m.style.cssText=(Se?"z-index:100000;":"")+(d.isIE?"opacity:0.1;":"")+"text-indent: -"+(P+D)*b.renderer.characterWidth*.5+"px;";var be=b.container.getBoundingClientRect(),De=a.computedStyle(b.container),ot=be.top+(parseInt(De.borderTopWidth)||0),xe=be.left+(parseInt(be.borderLeftWidth)||0),Re=be.bottom-ot-m.clientHeight-2,Ve=function(et){a.translate(m,et.clientX-xe-2,Math.min(et.clientY-ot-2,Re))};Ve(ve),ve.type=="mousedown"&&(b.renderer.$isMousePressed=!0,clearTimeout(qt),d.isWin&&o.capture(b.container,Ve,pt))},this.onContextMenuClose=pt;var qt;function pt(){clearTimeout(qt),qt=setTimeout(function(){I&&(m.style.cssText=I,I=""),b.renderer.$isMousePressed=!1,b.renderer.$keepTextAreaAtCursor&&b.renderer.$moveTextAreaToCursor()},0)}var on=function(ve){b.textInput.onContextMenu(ve),pt()};o.addListener(m,"mouseup",on,b),o.addListener(m,"mousedown",function(ve){ve.preventDefault(),pt()},b),o.addListener(b.renderer.scroller,"contextmenu",on,b),o.addListener(m,"contextmenu",on,b),x&&xt(w,b,m);function xt(ve,Se,be){var De=null,ot=!1;be.addEventListener("keydown",function(Re){De&&clearTimeout(De),ot=!0},!0),be.addEventListener("keyup",function(Re){De=setTimeout(function(){ot=!1},100)},!0);var xe=function(Re){if(document.activeElement===be&&!(ot||C||Se.$mouseHandler.isMousePressed)&&!$){var Ve=be.selectionStart,et=be.selectionEnd,at=null,At=0;if(Ve==0?at=g.up:Ve==1?at=g.home:et>D&&R[et]==`
`?at=g.end:Ve<P&&R[Ve-1]==" "?(at=g.left,At=y.option):Ve<P||Ve==P&&D!=P&&Ve==et?at=g.left:et>D&&R.slice(0,et).split(`
`).length>2?at=g.down:et>D&&R[et-1]==" "?(at=g.right,At=y.option):(et>D||et==D&&D!=P&&Ve==et)&&(at=g.right),Ve!==et&&(At|=y.shift),at){var un=Se.onCommandKey({},At,at);if(!un&&Se.commands){at=g.keyCodeToString(at);var Dn=Se.commands.findKeyCommand(At,at);Dn&&Se.execCommand(Dn)}P=Ve,D=et,Z("")}}};document.addEventListener("selectionchange",xe),Se.on("destroy",function(){document.removeEventListener("selectionchange",xe)})}this.destroy=function(){m.parentElement&&m.parentElement.removeChild(m)}};r.TextInput=v,r.$setUserAgentForTests=function(w,b){E=w,x=b}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(n,r,i){var o=n("../lib/useragent"),s=0,d=550,a=function(){function l(f){f.$clickSelection=null;var h=f.editor;h.setDefaultHandler("mousedown",this.onMouseDown.bind(f)),h.setDefaultHandler("dblclick",this.onDoubleClick.bind(f)),h.setDefaultHandler("tripleclick",this.onTripleClick.bind(f)),h.setDefaultHandler("quadclick",this.onQuadClick.bind(f)),h.setDefaultHandler("mousewheel",this.onMouseWheel.bind(f));var p=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];p.forEach(function(g){f[g]=this[g]},this),f.selectByLines=this.extendSelectionBy.bind(f,"getLineRange"),f.selectByWords=this.extendSelectionBy.bind(f,"getWordRange")}return l.prototype.onMouseDown=function(f){var h=f.inSelection(),p=f.getDocumentPosition();this.mousedownEvent=f;var g=this.editor,y=f.getButton();if(y!==0){var x=g.getSelectionRange(),S=x.isEmpty();(S||y==1)&&g.selection.moveToPosition(p),y==2&&(g.textInput.onContextMenu(f.domEvent),o.isMozilla||f.preventDefault());return}if(this.mousedownEvent.time=Date.now(),h&&!g.isFocused()&&(g.focus(),this.$focusTimeout&&!this.$clickSelection&&!g.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(f);return}return this.captureMouse(f),this.startSelect(p,f.domEvent._clicks>1),f.preventDefault()},l.prototype.startSelect=function(f,h){f=f||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var p=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?p.selection.selectToPosition(f):h||p.selection.moveToPosition(f),h||this.select(),p.setStyle("ace_selecting"),this.setState("select"))},l.prototype.select=function(){var f,h=this.editor,p=h.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(p);if(g==-1)f=this.$clickSelection.end;else if(g==1)f=this.$clickSelection.start;else{var y=u(this.$clickSelection,p);p=y.cursor,f=y.anchor}h.selection.setSelectionAnchor(f.row,f.column)}h.selection.selectToPosition(p),h.renderer.scrollCursorIntoView()},l.prototype.extendSelectionBy=function(f){var h,p=this.editor,g=p.renderer.screenToTextCoordinates(this.x,this.y),y=p.selection[f](g.row,g.column);if(this.$clickSelection){var x=this.$clickSelection.comparePoint(y.start),S=this.$clickSelection.comparePoint(y.end);if(x==-1&&S<=0)h=this.$clickSelection.end,(y.end.row!=g.row||y.end.column!=g.column)&&(g=y.start);else if(S==1&&x>=0)h=this.$clickSelection.start,(y.start.row!=g.row||y.start.column!=g.column)&&(g=y.end);else if(x==-1&&S==1)g=y.end,h=y.start;else{var E=u(this.$clickSelection,g);g=E.cursor,h=E.anchor}p.selection.setSelectionAnchor(h.row,h.column)}p.selection.selectToPosition(g),p.renderer.scrollCursorIntoView()},l.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},l.prototype.focusWait=function(){var f=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),h=Date.now();(f>s||h-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},l.prototype.onDoubleClick=function(f){var h=f.getDocumentPosition(),p=this.editor,g=p.session,y=g.getBracketRange(h);y?(y.isEmpty()&&(y.start.column--,y.end.column++),this.setState("select")):(y=p.selection.getWordRange(h.row,h.column),this.setState("selectByWords")),this.$clickSelection=y,this.select()},l.prototype.onTripleClick=function(f){var h=f.getDocumentPosition(),p=this.editor;this.setState("selectByLines");var g=p.getSelectionRange();g.isMultiLine()&&g.contains(h.row,h.column)?(this.$clickSelection=p.selection.getLineRange(g.start.row),this.$clickSelection.end=p.selection.getLineRange(g.end.row).end):this.$clickSelection=p.selection.getLineRange(h.row),this.select()},l.prototype.onQuadClick=function(f){var h=this.editor;h.selectAll(),this.$clickSelection=h.getSelectionRange(),this.setState("selectAll")},l.prototype.onMouseWheel=function(f){if(!f.getAccelKey()){f.getShiftKey()&&f.wheelY&&!f.wheelX&&(f.wheelX=f.wheelY,f.wheelY=0);var h=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var p=this.$lastScroll,g=f.domEvent.timeStamp,y=g-p.t,x=y?f.wheelX/y:p.vx,S=y?f.wheelY/y:p.vy;y<d&&(x=(x+p.vx)/2,S=(S+p.vy)/2);var E=Math.abs(x/S),v=!1;if(E>=1&&h.renderer.isScrollableBy(f.wheelX*f.speed,0)&&(v=!0),E<=1&&h.renderer.isScrollableBy(0,f.wheelY*f.speed)&&(v=!0),v)p.allowed=g;else if(g-p.allowed<d){var w=Math.abs(x)<=1.5*Math.abs(p.vx)&&Math.abs(S)<=1.5*Math.abs(p.vy);w?(v=!0,p.allowed=g):p.allowed=0}if(p.t=g,p.vx=x,p.vy=S,v)return h.renderer.scrollBy(f.wheelX*f.speed,f.wheelY*f.speed),f.stop()}},l}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,r.DefaultHandlers=a;function c(l,f,h,p){return Math.sqrt(Math.pow(h-l,2)+Math.pow(p-f,2))}function u(l,f){if(l.start.row==l.end.row)var h=2*f.column-l.start.column-l.end.column;else if(l.start.row==l.end.row-1&&!l.start.column&&!l.end.column)var h=f.column-4;else var h=2*f.row-l.start.row-l.end.row;return h<0?{cursor:l.start,anchor:l.end}:{cursor:l.end,anchor:l.start}}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/range"],function(n,r,i){var o=this&&this.__extends||function(){var p=function(g,y){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var E in S)Object.prototype.hasOwnProperty.call(S,E)&&(x[E]=S[E])},p(g,y)};return function(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");p(g,y);function x(){this.constructor=g}g.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}}(),s=this&&this.__values||function(p){var g=typeof Symbol=="function"&&Symbol.iterator,y=g&&p[g],x=0;if(y)return y.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&x>=p.length&&(p=void 0),{value:p&&p[x++],done:!p}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")},d=n("./lib/dom"),a=n("./range").Range,c="ace_tooltip",u=function(){function p(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}return p.prototype.$init=function(){return this.$element=d.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},p.prototype.getElement=function(){return this.$element||this.$init()},p.prototype.setText=function(g){this.getElement().textContent=g},p.prototype.setHtml=function(g){this.getElement().innerHTML=g},p.prototype.setPosition=function(g,y){this.getElement().style.left=g+"px",this.getElement().style.top=y+"px"},p.prototype.setClassName=function(g){d.addCssClass(this.getElement(),g)},p.prototype.setTheme=function(g){this.$element.className=c+" "+(g.isDark?"ace_dark ":"")+(g.cssClass||"")},p.prototype.show=function(g,y,x){g!=null&&this.setText(g),y!=null&&x!=null&&this.setPosition(y,x),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},p.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},p.prototype.getHeight=function(){return this.getElement().offsetHeight},p.prototype.getWidth=function(){return this.getElement().offsetWidth},p.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},p}(),l=function(){function p(){this.popups=[]}return p.prototype.addPopup=function(g){this.popups.push(g),this.updatePopups()},p.prototype.removePopup=function(g){var y=this.popups.indexOf(g);y!==-1&&(this.popups.splice(y,1),this.updatePopups())},p.prototype.updatePopups=function(){var g,y,x,S;this.popups.sort(function(k,I){return I.priority-k.priority});var E=[];try{for(var v=s(this.popups),w=v.next();!w.done;w=v.next()){var b=w.value,m=!0;try{for(var $=(x=void 0,s(E)),A=$.next();!A.done;A=$.next()){var C=A.value;if(this.doPopupsOverlap(C,b)){m=!1;break}}}catch(k){x={error:k}}finally{try{A&&!A.done&&(S=$.return)&&S.call($)}finally{if(x)throw x.error}}m?E.push(b):b.hide()}}catch(k){g={error:k}}finally{try{w&&!w.done&&(y=v.return)&&y.call(v)}finally{if(g)throw g.error}}},p.prototype.doPopupsOverlap=function(g,y){var x=g.getElement().getBoundingClientRect(),S=y.getElement().getBoundingClientRect();return x.left<S.right&&x.right>S.left&&x.top<S.bottom&&x.bottom>S.top},p}(),f=new l;r.popupManager=f,r.Tooltip=u;var h=function(p){o(g,p);function g(y){y===void 0&&(y=document.body);var x=p.call(this,y)||this;x.timeout=void 0,x.lastT=0,x.idleTime=350,x.lastEvent=void 0,x.onMouseOut=x.onMouseOut.bind(x),x.onMouseMove=x.onMouseMove.bind(x),x.waitForHover=x.waitForHover.bind(x),x.hide=x.hide.bind(x);var S=x.getElement();return S.style.whiteSpace="pre-wrap",S.style.pointerEvents="auto",S.addEventListener("mouseout",x.onMouseOut),S.tabIndex=-1,S.addEventListener("blur",function(){S.contains(document.activeElement)||this.hide()}.bind(x)),x}return g.prototype.addToEditor=function(y){y.on("mousemove",this.onMouseMove),y.on("mousedown",this.hide),y.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},g.prototype.removeFromEditor=function(y){y.off("mousemove",this.onMouseMove),y.off("mousedown",this.hide),y.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},g.prototype.onMouseMove=function(y,x){this.lastEvent=y,this.lastT=Date.now();var S=x.$mouseHandler.isMousePressed;if(this.isOpen){var E=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(E.row,E.column)||S||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||S||(this.lastEvent=y,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var y=Date.now()-this.lastT;if(this.idleTime-y>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-y);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},g.prototype.isOutsideOfText=function(y){var x=y.editor,S=y.getDocumentPosition(),E=x.session.getLine(S.row);if(S.column==E.length){var v=x.renderer.pixelToScreenCoordinates(y.clientX,y.clientY),w=x.session.documentToScreenPosition(S.row,S.column);if(w.column!=v.column||w.row!=v.row)return!0}return!1},g.prototype.setDataProvider=function(y){this.$gatherData=y},g.prototype.showForRange=function(y,x,S,E){if(!(E&&E!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var v=y.renderer;this.isOpen||(f.addPopup(this),this.$registerCloseEvents(),this.setTheme(v.theme)),this.isOpen=!0,this.addMarker(x,y.session),this.range=a.fromPoints(x.start,x.end);var w=this.getElement();w.innerHTML="",w.appendChild(S),w.style.display="block";var b=v.textToScreenCoordinates(x.start.row,x.start.column),m=y.getCursorPosition(),$=w.clientHeight,A=v.scroller.getBoundingClientRect(),C=!0;this.row>m.row?C=!0:this.row<m.row&&(C=!1),b.pageY-$+v.lineHeight<A.top?C=!0:b.pageY+$>A.bottom&&(C=!1),C?b.pageY+=v.lineHeight:b.pageY-=$,w.style.maxWidth=A.width-(b.pageX-A.left)+"px",this.setPosition(b.pageX,b.pageY)}},g.prototype.addMarker=function(y,x){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=x,this.marker=x&&x.addMarker(y,"ace_highlight-marker","text")},g.prototype.hide=function(y){!y&&document.activeElement==this.getElement()||y&&y.target&&(y.type!="keydown"||y.ctrlKey||y.metaKey)&&this.$element.contains(y.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,f.removePopup(this)))},g.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},g.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},g.prototype.onMouseOut=function(y){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!y.relatedTarget||y.relatedTarget==this.getElement()||y&&y.currentTarget.contains(y.relatedTarget)||y.relatedTarget.classList.contains("ace_content")||this.hide())},g}(u);r.HoverTooltip=h}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(n,r,i){var o=this&&this.__extends||function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,x){y.__proto__=x}||function(y,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(y[S]=x[S])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function y(){this.constructor=p}p.prototype=g===null?Object.create(g):(y.prototype=g.prototype,new y)}}(),s=this&&this.__values||function(h){var p=typeof Symbol=="function"&&Symbol.iterator,g=p&&h[p],y=0;if(g)return g.call(h);if(h&&typeof h.length=="number")return{next:function(){return h&&y>=h.length&&(h=void 0),{value:h&&h[y++],done:!h}}};throw new TypeError(p?"Object is not iterable.":"Symbol.iterator is not defined.")},d=n("../lib/dom"),a=n("../lib/event"),c=n("../tooltip").Tooltip,u=n("../config").nls;function l(h){var p=h.editor,g=p.renderer.$gutterLayer,y=new f(p);h.editor.setDefaultHandler("guttermousedown",function(b){if(!(!p.isFocused()||b.getButton()!=0)){var m=g.getRegion(b);if(m!="foldWidgets"){var $=b.getDocumentPosition().row,A=p.session.selection;if(b.getShiftKey())A.selectTo($,0);else{if(b.domEvent.detail==2)return p.selectAll(),b.preventDefault();h.$clickSelection=p.selection.getLineRange($)}return h.setState("selectByLines"),h.captureMouse(b),b.preventDefault()}}});var x,S;function E(){var b=S.getDocumentPosition().row,m=p.session.getLength();if(b==m){var $=p.renderer.pixelToScreenCoordinates(0,S.y).row,A=S.$pos;if($>p.session.documentToScreenRow(A.row,A.column))return v()}if(y.showTooltip(b),!!y.isOpen)if(p.on("mousewheel",v),h.$tooltipFollowsMouse)w(S);else{var C=g.$lines.cells[b].element.querySelector("[class*=ace_icon]"),k=C.getBoundingClientRect(),I=y.getElement().style;I.left=k.right+"px",I.top=k.bottom+"px"}}function v(){x&&(x=clearTimeout(x)),y.isOpen&&(y.hide(),p._signal("hideGutterTooltip",y),p.off("mousewheel",v))}function w(b){y.setPosition(b.x,b.y)}h.editor.setDefaultHandler("guttermousemove",function(b){var m=b.domEvent.target||b.domEvent.srcElement;if(d.hasCssClass(m,"ace_fold-widget"))return v();y.isOpen&&h.$tooltipFollowsMouse&&w(b),S=b,!x&&(x=setTimeout(function(){x=null,S&&!h.isMousePressed?E():v()},50))}),a.addListener(p.renderer.$gutter,"mouseout",function(b){S=null,!(!y.isOpen||x)&&(x=setTimeout(function(){x=null,v()},50))},p),p.on("changeSession",v),p.on("input",v)}r.GutterHandler=l;var f=function(h){o(p,h);function p(g){var y=h.call(this,g.container)||this;return y.editor=g,y}return p.prototype.setPosition=function(g,y){var x=window.innerWidth||document.documentElement.clientWidth,S=window.innerHeight||document.documentElement.clientHeight,E=this.getWidth(),v=this.getHeight();g+=15,y+=15,g+E>x&&(g-=g+E-x),y+v>S&&(y-=20+v),c.prototype.setPosition.call(this,g,y)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:u("error"),plural:u("errors")},warning:{singular:u("warning"),plural:u("warnings")},info:{singular:u("information message"),plural:u("information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(g){var y=this.editor.renderer.$gutterLayer,x=y.$annotations[g],S;x?S={text:Array.from(x.text),type:Array.from(x.type)}:S={text:[],type:[]};var E=y.session.getFoldLine(g);if(E&&y.$showFoldedAnnotations){for(var v={error:[],warning:[],info:[]},w,b=g+1;b<=E.end.row;b++)if(y.$annotations[b])for(var m=0;m<y.$annotations[b].text.length;m++){var $=y.$annotations[b].type[m];if(v[$].push(y.$annotations[b].text[m]),$==="error"){w="error_fold";continue}if($==="warning"){w="warning_fold";continue}}if(w==="error_fold"||w==="warning_fold"){var A="".concat(p.annotationsToSummaryString(v)," in folded code.");S.text.push(A),S.type.push(w)}}if(S.text.length===0)return this.hide();for(var C={error:[],warning:[],info:[]},k=y.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",b=0;b<S.text.length;b++){var I="<span class='ace_".concat(S.type[b]," ").concat(k,"' aria-label='").concat(p.annotationLabels[S.type[b].replace("_fold","")].singular,"' role=img> </span> ").concat(S.text[b]);C[S.type[b].replace("_fold","")].push(I)}var L=[].concat(C.error,C.warning,C.info).join("<br>");this.setHtml(L),this.setClassName("ace_gutter-tooltip"),this.$element.setAttribute("aria-live","polite"),this.isOpen||this.setTheme(this.editor.renderer.theme),this.editor._signal("showGutterTooltip",this),this.show()},p.annotationsToSummaryString=function(g){var y,x,S=[],E=["error","warning","info"];try{for(var v=s(E),w=v.next();!w.done;w=v.next()){var b=w.value;if(g[b].length){var m=g[b].length===1?p.annotationLabels[b].singular:p.annotationLabels[b].plural;S.push("".concat(g[b].length," ").concat(m))}}}catch($){y={error:$}}finally{try{w&&!w.done&&(x=v.return)&&x.call(v)}finally{if(y)throw y.error}}return S.join(", ")},p}(c);r.GutterTooltip=f}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,i){var o=n("../lib/event"),s=n("../lib/useragent"),d=function(){function a(c,u){this.domEvent=c,this.editor=u,this.x=this.clientX=c.clientX,this.y=this.clientY=c.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){o.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){o.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var c=this.editor,u=c.getSelectionRange();if(u.isEmpty())this.$inSelection=!1;else{var l=this.getDocumentPosition();this.$inSelection=u.contains(l.row,l.column)}return this.$inSelection},a.prototype.getButton=function(){return o.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return s.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();r.MouseEvent=d}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(n,r,i){var o=n("../lib/dom"),s=n("../lib/event"),d=n("../lib/useragent"),a=200,c=200,u=5;function l(h){var p=h.editor,g=o.createElement("div");g.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",g.textContent=" ";var y=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];y.forEach(function(W){h[W]=this[W]},this),p.on("mousedown",this.onMouseDown.bind(h));var x=p.container,S,E,v,w,b,m,$=0,A,C,k,I,L;this.onDragStart=function(W){if(this.cancelDrag||!x.draggable){var q=this;return setTimeout(function(){q.startSelect(),q.captureMouse(W)},0),W.preventDefault()}b=p.getSelectionRange();var Q=W.dataTransfer;Q.effectAllowed=p.getReadOnly()?"copy":"copyMove",p.container.appendChild(g),Q.setDragImage&&Q.setDragImage(g,0,0),setTimeout(function(){p.container.removeChild(g)}),Q.clearData(),Q.setData("Text",p.session.getTextRange()),C=!0,this.setState("drag")},this.onDragEnd=function(W){if(x.draggable=!1,C=!1,this.setState(null),!p.getReadOnly()){var q=W.dataTransfer.dropEffect;!A&&q=="move"&&p.session.remove(p.getSelectionRange()),p.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(W){if(!(p.getReadOnly()||!U(W.dataTransfer)))return E=W.clientX,v=W.clientY,S||D(),$++,W.dataTransfer.dropEffect=A=X(W),s.preventDefault(W)},this.onDragOver=function(W){if(!(p.getReadOnly()||!U(W.dataTransfer)))return E=W.clientX,v=W.clientY,S||(D(),$++),B!==null&&(B=null),W.dataTransfer.dropEffect=A=X(W),s.preventDefault(W)},this.onDragLeave=function(W){if($--,$<=0&&S)return N(),A=null,s.preventDefault(W)},this.onDrop=function(W){if(m){var q=W.dataTransfer;if(C)switch(A){case"move":b.contains(m.row,m.column)?b={start:m,end:m}:b=p.moveText(b,m);break;case"copy":b=p.moveText(b,m,!0);break}else{var Q=q.getData("Text");b={start:m,end:p.session.insert(m,Q)},p.focus(),A=null}return N(),s.preventDefault(W)}},s.addListener(x,"dragstart",this.onDragStart.bind(h),p),s.addListener(x,"dragend",this.onDragEnd.bind(h),p),s.addListener(x,"dragenter",this.onDragEnter.bind(h),p),s.addListener(x,"dragover",this.onDragOver.bind(h),p),s.addListener(x,"dragleave",this.onDragLeave.bind(h),p),s.addListener(x,"drop",this.onDrop.bind(h),p);function T(W,q){var Q=Date.now(),G=!q||W.row!=q.row,oe=!q||W.column!=q.column;if(!I||G||oe)p.moveCursorToPosition(W),I=Q,L={x:E,y:v};else{var ne=f(L.x,L.y,E,v);ne>u?I=null:Q-I>=c&&(p.renderer.scrollCursorIntoView(),I=null)}}function R(W,q){var Q=Date.now(),G=p.renderer.layerConfig.lineHeight,oe=p.renderer.layerConfig.characterWidth,ne=p.renderer.scroller.getBoundingClientRect(),ce={x:{left:E-ne.left,right:ne.right-E},y:{top:v-ne.top,bottom:ne.bottom-v}},fe=Math.min(ce.x.left,ce.x.right),he=Math.min(ce.y.top,ce.y.bottom),me={row:W.row,column:W.column};fe/oe<=2&&(me.column+=ce.x.left<ce.x.right?-3:2),he/G<=1&&(me.row+=ce.y.top<ce.y.bottom?-1:1);var Pe=W.row!=me.row,Ee=W.column!=me.column,Ae=!q||W.row!=q.row;Pe||Ee&&!Ae?k?Q-k>=a&&p.renderer.scrollCursorIntoView(me):k=Q:k=null}function P(){var W=m;m=p.renderer.screenToTextCoordinates(E,v),T(m,W),R(m,W)}function D(){b=p.selection.toOrientedRange(),S=p.session.addMarker(b,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),P(),w=setInterval(P,20),$=0,s.addListener(document,"mousemove",Z)}function N(){clearInterval(w),p.session.removeMarker(S),S=null,p.selection.fromOrientedRange(b),p.isFocused()&&!C&&p.$resetCursorStyle(),b=null,m=null,$=0,k=null,I=null,s.removeListener(document,"mousemove",Z)}var B=null;function Z(){B==null&&(B=setTimeout(function(){B!=null&&S&&N()},20))}function U(W){var q=W.types;return!q||Array.prototype.some.call(q,function(Q){return Q=="text/plain"||Q=="Text"})}function X(W){var q=["copy","copymove","all","uninitialized"],Q=["move","copymove","linkmove","all","uninitialized"],G=d.isMac?W.altKey:W.ctrlKey,oe="uninitialized";try{oe=W.dataTransfer.effectAllowed.toLowerCase()}catch{}var ne="none";return G&&q.indexOf(oe)>=0?ne="copy":Q.indexOf(oe)>=0?ne="move":q.indexOf(oe)>=0&&(ne="copy"),ne}}(function(){this.dragWait=function(){var h=Date.now()-this.mousedownEvent.time;h>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var h=this.editor.container;h.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(h){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var h=this.editor,p=h.container;p.draggable=!0,h.renderer.$cursorLayer.setBlinking(!1),h.setStyle("ace_dragging");var g=d.isWin?"default":"move";h.renderer.setCursorStyle(g),this.setState("dragReady")},this.onMouseDrag=function(h){var p=this.editor.container;if(d.isIE&&this.state=="dragReady"){var g=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>3&&p.dragDrop()}if(this.state==="dragWait"){var g=f(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);g>0&&(p.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(h){if(this.$dragEnabled){this.mousedownEvent=h;var p=this.editor,g=h.inSelection(),y=h.getButton(),x=h.domEvent.detail||1;if(x===1&&y===0&&g){if(h.editor.inMultiSelectMode&&(h.getAccelKey()||h.getShiftKey()))return;this.mousedownEvent.time=Date.now();var S=h.domEvent.target||h.domEvent.srcElement;if("unselectable"in S&&(S.unselectable="on"),p.getDragDelay()){if(d.isWebKit){this.cancelDrag=!0;var E=p.container;E.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(h,this.onMouseDrag.bind(this)),h.defaultPrevented=!0}}}}).call(l.prototype);function f(h,p,g,y){return Math.sqrt(Math.pow(g-h,2)+Math.pow(y-p,2))}r.DragdropHandler=l}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(n,r,i){var o=n("./mouse_event").MouseEvent,s=n("../lib/event"),d=n("../lib/dom");r.addTouchListeners=function(a,c){var u="scroll",l,f,h,p,g,y,x=0,S,E=0,v=0,w=0,b,m;function $(){var T=window.navigator&&window.navigator.clipboard,R=!1,P=function(){var N=c.getCopyText(),B=c.session.getUndoManager().hasUndo();m.replaceChild(d.buildDom(R?["span",!N&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],N&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],N&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],T&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],B&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),m.firstChild)},D=function(N){var B=N.target.getAttribute("action");if(B=="more"||!R)return R=!R,P();B=="paste"?T.readText().then(function(Z){c.execCommand(B,Z)}):B&&((B=="cut"||B=="copy")&&(T?T.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(B)),m.firstChild.style.display="none",R=!1,B!="openCommandPallete"&&c.focus()};m=d.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(N){u="menu",N.stopPropagation(),N.preventDefault(),c.textInput.focus()},ontouchend:function(N){N.stopPropagation(),N.preventDefault(),D(N)},onclick:D},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function A(){m||$();var T=c.selection.cursor,R=c.renderer.textToScreenCoordinates(T.row,T.column),P=c.renderer.textToScreenCoordinates(0,0).pageX,D=c.renderer.scrollLeft,N=c.container.getBoundingClientRect();m.style.top=R.pageY-N.top-3+"px",R.pageX-N.left<N.width-70?(m.style.left="",m.style.right="10px"):(m.style.right="",m.style.left=P+D-N.left+"px"),m.style.display="",m.firstChild.style.display="none",c.on("input",C)}function C(T){m&&(m.style.display="none"),c.off("input",C)}function k(){g=null,clearTimeout(g);var T=c.selection.getRange(),R=T.contains(S.row,S.column);(T.isEmpty()||!R)&&(c.selection.moveToPosition(S),c.selection.selectWord()),u="wait",A()}function I(){g=null,clearTimeout(g),c.selection.moveToPosition(S);var T=E>=2?c.selection.getLineRange(S.row):c.session.getBracketRange(S);T&&!T.isEmpty()?c.selection.setRange(T):c.selection.selectWord(),u="wait"}s.addListener(a,"contextmenu",function(T){if(b){var R=c.textInput.getElement();R.focus()}},c),s.addListener(a,"touchstart",function(T){var R=T.touches;if(g||R.length>1){clearTimeout(g),g=null,h=-1,u="zoom";return}b=c.$mouseHandler.isMousePressed=!0;var P=c.renderer.layerConfig.lineHeight,D=c.renderer.layerConfig.lineHeight,N=T.timeStamp;p=N;var B=R[0],Z=B.clientX,U=B.clientY;Math.abs(l-Z)+Math.abs(f-U)>P&&(h=-1),l=T.clientX=Z,f=T.clientY=U,v=w=0;var X=new o(T,c);if(S=X.getDocumentPosition(),N-h<500&&R.length==1&&!x)E++,T.preventDefault(),T.button=0,I();else{E=0;var W=c.selection.cursor,q=c.selection.isEmpty()?W:c.selection.anchor,Q=c.renderer.$cursorLayer.getPixelPosition(W,!0),G=c.renderer.$cursorLayer.getPixelPosition(q,!0),oe=c.renderer.scroller.getBoundingClientRect(),ne=c.renderer.layerConfig.offset,ce=c.renderer.scrollLeft,fe=function(Pe,Ee){return Pe=Pe/D,Ee=Ee/P-.75,Pe*Pe+Ee*Ee};if(T.clientX<oe.left){u="zoom";return}var he=fe(T.clientX-oe.left-Q.left+ce,T.clientY-oe.top-Q.top+ne),me=fe(T.clientX-oe.left-G.left+ce,T.clientY-oe.top-G.top+ne);he<3.5&&me<3.5&&(u=he>me?"cursor":"anchor"),me<3.5?u="anchor":he<3.5?u="cursor":u="scroll",g=setTimeout(k,450)}h=N},c),s.addListener(a,"touchend",function(T){b=c.$mouseHandler.isMousePressed=!1,y&&clearInterval(y),u=="zoom"?(u="",x=0):g?(c.selection.moveToPosition(S),x=0,A()):u=="scroll"?(L(),C()):A(),clearTimeout(g),g=null},c),s.addListener(a,"touchmove",function(T){g&&(clearTimeout(g),g=null);var R=T.touches;if(!(R.length>1||u=="zoom")){var P=R[0],D=l-P.clientX,N=f-P.clientY;if(u=="wait")if(D*D+N*N>4)u="cursor";else return T.preventDefault();l=P.clientX,f=P.clientY,T.clientX=P.clientX,T.clientY=P.clientY;var B=T.timeStamp,Z=B-p;if(p=B,u=="scroll"){var U=new o(T,c);U.speed=1,U.wheelX=D,U.wheelY=N,10*Math.abs(D)<Math.abs(N)&&(D=0),10*Math.abs(N)<Math.abs(D)&&(N=0),Z!=0&&(v=D/Z,w=N/Z),c._emit("mousewheel",U),U.propagationStopped||(v=w=0)}else{var X=new o(T,c),W=X.getDocumentPosition();u=="cursor"?c.selection.moveCursorToPosition(W):u=="anchor"&&c.selection.setSelectionAnchor(W.row,W.column),c.renderer.scrollCursorIntoView(W),T.preventDefault()}}},c);function L(){x+=60,y=setInterval(function(){x--<=0&&(clearInterval(y),y=null),Math.abs(v)<.01&&(v=0),Math.abs(w)<.01&&(w=0),x<20&&(v=.9*v),x<20&&(w=.9*w);var T=c.session.getScrollTop();c.renderer.scrollBy(10*v,10*w),T==c.session.getScrollTop()&&(x=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(n,r,i){var o=n("../lib/event"),s=n("../lib/useragent"),d=n("./default_handlers").DefaultHandlers,a=n("./default_gutter_handler").GutterHandler,c=n("./mouse_event").MouseEvent,u=n("./dragdrop_handler").DragdropHandler,l=n("./touch_handler").addTouchListeners,f=n("../config"),h=function(){function p(g){var y=this;this.editor=g,new d(this),new a(this),new u(this);var x=function(v){var w=!document.hasFocus||!document.hasFocus()||!g.isFocused()&&document.activeElement==(g.textInput&&g.textInput.getElement());w&&window.focus(),g.focus(),setTimeout(function(){g.isFocused()||g.focus()})},S=g.renderer.getMouseEventTarget();o.addListener(S,"click",this.onMouseEvent.bind(this,"click"),g),o.addListener(S,"mousemove",this.onMouseMove.bind(this,"mousemove"),g),o.addMultiMouseDownListener([S,g.renderer.scrollBarV&&g.renderer.scrollBarV.inner,g.renderer.scrollBarH&&g.renderer.scrollBarH.inner,g.textInput&&g.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",g),o.addMouseWheelListener(g.container,this.onMouseWheel.bind(this,"mousewheel"),g),l(g.container,g);var E=g.renderer.$gutter;o.addListener(E,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),g),o.addListener(E,"click",this.onMouseEvent.bind(this,"gutterclick"),g),o.addListener(E,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),g),o.addListener(E,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),g),o.addListener(S,"mousedown",x,g),o.addListener(E,"mousedown",x,g),s.isIE&&g.renderer.scrollBarV&&(o.addListener(g.renderer.scrollBarV.element,"mousedown",x,g),o.addListener(g.renderer.scrollBarH.element,"mousedown",x,g)),g.on("mousemove",function(v){if(!(y.state||y.$dragDelay||!y.$dragEnabled)){var w=g.renderer.screenToTextCoordinates(v.x,v.y),b=g.session.selection.getRange(),m=g.renderer;!b.isEmpty()&&b.insideStart(w.row,w.column)?m.setCursorStyle("default"):m.setCursorStyle("")}},g)}return p.prototype.onMouseEvent=function(g,y){this.editor.session&&this.editor._emit(g,new c(y,this.editor))},p.prototype.onMouseMove=function(g,y){var x=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!x||!x.length||this.editor._emit(g,new c(y,this.editor))},p.prototype.onMouseWheel=function(g,y){var x=new c(y,this.editor);x.speed=this.$scrollSpeed*2,x.wheelX=y.wheelX,x.wheelY=y.wheelY,this.editor._emit(g,x)},p.prototype.setState=function(g){this.state=g},p.prototype.captureMouse=function(g,y){this.x=g.x,this.y=g.y,this.isMousePressed=!0;var x=this.editor,S=this.editor.renderer;S.$isMousePressed=!0;var E=this,v=function(A){if(A){if(s.isWebKit&&!A.which&&E.releaseMouse)return E.releaseMouse();E.x=A.clientX,E.y=A.clientY,y&&y(A),E.mouseEvent=new c(A,E.editor),E.$mouseMoved=!0}},w=function(A){x.off("beforeEndOperation",m),clearInterval($),x.session&&b(),E[E.state+"End"]&&E[E.state+"End"](A),E.state="",E.isMousePressed=S.$isMousePressed=!1,S.$keepTextAreaAtCursor&&S.$moveTextAreaToCursor(),E.$onCaptureMouseMove=E.releaseMouse=null,A&&E.onMouseEvent("mouseup",A),x.endOperation()},b=function(){E[E.state]&&E[E.state](),E.$mouseMoved=!1};if(s.isOldIE&&g.domEvent.type=="dblclick")return setTimeout(function(){w(g)});var m=function(A){E.releaseMouse&&x.curOp.command.name&&x.curOp.selectionChanged&&(E[E.state+"End"]&&E[E.state+"End"](),E.state="",E.releaseMouse())};x.on("beforeEndOperation",m),x.startOperation({command:{name:"mouse"}}),E.$onCaptureMouseMove=v,E.releaseMouse=o.capture(this.editor.container,v,w);var $=setInterval(b,20)},p.prototype.cancelContextMenu=function(){var g=function(y){y&&y.domEvent&&y.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",g),y&&y.domEvent&&o.stopEvent(y.domEvent))}.bind(this);setTimeout(g,10),this.editor.on("nativecontextmenu",g)},p.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},p}();h.prototype.releaseMouse=null,f.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:s.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),r.MouseHandler=h}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("../lib/dom"),s=function(){function d(a){a.on("click",function(c){var u=c.getDocumentPosition(),l=a.session,f=l.getFoldAt(u.row,u.column,1);f&&(c.getAccelKey()?l.removeFold(f):l.expandFold(f),c.stop());var h=c.domEvent&&c.domEvent.target;h&&o.hasCssClass(h,"ace_inline_button")&&o.hasCssClass(h,"ace_toggle_wrap")&&(l.setOption("wrap",!l.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(c){var u=a.renderer.$gutterLayer.getRegion(c);if(u=="foldWidgets"){var l=c.getDocumentPosition().row,f=a.session;f.foldWidgets&&f.foldWidgets[l]&&a.session.onFoldWidgetClick(l,c),a.isFocused()||a.focus(),c.stop()}}),a.on("gutterdblclick",function(c){var u=a.renderer.$gutterLayer.getRegion(c);if(u=="foldWidgets"){var l=c.getDocumentPosition().row,f=a.session,h=f.getParentFoldRangeData(l,!0),p=h.range||h.firstRange;if(p){l=p.start.row;var g=f.getFoldAt(l,f.getLine(l).length,1);g?f.removeFold(g):(f.addFold("...",p),a.renderer.scrollCursorIntoView({row:p.start.row,column:0}))}c.stop()}})}return d}();r.FoldHandler=s}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(n,r,i){var o=n("../lib/keys"),s=n("../lib/event"),d=function(){function a(c){this.$editor=c,this.$data={editor:c},this.$handlers=[],this.setDefaultHandler(c.commands)}return a.prototype.setDefaultHandler=function(c){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=c,this.addKeyboardHandler(c,0)},a.prototype.setKeyboardHandler=function(c){var u=this.$handlers;if(u[u.length-1]!=c){for(;u[u.length-1]&&u[u.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(u[u.length-1]);this.addKeyboardHandler(c,1)}},a.prototype.addKeyboardHandler=function(c,u){if(c){typeof c=="function"&&!c.handleKeyboard&&(c.handleKeyboard=c);var l=this.$handlers.indexOf(c);l!=-1&&this.$handlers.splice(l,1),u==null?this.$handlers.push(c):this.$handlers.splice(u,0,c),l==-1&&c.attach&&c.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(c){var u=this.$handlers.indexOf(c);return u==-1?!1:(this.$handlers.splice(u,1),c.detach&&c.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var c=this.$data,u=c.editor;return this.$handlers.map(function(l){return l.getStatusText&&l.getStatusText(u,c)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(c,u,l,f){for(var h,p=!1,g=this.$editor.commands,y=this.$handlers.length;y--&&(h=this.$handlers[y].handleKeyboard(this.$data,c,u,l,f),!(!(!h||!h.command)&&(h.command=="null"?p=!0:p=g.exec(h.command,this.$editor,h.args,f),p&&f&&c!=-1&&h.passEvent!=!0&&h.command.passEvent!=!0&&s.stopEvent(f),p))););return!p&&c==-1&&(h={command:"insertstring"},p=g.exec("insertstring",this.$editor,u)),p&&this.$editor._signal&&this.$editor._signal("keyboardActivity",h),p},a.prototype.onCommandKey=function(c,u,l){var f=o.keyCodeToString(l);return this.$callKeyboardHandlers(u,f,l,c)},a.prototype.onTextInput=function(c){return this.$callKeyboardHandlers(-1,c)},a}();r.KeyBinding=d}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(n,r,i){var o=0,s=0,d=!1,a=!1,c=!1,u=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],l=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f=0,h=1,p=0,g=1,y=2,x=3,S=4,E=5,v=6,w=7,b=8,m=9,$=10,A=11,C=12,k=13,I=14,L=15,T=16,R=17,P=18,D=[P,P,P,P,P,P,P,P,P,v,E,v,b,E,P,P,P,P,P,P,P,P,P,P,P,P,P,P,E,E,E,v,b,S,S,A,A,A,S,S,S,S,S,$,m,$,m,m,y,y,y,y,y,y,y,y,y,y,m,S,S,S,S,S,S,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,S,S,S,S,S,S,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,S,S,S,S,P,P,P,P,P,P,E,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,P,m,S,A,A,A,A,S,S,S,S,p,S,S,P,S,S,A,A,y,y,S,p,S,S,S,y,p,S,S,S,S,S],N=[b,b,b,b,b,b,b,b,b,b,b,P,P,P,p,g,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,b,E,k,I,L,T,R,m,A,A,A,A,A,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,m,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,b];function B(W,q,Q,G){var oe=o?l:u,ne=null,ce=null,fe=null,he=0,me=null,Pe=null,Ee=-1,Ae=null,Fe=null,Be=[];if(!G)for(Ae=0,G=[];Ae<Q;Ae++)G[Ae]=X(W[Ae]);for(s=o,d=!1,a=!1,c=!1,Fe=0;Fe<Q;Fe++){if(ne=he,Be[Fe]=ce=U(W,G,Be,Fe),he=oe[ne][ce],me=he&240,he&=15,q[Fe]=fe=oe[he][5],me>0)if(me==16){for(Ae=Ee;Ae<Fe;Ae++)q[Ae]=1;Ee=-1}else Ee=-1;if(Pe=oe[he][6],Pe)Ee==-1&&(Ee=Fe);else if(Ee>-1){for(Ae=Ee;Ae<Fe;Ae++)q[Ae]=fe;Ee=-1}G[Fe]==E&&(q[Fe]=0),s|=fe}if(c){for(Ae=0;Ae<Q;Ae++)if(G[Ae]==v){q[Ae]=o;for(var lt=Ae-1;lt>=0&&G[lt]==b;lt--)q[lt]=o}}}function Z(W,q,Q){if(!(s<W)){if(W==1&&o==h&&!a){Q.reverse();return}for(var G=Q.length,oe=0,ne,ce,fe,he;oe<G;){if(q[oe]>=W){for(ne=oe+1;ne<G&&q[ne]>=W;)ne++;for(ce=oe,fe=ne-1;ce<fe;ce++,fe--)he=Q[ce],Q[ce]=Q[fe],Q[fe]=he;oe=ne}oe++}}}function U(W,q,Q,G){var oe=q[G],ne,ce,fe,he;switch(oe){case p:case g:d=!1;case S:case x:return oe;case y:return d?x:y;case w:return d=!0,g;case b:return S;case m:return G<1||G+1>=q.length||(ne=Q[G-1])!=y&&ne!=x||(ce=q[G+1])!=y&&ce!=x?S:(d&&(ce=x),ce==ne?ce:S);case $:return ne=G>0?Q[G-1]:E,ne==y&&G+1<q.length&&q[G+1]==y?y:S;case A:if(G>0&&Q[G-1]==y)return y;if(d)return S;for(he=G+1,fe=q.length;he<fe&&q[he]==A;)he++;return he<fe&&q[he]==y?y:S;case C:for(fe=q.length,he=G+1;he<fe&&q[he]==C;)he++;if(he<fe){var me=W[G],Pe=me>=1425&&me<=2303||me==64286;if(ne=q[he],Pe&&(ne==g||ne==w))return g}return G<1||(ne=q[G-1])==E?S:Q[G-1];case E:return d=!1,a=!0,o;case v:return c=!0,S;case k:case I:case T:case R:case L:d=!1;case P:return S}}function X(W){var q=W.charCodeAt(0),Q=q>>8;return Q==0?q>191?p:D[q]:Q==5?/[\u0591-\u05f4]/.test(W)?g:p:Q==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(W)?C:/[\u0660-\u0669\u066b-\u066c]/.test(W)?x:q==1642?A:/[\u06f0-\u06f9]/.test(W)?y:w:Q==32&&q<=8287?N[q&255]:Q==254&&q>=65136?w:S}r.L=p,r.R=g,r.EN=y,r.ON_R=3,r.AN=4,r.R_H=5,r.B=6,r.RLE=7,r.DOT="·",r.doBidiReorder=function(W,q,Q){if(W.length<2)return{};var G=W.split(""),oe=new Array(G.length),ne=new Array(G.length),ce=[];o=Q?h:f,B(G,ce,G.length,q);for(var fe=0;fe<oe.length;oe[fe]=fe,fe++);Z(2,ce,oe),Z(1,ce,oe);for(var fe=0;fe<oe.length-1;fe++)q[fe]===x?ce[fe]=r.AN:ce[fe]===g&&(q[fe]>w&&q[fe]<k||q[fe]===S||q[fe]===P)?ce[fe]=r.ON_R:fe>0&&G[fe-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(G[fe])&&(ce[fe-1]=ce[fe]=r.R_H,fe++);G[G.length-1]===r.DOT&&(ce[G.length-1]=r.B),G[0]===""&&(ce[0]=r.RLE);for(var fe=0;fe<oe.length;fe++)ne[fe]=ce[oe[fe]];return{logicalFromVisual:oe,bidiLevels:ne}},r.hasBidiCharacters=function(W,q){for(var Q=!1,G=0;G<W.length;G++)q[G]=X(W.charAt(G)),!Q&&(q[G]==g||q[G]==w||q[G]==x)&&(Q=!0);return Q},r.getVisualFromLogicalIdx=function(W,q){for(var Q=0;Q<q.logicalFromVisual.length;Q++)if(q.logicalFromVisual[Q]==W)return Q;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(n,r,i){var o=n("./lib/bidiutil"),s=n("./lib/lang"),d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function c(u){this.session=u,this.bidiMap={},this.currentRow=null,this.bidiUtil=o,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=d.test(u.getValue())}return c.prototype.isBidiRow=function(u,l,f){return this.seenBidi?(u!==this.currentRow&&(this.currentRow=u,this.updateRowLine(l,f),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},c.prototype.onChange=function(u){this.seenBidi?this.currentRow=null:u.action=="insert"&&d.test(u.lines.join(`
`))&&(this.seenBidi=!0,this.currentRow=null)},c.prototype.getDocumentRow=function(){var u=0,l=this.session.$screenRowCache;if(l.length){var f=this.session.$getRowCacheIndex(l,this.currentRow);f>=0&&(u=this.session.$docRowCache[f])}return u},c.prototype.getSplitIndex=function(){var u=0,l=this.session.$screenRowCache;if(l.length)for(var f,h=this.session.$getRowCacheIndex(l,this.currentRow);this.currentRow-u>0&&(f=this.session.$getRowCacheIndex(l,this.currentRow-u-1),f===h);)h=f,u++;else u=this.currentRow;return u},c.prototype.updateRowLine=function(u,l){u===void 0&&(u=this.getDocumentRow());var f=u===this.session.getLength()-1,h=f?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(u),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var p=this.session.$wrapData[u];p&&(l===void 0&&(l=this.getSplitIndex()),l>0&&p.length?(this.wrapIndent=p.indent,this.wrapOffset=this.wrapIndent*this.charWidths[o.L],this.line=l<p.length?this.line.substring(p[l-1],p[l]):this.line.substring(p[p.length-1])):this.line=this.line.substring(0,p[l]),l==p.length&&(this.line+=this.showInvisibles?h:o.DOT))}else this.line+=this.showInvisibles?h:o.DOT;var g=this.session,y=0,x;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(S,E){return S===" "||g.isFullWidth(S.charCodeAt(0))?(x=S===" "?g.getScreenTabSize(E+y):2,y+=x-1,s.stringRepeat(o.DOT,x)):S}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==o.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},c.prototype.updateBidiMap=function(){var u=[];o.hasBidiCharacters(this.line,u)||this.isRtlDir?this.bidiMap=o.doBidiReorder(this.line,u,this.isRtlDir):this.bidiMap={}},c.prototype.markAsDirty=function(){this.currentRow=null},c.prototype.updateCharacterWidths=function(u){if(this.characterWidth!==u.$characterSize.width){this.fontMetrics=u;var l=this.characterWidth=u.$characterSize.width,f=u.$measureCharWidth("ה");this.charWidths[o.L]=this.charWidths[o.EN]=this.charWidths[o.ON_R]=l,this.charWidths[o.R]=this.charWidths[o.AN]=f,this.charWidths[o.R_H]=f*.45,this.charWidths[o.B]=this.charWidths[o.RLE]=0,this.currentRow=null}},c.prototype.setShowInvisibles=function(u){this.showInvisibles=u,this.currentRow=null},c.prototype.setEolChar=function(u){this.EOL=u},c.prototype.setContentWidth=function(u){this.contentWidth=u},c.prototype.isRtlLine=function(u){return this.$isRtl?!0:u!=null?this.session.getLine(u).charAt(0)==this.RLE:this.isRtlDir},c.prototype.setRtlDirection=function(u,l){for(var f=u.getCursorPosition(),h=u.selection.getSelectionAnchor().row;h<=f.row;h++)!l&&u.session.getLine(h).charAt(0)===u.session.$bidiHandler.RLE?u.session.doc.removeInLine(h,0,1):l&&u.session.getLine(h).charAt(0)!==u.session.$bidiHandler.RLE&&u.session.doc.insert({column:0,row:h},u.session.$bidiHandler.RLE)},c.prototype.getPosLeft=function(u){u-=this.wrapIndent;var l=this.line.charAt(0)===this.RLE?1:0,f=u>l?this.session.getOverwrite()?u:u-1:l,h=o.getVisualFromLogicalIdx(f,this.bidiMap),p=this.bidiMap.bidiLevels,g=0;!this.session.getOverwrite()&&u<=l&&p[h]%2!==0&&h++;for(var y=0;y<h;y++)g+=this.charWidths[p[y]];return!this.session.getOverwrite()&&u>l&&p[h]%2===0&&(g+=this.charWidths[p[h]]),this.wrapIndent&&(g+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(g+=this.rtlLineOffset),g},c.prototype.getSelections=function(u,l){var f=this.bidiMap,h=f.bidiLevels,p,g=[],y=0,x=Math.min(u,l)-this.wrapIndent,S=Math.max(u,l)-this.wrapIndent,E=!1,v=!1,w=0;this.wrapIndent&&(y+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var b,m=0;m<h.length;m++)b=f.logicalFromVisual[m],p=h[m],E=b>=x&&b<S,E&&!v?w=y:!E&&v&&g.push({left:w,width:y-w}),y+=this.charWidths[p],v=E;if(E&&m===h.length&&g.push({left:w,width:y-w}),this.isRtlDir)for(var $=0;$<g.length;$++)g[$].left+=this.rtlLineOffset;return g},c.prototype.offsetToCol=function(f){this.isRtlDir&&(f-=this.rtlLineOffset);var l=0,f=Math.max(f,0),h=0,p=0,g=this.bidiMap.bidiLevels,y=this.charWidths[g[p]];for(this.wrapIndent&&(f-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);f>h+y/2;){if(h+=y,p===g.length-1){y=0;break}y=this.charWidths[g[++p]]}return p>0&&g[p-1]%2!==0&&g[p]%2===0?(f<h&&p--,l=this.bidiMap.logicalFromVisual[p]):p>0&&g[p-1]%2===0&&g[p]%2!==0?l=1+(f>h?this.bidiMap.logicalFromVisual[p]:this.bidiMap.logicalFromVisual[p-1]):this.isRtlDir&&p===g.length-1&&y===0&&g[p-1]%2===0||!this.isRtlDir&&p===0&&g[p]%2!==0?l=1+this.bidiMap.logicalFromVisual[p]:(p>0&&g[p-1]%2!==0&&y!==0&&p--,l=this.bidiMap.logicalFromVisual[p]),l===0&&this.isRtlDir&&l++,l+this.wrapIndent},c}();r.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(n,r,i){var o=n("./lib/oop"),s=n("./lib/lang"),d=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,c=function(u){this.session=u,this.doc=u.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var l=this;this.cursor.on("change",function(f){l.$cursorChanged=!0,l.$silent||l._emit("changeCursor"),!l.$isEmpty&&!l.$silent&&l._emit("changeSelection"),!l.$keepDesiredColumnOnChange&&f.old.column!=f.value.column&&(l.$desiredColumn=null)}),this.anchor.on("change",function(){l.$anchorChanged=!0,!l.$isEmpty&&!l.$silent&&l._emit("changeSelection")})};(function(){o.implement(this,d),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(u,l){this.$isEmpty=!1,this.anchor.setPosition(u,l)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var u=this.anchor,l=this.lead;return u.row>l.row||u.row==l.row&&u.column>l.column},this.getRange=function(){var u=this.anchor,l=this.lead;return this.$isEmpty?a.fromPoints(l,l):this.isBackwards()?a.fromPoints(l,u):a.fromPoints(u,l)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(u,l){var f=l?u.end:u.start,h=l?u.start:u.end;this.$setSelection(f.row,f.column,h.row,h.column)},this.$setSelection=function(u,l,f,h){if(!this.$silent){var p=this.$isEmpty,g=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(u,l),this.cursor.setPosition(f,h),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||p!=this.$isEmpty||g)&&this._emit("changeSelection")}},this.$moveSelection=function(u){var l=this.lead;this.$isEmpty&&this.setSelectionAnchor(l.row,l.column),u.call(this)},this.selectTo=function(u,l){this.$moveSelection(function(){this.moveCursorTo(u,l)})},this.selectToPosition=function(u){this.$moveSelection(function(){this.moveCursorToPosition(u)})},this.moveTo=function(u,l){this.clearSelection(),this.moveCursorTo(u,l)},this.moveToPosition=function(u){this.clearSelection(),this.moveCursorToPosition(u)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(u,l){if(typeof l>"u"){var f=u||this.lead;u=f.row,l=f.column}return this.session.getWordRange(u,l)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var u=this.getCursor(),l=this.session.getAWordRange(u.row,u.column);this.setSelectionRange(l)},this.getLineRange=function(u,l){var f=typeof u=="number"?u:this.lead.row,h,p=this.session.getFoldLine(f);return p?(f=p.start.row,h=p.end.row):h=f,l===!0?new a(f,0,h,this.session.getLine(h).length):new a(f,0,h+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(u,l,f){var h=u.column,p=u.column+l;return f<0&&(h=u.column-l,p=u.column),this.session.isTabStop(u)&&this.doc.getLine(u.row).slice(h,p).split(" ").length-1==l},this.moveCursorLeft=function(){var u=this.lead.getPosition(),l;if(l=this.session.getFoldAt(u.row,u.column,-1))this.moveCursorTo(l.start.row,l.start.column);else if(u.column===0)u.row>0&&this.moveCursorTo(u.row-1,this.doc.getLine(u.row-1).length);else{var f=this.session.getTabSize();this.wouldMoveIntoSoftTab(u,f,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-f):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var u=this.lead.getPosition(),l;if(l=this.session.getFoldAt(u.row,u.column,1))this.moveCursorTo(l.end.row,l.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var f=this.session.getTabSize(),u=this.lead;this.wouldMoveIntoSoftTab(u,f,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,f):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var u=this.lead.row,l=this.lead.column,f=this.session.documentToScreenRow(u,l),h=this.session.screenToDocumentPosition(f,0),p=this.session.getDisplayLine(u,null,h.row,h.column),g=p.match(/^\s*/);g[0].length!=l&&!this.session.$useEmacsStyleLineStart&&(h.column+=g[0].length),this.moveCursorToPosition(h)},this.moveCursorLineEnd=function(){var u=this.lead,l=this.session.getDocumentLastRowColumnPosition(u.row,u.column);if(this.lead.column==l.column){var f=this.session.getLine(l.row);if(l.column==f.length){var h=f.search(/\s+$/);h>0&&(l.column=h)}}this.moveCursorTo(l.row,l.column)},this.moveCursorFileEnd=function(){var u=this.doc.getLength()-1,l=this.doc.getLine(u).length;this.moveCursorTo(u,l)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var u=this.lead.row,l=this.lead.column,f=this.doc.getLine(u),h=f.substring(l);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var p=this.session.getFoldAt(u,l,1);if(p){this.moveCursorTo(p.end.row,p.end.column);return}if(this.session.nonTokenRe.exec(h)&&(l+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,h=f.substring(l)),l>=f.length){this.moveCursorTo(u,f.length),this.moveCursorRight(),u<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(h)&&(l+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(u,l)},this.moveCursorLongWordLeft=function(){var u=this.lead.row,l=this.lead.column,f;if(f=this.session.getFoldAt(u,l,-1)){this.moveCursorTo(f.start.row,f.start.column);return}var h=this.session.getFoldStringAt(u,l,-1);h==null&&(h=this.doc.getLine(u).substring(0,l));var p=s.stringReverse(h);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(p)&&(l-=this.session.nonTokenRe.lastIndex,p=p.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),l<=0){this.moveCursorTo(u,0),this.moveCursorLeft(),u>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(p)&&(l-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(u,l)},this.$shortWordEndIndex=function(u){var l=0,f,h=/\s/,p=this.session.tokenRe;if(p.lastIndex=0,this.session.tokenRe.exec(u))l=this.session.tokenRe.lastIndex;else{for(;(f=u[l])&&h.test(f);)l++;if(l<1){for(p.lastIndex=0;(f=u[l])&&!p.test(f);)if(p.lastIndex=0,l++,h.test(f))if(l>2){l--;break}else{for(;(f=u[l])&&h.test(f);)l++;if(l>2)break}}}return p.lastIndex=0,l},this.moveCursorShortWordRight=function(){var u=this.lead.row,l=this.lead.column,f=this.doc.getLine(u),h=f.substring(l),p=this.session.getFoldAt(u,l,1);if(p)return this.moveCursorTo(p.end.row,p.end.column);if(l==f.length){var g=this.doc.getLength();do u++,h=this.doc.getLine(u);while(u<g&&/^\s*$/.test(h));/^\s+/.test(h)||(h=""),l=0}var y=this.$shortWordEndIndex(h);this.moveCursorTo(u,l+y)},this.moveCursorShortWordLeft=function(){var u=this.lead.row,l=this.lead.column,f;if(f=this.session.getFoldAt(u,l,-1))return this.moveCursorTo(f.start.row,f.start.column);var h=this.session.getLine(u).substring(0,l);if(l===0){do u--,h=this.doc.getLine(u);while(u>0&&/^\s*$/.test(h));l=h.length,/\s+$/.test(h)||(h="")}var p=s.stringReverse(h),g=this.$shortWordEndIndex(p);return this.moveCursorTo(u,l-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(u,l){var f=this.session.documentToScreenPosition(this.lead.row,this.lead.column),h;if(l===0&&(u!==0&&(this.session.$bidiHandler.isBidiRow(f.row,this.lead.row)?(h=this.session.$bidiHandler.getPosLeft(f.column),f.column=Math.round(h/this.session.$bidiHandler.charWidths[0])):h=f.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?f.column=this.$desiredColumn:this.$desiredColumn=f.column),u!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var p=this.session.lineWidgets[this.lead.row];u<0?u-=p.rowsAbove||0:u>0&&(u+=p.rowCount-(p.rowsAbove||0))}var g=this.session.screenToDocumentPosition(f.row+u,f.column,h);u!==0&&l===0&&g.row===this.lead.row&&(g.column,this.lead.column),this.moveCursorTo(g.row,g.column+l,l===0)},this.moveCursorToPosition=function(u){this.moveCursorTo(u.row,u.column)},this.moveCursorTo=function(u,l,f){var h=this.session.getFoldAt(u,l,1);h&&(u=h.start.row,l=h.start.column),this.$keepDesiredColumnOnChange=!0;var p=this.session.getLine(u);/[\uDC00-\uDFFF]/.test(p.charAt(l))&&p.charAt(l-1)&&(this.lead.row==u&&this.lead.column==l+1?l=l-1:l=l+1),this.lead.setPosition(u,l),this.$keepDesiredColumnOnChange=!1,f||(this.$desiredColumn=null)},this.moveCursorToScreen=function(u,l,f){var h=this.session.screenToDocumentPosition(u,l);this.moveCursorTo(h.row,h.column,f)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(u){this.setSelectionRange(u,u.cursor==u.start),this.$desiredColumn=u.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(u){var l=this.getRange();return u?(u.start.column=l.start.column,u.start.row=l.start.row,u.end.column=l.end.column,u.end.row=l.end.row):u=l,u.cursor=this.isBackwards()?u.start:u.end,u.desiredColumn=this.$desiredColumn,u},this.getRangeOfMovements=function(u){var l=this.getCursor();try{u(this);var f=this.getCursor();return a.fromPoints(l,f)}catch{return a.fromPoints(l,l)}finally{this.moveCursorToPosition(l)}},this.toJSON=function(){if(this.rangeCount)var u=this.ranges.map(function(l){var f=l.clone();return f.isBackwards=l.cursor==l.start,f});else{var u=this.getRange();u.isBackwards=this.isBackwards()}return u},this.fromJSON=function(u){if(u.start==null)if(this.rangeList&&u.length>1){this.toSingleRange(u[0]);for(var l=u.length;l--;){var f=a.fromPoints(u[l].start,u[l].end);u[l].isBackwards&&(f.cursor=f.start),this.addRange(f,!0)}return}else u=u[0];this.rangeList&&this.toSingleRange(u),this.setSelectionRange(u,u.isBackwards)},this.isEqual=function(u){if((u.length||this.rangeCount)&&u.length!=this.rangeCount)return!1;if(!u.length||!this.ranges)return this.getRange().isEqual(u);for(var l=this.ranges.length;l--;)if(!this.ranges[l].isEqual(u[l]))return!1;return!0}}).call(c.prototype),r.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(n,r,i){var o=n("./config"),s=2e3,d=function(){function a(c){this.states=c,this.regExps={},this.matchMappings={};for(var u in this.states){for(var l=this.states[u],f=[],h=0,p=this.matchMappings[u]={defaultToken:"text"},g="g",y=[],x=0;x<l.length;x++){var S=l[x];if(S.defaultToken&&(p.defaultToken=S.defaultToken),S.caseInsensitive&&g.indexOf("i")===-1&&(g+="i"),S.unicode&&g.indexOf("u")===-1&&(g+="u"),S.regex!=null){S.regex instanceof RegExp&&(S.regex=S.regex.toString().slice(1,-1));var E=S.regex,v=new RegExp("(?:("+E+")|(.))").exec("a").length-2;Array.isArray(S.token)?S.token.length==1||v==1?S.token=S.token[0]:v-1!=S.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:S,groupCount:v-1}),S.token=S.token[0]):(S.tokenArray=S.token,S.token=null,S.onMatch=this.$arrayTokens):typeof S.token=="function"&&!S.onMatch&&(v>1?S.onMatch=this.$applyToken:S.onMatch=S.token),v>1&&(/\\\d/.test(S.regex)?E=S.regex.replace(/\\([0-9]+)/g,function(w,b){return"\\"+(parseInt(b,10)+h+1)}):(v=1,E=this.removeCapturingGroups(S.regex)),!S.splitRegex&&typeof S.token!="string"&&y.push(S)),p[h]=x,h+=v,f.push(E),S.onMatch||(S.onMatch=null)}}f.length||(p[0]=0,f.push("$")),y.forEach(function(w){w.splitRegex=this.createSplitterRegexp(w.regex,g)},this),this.regExps[u]=new RegExp("("+f.join(")|(")+")|($)",g)}}return a.prototype.$setMaxTokenCount=function(c){s=c|0},a.prototype.$applyToken=function(c){var u=this.splitRegex.exec(c).slice(1),l=this.token.apply(this,u);if(typeof l=="string")return[{type:l,value:c}];for(var f=[],h=0,p=l.length;h<p;h++)u[h]&&(f[f.length]={type:l[h],value:u[h]});return f},a.prototype.$arrayTokens=function(c){if(!c)return[];var u=this.splitRegex.exec(c);if(!u)return"text";for(var l=[],f=this.tokenArray,h=0,p=f.length;h<p;h++)u[h+1]&&(l[l.length]={type:f[h],value:u[h+1]});return l},a.prototype.removeCapturingGroups=function(c){var u=c.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(l,f){return f?"(?:":l});return u},a.prototype.createSplitterRegexp=function(c,u){if(c.indexOf("(?=")!=-1){var l=0,f=!1,h={};c.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(p,g,y,x,S,E){return f?f=S!="]":S?f=!0:x?(l==h.stack&&(h.end=E+1,h.stack=-1),l--):y&&(l++,y.length!=1&&(h.stack=l,h.start=E)),p}),h.end!=null&&/^\)*$/.test(c.substr(h.end))&&(c=c.substring(0,h.start)+c.substr(h.end))}return c.charAt(0)!="^"&&(c="^"+c),c.charAt(c.length-1)!="$"&&(c+="$"),new RegExp(c,(u||"").replace("g",""))},a.prototype.getLineTokens=function(c,u){if(u&&typeof u!="string"){var l=u.slice(0);u=l[0],u==="#tmp"&&(l.shift(),u=l.shift())}else var l=[];var f=u||"start",h=this.states[f];h||(f="start",h=this.states[f]);var p=this.matchMappings[f],g=this.regExps[f];g.lastIndex=0;for(var y,x=[],S=0,E=0,v={type:null,value:""};y=g.exec(c);){var w=p.defaultToken,b=null,m=y[0],$=g.lastIndex;if($-m.length>S){var A=c.substring(S,$-m.length);v.type==w?v.value+=A:(v.type&&x.push(v),v={type:w,value:A})}for(var C=0;C<y.length-2;C++)if(y[C+1]!==void 0){b=h[p[C]],b.onMatch?w=b.onMatch(m,f,l,c):w=b.token,b.next&&(typeof b.next=="string"?f=b.next:f=b.next(f,l),h=this.states[f],h||(this.reportError("state doesn't exist",f),f="start",h=this.states[f]),p=this.matchMappings[f],S=$,g=this.regExps[f],g.lastIndex=$),b.consumeLineEnd&&(S=$);break}if(m){if(typeof w=="string")(!b||b.merge!==!1)&&v.type===w?v.value+=m:(v.type&&x.push(v),v={type:w,value:m});else if(w){v.type&&x.push(v),v={type:null,value:""};for(var C=0;C<w.length;C++)x.push(w[C])}}if(S==c.length)break;if(S=$,E++>s){for(E>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:u,line:c});S<c.length;)v.type&&x.push(v),v={value:c.substring(S,S+=500),type:"overflow"};f="start",l=[];break}}return v.type&&x.push(v),l.length>1&&l[0]!==f&&l.unshift("#tmp",f),{tokens:x,state:l.length?l:f}},a}();d.prototype.reportError=o.reportError,r.Tokenizer=d}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(n,r,i){var o=n("../lib/lang"),s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(c,u){if(!u){for(var l in c)this.$rules[l]=c[l];return}for(var l in c){for(var f=c[l],h=0;h<f.length;h++){var p=f[h];(p.next||p.onMatch)&&(typeof p.next=="string"&&p.next.indexOf(u)!==0&&(p.next=u+p.next),p.nextState&&p.nextState.indexOf(u)!==0&&(p.nextState=u+p.nextState))}this.$rules[u+l]=f}},this.getRules=function(){return this.$rules},this.embedRules=function(c,u,l,f,h){var p=typeof c=="function"?new c().getRules():c;if(f)for(var g=0;g<f.length;g++)f[g]=u+f[g];else{f=[];for(var y in p)f.push(u+y)}if(this.addRules(p,u),l)for(var x=Array.prototype[h?"push":"unshift"],g=0;g<f.length;g++)x.apply(this.$rules[f[g]],o.deepCopy(l));this.$embeds||(this.$embeds=[]),this.$embeds.push(u)},this.getEmbeds=function(){return this.$embeds};var d=function(c,u){return(c!="start"||u.length)&&u.unshift(this.nextState,c),this.nextState},a=function(c,u){return u.shift(),u.shift()||"start"};this.normalizeRules=function(){var c=0,u=this.$rules;function l(f){var h=u[f];h.processed=!0;for(var p=0;p<h.length;p++){var g=h[p],y=null;Array.isArray(g)&&(y=g,g={}),!g.regex&&g.start&&(g.regex=g.start,g.next||(g.next=[]),g.next.push({defaultToken:g.token},{token:g.token+".end",regex:g.end||g.start,next:"pop"}),g.token=g.token+".start",g.push=!0);var x=g.next||g.push;if(x&&Array.isArray(x)){var S=g.stateName;S||(S=g.token,typeof S!="string"&&(S=S[0]||""),u[S]&&(S+=c++)),u[S]=x,g.next=S,l(S)}else x=="pop"&&(g.next=a);if(g.push&&(g.nextState=g.next||g.push,g.next=d,delete g.push),g.rules)for(var E in g.rules)u[E]?u[E].push&&u[E].push.apply(u[E],g.rules[E]):u[E]=g.rules[E];var v=typeof g=="string"?g:g.include;if(v&&(v==="$self"&&(v="start"),Array.isArray(v)?y=v.map(function(b){return u[b]}):y=u[v]),y){var w=[p,1].concat(y);g.noEscape&&(w=w.filter(function(b){return!b.next})),h.splice.apply(h,w),p--}g.keywordMap&&(g.token=this.createKeywordMapper(g.keywordMap,g.defaultToken||"text",g.caseInsensitive),delete g.defaultToken)}}Object.keys(u).forEach(l,this)},this.createKeywordMapper=function(c,u,l,f){var h=Object.create(null);return this.$keywordList=[],Object.keys(c).forEach(function(p){for(var g=c[p],y=g.split(f||"|"),x=y.length;x--;){var S=y[x];this.$keywordList.push(S),l&&(S=S.toLowerCase()),h[S]=p}},this),c=null,l?function(p){return h[p.toLowerCase()]||u}:function(p){return h[p]||u}},this.getKeywords=function(){return this.$keywords}}).call(s.prototype),r.TextHighlightRules=s}),ace.define("ace/mode/behaviour",["require","exports","module"],function(n,r,i){var o=function(){this.$behaviours={}};(function(){this.add=function(s,d,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[s]:this.$behaviours[s]={}}this.$behaviours[s][d]=a},this.addBehaviours=function(s){for(var d in s)for(var a in s[d])this.add(d,a,s[d][a])},this.remove=function(s){this.$behaviours&&this.$behaviours[s]&&delete this.$behaviours[s]},this.inherit=function(s,d){if(typeof s=="function")var a=new s().getBehaviours(d);else var a=s.getBehaviours(d);this.addBehaviours(a)},this.getBehaviours=function(s){if(s){for(var d={},a=0;a<s.length;a++)this.$behaviours[s[a]]&&(d[s[a]]=this.$behaviours[s[a]]);return d}else return this.$behaviours}}).call(o.prototype),r.Behaviour=o}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(n,r,i){var o=n("./range").Range,s=function(){function d(a,c,u){this.$session=a,this.$row=c,this.$rowTokens=a.getTokens(c);var l=a.getTokenAt(c,u);this.$tokenIndex=l?l.index:-1}return d.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},d.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},d.prototype.getCurrentTokenRow=function(){return this.$row},d.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,c=this.$tokenIndex,u=a[c].start;if(u!==void 0)return u;for(u=0;c>0;)c-=1,u+=a[c].value.length;return u},d.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},d.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new o(this.$row,c,this.$row,c+a.value.length)},d}();r.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(n,r,i){var o=n("../../lib/oop"),s=n("../behaviour").Behaviour,d=n("../../token_iterator").TokenIterator,a=n("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],u=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l,f={},h={'"':'"',"'":"'"},p=function(x){var S=-1;if(x.multiSelect&&(S=x.selection.index,f.rangeCount!=x.multiSelect.rangeCount&&(f={rangeCount:x.multiSelect.rangeCount})),f[S])return l=f[S];l=f[S]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(x,S,E,v){var w=x.end.row-x.start.row;return{text:E+S+v,selection:[0,x.start.column+1,w,x.end.column+(w?0:1)]}},y=function(x){x=x||{},this.add("braces","insertion",function(S,E,v,w,b){var m=v.getCursorPosition(),$=w.doc.getLine(m.row);if(b=="{"){p(v);var A=v.getSelectionRange(),C=w.doc.getTextRange(A);if(C!==""&&C!=="{"&&v.getWrapBehavioursEnabled())return g(A,C,"{","}");if(y.isSaneInsertion(v,w))return/[\]\}\)]/.test($[m.column])||v.inMultiSelectMode||x.braces?(y.recordAutoInsert(v,w,"}"),{text:"{}",selection:[1,1]}):(y.recordMaybeInsert(v,w,"{"),{text:"{",selection:[1,1]})}else if(b=="}"){p(v);var k=$.substring(m.column,m.column+1);if(k=="}"){var I=w.$findOpeningBracket("}",{column:m.column+1,row:m.row});if(I!==null&&y.isAutoInsertedClosing(m,$,b))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(b==`
`||b==`\r
`){p(v);var L="";y.isMaybeInsertedClosing(m,$)&&(L=a.stringRepeat("}",l.maybeInsertedBrackets),y.clearMaybeInsertedClosing());var k=$.substring(m.column,m.column+1);if(k==="}"){var T=w.findMatchingBracket({row:m.row,column:m.column+1},"}");if(!T)return null;var R=this.$getIndent(w.getLine(T.row))}else if(L)var R=this.$getIndent($);else{y.clearMaybeInsertedClosing();return}var P=R+w.getTabString();return{text:`
`+P+`
`+R+L,selection:[1,P.length,1,P.length]}}else y.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(S,E,v,w,b){var m=w.doc.getTextRange(b);if(!b.isMultiLine()&&m=="{"){p(v);var $=w.doc.getLine(b.start.row),A=$.substring(b.end.column,b.end.column+1);if(A=="}")return b.end.column++,b;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(S,E,v,w,b){if(b=="("){p(v);var m=v.getSelectionRange(),$=w.doc.getTextRange(m);if($!==""&&v.getWrapBehavioursEnabled())return g(m,$,"(",")");if(y.isSaneInsertion(v,w))return y.recordAutoInsert(v,w,")"),{text:"()",selection:[1,1]}}else if(b==")"){p(v);var A=v.getCursorPosition(),C=w.doc.getLine(A.row),k=C.substring(A.column,A.column+1);if(k==")"){var I=w.$findOpeningBracket(")",{column:A.column+1,row:A.row});if(I!==null&&y.isAutoInsertedClosing(A,C,b))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(S,E,v,w,b){var m=w.doc.getTextRange(b);if(!b.isMultiLine()&&m=="("){p(v);var $=w.doc.getLine(b.start.row),A=$.substring(b.start.column+1,b.start.column+2);if(A==")")return b.end.column++,b}}),this.add("brackets","insertion",function(S,E,v,w,b){if(b=="["){p(v);var m=v.getSelectionRange(),$=w.doc.getTextRange(m);if($!==""&&v.getWrapBehavioursEnabled())return g(m,$,"[","]");if(y.isSaneInsertion(v,w))return y.recordAutoInsert(v,w,"]"),{text:"[]",selection:[1,1]}}else if(b=="]"){p(v);var A=v.getCursorPosition(),C=w.doc.getLine(A.row),k=C.substring(A.column,A.column+1);if(k=="]"){var I=w.$findOpeningBracket("]",{column:A.column+1,row:A.row});if(I!==null&&y.isAutoInsertedClosing(A,C,b))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(S,E,v,w,b){var m=w.doc.getTextRange(b);if(!b.isMultiLine()&&m=="["){p(v);var $=w.doc.getLine(b.start.row),A=$.substring(b.start.column+1,b.start.column+2);if(A=="]")return b.end.column++,b}}),this.add("string_dquotes","insertion",function(S,E,v,w,b){var m=w.$mode.$quotes||h;if(b.length==1&&m[b]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(b)!=-1)return;p(v);var $=b,A=v.getSelectionRange(),C=w.doc.getTextRange(A);if(C!==""&&(C.length!=1||!m[C])&&v.getWrapBehavioursEnabled())return g(A,C,$,$);if(!C){var k=v.getCursorPosition(),I=w.doc.getLine(k.row),L=I.substring(k.column-1,k.column),T=I.substring(k.column,k.column+1),R=w.getTokenAt(k.row,k.column),P=w.getTokenAt(k.row,k.column+1);if(L=="\\"&&R&&/escape/.test(R.type))return null;var D=R&&/string|escape/.test(R.type),N=!P||/string|escape/.test(P.type),B;if(T==$)B=D!==N,B&&/string\.end/.test(P.type)&&(B=!1);else{if(D&&!N||D&&N)return null;var Z=w.$mode.tokenRe;Z.lastIndex=0;var U=Z.test(L);Z.lastIndex=0;var X=Z.test(T),W=w.$mode.$pairQuotesAfter,q=W&&W[$]&&W[$].test(L);if(!q&&U||X||T&&!/[\s;,.})\]\\]/.test(T))return null;var Q=I[k.column-2];if(L==$&&(Q==$||Z.test(Q)))return null;B=!0}return{text:B?$+$:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(S,E,v,w,b){var m=w.$mode.$quotes||h,$=w.doc.getTextRange(b);if(!b.isMultiLine()&&m.hasOwnProperty($)){p(v);var A=w.doc.getLine(b.start.row),C=A.substring(b.start.column+1,b.start.column+2);if(C==$)return b.end.column++,b}}),x.closeDocComment!==!1&&this.add("doc comment end","insertion",function(S,E,v,w,b){if(S==="doc-start"&&(b===`
`||b===`\r
`)&&v.selection.isEmpty()){var m=v.getCursorPosition(),$=w.doc.getLine(m.row),A=w.doc.getLine(m.row+1),C=this.$getIndent($);if(/\s*\*/.test(A))return/^\s*\*/.test($)?{text:b+C+"* ",selection:[1,3+C.length,1,3+C.length]}:{text:b+C+" * ",selection:[1,3+C.length,1,3+C.length]};if(/\/\*\*/.test($.substring(0,m.column)))return{text:b+C+" * "+b+" "+C+"*/",selection:[1,4+C.length,1,4+C.length]}}})};y.isSaneInsertion=function(x,S){var E=x.getCursorPosition(),v=new d(S,E.row,E.column);if(!this.$matchTokenType(v.getCurrentToken()||"text",c)){if(/[)}\]]/.test(x.session.getLine(E.row)[E.column]))return!0;var w=new d(S,E.row,E.column+1);if(!this.$matchTokenType(w.getCurrentToken()||"text",c))return!1}return v.stepForward(),v.getCurrentTokenRow()!==E.row||this.$matchTokenType(v.getCurrentToken()||"text",u)},y.$matchTokenType=function(x,S){return S.indexOf(x.type||x)>-1},y.recordAutoInsert=function(x,S,E){var v=x.getCursorPosition(),w=S.doc.getLine(v.row);this.isAutoInsertedClosing(v,w,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=v.row,l.autoInsertedLineEnd=E+w.substr(v.column),l.autoInsertedBrackets++},y.recordMaybeInsert=function(x,S,E){var v=x.getCursorPosition(),w=S.doc.getLine(v.row);this.isMaybeInsertedClosing(v,w)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=v.row,l.maybeInsertedLineStart=w.substr(0,v.column)+E,l.maybeInsertedLineEnd=w.substr(v.column),l.maybeInsertedBrackets++},y.isAutoInsertedClosing=function(x,S,E){return l.autoInsertedBrackets>0&&x.row===l.autoInsertedRow&&E===l.autoInsertedLineEnd[0]&&S.substr(x.column)===l.autoInsertedLineEnd},y.isMaybeInsertedClosing=function(x,S){return l.maybeInsertedBrackets>0&&x.row===l.maybeInsertedRow&&S.substr(x.column)===l.maybeInsertedLineEnd&&S.substr(0,x.column)==l.maybeInsertedLineStart},y.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},y.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},o.inherits(y,s),r.CstyleBehaviour=y}),ace.define("ace/unicode",["require","exports","module"],function(n,r,i){for(var o=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],s=0,d=[],a=0;a<o.length;a+=2)d.push(s+=o[a]),o[a+1]&&d.push(45,s+=o[a+1]);r.wordChars=String.fromCharCode.apply(null,d)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(n,r,i){var o=n("../config"),s=n("../tokenizer").Tokenizer,d=n("./text_highlight_rules").TextHighlightRules,a=n("./behaviour/cstyle").CstyleBehaviour,c=n("../unicode"),u=n("../lib/lang"),l=n("../token_iterator").TokenIterator,f=n("../range").Range,h=function(){this.HighlightRules=d};(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+c.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new s(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(p,g,y,x){var S=g.doc,E=!0,v=!0,w=1/0,b=g.getTabSize(),m=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var C=this.lineCommentStart.map(u.escapeRegExp).join("|"),$=this.lineCommentStart[0];else var C=u.escapeRegExp(this.lineCommentStart),$=this.lineCommentStart;C=new RegExp("^(\\s*)(?:"+C+") ?"),m=g.getUseSoftTabs();var L=function(X,W){var q=X.match(C);if(q){var Q=q[1].length,G=q[0].length;!P(X,Q,G)&&q[0][G-1]==" "&&G--,S.removeInLine(W,Q,G)}},R=$+" ",I=function(X,W){(!E||/\S/.test(X))&&(P(X,w,w)?S.insertInLine({row:W,column:w},R):S.insertInLine({row:W,column:w},$))},T=function(X,W){return C.test(X)},P=function(X,W,q){for(var Q=0;W--&&X.charAt(W)==" ";)Q++;if(Q%b!=0)return!1;for(var Q=0;X.charAt(q++)==" ";)Q++;return b>2?Q%b!=b-1:Q%b==0}}else{if(!this.blockComment)return!1;var $=this.blockComment.start,A=this.blockComment.end,C=new RegExp("^(\\s*)(?:"+u.escapeRegExp($)+")"),k=new RegExp("(?:"+u.escapeRegExp(A)+")\\s*$"),I=function(B,Z){T(B,Z)||(!E||/\S/.test(B))&&(S.insertInLine({row:Z,column:B.length},A),S.insertInLine({row:Z,column:w},$))},L=function(B,Z){var U;(U=B.match(k))&&S.removeInLine(Z,B.length-U[0].length,B.length),(U=B.match(C))&&S.removeInLine(Z,U[1].length,U[0].length)},T=function(B,Z){if(C.test(B))return!0;for(var U=g.getTokens(Z),X=0;X<U.length;X++)if(U[X].type==="comment")return!0}}function D(B){for(var Z=y;Z<=x;Z++)B(S.getLine(Z),Z)}var N=1/0;D(function(B,Z){var U=B.search(/\S/);U!==-1?(U<w&&(w=U),v&&!T(B,Z)&&(v=!1)):N>B.length&&(N=B.length)}),w==1/0&&(w=N,E=!1,v=!1),m&&w%b!=0&&(w=Math.floor(w/b)*b),D(v?L:I)},this.toggleBlockComment=function(p,g,y,x){var S=this.blockComment;if(S){!S.start&&S[0]&&(S=S[0]);var E=new l(g,x.row,x.column),v=E.getCurrentToken();g.selection;var w=g.selection.toOrientedRange(),b,m;if(v&&/comment/.test(v.type)){for(var $,A;v&&/comment/.test(v.type);){var C=v.value.indexOf(S.start);if(C!=-1){var k=E.getCurrentTokenRow(),I=E.getCurrentTokenColumn()+C;$=new f(k,I,k,I+S.start.length);break}v=E.stepBackward()}for(var E=new l(g,x.row,x.column),v=E.getCurrentToken();v&&/comment/.test(v.type);){var C=v.value.indexOf(S.end);if(C!=-1){var k=E.getCurrentTokenRow(),I=E.getCurrentTokenColumn()+C;A=new f(k,I,k,I+S.end.length);break}v=E.stepForward()}A&&g.remove(A),$&&(g.remove($),b=$.start.row,m=-S.start.length)}else m=S.start.length,b=y.start.row,g.insert(y.end,S.end),g.insert(y.start,S.start);w.start.row==b&&(w.start.column+=m),w.end.row==b&&(w.end.column+=m),g.selection.fromOrientedRange(w)}},this.getNextLineIndent=function(p,g,y){return this.$getIndent(g)},this.checkOutdent=function(p,g,y){return!1},this.autoOutdent=function(p,g,y){},this.$getIndent=function(p){return p.match(/^\s*/)[0]},this.createWorker=function(p){return null},this.createModeDelegates=function(p){this.$embeds=[],this.$modes={};for(var g in p)if(p[g]){var y=p[g],x=y.prototype.$id,S=o.$modes[x];S||(o.$modes[x]=S=new y),o.$modes[g]||(o.$modes[g]=S),this.$embeds.push(g),this.$modes[g]=S}for(var E=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],g=0;g<E.length;g++)(function(w){var b=E[g],m=w[b];w[E[g]]=function(){return this.$delegator(b,arguments,m)}})(this)},this.$delegator=function(p,g,y){var x=g[0]||"start";if(typeof x!="string"){if(Array.isArray(x[2])){var S=x[2][x[2].length-1],E=this.$modes[S];if(E)return E[p].apply(E,[x[1]].concat([].slice.call(g,1)))}x=x[0]||"start"}for(var v=0;v<this.$embeds.length;v++)if(this.$modes[this.$embeds[v]]){var w=x.split(this.$embeds[v]);if(!w[0]&&w[1]){g[0]=w[1];var E=this.$modes[this.$embeds[v]];return E[p].apply(E,g)}}var b=y.apply(this,g);return y?b:void 0},this.transformAction=function(p,g,y,x,S){if(this.$behaviour){var E=this.$behaviour.getBehaviours();for(var v in E)if(E[v][g]){var w=E[v][g].apply(this,arguments);if(w)return w}}},this.getKeywords=function(p){if(!this.completionKeywords){var g=this.$tokenizer.rules,y=[];for(var x in g)for(var S=g[x],E=0,v=S.length;E<v;E++)if(typeof S[E].token=="string")/keyword|support|storage/.test(S[E].token)&&y.push(S[E].regex);else if(typeof S[E].token=="object"){for(var w=0,b=S[E].token.length;w<b;w++)if(/keyword|support|storage/.test(S[E].token[w])){var x=S[E].regex.match(/\(.+?\)/g)[w];y.push(x.substr(1,x.length-2))}}this.completionKeywords=y}return p?y.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(p,g,y,x){var S=this.$keywordList||this.$createKeywordList();return S.map(function(E){return{name:E,value:E,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(h.prototype),r.Mode=h}),ace.define("ace/apply_delta",["require","exports","module"],function(n,r,i){r.applyDelta=function(o,s,d){var a=s.start.row,c=s.start.column,u=o[a]||"";switch(s.action){case"insert":var l=s.lines;if(l.length===1)o[a]=u.substring(0,c)+s.lines[0]+u.substring(c);else{var f=[a,1].concat(s.lines);o.splice.apply(o,f),o[a]=u.substring(0,c)+o[a],o[a+s.lines.length-1]+=u.substring(c)}break;case"remove":var h=s.end.column,p=s.end.row;a===p?o[a]=u.substring(0,c)+u.substring(h):o.splice(a,p-a+1,u.substring(0,c)+o[p].substring(h));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){var o=n("./lib/oop"),s=n("./lib/event_emitter").EventEmitter,d=function(){function u(l,f,h){this.$onChange=this.onChange.bind(this),this.attach(l),typeof h>"u"?this.setPosition(f.row,f.column):this.setPosition(f,h)}return u.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},u.prototype.getDocument=function(){return this.document},u.prototype.onChange=function(l){if(!(l.start.row==l.end.row&&l.start.row!=this.row)&&!(l.start.row>this.row)){var f=c(l,{row:this.row,column:this.column},this.$insertRight);this.setPosition(f.row,f.column,!0)}},u.prototype.setPosition=function(l,f,h){var p;if(h?p={row:l,column:f}:p=this.$clipPositionToDocument(l,f),!(this.row==p.row&&this.column==p.column)){var g={row:this.row,column:this.column};this.row=p.row,this.column=p.column,this._signal("change",{old:g,value:p})}},u.prototype.detach=function(){this.document.off("change",this.$onChange)},u.prototype.attach=function(l){this.document=l||this.document,this.document.on("change",this.$onChange)},u.prototype.$clipPositionToDocument=function(l,f){var h={};return l>=this.document.getLength()?(h.row=Math.max(0,this.document.getLength()-1),h.column=this.document.getLine(h.row).length):l<0?(h.row=0,h.column=0):(h.row=l,h.column=Math.min(this.document.getLine(h.row).length,Math.max(0,f))),f<0&&(h.column=0),h},u}();d.prototype.$insertRight=!1,o.implement(d.prototype,s);function a(u,l,f){var h=f?u.column<=l.column:u.column<l.column;return u.row<l.row||u.row==l.row&&h}function c(u,l,f){var h=u.action=="insert",p=(h?1:-1)*(u.end.row-u.start.row),g=(h?1:-1)*(u.end.column-u.start.column),y=u.start,x=h?y:u.end;return a(l,y,f)?{row:l.row,column:l.column}:a(x,l,!f)?{row:l.row+p,column:l.column+(l.row==x.row?g:0)}:{row:y.row,column:y.column}}r.Anchor=d}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(n,r,i){var o=n("./lib/oop"),s=n("./apply_delta").applyDelta,d=n("./lib/event_emitter").EventEmitter,a=n("./range").Range,c=n("./anchor").Anchor,u=function(){function l(f){this.$lines=[""],f.length===0?this.$lines=[""]:Array.isArray(f)?this.insertMergedLines({row:0,column:0},f):this.insert({row:0,column:0},f)}return l.prototype.setValue=function(f){var h=this.getLength()-1;this.remove(new a(0,0,h,this.getLine(h).length)),this.insert({row:0,column:0},f||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(f,h){return new c(this,f,h)},l.prototype.$detectNewLine=function(f){var h=f.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=h?h[1]:`
`,this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
`;case"unix":return`
`;default:return this.$autoNewLine||`
`}},l.prototype.setNewLineMode=function(f){this.$newLineMode!==f&&(this.$newLineMode=f,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(f){return f==`\r
`||f=="\r"||f==`
`},l.prototype.getLine=function(f){return this.$lines[f]||""},l.prototype.getLines=function(f,h){return this.$lines.slice(f,h+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(f){return this.getLinesForRange(f).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(f){var h;if(f.start.row===f.end.row)h=[this.getLine(f.start.row).substring(f.start.column,f.end.column)];else{h=this.getLines(f.start.row,f.end.row),h[0]=(h[0]||"").substring(f.start.column);var p=h.length-1;f.end.row-f.start.row==p&&(h[p]=h[p].substring(0,f.end.column))}return h},l.prototype.insertLines=function(f,h){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(f,h)},l.prototype.removeLines=function(f,h){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(f,h)},l.prototype.insertNewLine=function(f){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(f,["",""])},l.prototype.insert=function(f,h){return this.getLength()<=1&&this.$detectNewLine(h),this.insertMergedLines(f,this.$split(h))},l.prototype.insertInLine=function(f,h){var p=this.clippedPos(f.row,f.column),g=this.pos(f.row,f.column+h.length);return this.applyDelta({start:p,end:g,action:"insert",lines:[h]},!0),this.clonePos(g)},l.prototype.clippedPos=function(f,h){var p=this.getLength();f===void 0?f=p:f<0?f=0:f>=p&&(f=p-1,h=void 0);var g=this.getLine(f);return h==null&&(h=g.length),h=Math.min(Math.max(h,0),g.length),{row:f,column:h}},l.prototype.clonePos=function(f){return{row:f.row,column:f.column}},l.prototype.pos=function(f,h){return{row:f,column:h}},l.prototype.$clipPosition=function(f){var h=this.getLength();return f.row>=h?(f.row=Math.max(0,h-1),f.column=this.getLine(h-1).length):(f.row=Math.max(0,f.row),f.column=Math.min(Math.max(f.column,0),this.getLine(f.row).length)),f},l.prototype.insertFullLines=function(f,h){f=Math.min(Math.max(f,0),this.getLength());var p=0;f<this.getLength()?(h=h.concat([""]),p=0):(h=[""].concat(h),f--,p=this.$lines[f].length),this.insertMergedLines({row:f,column:p},h)},l.prototype.insertMergedLines=function(f,h){var p=this.clippedPos(f.row,f.column),g={row:p.row+h.length-1,column:(h.length==1?p.column:0)+h[h.length-1].length};return this.applyDelta({start:p,end:g,action:"insert",lines:h}),this.clonePos(g)},l.prototype.remove=function(f){var h=this.clippedPos(f.start.row,f.start.column),p=this.clippedPos(f.end.row,f.end.column);return this.applyDelta({start:h,end:p,action:"remove",lines:this.getLinesForRange({start:h,end:p})}),this.clonePos(h)},l.prototype.removeInLine=function(f,h,p){var g=this.clippedPos(f,h),y=this.clippedPos(f,p);return this.applyDelta({start:g,end:y,action:"remove",lines:this.getLinesForRange({start:g,end:y})},!0),this.clonePos(g)},l.prototype.removeFullLines=function(f,h){f=Math.min(Math.max(0,f),this.getLength()-1),h=Math.min(Math.max(0,h),this.getLength()-1);var p=h==this.getLength()-1&&f>0,g=h<this.getLength()-1,y=p?f-1:f,x=p?this.getLine(y).length:0,S=g?h+1:h,E=g?0:this.getLine(S).length,v=new a(y,x,S,E),w=this.$lines.slice(f,h+1);return this.applyDelta({start:v.start,end:v.end,action:"remove",lines:this.getLinesForRange(v)}),w},l.prototype.removeNewLine=function(f){f<this.getLength()-1&&f>=0&&this.applyDelta({start:this.pos(f,this.getLine(f).length),end:this.pos(f+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(f,h){if(f instanceof a||(f=a.fromPoints(f.start,f.end)),h.length===0&&f.isEmpty())return f.start;if(h==this.getTextRange(f))return f.end;this.remove(f);var p;return h?p=this.insert(f.start,h):p=f.start,p},l.prototype.applyDeltas=function(f){for(var h=0;h<f.length;h++)this.applyDelta(f[h])},l.prototype.revertDeltas=function(f){for(var h=f.length-1;h>=0;h--)this.revertDelta(f[h])},l.prototype.applyDelta=function(f,h){var p=f.action=="insert";(p?f.lines.length<=1&&!f.lines[0]:!a.comparePoints(f.start,f.end))||(p&&f.lines.length>2e4?this.$splitAndapplyLargeDelta(f,2e4):(s(this.$lines,f,h),this._signal("change",f)))},l.prototype.$safeApplyDelta=function(f){var h=this.$lines.length;(f.action=="remove"&&f.start.row<h&&f.end.row<h||f.action=="insert"&&f.start.row<=h)&&this.applyDelta(f)},l.prototype.$splitAndapplyLargeDelta=function(f,h){for(var p=f.lines,g=p.length-h+1,y=f.start.row,x=f.start.column,S=0,E=0;S<g;S=E){E+=h-1;var v=p.slice(S,E);v.push(""),this.applyDelta({start:this.pos(y+S,x),end:this.pos(y+E,x=0),action:f.action,lines:v},!0)}f.lines=p.slice(S),f.start.row=y+S,f.start.column=x,this.applyDelta(f,!0)},l.prototype.revertDelta=function(f){this.$safeApplyDelta({start:this.clonePos(f.start),end:this.clonePos(f.end),action:f.action=="insert"?"remove":"insert",lines:f.lines.slice()})},l.prototype.indexToPosition=function(f,h){for(var p=this.$lines||this.getAllLines(),g=this.getNewLineCharacter().length,y=h||0,x=p.length;y<x;y++)if(f-=p[y].length+g,f<0)return{row:y,column:f+p[y].length+g};return{row:x-1,column:f+p[x-1].length+g}},l.prototype.positionToIndex=function(f,h){for(var p=this.$lines||this.getAllLines(),g=this.getNewLineCharacter().length,y=0,x=Math.min(f.row,p.length),S=h||0;S<x;++S)y+=p[S].length+g;return y+f.column},l.prototype.$split=function(f){return f.split(/\r\n|\r|\n/)},l}();u.prototype.$autoNewLine="",u.prototype.$newLineMode="auto",o.implement(u.prototype,d),r.Document=u}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){var o=n("./lib/oop"),s=n("./lib/event_emitter").EventEmitter,d=function(){function a(c,u){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=c;var l=this;this.$worker=function(){if(l.running){for(var f=new Date,h=l.currentLine,p=-1,g=l.doc,y=h;l.lines[h];)h++;var x=g.getLength(),S=0;for(l.running=!1;h<x;){l.$tokenizeRow(h),p=h;do h++;while(l.lines[h]);if(S++,S%5===0&&new Date-f>20){l.running=setTimeout(l.$worker,20);break}}l.currentLine=h,p==-1&&(p=h),y<=p&&l.fireUpdateEvent(y,p)}}}return a.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(c,u){var l={first:c,last:u};this._signal("update",{data:l})},a.prototype.start=function(c){this.currentLine=Math.min(c||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(c){var u=c.start.row,l=c.end.row-u;if(l===0)this.lines[u]=null;else if(c.action=="remove")this.lines.splice(u,l+1,null),this.states.splice(u,l+1,null);else{var f=Array(l+1);f.unshift(u,1),this.lines.splice.apply(this.lines,f),this.states.splice.apply(this.states,f)}this.currentLine=Math.min(u,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},a.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},a.prototype.$tokenizeRow=function(c){var u=this.doc.getLine(c),l=this.states[c-1],f=this.tokenizer.getLineTokens(u,l,c);return this.states[c]+""!=f.state+""?(this.states[c]=f.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=f.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();o.implement(d.prototype,s),r.BackgroundTokenizer=d}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(n,r,i){var o=n("./lib/lang"),s=n("./range").Range,d=function(){function a(c,u,l){l===void 0&&(l="text"),this.setRegexp(c),this.clazz=u,this.type=l}return a.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},a.prototype.update=function(c,u,l,f){if(this.regExp)for(var h=f.firstRow,p=f.lastRow,g={},y=h;y<=p;y++){var x=this.cache[y];x==null&&(x=o.getMatchOffsets(l.getLine(y),this.regExp),x.length>this.MAX_RANGES&&(x=x.slice(0,this.MAX_RANGES)),x=x.map(function(w){return new s(y,w.offset,y,w.offset+w.length)}),this.cache[y]=x.length?x:"");for(var S=x.length;S--;){var E=x[S].toScreenRange(l),v=E.toString();g[v]||(g[v]=!0,u.drawSingleLineMarker(c,E,this.clazz,f))}}},a}();d.prototype.MAX_RANGES=500,r.SearchHighlight=d}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(n,r,i){var o=n("../range").Range,s=function(){function d(a,c){this.foldData=a,Array.isArray(c)?this.folds=c:c=this.folds=[c];var u=c[c.length-1];this.range=new o(c[0].start.row,c[0].start.column,u.end.row,u.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(l){l.setFoldLine(this)},this)}return d.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(c){c.start.row+=a,c.end.row+=a})},d.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(c,u){return-c.range.compareEnd(u.start.row,u.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},d.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},d.prototype.walk=function(a,c,u){var l=0,f=this.folds,h,p,g,y=!0;c==null&&(c=this.end.row,u=this.end.column);for(var x=0;x<f.length;x++){if(h=f[x],p=h.range.compareStart(c,u),p==-1){a(null,c,u,l,y);return}if(g=a(null,h.start.row,h.start.column,l,y),g=!g&&a(h.placeholder,h.start.row,h.start.column,l),g||p===0)return;y=!h.sameRow,l=h.end.column}a(null,c,u,l,y)},d.prototype.getNextFoldTo=function(a,c){for(var u,l,f=0;f<this.folds.length;f++){if(u=this.folds[f],l=u.range.compareEnd(a,c),l==-1)return{fold:u,kind:"after"};if(l===0)return{fold:u,kind:"inside"}}return null},d.prototype.addRemoveChars=function(a,c,u){var l=this.getNextFoldTo(a,c),f,h;if(l){if(f=l.fold,l.kind=="inside"&&f.start.column!=c&&f.start.row!=a)window.console&&window.console.log(a,c,f);else if(f.start.row==a){h=this.folds;var p=h.indexOf(f);for(p===0&&(this.start.column+=u),p;p<h.length;p++){if(f=h[p],f.start.column+=u,!f.sameRow)return;f.end.column+=u}this.end.column+=u}}},d.prototype.split=function(a,c){var u=this.getNextFoldTo(a,c);if(!u||u.kind=="inside")return null;var l=u.fold,f=this.folds,h=this.foldData,p=f.indexOf(l),g=f[p-1];this.end.row=g.end.row,this.end.column=g.end.column,f=f.splice(p,f.length-p);var y=new d(h,f);return h.splice(h.indexOf(this)+1,0,y),y},d.prototype.merge=function(a){for(var c=a.folds,u=0;u<c.length;u++)this.addFold(c[u]);var l=this.foldData;l.splice(l.indexOf(a),1)},d.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(c){a.push(" "+c.toString())}),a.push("]"),a.join(`
`)},d.prototype.idxToPosition=function(a){for(var c=0,u=0;u<this.folds.length;u++){var l=this.folds[u];if(a-=l.start.column-c,a<0)return{row:l.start.row,column:l.start.column+a};if(a-=l.placeholder.length,a<0)return l.start;c=l.end.column}return{row:this.end.row,column:this.end.column+a}},d}();r.FoldLine=s}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(n,r,i){var o=n("./range").Range,s=o.comparePoints,d=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(c,u,l){for(var f=this.ranges,h=l||0;h<f.length;h++){var p=f[h],g=s(c,p.end);if(!(g>0)){var y=s(c,p.start);return g===0?u&&y!==0?-h-2:h:y>0||y===0&&!u?h:-h-1}}return-h-1},a.prototype.add=function(c){var u=!c.isEmpty(),l=this.pointIndex(c.start,u);l<0&&(l=-l-1);var f=this.pointIndex(c.end,u,l);return f<0?f=-f-1:f++,this.ranges.splice(l,f-l,c)},a.prototype.addList=function(c){for(var u=[],l=c.length;l--;)u.push.apply(u,this.add(c[l]));return u},a.prototype.substractPoint=function(c){var u=this.pointIndex(c);if(u>=0)return this.ranges.splice(u,1)},a.prototype.merge=function(){var c=[],u=this.ranges;u=u.sort(function(g,y){return s(g.start,y.start)});for(var l=u[0],f,h=1;h<u.length;h++){f=l,l=u[h];var p=s(f.end,l.start);p<0||p==0&&!f.isEmpty()&&!l.isEmpty()||(s(f.end,l.end)<0&&(f.end.row=l.end.row,f.end.column=l.end.column),u.splice(h,1),c.push(l),l=f,h--)}return this.ranges=u,c},a.prototype.contains=function(c,u){return this.pointIndex({row:c,column:u})>=0},a.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},a.prototype.rangeAtPoint=function(c){var u=this.pointIndex(c);if(u>=0)return this.ranges[u]},a.prototype.clipRows=function(c,u){var l=this.ranges;if(l[0].start.row>u||l[l.length-1].start.row<c)return[];var f=this.pointIndex({row:c,column:0});f<0&&(f=-f-1);var h=this.pointIndex({row:u,column:0},f);h<0&&(h=-h-1);for(var p=[],g=f;g<h;g++)p.push(l[g]);return p},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(c){this.session&&this.detach(),this.session=c,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(c){for(var u=c.start,l=c.end,f=u.row,h=l.row,p=this.ranges,g=0,y=p.length;g<y;g++){var x=p[g];if(x.end.row>=f)break}if(c.action=="insert")for(var S=h-f,E=-u.column+l.column;g<y;g++){var x=p[g];if(x.start.row>f)break;if(x.start.row==f&&x.start.column>=u.column&&(x.start.column==u.column&&this.$bias<=0||(x.start.column+=E,x.start.row+=S)),x.end.row==f&&x.end.column>=u.column){if(x.end.column==u.column&&this.$bias<0)continue;x.end.column==u.column&&E>0&&g<y-1&&x.end.column>x.start.column&&x.end.column==p[g+1].start.column&&(x.end.column-=E),x.end.column+=E,x.end.row+=S}}else for(var S=f-h,E=u.column-l.column;g<y;g++){var x=p[g];if(x.start.row>h)break;x.end.row<h&&(f<x.end.row||f==x.end.row&&u.column<x.end.column)?(x.end.row=f,x.end.column=u.column):x.end.row==h?x.end.column<=l.column?(S||x.end.column>u.column)&&(x.end.column=u.column,x.end.row=u.row):(x.end.column+=E,x.end.row+=S):x.end.row>h&&(x.end.row+=S),x.start.row<h&&(f<x.start.row||f==x.start.row&&u.column<x.start.column)?(x.start.row=f,x.start.column=u.column):x.start.row==h?x.start.column<=l.column?(S||x.start.column>u.column)&&(x.start.column=u.column,x.start.row=u.row):(x.start.column+=E,x.start.row+=S):x.start.row>h&&(x.start.row+=S)}if(S!=0&&g<y)for(;g<y;g++){var x=p[g];x.start.row+=S,x.end.row+=S}},a}();d.prototype.comparePoints=s,r.RangeList=d}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(n,r,i){var o=this&&this.__extends||function(){var f=function(h,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,y){g.__proto__=y}||function(g,y){for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(g[x]=y[x])},f(h,p)};return function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");f(h,p);function g(){this.constructor=h}h.prototype=p===null?Object.create(p):(g.prototype=p.prototype,new g)}}(),s=n("../range_list").RangeList,d=function(f){o(h,f);function h(p,g){var y=f.call(this)||this;return y.foldLine=null,y.placeholder=g,y.range=p,y.start=p.start,y.end=p.end,y.sameRow=p.start.row==p.end.row,y.subFolds=y.ranges=[],y}return h.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},h.prototype.setFoldLine=function(p){this.foldLine=p,this.subFolds.forEach(function(g){g.setFoldLine(p)})},h.prototype.clone=function(){var p=this.range.clone(),g=new h(p,this.placeholder);return this.subFolds.forEach(function(y){g.subFolds.push(y.clone())}),g.collapseChildren=this.collapseChildren,g},h.prototype.addSubFold=function(p){if(!this.range.isEqual(p)){c(p,this.start);for(var E=p.start.row,v=p.start.column,g=0,y=-1;g<this.subFolds.length&&(y=this.subFolds[g].range.compare(E,v),y==1);g++);var x=this.subFolds[g],S=0;if(y==0){if(x.range.containsRange(p))return x.addSubFold(p);S=1}for(var E=p.range.end.row,v=p.range.end.column,w=g,y=-1;w<this.subFolds.length&&(y=this.subFolds[w].range.compare(E,v),y==1);w++);y==0&&w++;for(var b=this.subFolds.splice(g,w-g,p),m=y==0?b.length-1:b.length,$=S;$<m;$++)p.addSubFold(b[$]);return p.setFoldLine(this.foldLine),p}},h.prototype.restoreRange=function(p){return l(p,this.start)},h}(s);function a(f,h){f.row-=h.row,f.row==0&&(f.column-=h.column)}function c(f,h){a(f.start,h),a(f.end,h)}function u(f,h){f.row==0&&(f.column+=h.column),f.row+=h.row}function l(f,h){u(f.start,h),u(f.end,h)}r.Fold=d}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(n,r,i){var o=n("../range").Range,s=n("./fold_line").FoldLine,d=n("./fold").Fold,a=n("../token_iterator").TokenIterator,c=n("../mouse/mouse_event").MouseEvent;function u(){this.getFoldAt=function(l,f,h){var p=this.getFoldLine(l);if(!p)return null;for(var g=p.folds,y=0;y<g.length;y++){var x=g[y].range;if(x.contains(l,f)){if(h==1&&x.isEnd(l,f)&&!x.isEmpty())continue;if(h==-1&&x.isStart(l,f)&&!x.isEmpty())continue;return g[y]}}},this.getFoldsInRange=function(l){var f=l.start,h=l.end,p=this.$foldData,g=[];f.column+=1,h.column-=1;for(var y=0;y<p.length;y++){var x=p[y].range.compareRange(l);if(x!=2){if(x==-2)break;for(var S=p[y].folds,E=0;E<S.length;E++){var v=S[E];if(x=v.range.compareRange(l),x==-2)break;if(x==2)continue;if(x==42)break;g.push(v)}}}return f.column-=1,h.column+=1,g},this.getFoldsInRangeList=function(l){if(Array.isArray(l)){var f=[];l.forEach(function(h){f=f.concat(this.getFoldsInRange(h))},this)}else var f=this.getFoldsInRange(l);return f},this.getAllFolds=function(){for(var l=[],f=this.$foldData,h=0;h<f.length;h++)for(var p=0;p<f[h].folds.length;p++)l.push(f[h].folds[p]);return l},this.getFoldStringAt=function(l,f,h,p){if(p=p||this.getFoldLine(l),!p)return null;for(var g={end:{column:0}},y,x,S=0;S<p.folds.length;S++){x=p.folds[S];var E=x.range.compareEnd(l,f);if(E==-1){y=this.getLine(x.start.row).substring(g.end.column,x.start.column);break}else if(E===0)return null;g=x}return y||(y=this.getLine(x.start.row).substring(g.end.column)),h==-1?y.substring(0,f-g.end.column):h==1?y.substring(f-g.end.column):y},this.getFoldLine=function(l,f){var h=this.$foldData,p=0;for(f&&(p=h.indexOf(f)),p==-1&&(p=0),p;p<h.length;p++){var g=h[p];if(g.start.row<=l&&g.end.row>=l)return g;if(g.end.row>l)return null}return null},this.getNextFoldLine=function(l,f){var h=this.$foldData,p=0;for(f&&(p=h.indexOf(f)),p==-1&&(p=0),p;p<h.length;p++){var g=h[p];if(g.end.row>=l)return g}return null},this.getFoldedRowCount=function(l,f){for(var h=this.$foldData,p=f-l+1,g=0;g<h.length;g++){var y=h[g],x=y.end.row,S=y.start.row;if(x>=f){S<f&&(S>=l?p-=f-S:p=0);break}else x>=l&&(S>=l?p-=x-S:p-=x-l+1)}return p},this.$addFoldLine=function(l){return this.$foldData.push(l),this.$foldData.sort(function(f,h){return f.start.row-h.start.row}),l},this.addFold=function(l,f){var h=this.$foldData,p=!1,g;l instanceof d?g=l:(g=new d(f,l),g.collapseChildren=f.collapseChildren),this.$clipRangeToDocument(g.range);var y=g.start.row,x=g.start.column,S=g.end.row,E=g.end.column,v=this.getFoldAt(y,x,1),w=this.getFoldAt(S,E,-1);if(v&&w==v)return v.addSubFold(g);v&&!v.range.isStart(y,x)&&this.removeFold(v),w&&!w.range.isEnd(S,E)&&this.removeFold(w);var b=this.getFoldsInRange(g.range);b.length>0&&(this.removeFolds(b),g.collapseChildren||b.forEach(function(C){g.addSubFold(C)}));for(var m=0;m<h.length;m++){var $=h[m];if(S==$.start.row){$.addFold(g),p=!0;break}else if(y==$.end.row){if($.addFold(g),p=!0,!g.sameRow){var A=h[m+1];if(A&&A.start.row==S){$.merge(A);break}}break}else if(S<=$.start.row)break}return p||($=this.$addFoldLine(new s(this.$foldData,g))),this.$useWrapMode?this.$updateWrapData($.start.row,$.start.row):this.$updateRowLengthCache($.start.row,$.start.row),this.$modified=!0,this._signal("changeFold",{data:g,action:"add"}),g},this.addFolds=function(l){l.forEach(function(f){this.addFold(f)},this)},this.removeFold=function(l){var f=l.foldLine,h=f.start.row,p=f.end.row,g=this.$foldData,y=f.folds;if(y.length==1)g.splice(g.indexOf(f),1);else if(f.range.isEnd(l.end.row,l.end.column))y.pop(),f.end.row=y[y.length-1].end.row,f.end.column=y[y.length-1].end.column;else if(f.range.isStart(l.start.row,l.start.column))y.shift(),f.start.row=y[0].start.row,f.start.column=y[0].start.column;else if(l.sameRow)y.splice(y.indexOf(l),1);else{var x=f.split(l.start.row,l.start.column);y=x.folds,y.shift(),x.start.row=y[0].start.row,x.start.column=y[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(h,p):this.$updateRowLengthCache(h,p)),this.$modified=!0,this._signal("changeFold",{data:l,action:"remove"})},this.removeFolds=function(l){for(var f=[],h=0;h<l.length;h++)f.push(l[h]);f.forEach(function(p){this.removeFold(p)},this),this.$modified=!0},this.expandFold=function(l){this.removeFold(l),l.subFolds.forEach(function(f){l.restoreRange(f),this.addFold(f)},this),l.collapseChildren>0&&this.foldAll(l.start.row+1,l.end.row,l.collapseChildren-1),l.subFolds=[]},this.expandFolds=function(l){l.forEach(function(f){this.expandFold(f)},this)},this.unfold=function(l,f){var h,p;if(l==null)h=new o(0,0,this.getLength(),0),f==null&&(f=!0);else if(typeof l=="number")h=new o(l,0,l,this.getLine(l).length);else if("row"in l)h=o.fromPoints(l,l);else{if(Array.isArray(l))return p=[],l.forEach(function(y){p=p.concat(this.unfold(y))},this),p;h=l}p=this.getFoldsInRangeList(h);for(var g=p;p.length==1&&o.comparePoints(p[0].start,h.start)<0&&o.comparePoints(p[0].end,h.end)>0;)this.expandFolds(p),p=this.getFoldsInRangeList(h);if(f!=!1?this.removeFolds(p):this.expandFolds(p),g.length)return g},this.isRowFolded=function(l,f){return!!this.getFoldLine(l,f)},this.getRowFoldEnd=function(l,f){var h=this.getFoldLine(l,f);return h?h.end.row:l},this.getRowFoldStart=function(l,f){var h=this.getFoldLine(l,f);return h?h.start.row:l},this.getFoldDisplayLine=function(l,f,h,p,g){p==null&&(p=l.start.row),g==null&&(g=0),f==null&&(f=l.end.row),h==null&&(h=this.getLine(f).length);var y=this.doc,x="";return l.walk(function(S,E,v,w){if(!(E<p)){if(E==p){if(v<g)return;w=Math.max(g,w)}S!=null?x+=S:x+=y.getLine(E).substring(w,v)}},f,h),x},this.getDisplayLine=function(l,f,h,p){var g=this.getFoldLine(l);if(g)return this.getFoldDisplayLine(g,l,f,h,p);var y;return y=this.doc.getLine(l),y.substring(p||0,f||y.length)},this.$cloneFoldData=function(){var l=[];return l=this.$foldData.map(function(f){var h=f.folds.map(function(p){return p.clone()});return new s(l,h)}),l},this.toggleFold=function(l){var f=this.selection,h=f.getRange(),p,g;if(h.isEmpty()){var y=h.start;if(p=this.getFoldAt(y.row,y.column),p){this.expandFold(p);return}else(g=this.findMatchingBracket(y))?h.comparePoint(g)==1?h.end=g:(h.start=g,h.start.column++,h.end.column--):(g=this.findMatchingBracket({row:y.row,column:y.column+1}))?(h.comparePoint(g)==1?h.end=g:h.start=g,h.start.column++):h=this.getCommentFoldRange(y.row,y.column)||h}else{var x=this.getFoldsInRange(h);if(l&&x.length){this.expandFolds(x);return}else x.length==1&&(p=x[0])}if(p||(p=this.getFoldAt(h.start.row,h.start.column)),p&&p.range.toString()==h.toString()){this.expandFold(p);return}var S="...";if(!h.isMultiLine()){if(S=this.getTextRange(h),S.length<4)return;S=S.trim().substring(0,2)+".."}this.addFold(S,h)},this.getCommentFoldRange=function(l,f,h){var p=new a(this,l,f),g=p.getCurrentToken(),y=g&&g.type;if(g&&/^comment|string/.test(y)){y=y.match(/comment|string/)[0],y=="comment"&&(y+="|doc-start");var x=new RegExp(y),S=new o;if(h!=1){do g=p.stepBackward();while(g&&x.test(g.type)&&!/^comment.end/.test(g.type));g=p.stepForward()}if(S.start.row=p.getCurrentTokenRow(),S.start.column=p.getCurrentTokenColumn()+(/^comment.start/.test(g.type)?g.value.length:2),p=new a(this,l,f),h!=-1){var E=-1;do if(g=p.stepForward(),E==-1){var v=this.getState(p.$row);x.test(v)||(E=p.$row)}else if(p.$row>E)break;while(g&&x.test(g.type)&&!/^comment.start/.test(g.type));g=p.stepBackward()}else g=p.getCurrentToken();return S.end.row=p.getCurrentTokenRow(),S.end.column=p.getCurrentTokenColumn(),/^comment.end/.test(g.type)||(S.end.column+=g.value.length-2),S}},this.foldAll=function(l,f,h,p){h==null&&(h=1e5);var g=this.foldWidgets;if(g){f=f||this.getLength(),l=l||0;for(var y=l;y<f;y++)if(g[y]==null&&(g[y]=this.getFoldWidget(y)),g[y]=="start"&&!(p&&!p(y))){var x=this.getFoldWidgetRange(y);x&&x.isMultiLine()&&x.end.row<=f&&x.start.row>=l&&(y=x.end.row,x.collapseChildren=h,this.addFold("...",x))}}},this.foldToLevel=function(l){for(this.foldAll();l-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var l=this;this.foldAll(null,null,null,function(f){for(var h=l.getTokens(f),p=0;p<h.length;p++){var g=h[p];if(!(g.type=="text"&&/^\s+$/.test(g.value)))return!!/comment/.test(g.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(l){if(!this.$foldStyles[l])throw new Error("invalid fold style: "+l+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=l){this.$foldStyle=l,l=="manual"&&this.unfold();var f=this.$foldMode;this.$setFolding(null),this.$setFolding(f)}},this.$setFolding=function(l){if(this.$foldMode!=l){if(this.$foldMode=l,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!l||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=l.getFoldWidget.bind(l,this,this.$foldStyle),this.getFoldWidgetRange=l.getFoldWidgetRange.bind(l,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(l,f){var h=this.foldWidgets;if(!h||f&&h[l])return{};for(var p=l-1,g;p>=0;){var y=h[p];if(y==null&&(y=h[p]=this.getFoldWidget(p)),y=="start"){var x=this.getFoldWidgetRange(p);if(g||(g=x),x&&x.end.row>=l)break}p--}return{range:p!==-1&&x,firstRange:g}},this.onFoldWidgetClick=function(l,f){f instanceof c&&(f=f.domEvent);var h={children:f.shiftKey,all:f.ctrlKey||f.metaKey,siblings:f.altKey},p=this.$toggleFoldWidget(l,h);if(!p){var g=f.target||f.srcElement;g&&/ace_fold-widget/.test(g.className)&&(g.className+=" ace_invalid")}},this.$toggleFoldWidget=function(l,f){if(this.getFoldWidget){var h=this.getFoldWidget(l),p=this.getLine(l),g=h==="end"?-1:1,y=this.getFoldAt(l,g===-1?0:p.length,g);if(y)return f.children||f.all?this.removeFold(y):this.expandFold(y),y;var x=this.getFoldWidgetRange(l,!0);if(x&&!x.isMultiLine()&&(y=this.getFoldAt(x.start.row,x.start.column,1),y&&x.isEqual(y.range)))return this.removeFold(y),y;if(f.siblings){var S=this.getParentFoldRangeData(l);if(S.range)var E=S.range.start.row+1,v=S.range.end.row;this.foldAll(E,v,f.all?1e4:0)}else f.children?(v=x?x.end.row:this.getLength(),this.foldAll(l+1,v,f.all?1e4:0)):x&&(f.all&&(x.collapseChildren=1e4),this.addFold("...",x));return x}},this.toggleFoldWidget=function(l){var f=this.selection.getCursor().row;f=this.getRowFoldStart(f);var h=this.$toggleFoldWidget(f,{});if(!h){var p=this.getParentFoldRangeData(f,!0);if(h=p.range||p.firstRange,h){f=h.start.row;var g=this.getFoldAt(f,this.getLine(f).length,1);g?this.removeFold(g):this.addFold("...",h)}}},this.updateFoldWidgets=function(l){var f=l.start.row,h=l.end.row-f;if(h===0)this.foldWidgets[f]=null;else if(l.action=="remove")this.foldWidgets.splice(f,h+1,null);else{var p=Array(h+1);p.unshift(f,1),this.foldWidgets.splice.apply(this.foldWidgets,p)}},this.tokenizerUpdateFoldWidgets=function(l){var f=l.data;f.first!=f.last&&this.foldWidgets.length>f.first&&this.foldWidgets.splice(f.first,this.foldWidgets.length)}}r.Folding=u}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(n,r,i){var o=n("../token_iterator").TokenIterator,s=n("../range").Range;function d(){this.findMatchingBracket=function(a,c){if(a.column==0)return null;var u=c||this.getLine(a.row).charAt(a.column-1);if(u=="")return null;var l=u.match(/([\(\[\{])|([\)\]\}])/);return l?l[1]?this.$findClosingBracket(l[1],a):this.$findOpeningBracket(l[2],a):null},this.getBracketRange=function(a){var c=this.getLine(a.row),u=!0,l,f=c.charAt(a.column-1),h=f&&f.match(/([\(\[\{])|([\)\]\}])/);if(h||(f=c.charAt(a.column),a={row:a.row,column:a.column+1},h=f&&f.match(/([\(\[\{])|([\)\]\}])/),u=!1),!h)return null;if(h[1]){var p=this.$findClosingBracket(h[1],a);if(!p)return null;l=s.fromPoints(a,p),u||(l.end.column++,l.start.column--),l.cursor=l.end}else{var p=this.$findOpeningBracket(h[2],a);if(!p)return null;l=s.fromPoints(p,a),u||(l.start.column++,l.end.column--),l.cursor=l.start}return l},this.getMatchingBracketRanges=function(a,c){var u=this.getLine(a.row),l=/([\(\[\{])|([\)\]\}])/,f=!c&&u.charAt(a.column-1),h=f&&f.match(l);if(h||(f=(c===void 0||c)&&u.charAt(a.column),a={row:a.row,column:a.column+1},h=f&&f.match(l)),!h)return null;var p=new s(a.row,a.column-1,a.row,a.column),g=h[1]?this.$findClosingBracket(h[1],a):this.$findOpeningBracket(h[2],a);if(!g)return[p];var y=new s(g.row,g.column,g.row,g.column+1);return[p,y]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,c,u){var l=this.$brackets[a],f=1,h=new o(this,c.row,c.column),p=h.getCurrentToken();if(p||(p=h.stepForward()),!!p){u||(u=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var g=c.column-h.getCurrentTokenColumn()-2,y=p.value;;){for(;g>=0;){var x=y.charAt(g);if(x==l){if(f-=1,f==0)return{row:h.getCurrentTokenRow(),column:g+h.getCurrentTokenColumn()}}else x==a&&(f+=1);g-=1}do p=h.stepBackward();while(p&&!u.test(p.type));if(p==null)break;y=p.value,g=y.length-1}return null}},this.$findClosingBracket=function(a,c,u){var l=this.$brackets[a],f=1,h=new o(this,c.row,c.column),p=h.getCurrentToken();if(p||(p=h.stepForward()),!!p){u||(u=new RegExp("(\\.?"+p.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var g=c.column-h.getCurrentTokenColumn();;){for(var y=p.value,x=y.length;g<x;){var S=y.charAt(g);if(S==l){if(f-=1,f==0)return{row:h.getCurrentTokenRow(),column:g+h.getCurrentTokenColumn()}}else S==a&&(f+=1);g+=1}do p=h.stepForward();while(p&&!u.test(p.type));if(p==null)break;g=0}return null}},this.getMatchingTags=function(a){var c=new o(this,a.row,a.column),u=this.$findTagName(c);if(u){var l=c.stepBackward();return l.value==="<"?this.$findClosingTag(c,u):this.$findOpeningTag(c,u)}},this.$findTagName=function(a){var c=a.getCurrentToken(),u=!1,l=!1;if(c&&c.type.indexOf("tag-name")===-1)do l?c=a.stepBackward():c=a.stepForward(),c&&(c.value==="/>"?l=!0:c.type.indexOf("tag-name")!==-1&&(u=!0));while(c&&!u);return c},this.$findClosingTag=function(a,c){var u,l=c.value,f=c.value,h=0,p=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=a.stepForward();var g=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length),y=!1;do if(u=c,c=a.stepForward(),c){if(c.value===">"&&!y){var x=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);y=!0}if(c.type.indexOf("tag-name")!==-1){if(l=c.value,f===l){if(u.value==="<")h++;else if(u.value==="</"&&(h--,h<0)){a.stepBackward();var S=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);c=a.stepForward();var E=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c=a.stepForward(),c&&c.value===">")var v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(f===l&&c.value==="/>"&&(h--,h<0))var S=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),E=S,v=E,x=new s(g.end.row,g.end.column,g.end.row,g.end.column+1)}while(c&&h>=0);if(p&&x&&S&&v&&g&&E)return{openTag:new s(p.start.row,p.start.column,x.end.row,x.end.column),closeTag:new s(S.start.row,S.start.column,v.end.row,v.end.column),openTagName:g,closeTagName:E}},this.$findOpeningTag=function(a,c){var u=a.getCurrentToken(),l=c.value,f=0,h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+2,y=new s(h,p,h,g);a.stepForward();var x=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c=a.stepForward(),!(!c||c.value!==">")){var S=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(c=u,h=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn(),g=p+c.value.length,u=a.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(l===c.value)if(u.value==="<"){if(f++,f>0){var E=new s(h,p,h,g),v=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do c=a.stepForward();while(c&&c.value!==">");var w=new s(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else u.value==="</"&&f--}else if(c.value==="/>"){for(var b=0,m=u;m;){if(m.type.indexOf("tag-name")!==-1&&m.value===l){f--;break}else if(m.value==="<")break;m=a.stepBackward(),b++}for(var $=0;$<b;$++)a.stepForward()}}while(u&&f<=0);if(v&&w&&y&&S&&E&&x)return{openTag:new s(v.start.row,v.start.column,w.end.row,w.end.column),closeTag:new s(y.start.row,y.start.column,S.end.row,S.end.column),openTagName:E,closeTagName:x}}}}r.BracketMatch=d}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(n,r,i){var o=n("./lib/oop"),s=n("./lib/lang"),d=n("./bidihandler").BidiHandler,a=n("./config"),c=n("./lib/event_emitter").EventEmitter,u=n("./selection").Selection,l=n("./mode/text").Mode,f=n("./range").Range,h=n("./document").Document,p=n("./background_tokenizer").BackgroundTokenizer,g=n("./search_highlight").SearchHighlight,y=function(){function C(k,I){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++C.$uid,this.$foldData.toString=function(){return this.join(`
`)},this.bgTokenizer=new p(new l().getTokenizer(),this);var L=this;this.bgTokenizer.on("update",function(T){L._signal("tokenizerUpdate",T)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof k!="object"||!k.getLine)&&(k=new h(k)),this.setDocument(k),this.selection=new u(this),this.$bidiHandler=new d(this),a.resetOptions(this),this.setMode(I),a._signal("session",this),this.destroyed=!1}return C.prototype.setDocument=function(k){this.doc&&this.doc.off("change",this.$onChange),this.doc=k,k.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},C.prototype.getDocument=function(){return this.doc},C.prototype.$resetRowCache=function(k){if(!k){this.$docRowCache=[],this.$screenRowCache=[];return}var I=this.$docRowCache.length,L=this.$getRowCacheIndex(this.$docRowCache,k)+1;I>L&&(this.$docRowCache.splice(L,I),this.$screenRowCache.splice(L,I))},C.prototype.$getRowCacheIndex=function(k,I){for(var L=0,T=k.length-1;L<=T;){var R=L+T>>1,P=k[R];if(I>P)L=R+1;else if(I<P)T=R-1;else return R}return L-1},C.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},C.prototype.onChangeFold=function(k){var I=k.data;this.$resetRowCache(I.start.row)},C.prototype.onChange=function(k){this.$modified=!0,this.$bidiHandler.onChange(k),this.$resetRowCache(k.start.row);var I=this.$updateInternalDataOnChange(k);!this.$fromUndo&&this.$undoManager&&(I&&I.length&&(this.$undoManager.add({action:"removeFolds",folds:I},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(k,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(k),this._signal("change",k)},C.prototype.setValue=function(k){this.doc.setValue(k),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},C.prototype.toString=function(){return this.doc.getValue()},C.prototype.getSelection=function(){return this.selection},C.prototype.getState=function(k){return this.bgTokenizer.getState(k)},C.prototype.getTokens=function(k){return this.bgTokenizer.getTokens(k)},C.prototype.getTokenAt=function(k,I){var L=this.bgTokenizer.getTokens(k),T,R=0;if(I==null){var P=L.length-1;R=this.getLine(k).length}else for(var P=0;P<L.length&&(R+=L[P].value.length,!(R>=I));P++);return T=L[P],T?(T.index=P,T.start=R-T.value.length,T):null},C.prototype.setUndoManager=function(k){if(this.$undoManager=k,this.$informUndoManager&&this.$informUndoManager.cancel(),k){var I=this;k.addSession(this),this.$syncInformUndoManager=function(){I.$informUndoManager.cancel(),I.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},C.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},C.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},C.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):" "},C.prototype.setUseSoftTabs=function(k){this.setOption("useSoftTabs",k)},C.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},C.prototype.setTabSize=function(k){this.setOption("tabSize",k)},C.prototype.getTabSize=function(){return this.$tabSize},C.prototype.isTabStop=function(k){return this.$useSoftTabs&&k.column%this.$tabSize===0},C.prototype.setNavigateWithinSoftTabs=function(k){this.setOption("navigateWithinSoftTabs",k)},C.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},C.prototype.setOverwrite=function(k){this.setOption("overwrite",k)},C.prototype.getOverwrite=function(){return this.$overwrite},C.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},C.prototype.addGutterDecoration=function(k,I){this.$decorations[k]||(this.$decorations[k]=""),this.$decorations[k]+=" "+I,this._signal("changeBreakpoint",{})},C.prototype.removeGutterDecoration=function(k,I){this.$decorations[k]=(this.$decorations[k]||"").replace(" "+I,""),this._signal("changeBreakpoint",{})},C.prototype.getBreakpoints=function(){return this.$breakpoints},C.prototype.setBreakpoints=function(k){this.$breakpoints=[];for(var I=0;I<k.length;I++)this.$breakpoints[k[I]]="ace_breakpoint";this._signal("changeBreakpoint",{})},C.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},C.prototype.setBreakpoint=function(k,I){I===void 0&&(I="ace_breakpoint"),I?this.$breakpoints[k]=I:delete this.$breakpoints[k],this._signal("changeBreakpoint",{})},C.prototype.clearBreakpoint=function(k){delete this.$breakpoints[k],this._signal("changeBreakpoint",{})},C.prototype.addMarker=function(k,I,L,T){var R=this.$markerId++,P={range:k,type:L||"line",renderer:typeof L=="function"?L:null,clazz:I,inFront:!!T,id:R};return T?(this.$frontMarkers[R]=P,this._signal("changeFrontMarker")):(this.$backMarkers[R]=P,this._signal("changeBackMarker")),R},C.prototype.addDynamicMarker=function(k,I){if(k.update){var L=this.$markerId++;return k.id=L,k.inFront=!!I,I?(this.$frontMarkers[L]=k,this._signal("changeFrontMarker")):(this.$backMarkers[L]=k,this._signal("changeBackMarker")),k}},C.prototype.removeMarker=function(k){var I=this.$frontMarkers[k]||this.$backMarkers[k];if(I){var L=I.inFront?this.$frontMarkers:this.$backMarkers;delete L[k],this._signal(I.inFront?"changeFrontMarker":"changeBackMarker")}},C.prototype.getMarkers=function(k){return k?this.$frontMarkers:this.$backMarkers},C.prototype.highlight=function(k){if(!this.$searchHighlight){var I=new g(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(I)}this.$searchHighlight.setRegexp(k)},C.prototype.highlightLines=function(k,I,L,T){typeof I!="number"&&(L=I,I=k),L||(L="ace_step");var R=new f(k,0,I,1/0);return R.id=this.addMarker(R,L,"fullLine",T),R},C.prototype.setAnnotations=function(k){this.$annotations=k,this._signal("changeAnnotation",{})},C.prototype.getAnnotations=function(){return this.$annotations||[]},C.prototype.clearAnnotations=function(){this.setAnnotations([])},C.prototype.$detectNewLine=function(k){var I=k.match(/^.*?(\r?\n)/m);I?this.$autoNewLine=I[1]:this.$autoNewLine=`
`},C.prototype.getWordRange=function(k,I){var L=this.getLine(k),T=!1;if(I>0&&(T=!!L.charAt(I-1).match(this.tokenRe)),T||(T=!!L.charAt(I).match(this.tokenRe)),T)var R=this.tokenRe;else if(/^\s+$/.test(L.slice(I-1,I+1)))var R=/\s/;else var R=this.nonTokenRe;var P=I;if(P>0){do P--;while(P>=0&&L.charAt(P).match(R));P++}for(var D=I;D<L.length&&L.charAt(D).match(R);)D++;return new f(k,P,k,D)},C.prototype.getAWordRange=function(k,I){for(var L=this.getWordRange(k,I),T=this.getLine(L.end.row);T.charAt(L.end.column).match(/[ \t]/);)L.end.column+=1;return L},C.prototype.setNewLineMode=function(k){this.doc.setNewLineMode(k)},C.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},C.prototype.setUseWorker=function(k){this.setOption("useWorker",k)},C.prototype.getUseWorker=function(){return this.$useWorker},C.prototype.onReloadTokenizer=function(k){var I=k.data;this.bgTokenizer.start(I.first),this._signal("tokenizerUpdate",k)},C.prototype.setMode=function(k,I){if(k&&typeof k=="object"){if(k.getTokenizer)return this.$onChangeMode(k);var L=k,T=L.path}else T=k||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new l),this.$modes[T]&&!L){this.$onChangeMode(this.$modes[T]),I&&I();return}this.$modeId=T,a.loadModule(["mode",T],function(R){if(this.$modeId!==T)return I&&I();this.$modes[T]&&!L?this.$onChangeMode(this.$modes[T]):R&&R.Mode&&(R=new R.Mode(L),L||(this.$modes[T]=R,R.$id=T),this.$onChangeMode(R)),I&&I()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},C.prototype.$onChangeMode=function(k,I){if(I||(this.$modeId=k.$id),this.$mode!==k){var L=this.$mode;this.$mode=k,this.$stopWorker(),this.$useWorker&&this.$startWorker();var T=k.getTokenizer();if(T.on!==void 0){var R=this.onReloadTokenizer.bind(this);T.on("update",R)}this.bgTokenizer.setTokenizer(T),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=k.tokenRe,this.nonTokenRe=k.nonTokenRe,I||(k.attachToSession&&k.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(k.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:L,mode:k}))}},C.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},C.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(k){a.warn("Could not load worker",k),this.$worker=null}},C.prototype.getMode=function(){return this.$mode},C.prototype.setScrollTop=function(k){this.$scrollTop===k||isNaN(k)||(this.$scrollTop=k,this._signal("changeScrollTop",k))},C.prototype.getScrollTop=function(){return this.$scrollTop},C.prototype.setScrollLeft=function(k){this.$scrollLeft===k||isNaN(k)||(this.$scrollLeft=k,this._signal("changeScrollLeft",k))},C.prototype.getScrollLeft=function(){return this.$scrollLeft},C.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},C.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var k=0;return this.lineWidgets.forEach(function(I){I&&I.screenWidth>k&&(k=I.screenWidth)}),this.lineWidgetWidth=k},C.prototype.$computeWidth=function(k){if(this.$modified||k){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var I=this.doc.getAllLines(),L=this.$rowLengthCache,T=0,R=0,P=this.$foldData[R],D=P?P.start.row:1/0,N=I.length,B=0;B<N;B++){if(B>D){if(B=P.end.row+1,B>=N)break;P=this.$foldData[R++],D=P?P.start.row:1/0}L[B]==null&&(L[B]=this.$getStringScreenWidth(I[B])[0]),L[B]>T&&(T=L[B])}this.screenWidth=T}},C.prototype.getLine=function(k){return this.doc.getLine(k)},C.prototype.getLines=function(k,I){return this.doc.getLines(k,I)},C.prototype.getLength=function(){return this.doc.getLength()},C.prototype.getTextRange=function(k){return this.doc.getTextRange(k||this.selection.getRange())},C.prototype.insert=function(k,I){return this.doc.insert(k,I)},C.prototype.remove=function(k){return this.doc.remove(k)},C.prototype.removeFullLines=function(k,I){return this.doc.removeFullLines(k,I)},C.prototype.undoChanges=function(k,I){if(k.length){this.$fromUndo=!0;for(var L=k.length-1;L!=-1;L--){var T=k[L];T.action=="insert"||T.action=="remove"?this.doc.revertDelta(T):T.folds&&this.addFolds(T.folds)}!I&&this.$undoSelect&&(k.selectionBefore?this.selection.fromJSON(k.selectionBefore):this.selection.setRange(this.$getUndoSelection(k,!0))),this.$fromUndo=!1}},C.prototype.redoChanges=function(k,I){if(k.length){this.$fromUndo=!0;for(var L=0;L<k.length;L++){var T=k[L];(T.action=="insert"||T.action=="remove")&&this.doc.$safeApplyDelta(T)}!I&&this.$undoSelect&&(k.selectionAfter?this.selection.fromJSON(k.selectionAfter):this.selection.setRange(this.$getUndoSelection(k,!1))),this.$fromUndo=!1}},C.prototype.setUndoSelect=function(k){this.$undoSelect=k},C.prototype.$getUndoSelection=function(k,I){function L(N){return I?N.action!=="insert":N.action==="insert"}for(var T,R,P=0;P<k.length;P++){var D=k[P];if(D.start){if(!T){L(D)?T=f.fromPoints(D.start,D.end):T=f.fromPoints(D.start,D.start);continue}L(D)?(R=D.start,T.compare(R.row,R.column)==-1&&T.setStart(R),R=D.end,T.compare(R.row,R.column)==1&&T.setEnd(R)):(R=D.start,T.compare(R.row,R.column)==-1&&(T=f.fromPoints(D.start,D.start)))}}return T},C.prototype.replace=function(k,I){return this.doc.replace(k,I)},C.prototype.moveText=function(k,I,L){var T=this.getTextRange(k),R=this.getFoldsInRange(k),P=f.fromPoints(I,I);if(!L){this.remove(k);var D=k.start.row-k.end.row,N=D?-k.end.column:k.start.column-k.end.column;N&&(P.start.row==k.end.row&&P.start.column>k.end.column&&(P.start.column+=N),P.end.row==k.end.row&&P.end.column>k.end.column&&(P.end.column+=N)),D&&P.start.row>=k.end.row&&(P.start.row+=D,P.end.row+=D)}if(P.end=this.insert(P.start,T),R.length){var B=k.start,Z=P.start,D=Z.row-B.row,N=Z.column-B.column;this.addFolds(R.map(function(W){return W=W.clone(),W.start.row==B.row&&(W.start.column+=N),W.end.row==B.row&&(W.end.column+=N),W.start.row+=D,W.end.row+=D,W}))}return P},C.prototype.indentRows=function(k,I,L){L=L.replace(/\t/g,this.getTabString());for(var T=k;T<=I;T++)this.doc.insertInLine({row:T,column:0},L)},C.prototype.outdentRows=function(k){for(var I=k.collapseRows(),L=new f(0,0,0,0),T=this.getTabSize(),R=I.start.row;R<=I.end.row;++R){var P=this.getLine(R);L.start.row=R,L.end.row=R;for(var D=0;D<T&&P.charAt(D)==" ";++D);D<T&&P.charAt(D)==" "?(L.start.column=D,L.end.column=D+1):(L.start.column=0,L.end.column=D),this.remove(L)}},C.prototype.$moveLines=function(k,I,L){if(k=this.getRowFoldStart(k),I=this.getRowFoldEnd(I),L<0){var T=this.getRowFoldStart(k+L);if(T<0)return 0;var R=T-k}else if(L>0){var T=this.getRowFoldEnd(I+L);if(T>this.doc.getLength()-1)return 0;var R=T-I}else{k=this.$clipRowToDocument(k),I=this.$clipRowToDocument(I);var R=I-k+1}var P=new f(k,0,I,Number.MAX_VALUE),D=this.getFoldsInRange(P).map(function(B){return B=B.clone(),B.start.row+=R,B.end.row+=R,B}),N=L==0?this.doc.getLines(k,I):this.doc.removeFullLines(k,I);return this.doc.insertFullLines(k+R,N),D.length&&this.addFolds(D),R},C.prototype.moveLinesUp=function(k,I){return this.$moveLines(k,I,-1)},C.prototype.moveLinesDown=function(k,I){return this.$moveLines(k,I,1)},C.prototype.duplicateLines=function(k,I){return this.$moveLines(k,I,0)},C.prototype.$clipRowToDocument=function(k){return Math.max(0,Math.min(k,this.doc.getLength()-1))},C.prototype.$clipColumnToRow=function(k,I){return I<0?0:Math.min(this.doc.getLine(k).length,I)},C.prototype.$clipPositionToDocument=function(k,I){if(I=Math.max(0,I),k<0)k=0,I=0;else{var L=this.doc.getLength();k>=L?(k=L-1,I=this.doc.getLine(L-1).length):I=Math.min(this.doc.getLine(k).length,I)}return{row:k,column:I}},C.prototype.$clipRangeToDocument=function(k){k.start.row<0?(k.start.row=0,k.start.column=0):k.start.column=this.$clipColumnToRow(k.start.row,k.start.column);var I=this.doc.getLength()-1;return k.end.row>I?(k.end.row=I,k.end.column=this.doc.getLine(I).length):k.end.column=this.$clipColumnToRow(k.end.row,k.end.column),k},C.prototype.setUseWrapMode=function(k){if(k!=this.$useWrapMode){if(this.$useWrapMode=k,this.$modified=!0,this.$resetRowCache(0),k){var I=this.getLength();this.$wrapData=Array(I),this.$updateWrapData(0,I-1)}this._signal("changeWrapMode")}},C.prototype.getUseWrapMode=function(){return this.$useWrapMode},C.prototype.setWrapLimitRange=function(k,I){(this.$wrapLimitRange.min!==k||this.$wrapLimitRange.max!==I)&&(this.$wrapLimitRange={min:k,max:I},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},C.prototype.adjustWrapLimit=function(k,I){var L=this.$wrapLimitRange;L.max<0&&(L={min:I,max:I});var T=this.$constrainWrapLimit(k,L.min,L.max);return T!=this.$wrapLimit&&T>1?(this.$wrapLimit=T,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},C.prototype.$constrainWrapLimit=function(k,I,L){return I&&(k=Math.max(I,k)),L&&(k=Math.min(L,k)),k},C.prototype.getWrapLimit=function(){return this.$wrapLimit},C.prototype.setWrapLimit=function(k){this.setWrapLimitRange(k,k)},C.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},C.prototype.$updateInternalDataOnChange=function(k){var I=this.$useWrapMode,L=k.action,T=k.start,R=k.end,P=T.row,D=R.row,N=D-P,B=null;if(this.$updating=!0,N!=0)if(L==="remove"){this[I?"$wrapData":"$rowLengthCache"].splice(P,N);var Z=this.$foldData;B=this.getFoldsInRange(k),this.removeFolds(B);var U=this.getFoldLine(R.row),X=0;if(U){U.addRemoveChars(R.row,R.column,T.column-R.column),U.shiftRow(-N);var W=this.getFoldLine(P);W&&W!==U&&(W.merge(U),U=W),X=Z.indexOf(U)+1}for(X;X<Z.length;X++){var U=Z[X];U.start.row>=R.row&&U.shiftRow(-N)}D=P}else{var q=Array(N);q.unshift(P,0);var Q=I?this.$wrapData:this.$rowLengthCache;Q.splice.apply(Q,q);var Z=this.$foldData,U=this.getFoldLine(P),X=0;if(U){var G=U.range.compareInside(T.row,T.column);G==0?(U=U.split(T.row,T.column),U&&(U.shiftRow(N),U.addRemoveChars(D,0,R.column-T.column))):G==-1&&(U.addRemoveChars(P,0,R.column-T.column),U.shiftRow(N)),X=Z.indexOf(U)+1}for(X;X<Z.length;X++){var U=Z[X];U.start.row>=P&&U.shiftRow(N)}}else{N=Math.abs(k.start.column-k.end.column),L==="remove"&&(B=this.getFoldsInRange(k),this.removeFolds(B),N=-N);var U=this.getFoldLine(P);U&&U.addRemoveChars(P,T.column,N)}return I&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,I?this.$updateWrapData(P,D):this.$updateRowLengthCache(P,D),B},C.prototype.$updateRowLengthCache=function(k,I,L){this.$rowLengthCache[k]=null,this.$rowLengthCache[I]=null},C.prototype.$updateWrapData=function(k,I){var L=this.doc.getAllLines(),T=this.getTabSize(),R=this.$wrapData,P=this.$wrapLimit,D,N,B=k;for(I=Math.min(I,L.length-1);B<=I;)N=this.getFoldLine(B,N),N?(D=[],N.walk(function(Z,U,X,W){var q;if(Z!=null){q=this.$getDisplayTokens(Z,D.length),q[0]=E;for(var Q=1;Q<q.length;Q++)q[Q]=v}else q=this.$getDisplayTokens(L[U].substring(W,X),D.length);D=D.concat(q)}.bind(this),N.end.row,L[N.end.row].length+1),R[N.start.row]=this.$computeWrapSplits(D,P,T),B=N.end.row+1):(D=this.$getDisplayTokens(L[B]),R[B]=this.$computeWrapSplits(D,P,T),B++)},C.prototype.$computeWrapSplits=function(k,I,L){if(k.length==0)return[];var T=[],R=k.length,P=0,D=0,N=this.$wrapAsCode,B=this.$indentedSoftWrap,Z=I<=Math.max(2*L,8)||B===!1?0:Math.floor(I/2);function U(){var G=0;if(Z===0)return G;if(B)for(var oe=0;oe<k.length;oe++){var ne=k[oe];if(ne==b)G+=1;else if(ne==m)G+=L;else{if(ne==$)continue;break}}return N&&B!==!1&&(G+=L),Math.min(G,Z)}function X(G){for(var oe=G-P,ne=P;ne<G;ne++){var ce=k[ne];(ce===12||ce===2)&&(oe-=1)}T.length||(W=U(),T.indent=W),D+=oe,T.push(D),P=G}for(var W=0;R-P>I-W;){var q=P+I-W;if(k[q-1]>=b&&k[q]>=b){X(q);continue}if(k[q]==E||k[q]==v){for(q;q!=P-1&&k[q]!=E;q--);if(q>P){X(q);continue}for(q=P+I,q;q<k.length&&k[q]==v;q++);if(q==k.length)break;X(q);continue}for(var Q=Math.max(q-(I-(I>>2)),P-1);q>Q&&k[q]<E;)q--;if(N){for(;q>Q&&k[q]<E;)q--;for(;q>Q&&k[q]==w;)q--}else for(;q>Q&&k[q]<b;)q--;if(q>Q){X(++q);continue}q=P+I,k[q]==S&&q--,X(q-W)}return T},C.prototype.$getDisplayTokens=function(k,I){var L=[],T;I=I||0;for(var R=0;R<k.length;R++){var P=k.charCodeAt(R);if(P==9){T=this.getScreenTabSize(L.length+I),L.push(m);for(var D=1;D<T;D++)L.push($)}else P==32?L.push(b):P>39&&P<48||P>57&&P<64?L.push(w):P>=4352&&A(P)?L.push(x,S):L.push(x)}return L},C.prototype.$getStringScreenWidth=function(k,I,L){if(I==0)return[0,0];I==null&&(I=1/0),L=L||0;var T,R;for(R=0;R<k.length&&(T=k.charCodeAt(R),T==9?L+=this.getScreenTabSize(L):T>=4352&&A(T)?L+=2:L+=1,!(L>I));R++);return[L,R]},C.prototype.getRowLength=function(k){var I=1;return this.lineWidgets&&(I+=this.lineWidgets[k]&&this.lineWidgets[k].rowCount||0),!this.$useWrapMode||!this.$wrapData[k]?I:this.$wrapData[k].length+I},C.prototype.getRowLineCount=function(k){return!this.$useWrapMode||!this.$wrapData[k]?1:this.$wrapData[k].length+1},C.prototype.getRowWrapIndent=function(k){if(this.$useWrapMode){var I=this.screenToDocumentPosition(k,Number.MAX_VALUE),L=this.$wrapData[I.row];return L.length&&L[0]<I.column?L.indent:0}else return 0},C.prototype.getScreenLastRowColumn=function(k){var I=this.screenToDocumentPosition(k,Number.MAX_VALUE);return this.documentToScreenColumn(I.row,I.column)},C.prototype.getDocumentLastRowColumn=function(k,I){var L=this.documentToScreenRow(k,I);return this.getScreenLastRowColumn(L)},C.prototype.getDocumentLastRowColumnPosition=function(k,I){var L=this.documentToScreenRow(k,I);return this.screenToDocumentPosition(L,Number.MAX_VALUE/10)},C.prototype.getRowSplitData=function(k){if(this.$useWrapMode)return this.$wrapData[k]},C.prototype.getScreenTabSize=function(k){return this.$tabSize-(k%this.$tabSize|0)},C.prototype.screenToDocumentRow=function(k,I){return this.screenToDocumentPosition(k,I).row},C.prototype.screenToDocumentColumn=function(k,I){return this.screenToDocumentPosition(k,I).column},C.prototype.screenToDocumentPosition=function(k,I,L){if(k<0)return{row:0,column:0};var T,R=0,P=0,D,N=0,B=0,Z=this.$screenRowCache,U=this.$getRowCacheIndex(Z,k),X=Z.length;if(X&&U>=0)var N=Z[U],R=this.$docRowCache[U],W=k>Z[X-1];else var W=!X;for(var q=this.getLength()-1,Q=this.getNextFoldLine(R),G=Q?Q.start.row:1/0;N<=k&&(B=this.getRowLength(R),!(N+B>k||R>=q));)N+=B,R++,R>G&&(R=Q.end.row+1,Q=this.getNextFoldLine(R,Q),G=Q?Q.start.row:1/0),W&&(this.$docRowCache.push(R),this.$screenRowCache.push(N));if(Q&&Q.start.row<=R)T=this.getFoldDisplayLine(Q),R=Q.start.row;else{if(N+B<=k||R>q)return{row:q,column:this.getLine(q).length};T=this.getLine(R),Q=null}var oe=0,ne=Math.floor(k-N);if(this.$useWrapMode){var ce=this.$wrapData[R];ce&&(D=ce[ne],ne>0&&ce.length&&(oe=ce.indent,P=ce[ne-1]||ce[ce.length-1],T=T.substring(P)))}return L!==void 0&&this.$bidiHandler.isBidiRow(N+ne,R,ne)&&(I=this.$bidiHandler.offsetToCol(L)),P+=this.$getStringScreenWidth(T,I-oe)[1],this.$useWrapMode&&P>=D&&(P=D-1),Q?Q.idxToPosition(P):{row:R,column:P}},C.prototype.documentToScreenPosition=function(k,I){if(typeof I>"u")var L=this.$clipPositionToDocument(k.row,k.column);else L=this.$clipPositionToDocument(k,I);k=L.row,I=L.column;var T=0,R=null,P=null;P=this.getFoldAt(k,I,1),P&&(k=P.start.row,I=P.start.column);var D,N=0,B=this.$docRowCache,Z=this.$getRowCacheIndex(B,k),U=B.length;if(U&&Z>=0)var N=B[Z],T=this.$screenRowCache[Z],X=k>B[U-1];else var X=!U;for(var W=this.getNextFoldLine(N),q=W?W.start.row:1/0;N<k;){if(N>=q){if(D=W.end.row+1,D>k)break;W=this.getNextFoldLine(D,W),q=W?W.start.row:1/0}else D=N+1;T+=this.getRowLength(N),N=D,X&&(this.$docRowCache.push(N),this.$screenRowCache.push(T))}var Q="";W&&N>=q?(Q=this.getFoldDisplayLine(W,k,I),R=W.start.row):(Q=this.getLine(k).substring(0,I),R=k);var G=0;if(this.$useWrapMode){var oe=this.$wrapData[R];if(oe){for(var ne=0;Q.length>=oe[ne];)T++,ne++;Q=Q.substring(oe[ne-1]||0,Q.length),G=ne>0?oe.indent:0}}return this.lineWidgets&&this.lineWidgets[N]&&this.lineWidgets[N].rowsAbove&&(T+=this.lineWidgets[N].rowsAbove),{row:T,column:G+this.$getStringScreenWidth(Q)[0]}},C.prototype.documentToScreenColumn=function(k,I){return this.documentToScreenPosition(k,I).column},C.prototype.documentToScreenRow=function(k,I){return this.documentToScreenPosition(k,I).row},C.prototype.getScreenLength=function(){var k=0,I=null;if(this.$useWrapMode)for(var R=this.$wrapData.length,P=0,T=0,I=this.$foldData[T++],D=I?I.start.row:1/0;P<R;){var N=this.$wrapData[P];k+=N?N.length+1:1,P++,P>D&&(P=I.end.row+1,I=this.$foldData[T++],D=I?I.start.row:1/0)}else{k=this.getLength();for(var L=this.$foldData,T=0;T<L.length;T++)I=L[T],k-=I.end.row-I.start.row}return this.lineWidgets&&(k+=this.$getWidgetScreenLength()),k},C.prototype.$setFontMetrics=function(k){this.$enableVarChar&&(this.$getStringScreenWidth=function(I,L,T){if(L===0)return[0,0];L||(L=1/0),T=T||0;var R,P;for(P=0;P<I.length&&(R=I.charAt(P),R===" "?T+=this.getScreenTabSize(T):T+=k.getCharacterWidth(R),!(T>L));P++);return[T,P]})},C.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},C}();y.$uid=0,y.prototype.$modes=a.$modes,y.prototype.getValue=y.prototype.toString,y.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},y.prototype.$overwrite=!1,y.prototype.$mode=null,y.prototype.$modeId=null,y.prototype.$scrollTop=0,y.prototype.$scrollLeft=0,y.prototype.$wrapLimit=80,y.prototype.$useWrapMode=!1,y.prototype.$wrapLimitRange={min:null,max:null},y.prototype.lineWidgets=null,y.prototype.isFullWidth=A,o.implement(y.prototype,c);var x=1,S=2,E=3,v=4,w=9,b=10,m=11,$=12;function A(C){return C<4352?!1:C>=4352&&C<=4447||C>=4515&&C<=4519||C>=4602&&C<=4607||C>=9001&&C<=9002||C>=11904&&C<=11929||C>=11931&&C<=12019||C>=12032&&C<=12245||C>=12272&&C<=12283||C>=12288&&C<=12350||C>=12353&&C<=12438||C>=12441&&C<=12543||C>=12549&&C<=12589||C>=12593&&C<=12686||C>=12688&&C<=12730||C>=12736&&C<=12771||C>=12784&&C<=12830||C>=12832&&C<=12871||C>=12880&&C<=13054||C>=13056&&C<=19903||C>=19968&&C<=42124||C>=42128&&C<=42182||C>=43360&&C<=43388||C>=44032&&C<=55203||C>=55216&&C<=55238||C>=55243&&C<=55291||C>=63744&&C<=64255||C>=65040&&C<=65049||C>=65072&&C<=65106||C>=65108&&C<=65126||C>=65128&&C<=65131||C>=65281&&C<=65376||C>=65504&&C<=65510}n("./edit_session/folding").Folding.call(y.prototype),n("./edit_session/bracket_match").BracketMatch.call(y.prototype),a.defineOptions(y.prototype,"session",{wrap:{set:function(C){if(!C||C=="off"?C=!1:C=="free"?C=!0:C=="printMargin"?C=-1:typeof C=="string"&&(C=parseInt(C,10)||!1),this.$wrap!=C)if(this.$wrap=C,!C)this.setUseWrapMode(!1);else{var k=typeof C=="number"?C:null;this.setWrapLimitRange(k,k),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(C){C=C=="auto"?this.$mode.type!="text":C!="text",C!=this.$wrapAsCode&&(this.$wrapAsCode=C,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(C){this.$useWorker=C,this.$stopWorker(),C&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(C){C=parseInt(C),C>0&&this.$tabSize!==C&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=C,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(C){this.setFoldStyle(C)},handlesSet:!0},overwrite:{set:function(C){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(C){this.doc.setNewLineMode(C)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(C){this.setMode(C)},get:function(){return this.$modeId},handlesSet:!0}}),r.EditSession=y}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(n,r,i){var o=n("./lib/lang"),s=n("./lib/oop"),d=n("./range").Range,a=function(){function u(){this.$options={}}return u.prototype.set=function(l){return s.mixin(this.$options,l),this},u.prototype.getOptions=function(){return o.copyObject(this.$options)},u.prototype.setOptions=function(l){this.$options=l},u.prototype.find=function(l){var f=this.$options,h=this.$matchIterator(l,f);if(!h)return!1;var p=null;return h.forEach(function(g,y,x,S){return p=new d(g,y,x,S),y==S&&f.start&&f.start.start&&f.skipCurrent!=!1&&p.isEqual(f.start)?(p=null,!1):!0}),p},u.prototype.findAll=function(l){var f=this.$options;if(!f.needle)return[];this.$assembleRegExp(f);var h=f.range,p=h?l.getLines(h.start.row,h.end.row):l.doc.getAllLines(),g=[],y=f.re;if(f.$isMultiLine){var x=y.length,S=p.length-x,E;e:for(var v=y.offset||0;v<=S;v++){for(var w=0;w<x;w++)if(p[v+w].search(y[w])==-1)continue e;var b=p[v],m=p[v+x-1],$=b.length-b.match(y[0])[0].length,A=m.match(y[x-1])[0].length;E&&E.end.row===v&&E.end.column>$||(g.push(E=new d(v,$,v+x-1,A)),x>2&&(v=v+x-2))}}else for(var C=0;C<p.length;C++)for(var k=o.getMatchOffsets(p[C],y),w=0;w<k.length;w++){var I=k[w];g.push(new d(C,I.offset,C,I.offset+I.length))}if(h){for(var L=h.start.column,T=h.end.column,C=0,w=g.length-1;C<w&&g[C].start.column<L&&g[C].start.row==0;)C++;for(var R=h.end.row-h.start.row;C<w&&g[w].end.column>T&&g[w].end.row==R;)w--;for(g=g.slice(C,w+1),C=0,w=g.length;C<w;C++)g[C].start.row+=h.start.row,g[C].end.row+=h.start.row}return g},u.prototype.replace=function(l,f){var h=this.$options,p=this.$assembleRegExp(h);if(h.$isMultiLine)return f;if(p){var g=p.exec(l);if(!g||g[0].length!=l.length)return null;if(f=l.replace(p,f),h.preserveCase){f=f.split("");for(var y=Math.min(l.length,l.length);y--;){var x=l[y];x&&x.toLowerCase()!=x?f[y]=f[y].toUpperCase():f[y]=f[y].toLowerCase()}f=f.join("")}return f}},u.prototype.$assembleRegExp=function(l,f){if(l.needle instanceof RegExp)return l.re=l.needle;var h=l.needle;if(!l.needle)return l.re=!1;l.regExp||(h=o.escapeRegExp(h)),l.wholeWord&&(h=c(h,l));var p=l.caseSensitive?"gm":"gmi";if(l.$isMultiLine=!f&&/[\n\r]/.test(h),l.$isMultiLine)return l.re=this.$assembleMultilineRegExp(h,p);try{var g=new RegExp(h,p)}catch{g=!1}return l.re=g},u.prototype.$assembleMultilineRegExp=function(l,f){for(var h=l.replace(/\r\n|\r|\n/g,`$
^`).split(`
`),p=[],g=0;g<h.length;g++)try{p.push(new RegExp(h[g],f))}catch{return!1}return p},u.prototype.$matchIterator=function(l,f){var h=this.$assembleRegExp(f);if(!h)return!1;var p=f.backwards==!0,g=f.skipCurrent!=!1,y=f.range,x=f.start;x||(x=y?y[p?"end":"start"]:l.selection.getRange()),x.start&&(x=x[g!=p?"end":"start"]);var S=y?y.start.row:0,E=y?y.end.row:l.getLength()-1;if(p)var v=function(m){var $=x.row;if(!b($,x.column,m)){for($--;$>=S;$--)if(b($,Number.MAX_VALUE,m))return;if(f.wrap!=!1){for($=E,S=x.row;$>=S;$--)if(b($,Number.MAX_VALUE,m))return}}};else var v=function($){var A=x.row;if(!b(A,x.column,$)){for(A=A+1;A<=E;A++)if(b(A,0,$))return;if(f.wrap!=!1){for(A=S,E=x.row;A<=E;A++)if(b(A,0,$))return}}};if(f.$isMultiLine)var w=h.length,b=function(m,$,A){var C=p?m-w+1:m;if(!(C<0||C+w>l.getLength())){var k=l.getLine(C),I=k.search(h[0]);if(!(!p&&I<$||I===-1)){for(var L=1;L<w;L++)if(k=l.getLine(C+L),k.search(h[L])==-1)return;var T=k.match(h[w-1])[0].length;if(!(p&&T>$)&&A(C,I,C+w-1,T))return!0}}};else if(p)var b=function($,A,C){var k=l.getLine($),I=[],L,T=0;for(h.lastIndex=0;L=h.exec(k);){var R=L[0].length;if(T=L.index,!R){if(T>=k.length)break;h.lastIndex=T+=1}if(L.index+R>A)break;I.push(L.index,R)}for(var P=I.length-1;P>=0;P-=2){var D=I[P-1],R=I[P];if(C($,D,$,D+R))return!0}};else var b=function($,A,C){var k=l.getLine($),I,L;for(h.lastIndex=A;L=h.exec(k);){var T=L[0].length;if(I=L.index,C($,I,$,I+T))return!0;if(!T&&(h.lastIndex=I+=1,I>=k.length))return!1}};return{forEach:v}},u}();function c(u,l){function f(h){return/\w/.test(h)||l.regExp?"\\b":""}return f(u[0])+u+f(u[u.length-1])}r.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(n,r,i){var o=n("../lib/keys"),s=n("../lib/useragent"),d=o.KEY_MODS;function a(u,l){this.platform=l||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(u),this.$singleCommand=!0}function c(u,l){a.call(this,u,l),this.$singleCommand=!1}c.prototype=a.prototype,function(){this.addCommand=function(l){this.commands[l.name]&&this.removeCommand(l),this.commands[l.name]=l,l.bindKey&&this._buildKeyHash(l)},this.removeCommand=function(l,f){var h=l&&(typeof l=="string"?l:l.name);l=this.commands[h],f||delete this.commands[h];var p=this.commandKeyBinding;for(var g in p){var y=p[g];if(y==l)delete p[g];else if(Array.isArray(y)){var x=y.indexOf(l);x!=-1&&(y.splice(x,1),y.length==1&&(p[g]=y[0]))}}},this.bindKey=function(l,f,h){if(typeof l=="object"&&l&&(h==null&&(h=l.position),l=l[this.platform]),!!l){if(typeof f=="function")return this.addCommand({exec:f,bindKey:l,name:f.name||l});l.split("|").forEach(function(p){var g="";if(p.indexOf(" ")!=-1){var y=p.split(/\s+/);p=y.pop(),y.forEach(function(E){var v=this.parseKeys(E),w=d[v.hashId]+v.key;g+=(g?" ":"")+w,this._addCommandToBinding(g,"chainKeys")},this),g+=" "}var x=this.parseKeys(p),S=d[x.hashId]+x.key;this._addCommandToBinding(g+S,f,h)},this)}};function u(l){return typeof l=="object"&&l.bindKey&&l.bindKey.position||(l.isDefault?-100:0)}this._addCommandToBinding=function(l,f,h){var p=this.commandKeyBinding,g;if(!f)delete p[l];else if(!p[l]||this.$singleCommand)p[l]=f;else{Array.isArray(p[l])?(g=p[l].indexOf(f))!=-1&&p[l].splice(g,1):p[l]=[p[l]],typeof h!="number"&&(h=u(f));var y=p[l];for(g=0;g<y.length;g++){var x=y[g],S=u(x);if(S>h)break}y.splice(g,0,f)}},this.addCommands=function(l){l&&Object.keys(l).forEach(function(f){var h=l[f];if(h){if(typeof h=="string")return this.bindKey(h,f);typeof h=="function"&&(h={exec:h}),typeof h=="object"&&(h.name||(h.name=f),this.addCommand(h))}},this)},this.removeCommands=function(l){Object.keys(l).forEach(function(f){this.removeCommand(l[f])},this)},this.bindKeys=function(l){Object.keys(l).forEach(function(f){this.bindKey(f,l[f])},this)},this._buildKeyHash=function(l){this.bindKey(l.bindKey,l)},this.parseKeys=function(l){var f=l.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(S){return S}),h=f.pop(),p=o[h];if(o.FUNCTION_KEYS[p])h=o.FUNCTION_KEYS[p].toLowerCase();else if(f.length){if(f.length==1&&f[0]=="shift")return{key:h.toUpperCase(),hashId:-1}}else return{key:h,hashId:-1};for(var g=0,y=f.length;y--;){var x=o.KEY_MODS[f[y]];if(x==null)return typeof console<"u"&&console.error("invalid modifier "+f[y]+" in "+l),!1;g|=x}return{key:h,hashId:g}},this.findKeyCommand=function(f,h){var p=d[f]+h;return this.commandKeyBinding[p]},this.handleKeyboard=function(l,f,h,p){if(!(p<0)){var g=d[f]+h,y=this.commandKeyBinding[g];return l.$keyChain&&(l.$keyChain+=" "+g,y=this.commandKeyBinding[l.$keyChain]||y),y&&(y=="chainKeys"||y[y.length-1]=="chainKeys")?(l.$keyChain=l.$keyChain||g,{command:"null"}):(l.$keyChain&&((!f||f==4)&&h.length==1?l.$keyChain=l.$keyChain.slice(0,-g.length-1):(f==-1||p>0)&&(l.$keyChain="")),{command:y})}},this.getStatusText=function(l,f){return f.$keyChain||""}}.call(a.prototype),r.HashHandler=a,r.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(n,r,i){var o=this&&this.__extends||function(){var u=function(l,f){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(h[g]=p[g])},u(l,f)};return function(l,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");u(l,f);function h(){this.constructor=l}l.prototype=f===null?Object.create(f):(h.prototype=f.prototype,new h)}}(),s=n("../lib/oop"),d=n("../keyboard/hash_handler").MultiHashHandler,a=n("../lib/event_emitter").EventEmitter,c=function(u){o(l,u);function l(f,h){var p=u.call(this,h,f)||this;return p.byName=p.commands,p.setDefaultHandler("exec",function(g){return g.args?g.command.exec(g.editor,g.args,g.event,!1):g.command.exec(g.editor,{},g.event,!0)}),p}return l.prototype.exec=function(f,h,p){if(Array.isArray(f)){for(var g=f.length;g--;)if(this.exec(f[g],h,p))return!0;return!1}if(typeof f=="string"&&(f=this.commands[f]),!f||h&&h.$readOnly&&!f.readOnly||this.$checkCommandState!=!1&&f.isAvailable&&!f.isAvailable(h))return!1;var y={editor:h,command:f,args:p};return y.returnValue=this._emit("exec",y),this._signal("afterExec",y),y.returnValue!==!1},l.prototype.toggleRecording=function(f){if(!this.$inReplay)return f&&f._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(h){this.macro.push([h.command,h.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},l.prototype.replay=function(f){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(f);try{this.$inReplay=!0,this.macro.forEach(function(h){typeof h=="string"?this.exec(h,f):this.exec(h[0],f,h[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(f){return f.map(function(h){return typeof h[0]!="string"&&(h[0]=h[0].name),h[1]||(h=h[0]),h})},l}(d);s.implement(c.prototype,a),r.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(n,r,i){var o=n("../lib/lang"),s=n("../config"),d=n("../range").Range;function a(u,l){return{win:u,mac:l}}r.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(u){s.loadModule("ace/ext/settings_menu",function(l){l.init(u),u.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(u){s.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(u,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(u){s.loadModule("ace/ext/error_marker",function(l){l.showErrorMarker(u,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(u){u.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(u){u.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(u,l){typeof l=="number"&&!isNaN(l)&&u.gotoLine(l),u.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(u){u.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(u){u.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(u){u.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(u){u.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(u){u.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(u){u.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(u){u.session.foldAll(),u.session.unfold(u.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(u){u.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(u){u.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(u){u.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(u){u.selection.isEmpty()?u.selection.selectWord():u.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(u){u.selection.isEmpty()?u.selection.selectWord():u.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(u){s.loadModule("ace/ext/searchbox",function(l){l.Search(u)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(u){u.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(u){u.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(u){u.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(u){u.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(u,l){u.navigateUp(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(u){u.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(u){u.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(u){u.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(u,l){u.navigateDown(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(u){u.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(u){u.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(u){u.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(u){u.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(u){u.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(u,l){u.navigateLeft(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(u){u.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(u){u.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(u){u.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(u){u.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(u){u.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(u,l){u.navigateRight(l.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(u){u.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(u){u.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(u){u.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(u){u.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(u){u.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(u){u.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(u){u.renderer.scrollBy(0,-2*u.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(u){u.renderer.scrollBy(0,2*u.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(u){u.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(u){u.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(u){u.commands.toggleRecording(u)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(u){u.commands.replay(u)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(u){u.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(u){u.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(u){u.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(u){},readOnly:!0},{name:"cut",description:"Cut",exec:function(u){var l=u.$copyWithEmptySelection&&u.selection.isEmpty(),f=l?u.selection.getLineRange():u.selection.getRange();u._emit("cut",f),f.isEmpty()||u.session.remove(f),u.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(u,l){u.$handlePaste(l)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(u){u.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(u){u.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(u){u.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(u){u.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(u){u.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(u){u.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(u){u.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(u){s.loadModule("ace/ext/searchbox",function(l){l.Search(u,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(u){u.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(u){u.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(u){u.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(u){u.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(u){u.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(u){u.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(u){u.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(u){u.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(u){if(u.selection.isEmpty())u.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(u){u.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(u){u.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(u){var l=u.selection.getRange();l.start.column=0,u.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(u){var l=u.selection.getRange();l.end.column=Number.MAX_VALUE,u.session.remove(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(u){u.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(u){u.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(u){u.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(u){u.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(u){u.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(u){u.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(u,l){u.insert(l)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(u,l){u.insert(o.stringRepeat(l.text||"",l.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(u){u.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(u){u.transposeLetters()},multiSelectAction:function(u){u.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(u){u.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(u){u.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(u){u.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(u){var l=u.selection.getRange();l.start.column=l.end.column=0,l.end.row++,u.selection.setRange(l,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(u){u.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(u){for(var l=u.selection.isBackwards(),f=l?u.selection.getSelectionLead():u.selection.getSelectionAnchor(),h=l?u.selection.getSelectionAnchor():u.selection.getSelectionLead(),p=u.session.doc.getLine(f.row).length,g=u.session.doc.getTextRange(u.selection.getRange()),y=g.replace(/\n\s*/," ").length,x=u.session.doc.getLine(f.row),S=f.row+1;S<=h.row+1;S++){var E=o.stringTrimLeft(o.stringTrimRight(u.session.doc.getLine(S)));E.length!==0&&(E=" "+E),x+=E}h.row+1<u.session.doc.getLength()-1&&(x+=u.session.doc.getNewLineCharacter()),u.clearSelection(),u.session.doc.replace(new d(f.row,0,h.row+2,0),x),y>0?(u.selection.moveCursorTo(f.row,f.column),u.selection.selectTo(f.row,f.column+y)):(p=u.session.doc.getLine(f.row).length>p?p+1:p,u.selection.moveCursorTo(f.row,p))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(u){var l=u.session.doc.getLength()-1,f=u.session.doc.getLine(l).length,h=u.selection.rangeList.ranges,p=[];h.length<1&&(h=[u.selection.getRange()]);for(var g=0;g<h.length;g++)g==h.length-1&&(h[g].end.row===l&&h[g].end.column===f||p.push(new d(h[g].end.row,h[g].end.column,l,f))),g===0?h[g].start.row===0&&h[g].start.column===0||p.push(new d(0,0,h[g].start.row,h[g].start.column)):p.push(new d(h[g-1].end.row,h[g-1].end.column,h[g].start.row,h[g].start.column));u.exitMultiSelectMode(),u.clearSelection();for(var g=0;g<p.length;g++)u.selection.addRange(p[g],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(u){u.selection.clearSelection(),u.navigateLineEnd(),u.insert(`
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(u){u.selection.clearSelection();var l=u.getCursorPosition();u.selection.moveTo(l.row-1,Number.MAX_VALUE),u.insert(`
`),l.row===0&&u.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:a("F1","F1"),exec:function(u){u.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(u){u.prompt({$type:"modes"})},readOnly:!0}];for(var c=1;c<9;c++)r.commands.push({name:"foldToLevel"+c,description:"Fold To Level "+c,level:c,exec:function(u){u.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("./lib/dom"),s=function(){function d(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return d.prototype.getRowLength=function(a){var c;return this.lineWidgets?c=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:c=0,!this.$useWrapMode||!this.$wrapData[a]?1+c:this.$wrapData[a].length+1+c},d.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(c){c&&c.rowCount&&!c.hidden&&(a+=c.rowCount)}),a},d.prototype.$onChangeEditor=function(a){this.attach(a.editor)},d.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},d.prototype.detach=function(a){var c=this.editor;if(c){this.editor=null,c.widgetManager=null,c.renderer.off("beforeRender",this.measureWidgets),c.renderer.off("afterRender",this.renderWidgets);var u=this.session.lineWidgets;u&&u.forEach(function(l){l&&l.el&&l.el.parentNode&&(l._inDocument=!1,l.el.parentNode.removeChild(l.el))})}},d.prototype.updateOnFold=function(a,c){var u=c.lineWidgets;if(!(!u||!a.action)){for(var l=a.data,f=l.start.row,h=l.end.row,p=a.action=="add",g=f+1;g<h;g++)u[g]&&(u[g].hidden=p);u[h]&&(p?u[f]?u[h].hidden=p:u[f]=u[h]:(u[f]==u[h]&&(u[f]=void 0),u[h].hidden=p))}},d.prototype.updateOnChange=function(a){var c=this.session.lineWidgets;if(c){var u=a.start.row,l=a.end.row-u;if(l!==0)if(a.action=="remove"){var f=c.splice(u+1,l);!c[u]&&f[f.length-1]&&(c[u]=f.pop()),f.forEach(function(p){p&&this.removeLineWidget(p)},this),this.$updateRows()}else{var h=new Array(l);c[u]&&c[u].column!=null&&a.start.column>c[u].column&&u++,h.unshift(u,0),c.splice.apply(c,h),this.$updateRows()}}},d.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var c=!0;a.forEach(function(u,l){if(u)for(c=!1,u.row=l;u.$oldWidget;)u.$oldWidget.row=l,u=u.$oldWidget}),c&&(this.session.lineWidgets=null)}},d.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[a.row];return c&&(a.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},d.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var c=this.editor.renderer;a.html&&!a.el&&(a.el=o.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=o.createElement("div"),a.el.textContent=a.text),a.el&&(o.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&o.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex=5,c.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex=3),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/c.layerConfig.lineHeight);var u=this.session.getFoldAt(a.row,0);if(a.$fold=u,u){var l=this.session.lineWidgets;a.row==u.end.row&&!l[u.start.row]?l[u.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(a),a},d.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var c=this.session.lineWidgets[a.row];if(c==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;c;){if(c.$oldWidget==a){c.$oldWidget=a.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},d.prototype.getWidgetsAtRow=function(a){for(var c=this.session.lineWidgets,u=c&&c[a],l=[];u;)l.push(u),u=u.$oldWidget;return l},d.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},d.prototype.measureWidgets=function(a,c){var u=this.session._changedWidgets,l=c.layerConfig;if(!(!u||!u.length)){for(var f=1/0,h=0;h<u.length;h++){var p=u[h];if(!(!p||!p.el)&&p.session==this.session){if(!p._inDocument){if(this.session.lineWidgets[p.row]!=p)continue;p._inDocument=!0,c.container.appendChild(p.el)}p.h=p.el.offsetHeight,p.fixedWidth||(p.w=p.el.offsetWidth,p.screenWidth=Math.ceil(p.w/l.characterWidth));var g=p.h/l.lineHeight;p.coverLine&&(g-=this.session.getRowLineCount(p.row),g<0&&(g=0)),p.rowCount!=g&&(p.rowCount=g,p.row<f&&(f=p.row))}}f!=1/0&&(this.session._emit("changeFold",{data:{start:{row:f}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},d.prototype.renderWidgets=function(a,c){var u=c.layerConfig,l=this.session.lineWidgets;if(l){for(var f=Math.min(this.firstRow,u.firstRow),h=Math.max(this.lastRow,u.lastRow,l.length);f>0&&!l[f];)f--;this.firstRow=u.firstRow,this.lastRow=u.lastRow,c.$cursorLayer.config=u;for(var p=f;p<=h;p++){var g=l[p];if(!(!g||!g.el)){if(g.hidden){g.el.style.top=-100-(g.pixelHeight||0)+"px";continue}g._inDocument||(g._inDocument=!0,c.container.appendChild(g.el));var y=c.$cursorLayer.getPixelPosition({row:p,column:0},!0).top;g.coverLine||(y+=u.lineHeight*this.session.getRowLineCount(g.row)),g.el.style.top=y-u.offset+"px";var x=g.coverGutter?0:c.gutterWidth;g.fixedWidth||(x-=c.scrollLeft),g.el.style.left=x+"px",g.fullWidth&&g.screenWidth&&(g.el.style.minWidth=u.width+2*u.padding+"px"),g.fixedWidth?g.el.style.right=c.scrollBar.getWidth()+"px":g.el.style.right=""}}}},d}();r.LineWidgets=s}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(n,r,i){var o=n("../lib/keys"),s=n("../mouse/default_gutter_handler").GutterTooltip,d=function(){function a(c){this.editor=c,this.gutterLayer=c.renderer.$gutterLayer,this.element=c.renderer.$gutter,this.lines=c.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new s(this.editor)}return a.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},a.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},a.prototype.$onGutterKeyDown=function(c){if(this.annotationTooltip.isOpen){c.preventDefault(),c.keyCode===o.escape&&this.annotationTooltip.hide();return}if(c.target===this.element){if(c.keyCode!=o.enter)return;c.preventDefault();var u=this.editor.getCursorPosition().row;this.editor.isRowVisible(u)||this.editor.scrollToLine(u,!0,!0),setTimeout(function(){var g=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),y=this.$findNearestFoldWidget(g),x=this.$findNearestAnnotation(g);if(!(y===null&&x===null)){if(y===null&&x!==null){this.activeRowIndex=x,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(y!==null&&x===null){this.activeRowIndex=y,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(x-g)<Math.abs(y-g)){this.activeRowIndex=x,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=y,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}.bind(this),10);return}if(c.keyCode===o.tab){c.preventDefault();return}if(c.keyCode===o.escape){c.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(c.keyCode===o.up){switch(c.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(c.keyCode===o.down){switch(c.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(c.keyCode===o.left&&(c.preventDefault(),this.$switchLane("annotation")),c.keyCode===o.right&&(c.preventDefault(),this.$switchLane("fold")),c.keyCode===o.enter||c.keyCode===o.space){switch(c.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var l=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),c),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==l&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(l),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var f=this.lines.cells[this.activeRowIndex].element.childNodes[2],h=f.getBoundingClientRect(),p=this.annotationTooltip.getElement().style;p.left=h.right+"px",p.top=h.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},a.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},a.prototype.$isFoldWidgetVisible=function(c){var u=this.editor.isRowFullyVisible(this.$rowIndexToRow(c)),l=this.$getFoldWidget(c).style.display!=="none";return u&&l},a.prototype.$isAnnotationVisible=function(c){var u=this.editor.isRowFullyVisible(this.$rowIndexToRow(c)),l=this.$getAnnotation(c).style.display!=="none";return u&&l},a.prototype.$getFoldWidget=function(c){var u=this.lines.get(c),l=u.element;return l.childNodes[1]},a.prototype.$getAnnotation=function(c){var u=this.lines.get(c),l=u.element;return l.childNodes[2]},a.prototype.$findNearestFoldWidget=function(c){if(this.$isFoldWidgetVisible(c))return c;for(var u=0;c-u>0||c+u<this.lines.getLength()-1;){if(u++,c-u>=0&&this.$isFoldWidgetVisible(c-u))return c-u;if(c+u<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(c+u))return c+u}return null},a.prototype.$findNearestAnnotation=function(c){if(this.$isAnnotationVisible(c))return c;for(var u=0;c-u>0||c+u<this.lines.getLength()-1;){if(u++,c-u>=0&&this.$isAnnotationVisible(c-u))return c-u;if(c+u<=this.lines.getLength()-1&&this.$isAnnotationVisible(c+u))return c+u}return null},a.prototype.$focusFoldWidget=function(c){if(c!=null){var u=this.$getFoldWidget(c);u.classList.add(this.editor.renderer.keyboardFocusClassName),u.focus()}},a.prototype.$focusAnnotation=function(c){if(c!=null){var u=this.$getAnnotation(c);u.classList.add(this.editor.renderer.keyboardFocusClassName),u.setAttribute("role","button"),u.focus()}},a.prototype.$blurFoldWidget=function(c){var u=this.$getFoldWidget(c);u.classList.remove(this.editor.renderer.keyboardFocusClassName),u.blur()},a.prototype.$blurAnnotation=function(c){var u=this.$getAnnotation(c);u.classList.remove(this.editor.renderer.keyboardFocusClassName),u.removeAttribute("role"),u.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},a.prototype.$moveFoldWidgetDown=function(){for(var c=this.activeRowIndex;c<this.lines.getLength()-1;)if(c++,this.$isFoldWidgetVisible(c)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=c,this.$focusFoldWidget(this.activeRowIndex);return}},a.prototype.$moveAnnotationUp=function(){for(var c=this.activeRowIndex;c>0;)if(c--,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$moveAnnotationDown=function(){for(var c=this.activeRowIndex;c<this.lines.getLength()-1;)if(c++,this.$isAnnotationVisible(c)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=c,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$switchLane=function(c){switch(c){case"annotation":if(this.activeLane==="annotation")break;var u=this.$findNearestAnnotation(this.activeRowIndex);if(u==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=u,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var l=this.$findNearestFoldWidget(this.activeRowIndex);if(l==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$focusFoldWidget(this.activeRowIndex);break}},a.prototype.$rowIndexToRow=function(c){var u=this.lines.get(c);return u?u.row:null},a.prototype.$rowToRowIndex=function(c){for(var u=0;u<this.lines.getLength();u++){var l=this.lines.get(u);if(l.row==c)return u}return null},a}();r.GutterKeyboardHandler=d}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(n,r,i){var o=this&&this.__values||function(L){var T=typeof Symbol=="function"&&Symbol.iterator,R=T&&L[T],P=0;if(R)return R.call(L);if(L&&typeof L.length=="number")return{next:function(){return L&&P>=L.length&&(L=void 0),{value:L&&L[P++],done:!L}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")},s=n("./lib/oop"),d=n("./lib/dom"),a=n("./lib/lang"),c=n("./lib/useragent"),u=n("./keyboard/textinput").TextInput,l=n("./mouse/mouse_handler").MouseHandler,f=n("./mouse/fold_handler").FoldHandler,h=n("./keyboard/keybinding").KeyBinding,p=n("./edit_session").EditSession,g=n("./search").Search,y=n("./range").Range,x=n("./lib/event_emitter").EventEmitter,S=n("./commands/command_manager").CommandManager,E=n("./commands/default_commands").commands,v=n("./config"),w=n("./token_iterator").TokenIterator,b=n("./line_widgets").LineWidgets,m=n("./keyboard/gutter_handler").GutterKeyboardHandler,$=n("./config").nls,A=n("./clipboard"),C=n("./lib/keys"),k=function(){function L(T,R,P){this.$toDestroy=[];var D=T.getContainerElement();this.container=D,this.renderer=T,this.id="editor"+ ++L.$uid,this.commands=new S(c.isMac?"mac":"win",E),typeof document=="object"&&(this.textInput=new u(T.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new f(this)),this.keyBinding=new h(this),this.$search=new g().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(N,B){B._$emitInputEvent.schedule(31)}),this.setSession(R||P&&P.session||new p("")),v.resetOptions(this),P&&this.setOptions(P),v._signal("editor",this)}return L.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},L.prototype.startOperation=function(T){if(this.curOp){if(!T||this.curOp.command)return;this.prevOp=this.curOp}T||(this.previousCommand=null,T={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:T.command||{},args:T.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},L.prototype.endOperation=function(T){if(this.curOp&&this.session){if(T&&T.returnValue===!1||!this.session)return this.curOp=null;if(T==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var R=this.curOp.command,P=R&&R.scrollIntoView;if(P){switch(P){case"center-animate":P="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var D=this.selection.getRange(),N=this.renderer.layerConfig;(D.start.row>=N.lastRow||D.end.row<=N.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}P=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var B=this.selection.toJSON();this.curOp.selectionAfter=B,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(B),this.prevOp=this.curOp,this.curOp=null}},L.prototype.$historyTracker=function(T){if(this.$mergeUndoDeltas){var R=this.prevOp,P=this.$mergeableCommands,D=R.command&&T.command.name==R.command.name;if(T.command.name=="insertstring"){var N=T.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),D=D&&this.mergeNextCommand&&(!/\s/.test(N)||/\s/.test(R.args)),this.mergeNextCommand=!0}else D=D&&P.indexOf(T.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(D=!1),D?this.session.mergeUndoDeltas=!0:P.indexOf(T.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},L.prototype.setKeyboardHandler=function(T,R){if(T&&typeof T=="string"&&T!="ace"){this.$keybindingId=T;var P=this;v.loadModule(["keybinding",T],function(D){P.$keybindingId==T&&P.keyBinding.setKeyboardHandler(D&&D.handler),R&&R()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(T),R&&R()},L.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},L.prototype.setSession=function(T){if(this.session!=T){this.curOp&&this.endOperation(),this.curOp={};var R=this.session;if(R){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var P=this.session.getSelection();P.off("changeCursor",this.$onCursorChange),P.off("changeSelection",this.$onSelectionChange)}this.session=T,T?(this.$onDocumentChange=this.onDocumentChange.bind(this),T.on("change",this.$onDocumentChange),this.renderer.setSession(T),this.$onChangeMode=this.onChangeMode.bind(this),T.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),T.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),T.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),T.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),T.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),T.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=T.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(T)),this._signal("changeSession",{session:T,oldSession:R}),this.curOp=null,R&&R._signal("changeEditor",{oldEditor:this}),T&&T._signal("changeEditor",{editor:this}),T&&!T.destroyed&&T.bgTokenizer.scheduleStart()}},L.prototype.getSession=function(){return this.session},L.prototype.setValue=function(T,R){return this.session.doc.setValue(T),R?R==1?this.navigateFileEnd():R==-1&&this.navigateFileStart():this.selectAll(),T},L.prototype.getValue=function(){return this.session.getValue()},L.prototype.getSelection=function(){return this.selection},L.prototype.resize=function(T){this.renderer.onResize(T)},L.prototype.setTheme=function(T,R){this.renderer.setTheme(T,R)},L.prototype.getTheme=function(){return this.renderer.getTheme()},L.prototype.setStyle=function(T){this.renderer.setStyle(T)},L.prototype.unsetStyle=function(T){this.renderer.unsetStyle(T)},L.prototype.getFontSize=function(){return this.getOption("fontSize")||d.computedStyle(this.container).fontSize},L.prototype.setFontSize=function(T){this.setOption("fontSize",T)},L.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var T=this;this.$highlightPending=!0,setTimeout(function(){T.$highlightPending=!1;var R=T.session;if(!(!R||R.destroyed)){R.$bracketHighlight&&(R.$bracketHighlight.markerIds.forEach(function(q){R.removeMarker(q)}),R.$bracketHighlight=null);var P=T.getCursorPosition(),D=T.getKeyboardHandler(),N=D&&D.$getDirectionForHighlight&&D.$getDirectionForHighlight(T),B=R.getMatchingBracketRanges(P,N);if(!B){var Z=new w(R,P.row,P.column),U=Z.getCurrentToken();if(U&&/\b(?:tag-open|tag-name)/.test(U.type)){var X=R.getMatchingTags(P);X&&(B=[X.openTagName,X.closeTagName])}}if(!B&&R.$mode.getMatching&&(B=R.$mode.getMatching(T.session)),!B){T.getHighlightIndentGuides()&&T.renderer.$textLayer.$highlightIndentGuide();return}var W="ace_bracket";Array.isArray(B)?B.length==1&&(W="ace_error_bracket"):B=[B],B.length==2&&(y.comparePoints(B[0].end,B[1].start)==0?B=[y.fromPoints(B[0].start,B[1].end)]:y.comparePoints(B[0].start,B[1].end)==0&&(B=[y.fromPoints(B[1].start,B[0].end)])),R.$bracketHighlight={ranges:B,markerIds:B.map(function(q){return R.addMarker(q,W,"text")})},T.getHighlightIndentGuides()&&T.renderer.$textLayer.$highlightIndentGuide()}},50)}},L.prototype.focus=function(){this.textInput.focus()},L.prototype.isFocused=function(){return this.textInput.isFocused()},L.prototype.blur=function(){this.textInput.blur()},L.prototype.onFocus=function(T){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",T))},L.prototype.onBlur=function(T){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",T))},L.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},L.prototype.onDocumentChange=function(T){var R=this.session.$useWrapMode,P=T.start.row==T.end.row?T.end.row:1/0;this.renderer.updateLines(T.start.row,P,R),this._signal("change",T),this.$cursorChange()},L.prototype.onTokenizerUpdate=function(T){var R=T.data;this.renderer.updateLines(R.first,R.last)},L.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},L.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},L.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},L.prototype.$updateHighlightActiveLine=function(){var T=this.getSession(),R;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(R=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(R=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(R=!1)),T.$highlightLineMarker&&!R)T.removeMarker(T.$highlightLineMarker.id),T.$highlightLineMarker=null;else if(!T.$highlightLineMarker&&R){var P=new y(R.row,R.column,R.row,1/0);P.id=T.addMarker(P,"ace_active-line","screenLine"),T.$highlightLineMarker=P}else R&&(T.$highlightLineMarker.start.row=R.row,T.$highlightLineMarker.end.row=R.row,T.$highlightLineMarker.start.column=R.column,T._signal("changeBackMarker"))},L.prototype.onSelectionChange=function(T){var R=this.session;if(R.$selectionMarker&&R.removeMarker(R.$selectionMarker),R.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var P=this.selection.getRange(),D=this.getSelectionStyle();R.$selectionMarker=R.addMarker(P,"ace_selection",D)}var N=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(N),this._signal("changeSelection")},L.prototype.$getSelectionHighLightRegexp=function(){var T=this.session,R=this.getSelectionRange();if(!(R.isEmpty()||R.isMultiLine())){var P=R.start.column,D=R.end.column,N=T.getLine(R.start.row),B=N.substring(P,D);if(!(B.length>5e3||!/[\w\d]/.test(B))){var Z=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:B}),U=N.substring(P-1,D+1);if(Z.test(U))return Z}}},L.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},L.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},L.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},L.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},L.prototype.onChangeMode=function(T){this.renderer.updateText(),this._emit("changeMode",T)},L.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},L.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},L.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},L.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},L.prototype.getCopyText=function(){var T=this.getSelectedText(),R=this.session.doc.getNewLineCharacter(),P=!1;if(!T&&this.$copyWithEmptySelection){P=!0;for(var D=this.selection.getAllRanges(),N=0;N<D.length;N++){var B=D[N];N&&D[N-1].start.row==B.start.row||(T+=this.session.getLine(B.start.row)+R)}}var Z={text:T};return this._signal("copy",Z),A.lineMode=P?Z.text:!1,Z.text},L.prototype.onCopy=function(){this.commands.exec("copy",this)},L.prototype.onCut=function(){this.commands.exec("cut",this)},L.prototype.onPaste=function(T,R){var P={text:T,event:R};this.commands.exec("paste",this,P)},L.prototype.$handlePaste=function(T){typeof T=="string"&&(T={text:T}),this._signal("paste",T);var R=T.text,P=R===A.lineMode,D=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)P?D.insert({row:this.selection.lead.row,column:0},R):this.insert(R);else if(P)this.selection.rangeList.ranges.forEach(function(W){D.insert({row:W.start.row,column:0},R)});else{var N=R.split(/\r\n|\r|\n/),B=this.selection.rangeList.ranges,Z=N.length==2&&(!N[0]||!N[1]);if(N.length!=B.length||Z)return this.commands.exec("insertstring",this,R);for(var U=B.length;U--;){var X=B[U];X.isEmpty()||D.remove(X),D.insert(X.start,N[U])}}},L.prototype.execCommand=function(T,R){return this.commands.exec(T,this,R)},L.prototype.insert=function(T,R){var P=this.session,D=P.getMode(),N=this.getCursorPosition();if(this.getBehavioursEnabled()&&!R){var B=D.transformAction(P.getState(N.row),"insertion",this,P,T);B&&(T!==B.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),T=B.text)}if(T==" "&&(T=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&T.indexOf(`
`)==-1){var Z=new y.fromPoints(N,N);Z.end.column+=T.length,this.session.remove(Z)}}else{var Z=this.getSelectionRange();N=this.session.remove(Z),this.clearSelection()}if(T==`
`||T==`\r
`){var q=P.getLine(N.row);if(N.column>q.search(/\S|$/)){var U=q.substr(N.column).search(/\S|$/);P.doc.removeInLine(N.row,N.column,N.column+U)}}this.clearSelection();var X=N.column,W=P.getState(N.row),q=P.getLine(N.row),Q=D.checkOutdent(W,q,T);if(P.insert(N,T),B&&B.selection&&(B.selection.length==2?this.selection.setSelectionRange(new y(N.row,X+B.selection[0],N.row,X+B.selection[1])):this.selection.setSelectionRange(new y(N.row+B.selection[0],B.selection[1],N.row+B.selection[2],B.selection[3]))),this.$enableAutoIndent){if(P.getDocument().isNewLine(T)){var G=D.getNextLineIndent(W,q.slice(0,N.column),P.getTabString());P.insert({row:N.row+1,column:0},G)}Q&&D.autoOutdent(W,P,N.row)}},L.prototype.autoIndent=function(){var T=this.session,R=T.getMode(),P,D;if(this.selection.isEmpty())P=0,D=T.doc.getLength()-1;else{var N=this.getSelectionRange();P=N.start.row,D=N.end.row}for(var B="",Z="",U="",X,W,q,Q=T.getTabString(),G=P;G<=D;G++)G>0&&(B=T.getState(G-1),Z=T.getLine(G-1),U=R.getNextLineIndent(B,Z,Q)),X=T.getLine(G),W=R.$getIndent(X),U!==W&&(W.length>0&&(q=new y(G,0,G,W.length),T.remove(q)),U.length>0&&T.insert({row:G,column:0},U)),R.autoOutdent(B,T,G)},L.prototype.onTextInput=function(T,R){if(!R)return this.keyBinding.onTextInput(T);this.startOperation({command:{name:"insertstring"}});var P=this.applyComposition.bind(this,T,R);this.selection.rangeCount?this.forEachSelection(P):P(),this.endOperation()},L.prototype.applyComposition=function(T,R){if(R.extendLeft||R.extendRight){var P=this.selection.getRange();P.start.column-=R.extendLeft,P.end.column+=R.extendRight,P.start.column<0&&(P.start.row--,P.start.column+=this.session.getLine(P.start.row).length+1),this.selection.setRange(P),!T&&!P.isEmpty()&&this.remove()}if((T||!this.selection.isEmpty())&&this.insert(T,!0),R.restoreStart||R.restoreEnd){var P=this.selection.getRange();P.start.column-=R.restoreStart,P.end.column-=R.restoreEnd,this.selection.setRange(P)}},L.prototype.onCommandKey=function(T,R,P){return this.keyBinding.onCommandKey(T,R,P)},L.prototype.setOverwrite=function(T){this.session.setOverwrite(T)},L.prototype.getOverwrite=function(){return this.session.getOverwrite()},L.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},L.prototype.setScrollSpeed=function(T){this.setOption("scrollSpeed",T)},L.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},L.prototype.setDragDelay=function(T){this.setOption("dragDelay",T)},L.prototype.getDragDelay=function(){return this.getOption("dragDelay")},L.prototype.setSelectionStyle=function(T){this.setOption("selectionStyle",T)},L.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},L.prototype.setHighlightActiveLine=function(T){this.setOption("highlightActiveLine",T)},L.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},L.prototype.setHighlightGutterLine=function(T){this.setOption("highlightGutterLine",T)},L.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},L.prototype.setHighlightSelectedWord=function(T){this.setOption("highlightSelectedWord",T)},L.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},L.prototype.setAnimatedScroll=function(T){this.renderer.setAnimatedScroll(T)},L.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},L.prototype.setShowInvisibles=function(T){this.renderer.setShowInvisibles(T)},L.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},L.prototype.setDisplayIndentGuides=function(T){this.renderer.setDisplayIndentGuides(T)},L.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},L.prototype.setHighlightIndentGuides=function(T){this.renderer.setHighlightIndentGuides(T)},L.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},L.prototype.setShowPrintMargin=function(T){this.renderer.setShowPrintMargin(T)},L.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},L.prototype.setPrintMarginColumn=function(T){this.renderer.setPrintMarginColumn(T)},L.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},L.prototype.setReadOnly=function(T){this.setOption("readOnly",T)},L.prototype.getReadOnly=function(){return this.getOption("readOnly")},L.prototype.setBehavioursEnabled=function(T){this.setOption("behavioursEnabled",T)},L.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},L.prototype.setWrapBehavioursEnabled=function(T){this.setOption("wrapBehavioursEnabled",T)},L.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},L.prototype.setShowFoldWidgets=function(T){this.setOption("showFoldWidgets",T)},L.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},L.prototype.setFadeFoldWidgets=function(T){this.setOption("fadeFoldWidgets",T)},L.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},L.prototype.remove=function(T){this.selection.isEmpty()&&(T=="left"?this.selection.selectLeft():this.selection.selectRight());var R=this.getSelectionRange();if(this.getBehavioursEnabled()){var P=this.session,D=P.getState(R.start.row),N=P.getMode().transformAction(D,"deletion",this,P,R);if(R.end.column===0){var B=P.getTextRange(R);if(B[B.length-1]==`
`){var Z=P.getLine(R.end.row);/^\s+$/.test(Z)&&(R.end.column=Z.length)}}N&&(R=N)}this.session.remove(R),this.clearSelection()},L.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},L.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},L.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},L.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var T=this.getSelectionRange();T.start.column==T.end.column&&T.start.row==T.end.row&&(T.end.column=0,T.end.row++),this.session.remove(T),this.clearSelection()},L.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var T=this.getCursorPosition();this.insert(`
`),this.moveCursorToPosition(T)},L.prototype.setGhostText=function(T,R){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(T,R)},L.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},L.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var T=this.getCursorPosition(),R=T.column;if(R!==0){var P=this.session.getLine(T.row),D,N;R<P.length?(D=P.charAt(R)+P.charAt(R-1),N=new y(T.row,R-1,T.row,R+1)):(D=P.charAt(R-1)+P.charAt(R-2),N=new y(T.row,R-2,T.row,R)),this.session.replace(N,D),this.session.selection.moveToPosition(N.end)}}},L.prototype.toLowerCase=function(){var T=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var R=this.getSelectionRange(),P=this.session.getTextRange(R);this.session.replace(R,P.toLowerCase()),this.selection.setSelectionRange(T)},L.prototype.toUpperCase=function(){var T=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var R=this.getSelectionRange(),P=this.session.getTextRange(R);this.session.replace(R,P.toUpperCase()),this.selection.setSelectionRange(T)},L.prototype.indent=function(){var T=this.session,R=this.getSelectionRange();if(R.start.row<R.end.row){var P=this.$getSelectedRows();T.indentRows(P.first,P.last," ");return}else if(R.start.column<R.end.column){var D=T.getTextRange(R);if(!/^\s+$/.test(D)){var P=this.$getSelectedRows();T.indentRows(P.first,P.last," ");return}}var N=T.getLine(R.start.row),B=R.start,Z=T.getTabSize(),U=T.documentToScreenColumn(B.row,B.column);if(this.session.getUseSoftTabs())var X=Z-U%Z,W=a.stringRepeat(" ",X);else{for(var X=U%Z;N[R.start.column-1]==" "&&X;)R.start.column--,X--;this.selection.setSelectionRange(R),W=" "}return this.insert(W)},L.prototype.blockIndent=function(){var T=this.$getSelectedRows();this.session.indentRows(T.first,T.last," ")},L.prototype.blockOutdent=function(){var T=this.session.getSelection();this.session.outdentRows(T.getRange())},L.prototype.sortLines=function(){for(var T=this.$getSelectedRows(),R=this.session,P=[],D=T.first;D<=T.last;D++)P.push(R.getLine(D));P.sort(function(Z,U){return Z.toLowerCase()<U.toLowerCase()?-1:Z.toLowerCase()>U.toLowerCase()?1:0});for(var N=new y(0,0,0,0),D=T.first;D<=T.last;D++){var B=R.getLine(D);N.start.row=D,N.end.row=D,N.end.column=B.length,R.replace(N,P[D-T.first])}},L.prototype.toggleCommentLines=function(){var T=this.session.getState(this.getCursorPosition().row),R=this.$getSelectedRows();this.session.getMode().toggleCommentLines(T,this.session,R.first,R.last)},L.prototype.toggleBlockComment=function(){var T=this.getCursorPosition(),R=this.session.getState(T.row),P=this.getSelectionRange();this.session.getMode().toggleBlockComment(R,this.session,P,T)},L.prototype.getNumberAt=function(T,R){var P=/[\-]?[0-9]+(?:\.[0-9]+)?/g;P.lastIndex=0;for(var D=this.session.getLine(T);P.lastIndex<R;){var N=P.exec(D);if(N.index<=R&&N.index+N[0].length>=R){var B={value:N[0],start:N.index,end:N.index+N[0].length};return B}}return null},L.prototype.modifyNumber=function(T){var R=this.selection.getCursor().row,P=this.selection.getCursor().column,D=new y(R,P-1,R,P),N=this.session.getTextRange(D);if(!isNaN(parseFloat(N))&&isFinite(N)){var B=this.getNumberAt(R,P);if(B){var Z=B.value.indexOf(".")>=0?B.start+B.value.indexOf(".")+1:B.end,U=B.start+B.value.length-Z,X=parseFloat(B.value);X*=Math.pow(10,U),Z!==B.end&&P<Z?T*=Math.pow(10,B.end-P-1):T*=Math.pow(10,B.end-P),X+=T,X/=Math.pow(10,U);var W=X.toFixed(U),q=new y(R,B.start,R,B.end);this.session.replace(q,W),this.moveCursorTo(R,Math.max(B.start+1,P+W.length-B.value.length))}}else this.toggleWord()},L.prototype.toggleWord=function(){var T=this.selection.getCursor().row,R=this.selection.getCursor().column;this.selection.selectWord();var P=this.getSelectedText(),D=this.selection.getWordRange().start.column,N=P.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),B=R-D-1;B<0&&(B=0);var Z=0,U=0,X=this;P.match(/[A-Za-z0-9_]+/)&&N.forEach(function(he,me){U=Z+he.length,B>=Z&&B<=U&&(P=he,X.selection.clearSelection(),X.moveCursorTo(T,Z+D),X.selection.selectTo(T,U+D)),Z=U});for(var W=this.$toggleWordPairs,q,Q=0;Q<W.length;Q++)for(var G=W[Q],oe=0;oe<=1;oe++){var ne=+!oe,ce=P.match(new RegExp("^\\s?_?("+a.escapeRegExp(G[oe])+")\\s?$","i"));if(ce){var fe=P.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(ce[1])+")($|\\s)","g"));fe&&(q=P.replace(new RegExp(a.escapeRegExp(G[oe]),"i"),function(he){var me=G[ne];return he.toUpperCase()==he?me=me.toUpperCase():he.charAt(0).toUpperCase()==he.charAt(0)&&(me=me.substr(0,0)+G[ne].charAt(0).toUpperCase()+me.substr(1)),me}),this.insert(q),q="")}}},L.prototype.findLinkAt=function(T,R){var P,D,N=this.session.getLine(T),B=N.split(/((?:https?|ftp):\/\/[\S]+)/),Z=R;Z<0&&(Z=0);var U=0,X=0,W;try{for(var q=o(B),Q=q.next();!Q.done;Q=q.next()){var G=Q.value;if(X=U+G.length,Z>=U&&Z<=X&&G.match(/((?:https?|ftp):\/\/[\S]+)/)){W=G.replace(/[\s:.,'";}\]]+$/,"");break}U=X}}catch(oe){P={error:oe}}finally{try{Q&&!Q.done&&(D=q.return)&&D.call(q)}finally{if(P)throw P.error}}return W},L.prototype.openLink=function(){var T=this.selection.getCursor(),R=this.findLinkAt(T.row,T.column);return R&&window.open(R,"_blank"),R!=null},L.prototype.removeLines=function(){var T=this.$getSelectedRows();this.session.removeFullLines(T.first,T.last),this.clearSelection()},L.prototype.duplicateSelection=function(){var T=this.selection,R=this.session,P=T.getRange(),D=T.isBackwards();if(P.isEmpty()){var N=P.start.row;R.duplicateLines(N,N)}else{var B=D?P.start:P.end,Z=R.insert(B,R.getTextRange(P),!1);P.start=B,P.end=Z,T.setSelectionRange(P,D)}},L.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},L.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},L.prototype.moveText=function(T,R,P){return this.session.moveText(T,R,P)},L.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},L.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},L.prototype.$moveLines=function(T,R){var P,D,N=this.selection;if(!N.inMultiSelectMode||this.inVirtualSelectionMode){var B=N.toOrientedRange();P=this.$getSelectedRows(B),D=this.session.$moveLines(P.first,P.last,R?0:T),R&&T==-1&&(D=0),B.moveBy(D,0),N.fromOrientedRange(B)}else{var Z=N.rangeList.ranges;N.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var U=0,X=0,W=Z.length,q=0;q<W;q++){var Q=q;Z[q].moveBy(U,0),P=this.$getSelectedRows(Z[q]);for(var G=P.first,oe=P.last;++q<W;){X&&Z[q].moveBy(X,0);var ne=this.$getSelectedRows(Z[q]);if(R&&ne.first!=oe)break;if(!R&&ne.first>oe+1)break;oe=ne.last}for(q--,U=this.session.$moveLines(G,oe,R?0:T),R&&T==-1&&(Q=q+1);Q<=q;)Z[Q].moveBy(U,0),Q++;R||(U=0),X+=U}N.fromOrientedRange(N.ranges[0]),N.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},L.prototype.$getSelectedRows=function(T){return T=(T||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(T.start.row),last:this.session.getRowFoldEnd(T.end.row)}},L.prototype.onCompositionStart=function(T){this.renderer.showComposition(T)},L.prototype.onCompositionUpdate=function(T){this.renderer.setCompositionText(T)},L.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},L.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},L.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},L.prototype.isRowVisible=function(T){return T>=this.getFirstVisibleRow()&&T<=this.getLastVisibleRow()},L.prototype.isRowFullyVisible=function(T){return T>=this.renderer.getFirstFullyVisibleRow()&&T<=this.renderer.getLastFullyVisibleRow()},L.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},L.prototype.$moveByPage=function(T,R){var P=this.renderer,D=this.renderer.layerConfig,N=T*Math.floor(D.height/D.lineHeight);R===!0?this.selection.$moveSelection(function(){this.moveCursorBy(N,0)}):R===!1&&(this.selection.moveCursorBy(N,0),this.selection.clearSelection());var B=P.scrollTop;P.scrollBy(0,N*D.lineHeight),R!=null&&P.scrollCursorIntoView(null,.5),P.animateScrolling(B)},L.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},L.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},L.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},L.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},L.prototype.scrollPageDown=function(){this.$moveByPage(1)},L.prototype.scrollPageUp=function(){this.$moveByPage(-1)},L.prototype.scrollToRow=function(T){this.renderer.scrollToRow(T)},L.prototype.scrollToLine=function(T,R,P,D){this.renderer.scrollToLine(T,R,P,D)},L.prototype.centerSelection=function(){var T=this.getSelectionRange(),R={row:Math.floor(T.start.row+(T.end.row-T.start.row)/2),column:Math.floor(T.start.column+(T.end.column-T.start.column)/2)};this.renderer.alignCursor(R,.5)},L.prototype.getCursorPosition=function(){return this.selection.getCursor()},L.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},L.prototype.getSelectionRange=function(){return this.selection.getRange()},L.prototype.selectAll=function(){this.selection.selectAll()},L.prototype.clearSelection=function(){this.selection.clearSelection()},L.prototype.moveCursorTo=function(T,R){this.selection.moveCursorTo(T,R)},L.prototype.moveCursorToPosition=function(T){this.selection.moveCursorToPosition(T)},L.prototype.jumpToMatching=function(T,R){var P=this.getCursorPosition(),D=new w(this.session,P.row,P.column),N=D.getCurrentToken(),B=0;N&&N.type.indexOf("tag-name")!==-1&&(N=D.stepBackward());var Z=N||D.stepForward();if(Z){var U,X=!1,W={},q=P.column-Z.start,Q,G={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(Z.value.match(/[{}()\[\]]/g)){for(;q<Z.value.length&&!X;q++)if(G[Z.value[q]])switch(Q=G[Z.value[q]]+"."+Z.type.replace("rparen","lparen"),isNaN(W[Q])&&(W[Q]=0),Z.value[q]){case"(":case"[":case"{":W[Q]++;break;case")":case"]":case"}":W[Q]--,W[Q]===-1&&(U="bracket",X=!0);break}}else Z.type.indexOf("tag-name")!==-1&&(isNaN(W[Z.value])&&(W[Z.value]=0),N.value==="<"&&B>1?W[Z.value]++:N.value==="</"&&W[Z.value]--,W[Z.value]===-1&&(U="tag",X=!0));X||(N=Z,B++,Z=D.stepForward(),q=0)}while(Z&&!X);if(U){var oe,ne;if(U==="bracket")oe=this.session.getBracketRange(P),oe||(oe=new y(D.getCurrentTokenRow(),D.getCurrentTokenColumn()+q-1,D.getCurrentTokenRow(),D.getCurrentTokenColumn()+q-1),ne=oe.start,(R||ne.row===P.row&&Math.abs(ne.column-P.column)<2)&&(oe=this.session.getBracketRange(ne)));else if(U==="tag"){if(!Z||Z.type.indexOf("tag-name")===-1)return;if(oe=new y(D.getCurrentTokenRow(),D.getCurrentTokenColumn()-2,D.getCurrentTokenRow(),D.getCurrentTokenColumn()-2),oe.compare(P.row,P.column)===0){var ce=this.session.getMatchingTags(P);ce&&(ce.openTag.contains(P.row,P.column)?(oe=ce.closeTag,ne=oe.start):(oe=ce.openTag,ce.closeTag.start.row===P.row&&ce.closeTag.start.column===P.column?ne=oe.end:ne=oe.start))}ne=ne||oe.start}ne=oe&&oe.cursor||ne,ne&&(T?oe&&R?this.selection.setRange(oe):oe&&oe.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(ne.row,ne.column):this.selection.moveTo(ne.row,ne.column))}}},L.prototype.gotoLine=function(T,R,P){this.selection.clearSelection(),this.session.unfold({row:T-1,column:R||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(T-1,R||0),this.isRowFullyVisible(T-1)||this.scrollToLine(T-1,!0,P)},L.prototype.navigateTo=function(T,R){this.selection.moveTo(T,R)},L.prototype.navigateUp=function(T){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var R=this.selection.anchor.getPosition();return this.moveCursorToPosition(R)}this.selection.clearSelection(),this.selection.moveCursorBy(-T||-1,0)},L.prototype.navigateDown=function(T){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var R=this.selection.anchor.getPosition();return this.moveCursorToPosition(R)}this.selection.clearSelection(),this.selection.moveCursorBy(T||1,0)},L.prototype.navigateLeft=function(T){if(this.selection.isEmpty())for(T=T||1;T--;)this.selection.moveCursorLeft();else{var R=this.getSelectionRange().start;this.moveCursorToPosition(R)}this.clearSelection()},L.prototype.navigateRight=function(T){if(this.selection.isEmpty())for(T=T||1;T--;)this.selection.moveCursorRight();else{var R=this.getSelectionRange().end;this.moveCursorToPosition(R)}this.clearSelection()},L.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},L.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},L.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},L.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},L.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},L.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},L.prototype.replace=function(T,R){R&&this.$search.set(R);var P=this.$search.find(this.session),D=0;return P&&(this.$tryReplace(P,T)&&(D=1),this.selection.setSelectionRange(P),this.renderer.scrollSelectionIntoView(P.start,P.end)),D},L.prototype.replaceAll=function(T,R){R&&this.$search.set(R);var P=this.$search.findAll(this.session),D=0;if(!P.length)return D;var N=this.getSelectionRange();this.selection.moveTo(0,0);for(var B=P.length-1;B>=0;--B)this.$tryReplace(P[B],T)&&D++;return this.selection.setSelectionRange(N),D},L.prototype.$tryReplace=function(T,R){var P=this.session.getTextRange(T);return R=this.$search.replace(P,R),R!==null?(T.end=this.session.replace(T,R),T):null},L.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},L.prototype.find=function(T,R,P){R||(R={}),typeof T=="string"||T instanceof RegExp?R.needle=T:typeof T=="object"&&s.mixin(R,T);var D=this.selection.getRange();R.needle==null&&(T=this.session.getTextRange(D)||this.$search.$options.needle,T||(D=this.session.getWordRange(D.start.row,D.start.column),T=this.session.getTextRange(D)),this.$search.set({needle:T})),this.$search.set(R),R.start||this.$search.set({start:D});var N=this.$search.find(this.session);if(R.preventScroll)return N;if(N)return this.revealRange(N,P),N;R.backwards?D.start=D.end:D.end=D.start,this.selection.setRange(D)},L.prototype.findNext=function(T,R){this.find({skipCurrent:!0,backwards:!1},T,R)},L.prototype.findPrevious=function(T,R){this.find(T,{skipCurrent:!0,backwards:!0},R)},L.prototype.revealRange=function(T,R){this.session.unfold(T),this.selection.setSelectionRange(T);var P=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(T.start,T.end,.5),R!==!1&&this.renderer.animateScrolling(P)},L.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},L.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},L.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(T){T.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},L.prototype.setAutoScrollEditorIntoView=function(T){if(T){var R,P=this,D=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var N=this.$scrollAnchor;N.style.cssText="position:absolute",this.container.insertBefore(N,this.container.firstChild);var B=this.on("changeSelection",function(){D=!0}),Z=this.renderer.on("beforeRender",function(){D&&(R=P.renderer.container.getBoundingClientRect())}),U=this.renderer.on("afterRender",function(){if(D&&R&&(P.isFocused()||P.searchBox&&P.searchBox.isFocused())){var X=P.renderer,W=X.$cursorLayer.$pixelPos,q=X.layerConfig,Q=W.top-q.offset;W.top>=0&&Q+R.top<0?D=!0:W.top<q.height&&W.top+R.top+q.lineHeight>window.innerHeight?D=!1:D=null,D!=null&&(N.style.top=Q+"px",N.style.left=W.left+"px",N.style.height=q.lineHeight+"px",N.scrollIntoView(D)),D=R=null}});this.setAutoScrollEditorIntoView=function(X){X||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",B),this.renderer.off("afterRender",U),this.renderer.off("beforeRender",Z))}}},L.prototype.$resetCursorStyle=function(){var T=this.$cursorStyle||"ace",R=this.renderer.$cursorLayer;R&&(R.setSmoothBlinking(/smooth/.test(T)),R.isBlinking=!this.$readOnly&&T!="wide",d.setCssClass(R.element,"ace_slim-cursors",/slim/.test(T)))},L.prototype.prompt=function(T,R,P){var D=this;v.loadModule("ace/ext/prompt",function(N){N.prompt(D,T,R,P)})},L}();k.$uid=0,k.prototype.curOp=null,k.prototype.prevOp={},k.prototype.$mergeableCommands=["backspace","del","insertstring"],k.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(k.prototype,x),v.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(L){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:L})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(L){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(L){this.textInput.setReadOnly(L),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(L){this.textInput.setCopyWithEmptySelection(L)},initialValue:!1},cursorStyle:{set:function(L){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(L){this.setAutoScrollEditorIntoView(L)}},keyboardHandler:{set:function(L){this.setKeyboardHandler(L)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(L){this.session.setValue(L)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(L){this.setSession(L)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(L){this.renderer.$gutterLayer.setShowLineNumbers(L),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),L&&this.$relativeLineNumbers?I.attach(this):I.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(L){this.$showLineNumbers&&L?I.attach(this):I.detach(this)}},placeholder:{set:function(L){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var T=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(T&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),d.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!T&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),d.addCssClass(this.container,"ace_hasPlaceholder");var R=d.createElement("div");R.className="ace_placeholder",R.textContent=this.$placeholder||"",this.renderer.placeholderNode=R,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!T&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(L){var T={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(D){D.blur(),D.renderer.scroller.focus()},readOnly:!0},R=function(D){if(D.target==this.renderer.scroller&&D.keyCode===C.enter){D.preventDefault();var N=this.getCursorPosition().row;this.isRowVisible(N)||this.scrollToLine(N,!0,!0),this.focus()}},P;L?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",$("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",$("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",R.bind(this)),this.commands.addCommand(T),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",$("editor")),this.renderer.$gutter.setAttribute("aria-label",$("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),P||(P=new m(this)),P.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",R.bind(this)),this.commands.removeCommand(T),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),P&&P.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var I={getText:function(L,T){return(Math.abs(L.selection.lead.row-T)||T+1+(T<9?"·":""))+""},getWidth:function(L,T,R){return Math.max(T.toString().length,(R.lastRow+1).toString().length,2)*R.characterWidth},update:function(L,T){T.renderer.$loop.schedule(T.renderer.CHANGE_GUTTER)},attach:function(L){L.renderer.$gutterLayer.$renderer=this,L.on("changeSelection",this.update),this.update(null,L)},detach:function(L){L.renderer.$gutterLayer.$renderer==this&&(L.renderer.$gutterLayer.$renderer=null),L.off("changeSelection",this.update),this.update(null,L)}};r.Editor=k}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(n,r,i){var o=function(){function w(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return w.prototype.addSession=function(b){this.$session=b},w.prototype.add=function(b,m,$){if(!this.$fromUndo&&b!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),m===!1||!this.lastDeltas){this.lastDeltas=[];var A=this.$undoStack.length;A>this.$undoDepth-1&&this.$undoStack.splice(0,A-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),b.id=this.$rev=++this.$maxRev}(b.action=="remove"||b.action=="insert")&&(this.$lastDelta=b),this.lastDeltas.push(b)}},w.prototype.addSelection=function(b,m){this.selections.push({value:b,rev:m||this.$rev})},w.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},w.prototype.markIgnored=function(b,m){m==null&&(m=this.$rev+1);for(var $=this.$undoStack,A=$.length;A--;){var C=$[A][0];if(C.id<=b)break;C.id<m&&(C.ignore=!0)}this.lastDeltas=null},w.prototype.getSelection=function(b,m){for(var $=this.selections,A=$.length;A--;){var C=$[A];if(C.rev<b)return m&&(C=$[A+1]),C}},w.prototype.getRevision=function(){return this.$rev},w.prototype.getDeltas=function(b,m){m==null&&(m=this.$rev+1);for(var $=this.$undoStack,A=null,C=0,k=$.length;k--;){var I=$[k][0];if(I.id<m&&!A&&(A=k+1),I.id<=b){C=k+1;break}}return $.slice(C,A)},w.prototype.getChangedRanges=function(b,m){m==null&&(m=this.$rev+1)},w.prototype.getChangedLines=function(b,m){m==null&&(m=this.$rev+1)},w.prototype.undo=function(b,m){this.lastDeltas=null;var $=this.$undoStack;if(s($,$.length)){b||(b=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var A=$.pop(),C=null;return A&&(C=b.undoChanges(A,m),this.$redoStack.push(A),this.$syncRev()),this.$fromUndo=!1,C}},w.prototype.redo=function(b,m){if(this.lastDeltas=null,b||(b=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var $=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);v(this.$redoStack,$),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(k){k[0].id=++this.$maxRev},this)}var A=this.$redoStack.pop(),C=null;return A&&(C=b.redoChanges(A,m),this.$undoStack.push(A),this.$syncRev()),this.$fromUndo=!1,C},w.prototype.$syncRev=function(){var b=this.$undoStack,m=b[b.length-1],$=m&&m[0].id||0;this.$redoStackBaseRev=$,this.$rev=$},w.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},w.prototype.canUndo=function(){return this.$undoStack.length>0},w.prototype.canRedo=function(){return this.$redoStack.length>0},w.prototype.bookmark=function(b){b==null&&(b=this.$rev),this.mark=b},w.prototype.isAtBookmark=function(){return this.$rev===this.mark},w.prototype.toJSON=function(){},w.prototype.fromJSON=function(){},w.prototype.$prettyPrint=function(b){return b?l(b):l(this.$undoStack)+`
---
`+l(this.$redoStack)},w}();o.prototype.hasUndo=o.prototype.canUndo,o.prototype.hasRedo=o.prototype.canRedo,o.prototype.isClean=o.prototype.isAtBookmark,o.prototype.markClean=o.prototype.bookmark;function s(w,b){for(var m=b;m--;){var $=w[m];if($&&!$[0].ignore){for(;m<b-1;){var A=p(w[m],w[m+1]);w[m]=A[0],w[m+1]=A[1],m++}return!0}}}var d=n("./range").Range,a=d.comparePoints;d.comparePoints;function c(w){return{row:w.row,column:w.column}}function u(w){return{start:c(w.start),end:c(w.end),action:w.action,lines:w.lines.slice()}}function l(w){if(w=w||this,Array.isArray(w))return w.map(l).join(`
`);var b="";return w.action?(b=w.action=="insert"?"+":"-",b+="["+w.lines+"]"):w.value&&(Array.isArray(w.value)?b=w.value.map(f).join(`
`):b=f(w.value)),w.start&&(b+=f(w)),(w.id||w.rev)&&(b+=" ("+(w.id||w.rev)+")"),b}function f(w){return w.start.row+":"+w.start.column+"=>"+w.end.row+":"+w.end.column}function h(w,b){var m=w.action=="insert",$=b.action=="insert";if(m&&$)if(a(b.start,w.end)>=0)y(b,w,-1);else if(a(b.start,w.start)<=0)y(w,b,1);else return null;else if(m&&!$)if(a(b.start,w.end)>=0)y(b,w,-1);else if(a(b.end,w.start)<=0)y(w,b,-1);else return null;else if(!m&&$)if(a(b.start,w.start)>=0)y(b,w,1);else if(a(b.start,w.start)<=0)y(w,b,1);else return null;else if(!m&&!$)if(a(b.start,w.start)>=0)y(b,w,1);else if(a(b.end,w.start)<=0)y(w,b,-1);else return null;return[b,w]}function p(w,b){for(var m=w.length;m--;)for(var $=0;$<b.length;$++)if(!h(w[m],b[$])){for(;m<w.length;){for(;$--;)h(b[$],w[m]);$=b.length,m++}return[w,b]}return w.selectionBefore=b.selectionBefore=w.selectionAfter=b.selectionAfter=null,[b,w]}function g(w,b){var m=w.action=="insert",$=b.action=="insert";if(m&&$)a(w.start,b.start)<0?y(b,w,1):y(w,b,1);else if(m&&!$)a(w.start,b.end)>=0?y(w,b,-1):(a(w.start,b.start)<=0||y(w,d.fromPoints(b.start,w.start),-1),y(b,w,1));else if(!m&&$)a(b.start,w.end)>=0?y(b,w,-1):(a(b.start,w.start)<=0||y(b,d.fromPoints(w.start,b.start),-1),y(w,b,1));else if(!m&&!$)if(a(b.start,w.end)>=0)y(b,w,-1);else if(a(b.end,w.start)<=0)y(w,b,-1);else{var A,C;return a(w.start,b.start)<0&&(A=w,w=S(w,b.start)),a(w.end,b.end)>0&&(C=S(w,b.end)),x(b.end,w.start,w.end,-1),C&&!A&&(w.lines=C.lines,w.start=C.start,w.end=C.end,C=w),[b,A,C].filter(Boolean)}return[b,w]}function y(w,b,m){x(w.start,b.start,b.end,m),x(w.end,b.start,b.end,m)}function x(w,b,m,$){w.row==($==1?b:m).row&&(w.column+=$*(m.column-b.column)),w.row+=$*(m.row-b.row)}function S(w,b){var m=w.lines,$=w.end;w.end=c(b);var A=w.end.row-w.start.row,C=m.splice(A,m.length),k=A?b.column:b.column-w.start.column;m.push(C[0].substring(0,k)),C[0]=C[0].substr(k);var I={start:c(b),end:$,lines:C,action:w.action};return I}function E(w,b){b=u(b);for(var m=w.length;m--;){for(var $=w[m],A=0;A<$.length;A++){var C=$[A],k=g(C,b);b=k[0],k.length!=2&&(k[2]?($.splice(A+1,1,k[1],k[2]),A++):k[1]||($.splice(A,1),A--))}$.length||w.splice(m,1)}return w}function v(w,b){for(var m=0;m<b.length;m++)for(var $=b[m],A=0;A<$.length;A++)E(w,$[A])}r.UndoManager=o}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("../lib/dom"),s=function(){function d(a,c){this.element=a,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return d.prototype.moveContainer=function(a){o.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},d.prototype.pageChanged=function(a,c){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},d.prototype.computeLineTop=function(a,c,u){var l=c.firstRowScreen*c.lineHeight,f=Math.floor(l/this.canvasHeight),h=u.documentToScreenRow(a,0)*c.lineHeight;return h-f*this.canvasHeight},d.prototype.computeLineHeight=function(a,c,u){return c.lineHeight*u.getRowLineCount(a)},d.prototype.getLength=function(){return this.cells.length},d.prototype.get=function(a){return this.cells[a]},d.prototype.shift=function(){this.$cacheCell(this.cells.shift())},d.prototype.pop=function(){this.$cacheCell(this.cells.pop())},d.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var c=o.createFragment(this.element),u=0;u<a.length;u++)c.appendChild(a[u].element);this.element.appendChild(c)}else this.cells.push(a),this.element.appendChild(a.element)},d.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var c=o.createFragment(this.element),u=0;u<a.length;u++)c.appendChild(a[u].element);this.element.firstChild?this.element.insertBefore(c,this.element.firstChild):this.element.appendChild(c)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},d.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},d.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},d.prototype.createCell=function(a,c,u,l){var f=this.cellCache.pop();if(!f){var h=o.createElement("div");l&&l(h),this.element.appendChild(h),f={element:h,text:"",row:a}}return f.row=a,f},d}();r.Lines=s}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(n,r,i){var o=n("../lib/dom"),s=n("../lib/oop"),d=n("../lib/lang"),a=n("../lib/event_emitter").EventEmitter,c=n("./lines").Lines,u=n("../config").nls,l=function(){function h(p){this.element=o.createElement("div"),this.element.className="ace_layer ace_gutter-layer",p.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new c(this.element),this.$lines.$offsetCoefficient=1}return h.prototype.setSession=function(p){this.session&&this.session.off("change",this.$updateAnnotations),this.session=p,p&&p.on("change",this.$updateAnnotations)},h.prototype.addGutterDecoration=function(p,g){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(p,g)},h.prototype.removeGutterDecoration=function(p,g){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(p,g)},h.prototype.setAnnotations=function(p){this.$annotations=[];for(var g=0;g<p.length;g++){var y=p[g],x=y.row,S=this.$annotations[x];S||(S=this.$annotations[x]={text:[],type:[]});var E=y.text,v=y.type;E=E?d.escapeHTML(E):y.html||"",S.text.indexOf(E)===-1&&(S.text.push(E),S.type.push(v));var w=y.className;w?S.className=w:v=="error"?S.className=" ace_error":v=="warning"&&S.className!=" ace_error"?S.className=" ace_warning":v=="info"&&!S.className&&(S.className=" ace_info")}},h.prototype.$updateAnnotations=function(p){if(this.$annotations.length){var g=p.start.row,y=p.end.row-g;if(y!==0)if(p.action=="remove")this.$annotations.splice(g,y+1,null);else{var x=new Array(y+1);x.unshift(g,1),this.$annotations.splice.apply(this.$annotations,x)}}},h.prototype.update=function(p){this.config=p;var g=this.session,y=p.firstRow,x=Math.min(p.lastRow+p.gutterOffset,g.getLength()-1);this.oldLastRow=x,this.config=p,this.$lines.moveContainer(p),this.$updateCursorRow();for(var S=g.getNextFoldLine(y),E=S?S.start.row:1/0,v=null,w=-1,b=y;;){if(b>E&&(b=S.end.row+1,S=g.getNextFoldLine(b,S),E=S?S.start.row:1/0),b>x){for(;this.$lines.getLength()>w+1;)this.$lines.pop();break}v=this.$lines.get(++w),v?v.row=b:(v=this.$lines.createCell(b,p,this.session,f),this.$lines.push(v)),this.$renderCell(v,p,S,b),b++}this._signal("afterRender"),this.$updateGutterWidth(p)},h.prototype.$updateGutterWidth=function(p){var g=this.session,y=g.gutterRenderer||this.$renderer,x=g.$firstLineNumber,S=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||g.$useWrapMode)&&(S=g.getLength()+x-1);var E=y?y.getWidth(g,S,p):S.toString().length*p.characterWidth,v=this.$padding||this.$computePadding();E+=v.left+v.right,E!==this.gutterWidth&&!isNaN(E)&&(this.gutterWidth=E,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",E))},h.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var p=this.session.selection.getCursor();this.$cursorRow!==p.row&&(this.$cursorRow=p.row)}},h.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var p=this.session.selection.cursor.row;if(this.$cursorRow=p,!(this.$cursorCell&&this.$cursorCell.row==p)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var g=this.$lines.cells;this.$cursorCell=null;for(var y=0;y<g.length;y++){var x=g[y];if(x.row>=this.$cursorRow){if(x.row>this.$cursorRow){var S=this.session.getFoldLine(this.$cursorRow);if(y>0&&S&&S.start.row==g[y-1].row)x=g[y-1];else break}x.element.className="ace_gutter-active-line "+x.element.className,this.$cursorCell=x;break}}}}},h.prototype.scrollLines=function(p){var g=this.config;if(this.config=p,this.$updateCursorRow(),this.$lines.pageChanged(g,p))return this.update(p);this.$lines.moveContainer(p);var y=Math.min(p.lastRow+p.gutterOffset,this.session.getLength()-1),x=this.oldLastRow;if(this.oldLastRow=y,!g||x<p.firstRow)return this.update(p);if(y<g.firstRow)return this.update(p);if(g.firstRow<p.firstRow)for(var S=this.session.getFoldedRowCount(g.firstRow,p.firstRow-1);S>0;S--)this.$lines.shift();if(x>y)for(var S=this.session.getFoldedRowCount(y+1,x);S>0;S--)this.$lines.pop();p.firstRow<g.firstRow&&this.$lines.unshift(this.$renderLines(p,p.firstRow,g.firstRow-1)),y>x&&this.$lines.push(this.$renderLines(p,x+1,y)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(p)},h.prototype.$renderLines=function(p,g,y){for(var x=[],S=g,E=this.session.getNextFoldLine(S),v=E?E.start.row:1/0;S>v&&(S=E.end.row+1,E=this.session.getNextFoldLine(S,E),v=E?E.start.row:1/0),!(S>y);){var w=this.$lines.createCell(S,p,this.session,f);this.$renderCell(w,p,E,S),x.push(w),S++}return x},h.prototype.$renderCell=function(p,g,y,x){var S=p.element,E=this.session,v=S.childNodes[0],w=S.childNodes[1],b=S.childNodes[2],m=b.firstChild,$=E.$firstLineNumber,A=E.$breakpoints,C=E.$decorations,k=E.gutterRenderer||this.$renderer,I=this.$showFoldWidgets&&E.foldWidgets,L=y?y.start.row:Number.MAX_VALUE,T=g.lineHeight+"px",R=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",P=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",D=(k?k.getText(E,x):x+$).toString();if(this.$highlightGutterLine&&(x==this.$cursorRow||y&&x<this.$cursorRow&&x>=L&&this.$cursorRow<=y.end.row)&&(R+="ace_gutter-active-line ",this.$cursorCell!=p&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=p)),A[x]&&(R+=A[x]),C[x]&&(R+=C[x]),this.$annotations[x]&&x!==L&&(R+=this.$annotations[x].className),S.className!=R&&(S.className=R),I){var N=I[x];N==null&&(N=I[x]=E.getFoldWidget(x))}if(N){var R="ace_fold-widget ace_"+N;if(N=="start"&&x==L&&x<y.end.row){R+=" ace_closed";for(var B,Z=!1,U=x+1;U<=y.end.row;U++)if(this.$annotations[U]){if(this.$annotations[U].className===" ace_error"){Z=!0,B=" ace_error_fold";break}if(this.$annotations[U].className===" ace_warning"){Z=!0,B=" ace_warning_fold";continue}}S.className+=B}else R+=" ace_open";w.className!=R&&(w.className=R),o.setStyle(w.style,"height",T),o.setStyle(w.style,"display","inline-block"),w.setAttribute("role","button"),w.setAttribute("tabindex","-1");var y=E.getFoldLine(D-1);y?(w.setAttribute("aria-label",u("Unfold rows $0 to $1",[D,y.end.row+1])),w.setAttribute("title",u("Unfold code"))):(w.setAttribute("aria-label",u("Fold at row $0",[D])),w.setAttribute("title",u("Fold code")))}else w&&(o.setStyle(w.style,"display","none"),w.setAttribute("tabindex","0"),w.removeAttribute("role"),w.removeAttribute("aria-label"));return Z&&this.$showFoldedAnnotations?(b.className="ace_gutter_annotation",m.className=P,m.className+=B,o.setStyle(m.style,"height",T),o.setStyle(b.style,"display","block"),o.setStyle(b.style,"height",T),b.setAttribute("aria-label",u("Read annotations row $0",[D])),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")):this.$annotations[x]?(b.className="ace_gutter_annotation",m.className=P,this.$useSvgGutterIcons?m.className+=this.$annotations[x].className:S.classList.add(this.$annotations[x].className.replace(" ","")),o.setStyle(m.style,"height",T),o.setStyle(b.style,"display","block"),o.setStyle(b.style,"height",T),b.setAttribute("aria-label",u("Read annotations row $0",[D])),b.setAttribute("tabindex","-1"),b.setAttribute("role","button")):(o.setStyle(b.style,"display","none"),b.removeAttribute("aria-label"),b.removeAttribute("role"),b.setAttribute("tabindex","0")),D!==v.data&&(v.data=D),o.setStyle(p.element.style,"height",this.$lines.computeLineHeight(x,g,E)+"px"),o.setStyle(p.element.style,"top",this.$lines.computeLineTop(x,g,E)+"px"),p.text=D,b.style.display==="none"&&w.style.display==="none"?p.element.setAttribute("aria-hidden",!0):p.element.setAttribute("aria-hidden",!1),p},h.prototype.setHighlightGutterLine=function(p){this.$highlightGutterLine=p},h.prototype.setShowLineNumbers=function(p){this.$renderer=!p&&{getWidth:function(){return 0},getText:function(){return""}}},h.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},h.prototype.setShowFoldWidgets=function(p){p?o.addCssClass(this.element,"ace_folding-enabled"):o.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=p,this.$padding=null},h.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},h.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var p=o.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(p.borderLeftWidth)||0)+(parseInt(p.paddingLeft)||0)+1,this.$padding.right=(parseInt(p.borderRightWidth)||0)+(parseInt(p.paddingRight)||0),this.$padding},h.prototype.getRegion=function(p){var g=this.$padding||this.$computePadding(),y=this.element.getBoundingClientRect();if(p.x<g.left+y.left)return"markers";if(this.$showFoldWidgets&&p.x>y.right-g.right)return"foldWidgets"},h}();l.prototype.$fixedWidth=!1,l.prototype.$highlightGutterLine=!0,l.prototype.$renderer="",l.prototype.$showLineNumbers=!0,l.prototype.$showFoldWidgets=!0,s.implement(l.prototype,a);function f(h){var p=document.createTextNode("");h.appendChild(p);var g=o.createElement("span");h.appendChild(g);var y=o.createElement("span");h.appendChild(y);var x=o.createElement("span");return y.appendChild(x),h}r.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(n,r,i){var o=n("../range").Range,s=n("../lib/dom"),d=function(){function c(u){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",u.appendChild(this.element)}return c.prototype.setPadding=function(u){this.$padding=u},c.prototype.setSession=function(u){this.session=u},c.prototype.setMarkers=function(u){this.markers=u},c.prototype.elt=function(u,l){var f=this.i!=-1&&this.element.childNodes[this.i];f?this.i++:(f=document.createElement("div"),this.element.appendChild(f),this.i=-1),f.style.cssText=l,f.className=u},c.prototype.update=function(u){if(u){this.config=u,this.i=0;var l;for(var f in this.markers){var h=this.markers[f];if(!h.range){h.update(l,this,this.session,u);continue}var p=h.range.clipRows(u.firstRow,u.lastRow);if(!p.isEmpty())if(p=p.toScreenRange(this.session),h.renderer){var g=this.$getTop(p.start.row,u),y=this.$padding+p.start.column*u.characterWidth;h.renderer(l,p,y,g,u)}else h.type=="fullLine"?this.drawFullLineMarker(l,p,h.clazz,u):h.type=="screenLine"?this.drawScreenLineMarker(l,p,h.clazz,u):p.isMultiLine()?h.type=="text"?this.drawTextMarker(l,p,h.clazz,u):this.drawMultiLineMarker(l,p,h.clazz,u):this.drawSingleLineMarker(l,p,h.clazz+" ace_start ace_br15",u)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},c.prototype.$getTop=function(u,l){return(u-l.firstRowScreen)*l.lineHeight},c.prototype.drawTextMarker=function(u,l,f,h,p){for(var g=this.session,y=l.start.row,x=l.end.row,S=y,E=0,v=0,w=g.getScreenLastRowColumn(S),b=new o(S,l.start.column,S,v);S<=x;S++)b.start.row=b.end.row=S,b.start.column=S==y?l.start.column:g.getRowWrapIndent(S),b.end.column=w,E=v,v=w,w=S+1<x?g.getScreenLastRowColumn(S+1):S==x?0:l.end.column,this.drawSingleLineMarker(u,b,f+(S==y?" ace_start":"")+" ace_br"+a(S==y||S==y+1&&l.start.column,E<v,v>w,S==x),h,S==x?0:1,p)},c.prototype.drawMultiLineMarker=function(u,l,f,h,p){var g=this.$padding,y=h.lineHeight,x=this.$getTop(l.start.row,h),S=g+l.start.column*h.characterWidth;if(p=p||"",this.session.$bidiHandler.isBidiRow(l.start.row)){var E=l.clone();E.end.row=E.start.row,E.end.column=this.session.getLine(E.start.row).length,this.drawBidiSingleLineMarker(u,E,f+" ace_br1 ace_start",h,null,p)}else this.elt(f+" ace_br1 ace_start","height:"+y+"px;right:0;top:"+x+"px;left:"+S+"px;"+(p||""));if(this.session.$bidiHandler.isBidiRow(l.end.row)){var E=l.clone();E.start.row=E.end.row,E.start.column=0,this.drawBidiSingleLineMarker(u,E,f+" ace_br12",h,null,p)}else{x=this.$getTop(l.end.row,h);var v=l.end.column*h.characterWidth;this.elt(f+" ace_br12","height:"+y+"px;width:"+v+"px;top:"+x+"px;left:"+g+"px;"+(p||""))}if(y=(l.end.row-l.start.row-1)*h.lineHeight,!(y<=0)){x=this.$getTop(l.start.row+1,h);var w=(l.start.column?1:0)|(l.end.column?0:8);this.elt(f+(w?" ace_br"+w:""),"height:"+y+"px;right:0;top:"+x+"px;left:"+g+"px;"+(p||""))}},c.prototype.drawSingleLineMarker=function(u,l,f,h,p,g){if(this.session.$bidiHandler.isBidiRow(l.start.row))return this.drawBidiSingleLineMarker(u,l,f,h,p,g);var y=h.lineHeight,x=(l.end.column+(p||0)-l.start.column)*h.characterWidth,S=this.$getTop(l.start.row,h),E=this.$padding+l.start.column*h.characterWidth;this.elt(f,"height:"+y+"px;width:"+x+"px;top:"+S+"px;left:"+E+"px;"+(g||""))},c.prototype.drawBidiSingleLineMarker=function(u,l,f,h,p,g){var y=h.lineHeight,x=this.$getTop(l.start.row,h),S=this.$padding,E=this.session.$bidiHandler.getSelections(l.start.column,l.end.column);E.forEach(function(v){this.elt(f,"height:"+y+"px;width:"+(v.width+(p||0))+"px;top:"+x+"px;left:"+(S+v.left)+"px;"+(g||""))},this)},c.prototype.drawFullLineMarker=function(u,l,f,h,p){var g=this.$getTop(l.start.row,h),y=h.lineHeight;l.start.row!=l.end.row&&(y+=this.$getTop(l.end.row,h)-g),this.elt(f,"height:"+y+"px;top:"+g+"px;left:0;right:0;"+(p||""))},c.prototype.drawScreenLineMarker=function(u,l,f,h,p){var g=this.$getTop(l.start.row,h),y=h.lineHeight;this.elt(f,"height:"+y+"px;top:"+g+"px;left:0;right:0;"+(p||""))},c}();d.prototype.$padding=0;function a(c,u,l,f){return(c?1:0)|(u?2:0)|(l?4:0)|(f?8:0)}r.Marker=d}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config"],function(n,r,i){var o=n("../lib/oop"),s=n("../lib/dom"),d=n("../lib/lang"),a=n("./lines").Lines,c=n("../lib/event_emitter").EventEmitter,u=n("../config").nls,l=function(){function f(h){this.dom=s,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",h.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return f.prototype.$updateEolChar=function(){var h=this.session.doc,p=h.getNewLineCharacter()==`
`&&h.getNewLineMode()!="windows",g=p?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=g)return this.EOL_CHAR=g,!0},f.prototype.setPadding=function(h){this.$padding=h,this.element.style.margin="0 "+h+"px"},f.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},f.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},f.prototype.$setFontMetrics=function(h){this.$fontMetrics=h,this.$fontMetrics.on("changeCharacterSize",function(p){this._signal("changeCharacterSize",p)}.bind(this)),this.$pollSizeChanges()},f.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},f.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},f.prototype.setSession=function(h){this.session=h,h&&this.$computeTabString()},f.prototype.setShowInvisibles=function(h){return this.showInvisibles==h?!1:(this.showInvisibles=h,typeof h=="string"?(this.showSpaces=/tab/i.test(h),this.showTabs=/space/i.test(h),this.showEOL=/eol/i.test(h)):this.showSpaces=this.showTabs=this.showEOL=h,this.$computeTabString(),!0)},f.prototype.setDisplayIndentGuides=function(h){return this.displayIndentGuides==h?!1:(this.displayIndentGuides=h,this.$computeTabString(),!0)},f.prototype.setHighlightIndentGuides=function(h){return this.$highlightIndentGuides===h?!1:(this.$highlightIndentGuides=h,h)},f.prototype.$computeTabString=function(){var h=this.session.getTabSize();this.tabSize=h;for(var p=this.$tabStrings=[0],g=1;g<h+1;g++)if(this.showTabs){var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_tab",y.textContent=d.stringRepeat(this.TAB_CHAR,g),p.push(y)}else p.push(this.dom.createTextNode(d.stringRepeat(" ",g),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var x="ace_indent-guide",S=this.showSpaces?" ace_invisible ace_invisible_space":"",E=this.showSpaces?d.stringRepeat(this.SPACE_CHAR,this.tabSize):d.stringRepeat(" ",this.tabSize),v=this.showTabs?" ace_invisible ace_invisible_tab":"",w=this.showTabs?d.stringRepeat(this.TAB_CHAR,this.tabSize):E,y=this.dom.createElement("span");y.className=x+S,y.textContent=E,this.$tabStrings[" "]=y;var y=this.dom.createElement("span");y.className=x+v,y.textContent=w,this.$tabStrings[" "]=y}},f.prototype.updateLines=function(h,p,g){if(this.config.lastRow!=h.lastRow||this.config.firstRow!=h.firstRow)return this.update(h);this.config=h;for(var y=Math.max(p,h.firstRow),x=Math.min(g,h.lastRow),S=this.element.childNodes,E=0,w=h.firstRow;w<y;w++){var b=this.session.getFoldLine(w);if(b)if(b.containsRow(y)){y=b.start.row;break}else w=b.end.row;E++}for(var v=!1,w=y,b=this.session.getNextFoldLine(w),m=b?b.start.row:1/0;w>m&&(w=b.end.row+1,b=this.session.getNextFoldLine(w,b),m=b?b.start.row:1/0),!(w>x);){var $=S[E++];if($){this.dom.removeChildren($),this.$renderLine($,w,w==m?b:!1),v&&($.style.top=this.$lines.computeLineTop(w,h,this.session)+"px");var A=h.lineHeight*this.session.getRowLength(w)+"px";$.style.height!=A&&(v=!0,$.style.height=A)}w++}if(v)for(;E<this.$lines.cells.length;){var C=this.$lines.cells[E++];C.element.style.top=this.$lines.computeLineTop(C.row,h,this.session)+"px"}},f.prototype.scrollLines=function(h){var p=this.config;if(this.config=h,this.$lines.pageChanged(p,h))return this.update(h);this.$lines.moveContainer(h);var g=h.lastRow,y=p?p.lastRow:-1;if(!p||y<h.firstRow)return this.update(h);if(g<p.firstRow)return this.update(h);if(!p||p.lastRow<h.firstRow)return this.update(h);if(h.lastRow<p.firstRow)return this.update(h);if(p.firstRow<h.firstRow)for(var x=this.session.getFoldedRowCount(p.firstRow,h.firstRow-1);x>0;x--)this.$lines.shift();if(p.lastRow>h.lastRow)for(var x=this.session.getFoldedRowCount(h.lastRow+1,p.lastRow);x>0;x--)this.$lines.pop();h.firstRow<p.firstRow&&this.$lines.unshift(this.$renderLinesFragment(h,h.firstRow,p.firstRow-1)),h.lastRow>p.lastRow&&this.$lines.push(this.$renderLinesFragment(h,p.lastRow+1,h.lastRow)),this.$highlightIndentGuide()},f.prototype.$renderLinesFragment=function(h,p,g){for(var y=[],x=p,S=this.session.getNextFoldLine(x),E=S?S.start.row:1/0;x>E&&(x=S.end.row+1,S=this.session.getNextFoldLine(x,S),E=S?S.start.row:1/0),!(x>g);){var v=this.$lines.createCell(x,h,this.session),w=v.element;this.dom.removeChildren(w),s.setStyle(w.style,"height",this.$lines.computeLineHeight(x,h,this.session)+"px"),s.setStyle(w.style,"top",this.$lines.computeLineTop(x,h,this.session)+"px"),this.$renderLine(w,x,x==E?S:!1),this.$useLineGroups()?w.className="ace_line_group":w.className="ace_line",y.push(v),x++}return y},f.prototype.update=function(h){this.$lines.moveContainer(h),this.config=h;for(var p=h.firstRow,g=h.lastRow,y=this.$lines;y.getLength();)y.pop();y.push(this.$renderLinesFragment(h,p,g))},f.prototype.$renderToken=function(h,p,g,y){for(var x=this,S=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,E=this.dom.createFragment(this.element),v,w=0;v=S.exec(y);){var b=v[1],m=v[2],$=v[3],A=v[4],C=v[5];if(!(!x.showSpaces&&m)){var k=w!=v.index?y.slice(w,v.index):"";if(w=v.index+v[0].length,k&&E.appendChild(this.dom.createTextNode(k,this.element)),b){var I=x.session.getScreenTabSize(p+v.index);E.appendChild(x.$tabStrings[I].cloneNode(!0)),p+=I-1}else if(m)if(x.showSpaces){var L=this.dom.createElement("span");L.className="ace_invisible ace_invisible_space",L.textContent=d.stringRepeat(x.SPACE_CHAR,m.length),E.appendChild(L)}else E.appendChild(this.com.createTextNode(m,this.element));else if($){var L=this.dom.createElement("span");L.className="ace_invisible ace_invisible_space ace_invalid",L.textContent=d.stringRepeat(x.SPACE_CHAR,$.length),E.appendChild(L)}else if(A){p+=1;var L=this.dom.createElement("span");L.style.width=x.config.characterWidth*2+"px",L.className=x.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",L.textContent=x.showSpaces?x.SPACE_CHAR:A,E.appendChild(L)}else if(C){p+=1;var L=this.dom.createElement("span");L.style.width=x.config.characterWidth*2+"px",L.className="ace_cjk",L.textContent=C,E.appendChild(L)}}}if(E.appendChild(this.dom.createTextNode(w?y.slice(w):y,this.element)),this.$textToken[g.type])h.appendChild(E);else{var T="ace_"+g.type.replace(/\./g," ace_"),L=this.dom.createElement("span");g.type=="fold"&&(L.style.width=g.value.length*this.config.characterWidth+"px",L.setAttribute("title",u("Unfold code"))),L.className=T,L.appendChild(E),h.appendChild(L)}return p+y.length},f.prototype.renderIndentGuide=function(h,p,g){var y=p.search(this.$indentGuideRe);if(y<=0||y>=g)return p;if(p[0]==" "){y-=y%this.tabSize;for(var x=y/this.tabSize,S=0;S<x;S++)h.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(y)}else if(p[0]==" "){for(var S=0;S<y;S++)h.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),p.substr(y)}return this.$highlightIndentGuide(),p},f.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var h=this.session.doc.$lines;if(h){var p=this.session.selection.getCursor(),g=/^\s*/.exec(this.session.doc.getLine(p.row))[0].length,y=Math.floor(g/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:y,start:p.row};var x=this.session.$bracketHighlight;if(x){for(var S=this.session.$bracketHighlight.ranges,E=0;E<S.length;E++)if(p.row!==S[E].start.row){this.$highlightIndentGuideMarker.end=S[E].start.row,p.row>S[E].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&h[p.row]!==""&&p.column===h[p.row].length){this.$highlightIndentGuideMarker.dir=1;for(var E=p.row+1;E<h.length;E++){var v=h[E],w=/^\s*/.exec(v)[0].length;if(v!==""&&(this.$highlightIndentGuideMarker.end=E,w<=g))break}}this.$renderHighlightIndentGuide()}}},f.prototype.$clearActiveIndentGuide=function(){for(var h=this.$lines.cells,p=0;p<h.length;p++){var g=h[p],y=g.element.childNodes;if(y.length>0){for(var x=0;x<y.length;x++)if(y[x].classList&&y[x].classList.contains("ace_indent-guide-active")){y[x].classList.remove("ace_indent-guide-active");break}}}},f.prototype.$setIndentGuideActive=function(h,p){var g=this.session.doc.getLine(h.row);if(g!==""){var y=h.element.childNodes;if(y){var x=y[p-1];x&&x.classList&&x.classList.contains("ace_indent-guide")&&x.classList.add("ace_indent-guide-active")}}},f.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var h=this.$lines.cells;this.$clearActiveIndentGuide();var p=this.$highlightIndentGuideMarker.indentLevel;if(p!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var g=0;g<h.length;g++){var y=h[g];if(this.$highlightIndentGuideMarker.end&&y.row>=this.$highlightIndentGuideMarker.start+1){if(y.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(y,p)}}else for(var g=h.length-1;g>=0;g--){var y=h[g];if(this.$highlightIndentGuideMarker.end&&y.row<this.$highlightIndentGuideMarker.start){if(y.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(y,p)}}}},f.prototype.$createLineElement=function(h){var p=this.dom.createElement("div");return p.className="ace_line",p.style.height=this.config.lineHeight+"px",p},f.prototype.$renderWrappedLine=function(h,p,g){var y=0,x=0,S=g[0],E=0,v=this.$createLineElement();h.appendChild(v);for(var w=0;w<p.length;w++){var b=p[w],m=b.value;if(w==0&&this.displayIndentGuides){if(y=m.length,m=this.renderIndentGuide(v,m,S),!m)continue;y-=m.length}if(y+m.length<S)E=this.$renderToken(v,E,b,m),y+=m.length;else{for(;y+m.length>=S;)E=this.$renderToken(v,E,b,m.substring(0,S-y)),m=m.substring(S-y),y=S,v=this.$createLineElement(),h.appendChild(v),v.appendChild(this.dom.createTextNode(d.stringRepeat(" ",g.indent),this.element)),x++,E=0,S=g[x]||Number.MAX_VALUE;m.length!=0&&(y+=m.length,E=this.$renderToken(v,E,b,m))}}g[g.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(v,E,null,"",!0)},f.prototype.$renderSimpleLine=function(h,p){for(var g=0,y=0;y<p.length;y++){var x=p[y],S=x.value;if(!(y==0&&this.displayIndentGuides&&(S=this.renderIndentGuide(h,S),!S))){if(g+S.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(h,g,x,S);g=this.$renderToken(h,g,x,S)}}},f.prototype.$renderOverflowMessage=function(h,p,g,y,x){g&&this.$renderToken(h,p,g,y.slice(0,this.MAX_LINE_LENGTH-p));var S=this.dom.createElement("span");S.className="ace_inline_button ace_keyword ace_toggle_wrap",S.textContent=x?"<hide>":"<click to see more...>",h.appendChild(S)},f.prototype.$renderLine=function(h,p,g){if(!g&&g!=!1&&(g=this.session.getFoldLine(p)),g)var y=this.$getFoldLineTokens(p,g);else var y=this.session.getTokens(p);var x=h;if(y.length){var S=this.session.getRowSplitData(p);if(S&&S.length){this.$renderWrappedLine(h,y,S);var x=h.lastChild}else{var x=h;this.$useLineGroups()&&(x=this.$createLineElement(),h.appendChild(x)),this.$renderSimpleLine(x,y)}}else this.$useLineGroups()&&(x=this.$createLineElement(),h.appendChild(x));if(this.showEOL&&x){g&&(p=g.end.row);var E=this.dom.createElement("span");E.className="ace_invisible ace_invisible_eol",E.textContent=p==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,x.appendChild(E)}},f.prototype.$getFoldLineTokens=function(h,p){var g=this.session,y=[];function x(E,v,w){for(var b=0,m=0;m+E[b].value.length<v;)if(m+=E[b].value.length,b++,b==E.length)return;if(m!=v){var $=E[b].value.substring(v-m);$.length>w-v&&($=$.substring(0,w-v)),y.push({type:E[b].type,value:$}),m=v+$.length,b+=1}for(;m<w&&b<E.length;){var $=E[b].value;$.length+m>w?y.push({type:E[b].type,value:$.substring(0,w-m)}):y.push(E[b]),m+=$.length,b+=1}}var S=g.getTokens(h);return p.walk(function(E,v,w,b,m){E!=null?y.push({type:"fold",value:E}):(m&&(S=g.getTokens(v)),S.length&&x(S,b,w))},p.end.row,this.session.getLine(p.end.row).length),y},f.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},f}();l.prototype.$textToken={text:!0,rparen:!0,lparen:!0},l.prototype.EOF_CHAR="¶",l.prototype.EOL_CHAR_LF="¬",l.prototype.EOL_CHAR_CRLF="¤",l.prototype.EOL_CHAR=l.prototype.EOL_CHAR_LF,l.prototype.TAB_CHAR="—",l.prototype.SPACE_CHAR="·",l.prototype.$padding=0,l.prototype.MAX_LINE_LENGTH=1e4,l.prototype.showInvisibles=!1,l.prototype.showSpaces=!1,l.prototype.showTabs=!1,l.prototype.showEOL=!1,l.prototype.displayIndentGuides=!0,l.prototype.$highlightIndentGuides=!0,l.prototype.$tabStrings=[],l.prototype.destroy={},l.prototype.onChangeTabSize=l.prototype.$computeTabString,o.implement(l.prototype,c),r.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(n,r,i){var o=n("../lib/dom"),s=function(){function d(a){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return d.prototype.$updateOpacity=function(a){for(var c=this.cursors,u=c.length;u--;)o.setStyle(c[u].style,"opacity",a?"":"0")},d.prototype.$startCssAnimation=function(){for(var a=this.cursors,c=a.length;c--;)a[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&o.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},d.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,o.removeCssClass(this.element,"ace_animate-blinking")},d.prototype.setPadding=function(a){this.$padding=a},d.prototype.setSession=function(a){this.session=a},d.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},d.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},d.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,o.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},d.prototype.addCursor=function(){var a=o.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},d.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},d.prototype.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},d.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,o.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&o.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),o.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var c=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),c()},this.blinkInterval),c()}},d.prototype.getPixelPosition=function(a,c){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var u=this.session.documentToScreenPosition(a),l=this.$padding+(this.session.$bidiHandler.isBidiRow(u.row,a.row)?this.session.$bidiHandler.getPosLeft(u.column):u.column*this.config.characterWidth),f=(u.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:l,top:f}},d.prototype.isCursorInView=function(a,c){return a.top>=0&&a.top<c.maxHeight},d.prototype.update=function(a){this.config=a;var c=this.session.$selectionMarkers,u=0,l=0;(c===void 0||c.length===0)&&(c=[{cursor:null}]);for(var u=0,f=c.length;u<f;u++){var h=this.getPixelPosition(c[u].cursor,!0);if(!((h.top>a.height+a.offset||h.top<0)&&u>1)){var p=this.cursors[l++]||this.addCursor(),g=p.style;this.drawCursor?this.drawCursor(p,h,a,c[u],this.session):this.isCursorInView(h,a)?(o.setStyle(g,"display","block"),o.translate(p,h.left,h.top),o.setStyle(g,"width",Math.round(a.characterWidth)+"px"),o.setStyle(g,"height",a.lineHeight+"px")):o.setStyle(g,"display","none")}}for(;this.cursors.length>l;)this.removeCursor();var y=this.session.getOverwrite();this.$setOverwrite(y),this.$pixelPos=h,this.restartTimer()},d.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},d.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},d}();s.prototype.$padding=0,s.prototype.drawCursor=null,r.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,i){var o=this&&this.__extends||function(){var p=function(g,y){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,S){x.__proto__=S}||function(x,S){for(var E in S)Object.prototype.hasOwnProperty.call(S,E)&&(x[E]=S[E])},p(g,y)};return function(g,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");p(g,y);function x(){this.constructor=g}g.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}}(),s=n("./lib/oop"),d=n("./lib/dom"),a=n("./lib/event"),c=n("./lib/event_emitter").EventEmitter,u=32768,l=function(){function p(g,y){this.element=d.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+y,this.inner=d.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),g.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return p.prototype.setVisible=function(g){this.element.style.display=g?"":"none",this.isVisible=g,this.coeff=1},p}();s.implement(l.prototype,c);var f=function(p){o(g,p);function g(y,x){var S=p.call(this,y,"-v")||this;return S.scrollTop=0,S.scrollHeight=0,x.$scrollbarWidth=S.width=d.scrollbarWidth(y.ownerDocument),S.inner.style.width=S.element.style.width=(S.width||15)+5+"px",S.$minWidth=0,S}return g.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var y=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-y)/(this.coeff-y)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},g.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},g.prototype.setHeight=function(y){this.element.style.height=y+"px"},g.prototype.setScrollHeight=function(y){this.scrollHeight=y,y>u?(this.coeff=u/y,y=u):this.coeff!=1&&(this.coeff=1),this.inner.style.height=y+"px"},g.prototype.setScrollTop=function(y){this.scrollTop!=y&&(this.skipEvent=!0,this.scrollTop=y,this.element.scrollTop=y*this.coeff)},g}(l);f.prototype.setInnerHeight=f.prototype.setScrollHeight;var h=function(p){o(g,p);function g(y,x){var S=p.call(this,y,"-h")||this;return S.scrollLeft=0,S.height=x.$scrollbarWidth,S.inner.style.height=S.element.style.height=(S.height||15)+5+"px",S}return g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(y){this.element.style.width=y+"px"},g.prototype.setInnerWidth=function(y){this.inner.style.width=y+"px"},g.prototype.setScrollWidth=function(y){this.inner.style.width=y+"px"},g.prototype.setScrollLeft=function(y){this.scrollLeft!=y&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=y)},g}(l);r.ScrollBar=f,r.ScrollBarV=f,r.ScrollBarH=h,r.VScrollBar=f,r.HScrollBar=h}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(n,r,i){var o=this&&this.__extends||function(){var h=function(p,g){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,x){y.__proto__=x}||function(y,x){for(var S in x)Object.prototype.hasOwnProperty.call(x,S)&&(y[S]=x[S])},h(p,g)};return function(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");h(p,g);function y(){this.constructor=p}p.prototype=g===null?Object.create(g):(y.prototype=g.prototype,new y)}}(),s=n("./lib/oop"),d=n("./lib/dom"),a=n("./lib/event"),c=n("./lib/event_emitter").EventEmitter;d.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{
position: absolute;
background: rgba(128, 128, 128, 0.6);
-moz-box-sizing: border-box;
box-sizing: border-box;
border: 1px solid #bbb;
border-radius: 2px;
z-index: 8;
}
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {
position: absolute;
z-index: 6;
background: none;
overflow: hidden!important;
}
.ace_editor>.ace_sb-v {
z-index: 6;
right: 0;
top: 0;
width: 12px;
}
.ace_editor>.ace_sb-v div {
z-index: 8;
right: 0;
width: 100%;
}
.ace_editor>.ace_sb-h {
bottom: 0;
left: 0;
height: 12px;
}
.ace_editor>.ace_sb-h div {
bottom: 0;
height: 100%;
}
.ace_editor>.ace_sb_grabbed {
z-index: 8;
background: #000;
}`,"ace_scrollbar.css",!1);var u=function(){function h(p,g){this.element=d.createElement("div"),this.element.className="ace_sb"+g,this.inner=d.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,p.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return h.prototype.setVisible=function(p){this.element.style.display=p?"":"none",this.isVisible=p,this.coeff=1},h}();s.implement(u.prototype,c);var l=function(h){o(p,h);function p(g,y){var x=h.call(this,g,"-v")||this;return x.scrollTop=0,x.scrollHeight=0,x.parent=g,x.width=x.VScrollWidth,x.renderer=y,x.inner.style.width=x.element.style.width=(x.width||15)+"px",x.$minWidth=0,x}return p.prototype.onMouseDown=function(g,y){if(g==="mousedown"&&!(a.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var x=this,S=y.clientY,E=function(C){S=C.clientY},v=function(){clearInterval($)},w=y.clientY,b=this.thumbTop,m=function(){if(S!==void 0){var C=x.scrollTopFromThumbTop(b+S-w);C!==x.scrollTop&&x._emit("scroll",{data:C})}};a.capture(this.inner,E,v);var $=setInterval(m,20);return a.preventDefault(y)}var A=y.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(A)}),a.preventDefault(y)}},p.prototype.getHeight=function(){return this.height},p.prototype.scrollTopFromThumbTop=function(g){var y=g*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return y=y>>0,y<0?y=0:y>this.pageHeight-this.viewHeight&&(y=this.pageHeight-this.viewHeight),y},p.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},p.prototype.setHeight=function(g){this.height=Math.max(0,g),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},p.prototype.setScrollHeight=function(g,y){this.pageHeight===g&&!y||(this.pageHeight=g,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},p.prototype.setScrollTop=function(g){this.scrollTop=g,g<0&&(g=0),this.thumbTop=g*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},p}(u);l.prototype.setInnerHeight=l.prototype.setScrollHeight;var f=function(h){o(p,h);function p(g,y){var x=h.call(this,g,"-h")||this;return x.scrollLeft=0,x.scrollWidth=0,x.height=x.HScrollHeight,x.inner.style.height=x.element.style.height=(x.height||12)+"px",x.renderer=y,x}return p.prototype.onMouseDown=function(g,y){if(g==="mousedown"&&!(a.getButton(y)!==0||y.detail===2)){if(y.target===this.inner){var x=this,S=y.clientX,E=function(C){S=C.clientX},v=function(){clearInterval($)},w=y.clientX,b=this.thumbLeft,m=function(){if(S!==void 0){var C=x.scrollLeftFromThumbLeft(b+S-w);C!==x.scrollLeft&&x._emit("scroll",{data:C})}};a.capture(this.inner,E,v);var $=setInterval(m,20);return a.preventDefault(y)}var A=y.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(A)}),a.preventDefault(y)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(g){var y=g*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return y=y>>0,y<0?y=0:y>this.pageWidth-this.viewWidth&&(y=this.pageWidth-this.viewWidth),y},p.prototype.setWidth=function(g){this.width=Math.max(0,g),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(g,y){this.pageWidth===g&&!y||(this.pageWidth=g,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},p.prototype.setScrollLeft=function(g){this.scrollLeft=g,g<0&&(g=0),this.thumbLeft=g*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},p}(u);f.prototype.setInnerWidth=f.prototype.setScrollWidth,r.ScrollBar=l,r.ScrollBarV=l,r.ScrollBarH=f,r.VScrollBar=l,r.HScrollBar=f}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(n,r,i){var o=n("./lib/event"),s=function(){function d(a,c){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var u=this;this._flush=function(l){u.pending=!1;var f=u.changes;if(f&&(o.blockIdle(100),u.changes=0,u.onRender(f)),u.changes){if(u.$recursionLimit--<0)return;u.schedule()}else u.$recursionLimit=2}}return d.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(o.nextFrame(this._flush),this.pending=!0)},d.prototype.clear=function(a){var c=this.changes;return this.changes=0,c},d}();r.RenderLoop=s}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(n,r,i){var o=n("../lib/oop"),s=n("../lib/dom"),d=n("../lib/lang"),a=n("../lib/event"),c=n("../lib/useragent"),u=n("../lib/event_emitter").EventEmitter,l=512,f=typeof ResizeObserver=="function",h=200,p=function(){function g(y){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),y.appendChild(this.el),this.$measureNode.textContent=d.stringRepeat("X",l),this.$characterSize={width:0,height:0},f?this.$addObserver():this.checkForSizeChanges()}return g.prototype.$setMeasureNodeStyles=function(y,x){y.width=y.height="auto",y.left=y.top="0px",y.visibility="hidden",y.position="absolute",y.whiteSpace="pre",c.isIE<8?y["font-family"]="inherit":y.font="inherit",y.overflow=x?"hidden":"visible"},g.prototype.checkForSizeChanges=function(y){if(y===void 0&&(y=this.$measureSizes()),y&&(this.$characterSize.width!==y.width||this.$characterSize.height!==y.height)){this.$measureNode.style.fontWeight="bold";var x=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=y,this.charSizes=Object.create(null),this.allowBoldFonts=x&&x.width===y.width&&x.height===y.height,this._emit("changeCharacterSize",{data:y})}},g.prototype.$addObserver=function(){var y=this;this.$observer=new window.ResizeObserver(function(x){y.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},g.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var y=this;return this.$pollSizeChangesTimer=a.onIdle(function x(){y.checkForSizeChanges(),a.onIdle(x,500)},500)},g.prototype.setPolling=function(y){y?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},g.prototype.$measureSizes=function(y){var x={height:(y||this.$measureNode).clientHeight,width:(y||this.$measureNode).clientWidth/l};return x.width===0||x.height===0?null:x},g.prototype.$measureCharWidth=function(y){this.$main.textContent=d.stringRepeat(y,l);var x=this.$main.getBoundingClientRect();return x.width/l},g.prototype.getCharacterWidth=function(y){var x=this.charSizes[y];return x===void 0&&(x=this.charSizes[y]=this.$measureCharWidth(y)/this.$characterSize.width),x},g.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},g.prototype.$getZoom=function(y){return!y||!y.parentElement?1:(window.getComputedStyle(y).zoom||1)*this.$getZoom(y.parentElement)},g.prototype.$initTransformMeasureNodes=function(){var y=function(x,S){return["div",{style:"position: absolute;top:"+x+"px;left:"+S+"px;"}]};this.els=s.buildDom([y(0,0),y(h,0),y(0,h),y(h,h)],this.el)},g.prototype.transformCoordinates=function(y,x){if(y){var S=this.$getZoom(this.el);y=b(1/S,y)}function E(Z,U,X){var W=Z[1]*U[0]-Z[0]*U[1];return[(-U[1]*X[0]+U[0]*X[1])/W,(+Z[1]*X[0]-Z[0]*X[1])/W]}function v(Z,U){return[Z[0]-U[0],Z[1]-U[1]]}function w(Z,U){return[Z[0]+U[0],Z[1]+U[1]]}function b(Z,U){return[Z*U[0],Z*U[1]]}this.els||this.$initTransformMeasureNodes();function m(Z){var U=Z.getBoundingClientRect();return[U.left,U.top]}var $=m(this.els[0]),A=m(this.els[1]),C=m(this.els[2]),k=m(this.els[3]),I=E(v(k,A),v(k,C),v(w(A,C),w(k,$))),L=b(1+I[0],v(A,$)),T=b(1+I[1],v(C,$));if(x){var R=x,P=I[0]*R[0]/h+I[1]*R[1]/h+1,D=w(b(R[0],L),b(R[1],T));return w(b(1/P/h,D),$)}var N=v(y,$),B=E(v(L,b(I[0],N)),v(T,b(I[1],N)),N);return b(h,B)},g}();p.prototype.$characterSize={width:0,height:0},o.implement(p.prototype,u),r.FontMetrics=p}),ace.define("ace/css/editor.css",["require","exports","module"],function(n,r,i){i.exports=`
.ace_br1 {border-top-left-radius : 3px;}
.ace_br2 {border-top-right-radius : 3px;}
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}
.ace_br4 {border-bottom-right-radius: 3px;}
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}
.ace_br8 {border-bottom-left-radius : 3px;}
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}
.ace_editor {
position: relative;
overflow: hidden;
padding: 0;
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace;
direction: ltr;
text-align: left;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.ace_scroller {
position: absolute;
overflow: hidden;
top: 0;
bottom: 0;
background-color: inherit;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
cursor: text;
}
.ace_content {
position: absolute;
box-sizing: border-box;
min-width: 100%;
contain: style size layout;
font-variant-ligatures: no-common-ligatures;
}
.ace_keyboard-focus:focus {
box-shadow: inset 0 0 0 2px #5E9ED6;
outline: none;
}
.ace_dragging .ace_scroller:before{
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
content: '';
background: rgba(250, 250, 250, 0.01);
z-index: 1000;
}
.ace_dragging.ace_dark .ace_scroller:before{
background: rgba(0, 0, 0, 0.01);
}
.ace_gutter {
position: absolute;
overflow : hidden;
width: auto;
top: 0;
bottom: 0;
left: 0;
cursor: default;
z-index: 4;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
contain: style size layout;
}
.ace_gutter-active-line {
position: absolute;
left: 0;
right: 0;
}
.ace_scroller.ace_scroll-left:after {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
pointer-events: none;
}
.ace_gutter-cell, .ace_gutter-cell_svg-icons {
position: absolute;
top: 0;
left: 0;
right: 0;
padding-left: 19px;
padding-right: 6px;
background-repeat: no-repeat;
}
.ace_gutter-cell_svg-icons .ace_gutter_annotation {
margin-left: -14px;
float: left;
}
.ace_gutter-cell .ace_gutter_annotation {
margin-left: -19px;
float: left;
}
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: 2px center;
}
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: 2px center;
}
.ace_gutter-cell.ace_info, .ace_icon.ace_info {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");
background-repeat: no-repeat;
background-position: 2px center;
}
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");
}
.ace_icon_svg.ace_error {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");
background-color: crimson;
}
.ace_icon_svg.ace_warning {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");
background-color: darkorange;
}
.ace_icon_svg.ace_info {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");
background-color: royalblue;
}
.ace_icon_svg.ace_error_fold {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");
background-color: crimson;
}
.ace_icon_svg.ace_warning_fold {
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");
background-color: darkorange;
}
.ace_scrollbar {
contain: strict;
position: absolute;
right: 0;
bottom: 0;
z-index: 6;
}
.ace_scrollbar-inner {
position: absolute;
cursor: text;
left: 0;
top: 0;
}
.ace_scrollbar-v{
overflow-x: hidden;
overflow-y: scroll;
top: 0;
}
.ace_scrollbar-h {
overflow-x: scroll;
overflow-y: hidden;
left: 0;
}
.ace_print-margin {
position: absolute;
height: 100%;
}
.ace_text-input {
position: absolute;
z-index: 0;
width: 0.5em;
height: 1em;
opacity: 0;
background: transparent;
-moz-appearance: none;
appearance: none;
border: none;
resize: none;
outline: none;
overflow: hidden;
font: inherit;
padding: 0 1px;
margin: 0 -1px;
contain: strict;
-ms-user-select: text;
-moz-user-select: text;
-webkit-user-select: text;
user-select: text;
/*with \`pre-line\` chrome inserts &nbsp; instead of space*/
white-space: pre!important;
}
.ace_text-input.ace_composition {
background: transparent;
color: inherit;
z-index: 1000;
opacity: 1;
}
.ace_composition_placeholder { color: transparent }
.ace_composition_marker {
border-bottom: 1px solid;
position: absolute;
border-radius: 0;
margin-top: 1px;
}
[ace_nocontext=true] {
transform: none!important;
filter: none!important;
clip-path: none!important;
mask : none!important;
contain: none!important;
perspective: none!important;
mix-blend-mode: initial!important;
z-index: auto;
}
.ace_layer {
z-index: 1;
position: absolute;
overflow: hidden;
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/
word-wrap: normal;
white-space: pre;
height: 100%;
width: 100%;
box-sizing: border-box;
/* setting pointer-events: auto; on node under the mouse, which changes
during scroll, will break mouse wheel scrolling in Safari */
pointer-events: none;
}
.ace_gutter-layer {
position: relative;
width: auto;
text-align: right;
pointer-events: auto;
height: 1000000px;
contain: style size layout;
}
.ace_text-layer {
font: inherit !important;
position: absolute;
height: 1000000px;
width: 1000000px;
contain: style size layout;
}
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {
contain: style size layout;
position: absolute;
top: 0;
left: 0;
right: 0;
}
.ace_hidpi .ace_text-layer,
.ace_hidpi .ace_gutter-layer,
.ace_hidpi .ace_content,
.ace_hidpi .ace_gutter {
contain: strict;
}
.ace_hidpi .ace_text-layer > .ace_line,
.ace_hidpi .ace_text-layer > .ace_line_group {
contain: strict;
}
.ace_cjk {
display: inline-block;
text-align: center;
}
.ace_cursor-layer {
z-index: 4;
}
.ace_cursor {
z-index: 4;
position: absolute;
box-sizing: border-box;
border-left: 2px solid;
/* workaround for smooth cursor repaintng whole screen in chrome */
transform: translatez(0);
}
.ace_multiselect .ace_cursor {
border-left-width: 1px;
}
.ace_slim-cursors .ace_cursor {
border-left-width: 1px;
}
.ace_overwrite-cursors .ace_cursor {
border-left-width: 0;
border-bottom: 1px solid;
}
.ace_hidden-cursors .ace_cursor {
opacity: 0.2;
}
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {
opacity: 0;
}
.ace_smooth-blinking .ace_cursor {
transition: opacity 0.18s;
}
.ace_animate-blinking .ace_cursor {
animation-duration: 1000ms;
animation-timing-function: step-end;
animation-name: blink-ace-animate;
animation-iteration-count: infinite;
}
.ace_animate-blinking.ace_smooth-blinking .ace_cursor {
animation-duration: 1000ms;
animation-timing-function: ease-in-out;
animation-name: blink-ace-animate-smooth;
}
@keyframes blink-ace-animate {
from, to { opacity: 1; }
60% { opacity: 0; }
}
@keyframes blink-ace-animate-smooth {
from, to { opacity: 1; }
45% { opacity: 1; }
60% { opacity: 0; }
85% { opacity: 0; }
}
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
position: absolute;
z-index: 3;
}
.ace_marker-layer .ace_selection {
position: absolute;
z-index: 5;
}
.ace_marker-layer .ace_bracket {
position: absolute;
z-index: 6;
}
.ace_marker-layer .ace_error_bracket {
position: absolute;
border-bottom: 1px solid #DE5555;
border-radius: 0;
}
.ace_marker-layer .ace_active-line {
position: absolute;
z-index: 2;
}
.ace_marker-layer .ace_selected-word {
position: absolute;
z-index: 4;
box-sizing: border-box;
}
.ace_line .ace_fold {
box-sizing: border-box;
display: inline-block;
height: 11px;
margin-top: -2px;
vertical-align: middle;
background-image:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");
background-repeat: no-repeat, repeat-x;
background-position: center center, top left;
color: transparent;
border: 1px solid black;
border-radius: 2px;
cursor: pointer;
pointer-events: auto;
}
.ace_dark .ace_fold {
}
.ace_fold:hover{
background-image:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");
}
.ace_tooltip {
background-color: #f5f5f5;
border: 1px solid gray;
border-radius: 1px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
color: black;
max-width: 100%;
padding: 3px 4px;
position: fixed;
z-index: 999999;
box-sizing: border-box;
cursor: default;
white-space: pre;
word-wrap: break-word;
line-height: normal;
font-style: normal;
font-weight: normal;
letter-spacing: normal;
pointer-events: none;
}
.ace_tooltip.ace_dark {
background-color: #636363;
color: #fff;
}
.ace_tooltip:focus {
outline: 1px solid #5E9ED6;
}
.ace_icon {
display: inline-block;
width: 18px;
vertical-align: top;
}
.ace_icon_svg {
display: inline-block;
width: 12px;
vertical-align: top;
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 12px;
-webkit-mask-position: center;
}
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {
padding-right: 13px;
}
.ace_fold-widget {
box-sizing: border-box;
margin: 0 -12px 0 1px;
display: none;
width: 11px;
vertical-align: top;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");
background-repeat: no-repeat;
background-position: center;
border-radius: 3px;
border: 1px solid transparent;
cursor: pointer;
}
.ace_folding-enabled .ace_fold-widget {
display: inline-block;
}
.ace_fold-widget.ace_end {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");
}
.ace_fold-widget.ace_closed {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");
}
.ace_fold-widget:hover {
border: 1px solid rgba(0, 0, 0, 0.3);
background-color: rgba(255, 255, 255, 0.2);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
}
.ace_fold-widget:active {
border: 1px solid rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}
/**
* Dark version for fold widgets
*/
.ace_dark .ace_fold-widget {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
}
.ace_dark .ace_fold-widget.ace_end {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget.ace_closed {
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
}
.ace_dark .ace_fold-widget:hover {
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
background-color: rgba(255, 255, 255, 0.1);
}
.ace_dark .ace_fold-widget:active {
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
}
.ace_inline_button {
border: 1px solid lightgray;
display: inline-block;
margin: -1px 8px;
padding: 0 5px;
pointer-events: auto;
cursor: pointer;
}
.ace_inline_button:hover {
border-color: gray;
background: rgba(200,200,200,0.2);
display: inline-block;
pointer-events: auto;
}
.ace_fold-widget.ace_invalid {
background-color: #FFB4B4;
border-color: #DE5555;
}
.ace_fade-fold-widgets .ace_fold-widget {
transition: opacity 0.4s ease 0.05s;
opacity: 0;
}
.ace_fade-fold-widgets:hover .ace_fold-widget {
transition: opacity 0.05s ease 0.05s;
opacity:1;
}
.ace_underline {
text-decoration: underline;
}
.ace_bold {
font-weight: bold;
}
.ace_nobold .ace_bold {
font-weight: normal;
}
.ace_italic {
font-style: italic;
}
.ace_error-marker {
background-color: rgba(255, 0, 0,0.2);
position: absolute;
z-index: 9;
}
.ace_highlight-marker {
background-color: rgba(255, 255, 0,0.2);
position: absolute;
z-index: 8;
}
.ace_mobile-menu {
position: absolute;
line-height: 1.5;
border-radius: 4px;
-ms-user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
background: white;
box-shadow: 1px 3px 2px grey;
border: 1px solid #dcdcdc;
color: black;
}
.ace_dark > .ace_mobile-menu {
background: #333;
color: #ccc;
box-shadow: 1px 3px 2px grey;
border: 1px solid #444;
}
.ace_mobile-button {
padding: 2px;
cursor: pointer;
overflow: hidden;
}
.ace_mobile-button:hover {
background-color: #eee;
opacity:1;
}
.ace_mobile-button:active {
background-color: #ddd;
}
.ace_placeholder {
font-family: arial;
transform: scale(0.9);
transform-origin: left;
white-space: pre;
opacity: 0.7;
margin: 0 10px;
}
.ace_ghost_text {
opacity: 0.5;
font-style: italic;
white-space: pre;
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(n,r,i){var o=n("../lib/dom"),s=n("../lib/oop"),d=n("../lib/event_emitter").EventEmitter,a=function(){function c(u,l){this.canvas=o.createElement("canvas"),this.renderer=l,this.pixelRatio=1,this.maxHeight=l.layerConfig.maxHeight,this.lineHeight=l.layerConfig.lineHeight,this.canvasHeight=u.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=u.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},u.element.appendChild(this.canvas)}return c.prototype.$updateDecorators=function(u){var l=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(u){this.maxHeight=u.maxHeight,this.lineHeight=u.lineHeight,this.canvasHeight=u.height;var f=(u.lastRow+1)*this.lineHeight;f<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var h=this.canvas.getContext("2d");function p(k,I){return k.priority<I.priority?-1:k.priority>I.priority?1:0}var g=this.renderer.session.$annotations;if(h.clearRect(0,0,this.canvas.width,this.canvas.height),g){var y={info:1,warning:2,error:3};g.forEach(function(k){k.priority=y[k.type]||null}),g=g.sort(p);for(var x=this.renderer.session.$foldData,S=0;S<g.length;S++){var E=g[S].row,v=this.compensateFoldRows(E,x),w=Math.round((E-v)*this.lineHeight*this.heightRatio),b=Math.round((E-v)*this.lineHeight*this.heightRatio),m=Math.round(((E-v)*this.lineHeight+this.lineHeight)*this.heightRatio),$=m-b;if($<this.minDecorationHeight){var A=(b+m)/2|0;A<this.halfMinDecorationHeight?A=this.halfMinDecorationHeight:A+this.halfMinDecorationHeight>this.canvasHeight&&(A=this.canvasHeight-this.halfMinDecorationHeight),b=Math.round(A-this.halfMinDecorationHeight),m=Math.round(A+this.halfMinDecorationHeight)}h.fillStyle=l[g[S].type]||null,h.fillRect(0,w,this.canvasWidth,m-b)}}var C=this.renderer.session.selection.getCursor();if(C){var v=this.compensateFoldRows(C.row,x),w=Math.round((C.row-v)*this.lineHeight*this.heightRatio);h.fillStyle="rgba(0, 0, 0, 0.5)",h.fillRect(0,w,this.canvasWidth,2)}},c.prototype.compensateFoldRows=function(u,l){var f=0;if(l&&l.length>0)for(var h=0;h<l.length;h++)u>l[h].start.row&&u<l[h].end.row?f+=u-l[h].start.row:u>=l[h].end.row&&(f+=l[h].end.row-l[h].start.row);return f},c}();s.implement(a.prototype,d),r.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],function(n,r,i){var o=n("./lib/oop"),s=n("./lib/dom"),d=n("./lib/lang"),a=n("./config"),c=n("./layer/gutter").Gutter,u=n("./layer/marker").Marker,l=n("./layer/text").Text,f=n("./layer/cursor").Cursor,h=n("./scrollbar").HScrollBar,p=n("./scrollbar").VScrollBar,g=n("./scrollbar_custom").HScrollBar,y=n("./scrollbar_custom").VScrollBar,x=n("./renderloop").RenderLoop,S=n("./layer/font_metrics").FontMetrics,E=n("./lib/event_emitter").EventEmitter,v=n("./css/editor.css"),w=n("./layer/decorators").Decorator,b=n("./lib/useragent");s.importCssString(v,"ace_editor.css",!1);var m=function(){function $(A,C){var k=this;this.container=A||s.createElement("div"),s.addCssClass(this.container,"ace_editor"),s.HI_DPI&&s.addCssClass(this.container,"ace_hidpi"),this.setTheme(C),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new u(this.content);var I=this.$textLayer=new l(this.content);this.canvas=I.element,this.$markerFront=new u(this.content),this.$cursorLayer=new f(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new p(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",function(L){k.$scrollAnimation||k.session.setScrollTop(L.data-k.scrollMargin.top)}),this.scrollBarH.on("scroll",function(L){k.$scrollAnimation||k.session.setScrollLeft(L.data-k.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new S(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(L){k.updateCharacterSize(),k.onResize(!0,k.gutterWidth,k.$size.width,k.$size.height),k._signal("changeCharacterSize",L)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new x(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return $.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),s.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},$.prototype.setSession=function(A){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=A,A&&this.scrollMargin.top&&A.getScrollTop()<=0&&A.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(A),this.$markerBack.setSession(A),this.$markerFront.setSession(A),this.$gutterLayer.setSession(A),this.$textLayer.setSession(A),A&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},$.prototype.updateLines=function(A,C,k){if(C===void 0&&(C=1/0),this.$changedLines?(this.$changedLines.firstRow>A&&(this.$changedLines.firstRow=A),this.$changedLines.lastRow<C&&(this.$changedLines.lastRow=C)):this.$changedLines={firstRow:A,lastRow:C},this.$changedLines.lastRow<this.layerConfig.firstRow)if(k)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},$.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},$.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},$.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},$.prototype.updateFull=function(A){A?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},$.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},$.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},$.prototype.onResize=function(A,C,k,I){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=A?1:0;var L=this.container;I||(I=L.clientHeight||L.scrollHeight),k||(k=L.clientWidth||L.scrollWidth);var T=this.$updateCachedSize(A,C,k,I);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!k&&!I)return this.resizing=0;A&&(this.$gutterLayer.$padding=null),A?this.$renderChanges(T|this.$changes,!0):this.$loop.schedule(T|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},$.prototype.$updateCachedSize=function(A,C,k,I){I-=this.$extraHeight||0;var L=0,T=this.$size,R={width:T.width,height:T.height,scrollerHeight:T.scrollerHeight,scrollerWidth:T.scrollerWidth};if(I&&(A||T.height!=I)&&(T.height=I,L|=this.CHANGE_SIZE,T.scrollerHeight=T.height,this.$horizScroll&&(T.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(T.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",L=L|this.CHANGE_SCROLL),k&&(A||T.width!=k)){L|=this.CHANGE_SIZE,T.width=k,C==null&&(C=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=C,s.setStyle(this.scrollBarH.element.style,"left",C+"px"),s.setStyle(this.scroller.style,"left",C+this.margin.left+"px"),T.scrollerWidth=Math.max(0,k-C-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var P=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",P),s.setStyle(this.scroller.style,"right",P),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(T.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||A)&&(L|=this.CHANGE_FULL)}return T.$dirty=!k||!I,L&&this._signal("resize",R),L},$.prototype.onGutterResize=function(A){var C=this.$showGutter?A:0;C!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,C,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},$.prototype.adjustWrapLimit=function(){var A=this.$size.scrollerWidth-this.$padding*2,C=Math.floor(A/this.characterWidth);return this.session.adjustWrapLimit(C,this.$showPrintMargin&&this.$printMarginColumn)},$.prototype.setAnimatedScroll=function(A){this.setOption("animatedScroll",A)},$.prototype.getAnimatedScroll=function(){return this.$animatedScroll},$.prototype.setShowInvisibles=function(A){this.setOption("showInvisibles",A),this.session.$bidiHandler.setShowInvisibles(A)},$.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},$.prototype.getDisplayIndentGuide=function(){return this.getOption("displayIndentGuides")},$.prototype.setDisplayIndentGuides=function(A){this.setOption("displayIndentGuides",A)},$.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},$.prototype.setHighlightIndentGuides=function(A){this.setOption("highlightIndentGuides",A)},$.prototype.setShowPrintMargin=function(A){this.setOption("showPrintMargin",A)},$.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},$.prototype.setPrintMarginColumn=function(A){this.setOption("printMarginColumn",A)},$.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},$.prototype.getShowGutter=function(){return this.getOption("showGutter")},$.prototype.setShowGutter=function(A){return this.setOption("showGutter",A)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.setFadeFoldWidgets=function(A){this.setOption("fadeFoldWidgets",A)},$.prototype.setHighlightGutterLine=function(A){this.setOption("highlightGutterLine",A)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var A=s.createElement("div");A.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",A.appendChild(this.$printMarginEl),this.content.insertBefore(A,this.content.firstChild)}var C=this.$printMarginEl.style;C.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",C.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},$.prototype.getContainerElement=function(){return this.container},$.prototype.getMouseEventTarget=function(){return this.scroller},$.prototype.getTextAreaContainer=function(){return this.container},$.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var A=this.textarea.style,C=this.$composition;if(!this.$keepTextAreaAtCursor&&!C){s.translate(this.textarea,-100,0);return}var k=this.$cursorLayer.$pixelPos;if(k){C&&C.markerRange&&(k=this.$cursorLayer.getPixelPosition(C.markerRange.start,!0));var I=this.layerConfig,L=k.top,T=k.left;L-=I.offset;var R=C&&C.useTextareaForIME||b.isMobile?this.lineHeight:1;if(L<0||L>I.height-R){s.translate(this.textarea,0,0);return}var P=1,D=this.$size.height-R;if(!C)L+=this.lineHeight;else if(C.useTextareaForIME){var N=this.textarea.value;P=this.characterWidth*this.session.$getStringScreenWidth(N)[0]}else L+=this.lineHeight+2;T-=this.scrollLeft,T>this.$size.scrollerWidth-P&&(T=this.$size.scrollerWidth-P),T+=this.gutterWidth+this.margin.left,s.setStyle(A,"height",R+"px"),s.setStyle(A,"width",P+"px"),s.translate(this.textarea,Math.min(T,this.$size.scrollerWidth-P),Math.min(L,D))}}},$.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},$.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},$.prototype.getLastFullyVisibleRow=function(){var A=this.layerConfig,C=A.lastRow,k=this.session.documentToScreenRow(C,0)*A.lineHeight;return k-this.session.getScrollTop()>A.height-A.lineHeight?C-1:C},$.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},$.prototype.setPadding=function(A){this.$padding=A,this.$textLayer.setPadding(A),this.$cursorLayer.setPadding(A),this.$markerFront.setPadding(A),this.$markerBack.setPadding(A),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},$.prototype.setScrollMargin=function(A,C,k,I){var L=this.scrollMargin;L.top=A|0,L.bottom=C|0,L.right=I|0,L.left=k|0,L.v=L.top+L.bottom,L.h=L.left+L.right,L.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-L.top),this.updateFull()},$.prototype.setMargin=function(A,C,k,I){var L=this.margin;L.top=A|0,L.bottom=C|0,L.right=I|0,L.left=k|0,L.v=L.top+L.bottom,L.h=L.left+L.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},$.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},$.prototype.setHScrollBarAlwaysVisible=function(A){this.setOption("hScrollBarAlwaysVisible",A)},$.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},$.prototype.setVScrollBarAlwaysVisible=function(A){this.setOption("vScrollBarAlwaysVisible",A)},$.prototype.$updateScrollBarV=function(){var A=this.layerConfig.maxHeight,C=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(A-=(C-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>A-C&&(A=this.scrollTop+C,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(A+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},$.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},$.prototype.freeze=function(){this.$frozen=!0},$.prototype.unfreeze=function(){this.$frozen=!1},$.prototype.$renderChanges=function(A,C){if(this.$changes&&(A|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!A&&!C){this.$changes|=A;return}if(this.$size.$dirty)return this.$changes|=A,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",A),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var k=this.layerConfig;if(A&this.CHANGE_FULL||A&this.CHANGE_SIZE||A&this.CHANGE_TEXT||A&this.CHANGE_LINES||A&this.CHANGE_SCROLL||A&this.CHANGE_H_SCROLL){if(A|=this.$computeLayerConfig()|this.$loop.clear(),k.firstRow!=this.layerConfig.firstRow&&k.firstRowScreen==this.layerConfig.firstRowScreen){var I=this.scrollTop+(k.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;I>0&&(this.scrollTop=I,A=A|this.CHANGE_SCROLL,A|=this.$computeLayerConfig()|this.$loop.clear())}k=this.layerConfig,this.$updateScrollBarV(),A&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-k.offset);var L=k.width+2*this.$padding+"px",T=k.minHeight+"px";s.setStyle(this.content.style,"width",L),s.setStyle(this.content.style,"height",T)}if(A&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-k.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),A&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(k),this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k),this.$markerBack.update(k),this.$markerFront.update(k),this.$cursorLayer.update(k),this.$moveTextAreaToCursor(),this._signal("afterRender",A);return}if(A&this.CHANGE_SCROLL){this.$changedLines=null,A&this.CHANGE_TEXT||A&this.CHANGE_LINES?this.$textLayer.update(k):this.$textLayer.scrollLines(k),this.$showGutter&&(A&this.CHANGE_GUTTER||A&this.CHANGE_LINES?this.$gutterLayer.update(k):this.$gutterLayer.scrollLines(k)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k),this.$markerBack.update(k),this.$markerFront.update(k),this.$cursorLayer.update(k),this.$moveTextAreaToCursor(),this._signal("afterRender",A);return}A&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(k),this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):A&this.CHANGE_LINES?((this.$updateLines()||A&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):A&this.CHANGE_TEXT||A&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)):A&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(k),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(k)),A&this.CHANGE_CURSOR&&(this.$cursorLayer.update(k),this.$moveTextAreaToCursor()),A&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(k),A&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(k),this._signal("afterRender",A)},$.prototype.$autosize=function(){var A=this.session.getScreenLength()*this.lineHeight,C=this.$maxLines*this.lineHeight,k=Math.min(C,Math.max((this.$minLines||1)*this.lineHeight,A))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(k+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&k>this.$maxPixelHeight&&(k=this.$maxPixelHeight);var I=k<=2*this.lineHeight,L=!I&&A>C;if(k!=this.desiredHeight||this.$size.height!=this.desiredHeight||L!=this.$vScroll){L!=this.$vScroll&&(this.$vScroll=L,this.scrollBarV.setVisible(L));var T=this.container.clientWidth;this.container.style.height=k+"px",this.$updateCachedSize(!0,this.$gutterWidth,T,k),this.desiredHeight=k,this._signal("autosize")}},$.prototype.$computeLayerConfig=function(){var A=this.session,C=this.$size,k=C.height<=2*this.lineHeight,I=this.session.getScreenLength(),L=I*this.lineHeight,T=this.$getLongestLine(),R=!k&&(this.$hScrollBarAlwaysVisible||C.scrollerWidth-T-2*this.$padding<0),P=this.$horizScroll!==R;P&&(this.$horizScroll=R,this.scrollBarH.setVisible(R));var D=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var N=C.scrollerHeight+this.lineHeight,B=!this.$maxLines&&this.$scrollPastEnd?(C.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;L+=B;var Z=this.scrollMargin;this.session.setScrollTop(Math.max(-Z.top,Math.min(this.scrollTop,L-C.scrollerHeight+Z.bottom))),this.session.setScrollLeft(Math.max(-Z.left,Math.min(this.scrollLeft,T+2*this.$padding-C.scrollerWidth+Z.right)));var U=!k&&(this.$vScrollBarAlwaysVisible||C.scrollerHeight-L+B<0||this.scrollTop>Z.top),X=D!==U;X&&(this.$vScroll=U,this.scrollBarV.setVisible(U));var W=this.scrollTop%this.lineHeight,q=Math.ceil(N/this.lineHeight)-1,Q=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),G=Q+q,oe,ne,ce=this.lineHeight;Q=A.screenToDocumentRow(Q,0);var fe=A.getFoldLine(Q);fe&&(Q=fe.start.row),oe=A.documentToScreenRow(Q,0),ne=A.getRowLength(Q)*ce,G=Math.min(A.screenToDocumentRow(G,0),A.getLength()-1),N=C.scrollerHeight+A.getRowLength(G)*ce+ne,W=this.scrollTop-oe*ce;var he=0;return(this.layerConfig.width!=T||P)&&(he=this.CHANGE_H_SCROLL),(P||X)&&(he|=this.$updateCachedSize(!0,this.gutterWidth,C.width,C.height),this._signal("scrollbarVisibilityChanged"),X&&(T=this.$getLongestLine())),this.layerConfig={width:T,padding:this.$padding,firstRow:Q,firstRowScreen:oe,lastRow:G,lineHeight:ce,characterWidth:this.characterWidth,minHeight:N,maxHeight:L,offset:W,gutterOffset:ce?Math.max(0,Math.ceil((W+C.height-C.scrollerHeight)/ce)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(T-this.$padding),he},$.prototype.$updateLines=function(){if(this.$changedLines){var A=this.$changedLines.firstRow,C=this.$changedLines.lastRow;this.$changedLines=null;var k=this.layerConfig;if(!(A>k.lastRow+1)&&!(C<k.firstRow)){if(C===1/0){this.$showGutter&&this.$gutterLayer.update(k),this.$textLayer.update(k);return}return this.$textLayer.updateLines(k,A,C),!0}}},$.prototype.$getLongestLine=function(){var A=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(A+=1),this.$textLayer&&A>this.$textLayer.MAX_LINE_LENGTH&&(A=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(A*this.characterWidth))},$.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},$.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},$.prototype.addGutterDecoration=function(A,C){this.$gutterLayer.addGutterDecoration(A,C)},$.prototype.removeGutterDecoration=function(A,C){this.$gutterLayer.removeGutterDecoration(A,C)},$.prototype.updateBreakpoints=function(A){this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.setAnnotations=function(A){this.$gutterLayer.setAnnotations(A),this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},$.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},$.prototype.showCursor=function(){this.$cursorLayer.showCursor()},$.prototype.scrollSelectionIntoView=function(A,C,k){this.scrollCursorIntoView(A,k),this.scrollCursorIntoView(C,k)},$.prototype.scrollCursorIntoView=function(A,C,k){if(this.$size.scrollerHeight!==0){var I=this.$cursorLayer.getPixelPosition(A),L=I.left,T=I.top,R=k&&k.top||0,P=k&&k.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var D=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;D+R>T?(C&&D+R>T+this.lineHeight&&(T-=C*this.$size.scrollerHeight),T===0&&(T=-this.scrollMargin.top),this.session.setScrollTop(T)):D+this.$size.scrollerHeight-P<T+this.lineHeight&&(C&&D+this.$size.scrollerHeight-P<T-this.lineHeight&&(T+=C*this.$size.scrollerHeight),this.session.setScrollTop(T+this.lineHeight+P-this.$size.scrollerHeight));var N=this.scrollLeft,B=2*this.layerConfig.characterWidth;L-B<N?(L-=B,L<this.$padding+B&&(L=-this.scrollMargin.left),this.session.setScrollLeft(L)):(L+=B,N+this.$size.scrollerWidth<L+this.characterWidth?this.session.setScrollLeft(Math.round(L+this.characterWidth-this.$size.scrollerWidth)):N<=this.$padding&&L-N<this.characterWidth&&this.session.setScrollLeft(0))}},$.prototype.getScrollTop=function(){return this.session.getScrollTop()},$.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},$.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},$.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},$.prototype.scrollToRow=function(A){this.session.setScrollTop(A*this.lineHeight)},$.prototype.alignCursor=function(A,C){typeof A=="number"&&(A={row:A,column:0});var k=this.$cursorLayer.getPixelPosition(A),I=this.$size.scrollerHeight-this.lineHeight,L=k.top-I*(C||0);return this.session.setScrollTop(L),L},$.prototype.$calcSteps=function(A,C){var k=0,I=this.STEPS,L=[],T=function(R,P,D){return D*(Math.pow(R-1,3)+1)+P};for(k=0;k<I;++k)L.push(T(k/this.STEPS,A,C-A));return L},$.prototype.scrollToLine=function(A,C,k,I){var L=this.$cursorLayer.getPixelPosition({row:A,column:0}),T=L.top;C&&(T-=this.$size.scrollerHeight/2);var R=this.scrollTop;this.session.setScrollTop(T),k!==!1&&this.animateScrolling(R,I)},$.prototype.animateScrolling=function(A,C){var k=this.scrollTop;if(!this.$animatedScroll)return;var I=this;if(A==k)return;if(this.$scrollAnimation){var L=this.$scrollAnimation.steps;if(L.length&&(A=L[0],A==k))return}var T=I.$calcSteps(A,k);this.$scrollAnimation={from:A,to:k,steps:T},clearInterval(this.$timer),I.session.setScrollTop(T.shift()),I.session.$scrollTop=k;function R(){I.$timer=clearInterval(I.$timer),I.$scrollAnimation=null,I.$stopAnimation=!1,C&&C()}this.$timer=setInterval(function(){if(I.$stopAnimation){R();return}if(!I.session)return clearInterval(I.$timer);T.length?(I.session.setScrollTop(T.shift()),I.session.$scrollTop=k):k!=null?(I.session.$scrollTop=-1,I.session.setScrollTop(k),k=null):R()},10)},$.prototype.scrollToY=function(A){this.scrollTop!==A&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=A)},$.prototype.scrollToX=function(A){this.scrollLeft!==A&&(this.scrollLeft=A),this.$loop.schedule(this.CHANGE_H_SCROLL)},$.prototype.scrollTo=function(A,C){this.session.setScrollTop(C),this.session.setScrollLeft(A)},$.prototype.scrollBy=function(A,C){C&&this.session.setScrollTop(this.session.getScrollTop()+C),A&&this.session.setScrollLeft(this.session.getScrollLeft()+A)},$.prototype.isScrollableBy=function(A,C){if(C<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||C>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||A<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||A>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},$.prototype.pixelToScreenCoordinates=function(A,C){var k;if(this.$hasCssTransforms){k={top:0,left:0};var I=this.$fontMetrics.transformCoordinates([A,C]);A=I[1]-this.gutterWidth-this.margin.left,C=I[0]}else k=this.scroller.getBoundingClientRect();var L=A+this.scrollLeft-k.left-this.$padding,T=L/this.characterWidth,R=Math.floor((C+this.scrollTop-k.top)/this.lineHeight),P=this.$blockCursor?Math.floor(T):Math.round(T);return{row:R,column:P,side:T-P>0?1:-1,offsetX:L}},$.prototype.screenToTextCoordinates=function(A,C){var k;if(this.$hasCssTransforms){k={top:0,left:0};var I=this.$fontMetrics.transformCoordinates([A,C]);A=I[1]-this.gutterWidth-this.margin.left,C=I[0]}else k=this.scroller.getBoundingClientRect();var L=A+this.scrollLeft-k.left-this.$padding,T=L/this.characterWidth,R=this.$blockCursor?Math.floor(T):Math.round(T),P=Math.floor((C+this.scrollTop-k.top)/this.lineHeight);return this.session.screenToDocumentPosition(P,Math.max(R,0),L)},$.prototype.textToScreenCoordinates=function(A,C){var k=this.scroller.getBoundingClientRect(),I=this.session.documentToScreenPosition(A,C),L=this.$padding+(this.session.$bidiHandler.isBidiRow(I.row,A)?this.session.$bidiHandler.getPosLeft(I.column):Math.round(I.column*this.characterWidth)),T=I.row*this.lineHeight;return{pageX:k.left+L-this.scrollLeft,pageY:k.top+T-this.scrollTop}},$.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},$.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},$.prototype.showComposition=function(A){this.$composition=A,A.cssText||(A.cssText=this.textarea.style.cssText),A.useTextareaForIME==null&&(A.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):A.markerId=this.session.addMarker(A.markerRange,"ace_composition_marker","text")},$.prototype.setCompositionText=function(A){var C=this.session.selection.cursor;this.addToken(A,"composition_placeholder",C.row,C.column),this.$moveTextAreaToCursor()},$.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var A=this.session.selection.cursor;this.removeExtraToken(A.row,A.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},$.prototype.setGhostText=function(A,C){var k=this.session.selection.cursor,I=C||{row:k.row,column:k.column};this.removeGhostText();var L=A.split(`
`);this.addToken(L[0],"ghost_text",I.row,I.column),this.$ghostText={text:A,position:{row:I.row,column:I.column}},L.length>1&&(this.$ghostTextWidget={text:L.slice(1).join(`
`),row:I.row,column:I.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},$.prototype.removeGhostText=function(){if(this.$ghostText){var A=this.$ghostText.position;this.removeExtraToken(A.row,A.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},$.prototype.addToken=function(A,C,k,I){var L=this.session;L.bgTokenizer.lines[k]=null;var T={type:C,value:A},R=L.getTokens(k);if(I==null||!R.length)R.push(T);else for(var P=0,D=0;D<R.length;D++){var N=R[D];if(P+=N.value.length,I<=P){var B=N.value.length-(P-I),Z=N.value.slice(0,B),U=N.value.slice(B);R.splice(D,1,{type:N.type,value:Z},T,{type:N.type,value:U});break}}this.updateLines(k,k)},$.prototype.removeExtraToken=function(A,C){this.session.bgTokenizer.lines[A]=null,this.updateLines(A,A)},$.prototype.setTheme=function(A,C){var k=this;if(this.$themeId=A,k._dispatchEvent("themeChange",{theme:A}),!A||typeof A=="string"){var I=A||this.$options.theme.initialValue;a.loadModule(["theme",I],L)}else L(A);function L(T){if(k.$themeId!=A)return C&&C();if(!T||!T.cssClass)throw new Error("couldn't load module "+A+" or it didn't call define");T.$id&&(k.$themeId=T.$id),s.importCssString(T.cssText,T.cssClass,k.container),k.theme&&s.removeCssClass(k.container,k.theme.cssClass);var R="padding"in T?T.padding:"padding"in(k.theme||{})?4:k.$padding;k.$padding&&R!=k.$padding&&k.setPadding(R),k.$theme=T.cssClass,k.theme=T,s.addCssClass(k.container,T.cssClass),s.setCssClass(k.container,"ace_dark",T.isDark),k.$size&&(k.$size.width=0,k.$updateSizeAsync()),k._dispatchEvent("themeLoaded",{theme:T}),C&&C()}},$.prototype.getTheme=function(){return this.$themeId},$.prototype.setStyle=function(A,C){s.setCssClass(this.container,A,C!==!1)},$.prototype.unsetStyle=function(A){s.removeCssClass(this.container,A)},$.prototype.setCursorStyle=function(A){s.setStyle(this.scroller.style,"cursor",A)},$.prototype.setMouseCursor=function(A){s.setStyle(this.scroller.style,"cursor",A)},$.prototype.attachToShadowRoot=function(){s.importCssString(v,"ace_editor.css",this.container)},$.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},$.prototype.$updateCustomScrollbar=function(A){var C=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,A===!0?(this.scrollBarV=new y(this.container,this),this.scrollBarH=new g(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollTop(k.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollLeft(k.data-C.scrollMargin.left)}),this.$scrollDecorator=new w(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new p(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollTop(k.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(k){C.$scrollAnimation||C.session.setScrollLeft(k.data-C.scrollMargin.left)}))},$.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var A=this;this.$resizeTimer=d.delayedCall(function(){A.destroyed||A.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(C){var k=C[0].contentRect.width,I=C[0].contentRect.height;Math.abs(A.$size.width-k)>1||Math.abs(A.$size.height-I)>1?A.$resizeTimer.delay():A.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},$}();m.prototype.CHANGE_CURSOR=1,m.prototype.CHANGE_MARKER=2,m.prototype.CHANGE_GUTTER=4,m.prototype.CHANGE_SCROLL=8,m.prototype.CHANGE_LINES=16,m.prototype.CHANGE_TEXT=32,m.prototype.CHANGE_SIZE=64,m.prototype.CHANGE_MARKER_BACK=128,m.prototype.CHANGE_MARKER_FRONT=256,m.prototype.CHANGE_FULL=512,m.prototype.CHANGE_H_SCROLL=1024,m.prototype.$changes=0,m.prototype.$padding=null,m.prototype.$frozen=!1,m.prototype.STEPS=8,o.implement(m.prototype,E),a.defineOptions(m.prototype,"renderer",{useResizeObserver:{set:function($){!$&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):$&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function($){this.$textLayer.setShowInvisibles($)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function($){typeof $=="number"&&(this.$printMarginColumn=$),this.$showPrintMargin=!!$,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function($){this.$gutter.style.display=$?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function($){this.$gutterLayer.$useSvgGutterIcons=$},initialValue:!1},showFoldedAnnotations:{set:function($){this.$gutterLayer.$showFoldedAnnotations=$},initialValue:!1},fadeFoldWidgets:{set:function($){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",$)},initialValue:!1},showFoldWidgets:{set:function($){this.$gutterLayer.setShowFoldWidgets($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function($){this.$textLayer.setDisplayIndentGuides($)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function($){this.$textLayer.setHighlightIndentGuides($)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function($){this.$gutterLayer.setHighlightGutterLine($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function($){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function($){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function($){typeof $=="number"&&($=$+"px"),this.container.style.fontSize=$,this.updateFontSize()},initialValue:12},fontFamily:{set:function($){this.container.style.fontFamily=$,this.updateFontSize()}},maxLines:{set:function($){this.updateFull()}},minLines:{set:function($){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function($){this.updateFull()},initialValue:0},scrollPastEnd:{set:function($){$=+$||0,this.$scrollPastEnd!=$&&(this.$scrollPastEnd=$,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function($){this.$gutterLayer.$fixedWidth=!!$,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function($){this.$updateCustomScrollbar($)},initialValue:!1},theme:{set:function($){this.setTheme($)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),r.VirtualRenderer=m}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(n,r,i){var o=n("../lib/oop"),s=n("../lib/net"),d=n("../lib/event_emitter").EventEmitter,a=n("../config");function c(h){var p="importScripts('"+s.qualifyURL(h)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,y=new g;return y.append(p),y.getBlob("application/javascript")}}function u(h){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var p=c(h),g=window.URL||window.webkitURL,y=g.createObjectURL(p);return new Worker(y)}return new Worker(h)}var l=function(h){h.postMessage||(h=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=h,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){o.implement(this,d),this.$createWorkerFromOldConfig=function(h,p,g,y,x){if(n.nameToUrl&&!n.toUrl&&(n.toUrl=n.nameToUrl),a.get("packaged")||!n.toUrl)y=y||a.moduleUrl(p,"worker");else{var S=this.$normalizePath;y=y||S(n.toUrl("ace/worker/worker.js",null,"_"));var E={};h.forEach(function(v){E[v]=S(n.toUrl(v,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=u(y),x&&this.send("importScripts",x),this.$worker.postMessage({init:!0,tlns:E,module:p,classname:g}),this.$worker},this.onMessage=function(h){var p=h.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var g=this.callbacks[p.id];g&&(g(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(h){window.console&&console.error&&console.error(h)},this.$normalizePath=function(h){return s.qualifyURL(h)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(h,p){this.$worker.postMessage({command:h,args:p})},this.call=function(h,p,g){if(g){var y=this.callbackId++;this.callbacks[y]=g,p.push(y)}this.send(h,p)},this.emit=function(h,p){try{p.data&&p.data.err&&(p.data.err={message:p.data.err.message,stack:p.data.err.stack,code:p.data.err.code}),this.$worker&&this.$worker.postMessage({event:h,data:{data:p.data}})}catch(g){console.error(g.stack)}},this.attachToDocument=function(h){this.$doc&&this.terminate(),this.$doc=h,this.call("setValue",[h.getValue()]),h.on("change",this.changeListener,!0)},this.changeListener=function(h){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),h.action=="insert"?this.deltaQueue.push(h.start,h.lines):this.deltaQueue.push(h.start,h.end)},this.$sendDeltaQueue=function(){var h=this.deltaQueue;h&&(this.deltaQueue=null,h.length>50&&h.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:h}))}}).call(l.prototype);var f=function(h,p,g){var y=null,x=!1,S=Object.create(d),E=[],v=new l({messageBuffer:E,terminate:function(){},postMessage:function(b){E.push(b),y&&(x?setTimeout(w):w())}});v.setEmitSync=function(b){x=b};var w=function(){var b=E.shift();b.command?y[b.command].apply(y,b.args):b.event&&S._signal(b.event,b.data)};return S.postMessage=function(b){v.onMessage({data:b})},S.callback=function(b,m){this.postMessage({type:"call",id:m,data:b})},S.emit=function(b,m){this.postMessage({type:"event",name:b,data:m})},a.loadModule(["worker",p],function(b){for(y=new b[g](S);E.length;)w()}),v};r.UIWorkerClient=f,r.WorkerClient=l,r.createWorker=u}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(n,r,i){var o=n("./range").Range,s=n("./lib/event_emitter").EventEmitter,d=n("./lib/oop"),a=function(){function c(u,l,f,h,p,g){var y=this;this.length=l,this.session=u,this.doc=u.getDocument(),this.mainClass=p,this.othersClass=g,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=h,this.$onCursorChange=function(){setTimeout(function(){y.onCursorChange()})},this.$pos=f;var x=u.getUndoManager().$undoStack||u.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=x.length,this.setup(),u.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var u=this,l=this.doc,f=this.session;this.selectionBefore=f.selection.toJSON(),f.selection.inMultiSelectMode&&f.selection.toSingleRange(),this.pos=l.createAnchor(this.$pos.row,this.$pos.column);var h=this.pos;h.$insertRight=!0,h.detach(),h.markerId=f.addMarker(new o(h.row,h.column,h.row,h.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(p){var g=l.createAnchor(p.row,p.column);g.$insertRight=!0,g.detach(),u.others.push(g)}),f.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var u=this.session,l=this;this.othersActive=!0,this.others.forEach(function(f){f.markerId=u.addMarker(new o(f.row,f.column,f.row,f.column+l.length),l.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var u=0;u<this.others.length;u++)this.session.removeMarker(this.others[u].markerId)}},c.prototype.onUpdate=function(u){if(this.$updating)return this.updateAnchors(u);var l=u;if(l.start.row===l.end.row&&l.start.row===this.pos.row){this.$updating=!0;var f=u.action==="insert"?l.end.column-l.start.column:l.start.column-l.end.column,h=l.start.column>=this.pos.column&&l.start.column<=this.pos.column+this.length+1,p=l.start.column-this.pos.column;if(this.updateAnchors(u),h&&(this.length+=f),h&&!this.session.$fromUndo){if(u.action==="insert")for(var g=this.others.length-1;g>=0;g--){var y=this.others[g],x={row:y.row,column:y.column+p};this.doc.insertMergedLines(x,u.lines)}else if(u.action==="remove")for(var g=this.others.length-1;g>=0;g--){var y=this.others[g],x={row:y.row,column:y.column+p};this.doc.remove(new o(x.row,x.column,x.row,x.column-f))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(u){this.pos.onChange(u);for(var l=this.others.length;l--;)this.others[l].onChange(u);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var u=this,l=this.session,f=function(p,g){l.removeMarker(p.markerId),p.markerId=l.addMarker(new o(p.row,p.column,p.row,p.column+u.length),g,null,!1)};f(this.pos,this.mainClass);for(var h=this.others.length;h--;)f(this.others[h],this.othersClass)}},c.prototype.onCursorChange=function(u){if(!(this.$updating||!this.session)){var l=this.session.selection.getCursor();l.row===this.pos.row&&l.column>=this.pos.column&&l.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",u)):(this.hideOtherMarkers(),this._emit("cursorLeave",u))}},c.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var u=this.session.getUndoManager(),l=(u.$undoStack||u.$undostack).length-this.$undoStackDepth,f=0;f<l;f++)u.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},c}();d.implement(a.prototype,s),r.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(n,r,i){var o=n("../lib/event"),s=n("../lib/useragent");function d(c,u){return c.row==u.row&&c.column==u.column}function a(c){var u=c.domEvent,l=u.altKey,f=u.shiftKey,h=u.ctrlKey,p=c.getAccelKey(),g=c.getButton();if(h&&s.isMac&&(g=u.button),c.editor.inMultiSelectMode&&g==2){c.editor.textInput.onContextMenu(c.domEvent);return}if(!h&&!l&&!p){g===0&&c.editor.inMultiSelectMode&&c.editor.exitMultiSelectMode();return}if(g===0){var y=c.editor,x=y.selection,S=y.inMultiSelectMode,E=c.getDocumentPosition(),v=x.getCursor(),w=c.inSelection()||x.isEmpty()&&d(E,v),b=c.x,m=c.y,$=function(U){b=U.clientX,m=U.clientY},A=y.session,C=y.renderer.pixelToScreenCoordinates(b,m),k=C,I;if(y.$mouseHandler.$enableJumpToDef)h&&l||p&&l?I=f?"block":"add":l&&y.$blockSelectEnabled&&(I="block");else if(p&&!l){if(I="add",!S&&f)return}else l&&y.$blockSelectEnabled&&(I="block");if(I&&s.isMac&&u.ctrlKey&&y.$mouseHandler.cancelContextMenu(),I=="add"){if(!S&&w)return;if(!S){var L=x.toOrientedRange();y.addSelectionMarker(L)}var T=x.rangeList.rangeAtPoint(E);y.inVirtualSelectionMode=!0,f&&(T=null,L=x.ranges[0]||L,y.removeSelectionMarker(L)),y.once("mouseup",function(){var U=x.toOrientedRange();T&&U.isEmpty()&&d(T.cursor,U.cursor)?x.substractPoint(U.cursor):(f?x.substractPoint(L.cursor):L&&(y.removeSelectionMarker(L),x.addRange(L)),x.addRange(U)),y.inVirtualSelectionMode=!1})}else if(I=="block"){c.stop(),y.inVirtualSelectionMode=!0;var R,P=[],D=function(){var U=y.renderer.pixelToScreenCoordinates(b,m),X=A.screenToDocumentPosition(U.row,U.column,U.offsetX);d(k,U)&&d(X,x.lead)||(k=U,y.selection.moveToPosition(X),y.renderer.scrollCursorIntoView(),y.removeSelectionMarkers(P),P=x.rectangularRangeBlock(k,C),y.$mouseHandler.$clickSelection&&P.length==1&&P[0].isEmpty()&&(P[0]=y.$mouseHandler.$clickSelection.clone()),P.forEach(y.addSelectionMarker,y),y.updateSelectionMarkers())};S&&!p?x.toSingleRange():!S&&p&&(R=x.toOrientedRange(),y.addSelectionMarker(R)),f?C=A.documentToScreenPosition(x.lead):x.moveToPosition(E),k={row:-1,column:-1};var N=function(U){D(),clearInterval(Z),y.removeSelectionMarkers(P),P.length||(P=[x.toOrientedRange()]),R&&(y.removeSelectionMarker(R),x.toSingleRange(R));for(var X=0;X<P.length;X++)x.addRange(P[X]);y.inVirtualSelectionMode=!1,y.$mouseHandler.$clickSelection=null},B=D;o.capture(y.container,$,N);var Z=setInterval(function(){B()},20);return c.preventDefault()}}}r.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(n,r,i){r.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(s){s.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(s){s.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(s){s.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(s){s.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(s){s.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(s){s.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(s){s.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(s){s.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(s){s.multiSelect.rangeCount>1?s.multiSelect.joinSelections():s.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(s){s.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(s){s.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(s){s.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],r.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(s){s.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(s){return s&&s.inMultiSelectMode}}];var o=n("../keyboard/hash_handler").HashHandler;r.keyboardHandler=new o(r.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(n,r,i){var o=n("./range_list").RangeList,s=n("./range").Range,d=n("./selection").Selection,a=n("./mouse/multi_select_handler").onMouseDown,c=n("./lib/event"),u=n("./lib/lang"),l=n("./commands/multi_select_commands");r.commands=l.defaultCommands.concat(l.multiSelectCommands);var f=n("./search").Search,h=new f;function p(v,w,b){return h.$options.wrap=!0,h.$options.needle=w,h.$options.backwards=b==-1,h.find(v)}var g=n("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(g.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(v,w){if(v){if(!this.inMultiSelectMode&&this.rangeCount===0){var b=this.toOrientedRange();if(this.rangeList.add(b),this.rangeList.add(v),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),w||this.fromOrientedRange(v);this.rangeList.removeAll(),this.rangeList.add(b),this.$onAddRange(b)}v.cursor||(v.cursor=v.end);var m=this.rangeList.add(v);return this.$onAddRange(v),m.length&&this.$onRemoveRange(m),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),w||this.fromOrientedRange(v)}},this.toSingleRange=function(v){v=v||this.ranges[0];var w=this.rangeList.removeAll();w.length&&this.$onRemoveRange(w),v&&this.fromOrientedRange(v)},this.substractPoint=function(v){var w=this.rangeList.substractPoint(v);if(w)return this.$onRemoveRange(w),w[0]},this.mergeOverlappingRanges=function(){var v=this.rangeList.merge();v.length&&this.$onRemoveRange(v)},this.$onAddRange=function(v){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(v),this._signal("addRange",{range:v})},this.$onRemoveRange=function(v){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var w=this.rangeList.ranges.pop();v.push(w),this.rangeCount=0}for(var b=v.length;b--;){var m=this.ranges.indexOf(v[b]);this.ranges.splice(m,1)}this._signal("removeRange",{ranges:v}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),w=w||this.ranges[0],w&&!w.isEqual(this.getRange())&&this.fromOrientedRange(w)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new o,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var v=this.ranges.length?this.ranges:[this.getRange()],w=[],b=0;b<v.length;b++){var m=v[b],$=m.start.row,A=m.end.row;if($===A)w.push(m.clone());else{for(w.push(new s($,m.start.column,$,this.session.getLine($).length));++$<A;)w.push(this.getLineRange($,!0));w.push(new s(A,0,A,m.end.column))}b==0&&!this.isBackwards()&&(w=w.reverse())}this.toSingleRange();for(var b=w.length;b--;)this.addRange(w[b])},this.joinSelections=function(){var v=this.rangeList.ranges,w=v[v.length-1],b=s.fromPoints(v[0].start,w.end);this.toSingleRange(),this.setSelectionRange(b,w.cursor==w.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var v=this.rangeList.ranges,w=v[v.length-1],b=s.fromPoints(v[0].start,w.end);this.toSingleRange(),this.setSelectionRange(b,w.cursor==w.start)}else{var m=this.session.documentToScreenPosition(this.cursor),$=this.session.documentToScreenPosition(this.anchor),A=this.rectangularRangeBlock(m,$);A.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(v,w,b){var m=[],$=v.column<w.column;if($)var A=v.column,C=w.column,k=v.offsetX,I=w.offsetX;else var A=w.column,C=v.column,k=w.offsetX,I=v.offsetX;var L=v.row<w.row;if(L)var T=v.row,R=w.row;else var T=w.row,R=v.row;A<0&&(A=0),T<0&&(T=0),T==R&&(b=!0);for(var P,D=T;D<=R;D++){var N=s.fromPoints(this.session.screenToDocumentPosition(D,A,k),this.session.screenToDocumentPosition(D,C,I));if(N.isEmpty()){if(P&&x(N.end,P))break;P=N.end}N.cursor=$?N.start:N.end,m.push(N)}if(L&&m.reverse(),!b){for(var B=m.length-1;m[B].isEmpty()&&B>0;)B--;if(B>0)for(var Z=0;m[Z].isEmpty();)Z++;for(var U=B;U>=Z;U--)m[U].isEmpty()&&m.splice(U,1)}return m}}.call(d.prototype);var y=n("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(v){v.cursor||(v.cursor=v.end);var w=this.getSelectionStyle();return v.marker=this.session.addMarker(v,"ace_selection",w),this.session.$selectionMarkers.push(v),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,v},this.removeSelectionMarker=function(v){if(v.marker){this.session.removeMarker(v.marker);var w=this.session.$selectionMarkers.indexOf(v);w!=-1&&this.session.$selectionMarkers.splice(w,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(v){for(var w=this.session.$selectionMarkers,b=v.length;b--;){var m=v[b];if(m.marker){this.session.removeMarker(m.marker);var $=w.indexOf(m);$!=-1&&w.splice($,1)}}this.session.selectionMarkerCount=w.length},this.$onAddRange=function(v){this.addSelectionMarker(v.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(v){this.removeSelectionMarkers(v.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(v){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(l.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(v){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(l.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(v){var w=v.command,b=v.editor;if(b.multiSelect){if(w.multiSelectAction)w.multiSelectAction=="forEach"?m=b.forEachSelection(w,v.args):w.multiSelectAction=="forEachLine"?m=b.forEachSelection(w,v.args,!0):w.multiSelectAction=="single"?(b.exitMultiSelectMode(),m=w.exec(b,v.args||{})):m=w.multiSelectAction(b,v.args||{});else{var m=w.exec(b,v.args||{});b.multiSelect.addRange(b.multiSelect.toOrientedRange()),b.multiSelect.mergeOverlappingRanges()}return m}},this.forEachSelection=function(v,w,b){if(!this.inVirtualSelectionMode){var m=b&&b.keepOrder,$=b==!0||b&&b.$byLines,A=this.session,C=this.selection,k=C.rangeList,I=(m?C:k).ranges,L;if(!I.length)return v.exec?v.exec(this,w||{}):v(this,w||{});var T=C._eventRegistry;C._eventRegistry={};var R=new d(A);this.inVirtualSelectionMode=!0;for(var P=I.length;P--;){if($)for(;P>0&&I[P].start.row==I[P-1].end.row;)P--;R.fromOrientedRange(I[P]),R.index=P,this.selection=A.selection=R;var D=v.exec?v.exec(this,w||{}):v(this,w||{});!L&&D!==void 0&&(L=D),R.toOrientedRange(I[P])}R.detach(),this.selection=A.selection=C,this.inVirtualSelectionMode=!1,C._eventRegistry=T,C.mergeOverlappingRanges(),C.ranges[0]&&C.fromOrientedRange(C.ranges[0]);var N=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),N&&N.from==N.to&&this.renderer.animateScrolling(N.from),L}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var v="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var w=this.multiSelect.rangeList.ranges,b=[],m=0;m<w.length;m++)b.push(this.session.getTextRange(w[m]));var $=this.session.getDocument().getNewLineCharacter();v=b.join($),v.length==(b.length-1)*$.length&&(v="")}else this.selection.isEmpty()||(v=this.session.getTextRange(this.getSelectionRange()));return v},this.$checkMultiselectChange=function(v,w){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var b=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&w==this.multiSelect.anchor)return;var m=w==this.multiSelect.anchor?b.cursor==b.start?b.end:b.start:b.cursor;m.row!=w.row||this.session.$clipPositionToDocument(m.row,m.column).column!=w.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(v,w,b){if(w=w||{},w.needle=v||w.needle,w.needle==null){var m=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();w.needle=this.session.getTextRange(m)}this.$search.set(w);var $=this.$search.findAll(this.session);if(!$.length)return 0;var A=this.multiSelect;b||A.toSingleRange($[0]);for(var C=$.length;C--;)A.addRange($[C],!0);return m&&A.rangeList.rangeAtPoint(m.start)&&A.addRange(m,!0),$.length},this.selectMoreLines=function(v,w){var b=this.selection.toOrientedRange(),m=b.cursor==b.end,$=this.session.documentToScreenPosition(b.cursor);this.selection.$desiredColumn&&($.column=this.selection.$desiredColumn);var A=this.session.screenToDocumentPosition($.row+v,$.column);if(b.isEmpty())var k=A;else var C=this.session.documentToScreenPosition(m?b.end:b.start),k=this.session.screenToDocumentPosition(C.row+v,C.column);if(m){var I=s.fromPoints(A,k);I.cursor=I.start}else{var I=s.fromPoints(k,A);I.cursor=I.end}if(I.desiredColumn=$.column,!this.selection.inMultiSelectMode)this.selection.addRange(b);else if(w)var L=b.cursor;this.selection.addRange(I),L&&this.selection.substractPoint(L)},this.transposeSelections=function(v){for(var w=this.session,b=w.multiSelect,m=b.ranges,$=m.length;$--;){var A=m[$];if(A.isEmpty()){var C=w.getWordRange(A.start.row,A.start.column);A.start.row=C.start.row,A.start.column=C.start.column,A.end.row=C.end.row,A.end.column=C.end.column}}b.mergeOverlappingRanges();for(var k=[],$=m.length;$--;){var A=m[$];k.unshift(w.getTextRange(A))}v<0?k.unshift(k.pop()):k.push(k.shift());for(var $=m.length;$--;){var A=m[$],C=A.clone();w.replace(A,k[$]),A.start.row=C.start.row,A.start.column=C.start.column}b.fromOrientedRange(b.ranges[0])},this.selectMore=function(v,w,b){var m=this.session,$=m.multiSelect,A=$.toOrientedRange();if(!(A.isEmpty()&&(A=m.getWordRange(A.start.row,A.start.column),A.cursor=v==-1?A.start:A.end,this.multiSelect.addRange(A),b))){var C=m.getTextRange(A),k=p(m,C,v);k&&(k.cursor=v==-1?k.start:k.end,this.session.unfold(k),this.multiSelect.addRange(k),this.renderer.scrollCursorIntoView(null,.5)),w&&this.multiSelect.substractPoint(A.cursor)}},this.alignCursors=function(){var v=this.session,w=v.multiSelect,b=w.ranges,m=-1,$=b.filter(function(B){if(B.cursor.row==m)return!0;m=B.cursor.row});if(!b.length||$.length==b.length-1){var A=this.selection.getRange(),C=A.start.row,k=A.end.row,I=C==k;if(I){var L=this.session.getLength(),T;do T=this.session.getLine(k);while(/[=:]/.test(T)&&++k<L);do T=this.session.getLine(C);while(/[=:]/.test(T)&&--C>0);C<0&&(C=0),k>=L&&(k=L-1)}var R=this.session.removeFullLines(C,k);R=this.$reAlignText(R,I),this.session.insert({row:C,column:0},R.join(`
`)+`
`),I||(A.start.column=0,A.end.column=R[R.length-1].length),this.selection.setRange(A)}else{$.forEach(function(B){w.substractPoint(B.cursor)});var P=0,D=1/0,N=b.map(function(B){var Z=B.cursor,U=v.getLine(Z.row),X=U.substr(Z.column).search(/\S/g);return X==-1&&(X=0),Z.column>P&&(P=Z.column),X<D&&(D=X),X});b.forEach(function(B,Z){var U=B.cursor,X=P-U.column,W=N[Z]-D;X>W?v.insert(U,u.stringRepeat(" ",X-W)):v.remove(new s(U.row,U.column,U.row,U.column-X+W)),B.start.column=B.end.column=P,B.start.row=B.end.row=U.row,B.cursor=B.end}),w.fromOrientedRange(b[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(v,w){var b=!0,m=!0,$,A,C;return v.map(function(R){var P=R.match(/(\s*)(.*?)(\s*)([=:].*)/);return P?$==null?($=P[1].length,A=P[2].length,C=P[3].length,P):($+A+C!=P[1].length+P[2].length+P[3].length&&(m=!1),$!=P[1].length&&(b=!1),$>P[1].length&&($=P[1].length),A<P[2].length&&(A=P[2].length),C>P[3].length&&(C=P[3].length),P):[R]}).map(w?I:b?m?L:I:T);function k(R){return u.stringRepeat(" ",R)}function I(R){return R[2]?k($)+R[2]+k(A-R[2].length+C)+R[4].replace(/^([=:])\s+/,"$1 "):R[0]}function L(R){return R[2]?k($+A-R[2].length)+R[2]+k(C)+R[4].replace(/^([=:])\s+/,"$1 "):R[0]}function T(R){return R[2]?k($)+R[2]+k(C)+R[4].replace(/^([=:])\s+/,"$1 "):R[0]}}}).call(y.prototype);function x(v,w){return v.row==w.row&&v.column==w.column}r.onSessionChange=function(v){var w=v.session;w&&!w.multiSelect&&(w.$selectionMarkers=[],w.selection.$initRangeList(),w.multiSelect=w.selection),this.multiSelect=w&&w.multiSelect;var b=v.oldSession;b&&(b.multiSelect.off("addRange",this.$onAddRange),b.multiSelect.off("removeRange",this.$onRemoveRange),b.multiSelect.off("multiSelect",this.$onMultiSelect),b.multiSelect.off("singleSelect",this.$onSingleSelect),b.multiSelect.lead.off("change",this.$checkMultiselectChange),b.multiSelect.anchor.off("change",this.$checkMultiselectChange)),w&&(w.multiSelect.on("addRange",this.$onAddRange),w.multiSelect.on("removeRange",this.$onRemoveRange),w.multiSelect.on("multiSelect",this.$onMultiSelect),w.multiSelect.on("singleSelect",this.$onSingleSelect),w.multiSelect.lead.on("change",this.$checkMultiselectChange),w.multiSelect.anchor.on("change",this.$checkMultiselectChange)),w&&this.inMultiSelectMode!=w.selection.inMultiSelectMode&&(w.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function S(v){v.$multiselectOnSessionChange||(v.$onAddRange=v.$onAddRange.bind(v),v.$onRemoveRange=v.$onRemoveRange.bind(v),v.$onMultiSelect=v.$onMultiSelect.bind(v),v.$onSingleSelect=v.$onSingleSelect.bind(v),v.$multiselectOnSessionChange=r.onSessionChange.bind(v),v.$checkMultiselectChange=v.$checkMultiselectChange.bind(v),v.$multiselectOnSessionChange(v),v.on("changeSession",v.$multiselectOnSessionChange),v.on("mousedown",a),v.commands.addCommands(l.defaultCommands),E(v))}function E(v){if(!v.textInput)return;var w=v.textInput.getElement(),b=!1;c.addListener(w,"keydown",function($){var A=$.keyCode==18&&!($.ctrlKey||$.shiftKey||$.metaKey);v.$blockSelectEnabled&&A?b||(v.renderer.setMouseCursor("crosshair"),b=!0):b&&m()},v),c.addListener(w,"keyup",m,v),c.addListener(w,"blur",m,v);function m($){b&&(v.renderer.setMouseCursor(""),b=!1)}}r.MultiSelect=S,n("./config").defineOptions(y.prototype,"editor",{enableMultiselect:{set:function(v){S(this),v?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(v){this.$blockSelectEnabled=v},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(n,r,i){var o=n("../../range").Range,s=r.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(d,a,c){var u=d.getLine(c);return this.foldingStartMarker.test(u)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(u)?"end":""},this.getFoldWidgetRange=function(d,a,c){return null},this.indentationBlock=function(d,a,c){var u=/\S/,l=d.getLine(a),f=l.search(u);if(f!=-1){for(var h=c||l.length,p=d.getLength(),g=a,y=a;++a<p;){var x=d.getLine(a).search(u);if(x!=-1){if(x<=f){var S=d.getTokenAt(a,0);if(!S||S.type!=="string")break}y=a}}if(y>g){var E=d.getLine(y).length;return new o(g,h,y,E)}}},this.openingBracketBlock=function(d,a,c,u,l){var f={row:c,column:u+1},h=d.$findClosingBracket(a,f,l);if(h){var p=d.foldWidgets[h.row];return p==null&&(p=d.getFoldWidget(h.row)),p=="start"&&h.row>f.row&&(h.row--,h.column=d.getLine(h.row).length),o.fromPoints(f,h)}},this.closingBracketBlock=function(d,a,c,u,l){var f={row:c,column:u},h=d.$findOpeningBracket(a,f);if(h)return h.column++,f.column--,o.fromPoints(h,f)}}).call(s.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(n,r,i){var o=n("../line_widgets").LineWidgets,s=n("../lib/dom"),d=n("../range").Range,a=n("../config").nls;function c(l,f,h){for(var p=0,g=l.length-1;p<=g;){var y=p+g>>1,x=h(f,l[y]);if(x>0)p=y+1;else if(x<0)g=y-1;else return y}return-(p+1)}function u(l,f,h){var p=l.getAnnotations().sort(d.comparePoints);if(p.length){var g=c(p,{row:f,column:-1},d.comparePoints);g<0&&(g=-g-1),g>=p.length?g=h>0?0:p.length-1:g===0&&h<0&&(g=p.length-1);var y=p[g];if(!(!y||!h)){if(y.row===f){do y=p[g+=h];while(y&&y.row===f);if(!y)return p.slice()}var x=[];f=y.row;do x[h<0?"unshift":"push"](y),y=p[g+=h];while(y&&y.row==f);return x.length&&x}}}r.showErrorMarker=function(l,f){var h=l.session;h.widgetManager||(h.widgetManager=new o(h),h.widgetManager.attach(l));var p=l.getCursorPosition(),g=p.row,y=h.widgetManager.getWidgetsAtRow(g).filter(function(A){return A.type=="errorMarker"})[0];y?y.destroy():g-=f;var x=u(h,g,f),S;if(x){var E=x[0];p.column=(E.pos&&typeof E.column!="number"?E.pos.sc:E.column)||0,p.row=E.row,S=l.renderer.$gutterLayer.$annotations[p.row]}else{if(y)return;S={text:[a("Looks good!")],className:"ace_ok"}}l.session.unfold(p.row),l.selection.moveToPosition(p);var v={row:p.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},w=v.el.appendChild(s.createElement("div")),b=v.el.appendChild(s.createElement("div"));b.className="error_widget_arrow "+S.className;var m=l.renderer.$cursorLayer.getPixelPosition(p).left;b.style.left=m+l.renderer.gutterWidth-5+"px",v.el.className="error_widget_wrapper",w.className="error_widget "+S.className,w.innerHTML=S.text.join("<br>"),w.appendChild(s.createElement("div"));var $=function(A,C,k){if(C===0&&(k==="esc"||k==="return"))return v.destroy(),{command:"null"}};v.destroy=function(){l.$mouseHandler.isMousePressed||(l.keyBinding.removeKeyboardHandler($),h.widgetManager.removeLineWidget(v),l.off("changeSelection",v.destroy),l.off("changeSession",v.destroy),l.off("mouseup",v.destroy),l.off("change",v.destroy))},l.keyBinding.addKeyboardHandler($),l.on("changeSelection",v.destroy),l.on("changeSession",v.destroy),l.on("mouseup",v.destroy),l.on("change",v.destroy),l.session.widgetManager.addLineWidget(v),v.el.onmousedown=l.focus.bind(l),l.renderer.scrollCursorIntoView(null,.5,{bottom:v.el.offsetHeight})},s.importCssString(`
.error_widget_wrapper {
background: inherit;
color: inherit;
border:none
}
.error_widget {
border-top: solid 2px;
border-bottom: solid 2px;
margin: 5px 0;
padding: 10px 40px;
white-space: pre-wrap;
}
.error_widget.ace_error, .error_widget_arrow.ace_error{
border-color: #ff5a5a
}
.error_widget.ace_warning, .error_widget_arrow.ace_warning{
border-color: #F1D817
}
.error_widget.ace_info, .error_widget_arrow.ace_info{
border-color: #5a5a5a
}
.error_widget.ace_ok, .error_widget_arrow.ace_ok{
border-color: #5aaa5a
}
.error_widget_arrow {
position: absolute;
border: solid 5px;
border-top-color: transparent!important;
border-right-color: transparent!important;
border-left-color: transparent!important;
top: -5px;
}
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(n,r,i){n("./loader_build")(r);var o=n("./lib/dom"),s=n("./range").Range,d=n("./editor").Editor,a=n("./edit_session").EditSession,c=n("./undomanager").UndoManager,u=n("./virtual_renderer").VirtualRenderer;n("./worker/worker_client"),n("./keyboard/hash_handler"),n("./placeholder"),n("./multi_select"),n("./mode/folding/fold_mode"),n("./theme/textmate"),n("./ext/error_marker"),r.config=n("./config"),r.edit=function(l,f){if(typeof l=="string"){var h=l;if(l=document.getElementById(h),!l)throw new Error("ace.edit can't find div #"+h)}if(l&&l.env&&l.env.editor instanceof d)return l.env.editor;var p="";if(l&&/input|textarea/i.test(l.tagName)){var g=l;p=g.value,l=o.createElement("pre"),g.parentNode.replaceChild(l,g)}else l&&(p=l.textContent,l.innerHTML="");var y=r.createEditSession(p),x=new d(new u(l),y,f),S={document:y,editor:x,onResize:x.resize.bind(x,null)};return g&&(S.textarea=g),x.on("destroy",function(){S.editor.container.env=null}),x.container.env=x.env=S,x},r.createEditSession=function(l,f){var h=new a(l,f);return h.setUndoManager(new c),h},r.Range=s,r.Editor=d,r.EditSession=a,r.UndoManager=c,r.VirtualRenderer=u,r.version=r.config.version}),function(){ace.require(["ace/ace"],function(n){n&&(n.config.init(!0),n.define=ace.define),window.ace||(window.ace=n);for(var r in n)n.hasOwnProperty(r)&&(window.ace[r]=n[r]);window.ace.default=window.ace,e&&(e.exports=window.ace)})}()})(FM);var Ou=FM.exports,Fu={},Pw={},Jp={exports:{}};Jp.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,d="[object Arguments]",a="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",l="[object Date]",f="[object Error]",h="[object Function]",p="[object GeneratorFunction]",g="[object Map]",y="[object Number]",x="[object Null]",S="[object Object]",E="[object Promise]",v="[object Proxy]",w="[object RegExp]",b="[object Set]",m="[object String]",$="[object Symbol]",A="[object Undefined]",C="[object WeakMap]",k="[object ArrayBuffer]",I="[object DataView]",L="[object Float32Array]",T="[object Float64Array]",R="[object Int8Array]",P="[object Int16Array]",D="[object Int32Array]",N="[object Uint8Array]",B="[object Uint8ClampedArray]",Z="[object Uint16Array]",U="[object Uint32Array]",X=/[\\^$.*+?()[\]{}|]/g,W=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,Q={};Q[L]=Q[T]=Q[R]=Q[P]=Q[D]=Q[N]=Q[B]=Q[Z]=Q[U]=!0,Q[d]=Q[a]=Q[k]=Q[u]=Q[I]=Q[l]=Q[f]=Q[h]=Q[g]=Q[y]=Q[S]=Q[w]=Q[b]=Q[m]=Q[C]=!1;var G=typeof Ue=="object"&&Ue&&Ue.Object===Object&&Ue,oe=typeof self=="object"&&self&&self.Object===Object&&self,ne=G||oe||Function("return this")(),ce=t&&!t.nodeType&&t,fe=ce&&!0&&e&&!e.nodeType&&e,he=fe&&fe.exports===ce,me=he&&G.process,Pe=function(){try{return me&&me.binding&&me.binding("util")}catch{}}(),Ee=Pe&&Pe.isTypedArray;function Ae(ee,le){for(var K=-1,te=ee==null?0:ee.length,de=0,ke=[];++K<te;){var We=ee[K];le(We,K,ee)&&(ke[de++]=We)}return ke}function Fe(ee,le){for(var K=-1,te=le.length,de=ee.length;++K<te;)ee[de+K]=le[K];return ee}function Be(ee,le){for(var K=-1,te=ee==null?0:ee.length;++K<te;)if(le(ee[K],K,ee))return!0;return!1}function lt(ee,le){for(var K=-1,te=Array(ee);++K<ee;)te[K]=le(K);return te}function qt(ee){return function(le){return ee(le)}}function pt(ee,le){return ee.has(le)}function on(ee,le){return ee==null?void 0:ee[le]}function xt(ee){var le=-1,K=Array(ee.size);return ee.forEach(function(te,de){K[++le]=[de,te]}),K}function ve(ee,le){return function(K){return ee(le(K))}}function Se(ee){var le=-1,K=Array(ee.size);return ee.forEach(function(te){K[++le]=te}),K}var be=Array.prototype,De=Function.prototype,ot=Object.prototype,xe=ne["__core-js_shared__"],Re=De.toString,Ve=ot.hasOwnProperty,et=function(){var ee=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||"");return ee?"Symbol(src)_1."+ee:""}(),at=ot.toString,At=RegExp("^"+Re.call(Ve).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),un=he?ne.Buffer:void 0,Dn=ne.Symbol,Dr=ne.Uint8Array,Nr=ot.propertyIsEnumerable,Zs=be.splice,wr=Dn?Dn.toStringTag:void 0,Qs=Object.getOwnPropertySymbols,ai=un?un.isBuffer:void 0,Sr=ve(Object.keys,Object),Uo=li(ne,"DataView"),Nn=li(ne,"Map"),Sn=li(ne,"Promise"),cn=li(ne,"Set"),oo=li(ne,"WeakMap"),ao=li(Object,"create"),Js=ar(Uo),ir=ar(Nn),Ei=ar(Sn),$i=ar(cn),qa=ar(oo),so=Dn?Dn.prototype:void 0,Ya=so?so.valueOf:void 0;function zn(ee){var le=-1,K=ee==null?0:ee.length;for(this.clear();++le<K;){var te=ee[le];this.set(te[0],te[1])}}function qu(){this.__data__=ao?ao(null):{},this.size=0}function el(ee){var le=this.has(ee)&&delete this.__data__[ee];return this.size-=le?1:0,le}function Yu(ee){var le=this.__data__;if(ao){var K=le[ee];return K===r?void 0:K}return Ve.call(le,ee)?le[ee]:void 0}function Xu(ee){var le=this.__data__;return ao?le[ee]!==void 0:Ve.call(le,ee)}function tl(ee,le){var K=this.__data__;return this.size+=this.has(ee)?0:1,K[ee]=ao&&le===void 0?r:le,this}zn.prototype.clear=qu,zn.prototype.delete=el,zn.prototype.get=Yu,zn.prototype.has=Xu,zn.prototype.set=tl;function xn(ee){var le=-1,K=ee==null?0:ee.length;for(this.clear();++le<K;){var te=ee[le];this.set(te[0],te[1])}}function Ti(){this.__data__=[],this.size=0}function nl(ee){var le=this.__data__,K=xr(le,ee);if(K<0)return!1;var te=le.length-1;return K==te?le.pop():Zs.call(le,K,1),--this.size,!0}function Xa(ee){var le=this.__data__,K=xr(le,ee);return K<0?void 0:le[K][1]}function Za(ee){return xr(this.__data__,ee)>-1}function Go(ee,le){var K=this.__data__,te=xr(K,ee);return te<0?(++this.size,K.push([ee,le])):K[te][1]=le,this}xn.prototype.clear=Ti,xn.prototype.delete=nl,xn.prototype.get=Xa,xn.prototype.has=Za,xn.prototype.set=Go;function zr(ee){var le=-1,K=ee==null?0:ee.length;for(this.clear();++le<K;){var te=ee[le];this.set(te[0],te[1])}}function Qa(){this.size=0,this.__data__={hash:new zn,map:new(Nn||xn),string:new zn}}function lo(ee){var le=Zo(this,ee).delete(ee);return this.size-=le?1:0,le}function uo(ee){return Zo(this,ee).get(ee)}function Ko(ee){return Zo(this,ee).has(ee)}function rl(ee,le){var K=Zo(this,ee),te=K.size;return K.set(ee,le),this.size+=K.size==te?0:1,this}zr.prototype.clear=Qa,zr.prototype.delete=lo,zr.prototype.get=uo,zr.prototype.has=Ko,zr.prototype.set=rl;function jr(ee){var le=-1,K=ee==null?0:ee.length;for(this.__data__=new zr;++le<K;)this.add(ee[le])}function il(ee){return this.__data__.set(ee,r),this}function Ja(ee){return this.__data__.has(ee)}jr.prototype.add=jr.prototype.push=il,jr.prototype.has=Ja;function Br(ee){var le=this.__data__=new xn(ee);this.size=le.size}function Zu(){this.__data__=new xn,this.size=0}function es(ee){var le=this.__data__,K=le.delete(ee);return this.size=le.size,K}function ol(ee){return this.__data__.get(ee)}function ts(ee){return this.__data__.has(ee)}function al(ee,le){var K=this.__data__;if(K instanceof xn){var te=K.__data__;if(!Nn||te.length<n-1)return te.push([ee,le]),this.size=++K.size,this;K=this.__data__=new zr(te)}return K.set(ee,le),this.size=K.size,this}Br.prototype.clear=Zu,Br.prototype.delete=es,Br.prototype.get=ol,Br.prototype.has=ts,Br.prototype.set=al;function _n(ee,le){var K=ea(ee),te=!K&&Jo(ee),de=!K&&!te&&di(ee),ke=!K&&!te&&!de&&gl(ee),We=K||te||de||ke,tt=We?lt(ee.length,String):[],nt=tt.length;for(var je in ee)(le||Ve.call(ee,je))&&!(We&&(je=="length"||de&&(je=="offset"||je=="parent")||ke&&(je=="buffer"||je=="byteLength"||je=="byteOffset")||ns(je,nt)))&&tt.push(je);return tt}function xr(ee,le){for(var K=ee.length;K--;)if(Qo(ee[K][0],le))return K;return-1}function qo(ee,le,K){var te=le(ee);return ea(ee)?te:Fe(te,K(ee))}function co(ee){return ee==null?ee===void 0?A:x:wr&&wr in Object(ee)?ui(ee):ho(ee)}function sl(ee){return Li(ee)&&co(ee)==d}function Yo(ee,le,K,te,de){return ee===le?!0:ee==null||le==null||!Li(ee)&&!Li(le)?ee!==ee&&le!==le:ll(ee,le,K,te,Yo,de)}function ll(ee,le,K,te,de,ke){var We=ea(ee),tt=ea(le),nt=We?a:or(ee),je=tt?a:or(le);nt=nt==d?S:nt,je=je==d?S:je;var ct=nt==S,zt=je==S,kt=nt==je;if(kt&&di(ee)){if(!di(le))return!1;We=!0,ct=!1}if(kt&&!ct)return ke||(ke=new Br),We||gl(ee)?ul(ee,le,K,te,de,ke):jn(ee,le,nt,K,te,de,ke);if(!(K&i)){var dn=ct&&Ve.call(ee,"__wrapped__"),_=zt&&Ve.call(le,"__wrapped__");if(dn||_){var M=dn?ee.value():ee,O=_?le.value():le;return ke||(ke=new Br),de(M,O,K,te,ke)}}return kt?(ke||(ke=new Br),cl(ee,le,K,te,de,ke)):!1}function si(ee){if(!pl(ee)||dl(ee))return!1;var le=Hr(ee)?At:W;return le.test(ar(ee))}function Xo(ee){return Li(ee)&&Mi(ee.length)&&!!Q[co(ee)]}function Qu(ee){if(!rs(ee))return Sr(ee);var le=[];for(var K in Object(ee))Ve.call(ee,K)&&K!="constructor"&&le.push(K);return le}function ul(ee,le,K,te,de,ke){var We=K&i,tt=ee.length,nt=le.length;if(tt!=nt&&!(We&&nt>tt))return!1;var je=ke.get(ee);if(je&&ke.get(le))return je==le;var ct=-1,zt=!0,kt=K&o?new jr:void 0;for(ke.set(ee,le),ke.set(le,ee);++ct<tt;){var dn=ee[ct],_=le[ct];if(te)var M=We?te(_,dn,ct,le,ee,ke):te(dn,_,ct,ee,le,ke);if(M!==void 0){if(M)continue;zt=!1;break}if(kt){if(!Be(le,function(O,z){if(!pt(kt,z)&&(dn===O||de(dn,O,K,te,ke)))return kt.push(z)})){zt=!1;break}}else if(!(dn===_||de(dn,_,K,te,ke))){zt=!1;break}}return ke.delete(ee),ke.delete(le),zt}function jn(ee,le,K,te,de,ke,We){switch(K){case I:if(ee.byteLength!=le.byteLength||ee.byteOffset!=le.byteOffset)return!1;ee=ee.buffer,le=le.buffer;case k:return!(ee.byteLength!=le.byteLength||!ke(new Dr(ee),new Dr(le)));case u:case l:case y:return Qo(+ee,+le);case f:return ee.name==le.name&&ee.message==le.message;case w:case m:return ee==le+"";case g:var tt=xt;case b:var nt=te&i;if(tt||(tt=Se),ee.size!=le.size&&!nt)return!1;var je=We.get(ee);if(je)return je==le;te|=o,We.set(ee,le);var ct=ul(tt(ee),tt(le),te,de,ke,We);return We.delete(ee),ct;case $:if(Ya)return Ya.call(ee)==Ya.call(le)}return!1}function cl(ee,le,K,te,de,ke){var We=K&i,tt=Ai(ee),nt=tt.length,je=Ai(le),ct=je.length;if(nt!=ct&&!We)return!1;for(var zt=nt;zt--;){var kt=tt[zt];if(!(We?kt in le:Ve.call(le,kt)))return!1}var dn=ke.get(ee);if(dn&&ke.get(le))return dn==le;var _=!0;ke.set(ee,le),ke.set(le,ee);for(var M=We;++zt<nt;){kt=tt[zt];var O=ee[kt],z=le[kt];if(te)var H=We?te(z,O,kt,le,ee,ke):te(O,z,kt,ee,le,ke);if(!(H===void 0?O===z||de(O,z,K,te,ke):H)){_=!1;break}M||(M=kt=="constructor")}if(_&&!M){var V=ee.constructor,Y=le.constructor;V!=Y&&"constructor"in ee&&"constructor"in le&&!(typeof V=="function"&&V instanceof V&&typeof Y=="function"&&Y instanceof Y)&&(_=!1)}return ke.delete(ee),ke.delete(le),_}function Ai(ee){return qo(ee,ml,ci)}function Zo(ee,le){var K=ee.__data__;return fo(le)?K[typeof le=="string"?"string":"hash"]:K.map}function li(ee,le){var K=on(ee,le);return si(K)?K:void 0}function ui(ee){var le=Ve.call(ee,wr),K=ee[wr];try{ee[wr]=void 0;var te=!0}catch{}var de=at.call(ee);return te&&(le?ee[wr]=K:delete ee[wr]),de}var ci=Qs?function(ee){return ee==null?[]:(ee=Object(ee),Ae(Qs(ee),function(le){return Nr.call(ee,le)}))}:vl,or=co;(Uo&&or(new Uo(new ArrayBuffer(1)))!=I||Nn&&or(new Nn)!=g||Sn&&or(Sn.resolve())!=E||cn&&or(new cn)!=b||oo&&or(new oo)!=C)&&(or=function(ee){var le=co(ee),K=le==S?ee.constructor:void 0,te=K?ar(K):"";if(te)switch(te){case Js:return I;case ir:return g;case Ei:return E;case $i:return b;case qa:return C}return le});function ns(ee,le){return le=le??s,!!le&&(typeof ee=="number"||q.test(ee))&&ee>-1&&ee%1==0&&ee<le}function fo(ee){var le=typeof ee;return le=="string"||le=="number"||le=="symbol"||le=="boolean"?ee!=="__proto__":ee===null}function dl(ee){return!!et&&et in ee}function rs(ee){var le=ee&&ee.constructor,K=typeof le=="function"&&le.prototype||ot;return ee===K}function ho(ee){return at.call(ee)}function ar(ee){if(ee!=null){try{return Re.call(ee)}catch{}try{return ee+""}catch{}}return""}function Qo(ee,le){return ee===le||ee!==ee&&le!==le}var Jo=sl(function(){return arguments}())?sl:function(ee){return Li(ee)&&Ve.call(ee,"callee")&&!Nr.call(ee,"callee")},ea=Array.isArray;function fl(ee){return ee!=null&&Mi(ee.length)&&!Hr(ee)}var di=ai||is;function hl(ee,le){return Yo(ee,le)}function Hr(ee){if(!pl(ee))return!1;var le=co(ee);return le==h||le==p||le==c||le==v}function Mi(ee){return typeof ee=="number"&&ee>-1&&ee%1==0&&ee<=s}function pl(ee){var le=typeof ee;return ee!=null&&(le=="object"||le=="function")}function Li(ee){return ee!=null&&typeof ee=="object"}var gl=Ee?qt(Ee):Xo;function ml(ee){return fl(ee)?_n(ee):Qu(ee)}function vl(){return[]}function is(){return!1}e.exports=hl})(Jp,Jp.exports);var DM=Jp.exports,Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.getAceInstance=Si.debounce=Si.editorEvents=Si.editorOptions=void 0;var uY=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];Si.editorOptions=uY;var cY=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];Si.editorEvents=cY;var dY=function(){var e;return typeof window>"u"?(Ue.window={},e=Ou,delete Ue.window):window.ace?(e=window.ace,e.acequire=window.ace.require||window.ace.acequire):e=Ou,e};Si.getAceInstance=dY;var fY=function(e,t){var n=null;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}};Si.debounce=fY;var hY=Ue&&Ue.__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){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ob=Ue&&Ue.__assign||function(){return ob=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ob.apply(this,arguments)};Object.defineProperty(Pw,"__esModule",{value:!0});var pY=Ou,Ke=im,ok=F,Qf=DM,Ll=Si,ak=(0,Ll.getAceInstance)(),gY=function(e){hY(t,e);function t(n){var r=e.call(this,n)||this;return Ll.editorEvents.forEach(function(i){r[i]=r[i].bind(r)}),r.debounce=Ll.debounce,r}return t.prototype.isInShadow=function(n){for(var r=n&&n.parentNode;r;){if(r.toString()==="[object ShadowRoot]")return!0;r=r.parentNode}return!1},t.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.className,o=r.onBeforeLoad,s=r.onValidate,d=r.mode,a=r.focus,c=r.theme,u=r.fontSize,l=r.value,f=r.defaultValue,h=r.showGutter,p=r.wrapEnabled,g=r.showPrintMargin,y=r.scrollMargin,x=y===void 0?[0,0,0,0]:y,S=r.keyboardHandler,E=r.onLoad,v=r.commands,w=r.annotations,b=r.markers,m=r.placeholder;this.editor=ak.edit(this.refEditor),o&&o(ak);for(var $=Object.keys(this.props.editorProps),A=0;A<$.length;A++)this.editor[$[A]]=this.props.editorProps[$[A]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(x[0],x[1],x[2],x[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof d=="string"?"ace/mode/".concat(d):d),c&&c!==""&&this.editor.setTheme("ace/theme/".concat(c)),this.editor.setFontSize(typeof u=="number"?"".concat(u,"px"):u),this.editor.getSession().setValue(f||l||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(h),this.editor.getSession().setUseWrapMode(p),this.editor.setShowPrintMargin(g),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),m&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),s&&this.editor.getSession().on("changeAnnotation",function(){var k=n.editor.getSession().getAnnotations();n.props.onValidate(k)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(w||[]),b&&b.length>0&&this.handleMarkers(b);var C=this.editor.$options;Ll.editorOptions.forEach(function(k){C.hasOwnProperty(k)?n.editor.setOption(k,n.props[k]):n.props[k]&&console.warn("ReactAce: editor option ".concat(k," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(v)&&v.forEach(function(k){typeof k.exec=="string"?n.editor.commands.bindKey(k.bindKey,k.exec):n.editor.commands.addCommand(k)}),S&&this.editor.setKeyboardHandler("ace/keyboard/"+S),i&&(this.refEditor.className+=" "+i),E&&E(this.editor),this.editor.resize(),a&&this.editor.focus()},t.prototype.componentDidUpdate=function(n){for(var r=n,i=this.props,o=0;o<Ll.editorOptions.length;o++){var s=Ll.editorOptions[o];i[s]!==r[s]&&this.editor.setOption(s,i[s])}if(i.className!==r.className){var d=this.refEditor.className,a=d.trim().split(" "),c=r.className.trim().split(" ");c.forEach(function(f){var h=a.indexOf(f);a.splice(h,1)}),this.refEditor.className=" "+i.className+" "+a.join(" ")}var u=this.editor&&i.value!=null&&this.editor.getValue()!==i.value;if(u){this.silent=!0;var l=this.editor.session.selection.toJSON();this.editor.setValue(i.value,i.cursorStart),this.editor.session.selection.fromJSON(l),this.silent=!1}i.placeholder!==r.placeholder&&this.updatePlaceholder(),i.mode!==r.mode&&this.editor.getSession().setMode(typeof i.mode=="string"?"ace/mode/".concat(i.mode):i.mode),i.theme!==r.theme&&this.editor.setTheme("ace/theme/"+i.theme),i.keyboardHandler!==r.keyboardHandler&&(i.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+i.keyboardHandler):this.editor.setKeyboardHandler(null)),i.fontSize!==r.fontSize&&this.editor.setFontSize(typeof i.fontSize=="number"?"".concat(i.fontSize,"px"):i.fontSize),i.wrapEnabled!==r.wrapEnabled&&this.editor.getSession().setUseWrapMode(i.wrapEnabled),i.showPrintMargin!==r.showPrintMargin&&this.editor.setShowPrintMargin(i.showPrintMargin),i.showGutter!==r.showGutter&&this.editor.renderer.setShowGutter(i.showGutter),Qf(i.setOptions,r.setOptions)||this.handleOptions(i),(u||!Qf(i.annotations,r.annotations))&&this.editor.getSession().setAnnotations(i.annotations||[]),!Qf(i.markers,r.markers)&&Array.isArray(i.markers)&&this.handleMarkers(i.markers),Qf(i.scrollMargin,r.scrollMargin)||this.handleScrollMargins(i.scrollMargin),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!n.focus&&this.editor.focus()},t.prototype.handleScrollMargins=function(n){n===void 0&&(n=[0,0,0,0]),this.editor.renderer.setScrollMargin(n[0],n[1],n[2],n[3])},t.prototype.componentWillUnmount=function(){this.editor&&(this.editor.destroy(),this.editor=null)},t.prototype.onChange=function(n){if(this.props.onChange&&!this.silent){var r=this.editor.getValue();this.props.onChange(r,n)}},t.prototype.onSelectionChange=function(n){if(this.props.onSelectionChange){var r=this.editor.getSelection();this.props.onSelectionChange(r,n)}},t.prototype.onCursorChange=function(n){if(this.props.onCursorChange){var r=this.editor.getSelection();this.props.onCursorChange(r,n)}},t.prototype.onInput=function(n){this.props.onInput&&this.props.onInput(n),this.props.placeholder&&this.updatePlaceholder()},t.prototype.onFocus=function(n){this.props.onFocus&&this.props.onFocus(n,this.editor)},t.prototype.onBlur=function(n){this.props.onBlur&&this.props.onBlur(n,this.editor)},t.prototype.onCopy=function(n){var r=n.text;this.props.onCopy&&this.props.onCopy(r)},t.prototype.onPaste=function(n){var r=n.text;this.props.onPaste&&this.props.onPaste(r)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(n){for(var r=Object.keys(n.setOptions),i=0;i<r.length;i++)this.editor.setOption(r[i],n.setOptions[r[i]])},t.prototype.handleMarkers=function(n){var r=this,i=this.editor.getSession().getMarkers(!0);for(var o in i)i.hasOwnProperty(o)&&this.editor.getSession().removeMarker(i[o].id);i=this.editor.getSession().getMarkers(!1);for(var o in i)i.hasOwnProperty(o)&&i[o].clazz!=="ace_active-line"&&i[o].clazz!=="ace_selected-word"&&this.editor.getSession().removeMarker(i[o].id);n.forEach(function(s){var d=s.startRow,a=s.startCol,c=s.endRow,u=s.endCol,l=s.className,f=s.type,h=s.inFront,p=h===void 0?!1:h,g=new pY.Range(d,a,c,u);r.editor.getSession().addMarker(g,l,f,p)})},t.prototype.updatePlaceholder=function(){var n=this.editor,r=this.props.placeholder,i=!n.session.getValue().length,o=n.renderer.placeholderNode;!i&&o?(n.renderer.scroller.removeChild(n.renderer.placeholderNode),n.renderer.placeholderNode=null):i&&!o?(o=n.renderer.placeholderNode=document.createElement("div"),o.textContent=r||"",o.className="ace_comment ace_placeholder",o.style.padding="0 9px",o.style.position="absolute",o.style.zIndex="3",n.renderer.scroller.appendChild(o)):i&&o&&(o.textContent=r)},t.prototype.updateRef=function(n){this.refEditor=n},t.prototype.render=function(){var n=this.props,r=n.name,i=n.width,o=n.height,s=n.style,d=ob({width:i,height:o},s);return ok.createElement("div",{ref:this.updateRef,id:r,style:d})},t.propTypes={mode:Ke.oneOfType([Ke.string,Ke.object]),focus:Ke.bool,theme:Ke.string,name:Ke.string,className:Ke.string,height:Ke.string,width:Ke.string,fontSize:Ke.oneOfType([Ke.number,Ke.string]),showGutter:Ke.bool,onChange:Ke.func,onCopy:Ke.func,onPaste:Ke.func,onFocus:Ke.func,onInput:Ke.func,onBlur:Ke.func,onScroll:Ke.func,value:Ke.string,defaultValue:Ke.string,onLoad:Ke.func,onSelectionChange:Ke.func,onCursorChange:Ke.func,onBeforeLoad:Ke.func,onValidate:Ke.func,minLines:Ke.number,maxLines:Ke.number,readOnly:Ke.bool,highlightActiveLine:Ke.bool,tabSize:Ke.number,showPrintMargin:Ke.bool,cursorStart:Ke.number,debounceChangePeriod:Ke.number,editorProps:Ke.object,setOptions:Ke.object,style:Ke.object,scrollMargin:Ke.array,annotations:Ke.array,markers:Ke.array,keyboardHandler:Ke.string,wrapEnabled:Ke.bool,enableSnippets:Ke.bool,enableBasicAutocompletion:Ke.oneOfType([Ke.bool,Ke.array]),enableLiveAutocompletion:Ke.oneOfType([Ke.bool,Ke.array]),navigateToFileEnd:Ke.bool,commands:Ke.array,placeholder:Ke.string},t.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},t}(ok.Component);Pw.default=gY;var Iw={},wm={},NM={exports:{}};(function(e,t){ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(n,r,i){var o=n("./lib/oop");n("./lib/lang");var s=n("./lib/event_emitter").EventEmitter,d=n("./editor").Editor,a=n("./virtual_renderer").VirtualRenderer,c=n("./edit_session").EditSession,u=function(l,f,h){this.BELOW=1,this.BESIDE=0,this.$container=l,this.$theme=f,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(h||1),this.$cEditor=this.$editors[0],this.on("focus",function(p){this.$cEditor=p}.bind(this))};(function(){o.implement(this,s),this.$createEditor=function(){var l=document.createElement("div");l.className=this.$editorCSS,l.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(l);var f=new d(new a(l,this.$theme));return f.on("focus",function(){this._emit("focus",f)}.bind(this)),this.$editors.push(f),f.setFontSize(this.$fontSize),f},this.setSplits=function(l){var f;if(l<1)throw"The number of splits have to be > 0!";if(l!=this.$splits){if(l>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<l;)f=this.$editors[this.$splits],this.$container.appendChild(f.container),f.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<l;)this.$createEditor(),this.$splits++}else for(;this.$splits>l;)f=this.$editors[this.$splits-1],this.$container.removeChild(f.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(l){return this.$editors[l]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(l){this.$editors.forEach(function(f){f.setTheme(l)})},this.setKeyboardHandler=function(l){this.$editors.forEach(function(f){f.setKeyboardHandler(l)})},this.forEach=function(l,f){this.$editors.forEach(l,f)},this.$fontSize="",this.setFontSize=function(l){this.$fontSize=l,this.forEach(function(f){f.setFontSize(l)})},this.$cloneSession=function(l){var f=new c(l.getDocument(),l.getMode()),h=l.getUndoManager();return f.setUndoManager(h),f.setTabSize(l.getTabSize()),f.setUseSoftTabs(l.getUseSoftTabs()),f.setOverwrite(l.getOverwrite()),f.setBreakpoints(l.getBreakpoints()),f.setUseWrapMode(l.getUseWrapMode()),f.setUseWorker(l.getUseWorker()),f.setWrapLimitRange(l.$wrapLimitRange.min,l.$wrapLimitRange.max),f.$foldData=l.$cloneFoldData(),f},this.setSession=function(l,f){var h;f==null?h=this.$cEditor:h=this.$editors[f];var p=this.$editors.some(function(g){return g.session===l});return p&&(l=this.$cloneSession(l)),h.setSession(l),l},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(l){this.$orientation!=l&&(this.$orientation=l,this.resize())},this.resize=function(){var l=this.$container.clientWidth,f=this.$container.clientHeight,h;if(this.$orientation==this.BESIDE)for(var p=l/this.$splits,g=0;g<this.$splits;g++)h=this.$editors[g],h.container.style.width=p+"px",h.container.style.top="0px",h.container.style.left=g*p+"px",h.container.style.height=f+"px",h.resize();else for(var y=f/this.$splits,g=0;g<this.$splits;g++)h=this.$editors[g],h.container.style.width=l+"px",h.container.style.top=g*y+"px",h.container.style.left="0px",h.container.style.height=y+"px",h.resize()}}).call(u.prototype),r.Split=u}),ace.define("ace/ext/split",["require","exports","module","ace/split"],function(n,r,i){i.exports=n("../split")}),function(){ace.require(["ace/ext/split"],function(n){e&&(e.exports=n)})}()})(NM);var mY=NM.exports,vY="Expected a function",zM="__lodash_hash_undefined__",jM=1/0,yY="[object Function]",bY="[object GeneratorFunction]",wY="[object Symbol]",SY=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xY=/^\w*$/,_Y=/^\./,CY=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kY=/[\\^$.*+?()[\]{}|]/g,EY=/\\(\\)?/g,$Y=/^\[object .+?Constructor\]$/,TY=typeof Ue=="object"&&Ue&&Ue.Object===Object&&Ue,AY=typeof self=="object"&&self&&self.Object===Object&&self,Ow=TY||AY||Function("return this")();function MY(e,t){return e==null?void 0:e[t]}function LY(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var RY=Array.prototype,PY=Function.prototype,BM=Object.prototype,ty=Ow["__core-js_shared__"],sk=function(){var e=/[^.]+$/.exec(ty&&ty.keys&&ty.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),HM=PY.toString,Fw=BM.hasOwnProperty,VM=BM.toString,IY=RegExp("^"+HM.call(Fw).replace(kY,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lk=Ow.Symbol,OY=RY.splice,FY=WM(Ow,"Map"),Od=WM(Object,"create"),uk=lk?lk.prototype:void 0,ck=uk?uk.toString:void 0;function Ws(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function DY(){this.__data__=Od?Od(null):{}}function NY(e){return this.has(e)&&delete this.__data__[e]}function zY(e){var t=this.__data__;if(Od){var n=t[e];return n===zM?void 0:n}return Fw.call(t,e)?t[e]:void 0}function jY(e){var t=this.__data__;return Od?t[e]!==void 0:Fw.call(t,e)}function BY(e,t){var n=this.__data__;return n[e]=Od&&t===void 0?zM:t,this}Ws.prototype.clear=DY;Ws.prototype.delete=NY;Ws.prototype.get=zY;Ws.prototype.has=jY;Ws.prototype.set=BY;function Ku(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function HY(){this.__data__=[]}function VY(e){var t=this.__data__,n=Sm(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():OY.call(t,n,1),!0}function WY(e){var t=this.__data__,n=Sm(t,e);return n<0?void 0:t[n][1]}function UY(e){return Sm(this.__data__,e)>-1}function GY(e,t){var n=this.__data__,r=Sm(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Ku.prototype.clear=HY;Ku.prototype.delete=VY;Ku.prototype.get=WY;Ku.prototype.has=UY;Ku.prototype.set=GY;function Xs(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function KY(){this.__data__={hash:new Ws,map:new(FY||Ku),string:new Ws}}function qY(e){return xm(this,e).delete(e)}function YY(e){return xm(this,e).get(e)}function XY(e){return xm(this,e).has(e)}function ZY(e,t){return xm(this,e).set(e,t),this}Xs.prototype.clear=KY;Xs.prototype.delete=qY;Xs.prototype.get=YY;Xs.prototype.has=XY;Xs.prototype.set=ZY;function Sm(e,t){for(var n=e.length;n--;)if(lX(e[n][0],t))return n;return-1}function QY(e,t){t=nX(t,e)?[t]:tX(t);for(var n=0,r=t.length;e!=null&&n<r;)e=e[aX(t[n++])];return n&&n==r?e:void 0}function JY(e){if(!GM(e)||iX(e))return!1;var t=uX(e)||LY(e)?IY:$Y;return t.test(sX(e))}function eX(e){if(typeof e=="string")return e;if(Nw(e))return ck?ck.call(e):"";var t=e+"";return t=="0"&&1/e==-jM?"-0":t}function tX(e){return UM(e)?e:oX(e)}function xm(e,t){var n=e.__data__;return rX(t)?n[typeof t=="string"?"string":"hash"]:n.map}function WM(e,t){var n=MY(e,t);return JY(n)?n:void 0}function nX(e,t){if(UM(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Nw(e)?!0:xY.test(e)||!SY.test(e)||t!=null&&e in Object(t)}function rX(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function iX(e){return!!sk&&sk in e}var oX=Dw(function(e){e=dX(e);var t=[];return _Y.test(e)&&t.push(""),e.replace(CY,function(n,r,i,o){t.push(i?o.replace(EY,"$1"):r||n)}),t});function aX(e){if(typeof e=="string"||Nw(e))return e;var t=e+"";return t=="0"&&1/e==-jM?"-0":t}function sX(e){if(e!=null){try{return HM.call(e)}catch{}try{return e+""}catch{}}return""}function Dw(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(vY);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s),s};return n.cache=new(Dw.Cache||Xs),n}Dw.Cache=Xs;function lX(e,t){return e===t||e!==e&&t!==t}var UM=Array.isArray;function uX(e){var t=GM(e)?VM.call(e):"";return t==yY||t==bY}function GM(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function cX(e){return!!e&&typeof e=="object"}function Nw(e){return typeof e=="symbol"||cX(e)&&VM.call(e)==wY}function dX(e){return e==null?"":eX(e)}function fX(e,t,n){var r=e==null?void 0:QY(e,t);return r===void 0?n:r}var hX=fX,pX=Ue&&Ue.__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){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ab=Ue&&Ue.__assign||function(){return ab=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ab.apply(this,arguments)};Object.defineProperty(wm,"__esModule",{value:!0});var hs=Si,ny=(0,hs.getAceInstance)(),gX=Ou,mX=mY,Ze=im,dk=F,ry=DM,yo=hX,vX=function(e){pX(t,e);function t(n){var r=e.call(this,n)||this;return hs.editorEvents.forEach(function(i){r[i]=r[i].bind(r)}),r.debounce=hs.debounce,r}return t.prototype.isInShadow=function(n){for(var r=n&&n.parentNode;r;){if(r.toString()==="[object ShadowRoot]")return!0;r=r.parentNode}return!1},t.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.className,o=r.onBeforeLoad,s=r.mode,d=r.focus,a=r.theme,c=r.fontSize,u=r.value,l=r.defaultValue,f=r.cursorStart,h=r.showGutter,p=r.wrapEnabled,g=r.showPrintMargin,y=r.scrollMargin,x=y===void 0?[0,0,0,0]:y,S=r.keyboardHandler,E=r.onLoad,v=r.commands,w=r.annotations,b=r.markers,m=r.splits;this.editor=ny.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme("ace/theme/".concat(a)),o&&o(ny);var $=Object.keys(this.props.editorProps),A=new mX.Split(this.editor.container,"ace/theme/".concat(a),m);this.editor.env.split=A,this.splitEditor=A.getEditor(0),this.split=A,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);var C=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),A.forEach(function(I,L){for(var T=0;T<$.length;T++)I[$[T]]=n.props.editorProps[$[T]];var R=yo(l,L),P=yo(u,L,"");I.session.setUndoManager(new ny.UndoManager),I.setTheme("ace/theme/".concat(a)),I.renderer.setScrollMargin(x[0],x[1],x[2],x[3]),I.getSession().setMode("ace/mode/".concat(s)),I.setFontSize(c),I.renderer.setShowGutter(h),I.getSession().setUseWrapMode(p),I.setShowPrintMargin(g),I.on("focus",n.onFocus),I.on("blur",n.onBlur),I.on("input",n.onInput),I.on("copy",n.onCopy),I.on("paste",n.onPaste),I.on("change",n.onChange),I.getSession().selection.on("changeSelection",n.onSelectionChange),I.getSession().selection.on("changeCursor",n.onCursorChange),I.session.on("changeScrollTop",n.onScroll),I.setValue(R===void 0?P:R,f);var D=yo(w,L,[]),N=yo(b,L,[]);I.getSession().setAnnotations(D),N&&N.length>0&&n.handleMarkers(N,I);for(var T=0;T<hs.editorOptions.length;T++){var B=hs.editorOptions[T];C.hasOwnProperty(B)?I.setOption(B,n.props[B]):n.props[B]&&console.warn("ReaceAce: editor option ".concat(B," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}n.handleOptions(n.props,I),Array.isArray(v)&&v.forEach(function(Z){typeof Z.exec=="string"?I.commands.bindKey(Z.bindKey,Z.exec):I.commands.addCommand(Z)}),S&&I.setKeyboardHandler("ace/keyboard/"+S)}),i&&(this.refEditor.className+=" "+i),d&&this.splitEditor.focus();var k=this.editor.env.split;k.setOrientation(this.props.orientation==="below"?k.BELOW:k.BESIDE),k.resize(!0),E&&E(k)},t.prototype.componentDidUpdate=function(n){var r=this,i=n,o=this.props,s=this.editor.env.split;if(o.splits!==i.splits&&s.setSplits(o.splits),o.orientation!==i.orientation&&s.setOrientation(o.orientation==="below"?s.BELOW:s.BESIDE),s.forEach(function(u,l){o.mode!==i.mode&&u.getSession().setMode("ace/mode/"+o.mode),o.keyboardHandler!==i.keyboardHandler&&(o.keyboardHandler?u.setKeyboardHandler("ace/keyboard/"+o.keyboardHandler):u.setKeyboardHandler(null)),o.fontSize!==i.fontSize&&u.setFontSize(o.fontSize),o.wrapEnabled!==i.wrapEnabled&&u.getSession().setUseWrapMode(o.wrapEnabled),o.showPrintMargin!==i.showPrintMargin&&u.setShowPrintMargin(o.showPrintMargin),o.showGutter!==i.showGutter&&u.renderer.setShowGutter(o.showGutter);for(var f=0;f<hs.editorOptions.length;f++){var h=hs.editorOptions[f];o[h]!==i[h]&&u.setOption(h,o[h])}ry(o.setOptions,i.setOptions)||r.handleOptions(o,u);var p=yo(o.value,l,"");if(u.getValue()!==p){r.silent=!0;var g=u.session.selection.toJSON();u.setValue(p,o.cursorStart),u.session.selection.fromJSON(g),r.silent=!1}var y=yo(o.annotations,l,[]),x=yo(i.annotations,l,[]);ry(y,x)||u.getSession().setAnnotations(y);var S=yo(o.markers,l,[]),E=yo(i.markers,l,[]);!ry(S,E)&&Array.isArray(S)&&r.handleMarkers(S,u)}),o.className!==i.className){var d=this.refEditor.className,a=d.trim().split(" "),c=i.className.trim().split(" ");c.forEach(function(u){var l=a.indexOf(u);a.splice(l,1)}),this.refEditor.className=" "+o.className+" "+a.join(" ")}o.theme!==i.theme&&s.setTheme("ace/theme/"+o.theme),o.focus&&!i.focus&&this.splitEditor.focus(),(o.height!==this.props.height||o.width!==this.props.width)&&this.editor.resize()},t.prototype.componentWillUnmount=function(){this.editor.destroy(),this.editor=null},t.prototype.onChange=function(n){if(this.props.onChange&&!this.silent){var r=[];this.editor.env.split.forEach(function(i){r.push(i.getValue())}),this.props.onChange(r,n)}},t.prototype.onSelectionChange=function(n){if(this.props.onSelectionChange){var r=[];this.editor.env.split.forEach(function(i){r.push(i.getSelection())}),this.props.onSelectionChange(r,n)}},t.prototype.onCursorChange=function(n){if(this.props.onCursorChange){var r=[];this.editor.env.split.forEach(function(i){r.push(i.getSelection())}),this.props.onCursorChange(r,n)}},t.prototype.onFocus=function(n){this.props.onFocus&&this.props.onFocus(n)},t.prototype.onInput=function(n){this.props.onInput&&this.props.onInput(n)},t.prototype.onBlur=function(n){this.props.onBlur&&this.props.onBlur(n)},t.prototype.onCopy=function(n){this.props.onCopy&&this.props.onCopy(n)},t.prototype.onPaste=function(n){this.props.onPaste&&this.props.onPaste(n)},t.prototype.onScroll=function(){this.props.onScroll&&this.props.onScroll(this.editor)},t.prototype.handleOptions=function(n,r){for(var i=Object.keys(n.setOptions),o=0;o<i.length;o++)r.setOption(i[o],n.setOptions[i[o]])},t.prototype.handleMarkers=function(n,r){var i=r.getSession().getMarkers(!0);for(var o in i)i.hasOwnProperty(o)&&r.getSession().removeMarker(i[o].id);i=r.getSession().getMarkers(!1);for(var o in i)i.hasOwnProperty(o)&&r.getSession().removeMarker(i[o].id);n.forEach(function(s){var d=s.startRow,a=s.startCol,c=s.endRow,u=s.endCol,l=s.className,f=s.type,h=s.inFront,p=h===void 0?!1:h,g=new gX.Range(d,a,c,u);r.getSession().addMarker(g,l,f,p)})},t.prototype.updateRef=function(n){this.refEditor=n},t.prototype.render=function(){var n=this.props,r=n.name,i=n.width,o=n.height,s=n.style,d=ab({width:i,height:o},s);return dk.createElement("div",{ref:this.updateRef,id:r,style:d})},t.propTypes={className:Ze.string,debounceChangePeriod:Ze.number,defaultValue:Ze.arrayOf(Ze.string),focus:Ze.bool,fontSize:Ze.oneOfType([Ze.number,Ze.string]),height:Ze.string,mode:Ze.string,name:Ze.string,onBlur:Ze.func,onChange:Ze.func,onCopy:Ze.func,onFocus:Ze.func,onInput:Ze.func,onLoad:Ze.func,onPaste:Ze.func,onScroll:Ze.func,orientation:Ze.string,showGutter:Ze.bool,splits:Ze.number,theme:Ze.string,value:Ze.arrayOf(Ze.string),width:Ze.string,onSelectionChange:Ze.func,onCursorChange:Ze.func,onBeforeLoad:Ze.func,minLines:Ze.number,maxLines:Ze.number,readOnly:Ze.bool,highlightActiveLine:Ze.bool,tabSize:Ze.number,showPrintMargin:Ze.bool,cursorStart:Ze.number,editorProps:Ze.object,setOptions:Ze.object,style:Ze.object,scrollMargin:Ze.array,annotations:Ze.array,markers:Ze.array,keyboardHandler:Ze.string,wrapEnabled:Ze.bool,enableBasicAutocompletion:Ze.oneOfType([Ze.bool,Ze.array]),enableLiveAutocompletion:Ze.oneOfType([Ze.bool,Ze.array]),commands:Ze.array},t.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},t}(dk.Component);wm.default=vX;var KM={exports:{}};(function(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,i=0;t.Diff=function(o,s){return[o,s]},t.prototype.diff_main=function(o,s,d,a){typeof a>"u"&&(this.Diff_Timeout<=0?a=Number.MAX_VALUE:a=new Date().getTime()+this.Diff_Timeout*1e3);var c=a;if(o==null||s==null)throw new Error("Null input. (diff_main)");if(o==s)return o?[new t.Diff(i,o)]:[];typeof d>"u"&&(d=!0);var u=d,l=this.diff_commonPrefix(o,s),f=o.substring(0,l);o=o.substring(l),s=s.substring(l),l=this.diff_commonSuffix(o,s);var h=o.substring(o.length-l);o=o.substring(0,o.length-l),s=s.substring(0,s.length-l);var p=this.diff_compute_(o,s,u,c);return f&&p.unshift(new t.Diff(i,f)),h&&p.push(new t.Diff(i,h)),this.diff_cleanupMerge(p),p},t.prototype.diff_compute_=function(o,s,d,a){var c;if(!o)return[new t.Diff(r,s)];if(!s)return[new t.Diff(n,o)];var u=o.length>s.length?o:s,l=o.length>s.length?s:o,f=u.indexOf(l);if(f!=-1)return c=[new t.Diff(r,u.substring(0,f)),new t.Diff(i,l),new t.Diff(r,u.substring(f+l.length))],o.length>s.length&&(c[0][0]=c[2][0]=n),c;if(l.length==1)return[new t.Diff(n,o),new t.Diff(r,s)];var h=this.diff_halfMatch_(o,s);if(h){var p=h[0],g=h[1],y=h[2],x=h[3],S=h[4],E=this.diff_main(p,y,d,a),v=this.diff_main(g,x,d,a);return E.concat([new t.Diff(i,S)],v)}return d&&o.length>100&&s.length>100?this.diff_lineMode_(o,s,a):this.diff_bisect_(o,s,a)},t.prototype.diff_lineMode_=function(o,s,d){var a=this.diff_linesToChars_(o,s);o=a.chars1,s=a.chars2;var c=a.lineArray,u=this.diff_main(o,s,!1,d);this.diff_charsToLines_(u,c),this.diff_cleanupSemantic(u),u.push(new t.Diff(i,""));for(var l=0,f=0,h=0,p="",g="";l<u.length;){switch(u[l][0]){case r:h++,g+=u[l][1];break;case n:f++,p+=u[l][1];break;case i:if(f>=1&&h>=1){u.splice(l-f-h,f+h),l=l-f-h;for(var y=this.diff_main(p,g,!1,d),x=y.length-1;x>=0;x--)u.splice(l,0,y[x]);l=l+y.length}h=0,f=0,p="",g="";break}l++}return u.pop(),u},t.prototype.diff_bisect_=function(o,s,d){for(var a=o.length,c=s.length,u=Math.ceil((a+c)/2),l=u,f=2*u,h=new Array(f),p=new Array(f),g=0;g<f;g++)h[g]=-1,p[g]=-1;h[l+1]=0,p[l+1]=0;for(var y=a-c,x=y%2!=0,S=0,E=0,v=0,w=0,b=0;b<u&&!(new Date().getTime()>d);b++){for(var m=-b+S;m<=b-E;m+=2){var $=l+m,A;m==-b||m!=b&&h[$-1]<h[$+1]?A=h[$+1]:A=h[$-1]+1;for(var C=A-m;A<a&&C<c&&o.charAt(A)==s.charAt(C);)A++,C++;if(h[$]=A,A>a)E+=2;else if(C>c)S+=2;else if(x){var k=l+y-m;if(k>=0&&k<f&&p[k]!=-1){var I=a-p[k];if(A>=I)return this.diff_bisectSplit_(o,s,A,C,d)}}}for(var L=-b+v;L<=b-w;L+=2){var k=l+L,I;L==-b||L!=b&&p[k-1]<p[k+1]?I=p[k+1]:I=p[k-1]+1;for(var T=I-L;I<a&&T<c&&o.charAt(a-I-1)==s.charAt(c-T-1);)I++,T++;if(p[k]=I,I>a)w+=2;else if(T>c)v+=2;else if(!x){var $=l+y-L;if($>=0&&$<f&&h[$]!=-1){var A=h[$],C=l+A-$;if(I=a-I,A>=I)return this.diff_bisectSplit_(o,s,A,C,d)}}}}return[new t.Diff(n,o),new t.Diff(r,s)]},t.prototype.diff_bisectSplit_=function(o,s,d,a,c){var u=o.substring(0,d),l=s.substring(0,a),f=o.substring(d),h=s.substring(a),p=this.diff_main(u,l,!1,c),g=this.diff_main(f,h,!1,c);return p.concat(g)},t.prototype.diff_linesToChars_=function(o,s){var d=[],a={};d[0]="";function c(h){for(var p="",g=0,y=-1,x=d.length;y<h.length-1;){y=h.indexOf(`
`,g),y==-1&&(y=h.length-1);var S=h.substring(g,y+1);(a.hasOwnProperty?a.hasOwnProperty(S):a[S]!==void 0)?p+=String.fromCharCode(a[S]):(x==u&&(S=h.substring(g),y=h.length),p+=String.fromCharCode(x),a[S]=x,d[x++]=S),g=y+1}return p}var u=4e4,l=c(o);u=65535;var f=c(s);return{chars1:l,chars2:f,lineArray:d}},t.prototype.diff_charsToLines_=function(o,s){for(var d=0;d<o.length;d++){for(var a=o[d][1],c=[],u=0;u<a.length;u++)c[u]=s[a.charCodeAt(u)];o[d][1]=c.join("")}},t.prototype.diff_commonPrefix=function(o,s){if(!o||!s||o.charAt(0)!=s.charAt(0))return 0;for(var d=0,a=Math.min(o.length,s.length),c=a,u=0;d<c;)o.substring(u,c)==s.substring(u,c)?(d=c,u=d):a=c,c=Math.floor((a-d)/2+d);return c},t.prototype.diff_commonSuffix=function(o,s){if(!o||!s||o.charAt(o.length-1)!=s.charAt(s.length-1))return 0;for(var d=0,a=Math.min(o.length,s.length),c=a,u=0;d<c;)o.substring(o.length-c,o.length-u)==s.substring(s.length-c,s.length-u)?(d=c,u=d):a=c,c=Math.floor((a-d)/2+d);return c},t.prototype.diff_commonOverlap_=function(o,s){var d=o.length,a=s.length;if(d==0||a==0)return 0;d>a?o=o.substring(d-a):d<a&&(s=s.substring(0,d));var c=Math.min(d,a);if(o==s)return c;for(var u=0,l=1;;){var f=o.substring(c-l),h=s.indexOf(f);if(h==-1)return u;l+=h,(h==0||o.substring(c-l)==s.substring(0,l))&&(u=l,l++)}},t.prototype.diff_halfMatch_=function(o,s){if(this.Diff_Timeout<=0)return null;var d=o.length>s.length?o:s,a=o.length>s.length?s:o;if(d.length<4||a.length*2<d.length)return null;var c=this;function u(E,v,w){for(var b=E.substring(w,w+Math.floor(E.length/4)),m=-1,$="",A,C,k,I;(m=v.indexOf(b,m+1))!=-1;){var L=c.diff_commonPrefix(E.substring(w),v.substring(m)),T=c.diff_commonSuffix(E.substring(0,w),v.substring(0,m));$.length<T+L&&($=v.substring(m-T,m)+v.substring(m,m+L),A=E.substring(0,w-T),C=E.substring(w+L),k=v.substring(0,m-T),I=v.substring(m+L))}return $.length*2>=E.length?[A,C,k,I,$]:null}var l=u(d,a,Math.ceil(d.length/4)),f=u(d,a,Math.ceil(d.length/2)),h;if(!l&&!f)return null;f?l?h=l[4].length>f[4].length?l:f:h=f:h=l;var p,g,y,x;o.length>s.length?(p=h[0],g=h[1],y=h[2],x=h[3]):(y=h[0],x=h[1],p=h[2],g=h[3]);var S=h[4];return[p,g,y,x,S]},t.prototype.diff_cleanupSemantic=function(o){for(var s=!1,d=[],a=0,c=null,u=0,l=0,f=0,h=0,p=0;u<o.length;)o[u][0]==i?(d[a++]=u,l=h,f=p,h=0,p=0,c=o[u][1]):(o[u][0]==r?h+=o[u][1].length:p+=o[u][1].length,c&&c.length<=Math.max(l,f)&&c.length<=Math.max(h,p)&&(o.splice(d[a-1],0,new t.Diff(n,c)),o[d[a-1]+1][0]=r,a--,a--,u=a>0?d[a-1]:-1,l=0,f=0,h=0,p=0,c=null,s=!0)),u++;for(s&&this.diff_cleanupMerge(o),this.diff_cleanupSemanticLossless(o),u=1;u<o.length;){if(o[u-1][0]==n&&o[u][0]==r){var g=o[u-1][1],y=o[u][1],x=this.diff_commonOverlap_(g,y),S=this.diff_commonOverlap_(y,g);x>=S?(x>=g.length/2||x>=y.length/2)&&(o.splice(u,0,new t.Diff(i,y.substring(0,x))),o[u-1][1]=g.substring(0,g.length-x),o[u+1][1]=y.substring(x),u++):(S>=g.length/2||S>=y.length/2)&&(o.splice(u,0,new t.Diff(i,g.substring(0,S))),o[u-1][0]=r,o[u-1][1]=y.substring(0,y.length-S),o[u+1][0]=n,o[u+1][1]=g.substring(S),u++),u++}u++}},t.prototype.diff_cleanupSemanticLossless=function(o){function s(S,E){if(!S||!E)return 6;var v=S.charAt(S.length-1),w=E.charAt(0),b=v.match(t.nonAlphaNumericRegex_),m=w.match(t.nonAlphaNumericRegex_),$=b&&v.match(t.whitespaceRegex_),A=m&&w.match(t.whitespaceRegex_),C=$&&v.match(t.linebreakRegex_),k=A&&w.match(t.linebreakRegex_),I=C&&S.match(t.blanklineEndRegex_),L=k&&E.match(t.blanklineStartRegex_);return I||L?5:C||k?4:b&&!$&&A?3:$||A?2:b||m?1:0}for(var d=1;d<o.length-1;){if(o[d-1][0]==i&&o[d+1][0]==i){var a=o[d-1][1],c=o[d][1],u=o[d+1][1],l=this.diff_commonSuffix(a,c);if(l){var f=c.substring(c.length-l);a=a.substring(0,a.length-l),c=f+c.substring(0,c.length-l),u=f+u}for(var h=a,p=c,g=u,y=s(a,c)+s(c,u);c.charAt(0)===u.charAt(0);){a+=c.charAt(0),c=c.substring(1)+u.charAt(0),u=u.substring(1);var x=s(a,c)+s(c,u);x>=y&&(y=x,h=a,p=c,g=u)}o[d-1][1]!=h&&(h?o[d-1][1]=h:(o.splice(d-1,1),d--),o[d][1]=p,g?o[d+1][1]=g:(o.splice(d+1,1),d--))}d++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(o){for(var s=!1,d=[],a=0,c=null,u=0,l=!1,f=!1,h=!1,p=!1;u<o.length;)o[u][0]==i?(o[u][1].length<this.Diff_EditCost&&(h||p)?(d[a++]=u,l=h,f=p,c=o[u][1]):(a=0,c=null),h=p=!1):(o[u][0]==n?p=!0:h=!0,c&&(l&&f&&h&&p||c.length<this.Diff_EditCost/2&&l+f+h+p==3)&&(o.splice(d[a-1],0,new t.Diff(n,c)),o[d[a-1]+1][0]=r,a--,c=null,l&&f?(h=p=!0,a=0):(a--,u=a>0?d[a-1]:-1,h=p=!1),s=!0)),u++;s&&this.diff_cleanupMerge(o)},t.prototype.diff_cleanupMerge=function(o){o.push(new t.Diff(i,""));for(var s=0,d=0,a=0,c="",u="",l;s<o.length;)switch(o[s][0]){case r:a++,u+=o[s][1],s++;break;case n:d++,c+=o[s][1],s++;break;case i:d+a>1?(d!==0&&a!==0&&(l=this.diff_commonPrefix(u,c),l!==0&&(s-d-a>0&&o[s-d-a-1][0]==i?o[s-d-a-1][1]+=u.substring(0,l):(o.splice(0,0,new t.Diff(i,u.substring(0,l))),s++),u=u.substring(l),c=c.substring(l)),l=this.diff_commonSuffix(u,c),l!==0&&(o[s][1]=u.substring(u.length-l)+o[s][1],u=u.substring(0,u.length-l),c=c.substring(0,c.length-l))),s-=d+a,o.splice(s,d+a),c.length&&(o.splice(s,0,new t.Diff(n,c)),s++),u.length&&(o.splice(s,0,new t.Diff(r,u)),s++),s++):s!==0&&o[s-1][0]==i?(o[s-1][1]+=o[s][1],o.splice(s,1)):s++,a=0,d=0,c="",u="";break}o[o.length-1][1]===""&&o.pop();var f=!1;for(s=1;s<o.length-1;)o[s-1][0]==i&&o[s+1][0]==i&&(o[s][1].substring(o[s][1].length-o[s-1][1].length)==o[s-1][1]?(o[s][1]=o[s-1][1]+o[s][1].substring(0,o[s][1].length-o[s-1][1].length),o[s+1][1]=o[s-1][1]+o[s+1][1],o.splice(s-1,1),f=!0):o[s][1].substring(0,o[s+1][1].length)==o[s+1][1]&&(o[s-1][1]+=o[s+1][1],o[s][1]=o[s][1].substring(o[s+1][1].length)+o[s+1][1],o.splice(s+1,1),f=!0)),s++;f&&this.diff_cleanupMerge(o)},t.prototype.diff_xIndex=function(o,s){var d=0,a=0,c=0,u=0,l;for(l=0;l<o.length&&(o[l][0]!==r&&(d+=o[l][1].length),o[l][0]!==n&&(a+=o[l][1].length),!(d>s));l++)c=d,u=a;return o.length!=l&&o[l][0]===n?u:u+(s-c)},t.prototype.diff_prettyHtml=function(o){for(var s=[],d=/&/g,a=/</g,c=/>/g,u=/\n/g,l=0;l<o.length;l++){var f=o[l][0],h=o[l][1],p=h.replace(d,"&amp;").replace(a,"&lt;").replace(c,"&gt;").replace(u,"&para;<br>");switch(f){case r:s[l]='<ins style="background:#e6ffe6;">'+p+"</ins>";break;case n:s[l]='<del style="background:#ffe6e6;">'+p+"</del>";break;case i:s[l]="<span>"+p+"</span>";break}}return s.join("")},t.prototype.diff_text1=function(o){for(var s=[],d=0;d<o.length;d++)o[d][0]!==r&&(s[d]=o[d][1]);return s.join("")},t.prototype.diff_text2=function(o){for(var s=[],d=0;d<o.length;d++)o[d][0]!==n&&(s[d]=o[d][1]);return s.join("")},t.prototype.diff_levenshtein=function(o){for(var s=0,d=0,a=0,c=0;c<o.length;c++){var u=o[c][0],l=o[c][1];switch(u){case r:d+=l.length;break;case n:a+=l.length;break;case i:s+=Math.max(d,a),d=0,a=0;break}}return s+=Math.max(d,a),s},t.prototype.diff_toDelta=function(o){for(var s=[],d=0;d<o.length;d++)switch(o[d][0]){case r:s[d]="+"+encodeURI(o[d][1]);break;case n:s[d]="-"+o[d][1].length;break;case i:s[d]="="+o[d][1].length;break}return s.join(" ").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(o,s){for(var d=[],a=0,c=0,u=s.split(/\t/g),l=0;l<u.length;l++){var f=u[l].substring(1);switch(u[l].charAt(0)){case"+":try{d[a++]=new t.Diff(r,decodeURI(f))}catch{throw new Error("Illegal escape in diff_fromDelta: "+f)}break;case"-":case"=":var h=parseInt(f,10);if(isNaN(h)||h<0)throw new Error("Invalid number in diff_fromDelta: "+f);var p=o.substring(c,c+=h);u[l].charAt(0)=="="?d[a++]=new t.Diff(i,p):d[a++]=new t.Diff(n,p);break;default:if(u[l])throw new Error("Invalid diff operation in diff_fromDelta: "+u[l])}}if(c!=o.length)throw new Error("Delta length ("+c+") does not equal source text length ("+o.length+").");return d},t.prototype.match_main=function(o,s,d){if(o==null||s==null||d==null)throw new Error("Null input. (match_main)");return d=Math.max(0,Math.min(d,o.length)),o==s?0:o.length?o.substring(d,d+s.length)==s?d:this.match_bitap_(o,s,d):-1},t.prototype.match_bitap_=function(o,s,d){if(s.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var a=this.match_alphabet_(s),c=this;function u(A,C){var k=A/s.length,I=Math.abs(d-C);return c.Match_Distance?k+I/c.Match_Distance:I?1:k}var l=this.Match_Threshold,f=o.indexOf(s,d);f!=-1&&(l=Math.min(u(0,f),l),f=o.lastIndexOf(s,d+s.length),f!=-1&&(l=Math.min(u(0,f),l)));var h=1<<s.length-1;f=-1;for(var p,g,y=s.length+o.length,x,S=0;S<s.length;S++){for(p=0,g=y;p<g;)u(S,d+g)<=l?p=g:y=g,g=Math.floor((y-p)/2+p);y=g;var E=Math.max(1,d-g+1),v=Math.min(d+g,o.length)+s.length,w=Array(v+2);w[v+1]=(1<<S)-1;for(var b=v;b>=E;b--){var m=a[o.charAt(b-1)];if(S===0?w[b]=(w[b+1]<<1|1)&m:w[b]=(w[b+1]<<1|1)&m|((x[b+1]|x[b])<<1|1)|x[b+1],w[b]&h){var $=u(S,b-1);if($<=l)if(l=$,f=b-1,f>d)E=Math.max(1,2*d-f);else break}}if(u(S+1,d)>l)break;x=w}return f},t.prototype.match_alphabet_=function(o){for(var s={},d=0;d<o.length;d++)s[o.charAt(d)]=0;for(var d=0;d<o.length;d++)s[o.charAt(d)]|=1<<o.length-d-1;return s},t.prototype.patch_addContext_=function(o,s){if(s.length!=0){if(o.start2===null)throw Error("patch not initialized");for(var d=s.substring(o.start2,o.start2+o.length1),a=0;s.indexOf(d)!=s.lastIndexOf(d)&&d.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)a+=this.Patch_Margin,d=s.substring(o.start2-a,o.start2+o.length1+a);a+=this.Patch_Margin;var c=s.substring(o.start2-a,o.start2);c&&o.diffs.unshift(new t.Diff(i,c));var u=s.substring(o.start2+o.length1,o.start2+o.length1+a);u&&o.diffs.push(new t.Diff(i,u)),o.start1-=c.length,o.start2-=c.length,o.length1+=c.length+u.length,o.length2+=c.length+u.length}},t.prototype.patch_make=function(o,s,d){var a,c;if(typeof o=="string"&&typeof s=="string"&&typeof d>"u")a=o,c=this.diff_main(a,s,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(o&&typeof o=="object"&&typeof s>"u"&&typeof d>"u")c=o,a=this.diff_text1(c);else if(typeof o=="string"&&s&&typeof s=="object"&&typeof d>"u")a=o,c=s;else if(typeof o=="string"&&typeof s=="string"&&d&&typeof d=="object")a=o,c=d;else throw new Error("Unknown call format to patch_make.");if(c.length===0)return[];for(var u=[],l=new t.patch_obj,f=0,h=0,p=0,g=a,y=a,x=0;x<c.length;x++){var S=c[x][0],E=c[x][1];switch(!f&&S!==i&&(l.start1=h,l.start2=p),S){case r:l.diffs[f++]=c[x],l.length2+=E.length,y=y.substring(0,p)+E+y.substring(p);break;case n:l.length1+=E.length,l.diffs[f++]=c[x],y=y.substring(0,p)+y.substring(p+E.length);break;case i:E.length<=2*this.Patch_Margin&&f&&c.length!=x+1?(l.diffs[f++]=c[x],l.length1+=E.length,l.length2+=E.length):E.length>=2*this.Patch_Margin&&f&&(this.patch_addContext_(l,g),u.push(l),l=new t.patch_obj,f=0,g=y,h=p);break}S!==r&&(h+=E.length),S!==n&&(p+=E.length)}return f&&(this.patch_addContext_(l,g),u.push(l)),u},t.prototype.patch_deepCopy=function(o){for(var s=[],d=0;d<o.length;d++){var a=o[d],c=new t.patch_obj;c.diffs=[];for(var u=0;u<a.diffs.length;u++)c.diffs[u]=new t.Diff(a.diffs[u][0],a.diffs[u][1]);c.start1=a.start1,c.start2=a.start2,c.length1=a.length1,c.length2=a.length2,s[d]=c}return s},t.prototype.patch_apply=function(o,s){if(o.length==0)return[s,[]];o=this.patch_deepCopy(o);var d=this.patch_addPadding(o);s=d+s+d,this.patch_splitMax(o);for(var a=0,c=[],u=0;u<o.length;u++){var l=o[u].start2+a,f=this.diff_text1(o[u].diffs),h,p=-1;if(f.length>this.Match_MaxBits?(h=this.match_main(s,f.substring(0,this.Match_MaxBits),l),h!=-1&&(p=this.match_main(s,f.substring(f.length-this.Match_MaxBits),l+f.length-this.Match_MaxBits),(p==-1||h>=p)&&(h=-1))):h=this.match_main(s,f,l),h==-1)c[u]=!1,a-=o[u].length2-o[u].length1;else{c[u]=!0,a=h-l;var g;if(p==-1?g=s.substring(h,h+f.length):g=s.substring(h,p+this.Match_MaxBits),f==g)s=s.substring(0,h)+this.diff_text2(o[u].diffs)+s.substring(h+f.length);else{var y=this.diff_main(f,g,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(y)/f.length>this.Patch_DeleteThreshold)c[u]=!1;else{this.diff_cleanupSemanticLossless(y);for(var x=0,S,E=0;E<o[u].diffs.length;E++){var v=o[u].diffs[E];v[0]!==i&&(S=this.diff_xIndex(y,x)),v[0]===r?s=s.substring(0,h+S)+v[1]+s.substring(h+S):v[0]===n&&(s=s.substring(0,h+S)+s.substring(h+this.diff_xIndex(y,x+v[1].length))),v[0]!==n&&(x+=v[1].length)}}}}}return s=s.substring(d.length,s.length-d.length),[s,c]},t.prototype.patch_addPadding=function(o){for(var s=this.Patch_Margin,d="",a=1;a<=s;a++)d+=String.fromCharCode(a);for(var a=0;a<o.length;a++)o[a].start1+=s,o[a].start2+=s;var c=o[0],u=c.diffs;if(u.length==0||u[0][0]!=i)u.unshift(new t.Diff(i,d)),c.start1-=s,c.start2-=s,c.length1+=s,c.length2+=s;else if(s>u[0][1].length){var l=s-u[0][1].length;u[0][1]=d.substring(u[0][1].length)+u[0][1],c.start1-=l,c.start2-=l,c.length1+=l,c.length2+=l}if(c=o[o.length-1],u=c.diffs,u.length==0||u[u.length-1][0]!=i)u.push(new t.Diff(i,d)),c.length1+=s,c.length2+=s;else if(s>u[u.length-1][1].length){var l=s-u[u.length-1][1].length;u[u.length-1][1]+=d.substring(0,l),c.length1+=l,c.length2+=l}return d},t.prototype.patch_splitMax=function(o){for(var s=this.Match_MaxBits,d=0;d<o.length;d++)if(!(o[d].length1<=s)){var a=o[d];o.splice(d--,1);for(var c=a.start1,u=a.start2,l="";a.diffs.length!==0;){var f=new t.patch_obj,h=!0;for(f.start1=c-l.length,f.start2=u-l.length,l!==""&&(f.length1=f.length2=l.length,f.diffs.push(new t.Diff(i,l)));a.diffs.length!==0&&f.length1<s-this.Patch_Margin;){var p=a.diffs[0][0],g=a.diffs[0][1];p===r?(f.length2+=g.length,u+=g.length,f.diffs.push(a.diffs.shift()),h=!1):p===n&&f.diffs.length==1&&f.diffs[0][0]==i&&g.length>2*s?(f.length1+=g.length,c+=g.length,h=!1,f.diffs.push(new t.Diff(p,g)),a.diffs.shift()):(g=g.substring(0,s-f.length1-this.Patch_Margin),f.length1+=g.length,c+=g.length,p===i?(f.length2+=g.length,u+=g.length):h=!1,f.diffs.push(new t.Diff(p,g)),g==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(g.length))}l=this.diff_text2(f.diffs),l=l.substring(l.length-this.Patch_Margin);var y=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);y!==""&&(f.length1+=y.length,f.length2+=y.length,f.diffs.length!==0&&f.diffs[f.diffs.length-1][0]===i?f.diffs[f.diffs.length-1][1]+=y:f.diffs.push(new t.Diff(i,y))),h||o.splice(++d,0,f)}}},t.prototype.patch_toText=function(o){for(var s=[],d=0;d<o.length;d++)s[d]=o[d];return s.join("")},t.prototype.patch_fromText=function(o){var s=[];if(!o)return s;for(var d=o.split(`
`),a=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;a<d.length;){var u=d[a].match(c);if(!u)throw new Error("Invalid patch string: "+d[a]);var l=new t.patch_obj;for(s.push(l),l.start1=parseInt(u[1],10),u[2]===""?(l.start1--,l.length1=1):u[2]=="0"?l.length1=0:(l.start1--,l.length1=parseInt(u[2],10)),l.start2=parseInt(u[3],10),u[4]===""?(l.start2--,l.length2=1):u[4]=="0"?l.length2=0:(l.start2--,l.length2=parseInt(u[4],10)),a++;a<d.length;){var f=d[a].charAt(0);try{var h=decodeURI(d[a].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+h)}if(f=="-")l.diffs.push(new t.Diff(n,h));else if(f=="+")l.diffs.push(new t.Diff(r,h));else if(f==" ")l.diffs.push(new t.Diff(i,h));else{if(f=="@")break;if(f!=="")throw new Error('Invalid patch mode "'+f+'" in: '+h)}a++}}return s},t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},t.patch_obj.prototype.toString=function(){var o,s;this.length1===0?o=this.start1+",0":this.length1==1?o=this.start1+1:o=this.start1+1+","+this.length1,this.length2===0?s=this.start2+",0":this.length2==1?s=this.start2+1:s=this.start2+1+","+this.length2;for(var d=["@@ -"+o+" +"+s+` @@
`],a,c=0;c<this.diffs.length;c++){switch(this.diffs[c][0]){case r:a="+";break;case n:a="-";break;case i:a=" ";break}d[c+1]=a+encodeURI(this.diffs[c][1])+`
`}return d.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=r,e.exports.DIFF_EQUAL=i})(KM);var yX=KM.exports,bX=Ue&&Ue.__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){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Iw,"__esModule",{value:!0});var It=im,fk=F,wX=wm,SX=yX,xX=function(e){bX(t,e);function t(n){var r=e.call(this,n)||this;return r.state={value:r.props.value},r.onChange=r.onChange.bind(r),r.diff=r.diff.bind(r),r}return t.prototype.componentDidUpdate=function(){var n=this.props.value;n!==this.state.value&&this.setState({value:n})},t.prototype.onChange=function(n){this.setState({value:n}),this.props.onChange&&this.props.onChange(n)},t.prototype.diff=function(){var n=new SX,r=this.state.value[0],i=this.state.value[1];if(r.length===0&&i.length===0)return[];var o=n.diff_main(r,i);n.diff_cleanupSemantic(o);var s=this.generateDiffedLines(o),d=this.setCodeMarkers(s);return d},t.prototype.generateDiffedLines=function(n){var r={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1},i={left:[],right:[]},o={left:1,right:1};return n.forEach(function(s){var d=s[0],a=s[1],c=a.split(`
`).length-1;if(a.length!==0){var u=a[0],l=a[a.length-1],f=0;switch(d){case r.DIFF_EQUAL:o.left+=c,o.right+=c;break;case r.DIFF_DELETE:u===`
`&&(o.left++,c--),f=c,f===0&&i.right.push({startLine:o.right,endLine:o.right}),l===`
`&&(f-=1),i.left.push({startLine:o.left,endLine:o.left+f}),o.left+=c;break;case r.DIFF_INSERT:u===`
`&&(o.right++,c--),f=c,f===0&&i.left.push({startLine:o.left,endLine:o.left}),l===`
`&&(f-=1),i.right.push({startLine:o.right,endLine:o.right+f}),o.right+=c;break;default:throw new Error("Diff type was not defined.")}}}),i},t.prototype.setCodeMarkers=function(n){n===void 0&&(n={left:[],right:[]});for(var r=[],i={left:[],right:[]},o=0;o<n.left.length;o++){var s={startRow:n.left[o].startLine-1,endRow:n.left[o].endLine,type:"text",className:"codeMarker"};i.left.push(s)}for(var o=0;o<n.right.length;o++){var s={startRow:n.right[o].startLine-1,endRow:n.right[o].endLine,type:"text",className:"codeMarker"};i.right.push(s)}return r[0]=i.left,r[1]=i.right,r},t.prototype.render=function(){var n=this.diff();return fk.createElement(wX.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:n})},t.propTypes={cursorStart:It.number,editorProps:It.object,enableBasicAutocompletion:It.bool,enableLiveAutocompletion:It.bool,focus:It.bool,fontSize:It.number,height:It.string,highlightActiveLine:It.bool,maxLines:It.number,minLines:It.number,mode:It.string,name:It.string,className:It.string,onLoad:It.func,onPaste:It.func,onScroll:It.func,onChange:It.func,orientation:It.string,readOnly:It.bool,scrollMargin:It.array,setOptions:It.object,showGutter:It.bool,showPrintMargin:It.bool,splits:It.number,style:It.object,tabSize:It.number,theme:It.string,value:It.array,width:It.string,wrapEnabled:It.bool},t.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},t}(fk.Component);Iw.default=xX;Object.defineProperty(Fu,"__esModule",{value:!0});Fu.diff=Fu.split=void 0;var _X=Pw,CX=Iw;Fu.diff=CX.default;var kX=wm;Fu.split=kX.default;var qM=Fu.default=_X.default,EX={exports:{}};(function(e,t){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,r,i){var o=n("../lib/oop"),s=n("./text_highlight_rules").TextHighlightRules,d=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};o.inherits(d,s),r.JsonHighlightRules=d}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(n,r,i){var o=n("../range").Range,s=function(){};(function(){this.checkOutdent=function(d,a){return/^\s+$/.test(d)?/^\s*\}/.test(a):!1},this.autoOutdent=function(d,a){var c=d.getLine(a),u=c.match(/^(\s*\})/);if(!u)return 0;var l=u[1].length,f=d.findMatchingBracket({row:a,column:l});if(!f||f.row==a)return 0;var h=this.$getIndent(d.getLine(f.row));d.replace(new o(a,0,a,l-1),h)},this.$getIndent=function(d){return d.match(/^\s*/)[0]}}).call(s.prototype),r.MatchingBraceOutdent=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,r,i){var o=n("../../lib/oop"),s=n("../../range").Range,d=n("./fold_mode").FoldMode,a=r.FoldMode=function(c){c&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+c.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+c.end)))};o.inherits(a,d),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(c,u,l){var f=c.getLine(l);if(this.singleLineBlockCommentRe.test(f)&&!this.startRegionRe.test(f)&&!this.tripleStarBlockCommentRe.test(f))return"";var h=this._getFoldWidgetBase(c,u,l);return!h&&this.startRegionRe.test(f)?"start":h},this.getFoldWidgetRange=function(c,u,l,f){var h=c.getLine(l);if(this.startRegionRe.test(h))return this.getCommentRegionBlock(c,h,l);var y=h.match(this.foldingStartMarker);if(y){var p=y.index;if(y[1])return this.openingBracketBlock(c,y[1],l,p);var g=c.getCommentFoldRange(l,p+y[0].length,1);return g&&!g.isMultiLine()&&(f?g=this.getSectionRange(c,l):u!="all"&&(g=null)),g}if(u!=="markbegin"){var y=h.match(this.foldingStopMarker);if(y){var p=y.index+y[0].length;return y[1]?this.closingBracketBlock(c,y[1],l,p):c.getCommentFoldRange(l,p,-1)}}},this.getSectionRange=function(c,u){var l=c.getLine(u),f=l.search(/\S/),h=u,p=l.length;u=u+1;for(var g=u,y=c.getLength();++u<y;){l=c.getLine(u);var x=l.search(/\S/);if(x!==-1){if(f>x)break;var S=this.getFoldWidgetRange(c,"all",u);if(S){if(S.start.row<=h)break;if(S.isMultiLine())u=S.end.row;else if(f==x)break}g=u}}return new s(h,p,g,c.getLine(g).length)},this.getCommentRegionBlock=function(c,u,l){for(var f=u.search(/\s*$/),h=c.getLength(),p=l,g=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,y=1;++l<h;){u=c.getLine(l);var x=g.exec(u);if(x&&(x[1]?y--:y++,!y))break}var S=l;if(S>p)return new s(p,f,S,u.length)}}.call(a.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(n,r,i){var o=n("../lib/oop"),s=n("./text").Mode,d=n("./json_highlight_rules").JsonHighlightRules,a=n("./matching_brace_outdent").MatchingBraceOutdent,c=n("./folding/cstyle").FoldMode,u=n("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=d,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new c};o.inherits(l,s),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(f,h,p){var g=this.$getIndent(h);if(f=="start"){var y=h.match(/^.*[\{\(\[]\s*$/);y&&(g+=p)}return g},this.checkOutdent=function(f,h,p){return this.$outdent.checkOutdent(h,p)},this.autoOutdent=function(f,h,p){this.$outdent.autoOutdent(h,p)},this.createWorker=function(f){var h=new u(["ace"],"ace/mode/json_worker","JsonWorker");return h.attachToDocument(f.getDocument()),h.on("annotate",function(p){f.setAnnotations(p.data)}),h.on("terminate",function(){f.clearAnnotations()}),h},this.$id="ace/mode/json"}.call(l.prototype),r.Mode=l}),function(){ace.require(["ace/mode/json"],function(n){e&&(e.exports=n)})}()})(EX);var $X={exports:{}};(function(e,t){ace.define("ace/theme/github_dark.css",["require","exports","module"],function(n,r,i){i.exports=`.ace-github-dark .ace_gutter {
background: #24292e;
color: #7388b5
}
.ace-github-dark .ace_print-margin {
width: 1px;
background: #00204b
}
.ace-github-dark {
background-color: #24292e;
color: #FFFFFF
}
.ace-github-dark .ace_constant.ace_other,
.ace-github-dark .ace_cursor {
color: #FFFFFF
}
.ace-github-dark .ace_marker-layer .ace_selection {
background: #003F8E
}
.ace-github-dark.ace_multiselect .ace_selection.ace_start {
box-shadow: 0 0 3px 0px #24292e;
}
.ace-github-dark .ace_marker-layer .ace_step {
background: rgb(127, 111, 19)
}
.ace-github-dark .ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid #404F7D
}
.ace-github-dark .ace_marker-layer .ace_active-line {
background: #00346E
}
.ace-github-dark .ace_gutter-active-line {
background-color: #24292e
}
.ace-github-dark .ace_marker-layer .ace_selected-word {
border: 1px solid #003F8E
}
.ace-github-dark .ace_invisible {
color: #404F7D
}
.ace-github-dark .ace_keyword,
.ace-github-dark .ace_meta,
.ace-github-dark .ace_storage,
.ace-github-dark .ace_storage.ace_type,
.ace-github-dark .ace_support.ace_type {
color: #ff7b72
}
.ace-github-dark .ace_keyword.ace_operator {
color: #79c0ff
}
.ace-github-dark .ace_constant.ace_character,
.ace-github-dark .ace_constant.ace_language,
.ace-github-dark .ace_constant.ace_numeric,
.ace-github-dark .ace_keyword.ace_other.ace_unit,
.ace-github-dark .ace_support.ace_constant,
.ace-github-dark .ace_variable.ace_parameter {
color: #FFC58F
}
.ace-github-dark .ace_invalid {
color: #FFFFFF;
background-color: #F99DA5
}
.ace-github-dark .ace_invalid.ace_deprecated {
color: #FFFFFF;
background-color: #ff7b72
}
.ace-github-dark .ace_fold {
background-color: #BBDAFF;
border-color: #FFFFFF
}
.ace-github-dark .ace_entity.ace_name.ace_function,
.ace-github-dark .ace_support.ace_function,
.ace-github-dark .ace_variable {
color: #BBDAFF
}
.ace-github-dark .ace_support.ace_class,
.ace-github-dark .ace_support.ace_type {
color: #FFEEAD
}
.ace-github-dark .ace_heading,
.ace-github-dark .ace_markup.ace_heading,
.ace-github-dark .ace_string {
color: #9fcef6
}
.ace-github-dark .ace_entity.ace_name.ace_tag,
.ace-github-dark .ace_entity.ace_other.ace_attribute-name,
.ace-github-dark .ace_meta.ace_tag,
.ace-github-dark .ace_string.ace_regexp,
.ace-github-dark .ace_variable {
color: #FF9DA4
}
.ace-github-dark .ace_comment {
color: #7285B7
}
.ace-github-dark .ace_indent-guide {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y
}
.ace-github-dark .ace_indent-guide-active {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
}
.ace-github-dark .ace_constant.ace_buildin {
color: #0086B3;
}
.ace-github-dark .ace_variable.ace_language {
color: #ffffff;
}
`}),ace.define("ace/theme/github_dark",["require","exports","module","ace/theme/github_dark.css","ace/lib/dom"],function(n,r,i){r.isDark=!0,r.cssClass="ace-github-dark",r.cssText=n("./github_dark.css");var o=n("../lib/dom");o.importCssString(r.cssText,r.cssClass,!1)}),function(){ace.require(["ace/theme/github_dark"],function(n){e&&(e.exports=n)})}()})($X);var TX={exports:{}};(function(e,t){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(n,r,i){var o=n("./lib/dom"),s=n("./lib/oop"),d=n("./lib/event_emitter").EventEmitter,a=n("./lib/lang"),c=n("./range").Range,u=n("./range_list").RangeList,l=n("./keyboard/hash_handler").HashHandler,f=n("./tokenizer").Tokenizer,h=n("./clipboard"),p={CURRENT_WORD:function(w){return w.session.getTextRange(w.session.getWordRange())},SELECTION:function(w,b,m){var $=w.session.getTextRange();return m?$.replace(/\n\r?([ \t]*\S)/g,`
`+m+"$1"):$},CURRENT_LINE:function(w){return w.session.getLine(w.getCursorPosition().row)},PREV_LINE:function(w){return w.session.getLine(w.getCursorPosition().row-1)},LINE_INDEX:function(w){return w.getCursorPosition().row},LINE_NUMBER:function(w){return w.getCursorPosition().row+1},SOFT_TABS:function(w){return w.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(w){return w.session.getTabSize()},CLIPBOARD:function(w){return h.getText&&h.getText()},FILENAME:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0]},FILENAME_BASE:function(w){return/[^/\\]*$/.exec(this.FILEPATH(w))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(w){return this.FILEPATH(w).replace(/[^/\\]*$/,"")},FILEPATH:function(w){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(w){var b=w.session.$mode||{};return b.blockComment&&b.blockComment.start||""},BLOCK_COMMENT_END:function(w){var b=w.session.$mode||{};return b.blockComment&&b.blockComment.end||""},LINE_COMMENT:function(w){var b=w.session.$mode||{};return b.lineCommentStart||""},CURRENT_YEAR:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};p.SELECTED_TEXT=p.SELECTION;function g(w){var b=new Date().toLocaleString("en-us",w);return b.length==1?"0"+b:b}var y=function(){this.snippetMap={},this.snippetNameMap={}};(function(){s.implement(this,d),this.getTokenizer=function(){return y.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function b(A){return A=A.substr(1),/^\d+$/.test(A)?[{tabstopId:parseInt(A,10)}]:[{text:A}]}function m(A){return"(?:[^\\\\"+A+"]|\\\\.)"}var $={regex:"/("+m("/")+"+)/",onMatch:function(A,C,k){var I=k[0];return I.fmtString=!0,I.guard=A.slice(1,-1),I.flag="",""},next:"formatString"};return y.$tokenizer=new f({start:[{regex:/\\./,onMatch:function(A,C,k){var I=A[1];return(I=="}"&&k.length||"`$\\".indexOf(I)!=-1)&&(A=I),[A]}},{regex:/}/,onMatch:function(A,C,k){return[k.length?k.shift():A]}},{regex:/\$(?:\d+|\w+)/,onMatch:b},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(A,C,k){var I=b(A.substr(1));return k.unshift(I[0]),I},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+m("\\|")+"*\\|",onMatch:function(A,C,k){var I=A.slice(1,-1).replace(/\\[,|\\]|,/g,function(L){return L.length==2?L[1]:"\0"}).split("\0").map(function(L){return{value:L}});return k[0].choices=I,[I[0]]},next:"start"},$,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(A,C,k){return k.length&&k[0].expectElse?(k[0].expectElse=!1,k[0].ifEnd={elseEnd:k[0]},[k[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(A,C,k){var I=A[1];return I=="}"&&k.length||"`$\\".indexOf(I)!=-1?A=I:I=="n"?A=`
`:I=="t"?A=" ":"ulULE".indexOf(I)!=-1&&(A={changeCase:I,local:I>"a"}),[A]}},{regex:"/\\w*}",onMatch:function(A,C,k){var I=k.shift();return I&&(I.flag=A.slice(1,-1)),this.next=I&&I.tabstopId?"start":"",[I||A]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(A,C,k){return[{text:A.slice(1)}]}},{regex:/\${\w+/,onMatch:function(A,C,k){var I={text:A.slice(2)};return k.unshift(I),[I]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(A,C,k){var I=k.shift();return this.next=I&&I.tabstopId?"start":"",[I||A]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(A,C,k){var I=k[0];return I.formatFunction=A.slice(2,-1),[k.shift()]},next:"formatString"},$,{regex:/:[\?\-+]?/,onMatch:function(A,C,k){A[1]=="+"&&(k[0].ifEnd=k[0]),A[1]=="?"&&(k[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),y.$tokenizer},this.tokenizeTmSnippet=function(b,m){return this.getTokenizer().getLineTokens(b,m).tokens.map(function($){return $.value||$})},this.getVariableValue=function(b,m,$){if(/^\d+$/.test(m))return(this.variables.__||{})[m]||"";if(/^[A-Z]\d+$/.test(m))return(this.variables[m[0]+"__"]||{})[m.substr(1)]||"";if(m=m.replace(/^TM_/,""),!this.variables.hasOwnProperty(m))return"";var A=this.variables[m];return typeof A=="function"&&(A=this.variables[m](b,m,$)),A??""},this.variables=p,this.tmStrFormat=function(b,m,$){if(!m.fmt)return b;var A=m.flag||"",C=m.guard;C=new RegExp(C,A.replace(/[^gim]/g,""));var k=typeof m.fmt=="string"?this.tokenizeTmSnippet(m.fmt,"formatString"):m.fmt,I=this,L=b.replace(C,function(){var T=I.variables.__;I.variables.__=[].slice.call(arguments);for(var R=I.resolveVariables(k,$),P="E",D=0;D<R.length;D++){var N=R[D];if(typeof N=="object")if(R[D]="",N.changeCase&&N.local){var B=R[D+1];B&&typeof B=="string"&&(N.changeCase=="u"?R[D]=B[0].toUpperCase():R[D]=B[0].toLowerCase(),R[D+1]=B.substr(1))}else N.changeCase&&(P=N.changeCase);else P=="U"?R[D]=N.toUpperCase():P=="L"&&(R[D]=N.toLowerCase())}return I.variables.__=T,R.join("")});return L},this.tmFormatFunction=function(b,m,$){return m.formatFunction=="upcase"?b.toUpperCase():m.formatFunction=="downcase"?b.toLowerCase():b},this.resolveVariables=function(b,m){for(var $=[],A="",C=!0,k=0;k<b.length;k++){var I=b[k];if(typeof I=="string"){$.push(I),I==`
`?(C=!0,A=""):C&&(A=/^\t*/.exec(I)[0],C=/\S/.test(I));continue}if(I){if(C=!1,I.fmtString){var L=b.indexOf(I,k+1);L==-1&&(L=b.length),I.fmt=b.slice(k+1,L),k=L}if(I.text){var T=this.getVariableValue(m,I.text,A)+"";I.fmtString&&(T=this.tmStrFormat(T,I,m)),I.formatFunction&&(T=this.tmFormatFunction(T,I,m)),T&&!I.ifEnd?($.push(T),R(I)):!T&&I.ifEnd&&R(I.ifEnd)}else I.elseEnd?R(I.elseEnd):(I.tabstopId!=null||I.changeCase!=null)&&$.push(I)}}function R(P){var D=b.indexOf(P,k+1);D!=-1&&(k=D)}return $};var w=function(b,m,$){$===void 0&&($={});var A=b.getCursorPosition(),C=b.session.getLine(A.row),k=b.session.getTabString(),I=C.match(/^\s*/)[0];A.column<I.length&&(I=I.slice(0,A.column)),m=m.replace(/\r/g,"");var L=this.tokenizeTmSnippet(m);L=this.resolveVariables(L,b),L=L.map(function(G){return G==`
`&&!$.excludeExtraIndent?G+I:typeof G=="string"?G.replace(/\t/g,k):G});var T=[];L.forEach(function(G,oe){if(typeof G=="object"){var ne=G.tabstopId,ce=T[ne];if(ce||(ce=T[ne]=[],ce.index=ne,ce.value="",ce.parents={}),ce.indexOf(G)===-1){G.choices&&!ce.choices&&(ce.choices=G.choices),ce.push(G);var fe=L.indexOf(G,oe+1);if(fe!==-1){var he=L.slice(oe+1,fe),me=he.some(function(Pe){return typeof Pe=="object"});me&&!ce.value?ce.value=he:he.length&&(!ce.value||typeof ce.value!="string")&&(ce.value=he.join(""))}}}}),T.forEach(function(G){G.length=0});var R={};function P(G){for(var oe=[],ne=0;ne<G.length;ne++){var ce=G[ne];if(typeof ce=="object"){if(R[ce.tabstopId])continue;var fe=G.lastIndexOf(ce,ne-1);ce=oe[fe]||{tabstopId:ce.tabstopId}}oe[ne]=ce}return oe}for(var D=0;D<L.length;D++){var N=L[D];if(typeof N=="object"){var B=N.tabstopId,Z=T[B],U=L.indexOf(N,D+1);if(R[B]){R[B]===N&&(delete R[B],Object.keys(R).forEach(function(G){Z.parents[G]=!0}));continue}R[B]=N;var X=Z.value;typeof X!="string"?X=P(X):N.fmt&&(X=this.tmStrFormat(X,N,b)),L.splice.apply(L,[D+1,Math.max(0,U-D)].concat(X,N)),Z.indexOf(N)===-1&&Z.push(N)}}var W=0,q=0,Q="";return L.forEach(function(G){if(typeof G=="string"){var oe=G.split(`
`);oe.length>1?(q=oe[oe.length-1].length,W+=oe.length-1):q+=G.length,Q+=G}else G&&(G.start?G.end={row:W,column:q}:G.start={row:W,column:q})}),{text:Q,tabstops:T,tokens:L}};this.getDisplayTextForSnippet=function(b,m){var $=w.call(this,b,m);return $.text},this.insertSnippetForSelection=function(b,m,$){$===void 0&&($={});var A=w.call(this,b,m,$),C=b.getSelectionRange();$.range&&$.range.compareRange(C)===0&&(C=$.range);var k=b.session.replace(C,A.text),I=new x(b),L=b.inVirtualSelectionMode&&b.selection.index;I.addTabstops(A.tabstops,C.start,k,L)},this.insertSnippet=function(b,m,$){$===void 0&&($={});var A=this;if($.range&&!($.range instanceof c)&&($.range=c.fromPoints($.range.start,$.range.end)),b.inVirtualSelectionMode)return A.insertSnippetForSelection(b,m,$);b.forEachSelection(function(){A.insertSnippetForSelection(b,m,$)},null,{keepOrder:!0}),b.tabstopManager&&b.tabstopManager.tabNext()},this.$getScope=function(b){var m=b.session.$mode.$id||"";if(m=m.split("/").pop(),m==="html"||m==="php"){m==="php"&&!b.session.$mode.inlinePhp&&(m="html");var $=b.getCursorPosition(),A=b.session.getState($.row);typeof A=="object"&&(A=A[0]),A.substring&&(A.substring(0,3)=="js-"?m="javascript":A.substring(0,4)=="css-"?m="css":A.substring(0,4)=="php-"&&(m="php"))}return m},this.getActiveScopes=function(b){var m=this.$getScope(b),$=[m],A=this.snippetMap;return A[m]&&A[m].includeScopes&&$.push.apply($,A[m].includeScopes),$.push("_"),$},this.expandWithTab=function(b,m){var $=this,A=b.forEachSelection(function(){return $.expandSnippetForSelection(b,m)},null,{keepOrder:!0});return A&&b.tabstopManager&&b.tabstopManager.tabNext(),A},this.expandSnippetForSelection=function(b,m){var $=b.getCursorPosition(),A=b.session.getLine($.row),C=A.substring(0,$.column),k=A.substr($.column),I=this.snippetMap,L;return this.getActiveScopes(b).some(function(T){var R=I[T];return R&&(L=this.findMatchingSnippet(R,C,k)),!!L},this),L?(m&&m.dryRun||(b.session.doc.removeInLine($.row,$.column-L.replaceBefore.length,$.column+L.replaceAfter.length),this.variables.M__=L.matchBefore,this.variables.T__=L.matchAfter,this.insertSnippetForSelection(b,L.content),this.variables.M__=this.variables.T__=null),!0):!1},this.findMatchingSnippet=function(b,m,$){for(var A=b.length;A--;){var C=b[A];if(!(C.startRe&&!C.startRe.test(m))&&!(C.endRe&&!C.endRe.test($))&&!(!C.startRe&&!C.endRe))return C.matchBefore=C.startRe?C.startRe.exec(m):[""],C.matchAfter=C.endRe?C.endRe.exec($):[""],C.replaceBefore=C.triggerRe?C.triggerRe.exec(m)[0]:"",C.replaceAfter=C.endTriggerRe?C.endTriggerRe.exec($)[0]:"",C}},this.snippetMap={},this.snippetNameMap={},this.register=function(b,m){var $=this.snippetMap,A=this.snippetNameMap,C=this;b||(b=[]);function k(T){return T&&!/^\^?\(.*\)\$?$|^\\b$/.test(T)&&(T="(?:"+T+")"),T||""}function I(T,R,P){return T=k(T),R=k(R),P?(T=R+T,T&&T[T.length-1]!="$"&&(T=T+"$")):(T=T+R,T&&T[0]!="^"&&(T="^"+T)),new RegExp(T)}function L(T){T.scope||(T.scope=m||"_"),m=T.scope,$[m]||($[m]=[],A[m]={});var R=A[m];if(T.name){var P=R[T.name];P&&C.unregister(P),R[T.name]=T}$[m].push(T),T.prefix&&(T.tabTrigger=T.prefix),!T.content&&T.body&&(T.content=Array.isArray(T.body)?T.body.join(`
`):T.body),T.tabTrigger&&!T.trigger&&(!T.guard&&/^\w/.test(T.tabTrigger)&&(T.guard="\\b"),T.trigger=a.escapeRegExp(T.tabTrigger)),!(!T.trigger&&!T.guard&&!T.endTrigger&&!T.endGuard)&&(T.startRe=I(T.trigger,T.guard,!0),T.triggerRe=new RegExp(T.trigger),T.endRe=I(T.endTrigger,T.endGuard,!0),T.endTriggerRe=new RegExp(T.endTrigger))}Array.isArray(b)?b.forEach(L):Object.keys(b).forEach(function(T){L(b[T])}),this._signal("registerSnippets",{scope:m})},this.unregister=function(b,m){var $=this.snippetMap,A=this.snippetNameMap;function C(k){var I=A[k.scope||m];if(I&&I[k.name]){delete I[k.name];var L=$[k.scope||m],T=L&&L.indexOf(k);T>=0&&L.splice(T,1)}}b.content?C(b):Array.isArray(b)&&b.forEach(C)},this.parseSnippetFile=function(b){b=b.replace(/\r/g,"");for(var m=[],$={},A=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,C;C=A.exec(b);){if(C[1])try{$=JSON.parse(C[1]),m.push($)}catch{}if(C[4])$.content=C[4].replace(/^\t/gm,""),m.push($),$={};else{var k=C[2],I=C[3];if(k=="regex"){var L=/\/((?:[^\/\\]|\\.)*)|$/g;$.guard=L.exec(I)[1],$.trigger=L.exec(I)[1],$.endTrigger=L.exec(I)[1],$.endGuard=L.exec(I)[1]}else k=="snippet"?($.tabTrigger=I.match(/^\S*/)[0],$.name||($.name=I)):k&&($[k]=I)}}return m},this.getSnippetByName=function(b,m){var $=this.snippetNameMap,A;return this.getActiveScopes(m).some(function(C){var k=$[C];return k&&(A=k[b]),!!A},this),A}}).call(y.prototype);var x=function(w){if(w.tabstopManager)return w.tabstopManager;w.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(w)};(function(){this.attach=function(w){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=w,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(w){for(var b=w.action[0]=="r",m=this.selectedTabstop||{},$=m.parents||{},A=(this.tabstops||[]).slice(),C=0;C<A.length;C++){var k=A[C],I=k==m||$[k.index];if(k.rangeList.$bias=I?0:1,w.action=="remove"&&k!==m){var L=k.parents&&k.parents[m.index],T=k.rangeList.pointIndex(w.start,L);T=T<0?-T-1:T+1;var R=k.rangeList.pointIndex(w.end,L);R=R<0?-R-1:R-1;for(var P=k.rangeList.ranges.slice(T,R),D=0;D<P.length;D++)this.removeRange(P[D])}k.rangeList.$onChange(w)}var N=this.editor.session;!this.$inChange&&b&&N.getLength()==1&&!N.getValue()&&this.detach()},this.updateLinkedFields=function(){var w=this.selectedTabstop;if(!(!w||!w.hasLinkedRanges||!w.firstNonLinked)){this.$inChange=!0;for(var b=this.editor.session,m=b.getTextRange(w.firstNonLinked),$=0;$<w.length;$++){var A=w[$];if(A.linked){var C=A.original,k=r.snippetManager.tmStrFormat(m,C,this.editor);b.replace(A,k)}}this.$inChange=!1}},this.onAfterExec=function(w){w.command&&!w.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var w=this.editor.selection.lead,b=this.editor.selection.anchor,m=this.editor.selection.isEmpty(),$=0;$<this.ranges.length;$++)if(!this.ranges[$].linked){var A=this.ranges[$].contains(w.row,w.column),C=m||this.ranges[$].contains(b.row,b.column);if(A&&C)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(w){var b=this.tabstops.length,m=this.index+(w||1);m=Math.min(Math.max(m,1),b),m==b&&(m=0),this.selectTabstop(m),m===0&&this.detach()},this.selectTabstop=function(w){this.$openTabstops=null;var b=this.tabstops[this.index];if(b&&this.addTabstopMarkers(b),this.index=w,b=this.tabstops[this.index],!(!b||!b.length)){this.selectedTabstop=b;var m=b.firstNonLinked||b;if(b.choices&&(m.cursor=m.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(m);else{var $=this.editor.multiSelect;$.toSingleRange(m);for(var A=0;A<b.length;A++)b.hasLinkedRanges&&b[A].linked||$.addRange(b[A].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},this.addTabstops=function(w,b,m){var $=this.useLink||!this.editor.getOption("enableMultiselect");if(this.$openTabstops||(this.$openTabstops=[]),!w[0]){var A=c.fromPoints(m,m);E(A.start,b),E(A.end,b),w[0]=[A],w[0].index=0}var C=this.index,k=[C+1,0],I=this.ranges;w.forEach(function(L,T){for(var R=this.$openTabstops[T]||L,P=0;P<L.length;P++){var D=L[P],N=c.fromPoints(D.start,D.end||D.start);S(N.start,b),S(N.end,b),N.original=D,N.tabstop=R,I.push(N),R!=L?R.unshift(N):R[P]=N,D.fmtString||R.firstNonLinked&&$?(N.linked=!0,R.hasLinkedRanges=!0):R.firstNonLinked||(R.firstNonLinked=N)}R.firstNonLinked||(R.hasLinkedRanges=!1),R===L&&(k.push(R),this.$openTabstops[T]=R),this.addTabstopMarkers(R),R.rangeList=R.rangeList||new u,R.rangeList.$bias=0,R.rangeList.addList(R)},this),k.length>2&&(this.tabstops.length&&k.push(k.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,k))},this.addTabstopMarkers=function(w){var b=this.editor.session;w.forEach(function(m){m.markerId||(m.markerId=b.addMarker(m,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(w){var b=this.editor.session;w.forEach(function(m){b.removeMarker(m.markerId),m.markerId=null})},this.removeRange=function(w){var b=w.tabstop.indexOf(w);b!=-1&&w.tabstop.splice(b,1),b=this.ranges.indexOf(w),b!=-1&&this.ranges.splice(b,1),b=w.tabstop.rangeList.ranges.indexOf(w),b!=-1&&w.tabstop.splice(b,1),this.editor.session.removeMarker(w.markerId),w.tabstop.length||(b=this.tabstops.indexOf(w.tabstop),b!=-1&&this.tabstops.splice(b,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(w){r.snippetManager&&r.snippetManager.expandWithTab(w)||(w.tabstopManager.tabNext(1),w.renderer.scrollCursorIntoView())},"Shift-Tab":function(w){w.tabstopManager.tabNext(-1),w.renderer.scrollCursorIntoView()},Esc:function(w){w.tabstopManager.detach()}})}).call(x.prototype);var S=function(w,b){w.row==0&&(w.column+=b.column),w.row+=b.row},E=function(w,b){w.row==b.row&&(w.column-=b.column),w.row-=b.row};o.importCssString(`
.ace_snippet-marker {
-moz-box-sizing: border-box;
box-sizing: border-box;
background: rgba(194, 193, 208, 0.09);
border: 1px dotted rgba(211, 208, 235, 0.62);
position: absolute;
}`,"snippets.css",!1),r.snippetManager=new y;var v=n("./editor").Editor;(function(){this.insertSnippet=function(w,b){return r.snippetManager.insertSnippet(this,w,b)},this.expandSnippet=function(w){return r.snippetManager.expandWithTab(this,w)}}).call(v.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config"],function(n,r,i){var o=n("../virtual_renderer").VirtualRenderer,s=n("../editor").Editor,d=n("../range").Range,a=n("../lib/event"),c=n("../lib/lang"),u=n("../lib/dom"),l=n("../config").nls,f=function(g){return"suggest-aria-id:".concat(g)},h=function(g){var y=new o(g);y.$maxLines=4;var x=new s(y);return x.setHighlightActiveLine(!1),x.setShowPrintMargin(!1),x.renderer.setShowGutter(!1),x.renderer.setHighlightGutterLine(!1),x.$mouseHandler.$focusTimeout=0,x.$highlightTagPending=!0,x},p=function(){function g(y){var x=u.createElement("div"),S=new h(x);y&&y.appendChild(x),x.style.display="none",S.renderer.content.style.cursor="default",S.renderer.setStyle("ace_autocomplete"),S.renderer.container.setAttribute("role","listbox"),S.renderer.container.setAttribute("aria-label",l("Autocomplete suggestions")),S.setOption("displayIndentGuides",!1),S.setOption("dragDelay",150);var E=function(){};S.focus=E,S.$isFocused=!0,S.renderer.$cursorLayer.restartTimer=E,S.renderer.$cursorLayer.element.style.opacity=0,S.renderer.$maxLines=8,S.renderer.$keepTextAreaAtCursor=!1,S.setHighlightActiveLine(!1),S.session.highlight(""),S.session.$searchHighlight.clazz="ace_highlight-marker",S.on("mousedown",function(C){var k=C.getDocumentPosition();S.selection.moveToPosition(k),b.start.row=b.end.row=k.row,C.stop()});var v,w=new d(-1,0,-1,1/0),b=new d(-1,0,-1,1/0);b.id=S.session.addMarker(b,"ace_active-line","fullLine"),S.setSelectOnHover=function(C){C?w.id&&(S.session.removeMarker(w.id),w.id=null):w.id=S.session.addMarker(w,"ace_line-hover","fullLine")},S.setSelectOnHover(!1),S.on("mousemove",function(C){if(!v){v=C;return}if(!(v.x==C.x&&v.y==C.y)){v=C,v.scrollTop=S.renderer.scrollTop;var k=v.getDocumentPosition().row;w.start.row!=k&&(w.id||S.setRow(k),$(k))}}),S.renderer.on("beforeRender",function(){if(v&&w.start.row!=-1){v.$pos=null;var C=v.getDocumentPosition().row;w.id||S.setRow(C),$(C,!0)}}),S.renderer.on("afterRender",function(){var C=S.getRow(),k=S.renderer.$textLayer,I=k.element.childNodes[C-k.config.firstRow],L=document.activeElement;if(I!==k.selectedNode&&k.selectedNode&&(u.removeCssClass(k.selectedNode,"ace_selected"),L.removeAttribute("aria-activedescendant"),k.selectedNode.removeAttribute("id")),k.selectedNode=I,I){u.addCssClass(I,"ace_selected");var T=f(C);I.id=T,S.renderer.container.setAttribute("aria-activedescendant",T),L.setAttribute("aria-activedescendant",T),I.setAttribute("role","option"),I.setAttribute("aria-label",S.getData(C).value),I.setAttribute("aria-setsize",S.data.length),I.setAttribute("aria-posinset",C)}});var m=function(){$(-1)},$=function(C,k){C!==w.start.row&&(w.start.row=w.end.row=C,k||S.session._emit("changeBackMarker"),S._emit("changeHoverMarker"))};S.getHoveredRow=function(){return w.start.row},a.addListener(S.container,"mouseout",m),S.on("hide",m),S.on("changeSelection",m),S.session.doc.getLength=function(){return S.data.length},S.session.doc.getLine=function(C){var k=S.data[C];return typeof k=="string"?k:k&&k.value||""};var A=S.session.bgTokenizer;return A.$tokenizeRow=function(C){var k=S.data[C],I=[];if(!k)return I;typeof k=="string"&&(k={value:k});var L=k.caption||k.value||k.name;function T(X,W){X&&I.push({type:(k.className||"")+(W||""),value:X})}for(var R=L.toLowerCase(),P=(S.filterText||"").toLowerCase(),D=0,N=0,B=0;B<=P.length;B++)if(B!=N&&(k.matchMask&1<<B||B==P.length)){var Z=P.slice(N,B);N=B;var U=R.indexOf(Z,D);if(U==-1)continue;T(L.slice(D,U),""),D=U+Z.length,T(L.slice(U,D),"completion-highlight")}return T(L.slice(D,L.length),""),I.push({type:"completion-spacer",value:" "}),k.meta&&I.push({type:"completion-meta",value:k.meta}),k.message&&I.push({type:"completion-message",value:k.message}),I},A.$updateOnChange=E,A.start=E,S.session.$computeWidth=function(){return this.screenWidth=0},S.isOpen=!1,S.isTopdown=!1,S.autoSelect=!0,S.filterText="",S.data=[],S.setData=function(C,k){S.filterText=k||"",S.setValue(c.stringRepeat(`
`,C.length),-1),S.data=C||[],S.setRow(0)},S.getData=function(C){return S.data[C]},S.getRow=function(){return b.start.row},S.setRow=function(C){C=Math.max(this.autoSelect?0:-1,Math.min(this.data.length-1,C)),b.start.row!=C&&(S.selection.clearSelection(),b.start.row=b.end.row=C||0,S.session._emit("changeBackMarker"),S.moveCursorTo(C||0,0),S.isOpen&&S._signal("select"))},S.on("changeSelection",function(){S.isOpen&&S.setRow(S.selection.lead.row),S.renderer.scrollCursorIntoView()}),S.hide=function(){this.container.style.display="none",S.anchorPos=null,S.anchor=null,S.isOpen&&(S.isOpen=!1,this._signal("hide"))},S.tryShow=function(C,k,I,L){if(!L&&S.isOpen&&S.anchorPos&&S.anchor&&S.anchorPos.top===C.top&&S.anchorPos.left===C.left&&S.anchor===I)return!0;var T=this.container,R=window.innerHeight,P=window.innerWidth,D=this.renderer,N=D.$maxLines*k*1.4,B={top:0,bottom:0,left:0},Z=R-C.top-3*this.$borderSize-k,U=C.top-3*this.$borderSize;I||(U<=Z||Z>=N?I="bottom":I="top"),I==="top"?(B.bottom=C.top-this.$borderSize,B.top=B.bottom-N):I==="bottom"&&(B.top=C.top+k+this.$borderSize,B.bottom=B.top+N);var X=B.top>=0&&B.bottom<=R;if(!L&&!X)return!1;X?D.$maxPixelHeight=null:I==="top"?D.$maxPixelHeight=U:D.$maxPixelHeight=Z,I==="top"?(T.style.top="",T.style.bottom=R-B.bottom+"px",S.isTopdown=!1):(T.style.top=B.top+"px",T.style.bottom="",S.isTopdown=!0),T.style.display="";var W=C.left;return W+T.offsetWidth>P&&(W=P-T.offsetWidth),T.style.left=W+"px",T.style.right="",S.isOpen||(S.isOpen=!0,this._signal("show"),v=null),S.anchorPos=C,S.anchor=I,!0},S.show=function(C,k,I){this.tryShow(C,k,I?"bottom":void 0,!0)},S.goTo=function(C){var k=this.getRow(),I=this.session.getLength()-1;switch(C){case"up":k=k<=0?I:k-1;break;case"down":k=k>=I?-1:k+1;break;case"start":k=0;break;case"end":k=I;break}this.setRow(k)},S.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},S.$imageSize=0,S.$borderSize=1,S}return g}();u.importCssString(`
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
background-color: #CAD6FA;
z-index: 1;
}
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
background-color: #3a674e;
}
.ace_editor.ace_autocomplete .ace_line-hover {
border: 1px solid #abbffe;
margin-top: -1px;
background: rgba(233,233,253,0.4);
position: absolute;
z-index: 2;
}
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
border: 1px solid rgba(109, 150, 13, 0.8);
background: rgba(58, 103, 78, 0.62);
}
.ace_completion-meta {
opacity: 0.5;
margin: 0 0.9em;
}
.ace_completion-message {
color: blue;
}
.ace_editor.ace_autocomplete .ace_completion-highlight{
color: #2d69c7;
}
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
color: #93ca12;
}
.ace_editor.ace_autocomplete {
width: 300px;
z-index: 200000;
border: 1px lightgray solid;
position: fixed;
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
line-height: 1.4;
background: #fefefe;
color: #111;
}
.ace_dark.ace_editor.ace_autocomplete {
border: 1px #484747 solid;
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
line-height: 1.4;
background: #25282c;
color: #c1c1c1;
}
.ace_autocomplete_right .ace_text-layer {
width: calc(100% - 8px);
}
.ace_autocomplete_right .ace_line {
display: flex;
}
.ace_autocomplete_right .ace_completion-spacer {
flex: 1;
}
`,"autocompletion.css",!1),r.AcePopup=p,r.$singleLineEditor=h,r.getAriaId=f}),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],function(n,r,i){var o=n("../snippets").snippetManager,s=function(){function d(){this.editor=null}return d.prototype.show=function(a,c,u){if(u=u||"",a&&this.editor&&this.editor!==a&&(this.hide(),this.editor=null),!a||!c)return!1;var l=c.snippet?o.getDisplayTextForSnippet(a,c.snippet):c.value;return!l||!l.startsWith(u)?!1:(this.editor=a,l=l.slice(u.length),l===""?a.removeGhostText():a.setGhostText(l),!0)},d.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},d.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},d.prototype.destroy=function(){this.hide(),this.editor=null},d}();r.AceInline=s}),ace.define("ace/autocomplete/util",["require","exports","module"],function(n,r,i){r.parForEach=function(s,d,a){var c=0,u=s.length;u===0&&a();for(var l=0;l<u;l++)d(s[l],function(f,h){c++,c===u&&a(f,h)})};var o=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;r.retrievePrecedingIdentifier=function(s,d,a){a=a||o;for(var c=[],u=d-1;u>=0&&a.test(s[u]);u--)c.push(s[u]);return c.reverse().join("")},r.retrieveFollowingIdentifier=function(s,d,a){a=a||o;for(var c=[],u=d;u<s.length&&a.test(s[u]);u++)c.push(s[u]);return c},r.getCompletionPrefix=function(s){var d=s.getCursorPosition(),a=s.session.getLine(d.row),c;return s.completers.forEach(function(u){u.identifierRegexps&&u.identifierRegexps.forEach(function(l){!c&&l&&(c=this.retrievePrecedingIdentifier(a,d.column,l))}.bind(this))}.bind(this)),c||this.retrievePrecedingIdentifier(a,d.column)},r.triggerAutocomplete=function(s){var d=s.getCursorPosition(),a=s.session.getLine(d.row),c=d.column===0?0:d.column-1,u=a[c];return s.completers.some(function(l){if(l.triggerCharacters&&Array.isArray(l.triggerCharacters))return l.triggerCharacters.includes(u)})}}),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],function(n,r,i){var o=n("./keyboard/hash_handler").HashHandler,s=n("./autocomplete/popup").AcePopup,d=n("./autocomplete/inline").AceInline,a=n("./autocomplete/popup").getAriaId,c=n("./autocomplete/util"),u=n("./lib/lang"),l=n("./lib/dom"),f=n("./snippets").snippetManager,h=n("./config"),p=function(S,E){E.completer&&E.completer.destroy()},g=function(){function S(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new o,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=u.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=u.delayedCall(this.updateDocTooltip.bind(this),50)}return S.prototype.$init=function(){return this.popup=new s(this.parentNode||document.body||document.documentElement),this.popup.on("click",function(E){this.insertMatch(),E.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupChange.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},S.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new d,this.inlineRenderer},S.prototype.getPopup=function(){return this.popup||this.$init()},S.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip()},S.prototype.$onPopupChange=function(E){if(this.inlineRenderer&&this.inlineEnabled){var v=E?null:this.popup.getData(this.popup.getRow()),w=c.getCompletionPrefix(this.editor);this.inlineRenderer.show(this.editor,v,w)||this.inlineRenderer.hide(),this.$updatePopupPosition()}this.tooltipTimer.call(null,null)},S.prototype.$updatePopupPosition=function(){var E=this.editor,v=E.renderer,w=v.layerConfig.lineHeight,b=v.$cursorLayer.getPixelPosition(this.base,!0);b.left-=this.popup.getTextLeftOffset();var m=E.container.getBoundingClientRect();b.top+=m.top-v.layerConfig.offset,b.left+=m.left-E.renderer.scrollLeft,b.left+=v.gutterWidth;var $={top:b.top,left:b.left};v.$ghostText&&v.$ghostTextWidget&&this.base.row===v.$ghostText.position.row&&($.top+=v.$ghostTextWidget.el.offsetHeight),!this.popup.tryShow($,w,"bottom")&&(this.popup.tryShow(b,w,"top")||this.popup.show(b,w))},S.prototype.openPopup=function(E,v,w){this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:a(this.popup.getRow()),inline:this.inlineEnabled}),E.keyBinding.addKeyboardHandler(this.keyboardHandler),this.popup.setRow(this.autoSelect?0:-1),w?w&&!v&&this.detach():(this.popup.setTheme(E.getTheme()),this.popup.setFontSize(E.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel()},S.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null},S.prototype.changeListener=function(E){var v=this.editor.selection.lead;(v.row!=this.base.row||v.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},S.prototype.blurListener=function(E){var v=document.activeElement,w=this.editor.textInput.getElement(),b=E.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(E.relatedTarget),m=this.popup&&this.popup.container;v!=w&&v.parentNode!=m&&!b&&v!=this.tooltipNode&&E.relatedTarget!=w&&this.detach()},S.prototype.mousedownListener=function(E){this.detach()},S.prototype.mousewheelListener=function(E){this.detach()},S.prototype.goTo=function(E){this.popup.goTo(E)},S.prototype.insertMatch=function(E,v){if(E||(E=this.popup.getData(this.popup.getRow())),!E)return!1;if(E.value==="")return this.detach();var w=this.completions,b=this.getCompletionProvider().insertMatch(this.editor,E,w.filterText,v);return this.completions==w&&this.detach(),b},S.prototype.showPopup=function(E,v){this.editor&&this.detach(),this.activated=!0,this.editor=E,E.completer!=this&&(E.completer&&E.completer.detach(),E.completer=this),E.on("changeSelection",this.changeListener),E.on("blur",this.blurListener),E.on("mousedown",this.mousedownListener),E.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,v)},S.prototype.getCompletionProvider=function(){return this.completionProvider||(this.completionProvider=new y),this.completionProvider},S.prototype.gatherCompletions=function(E,v){return this.getCompletionProvider().gatherCompletions(E,v)},S.prototype.updateCompletions=function(E,v){if(E&&this.base&&this.completions){var b=this.editor.getCursorPosition(),m=this.editor.session.getTextRange({start:this.base,end:b});if(m==this.completions.filterText)return;if(this.completions.setFilter(m),!this.completions.filtered.length)return this.detach();if(this.completions.filtered.length==1&&this.completions.filtered[0].value==m&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,m,E);return}if(v&&v.matches){var b=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(b.row,b.column),this.base.$insertRight=!0,this.completions=new x(v.matches),this.openPopup(this.editor,"",E)}var w=this.editor.getSession(),b=this.editor.getCursorPosition(),m=c.getCompletionPrefix(this.editor);this.base=w.doc.createAnchor(b.row,b.column-m.length),this.base.$insertRight=!0;var $={exactMatch:this.exactMatch};this.getCompletionProvider().provideCompletions(this.editor,$,function(A,C,k){var I=C.filtered,L=c.getCompletionPrefix(this.editor);if(k){if(!I.length){var T=!this.autoShown&&this.emptyMessage;if(typeof T=="function"&&(T=this.emptyMessage(L)),T){var R=[{caption:this.emptyMessage(L),value:""}];this.completions=new x(R),this.openPopup(this.editor,L,E);return}return this.detach()}if(I.length==1&&I[0].value==L&&!I[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&I.length==1)return this.insertMatch(I[0])}this.completions=C,this.openPopup(this.editor,L,E)}.bind(this))},S.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},S.prototype.updateDocTooltip=function(){var E=this.popup,v=E.data,w=v&&(v[E.getHoveredRow()]||v[E.getRow()]),b=null;if(!w||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var m=this.editor.completers.length,$=0;$<m;$++){var A=this.editor.completers[$];if(A.getDocTooltip&&w.completerId===A.id){b=A.getDocTooltip(w);break}}if(!b&&typeof w!="string"&&(b=w),typeof b=="string"&&(b={docText:b}),!b||!(b.docHTML||b.docText))return this.hideDocTooltip();this.showDocTooltip(b)},S.prototype.showDocTooltip=function(E){this.tooltipNode||(this.tooltipNode=l.createElement("div"),this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var v=this.editor.renderer.theme;this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(v.isDark?"ace_dark ":"")+(v.cssClass||"");var w=this.tooltipNode;E.docHTML?w.innerHTML=E.docHTML:E.docText&&(w.textContent=E.docText),w.parentNode||this.popup.container.appendChild(this.tooltipNode);var b=this.popup,m=b.container.getBoundingClientRect();w.style.top=b.container.style.top,w.style.bottom=b.container.style.bottom,w.style.display="block",window.innerWidth-m.right<320?m.left<320?b.isTopdown?(w.style.top=m.bottom+"px",w.style.left=m.left+"px",w.style.right="",w.style.bottom=""):(w.style.top=b.container.offsetTop-w.offsetHeight+"px",w.style.left=m.left+"px",w.style.right="",w.style.bottom=""):(w.style.right=window.innerWidth-m.left+"px",w.style.left=""):(w.style.left=m.right+1+"px",w.style.right="")},S.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),!!this.tooltipNode){var E=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==E&&this.editor.focus(),this.tooltipNode=null,E.parentNode&&E.parentNode.removeChild(E)}},S.prototype.onTooltipClick=function(E){for(var v=E.target;v&&v!=this.tooltipNode;){if(v.nodeName=="A"&&v.href){v.rel="noreferrer",v.target="_blank";break}v=v.parentNode}},S.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var E=this.popup.container;E&&E.parentNode&&E.parentNode.removeChild(E)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",p),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},S}();g.prototype.commands={Up:function(S){S.completer.goTo("up")},Down:function(S){S.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(S){S.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(S){S.completer.goTo("end")},Esc:function(S){S.completer.detach()},Return:function(S){return S.completer.insertMatch()},"Shift-Return":function(S){S.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(S){var E=S.completer.insertMatch();if(!E&&!S.tabstopManager)S.completer.goTo("down");else return E},PageUp:function(S){S.completer.popup.gotoPageUp()},PageDown:function(S){S.completer.popup.gotoPageDown()}},g.for=function(S){return S.completer instanceof g||(S.completer&&(S.completer.destroy(),S.completer=null),h.get("sharedPopups")?(g.$sharedInstance||(g.$sharedInstance=new g),S.completer=g.$sharedInstance):(S.completer=new g,S.once("destroy",p))),S.completer},g.startCommand={name:"startAutocomplete",exec:function(S,E){var v=g.for(S);v.autoInsert=!1,v.autoSelect=!0,v.autoShown=!1,v.showPopup(S,E),v.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var y=function(){function S(){this.active=!0}return S.prototype.insertByIndex=function(E,v,w){return!this.completions||!this.completions.filtered?!1:this.insertMatch(E,this.completions.filtered[v],w)},S.prototype.insertMatch=function(E,v,w){if(!v)return!1;if(E.startOperation({command:{name:"insertMatch"}}),v.completer&&v.completer.insertMatch)v.completer.insertMatch(E,v);else{if(!this.completions)return!1;if(this.completions.filterText){var b;E.selection.getAllRanges?b=E.selection.getAllRanges():b=[E.getSelectionRange()];for(var m=0,$;$=b[m];m++)$.start.column-=this.completions.filterText.length,E.session.remove($)}v.snippet?f.insertSnippet(E,v.snippet,{range:v.range}):this.$insertString(E,v),v.command&&v.command==="startAutocomplete"&&E.execCommand(v.command)}return E.endOperation(),!0},S.prototype.$insertString=function(E,v){var w=v.value||v;if(v.range){if(E.inVirtualSelectionMode)return E.session.replace(v.range,w);E.forEachSelection(function(){var b=E.getSelectionRange();v.range.compareRange(b)===0?E.session.replace(v.range,w):E.insert(w)},null,{keepOrder:!0})}else E.execCommand("insertstring",w)},S.prototype.gatherCompletions=function(E,v){var w=E.getSession(),b=E.getCursorPosition(),m=c.getCompletionPrefix(E),$=[],A=E.completers.length;return E.completers.forEach(function(C,k){C.getCompletions(E,w,b,m,function(I,L){!I&&L&&($=$.concat(L)),v(null,{prefix:c.getCompletionPrefix(E),matches:$,finished:--A===0})})}),!0},S.prototype.provideCompletions=function(E,v,w){var b=function(C){var k=C.prefix,I=C.matches;this.completions=new x(I),v.exactMatch&&(this.completions.exactMatch=!0),v.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(k),(C.finished||this.completions.filtered.length)&&w(null,this.completions,C.finished)}.bind(this),m=!0,$=null;if(this.gatherCompletions(E,function(C,k){if(this.active){C&&(w(C,[],!0),this.detach());var I=k.prefix;if(I.indexOf(k.prefix)===0){if(m){$=k;return}b(k)}}}.bind(this)),m=!1,$){var A=$;$=null,b(A)}},S.prototype.detach=function(){this.active=!1},S}(),x=function(){function S(E,v){this.all=E,this.filtered=E,this.filterText=v||"",this.exactMatch=!1,this.ignoreCaption=!1}return S.prototype.setFilter=function(E){if(E.length>this.filterText&&E.lastIndexOf(this.filterText,0)===0)var v=this.filtered;else var v=this.all;this.filterText=E,v=this.filterCompletions(v,this.filterText),v=v.sort(function(b,m){return m.exactMatch-b.exactMatch||m.$score-b.$score||(b.caption||b.value).localeCompare(m.caption||m.value)});var w=null;v=v.filter(function(b){var m=b.snippet||b.caption||b.value;return m===w?!1:(w=m,!0)}),this.filtered=v},S.prototype.filterCompletions=function(E,v){var w=[],b=v.toUpperCase(),m=v.toLowerCase();e:for(var $=0,A;A=E[$];$++){var C=!this.ignoreCaption&&A.caption||A.value||A.snippet;if(C){var k=-1,I=0,L=0,T,R;if(this.exactMatch){if(v!==C.substr(0,v.length))continue e}else{var P=C.toLowerCase().indexOf(m);if(P>-1)L=P;else for(var D=0;D<v.length;D++){var N=C.indexOf(m[D],k+1),B=C.indexOf(b[D],k+1);if(T=N>=0&&(B<0||N<B)?N:B,T<0)continue e;R=T-k-1,R>0&&(k===-1&&(L+=10),L+=R,I=I|1<<D),k=T}}A.matchMask=I,A.exactMatch=L?0:1,A.$score=(A.score||0)-L,w.push(A)}}return w},S}();r.Autocomplete=g,r.CompletionProvider=y,r.FilteredList=x}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(n,r,i){var o=n("../range").Range,s=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function d(c,u){var l=c.getTextRange(o.fromPoints({row:0,column:0},u));return l.split(s).length-1}function a(c,u){var l=d(c,u),f=c.getValue().split(s),h=Object.create(null),p=f[l];return f.forEach(function(g,y){if(!(!g||g===p)){var x=Math.abs(l-y),S=f.length-x;h[g]?h[g]=Math.max(S,h[g]):h[g]=S}}),h}r.getCompletions=function(c,u,l,f,h){var p=a(u,l),g=Object.keys(p);h(null,g.map(function(y){return{caption:y,value:y,score:p[y],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(n,r,i){var o=n("../snippets").snippetManager,s=n("../autocomplete").Autocomplete,d=n("../config"),a=n("../lib/lang"),c=n("../autocomplete/util"),u=n("../autocomplete/text_completer"),l={getCompletions:function(w,b,m,$,A){if(b.$mode.completer)return b.$mode.completer.getCompletions(w,b,m,$,A);var C=w.session.getState(m.row),k=b.$mode.getCompletions(C,b,m,$);k=k.map(function(I){return I.completerId=l.id,I}),A(null,k)},id:"keywordCompleter"},f=function(w){var b={};return w.replace(/\${(\d+)(:(.*?))?}/g,function(m,$,A,C){return b[$]=C||""}).replace(/\$(\d+?)/g,function(m,$){return b[$]})},h={getCompletions:function(w,b,m,$,A){var C=[],k=b.getTokenAt(m.row,m.column);k&&k.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?C.push("html-tag"):C=o.getActiveScopes(w);var I=o.snippetMap,L=[];C.forEach(function(T){for(var R=I[T]||[],P=R.length;P--;){var D=R[P],N=D.name||D.tabTrigger;N&&L.push({caption:N,snippet:D.content,meta:D.tabTrigger&&!D.name?D.tabTrigger+"⇥ ":"snippet",completerId:h.id})}},this),A(null,L)},getDocTooltip:function(w){w.snippet&&!w.docHTML&&(w.docHTML=["<b>",a.escapeHTML(w.caption),"</b>","<hr></hr>",a.escapeHTML(f(w.snippet))].join(""))},id:"snippetCompleter"},p=[h,u,l];r.setCompleters=function(w){p.length=0,w&&p.push.apply(p,w)},r.addCompleter=function(w){p.push(w)},r.textCompleter=u,r.keyWordCompleter=l,r.snippetCompleter=h;var g={name:"expandSnippet",exec:function(w){return o.expandWithTab(w)},bindKey:"Tab"},y=function(w,b){x(b.session.$mode)},x=function(w){typeof w=="string"&&(w=d.$modes[w]),w&&(o.files||(o.files={}),S(w.$id,w.snippetFileId),w.modes&&w.modes.forEach(x))},S=function(w,b){!b||!w||o.files[w]||(o.files[w]={},d.loadModule(b,function(m){m&&(o.files[w]=m,!m.snippets&&m.snippetText&&(m.snippets=o.parseSnippetFile(m.snippetText)),o.register(m.snippets||[],m.scope),m.includeScopes&&(o.snippetMap[m.scope].includeScopes=m.includeScopes,m.includeScopes.forEach(function($){x("ace/mode/"+$)})))}))},E=function(w){var b=w.editor,m=b.completer&&b.completer.activated;if(w.command.name==="backspace")m&&!c.getCompletionPrefix(b)&&b.completer.detach();else if(w.command.name==="insertstring"){var $=c.getCompletionPrefix(b),A=c.triggerAutocomplete(b);if(($||A)&&!m){var C=s.for(b);C.autoShown=!0,C.showPopup(b)}}},v=n("../editor").Editor;n("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(w){w?(this.completers||(this.completers=Array.isArray(w)?w:p),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function(w){w?(this.completers||(this.completers=Array.isArray(w)?w:p),this.commands.on("afterExec",E)):this.commands.removeListener("afterExec",E)},value:!1},enableSnippets:{set:function(w){w?(this.commands.addCommand(g),this.on("changeMode",y),y(null,this)):(this.commands.removeCommand(g),this.off("changeMode",y))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(n){e&&(e.exports=n)})}()})(TX);const io=F.createContext({images:[],setImages:()=>{},filteredImages:[],setFilteredImages:()=>{}});function AX({children:e}){const[t,n]=F.useState([]),[r,i]=F.useState([]),[o,s]=F.useState([]);F.useEffect(()=>{const l=[...new Set(o)];l.length!==o.length&&s(l)},[o]);const u={images:t,setImages:n,filteredImages:r,setFilteredImages:i,deleteImg:async(l,f)=>{const{path:h}=f;function p(){const g=t.filter(y=>y.path!==decodeURIComponent(h));n([...g])}if(l==="delete"){const g=await fetch(`/cozy-nest/image?path=${h}`,{method:"DELETE",headers:{"Content-Type":"application/json"}}),y=await g.json();$t.debug("json",y),g.ok&&p()}else if(l==="archive"){const g=await fetch(`/cozy-nest/image?path=${h}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({archive:!0})}),y=await g.json();$t.debug("json",y),g.ok&&p()}},updateExifInState:l=>{const{metadata:{exif:f},hash:h}=l,p=t.map(g=>(g.hash===h&&(g.metadata.exif=f),g));n([...p])},getImage:l=>t.find(f=>f.hash===l),tags:o,setTags:s};return j.jsx(io.Provider,{value:u,children:e})}ace.config.setModuleUrl("ace/mode/json_worker","cozy-nest-client/node_modules/ace-builds/src-noconflict/worker-json.js");function MX({onClose:e,visible:t,imageHash:n}){const[r,i]=F.useState({}),[o,s]=F.useState(""),[d,a]=F.useState(!1),{images:c,getImage:u}=F.useContext(io),[l,f]=F.useState(u(n));F.useEffect(()=>{f(u(n))},[c,n]),F.useEffect(()=>{i(l.metadata.exif),s(JSON.stringify(l.metadata.exif,null,2)),a(!0)},[t,l]);const h=y=>{s(y);try{const x=JSON.parse(y);i(x),a(!0)}catch{a(!1)}},p=async()=>{if(!d)return;const y=l.path;await zw(y,r)},g=()=>{e()};return j.jsxs(j.Fragment,{children:[t&&j.jsx("div",{className:"ExifEditor backdrop",children:j.jsxs("div",{className:"container",children:[j.jsx("h1",{children:"Exif Editor"}),j.jsx(qM,{mode:"json",theme:"github_dark",showPrintMargin:!1,onChange:h,value:o,name:"ace-json-editor",editorProps:{$blockScrolling:!0},style:{width:"100%",height:"100%",zIndex:200},setOptions:{enableSnippets:!0,cursorStyle:"smooth",behavioursEnabled:!0,wrapBehavioursEnabled:!0,autoScrollEditorIntoView:!0,wrap:!0}}),j.jsx(Er,{disabled:!d,onClick:p,children:d?"Save":"Invalid JSON"}),j.jsx(Er,{onClick:()=>g(),children:"Close"})]})}),!t&&j.jsx("div",{})]})}async function zw(e,t){e.indexOf("%")!==-1&&(e=decodeURIComponent(e)),t["cozy-nest-tags"]&&t["cozy-nest-tags"].match(/^,+$/g)&&(t["cozy-nest-tags"]="");const r=await(await fetch("/cozy-nest/image-exif",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,data:t})})).json();$t.debug("json",r)}const iy={save:zw,ExifEditor:MX};function jw({message:e,buttonLabel:t,confirmLabel:n,cancelLabel:r,onConfirm:i,style:o}){const{isOpen:s,onOpen:d,onClose:a}=Z3(),c=F.useRef(),u=t||n;return o?o={...o,width:"100%"}:o={width:"100%"},j.jsxs(j.Fragment,{children:[j.jsx(Er,{className:"btn-settings",style:o,onClick:d,children:u}),j.jsx(dM,{isOpen:s,leastDestructiveRef:c,onClose:a,variant:"nevysha-confirm",children:j.jsx(Ew,{children:j.jsxs(fM,{children:[j.jsx(pM,{fontSize:"lg",fontWeight:"bold",children:"Confirm Action"}),j.jsx($w,{children:e}),j.jsxs(hM,{children:[j.jsx("button",{className:"btn-settings",ref:c,onClick:a,children:r}),j.jsx("button",{className:"btn-settings",onClick:()=>{a(),i()},children:n})]})]})})})]})}function LX({imageHash:e}){const{images:t,getImage:n}=F.useContext(io),[r,i]=F.useState(n(e));F.useEffect(()=>{i(n(e))},[t,e]);const o=(s,d)=>{if(s.preventDefault(),s.stopPropagation(),window.sendToPipe){let a={src:`/cozy-nest/image?path=${r.path}`};window.sendToPipe(d,a)}};return j.jsxs(Cn,{children:[j.jsx(Er,{onClick:s=>o(s,"txt2img"),children:"txt2img"}),j.jsx(Er,{onClick:s=>o(s,"img2img"),children:"img2img"}),j.jsx(Er,{onClick:s=>o(s,"inpainting"),children:"inpainting"})]})}function RX({imageHash:e}){const{images:t,deleteImg:n,updateExifInState:r,getImage:i}=F.useContext(io),[o,s]=F.useState(!1),[d,a]=F.useState({}),[c,u]=F.useState(!1),[l,f]=F.useState(i(e));F.useEffect(()=>{f(i(e))},[t,e]),F.useEffect(()=>{!l||!l.path||a(l.metadata.exif)},[l,e]),F.useEffect(()=>{d&&u(d["cozy-nest-hidden"]==="True")},[d,l,t]);const h=async()=>{s(!0)},p=async()=>{const x=l.path;d["cozy-nest-hidden"]="True",a(d),await iy.save(x,d),r(l)},g=async()=>{const x=l.path;d["cozy-nest-hidden"]="False",a(d),await iy.save(x,d),r(l)},y=iy.ExifEditor;return j.jsxs(Qr,{style:{height:"100%",justifyContent:"space-between"},children:[j.jsx(LX,{imageHash:e}),j.jsxs(Qr,{children:[j.jsxs(Cn,{children:[o&&j.jsx(y,{imageHash:e,exif:d,visible:o,onClose:()=>s(!1)}),j.jsx(Er,{onClick:h,children:"Edit Exif"})]}),j.jsxs(Cn,{children:[!c&&j.jsx(Er,{onClick:p,children:"Hide"}),c&&j.jsx(Er,{onClick:g,children:"Show"}),j.jsx(Er,{onClick:()=>n("archive",l),children:"Move to archive"}),j.jsx(jw,{style:{height:"100%"},message:"This action cannot be undone. Are you sure?",confirmLabel:"Delete",cancelLabel:"Cancel",onConfirm:()=>n("delete",l)})]})]})]})}function hk(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 Ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hk(Object(n),!0).forEach(function(r){Zl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fr(e,t){if(e==null)return{};var n=rm(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var pk=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function PX(e,t){return!!(e===t||pk(e)&&pk(t))}function IX(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!PX(e[n],t[n]))return!1;return!0}function YM(e,t){t===void 0&&(t=IX);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var s=e.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}function OX(e){if(Array.isArray(e))return e}function FX(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,d=[],a=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=o.call(n)).done)&&(d.push(r.value),d.length!==t);a=!0);}catch(u){c=!0,i=u}finally{try{if(!a&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return d}}function sb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function XM(e,t){if(e){if(typeof e=="string")return sb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sb(e,t)}}function DX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ri(e,t){return OX(e)||FX(e,t)||XM(e,t)||DX()}function NX(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function zX(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}const jX=["top","right","bottom","left"];jX.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);function to(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ZM(e){return to(e).getComputedStyle(e)}function QM(e){return e instanceof to(e).Node}function JM(e){return QM(e)?(e.nodeName||"").toLowerCase():""}function Bw(e){return e instanceof to(e).HTMLElement}function Cs(e){return e instanceof to(e).Element}function gk(e){return typeof ShadowRoot>"u"?!1:e instanceof to(e).ShadowRoot||e instanceof ShadowRoot}function eL(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ZM(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function BX(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function HX(e){return["html","body","#document"].includes(JM(e))}const eg=Math.round;function VX(e){const t=ZM(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Bw(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,d=eg(n)!==o||eg(r)!==s;return d&&(n=o,r=s),{width:n,height:r,fallback:d}}function tL(e){return Cs(e)?e:e.contextElement}const nL={x:1,y:1};function oy(e){const t=tL(e);if(!Bw(t))return nL;const n=t.getBoundingClientRect(),{width:r,height:i,fallback:o}=VX(t);let s=(o?eg(n.width):n.width)/r,d=(o?eg(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),d&&Number.isFinite(d)||(d=1),{x:s,y:d}}const mk={x:0,y:0};function WX(e,t,n){var r,i;if(t===void 0&&(t=!0),!BX())return mk;const o=e?to(e):window;return!n||t&&n!==o?mk:{x:((r=o.visualViewport)==null?void 0:r.offsetLeft)||0,y:((i=o.visualViewport)==null?void 0:i.offsetTop)||0}}function vk(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=tL(e);let s=nL;t&&(r?Cs(r)&&(s=oy(r)):s=oy(e));const d=WX(o,n,r);let a=(i.left+d.x)/s.x,c=(i.top+d.y)/s.y,u=i.width/s.x,l=i.height/s.y;if(o){const f=to(o),h=r&&Cs(r)?to(r):r;let p=f.frameElement;for(;p&&r&&h!==f;){const g=oy(p),y=p.getBoundingClientRect(),x=getComputedStyle(p);y.x+=(p.clientLeft+parseFloat(x.paddingLeft))*g.x,y.y+=(p.clientTop+parseFloat(x.paddingTop))*g.y,a*=g.x,c*=g.y,u*=g.x,l*=g.y,a+=y.x,c+=y.y,p=to(p).frameElement}}return zX({width:u,height:l,x:a,y:c})}function UX(e){return((QM(e)?e.ownerDocument:e.document)||window.document).documentElement}function GX(e){if(JM(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gk(e)&&e.host||UX(e);return gk(t)?t.host:t}function rL(e){const t=GX(e);return HX(t)?t.ownerDocument.body:Bw(t)&&eL(t)?t:rL(t)}function Kh(e,t){var n;t===void 0&&(t=[]);const r=rL(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=to(r);return i?t.concat(o,o.visualViewport||[],eL(r)?r:[]):t.concat(r,Kh(r))}function KX(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=!0,animationFrame:d=!1}=r,a=i||o?[...Cs(e)?Kh(e):e.contextElement?Kh(e.contextElement):[],...Kh(t)]:[];a.forEach(f=>{const h=!Cs(f)&&f.toString().includes("V");!i||d&&!h||f.addEventListener("scroll",n,{passive:!0}),o&&f.addEventListener("resize",n)});let c,u=null;s&&(u=new ResizeObserver(()=>{n()}),Cs(e)&&!d&&u.observe(e),Cs(e)||!e.contextElement||d||u.observe(e.contextElement),u.observe(t));let l=d?vk(e):null;return d&&function f(){const h=vk(e);!l||h.x===l.x&&h.y===l.y&&h.width===l.width&&h.height===l.height||n(),l=h,c=requestAnimationFrame(f)}(),n(),()=>{var f;a.forEach(h=>{i&&h.removeEventListener("scroll",n),o&&h.removeEventListener("resize",n)}),(f=u)==null||f.disconnect(),u=null,d&&cancelAnimationFrame(c)}}var lb=F.useLayoutEffect,qX=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],tg=function(){};function YX(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function XX(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&o.push("".concat(YX(e,s)));return o.filter(function(d){return d}).map(function(d){return String(d).trim()}).join(" ")}var ng=function(t){return oZ(t)?t.filter(Boolean):Vs(t)==="object"&&t!==null?[t]:[]},iL=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Fr(t,qX);return Ge({},n)},rn=function(t,n,r){var i=t.cx,o=t.getStyles,s=t.getClassNames,d=t.className;return{css:o(n,t),className:i(r??{},s(n,t),d)}};function _m(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ZX(e){return _m(e)?window.innerHeight:e.clientHeight}function oL(e){return _m(e)?window.pageYOffset:e.scrollTop}function rg(e,t){if(_m(e)){window.scrollTo(0,t);return}e.scrollTop=t}function QX(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function JX(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Jf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:tg,i=oL(e),o=t-i,s=10,d=0;function a(){d+=s;var c=JX(d,i,o,n);rg(e,c),d<n?window.requestAnimationFrame(a):r(e)}a()}function yk(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?rg(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&rg(e,Math.max(t.offsetTop-i,0))}function eZ(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function bk(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function tZ(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var aL=!1,nZ={get passive(){return aL=!0}},eh=typeof window<"u"?window:{};eh.addEventListener&&eh.removeEventListener&&(eh.addEventListener("p",tg,nZ),eh.removeEventListener("p",tg,!1));var rZ=aL;function iZ(e){return e!=null}function oZ(e){return Array.isArray(e)}function Mc(e,t,n){return e?t:n}var aZ=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(s){var d=ri(s,1),a=d[0];return!r.includes(a)});return o.reduce(function(s,d){var a=ri(d,2),c=a[0],u=a[1];return s[c]=u,s},{})};function sZ(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,s=e.isFixedPosition,d=e.controlHeight,a=QX(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=a.getBoundingClientRect(),l=u.height,f=n.getBoundingClientRect(),h=f.bottom,p=f.height,g=f.top,y=n.offsetParent.getBoundingClientRect(),x=y.top,S=s?window.innerHeight:ZX(a),E=oL(a),v=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),b=x-w,m=S-g,$=b+E,A=l-E-g,C=h-S+E+v,k=E+g-w,I=160;switch(i){case"auto":case"bottom":if(m>=p)return{placement:"bottom",maxHeight:t};if(A>=p&&!s)return o&&Jf(a,C,I),{placement:"bottom",maxHeight:t};if(!s&&A>=r||s&&m>=r){o&&Jf(a,C,I);var L=s?m-v:A-v;return{placement:"bottom",maxHeight:L}}if(i==="auto"||s){var T=t,R=s?b:$;return R>=r&&(T=Math.min(R-v-d,t)),{placement:"top",maxHeight:T}}if(i==="bottom")return o&&rg(a,C),{placement:"bottom",maxHeight:t};break;case"top":if(b>=p)return{placement:"top",maxHeight:t};if($>=p&&!s)return o&&Jf(a,k,I),{placement:"top",maxHeight:t};if(!s&&$>=r||s&&b>=r){var P=t;return(!s&&$>=r||s&&b>=r)&&(P=s?b-w:$-w),o&&Jf(a,k,I),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function lZ(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var sL=function(t){return t==="auto"?"bottom":t},uZ=function(t,n){var r,i=t.placement,o=t.theme,s=o.borderRadius,d=o.spacing,a=o.colors;return Ge((r={label:"menu"},Zl(r,lZ(i),"100%"),Zl(r,"position","absolute"),Zl(r,"width","100%"),Zl(r,"zIndex",1),r),n?{}:{backgroundColor:a.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:d.menuGutter,marginTop:d.menuGutter})},lL=F.createContext(null),cZ=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,s=t.menuPosition,d=t.menuShouldScrollIntoView,a=t.theme,c=F.useContext(lL)||{},u=c.setPortalPlacement,l=F.useRef(null),f=F.useState(i),h=ri(f,2),p=h[0],g=h[1],y=F.useState(null),x=ri(y,2),S=x[0],E=x[1],v=a.spacing.controlHeight;return lb(function(){var w=l.current;if(w){var b=s==="fixed",m=d&&!b,$=sZ({maxHeight:i,menuEl:w,minHeight:r,placement:o,shouldScroll:m,isFixedPosition:b,controlHeight:v});g($.maxHeight),E($.placement),u==null||u($.placement)}},[i,o,s,d,r,u,v]),n({ref:l,placerProps:Ge(Ge({},t),{},{placement:S||sL(o),maxHeight:p})})},dZ=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return Qe("div",ze({},rn(t,"menu",{menu:!0}),{ref:r},i),n)},fZ=dZ,hZ=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return Ge({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},pZ=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return Qe("div",ze({},rn(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},uL=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Ge({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},gZ=uL,mZ=uL,cL=function(t){var n=t.children,r=t.innerProps;return Qe("div",ze({},rn(t,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)};cL.defaultProps={children:"No options"};var dL=function(t){var n=t.children,r=t.innerProps;return Qe("div",ze({},rn(t,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)};dL.defaultProps={children:"Loading..."};var vZ=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},yZ=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,s=t.menuPlacement,d=t.menuPosition,a=F.useRef(null),c=F.useRef(null),u=F.useState(sL(s)),l=ri(u,2),f=l[0],h=l[1],p=F.useMemo(function(){return{setPortalPlacement:h}},[]),g=F.useState(null),y=ri(g,2),x=y[0],S=y[1],E=F.useCallback(function(){if(i){var m=eZ(i),$=d==="fixed"?0:window.pageYOffset,A=m[f]+$;(A!==(x==null?void 0:x.offset)||m.left!==(x==null?void 0:x.rect.left)||m.width!==(x==null?void 0:x.rect.width))&&S({offset:A,rect:m})}},[i,d,f,x==null?void 0:x.offset,x==null?void 0:x.rect.left,x==null?void 0:x.rect.width]);lb(function(){E()},[E]);var v=F.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&a.current&&(c.current=KX(i,a.current,E,{elementResize:"ResizeObserver"in window}))},[i,E]);lb(function(){v()},[v]);var w=F.useCallback(function(m){a.current=m,v()},[v]);if(!n&&d!=="fixed"||!x)return null;var b=Qe("div",ze({ref:w},rn(Ge(Ge({},t),{},{offset:x.offset,position:d,rect:x.rect}),"menuPortal",{"menu-portal":!0}),o),r);return Qe(lL.Provider,{value:p},n?Wd.createPortal(b,n):b)},bZ=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},wZ=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return Qe("div",ze({},rn(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},SZ=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,s=t.selectProps.controlShouldRenderValue;return Ge({alignItems:"center",display:i&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},xZ=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return Qe("div",ze({},rn(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},_Z=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},CZ=function(t){var n=t.children,r=t.innerProps;return Qe("div",ze({},rn(t,"indicatorsContainer",{indicators:!0}),r),n)},wk,kZ=["size"],EZ={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},fL=function(t){var n=t.size,r=Fr(t,kZ);return Qe("svg",ze({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:EZ},r))},Hw=function(t){return Qe(fL,ze({size:20},t),Qe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},hL=function(t){return Qe(fL,ze({size:20},t),Qe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},pL=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return Ge({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:o*2,":hover":{color:r?s.neutral80:s.neutral40}})},$Z=pL,TZ=function(t){var n=t.children,r=t.innerProps;return Qe("div",ze({},rn(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Qe(hL,null))},AZ=pL,MZ=function(t){var n=t.children,r=t.innerProps;return Qe("div",ze({},rn(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Qe(Hw,null))},LZ=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return Ge({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},RZ=function(t){var n=t.innerProps;return Qe("span",ze({},n,rn(t,"indicatorSeparator",{"indicator-separator":!0})))},PZ=Gd(wk||(wk=NX([`
0%, 80%, 100% { opacity: 0; }
40% { opacity: 1; }
`]))),IZ=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,s=o.colors,d=o.spacing.baseUnit;return Ge({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:d*2})},ay=function(t){var n=t.delay,r=t.offset;return Qe("span",{css:R1({animation:"".concat(PZ," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},gL=function(t){var n=t.innerProps,r=t.isRtl;return Qe("div",ze({},rn(t,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Qe(ay,{delay:0,offset:r}),Qe(ay,{delay:160,offset:!0}),Qe(ay,{delay:320,offset:!r}))};gL.defaultProps={size:4};var OZ=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,s=o.colors,d=o.borderRadius,a=o.spacing;return Ge({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:d,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},FZ=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,s=t.innerProps,d=t.menuIsOpen;return Qe("div",ze({ref:o},rn(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":d}),s),n)},DZ=FZ,NZ=["data"],zZ=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},jZ=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,s=t.Heading,d=t.headingProps,a=t.innerProps,c=t.label,u=t.theme,l=t.selectProps;return Qe("div",ze({},rn(t,"group",{group:!0}),a),Qe(s,ze({},d,{selectProps:l,theme:u,getStyles:i,getClassNames:o,cx:r}),c),Qe("div",null,n))},BZ=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return Ge({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},HZ=function(t){var n=iL(t);n.data;var r=Fr(n,NZ);return Qe("div",ze({},rn(t,"groupHeading",{"group-heading":!0}),r))},VZ=jZ,WZ=["innerRef","isDisabled","isHidden","inputClassName"],UZ=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,s=o.spacing,d=o.colors;return Ge(Ge({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},GZ),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:d.neutral80})},mL={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},GZ={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ge({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},mL)},KZ=function(t){return Ge({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},mL)},qZ=function(t){var n=t.cx,r=t.value,i=iL(t),o=i.innerRef,s=i.isDisabled,d=i.isHidden,a=i.inputClassName,c=Fr(i,WZ);return Qe("div",ze({},rn(t,"input",{"input-container":!0}),{"data-value":r||""}),Qe("input",ze({className:n({input:!0},a),ref:o,style:KZ(d),disabled:s},c)))},YZ=qZ,XZ=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,s=r.colors;return Ge({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},ZZ=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,s=t.cropWithEllipsis;return Ge({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},QZ=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,s=r.colors,d=t.isFocused;return Ge({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:d?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},vL=function(t){var n=t.children,r=t.innerProps;return Qe("div",r,n)},JZ=vL,eQ=vL;function tQ(e){var t=e.children,n=e.innerProps;return Qe("div",ze({role:"button"},n),t||Qe(Hw,{size:14}))}var nQ=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,s=t.isDisabled,d=t.removeProps,a=t.selectProps,c=r.Container,u=r.Label,l=r.Remove;return Qe(c,{data:i,innerProps:Ge(Ge({},rn(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:a},Qe(u,{data:i,innerProps:Ge({},rn(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},n),Qe(l,{data:i,innerProps:Ge(Ge({},rn(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},d),selectProps:a}))},rQ=nQ,iQ=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,s=t.theme,d=s.spacing,a=s.colors;return Ge({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?a.primary:i?a.primary25:"transparent",color:r?a.neutral20:o?a.neutral0:"inherit",padding:"".concat(d.baseUnit*2,"px ").concat(d.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?a.primary:a.primary50}})},oQ=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,s=t.innerRef,d=t.innerProps;return Qe("div",ze({},rn(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:s,"aria-disabled":r},d),n)},aQ=oQ,sQ=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return Ge({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},lQ=function(t){var n=t.children,r=t.innerProps;return Qe("div",ze({},rn(t,"placeholder",{placeholder:!0}),r),n)},uQ=lQ,cQ=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,s=i.colors;return Ge({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},dQ=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Qe("div",ze({},rn(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},fQ=dQ,hQ={ClearIndicator:MZ,Control:DZ,DropdownIndicator:TZ,DownChevron:hL,CrossIcon:Hw,Group:VZ,GroupHeading:HZ,IndicatorsContainer:CZ,IndicatorSeparator:RZ,Input:YZ,LoadingIndicator:gL,Menu:fZ,MenuList:pZ,MenuPortal:yZ,LoadingMessage:dL,NoOptionsMessage:cL,MultiValue:rQ,MultiValueContainer:JZ,MultiValueLabel:eQ,MultiValueRemove:tQ,Option:aQ,Placeholder:uQ,SelectContainer:wZ,SingleValue:fQ,ValueContainer:xZ},yL=function(t){return Ge(Ge({},hQ),t.components)};const Sk={disabled:!1},ig=Le.createContext(null);var pQ=function(t){return t.scrollTop},Lc="unmounted",ps="exited",gs="entering",Rl="entered",ub="exiting",Wo=function(e){bw(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,d=s&&!s.isMounting?r.enter:r.appear,a;return o.appearStatus=null,r.in?d?(a=ps,o.appearStatus=gs):a=Rl:r.unmountOnExit||r.mountOnEnter?a=Lc:a=ps,o.state={status:a},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Lc?{status:ps}: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 s=this.state.status;this.props.in?s!==gs&&s!==Rl&&(o=gs):(s===gs||s===Rl)&&(o=ub)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,d;return o=s=d=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,d=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:d}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===gs){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:If.findDOMNode(this);s&&pQ(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ps&&this.setState({status:Lc})},n.performEnter=function(i){var o=this,s=this.props.enter,d=this.context?this.context.isMounting:i,a=this.props.nodeRef?[d]:[If.findDOMNode(this),d],c=a[0],u=a[1],l=this.getTimeouts(),f=d?l.appear:l.enter;if(!i&&!s||Sk.disabled){this.safeSetState({status:Rl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:gs},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Rl},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),d=this.props.nodeRef?void 0:If.findDOMNode(this);if(!o||Sk.disabled){this.safeSetState({status:ps},function(){i.props.onExited(d)});return}this.props.onExit(d),this.safeSetState({status:ub},function(){i.props.onExiting(d),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:ps},function(){i.props.onExited(d)})})})},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,s=!0;return this.nextCallback=function(d){s&&(s=!1,o.nextCallback=null,i(d))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:If.findDOMNode(this),d=i==null&&!this.props.addEndListener;if(!s||d){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=a[0],u=a[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Lc)return null;var o=this.props,s=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 d=rm(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Le.createElement(ig.Provider,{value:null},typeof s=="function"?s(i,d):Le.cloneElement(Le.Children.only(s),d))},t}(Le.Component);Wo.contextType=ig;Wo.propTypes={};function El(){}Wo.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:El,onEntering:El,onEntered:El,onExit:El,onExiting:El,onExited:El};Wo.UNMOUNTED=Lc;Wo.EXITED=ps;Wo.ENTERING=gs;Wo.ENTERED=Rl;Wo.EXITING=ub;const bL=Wo;function wL(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vw(e,t){var n=function(o){return t&&F.isValidElement(o)?t(o):o},r=Object.create(null);return e&&F.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function gQ(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,d={};for(var a in t){if(r[a])for(s=0;s<r[a].length;s++){var c=r[a][s];d[r[a][s]]=n(c)}d[a]=n(a)}for(s=0;s<i.length;s++)d[i[s]]=n(i[s]);return d}function ks(e,t,n){return n[t]!=null?n[t]:e.props[t]}function mQ(e,t){return Vw(e.children,function(n){return F.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:ks(n,"appear",e),enter:ks(n,"enter",e),exit:ks(n,"exit",e)})})}function vQ(e,t,n){var r=Vw(e.children),i=gQ(t,r);return Object.keys(i).forEach(function(o){var s=i[o];if(F.isValidElement(s)){var d=o in t,a=o in r,c=t[o],u=F.isValidElement(c)&&!c.props.in;a&&(!d||u)?i[o]=F.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:ks(s,"exit",e),enter:ks(s,"enter",e)}):!a&&d&&!u?i[o]=F.cloneElement(s,{in:!1}):a&&d&&F.isValidElement(c)&&(i[o]=F.cloneElement(s,{onExited:n.bind(null,s),in:c.props.in,exit:ks(s,"exit",e),enter:ks(s,"enter",e)}))}}),i}var yQ=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},bQ={component:"div",childFactory:function(t){return t}},Ww=function(e){bw(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=o.handleExited.bind(wL(o));return o.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},o}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,o){var s=o.children,d=o.handleExited,a=o.firstRender;return{children:a?mQ(i,d):vQ(i,s,d),firstRender:!1}},n.handleExited=function(i,o){var s=Vw(this.props.children);i.key in s||(i.props.onExited&&i.props.onExited(o),this.mounted&&this.setState(function(d){var a=ze({},d.children);return delete a[i.key],{children:a}}))},n.render=function(){var i=this.props,o=i.component,s=i.childFactory,d=rm(i,["component","childFactory"]),a=this.state.contextValue,c=yQ(this.state.children).map(s);return delete d.appear,delete d.enter,delete d.exit,o===null?Le.createElement(ig.Provider,{value:a},c):Le.createElement(ig.Provider,{value:a},Le.createElement(o,d,c))},t}(Le.Component);Ww.propTypes={};Ww.defaultProps=bQ;const SL=Ww;var wQ=["in","onExited","appear","enter","exit"],SQ=function(t){return function(n){n.in,n.onExited,n.appear,n.enter,n.exit;var r=Fr(n,wQ);return F.createElement(t,r)}},xQ=SQ,_Q=["component","duration","in","onExited"],xL=function(t){var n=t.component,r=t.duration,i=r===void 0?1:r,o=t.in;t.onExited;var s=Fr(t,_Q),d=F.useRef(null),a={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(i,"ms")},exiting:{opacity:0},exited:{opacity:0}};return F.createElement(bL,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:i,nodeRef:d},function(c){var u={style:Ge({},a[c]),ref:d};return F.createElement(n,ze({innerProps:u},s))})},cb=260,CQ=function(t){var n=t.children,r=t.in,i=t.onExited,o=F.useRef(null),s=F.useState("auto"),d=ri(s,2),a=d[0],c=d[1];F.useEffect(function(){var l=o.current;if(l){var f=window.requestAnimationFrame(function(){return c(l.getBoundingClientRect().width)});return function(){return window.cancelAnimationFrame(f)}}},[]);var u=function(f){switch(f){default:return{width:a};case"exiting":return{width:0,transition:"width ".concat(cb,"ms ease-out")};case"exited":return{width:0}}};return F.createElement(bL,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,onExited:function(){var f=o.current;f&&(i==null||i(f))},timeout:cb,nodeRef:o},function(l){return F.createElement("div",{ref:o,style:Ge({overflow:"hidden",whiteSpace:"nowrap"},u(l))},n)})},kQ=["in","onExited"],EQ=function(t){return function(n){var r=n.in,i=n.onExited,o=Fr(n,kQ);return F.createElement(CQ,{in:r,onExited:i},F.createElement(t,ze({cropWithEllipsis:r},o)))}},$Q=EQ,TQ=function(t){return function(n){return F.createElement(xL,ze({component:t,duration:n.isMulti?cb:1},n))}},AQ=TQ,MQ=function(t){return function(n){return F.createElement(xL,ze({component:t},n))}},LQ=MQ,RQ=["component"],PQ=["children"],IQ=function(t){return function(n){return n.isMulti?F.createElement(OQ,ze({component:t},n)):F.createElement(SL,ze({component:t},n))}},OQ=function(t){var n=t.component,r=Fr(t,RQ),i=FQ(r);return F.createElement(SL,ze({component:n},i))},FQ=function(t){var n=t.children,r=Fr(t,PQ),i=r.isMulti,o=r.hasValue,s=r.innerProps,d=r.selectProps,a=d.components,c=d.controlShouldRenderValue,u=F.useState(i&&c&&o),l=ri(u,2),f=l[0],h=l[1],p=F.useState(!1),g=ri(p,2),y=g[0],x=g[1];F.useEffect(function(){o&&!f&&h(!0)},[o,f]),F.useEffect(function(){y&&!o&&f&&h(!1),x(!1)},[y,o,f]);var S=function(){return x(!0)},E=function(m){if(i&&F.isValidElement(m)){if(m.type===a.MultiValue)return F.cloneElement(m,{onExited:S});if(m.type===a.Placeholder&&f)return null}return m},v=Ge(Ge({},s),{},{style:Ge(Ge({},s==null?void 0:s.style),{},{display:i&&o||f?"flex":"grid"})}),w=Ge(Ge({},r),{},{innerProps:v,children:F.Children.toArray(n).map(E)});return w},DQ=IQ,NQ=["Input","MultiValue","Placeholder","SingleValue","ValueContainer"],_L=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=yL({components:t}),r=n.Input,i=n.MultiValue,o=n.Placeholder,s=n.SingleValue,d=n.ValueContainer,a=Fr(n,NQ);return Ge({Input:xQ(r),MultiValue:$Q(i),Placeholder:AQ(o),SingleValue:LQ(s),ValueContainer:DQ(d)},a)},uf=_L();uf.Input;uf.MultiValue;uf.Placeholder;uf.SingleValue;uf.ValueContainer;var zQ=YM(_L);function jQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,T3(r.key),r)}}function BQ(e,t,n){return t&&xk(e.prototype,t),n&&xk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function HQ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bp(e,t)}function og(e){return og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},og(e)}function VQ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function WQ(e,t){if(t&&(Vs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wL(e)}function UQ(e){var t=VQ();return function(){var r=og(e),i;if(t){var o=og(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return WQ(this,i)}}function GQ(e){if(Array.isArray(e))return sb(e)}function KQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qc(e){return GQ(e)||KQ(e)||XM(e)||qQ()}var YQ={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},XQ=function(t){return Qe("span",ze({css:YQ},t))},_k=XQ,ZQ={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.isDisabled,o=t.tabSelectsValue,s=t.context;switch(s){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return s?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,s=o===void 0?"":o,d=t.selectValue,a=t.isDisabled,c=t.isSelected,u=function(p,g){return p&&p.length?"".concat(p.indexOf(g)+1," of ").concat(p.length):""};if(n==="value"&&d)return"value ".concat(s," focused, ").concat(u(d,r),".");if(n==="menu"){var l=a?" disabled":"",f="".concat(c?"selected":"focused").concat(l);return"option ".concat(s," ").concat(f,", ").concat(u(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},QQ=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,s=t.isFocused,d=t.selectValue,a=t.selectProps,c=t.id,u=a.ariaLiveMessages,l=a.getOptionLabel,f=a.inputValue,h=a.isMulti,p=a.isOptionDisabled,g=a.isSearchable,y=a.menuIsOpen,x=a.options,S=a.screenReaderStatus,E=a.tabSelectsValue,v=a["aria-label"],w=a["aria-live"],b=F.useMemo(function(){return Ge(Ge({},ZQ),u||{})},[u]),m=F.useMemo(function(){var T="";if(n&&b.onChange){var R=n.option,P=n.options,D=n.removedValue,N=n.removedValues,B=n.value,Z=function(oe){return Array.isArray(oe)?null:oe},U=D||R||Z(B),X=U?l(U):"",W=P||N||void 0,q=W?W.map(l):[],Q=Ge({isDisabled:U&&p(U,d),label:X,labels:q},n);T=b.onChange(Q)}return T},[n,b,p,d,l]),$=F.useMemo(function(){var T="",R=r||i,P=!!(r&&d&&d.includes(r));if(R&&b.onFocus){var D={focused:R,label:l(R),isDisabled:p(R,d),isSelected:P,options:o,context:R===r?"menu":"value",selectValue:d};T=b.onFocus(D)}return T},[r,i,l,p,b,o,d]),A=F.useMemo(function(){var T="";if(y&&x.length&&b.onFilter){var R=S({count:o.length});T=b.onFilter({inputValue:f,resultsMessage:R})}return T},[o,f,y,b,x,S]),C=F.useMemo(function(){var T="";if(b.guidance){var R=i?"value":y?"menu":"input";T=b.guidance({"aria-label":v,context:R,isDisabled:r&&p(r,d),isMulti:h,isSearchable:g,tabSelectsValue:E})}return T},[v,r,i,h,p,g,y,b,d,E]),k="".concat($," ").concat(A," ").concat(C),I=Qe(F.Fragment,null,Qe("span",{id:"aria-selection"},m),Qe("span",{id:"aria-context"},k)),L=(n==null?void 0:n.action)==="initial-input-focus";return Qe(F.Fragment,null,Qe(_k,{id:c},L&&I),Qe(_k,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},s&&!L&&I))},JQ=QQ,db=[{base:"A",letters:"AⒶÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷḂḄḆɃƂƁ"},{base:"C",letters:"CⒸĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻḞƑꝻ"},{base:"G",letters:"GⒼǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿĴɈ"},{base:"K",letters:"KⓀḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂḾṀṂⱮƜ"},{base:"N",letters:"NⓃǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆꝖꝘɊ"},{base:"R",letters:"RⓇŔṘŘȐȒṚṜŖṞɌⱤꞦꞂ"},{base:"S",letters:"SⓈẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍẊẌ"},{base:"Y",letters:"YⓎỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑḃḅḇƀƃɓ"},{base:"c",letters:"cⓒćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕḟƒꝼ"},{base:"g",letters:"gⓖǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙĵǰɉ"},{base:"k",letters:"kⓚḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜḿṁṃɱɯ"},{base:"n",letters:"nⓝǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠɋꝗꝙ"},{base:"r",letters:"rⓡŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧẋẍ"},{base:"y",letters:"yⓨỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩźẑżžẓẕƶȥɀⱬꝣ"}],eJ=new RegExp("["+db.map(function(e){return e.letters}).join("")+"]","g"),CL={};for(var sy=0;sy<db.length;sy++)for(var ly=db[sy],uy=0;uy<ly.letters.length;uy++)CL[ly.letters[uy]]=ly.base;var kL=function(t){return t.replace(eJ,function(n){return CL[n]})},tJ=YM(kL),Ck=function(t){return t.replace(/^\s+|\s+$/g,"")},nJ=function(t){return"".concat(t.label," ").concat(t.value)},rJ=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=Ge({ignoreCase:!0,ignoreAccents:!0,stringify:nJ,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,s=i.ignoreAccents,d=i.stringify,a=i.trim,c=i.matchFrom,u=a?Ck(r):r,l=a?Ck(d(n)):d(n);return o&&(u=u.toLowerCase(),l=l.toLowerCase()),s&&(u=tJ(u),l=kL(l)),c==="start"?l.substr(0,u.length)===u:l.indexOf(u)>-1}},iJ=["innerRef"];function oJ(e){var t=e.innerRef,n=Fr(e,iJ),r=aZ(n,"onExited","in","enter","exit","appear");return Qe("input",ze({ref:t},r,{css:R1({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var aJ=function(t){t.preventDefault(),t.stopPropagation()};function sJ(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,s=F.useRef(!1),d=F.useRef(!1),a=F.useRef(0),c=F.useRef(null),u=F.useCallback(function(y,x){if(c.current!==null){var S=c.current,E=S.scrollTop,v=S.scrollHeight,w=S.clientHeight,b=c.current,m=x>0,$=v-w-E,A=!1;$>x&&s.current&&(r&&r(y),s.current=!1),m&&d.current&&(o&&o(y),d.current=!1),m&&x>$?(n&&!s.current&&n(y),b.scrollTop=v,A=!0,s.current=!0):!m&&-x>E&&(i&&!d.current&&i(y),b.scrollTop=0,A=!0,d.current=!0),A&&aJ(y)}},[n,r,i,o]),l=F.useCallback(function(y){u(y,y.deltaY)},[u]),f=F.useCallback(function(y){a.current=y.changedTouches[0].clientY},[]),h=F.useCallback(function(y){var x=a.current-y.changedTouches[0].clientY;u(y,x)},[u]),p=F.useCallback(function(y){if(y){var x=rZ?{passive:!1}:!1;y.addEventListener("wheel",l,x),y.addEventListener("touchstart",f,x),y.addEventListener("touchmove",h,x)}},[h,f,l]),g=F.useCallback(function(y){y&&(y.removeEventListener("wheel",l,!1),y.removeEventListener("touchstart",f,!1),y.removeEventListener("touchmove",h,!1))},[h,f,l]);return F.useEffect(function(){if(t){var y=c.current;return p(y),function(){g(y)}}},[t,p,g]),function(y){c.current=y}}var kk=["boxSizing","height","overflow","paddingRight","position"],Ek={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function $k(e){e.preventDefault()}function Tk(e){e.stopPropagation()}function Ak(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Mk(){return"ontouchstart"in window||navigator.maxTouchPoints}var Lk=!!(typeof window<"u"&&window.document&&window.document.createElement),gc=0,$l={capture:!1,passive:!1};function lJ(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=F.useRef({}),o=F.useRef(null),s=F.useCallback(function(a){if(Lk){var c=document.body,u=c&&c.style;if(r&&kk.forEach(function(p){var g=u&&u[p];i.current[p]=g}),r&&gc<1){var l=parseInt(i.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,h=window.innerWidth-f+l||0;Object.keys(Ek).forEach(function(p){var g=Ek[p];u&&(u[p]=g)}),u&&(u.paddingRight="".concat(h,"px"))}c&&Mk()&&(c.addEventListener("touchmove",$k,$l),a&&(a.addEventListener("touchstart",Ak,$l),a.addEventListener("touchmove",Tk,$l))),gc+=1}},[r]),d=F.useCallback(function(a){if(Lk){var c=document.body,u=c&&c.style;gc=Math.max(gc-1,0),r&&gc<1&&kk.forEach(function(l){var f=i.current[l];u&&(u[l]=f)}),c&&Mk()&&(c.removeEventListener("touchmove",$k,$l),a&&(a.removeEventListener("touchstart",Ak,$l),a.removeEventListener("touchmove",Tk,$l)))}},[r]);return F.useEffect(function(){if(t){var a=o.current;return s(a),function(){d(a)}}},[t,s,d]),function(a){o.current=a}}var uJ=function(){return document.activeElement&&document.activeElement.blur()},cJ={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function dJ(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,s=e.onBottomLeave,d=e.onTopArrive,a=e.onTopLeave,c=sJ({isEnabled:i,onBottomArrive:o,onBottomLeave:s,onTopArrive:d,onTopLeave:a}),u=lJ({isEnabled:n}),l=function(h){c(h),u(h)};return Qe(F.Fragment,null,n&&Qe("div",{onClick:uJ,css:cJ}),t(l))}var fJ={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},hJ=function(t){var n=t.name,r=t.onFocus;return Qe("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:fJ,value:"",onChange:function(){}})},pJ=hJ,gJ=function(t){return t.label},EL=function(t){return t.label},$L=function(t){return t.value},mJ=function(t){return!!t.isDisabled},vJ={clearIndicator:AZ,container:bZ,control:OZ,dropdownIndicator:$Z,group:zZ,groupHeading:BZ,indicatorsContainer:_Z,indicatorSeparator:LZ,input:UZ,loadingIndicator:IZ,loadingMessage:mZ,menu:uZ,menuList:hZ,menuPortal:vZ,multiValue:XZ,multiValueLabel:ZZ,multiValueRemove:QZ,noOptionsMessage:gZ,option:iQ,placeholder:sQ,singleValue:cQ,valueContainer:SZ},yJ={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},bJ=4,TL=4,wJ=38,SJ=TL*2,xJ={baseUnit:TL,controlHeight:wJ,menuGutter:SJ},cy={borderRadius:bJ,colors:yJ,spacing:xJ},_J={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:bk(),captureMenuScroll:!bk(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:rJ(),formatGroupLabel:gJ,getOptionLabel:EL,getOptionValue:$L,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:mJ,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!tZ(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Rk(e,t,n,r){var i=RL(e,t,n),o=PL(e,t,n),s=LL(e,t),d=ag(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:s,value:d,index:r}}function AL(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,d){return Rk(e,s,t,d)}).filter(function(s){return Pk(e,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Rk(e,n,t,r);return Pk(e,o)?o:void 0}).filter(iZ)}function ML(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Qc(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function CJ(e,t){return ML(AL(e,t))}function Pk(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,s=t.label,d=t.value;return(!OL(e)||!o)&&IL(e,{label:s,value:d,data:i},r)}function kJ(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function EJ(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var LL=function(t,n){return t.getOptionLabel(n)},ag=function(t,n){return t.getOptionValue(n)};function RL(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function PL(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ag(e,t);return n.some(function(i){return ag(e,i)===r})}function IL(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var OL=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},$J=1,Uw=function(e){HQ(n,e);var t=UQ(n);function n(r){var i;if(jQ(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(d){i.controlRef=d},i.focusedOptionRef=null,i.getFocusedOptionRef=function(d){i.focusedOptionRef=d},i.menuListRef=null,i.getMenuListRef=function(d){i.menuListRef=d},i.inputRef=null,i.getInputRef=function(d){i.inputRef=d},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(d,a){var c=i.props,u=c.onChange,l=c.name;a.name=l,i.ariaOnChange(d,a),u(d,a)},i.setValue=function(d,a,c){var u=i.props,l=u.closeMenuOnSelect,f=u.isMulti,h=u.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:h}),l&&(i.setState({inputIsHiddenAfterUpdate:!f}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(d,{action:a,option:c})},i.selectOption=function(d){var a=i.props,c=a.blurInputOnSelect,u=a.isMulti,l=a.name,f=i.state.selectValue,h=u&&i.isOptionSelected(d,f),p=i.isOptionDisabled(d,f);if(h){var g=i.getOptionValue(d);i.setValue(f.filter(function(y){return i.getOptionValue(y)!==g}),"deselect-option",d)}else if(!p)u?i.setValue([].concat(Qc(f),[d]),"select-option",d):i.setValue(d,"select-option");else{i.ariaOnChange(d,{action:"select-option",option:d,name:l});return}c&&i.blurInput()},i.removeValue=function(d){var a=i.props.isMulti,c=i.state.selectValue,u=i.getOptionValue(d),l=c.filter(function(h){return i.getOptionValue(h)!==u}),f=Mc(a,l,l[0]||null);i.onChange(f,{action:"remove-value",removedValue:d}),i.focusInput()},i.clearValue=function(){var d=i.state.selectValue;i.onChange(Mc(i.props.isMulti,[],null),{action:"clear",removedValues:d})},i.popValue=function(){var d=i.props.isMulti,a=i.state.selectValue,c=a[a.length-1],u=a.slice(0,a.length-1),l=Mc(d,u,u[0]||null);i.onChange(l,{action:"pop-value",removedValue:c})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var d=arguments.length,a=new Array(d),c=0;c<d;c++)a[c]=arguments[c];return XX.apply(void 0,[i.props.classNamePrefix].concat(a))},i.getOptionLabel=function(d){return LL(i.props,d)},i.getOptionValue=function(d){return ag(i.props,d)},i.getStyles=function(d,a){var c=i.props.unstyled,u=vJ[d](a,c);u.boxSizing="border-box";var l=i.props.styles[d];return l?l(u,a):u},i.getClassNames=function(d,a){var c,u;return(c=(u=i.props.classNames)[d])===null||c===void 0?void 0:c.call(u,a)},i.getElementId=function(d){return"".concat(i.instancePrefix,"-").concat(d)},i.getComponents=function(){return yL(i.props)},i.buildCategorizedOptions=function(){return AL(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return ML(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(d,a){i.setState({ariaSelection:Ge({value:d},a)})},i.onMenuMouseDown=function(d){d.button===0&&(d.stopPropagation(),d.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(d){i.blockOptionHover=!1},i.onControlMouseDown=function(d){if(!d.defaultPrevented){var a=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?d.target.tagName!=="INPUT"&&d.target.tagName!=="TEXTAREA"&&i.onMenuClose():a&&i.openMenu("first"):(a&&(i.openAfterFocus=!0),i.focusInput()),d.target.tagName!=="INPUT"&&d.target.tagName!=="TEXTAREA"&&d.preventDefault()}},i.onDropdownIndicatorMouseDown=function(d){if(!(d&&d.type==="mousedown"&&d.button!==0)&&!i.props.isDisabled){var a=i.props,c=a.isMulti,u=a.menuIsOpen;i.focusInput(),u?(i.setState({inputIsHiddenAfterUpdate:!c}),i.onMenuClose()):i.openMenu("first"),d.preventDefault()}},i.onClearIndicatorMouseDown=function(d){d&&d.type==="mousedown"&&d.button!==0||(i.clearValue(),d.preventDefault(),i.openAfterFocus=!1,d.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(d){typeof i.props.closeMenuOnScroll=="boolean"?d.target instanceof HTMLElement&&_m(d.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(d)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(d){var a=d.touches,c=a&&a.item(0);c&&(i.initialTouchX=c.clientX,i.initialTouchY=c.clientY,i.userIsDragging=!1)},i.onTouchMove=function(d){var a=d.touches,c=a&&a.item(0);if(c){var u=Math.abs(c.clientX-i.initialTouchX),l=Math.abs(c.clientY-i.initialTouchY),f=5;i.userIsDragging=u>f||l>f}},i.onTouchEnd=function(d){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(d.target)&&i.menuListRef&&!i.menuListRef.contains(d.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(d){i.userIsDragging||i.onControlMouseDown(d)},i.onClearIndicatorTouchEnd=function(d){i.userIsDragging||i.onClearIndicatorMouseDown(d)},i.onDropdownIndicatorTouchEnd=function(d){i.userIsDragging||i.onDropdownIndicatorMouseDown(d)},i.handleInputChange=function(d){var a=i.props.inputValue,c=d.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(c,{action:"input-change",prevInputValue:a}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(d){i.props.onFocus&&i.props.onFocus(d),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(d){var a=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(d),i.onInputChange("",{action:"input-blur",prevInputValue:a}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(d){i.blockOptionHover||i.state.focusedOption===d||i.setState({focusedOption:d})},i.shouldHideSelectedOptions=function(){return OL(i.props)},i.onValueInputFocus=function(d){d.preventDefault(),d.stopPropagation(),i.focus()},i.onKeyDown=function(d){var a=i.props,c=a.isMulti,u=a.backspaceRemovesValue,l=a.escapeClearsValue,f=a.inputValue,h=a.isClearable,p=a.isDisabled,g=a.menuIsOpen,y=a.onKeyDown,x=a.tabSelectsValue,S=a.openMenuOnFocus,E=i.state,v=E.focusedOption,w=E.focusedValue,b=E.selectValue;if(!p&&!(typeof y=="function"&&(y(d),d.defaultPrevented))){switch(i.blockOptionHover=!0,d.key){case"ArrowLeft":if(!c||f)return;i.focusValue("previous");break;case"ArrowRight":if(!c||f)return;i.focusValue("next");break;case"Delete":case"Backspace":if(f)return;if(w)i.removeValue(w);else{if(!u)return;c?i.popValue():h&&i.clearValue()}break;case"Tab":if(i.isComposing||d.shiftKey||!g||!x||!v||S&&i.isOptionSelected(v,b))return;i.selectOption(v);break;case"Enter":if(d.keyCode===229)break;if(g){if(!v||i.isComposing)return;i.selectOption(v);break}return;case"Escape":g?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:f}),i.onMenuClose()):h&&l&&i.clearValue();break;case" ":if(f)return;if(!g){i.openMenu("first");break}if(!v)return;i.selectOption(v);break;case"ArrowUp":g?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":g?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!g)return;i.focusOption("pageup");break;case"PageDown":if(!g)return;i.focusOption("pagedown");break;case"Home":if(!g)return;i.focusOption("first");break;case"End":if(!g)return;i.focusOption("last");break;default:return}d.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++$J),i.state.selectValue=ng(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),s=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[s]}return i}return BQ(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&yk(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isDisabled,d=o.menuIsOpen,a=this.state.isFocused;(a&&!s&&i.isDisabled||a&&d&&!i.menuIsOpen)&&this.focusInput(),a&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!a&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(yk(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,s=this.state,d=s.selectValue,a=s.isFocused,c=this.buildFocusableOptions(),u=i==="first"?0:c.length-1;if(!this.props.isMulti){var l=c.indexOf(d[0]);l>-1&&(u=l)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[u]},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,s=o.selectValue,d=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var a=s.indexOf(d);d||(a=-1);var c=s.length-1,u=-1;if(s.length){switch(i){case"previous":a===0?u=0:a===-1?u=c:u=a-1;break;case"next":a>-1&&a<c&&(u=a+1);break}this.setState({inputIsHidden:u!==-1,focusedValue:s[u]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,s=this.state.focusedOption,d=this.getFocusableOptions();if(d.length){var a=0,c=d.indexOf(s);s||(c=-1),i==="up"?a=c>0?c-1:d.length-1:i==="down"?a=(c+1)%d.length:i==="pageup"?(a=c-o,a<0&&(a=0)):i==="pagedown"?(a=c+o,a>d.length-1&&(a=d.length-1)):i==="last"&&(a=d.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:d[a],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(cy):Ge(Ge({},cy),this.props.theme):cy}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,s=this.getStyles,d=this.getClassNames,a=this.getValue,c=this.selectOption,u=this.setValue,l=this.props,f=l.isMulti,h=l.isRtl,p=l.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:s,getClassNames:d,getValue:a,hasValue:g,isMulti:f,isRtl:h,options:p,selectOption:c,selectProps:l,setValue:u,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,s=i.isMulti;return o===void 0?s:o}},{key:"isOptionDisabled",value:function(i,o){return RL(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return PL(this.props,i,o)}},{key:"filterOption",value:function(i,o){return IL(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,d=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:s,selectValue:d})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,s=i.isSearchable,d=i.inputId,a=i.inputValue,c=i.tabIndex,u=i.form,l=i.menuIsOpen,f=i.required,h=this.getComponents(),p=h.Input,g=this.state,y=g.inputIsHidden,x=g.ariaSelection,S=this.commonProps,E=d||this.getElementId("input"),v=Ge(Ge(Ge({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox"},l&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(x==null?void 0:x.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?F.createElement(p,ze({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:E,innerRef:this.getInputRef,isDisabled:o,isHidden:y,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:u,type:"text",value:a},v)):F.createElement(oJ,ze({id:E,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:tg,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:u,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),s=o.MultiValue,d=o.MultiValueContainer,a=o.MultiValueLabel,c=o.MultiValueRemove,u=o.SingleValue,l=o.Placeholder,f=this.commonProps,h=this.props,p=h.controlShouldRenderValue,g=h.isDisabled,y=h.isMulti,x=h.inputValue,S=h.placeholder,E=this.state,v=E.selectValue,w=E.focusedValue,b=E.isFocused;if(!this.hasValue()||!p)return x?null:F.createElement(l,ze({},f,{key:"placeholder",isDisabled:g,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),S);if(y)return v.map(function($,A){var C=$===w,k="".concat(i.getOptionLabel($),"-").concat(i.getOptionValue($));return F.createElement(s,ze({},f,{components:{Container:d,Label:a,Remove:c},isFocused:C,isDisabled:g,key:k,index:A,removeProps:{onClick:function(){return i.removeValue($)},onTouchEnd:function(){return i.removeValue($)},onMouseDown:function(L){L.preventDefault()}},data:$}),i.formatOptionLabel($,"value"))});if(x)return null;var m=v[0];return F.createElement(u,ze({},f,{data:m,isDisabled:g}),this.formatOptionLabel(m,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,s=this.commonProps,d=this.props,a=d.isDisabled,c=d.isLoading,u=this.state.isFocused;if(!this.isClearable()||!o||a||!this.hasValue()||c)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return F.createElement(o,ze({},s,{innerProps:l,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,s=this.commonProps,d=this.props,a=d.isDisabled,c=d.isLoading,u=this.state.isFocused;if(!o||!c)return null;var l={"aria-hidden":"true"};return F.createElement(o,ze({},s,{innerProps:l,isDisabled:a,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,s=i.IndicatorSeparator;if(!o||!s)return null;var d=this.commonProps,a=this.props.isDisabled,c=this.state.isFocused;return F.createElement(s,ze({},d,{isDisabled:a,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var s=this.commonProps,d=this.props.isDisabled,a=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return F.createElement(o,ze({},s,{innerProps:c,isDisabled:d,isFocused:a}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),s=o.Group,d=o.GroupHeading,a=o.Menu,c=o.MenuList,u=o.MenuPortal,l=o.LoadingMessage,f=o.NoOptionsMessage,h=o.Option,p=this.commonProps,g=this.state.focusedOption,y=this.props,x=y.captureMenuScroll,S=y.inputValue,E=y.isLoading,v=y.loadingMessage,w=y.minMenuHeight,b=y.maxMenuHeight,m=y.menuIsOpen,$=y.menuPlacement,A=y.menuPosition,C=y.menuPortalTarget,k=y.menuShouldBlockScroll,I=y.menuShouldScrollIntoView,L=y.noOptionsMessage,T=y.onMenuScrollToTop,R=y.onMenuScrollToBottom;if(!m)return null;var P=function(W,q){var Q=W.type,G=W.data,oe=W.isDisabled,ne=W.isSelected,ce=W.label,fe=W.value,he=g===G,me=oe?void 0:function(){return i.onOptionHover(G)},Pe=oe?void 0:function(){return i.selectOption(G)},Ee="".concat(i.getElementId("option"),"-").concat(q),Ae={id:Ee,onClick:Pe,onMouseMove:me,onMouseOver:me,tabIndex:-1};return F.createElement(h,ze({},p,{innerProps:Ae,data:G,isDisabled:oe,isSelected:ne,key:Ee,label:ce,type:Q,value:fe,isFocused:he,innerRef:he?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(W.data,"menu"))},D;if(this.hasOptions())D=this.getCategorizedOptions().map(function(X){if(X.type==="group"){var W=X.data,q=X.options,Q=X.index,G="".concat(i.getElementId("group"),"-").concat(Q),oe="".concat(G,"-heading");return F.createElement(s,ze({},p,{key:G,data:W,options:q,Heading:d,headingProps:{id:oe,data:X.data},label:i.formatGroupLabel(X.data)}),X.options.map(function(ne){return P(ne,"".concat(Q,"-").concat(ne.index))}))}else if(X.type==="option")return P(X,"".concat(X.index))});else if(E){var N=v({inputValue:S});if(N===null)return null;D=F.createElement(l,p,N)}else{var B=L({inputValue:S});if(B===null)return null;D=F.createElement(f,p,B)}var Z={minMenuHeight:w,maxMenuHeight:b,menuPlacement:$,menuPosition:A,menuShouldScrollIntoView:I},U=F.createElement(cZ,ze({},p,Z),function(X){var W=X.ref,q=X.placerProps,Q=q.placement,G=q.maxHeight;return F.createElement(a,ze({},p,Z,{innerRef:W,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:E,placement:Q}),F.createElement(dJ,{captureEnabled:x,onTopArrive:T,onBottomArrive:R,lockEnabled:k},function(oe){return F.createElement(c,ze({},p,{innerRef:function(ce){i.getMenuListRef(ce),oe(ce)},isLoading:E,maxHeight:G,focusedOption:g}),D)}))});return C||A==="fixed"?F.createElement(u,ze({},p,{appendTo:C,controlElement:this.controlRef,menuPlacement:$,menuPosition:A}),U):U}},{key:"renderFormField",value:function(){var i=this,o=this.props,s=o.delimiter,d=o.isDisabled,a=o.isMulti,c=o.name,u=o.required,l=this.state.selectValue;if(u&&!this.hasValue()&&!d)return F.createElement(pJ,{name:c,onFocus:this.onValueInputFocus});if(!(!c||d))if(a)if(s){var f=l.map(function(g){return i.getOptionValue(g)}).join(s);return F.createElement("input",{name:c,type:"hidden",value:f})}else{var h=l.length>0?l.map(function(g,y){return F.createElement("input",{key:"i-".concat(y),name:c,type:"hidden",value:i.getOptionValue(g)})}):F.createElement("input",{name:c,type:"hidden",value:""});return F.createElement("div",null,h)}else{var p=l[0]?this.getOptionValue(l[0]):"";return F.createElement("input",{name:c,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,s=o.ariaSelection,d=o.focusedOption,a=o.focusedValue,c=o.isFocused,u=o.selectValue,l=this.getFocusableOptions();return F.createElement(JQ,ze({},i,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:d,focusedValue:a,isFocused:c,selectValue:u,focusableOptions:l}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,s=i.IndicatorsContainer,d=i.SelectContainer,a=i.ValueContainer,c=this.props,u=c.className,l=c.id,f=c.isDisabled,h=c.menuIsOpen,p=this.state.isFocused,g=this.commonProps=this.getCommonProps();return F.createElement(d,ze({},g,{className:u,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:p}),this.renderLiveRegion(),F.createElement(o,ze({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:p,menuIsOpen:h}),F.createElement(a,ze({},g,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),F.createElement(s,ze({},g,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,d=o.clearFocusValueOnUpdate,a=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,u=o.isFocused,l=o.prevWasFocused,f=i.options,h=i.value,p=i.menuIsOpen,g=i.inputValue,y=i.isMulti,x=ng(h),S={};if(s&&(h!==s.value||f!==s.options||p!==s.menuIsOpen||g!==s.inputValue)){var E=p?CJ(i,x):[],v=d?kJ(o,x):null,w=EJ(o,E);S={selectValue:x,focusedOption:w,focusedValue:v,clearFocusValueOnUpdate:!1}}var b=a!=null&&i!==s?{inputIsHidden:a,inputIsHiddenAfterUpdate:void 0}:{},m=c,$=u&&l;return u&&!$&&(m={value:Mc(y,x,x[0]||null),options:x,action:"initial-input-focus"},$=!l),(c==null?void 0:c.action)==="initial-input-focus"&&(m=null),Ge(Ge(Ge({},S),b),{},{prevProps:i,ariaSelection:m,prevWasFocused:$})}}]),n}(F.Component);Uw.defaultProps=_J;var TJ=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function FL(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,s=o===void 0?null:o,d=e.inputValue,a=e.menuIsOpen,c=e.onChange,u=e.onInputChange,l=e.onMenuClose,f=e.onMenuOpen,h=e.value,p=Fr(e,TJ),g=F.useState(d!==void 0?d:n),y=ri(g,2),x=y[0],S=y[1],E=F.useState(a!==void 0?a:i),v=ri(E,2),w=v[0],b=v[1],m=F.useState(h!==void 0?h:s),$=ri(m,2),A=$[0],C=$[1],k=F.useCallback(function(N,B){typeof c=="function"&&c(N,B),C(N)},[c]),I=F.useCallback(function(N,B){var Z;typeof u=="function"&&(Z=u(N,B)),S(Z!==void 0?Z:N)},[u]),L=F.useCallback(function(){typeof f=="function"&&f(),b(!0)},[f]),T=F.useCallback(function(){typeof l=="function"&&l(),b(!1)},[l]),R=d!==void 0?d:x,P=a!==void 0?a:w,D=h!==void 0?h:A;return Ge(Ge({},p),{},{inputValue:R,menuIsOpen:P,onChange:k,onInputChange:I,onMenuClose:T,onMenuOpen:L,value:D})}var AJ=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],Ik=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=String(t).toLowerCase(),o=String(r.getOptionValue(n)).toLowerCase(),s=String(r.getOptionLabel(n)).toLowerCase();return o===i||s===i},dy={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,i){return!(!t||n.some(function(o){return Ik(t,o,i)})||r.some(function(o){return Ik(t,o,i)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function MJ(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,i=r===void 0?"last":r,o=e.formatCreateLabel,s=o===void 0?dy.formatCreateLabel:o,d=e.isValidNewOption,a=d===void 0?dy.isValidNewOption:d,c=e.getNewOptionData,u=c===void 0?dy.getNewOptionData:c,l=e.onCreateOption,f=e.options,h=f===void 0?[]:f,p=e.onChange,g=Fr(e,AJ),y=g.getOptionValue,x=y===void 0?$L:y,S=g.getOptionLabel,E=S===void 0?EL:S,v=g.inputValue,w=g.isLoading,b=g.isMulti,m=g.value,$=g.name,A=F.useMemo(function(){return a(v,ng(m),h,{getOptionValue:x,getOptionLabel:E})?u(v,s(v)):void 0},[s,u,E,x,v,a,h,m]),C=F.useMemo(function(){return(n||!w)&&A?i==="first"?[A].concat(Qc(h)):[].concat(Qc(h),[A]):h},[n,i,w,A,h]),k=F.useCallback(function(I,L){if(L.action!=="select-option")return p(I,L);var T=Array.isArray(I)?I:[I];if(T[T.length-1]===A){if(l)l(v);else{var R=u(v,v),P={action:"create-option",name:$,option:R};p(Mc(b,[].concat(Qc(ng(m)),[R]),R),P)}return}p(I,L)},[u,v,b,$,A,l,p,m]);return Ge(Ge({},g),{},{options:C,onChange:k})}var LJ=F.forwardRef(function(e,t){var n=FL(e),r=MJ(n);return F.createElement(Uw,ze({ref:t},r))}),RJ=LJ,PJ=F.forwardRef(function(e,t){var n=FL(e);return F.createElement(Uw,ze({ref:t},n))}),IJ=PJ;const OJ=zQ(),DL={container:e=>({...e,width:"100%"}),control:e=>({...e,borderRadius:0,border:"1px solid var(--border-color-primary)",background:"var(--input-background-fill)",width:"100%"}),option:e=>({...e,borderRadius:0,color:"var(--body-text-color)",background:"var(--background-fill-primary)","&:hover":{background:"var(--ae-primary-color)"}}),menu:e=>({...e,borderRadius:0,background:"var(--background-fill-primary)",border:"1px solid var(--ae-input-border-color) !important"}),multiValue:e=>({...e,borderRadius:0,background:"var(--background-fill-primary)",color:"var(--nevysha-font-color)"}),multiValueLabel:e=>({...e,color:"var(--nevysha-font-color)"}),multiValueRemove:e=>({...e,":hover":{color:"white"}}),indicatorContainer:e=>({...e,color:"var(--nevysha-font-color)",padding:0})};function FJ({imageHash:e,isFull:t}){const{getImage:n,tags:r,setTags:i}=F.useContext(io),[o,s]=F.useState(n(e)),[d,a]=F.useState([]),[c,u]=F.useState(!1),l=o&&o.metadata&&o.metadata.exif&&o.metadata.exif["cozy-nest-tags"];F.useEffect(()=>{if(o)if(o.metadata.exif["cozy-nest-tags"]){const g=o.metadata.exif["cozy-nest-tags"].split(",");a([...g])}else a([])},[e,l]),F.useEffect(()=>{s(n(e))},[e]);const f=g=>{u(!0),i([...r,g]);const y=[...new Set([...d,g])];a([...y]),setTimeout(()=>{u(!1),p([...y]).then(x=>x)},1e3)},h=g=>{const y=[...new Set(g.map(x=>x.value))];a(y),p(y).then(x=>x)},p=async g=>{const y=o.metadata.exif;y["cozy-nest-tags"]=g.join(","),$t.debug("Saving tags",y["cozy-nest-tags"]),await zw(o.path,y)};return j.jsx(j.Fragment,{children:j.jsx(RJ,{placeholder:"Tags...",styles:DL,isMulti:!0,options:r.map(g=>({value:g,label:g})),onCreateOption:f,isDisabled:c,isLoading:c,value:d.map(g=>({value:g,label:g})),onChange:g=>h(g)})})}function DJ({setActiveTags:e}){const{tags:t}=F.useContext(io);return j.jsx(IJ,{options:t.map(n=>({value:n,label:n})),components:OJ,isMulti:!0,placeholder:"Tags...",styles:DL,onChange:n=>e(n.map(r=>r.value))})}const la=e=>{try{return e()}catch{return"Error parsing metadata"}};function Ok({verbose:e,imageHash:t,closeModal:n}){const{images:r,updateExifInState:i,getImage:o}=F.useContext(io),[s,d]=F.useState(o(t)),[a,c]=F.useState({date:0,model:"",size:"",seed:"",steps:"",sampler:"",modelHash:"",formattedAll:""}),u=e;F.useEffect(()=>{d(o(t))},[r,t]),F.useEffect(()=>{s&&s.metadata&&s.metadata.exif&&s.metadata.exif.parameters&&c({date:la(()=>new Date(s.metadata.date*1e3).toISOString().replace(/T/," ").replace(/\..+/,"")),model:la(()=>s.metadata.exif.parameters.split("Model: ")[1].split(",")[0]),size:la(()=>s.metadata.exif.parameters.split("Size: ")[1].split(",")[0]),seed:la(()=>s.metadata.exif.parameters.split("Seed: ")[1].split(",")[0]),steps:la(()=>s.metadata.exif.parameters.split("Steps: ")[1].split(",")[0]),sampler:la(()=>s.metadata.exif.parameters.split("Sampler: ")[1].split(",")[0]),modelHash:la(()=>s.metadata.exif.parameters.split("Model hash: ")[1].split(",")[0]),formattedAll:la(()=>s.metadata.exif.parameters.replace(/\n/g,"<br>"))})},[s]);const l=async()=>{n()};return s?j.jsxs("div",{className:"image-info",children:[u&&j.jsx(j.Fragment,{children:j.jsx("button",{className:"nevysha lg primary gradio-button btn",onClick:l,children:"Close"})}),j.jsx(FJ,{imageHash:t,isFull:u}),j.jsx("table",{children:j.jsxs("tbody",{children:[j.jsxs("tr",{children:[j.jsx("td",{children:"Date: "}),j.jsx("td",{children:a==null?void 0:a.date})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"Model: "}),j.jsx("td",{children:a==null?void 0:a.model})]}),u&&j.jsxs("tr",{children:[j.jsx("td",{children:"Model Hash:"}),j.jsx("td",{children:a==null?void 0:a.modelHash})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"Size: "}),j.jsx("td",{children:a==null?void 0:a.size})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"Seed: "}),j.jsx("td",{children:a==null?void 0:a.seed})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"Steps: "}),j.jsx("td",{children:a==null?void 0:a.steps})]}),j.jsxs("tr",{children:[j.jsx("td",{children:"Sampler: "}),j.jsx("td",{children:a==null?void 0:a.sampler})]})]})}),u&&j.jsx("div",{className:"blocInfo",dangerouslySetInnerHTML:{__html:a==null?void 0:a.formattedAll}}),j.jsx(RX,{imageHash:t})]}):j.jsx("div",{className:"image-info",children:"No image selected"})}window.location.href.split(":")[0]+""+window.location.href.split(":")[1];function NJ({viewPort:e,imageHash:t,index:n}){const[r,i]=F.useState(!1),o=F.useRef(null),s=F.useRef(null),{getImage:d}=F.useContext(io),[a,c]=F.useState(!1),[u,l]=F.useState(d(t));F.useEffect(()=>{l(d(t))},[t]),F.useEffect(()=>{const g=s.current.offsetTop,y=g>=e.top&&g<=e.bottom+s.current.offsetHeight||g+s.current.offsetHeight>=e.top&&g+s.current.offsetHeight<=e.bottom;c(!!y)},[e]);function f(){i(!r)}function h(){r||i(!0)}function p(){return`/cozy-nest/image?path=${encodeURIComponent(u.path)}`}return j.jsx("div",{id:`img_${n}`,className:"image",ref:s,children:a?j.jsxs(j.Fragment,{children:[j.jsx("div",{className:"image-wrapper",onClick:h,children:j.jsx("img",{className:"cozy-nest-thumbnail",src:p(),alt:"image",ref:o})}),j.jsx(Ok,{verbose:!1,imageHash:t}),r&&j.jsxs("div",{className:"infoModal",children:[j.jsx("div",{className:"image-wrapper",children:j.jsx("img",{className:"cozy-nest-thumbnail",src:p(),alt:"image"})}),j.jsx(Ok,{verbose:!0,imageHash:t,closeModal:f})]})]}):j.jsx("div",{className:"image image-placeholder"})})}const th=300;function NL(e){const{images:t,filteredImages:n}=F.useContext(io),r=F.useRef(null),[i,o]=F.useState(0),[s,d]=F.useState([]),[a,c]=F.useState({top:0,bottom:window.innerHeight+th});F.useEffect(()=>{d([...n.slice(0,Math.min(i*20+20,n.length))])},[n,t]),n.length>0&&s.length===0&&d(n.slice(0,Math.min(20,n.length)));const u=()=>{l();let f=Math.floor(s.length/20);f!==i&&o(f);const h={top:r.current.scrollTop-th>0?r.current.scrollTop-th:0,bottom:r.current.scrollTop+r.current.clientHeight+th};c(h)},l=()=>{document.getElementById("loadMoreThreshold").getBoundingClientRect().top<window.innerHeight&&d(n.slice(0,i*20+20))};return j.jsxs("div",{className:"browser nevysha nevysha-scrollable",onScroll:()=>u(),ref:r,children:[s.map((f,h)=>j.jsx(NJ,{imageHash:f.hash,index:h,viewPort:a},f.hash)),j.jsx("div",{id:"loadMoreThreshold",className:"hackyOffPageElement"})]})}function zJ(){return j.jsxs(j.Fragment,{children:[j.jsxs(Qr,{children:[j.jsxs("h1",{className:"cnib-title",children:["Cozy Nest Image Browser ",j.jsx("span",{className:"beta-emphasis",children:"beta"})]}),j.jsxs(Cn,{children:[j.jsxs("span",{children:["The WebSocket is currently ",j.jsx("span",{className:"connexionStatus",style:{color:"red"},children:"Closed"})]}),j.jsx("button",{className:"nevysha lg primary gradio-button btn",style:{marginLeft:"20px",width:"410px"},disabled:!0,children:"Image browser is disabled. To enable it, go to the CozyNest settings."})]}),j.jsx("textarea",{"data-testid":"textbox",placeholder:"Search anything : Prompt, Size, Model, ...",rows:"1",spellCheck:"false","data-gramm":"false",disabled:!0})]}),j.jsx(NL,{imagesRef:[]},0)]})}var zL={},Cm={};Object.defineProperty(Cm,"__esModule",{value:!0});Cm.calculateRgba=void 0;var sg;(function(e){e.maroon="#800000",e.red="#FF0000",e.orange="#FFA500",e.yellow="#FFFF00",e.olive="#808000",e.green="#008000",e.purple="#800080",e.fuchsia="#FF00FF",e.lime="#00FF00",e.teal="#008080",e.aqua="#00FFFF",e.blue="#0000FF",e.navy="#000080",e.black="#000000",e.gray="#808080",e.silver="#C0C0C0",e.white="#FFFFFF"})(sg||(sg={}));var jJ=function(e,t){if(Object.keys(sg).includes(e)&&(e=sg[e]),e[0]==="#"&&(e=e.slice(1)),e.length===3){var n="";e.split("").forEach(function(i){n+=i,n+=i}),e=n}var r=(e.match(/.{2}/g)||[]).map(function(i){return parseInt(i,16)}).join(", ");return"rgba(".concat(r,", ").concat(t,")")};Cm.calculateRgba=jJ;var Du={};Object.defineProperty(Du,"__esModule",{value:!0});Du.cssValue=Du.parseLengthAndUnit=void 0;var BJ={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function jL(e){if(typeof e=="number")return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();n.includes(".")?t=parseFloat(n):t=parseInt(n,10);var r=(e.match(/[^0-9]*$/)||"").toString();return BJ[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}Du.parseLengthAndUnit=jL;function HJ(e){var t=jL(e);return"".concat(t.value).concat(t.unit)}Du.cssValue=HJ;var km={};Object.defineProperty(km,"__esModule",{value:!0});km.createAnimation=void 0;var VJ=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if(typeof window>"u"||!window.document)return r;var i=document.createElement("style");document.head.appendChild(i);var o=i.sheet,s=`
@keyframes `.concat(r,` {
`).concat(t,`
}
`);return o&&o.insertRule(s,0),r};km.createAnimation=VJ;var lg=Ue&&Ue.__assign||function(){return lg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},lg.apply(this,arguments)},WJ=Ue&&Ue.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),UJ=Ue&&Ue.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),GJ=Ue&&Ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&WJ(t,e,n);return UJ(t,e),t},KJ=Ue&&Ue.__rest||function(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);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(zL,"__esModule",{value:!0});var fy=GJ(F),qJ=Cm,mc=Du,Fk=km;function YJ(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,s=o===void 0?1:o,d=e.cssOverride,a=d===void 0?{}:d,c=e.size,u=c===void 0?50:c,l=KJ(e,["loading","color","speedMultiplier","cssOverride","size"]),f=(0,mc.parseLengthAndUnit)(u),h=f.value,p=f.unit,g=lg({display:"inherit",position:"relative",width:(0,mc.cssValue)(u),height:(0,mc.cssValue)(u),transform:"rotate(165deg)"},a),y=h/5,x=(h-y)/2,S=x-y,E=(0,qJ.calculateRgba)(i,.75),v=(0,Fk.createAnimation)("HashLoader","0% {width: ".concat(y,"px; box-shadow: ").concat(x,"px ").concat(-S,"px ").concat(E,", ").concat(-x,"px ").concat(S,"px ").concat(E,`}
35% {width: `).concat((0,mc.cssValue)(u),"; box-shadow: 0 ").concat(-S,"px ").concat(E,", 0 ").concat(S,"px ").concat(E,`}
70% {width: `).concat(y,"px; box-shadow: ").concat(-x,"px ").concat(-S,"px ").concat(E,", ").concat(x,"px ").concat(S,"px ").concat(E,`}
100% {box-shadow: `).concat(x,"px ").concat(-S,"px ").concat(E,", ").concat(-x,"px ").concat(S,"px ").concat(E,"}"),"before"),w=(0,Fk.createAnimation)("HashLoader","0% {height: ".concat(y,"px; box-shadow: ").concat(S,"px ").concat(x,"px ").concat(i,", ").concat(-S,"px ").concat(-x,"px ").concat(i,`}
35% {height: `).concat((0,mc.cssValue)(u),"; box-shadow: ").concat(S,"px 0 ").concat(i,", ").concat(-S,"px 0 ").concat(i,`}
70% {height: `).concat(y,"px; box-shadow: ").concat(S,"px ").concat(-x,"px ").concat(i,", ").concat(-S,"px ").concat(x,"px ").concat(i,`}
100% {box-shadow: `).concat(S,"px ").concat(x,"px ").concat(i,", ").concat(-S,"px ").concat(-x,"px ").concat(i,"}"),"after"),b=function(m){return{position:"absolute",top:"50%",left:"50%",display:"block",width:"".concat(h/5).concat(p),height:"".concat(h/5).concat(p),borderRadius:"".concat(h/10).concat(p),transform:"translate(-50%, -50%)",animationFillMode:"none",animation:"".concat(m===1?v:w," ").concat(2/s,"s infinite")}};return n?fy.createElement("span",lg({style:g},l),fy.createElement("span",{style:b(1)}),fy.createElement("span",{style:b(2)})):null}var XJ=zL.default=YJ;function Er(e){return j.jsx("button",{...e,className:"nevysha lg primary gradio-button btn cnib-button",children:e.children})}function Gw(e){const n=JSON.parse(localStorage.getItem("COZY_NEST_CONFIG")).accent_color||"#36d7b7",r=e.label||"";return j.jsxs("div",{className:"cozy-nest-loading",children:[j.jsx("div",{children:r}),j.jsx(XJ,{color:n})]})}function ZJ(){const e=JSON.parse(localStorage.getItem("COZY_NEST_CONFIG")),t=e.disable_image_browser,n=(()=>{try{return e.server_default_port}catch{return $t.debug("cnib_socket_server_port not found in main gradio app"),3333}})();if(t)return j.jsx(j.Fragment,{children:j.jsx(zJ,{})});const{images:r,setImages:i,setFilteredImages:o,setTags:s}=F.useContext(io),[d,a]=F.useState(`ws://localhost:${n}`),[,c]=F.useState([]),[u,l]=F.useState([]),[f,h]=F.useState(""),[p,g]=F.useState(!1),[y,x]=F.useState("radio-hide-hidden"),[S,E]=F.useState(!0),[v,w]=F.useState(!1),{sendMessage:b,lastMessage:m,readyState:$,getWebSocket:A}=lY(d,{shouldReconnect:()=>t,reconnectAttempts:10,reconnectInterval:3e3});window.ws=A();const C=F.useCallback(()=>b(JSON.stringify({what:"images"})),[b]),k=()=>{$!==qr.ReadyState.OPEN&&a(d+"?t="+Date.now())};function I(){return r.filter(D=>y==="radio-hide-hidden"?D.metadata.exif["cozy-nest-hidden"]!=="True":y==="radio-only-hidden"?!(!D.metadata.exif["cozy-nest-hidden"]||D.metadata.exif["cozy-nest-hidden"]!=="True"):!0).filter(D=>u.length===0?!0:D.metadata.exif["cozy-nest-tags"]?D.metadata.exif["cozy-nest-tags"].split(",").filter(Z=>u.includes(Z)).length>0:!1)}F.useEffect(()=>{if(m!==null){const D=JSON.parse(m.data);D.error&&window.errorPipe&&window.errorPipe(D),D.what==="images"&&(D.images.length===0&&($t.debug("Received empty images array from socket"),g(!0)),i(D.images),E(!1)),D.what==="dispatch_on_image_saved"&&i(N=>[D.data,...N]),D.what==="dispatch_on_index_built"&&(i([...D.data]),E(!1)),c(N=>N.concat(m))}},[m,c]);function L(){r.length>0&&r.find(N=>N.path.indexOf("jpeg")!==-1||N.path.indexOf("jpg")!==-1)&&($t.debug("Found jpeg in images array"),w(!0))}F.useEffect(()=>{r.length===0&&$===qr.ReadyState.OPEN&&!p?C():o(I()),L()},[r,$]),F.useEffect(()=>{if(f!==""){const D=I().filter(N=>JSON.stringify(N.metadata.exif).includes(f));o(D)}else o(I())},[f,y,u,r]),F.useEffect(()=>{const D=[];r.forEach(N=>{if(N.metadata.exif["cozy-nest-tags"]){const B=N.metadata.exif["cozy-nest-tags"].split(",");D.push(...B)}}),s([...D])},[r,y]);const T={[qr.ReadyState.CONNECTING]:"Connecting",[qr.ReadyState.OPEN]:"Connected",[qr.ReadyState.CLOSING]:"Closing",[qr.ReadyState.CLOSED]:"Closed",[qr.ReadyState.UNINSTANTIATED]:"Uninstantiated"}[$],R={color:$===qr.ReadyState.OPEN?"green":$===qr.ReadyState.CONNECTING?"orange":"red"},P=async()=>{(await fetch("/cozy-nest/index",{method:"DELETE"})).ok&&(i([]),E(!0))};return j.jsxs(j.Fragment,{children:[j.jsxs(Qr,{children:[j.jsxs(Cn,{children:[j.jsxs(Cn,{children:[j.jsx("h1",{className:"cnib-title",children:j.jsx("span",{className:"beta-emphasis",children:"beta"})}),j.jsx("button",{className:"nevysha lg primary gradio-button btn",style:{width:"100px"},onClick:P,children:"Rebuild Index"}),v&&j.jsx("span",{style:{marginLeft:"20px",color:"orange"},children:"Warning: jpeg found in output folder. Jpeg images are not supported"})]}),j.jsxs(Cn,{style:{width:"auto"},className:"cozy-websocket-status",children:[j.jsxs("span",{children:["WebSocket status ",j.jsx("span",{className:"connexionStatus",style:R,children:T})]}),$!==qr.ReadyState.OPEN&&j.jsx("button",{className:"nevysha lg primary gradio-button btn",style:{marginLeft:"20px",width:"100px"},onClick:k,children:"Connect"})]})]}),j.jsx(Cn,{children:j.jsxs(Cn,{style:{gap:"10px",marginRight:"2px",width:"fit-content"},onChange:D=>x(D.target.id),children:[j.jsxs(Cn,{style:{width:"auto",alignItems:"center"},children:[j.jsx("input",{type:"radio",id:"radio-hide-hidden",name:"radio-filter",value:"all",defaultChecked:!0}),j.jsx("label",{className:"cozy-radio-label",htmlFor:"radio-hide-hidden",children:"Hide hidden"})]}),j.jsxs(Cn,{style:{width:"auto",alignItems:"center"},children:[j.jsx("input",{type:"radio",id:"radio-all",name:"radio-filter",value:"all"}),j.jsx("label",{className:"cozy-radio-label",htmlFor:"radio-all",children:"All"})]}),j.jsxs(Cn,{style:{width:"auto",alignItems:"center"},children:[j.jsx("input",{type:"radio",id:"radio-only-hidden",name:"radio-filter",value:"hidden"}),j.jsx("label",{className:"cozy-radio-label",htmlFor:"radio-only-hidden",children:"Only hidden"})]})]})}),j.jsxs(Cn,{children:[j.jsx("textarea",{"data-testid":"textbox",placeholder:"Search anything : Tags, Prompt, Size, Model, ...",rows:"1",spellCheck:"false","data-gramm":"false",style:{resize:"none"},onChange:D=>h(D.target.value)}),j.jsx(DJ,{setActiveTags:l})]})]}),!S&&j.jsx(NL,{}),S&&j.jsx(Gw,{label:"building Index..."})]})}function BL(){if(!document.getElementById("cozy-img-browser-react")){setTimeout(()=>BL(),200);return}Da.createRoot(document.getElementById("cozy-img-browser-react")).render(j.jsx(Le.StrictMode,{children:j.jsx(nf,{theme:sf,children:j.jsx(AX,{children:j.jsx(ZJ,{})})})}))}function QJ(e){const t=()=>{window.gatherInfoAndShowDialog(),e.onClickClose()};return j.jsxs("div",{className:"nevysha header",children:[j.jsxs("div",{className:"nevysha title",children:[j.jsx("h2",{children:"Nevysha's Cozy Nest"}),j.jsx("span",{className:"subtitle",children:"Find your cozy spot on Auto1111's webui"})]}),j.jsx(Cn,{children:j.jsx("div",{className:"btn-settings",onClick:e.onClickClose,children:"Close"})}),j.jsx("div",{className:"container",children:j.jsxs("div",{className:"nevysha settings-nevyui-top",children:[j.jsxs("p",{className:"nevysha-reporting",children:["Found a bug or want to ask for a feature ? Please ",j.jsx("a",{onClick:t,target:"_blank",children:"click here to gather relevant info"})," then use ",j.jsx("a",{href:"https://www.reddit.com/r/NevyshaCozyNest/",target:"_blank",children:"this subreddit"})," or ",j.jsx("a",{href:"https://github.com/Nevysha/Cozy-Nest",target:"_blank",children:"github"}),". You can also join this ",j.jsx("a",{href:"https://discord.gg/yppzDXjT7S",target:"_blank",children:"discord server"})," to discuss about Cozy Nest"]}),j.jsx("p",{className:"nevysha-emphasis",children:'WARNING : Some visual settings are immediately applied but will not be saved until you click "Save"'})]})})]})}function Em(){return(Em=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function HL(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}function fb(e){var t=F.useRef(e),n=F.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var Fd=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},Jc=function(e){return"touches"in e},hb=function(e){return e&&e.ownerDocument.defaultView||self},Dk=function(e,t,n){var r=e.getBoundingClientRect(),i=Jc(t)?function(o,s){for(var d=0;d<o.length;d++)if(o[d].identifier===s)return o[d];return o[0]}(t.touches,n):t;return{left:Fd((i.pageX-(r.left+hb(e).pageXOffset))/r.width),top:Fd((i.pageY-(r.top+hb(e).pageYOffset))/r.height)}},Nk=function(e){!Jc(e)&&e.preventDefault()},VL=Le.memo(function(e){var t=e.onMove,n=e.onKey,r=HL(e,["onMove","onKey"]),i=F.useRef(null),o=fb(t),s=fb(n),d=F.useRef(null),a=F.useRef(!1),c=F.useMemo(function(){var h=function(y){Nk(y),(Jc(y)?y.touches.length>0:y.buttons>0)&&i.current?o(Dk(i.current,y,d.current)):g(!1)},p=function(){return g(!1)};function g(y){var x=a.current,S=hb(i.current),E=y?S.addEventListener:S.removeEventListener;E(x?"touchmove":"mousemove",h),E(x?"touchend":"mouseup",p)}return[function(y){var x=y.nativeEvent,S=i.current;if(S&&(Nk(x),!function(v,w){return w&&!Jc(v)}(x,a.current)&&S)){if(Jc(x)){a.current=!0;var E=x.changedTouches||[];E.length&&(d.current=E[0].identifier)}S.focus(),o(Dk(S,x,d.current)),g(!0)}},function(y){var x=y.which||y.keyCode;x<37||x>40||(y.preventDefault(),s({left:x===39?.05:x===37?-.05:0,top:x===40?.05:x===38?-.05:0}))},g]},[s,o]),u=c[0],l=c[1],f=c[2];return F.useEffect(function(){return f},[f]),Le.createElement("div",Em({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:i,onKeyDown:l,tabIndex:0,role:"slider"}))}),Kw=function(e){return e.filter(Boolean).join(" ")},WL=function(e){var t=e.color,n=e.left,r=e.top,i=r===void 0?.5:r,o=Kw(["react-colorful__pointer",e.className]);return Le.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},Le.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},In=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},JJ=function(e){return iee(pb(e))},pb=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?In(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?In(parseInt(e.substring(6,8),16)/255,2):1}},eee=function(e){return ree(nee(e))},tee=function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:In(e.h),s:In(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:In(i/2),a:In(r,2)}},gb=function(e){var t=tee(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},nee=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),s=r*(1-n),d=r*(1-(t-o)*n),a=r*(1-(1-t+o)*n),c=o%6;return{r:In(255*[r,d,s,s,a,r][c]),g:In(255*[a,r,r,d,s,s][c]),b:In(255*[s,s,a,r,r,d][c]),a:In(i,2)}},nh=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ree=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=i<1?nh(In(255*i)):"";return"#"+nh(t)+nh(n)+nh(r)+o},iee=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),d=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:In(60*(d<0?d+6:d)),s:In(o?s/o*100:0),v:In(o/255*100),a:i}},oee=Le.memo(function(e){var t=e.hue,n=e.onChange,r=Kw(["react-colorful__hue",e.className]);return Le.createElement("div",{className:r},Le.createElement(VL,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Fd(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":In(t),"aria-valuemax":"360","aria-valuemin":"0"},Le.createElement(WL,{className:"react-colorful__hue-pointer",left:t/360,color:gb({h:t,s:100,v:100,a:1})})))}),aee=Le.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:gb({h:t.h,s:100,v:100,a:1})};return Le.createElement("div",{className:"react-colorful__saturation",style:r},Le.createElement(VL,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Fd(t.s+100*i.left,0,100),v:Fd(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+In(t.s)+"%, Brightness "+In(t.v)+"%"},Le.createElement(WL,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:gb(t)})))}),UL=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},see=function(e,t){return e.toLowerCase()===t.toLowerCase()||UL(pb(e),pb(t))};function lee(e,t,n){var r=fb(n),i=F.useState(function(){return e.toHsva(t)}),o=i[0],s=i[1],d=F.useRef({color:t,hsva:o});F.useEffect(function(){if(!e.equal(t,d.current.color)){var c=e.toHsva(t);d.current={hsva:c,color:t},s(c)}},[t,e]),F.useEffect(function(){var c;UL(o,d.current.hsva)||e.equal(c=e.fromHsva(o),d.current.color)||(d.current={hsva:o,color:c},r(c))},[o,e,r]);var a=F.useCallback(function(c){s(function(u){return Object.assign({},u,c)})},[]);return[o,a]}var uee=typeof window<"u"?F.useLayoutEffect:F.useEffect,cee=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},zk=new Map,dee=function(e){uee(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!zk.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,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,zk.set(t,n);var r=cee();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},fee=function(e){var t=e.className,n=e.colorModel,r=e.color,i=r===void 0?n.defaultColor:r,o=e.onChange,s=HL(e,["className","colorModel","color","onChange"]),d=F.useRef(null);dee(d);var a=lee(n,i,o),c=a[0],u=a[1],l=Kw(["react-colorful",t]);return Le.createElement("div",Em({},s,{ref:d,className:l}),Le.createElement(aee,{hsva:c,onChange:u}),Le.createElement(oee,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},hee={defaultColor:"000",toHsva:JJ,fromHsva:function(e){return eee({h:e.h,s:e.s,v:e.v,a:1})},equal:see},pee=function(e){return Le.createElement(fee,Em({},e,{colorModel:hee}))};const Tl=({color:e,onChange:t,label:n})=>{const r=F.useRef(),[i,o]=F.useState(!1);return j.jsxs("div",{children:[j.jsx("label",{children:n}),j.jsxs("div",{className:"picker",children:[j.jsx("div",{className:"swatch",style:{backgroundColor:e},onClick:()=>o(!0)}),i&&j.jsxs(j.Fragment,{children:[j.jsx("div",{className:"popoverWrap",onClick:()=>o(!1)}),j.jsx("div",{className:"popover",ref:r,children:j.jsx(pee,{color:e,onChange:t})})]})]})]})};function gee({config:e,setConfig:t}){const[n,r]=F.useState(e.cnib_output_folder),[i,o]=F.useState("");F.useEffect(()=>{r(e.cnib_output_folder)},[e]);const s=()=>{if(i==="")return;const d=[...n];d.push(i),r(d),t({...e,cnib_output_folder:d}),o("")};return j.jsx(j.Fragment,{children:j.jsxs("div",{className:"OutputFolderSelector",children:[n.map((d,a)=>j.jsxs(Z0,{children:[j.jsx(Pu,{placeholder:"C:/stable-difusion/...",value:d,onChange:c=>{const u=[...n];u[a]=c.target.value,r(u),t({...e,cnib_output_folder:u})}}),j.jsx(Up,{width:"4.5rem",children:j.jsx("button",{className:"btn-settings",onClick:()=>{const c=[...n];c.splice(a,1),r(c),t({...e,cnib_output_folder:c})},children:"Delete"})})]},a)),j.jsxs(Z0,{children:[j.jsx(Pu,{placeholder:"Add a new folder...",value:i,onChange:d=>{o(d.target.value)}}),j.jsx(Up,{width:"4.5rem",children:j.jsx("button",{className:"btn-settings",onClick:s,children:"Add"})})]})]})})}function GL({children:e,isVisible:t}){const{isOpen:n,onOpen:r,onClose:i}=Z3({isOpen:t}),o=F.useRef();return F.useEffect(()=>{t?r():i()},[t]),j.jsx(dM,{motionPreset:"scale",isOpen:n,leastDestructiveRef:o,onClose:i,isCentered:!0,children:j.jsx(Ew,{children:j.jsx(fM,{children:j.jsx($w,{children:e})})})})}const rh={"&::-webkit-scrollbar":{width:"5px"},"&::-webkit-scrollbar-track":{backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:"var(--ae-primary-color)",borderRadius:"20px"}};function mee(){const[e,t]=F.useState(!1),[n,r]=F.useState(COZY_NEST_CONFIG);function i(){qK(n.color_mode),_M(n.waves_color),CM(n.color_mode==="dark"?n.font_color:n.font_color_light),kM(n.bg_gradiant_color),XK(n.disable_waves_and_gradiant),EM(n.accent_color,n.accent_color),YK(n.secondary_accent_color),ZK(n.accent_generate_button,n.accent_color),QK(n.font_size),JK(n.card_height),eq(n.card_width),tq(n.main_menu_position),nq(n.quicksettings_position),rq(n.sfw_mode),dm()}F.useEffect(()=>{i()},[n]),F.useEffect(()=>{r(COZY_NEST_CONFIG)},[COZY_NEST_CONFIG]),F.useEffect(()=>{i()},[]);const o=()=>{CozyLogger.debug("toggle"),t(!e)},s=(l,f)=>{const h={...n};l.target?h[f]=l.target.value:h[f]=l,r(h)},d=l=>{l.target.checked?r({...n,color_mode:"dark"}):r({...n,color_mode:"light"}),i()},a=()=>{(async()=>await RM(n))()},c=()=>{(async()=>await fetch("/cozy-nest/config",{method:"DELETE"}))()},u=()=>{if(n.webui===l2){document.querySelector("#settings_restart_gradio").click();return}else if(n.webui===Fa){document.querySelector("#restart_submit").click();return}(async()=>(await fetch("/cozy-nest/reloadui"),window.location.reload()))()};return j.jsxs("div",{style:{display:"flex"},children:[j.jsx("button",{className:"nevysha-btn-menu",id:"nevyui_sh_options",title:"Nevysha Cozy Nest Settings",dangerouslySetInnerHTML:{__html:WK},onClick:o}),e&&j.jsx(GL,{isVisible:e,children:j.jsxs("div",{className:"App nevysha",children:[j.jsx(QJ,{onClickClose:()=>t(!1)}),j.jsxs("div",{className:"container",children:[j.jsxs(Aw,{variant:"nevysha",children:[j.jsxs(Mw,{style:{backgroundColor:"var(--tab-nav-background-color)"},children:[j.jsx(eu,{children:"Main Settings"}),j.jsx(eu,{children:"Image Browser Settings"}),j.jsx(eu,{children:"Cozy Prompt Settings"}),j.jsx(eu,{children:"Cozy Nest Modules"})]}),j.jsxs(Lw,{children:[j.jsxs(Jl,{css:rh,children:[j.jsxs(wo,{children:[j.jsx(Mn,{isChecked:n.error_popup,onChange:l=>r({...n,error_popup:l.target.checked}),children:"Display information dialog on Cozy Nest error"}),j.jsx(Mn,{isChecked:n.disable_waves_and_gradiant,onChange:l=>r({...n,disable_waves_and_gradiant:l.target.checked}),children:"Disable waves and gradiant background animations"})]}),j.jsxs(Qr,{children:[j.jsx("label",{children:"Main menu position"}),j.jsx(Wh,{value:n.main_menu_position,onChange:l=>r({...n,main_menu_position:l}),children:j.jsxs(Fh,{direction:"row",children:[j.jsx(bo,{value:"left",children:"left"}),j.jsx(bo,{value:"top",children:"top"}),j.jsx(bo,{value:"top_centered",children:"top centered"})]})})]}),j.jsxs(Qr,{children:[j.jsx("label",{children:"Quicksettings position"}),j.jsx(Wh,{value:n.quicksettings_position,onChange:l=>r({...n,quicksettings_position:l}),children:j.jsxs(Fh,{direction:"row",children:[j.jsx(bo,{value:"left",children:"left"}),j.jsx(bo,{value:"split",children:"split"}),j.jsx(bo,{value:"centered",children:"centered"})]})})]}),j.jsx(Cn,{children:j.jsx(Mn,{isChecked:n.accent_generate_button,onChange:l=>r({...n,accent_generate_button:l.target.checked}),children:"Accent Generate Button"})}),j.jsxs(wo,{children:[j.jsxs(Ml,{children:[j.jsx(ca,{children:"Font size"}),j.jsxs(zh,{value:n.font_size,onChange:l=>s(l,"font_size"),min:10,max:18,children:[j.jsx(Bh,{}),j.jsxs(jh,{children:[j.jsx(Vh,{}),j.jsx(Hh,{})]})]})]}),j.jsxs(Ml,{children:[j.jsx(ca,{children:"Extra network card height"}),j.jsxs(zh,{value:n.card_height,onChange:l=>s(l,"card_height"),min:5,max:20,children:[j.jsx(Bh,{}),j.jsxs(jh,{children:[j.jsx(Vh,{}),j.jsx(Hh,{})]})]})]}),j.jsxs(Ml,{children:[j.jsx(ca,{children:"Extra network card width"}),j.jsxs(zh,{value:n.card_width,onChange:l=>s(l,"card_width"),min:5,max:20,children:[j.jsx(Bh,{}),j.jsxs(jh,{children:[j.jsx(Vh,{}),j.jsx(Hh,{})]})]})]})]}),j.jsx(wo,{children:j.jsxs(Ml,{display:"flex",alignItems:"center",children:[j.jsxs(ca,{htmlFor:"color-mode",mb:"0",children:["Color mode : ",n.color_mode]}),j.jsx(vM,{id:"color-mode",onChange:d,isChecked:n.color_mode==="dark"})]})}),j.jsxs(wo,{children:[n.color_mode==="dark"&&j.jsx(Tl,{label:"Font Color (dark)",color:n.font_color,onChange:l=>s(l,"font_color")}),n.color_mode!=="dark"&&j.jsx(Tl,{label:"Font Color (light)",color:n.font_color_light,onChange:l=>s(l,"font_color_light")}),j.jsx(Tl,{label:"Waves Color",color:n.waves_color,onChange:l=>s(l,"waves_color")}),j.jsx(Tl,{label:"Background gradiant Color",color:n.bg_gradiant_color,onChange:l=>s(l,"bg_gradiant_color")}),j.jsx(Tl,{label:"Accent Color",color:n.accent_color,onChange:l=>s(l,"accent_color")}),j.jsx(Tl,{label:"Secondary accent Color",color:n.secondary_accent_color,onChange:l=>s(l,"secondary_accent_color")})]}),j.jsx(wo,{children:j.jsx(Mn,{isChecked:n.sfw_mode,onChange:l=>r({...n,sfw_mode:l.target.checked}),children:"SFW mode 👀 (blur all images)"})})]}),j.jsxs(Jl,{css:rh,children:[j.jsx(wo,{children:j.jsx(Mn,{isChecked:!n.disable_image_browser,onChange:l=>r({...n,disable_image_browser:!l.target.checked}),children:"Enable image browser (Reload UI required)"})}),j.jsxs(wo,{children:[j.jsxs(Ml,{style:{width:"30%"},children:[j.jsx(ca,{children:"Socket port for image browser"}),j.jsx(Pu,{placeholder:"3333",value:n.server_default_port,onChange:l=>s(l,"server_default_port")})]}),j.jsx(Mn,{children:"Auto search port"}),j.jsx(Mn,{visibility:n.webui===Fa?"hidden":"visible",isChecked:n.fetch_output_folder_from_a1111_settings,onChange:l=>r({...n,fetch_output_folder_from_a1111_settings:l.target.checked}),children:"Fetch output folder from a1111 settings (Reload needed to enable)"})]}),j.jsxs(Qr,{children:[j.jsx(ca,{children:"Archive path"}),j.jsx(Pu,{placeholder:"C:/stable-difusion/...",value:n.archive_path,onChange:l=>s(l,"archive_path")})]}),j.jsxs(Qr,{children:[j.jsx(ca,{children:"Output path"}),j.jsx(gee,{config:n,setConfig:r})]})]}),j.jsxs(Jl,{css:rh,children:[j.jsx(Mn,{isChecked:n.enable_cozy_prompt,onChange:l=>r({...n,enable_cozy_prompt:l.target.checked}),children:"Enable Cozy Prompt (Reload UI required)"}),j.jsxs(Qr,{children:[j.jsx("label",{children:"Carret style"}),j.jsx(Wh,{value:n.carret_style,onChange:l=>r({...n,carret_style:l}),children:j.jsxs(Fh,{direction:"row",children:[j.jsx(bo,{value:"thin",children:"Thin"}),j.jsx(bo,{value:"bold",children:"Bold"})]})})]}),j.jsx(Mn,{isChecked:n.save_last_prompt_local_storage,onChange:l=>r({...n,save_last_prompt_local_storage:l.target.checked}),children:"Save last prompt in local storage"})]}),j.jsxs(Jl,{css:rh,children:[j.jsx("p",{children:"Those settings are heavy on DOM modification and might conflict with some others extensions"}),j.jsx("p",{children:"Reload UI needed to apply"}),j.jsxs(Qr,{children:[j.jsx(Mn,{isChecked:n.enable_clear_button,onChange:l=>r({...n,enable_clear_button:l.target.checked}),children:"Enable clear gallery button in txt2img and img2img tabs"}),j.jsx(Mn,{isChecked:!n.disable_image_browser,onChange:l=>r({...n,disable_image_browser:!l.target.checked}),children:"Enable image browser (Reload UI required)"}),j.jsx(Mn,{isChecked:n.enable_cozy_prompt,onChange:l=>r({...n,enable_cozy_prompt:l.target.checked}),children:"Enable Cozy Prompt"}),j.jsx("span",{style:{marginTop:"25px"},children:"Extra Networks"}),j.jsx("span",{children:"You probably only want one of those"}),j.jsx(Mn,{isChecked:n.enable_extra_network_tweaks,onChange:l=>r({...n,enable_extra_network_tweaks:l.target.checked}),children:"Tweaks existing : just move existing component in side panel (will drop support soon)"}),j.jsx(Mn,{isChecked:n.enable_cozy_extra_networks,onChange:l=>r({...n,enable_cozy_extra_networks:l.target.checked}),children:"Cozy Nest Extra Network new implementation"}),j.jsx(Mn,{style:{marginLeft:"25px"},isDisabled:!n.enable_cozy_extra_networks,isChecked:n.deferred_cozy_extra_networks_loading,onChange:l=>r({...n,deferred_cozy_extra_networks_loading:l.target.checked}),children:"Deferred loading : this will only load minimal data on startup but will need to refresh if you want to enable sfw filtering"})]})]})]})]}),j.jsxs(wo,{className:"btn-toolbar",style:{gap:"25px",padding:"15px"},children:[j.jsx("button",{className:"btn-settings",style:{width:"100%"},onClick:a,children:"Save"}),j.jsx(jw,{message:"Are you sure you want to reset all settings ? This will trigger a UI Reload",confirmLabel:"Reset",cancelLabel:"Cancel",onConfirm:c}),j.jsx("button",{className:"btn-settings",style:{width:"100%"},onClick:u,children:"Reload UI"})]}),j.jsx("div",{children:"Made by Nevysha with luv"})]})]})})]})}const jk="cozy_nest_options";function KL(){if(!document.getElementById("nevysha-btn-menu-wrapper")){setTimeout(()=>KL(),200);return}const e=document.createElement("div");e.id=jk,e.style="display: flex;",document.getElementById("nevysha-btn-menu-wrapper").insertBefore(e,document.getElementById("nevysha-btn-menu-wrapper").firstChild),Da.createRoot(document.getElementById(jk)).render(j.jsx(Le.StrictMode,{children:j.jsx(nf,{theme:sf,children:j.jsx(mee,{})})}))}ace.define("ace/mode/prompt_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){const r=e("ace/lib/oop"),i=e("ace/mode/text_highlight_rules").TextHighlightRules;function o(){i.call(this);const s=/[\(\[\{]/,d=/[\)\]\}]/;let a=0;this.$rules={start:[{token:()=>(a++,`open-bracket.open-bracket-${a%4}`),next:"inner",regex:s},{token:()=>(a--,`close-bracket.close-bracket-${(a+1)%4}`),regex:d,next:"start"},{regex:/<lora:/,token:"lora-begin",next:"lora"},{regex:/<hypernetwork:/,token:"hypernetwork-begin",next:"hypernetwork"},{regex:/<hypernet:/,token:"hypernet-begin",next:"hypernet"},{regex:/<lyco:/,token:"lyco-begin",next:"lyco"},{regex:/__.+__/,token:"wildcard"},{regex:/[,|:]/,token:"token"},{regex:/\w+/,token:"text"}],lora:[{regex:">",token:"lora-end",next:"start"},{regex:/:\d+(\.\d+)?/,token:"attention"},{regex:/\w+/,token:"lora-inner"}],hypernetwork:[{regex:">",token:"hypernetwork-end",next:"start"},{regex:/:\d+(\.\d+)?/,token:"attention"},{regex:/\w+/,token:"hypernetwork-inner"}],hypernet:[{regex:">",token:"hypernet-end",next:"start"},{regex:/:\d+(\.\d+)?/,token:"attention"},{regex:/\w+/,token:"hypernet-inner"}],lyco:[{regex:">",token:"lyco-end",next:"start"},{regex:/:\d+(\.\d+)?/,token:"attention"},{regex:/\w+/,token:"lyco-inner"}],inner:[{token:()=>(a++,`open-bracket.open-bracket-${a%4}`),regex:s,next:"inner"},{regex:/:\d+(\.\d+)?/,token:"attention"},{regex:/[,|:]/,token:"token"},{regex:/__.+__/,token:"wildcard"},{regex:/\w+/,token:"inner-bracket"},{token:()=>(a--,`close-bracket.close-bracket-${(a+1)%4}`),regex:d,next:"start"}]}}r.inherits(o,i),t.CustomHighlightRules=o});ace.define("ace/mode/prompt",["require","exports","module","ace/lib/oop","ace/mode/text"],function(e,t,n){const r=e("ace/lib/oop"),i=e("ace/mode/text").Mode,o=e("ace/mode/prompt_highlight_rules").CustomHighlightRules;function s(){this.HighlightRules=o}r.inherits(s,i),s.prototype.$id="ace/mode/prompt",function(){}.call(s.prototype),t.Mode=s});const vee=e=>{const[t,n]=F.useState("");return F.useEffect(()=>{const r=d=>{for(const a of d)if(a.type==="attributes"){const c=document.querySelector(e);n(c.value)}},i={attributes:!0,characterData:!0,childList:!0,subtree:!0},o=new MutationObserver(r),s=document.querySelector(e);return s&&(o.observe(s,i),n(s.value)),()=>{o.disconnect()}},[e]),t};ace.config.setModuleUrl("ace/mode/prompt_highlight_rules","cozy-nest-client/cozy-prompt/prompt_highlight_rules.js");ace.config.setModuleUrl("ace/mode/prompt","cozy-nest-client/cozy-prompt/mode-prompt.js");const yee=ace.require("ace/ext/language_tools");function bee({parentId:e,containerId:t,tabId:n,resolve:r}){let i=localStorage.getItem(`cozy-prompt-height-${t}`);i=i?parseInt(i):200;const o=document.querySelector(`#${e} label textarea`),s=o.parentElement,[d,a]=F.useState(!1),c=vee(`#${e} label textarea`),u="",[l,f]=F.useState(u),h=F.useRef(),[p,g]=F.useState(i),[y,x]=F.useState(!1),[S,E]=F.useState(0),v=()=>{o.value=l;const U=new Event("input");o.dispatchEvent(U)};F.useEffect(()=>{COZY_NEST_CONFIG.save_last_prompt_local_storage&&localStorage.setItem(`cozy-prompt-${t}`,l),v()},[l]),F.useEffect(()=>{document.querySelector(`#${wu.get("clear_prompt")(n)}`).style.display="none",document.querySelector(`#tab_${n} button#paste`).style.display="none";const U=X=>{f(X.target.value)};return o.addEventListener("change",U),()=>{o.removeEventListener("change",U)}},[]),F.useEffect(()=>{f(c)},[c]),F.useEffect(()=>{d?(s.style.display="block",o.style.marginTop="40px"):s.style.display="none"},[d]),F.useEffect(()=>{const U=()=>{y&&x(!1)},X=W=>{if(y){const q=p+W.clientY-S;g(q),localStorage.setItem(`cozy-prompt-height-${t}`,String(q)),E(W.clientY)}};return window.addEventListener("mouseup",U),window.addEventListener("mousemove",X),()=>{window.removeEventListener("mouseup",U),window.removeEventListener("mousemove",X)}},[y]);const w=U=>{U.preventDefault(),x(!0),E(U.clientY)},b=()=>{a(!d)};function m(){f(l.replaceAll("),",`),
`))}function $(){document.querySelector(`#${n}_clear_prompt`).click()}function A(){document.querySelector(`#tab_${n} button#paste`).click()}function C(){return document.querySelector(`#${e} .autocompleteResults.${n}`)!==null}function k(){const U={activated:!0,autoShown:!0,getCompletions:function(X,W,q,Q,G){if(!C()){ss.debug("setupCompleters: TAC not found");return}setTimeout(()=>{const oe=[];ss.group("getCompletions");let ne=0;document.querySelectorAll(`#${X.parentId} .autocompleteResults.${X.tabId} ul li`).forEach(ce=>{let fe=ce.querySelector(".acListItem").innerText,he=ce.querySelector(".acListItem").innerText;he.includes("➝")&&(he=he.split("➝")[1].trim());let me=ce.querySelector(".acMetaText").innerText;const Pe={caption:fe,value:he,meta:me,$score:ne--};ss.debug(Pe),oe.push(Pe)}),ss.groupEnd("getCompletions"),G(null,oe)},700)}};yee.setCompleters([U])}function I(U){window[`${t}_editor`]=U,ss.debug(`${t}_editor`),U.parentId=e,U.tabId=n,U.renderer.setPadding(10),U.renderer.setScrollMargin(10),U.on("change",function(X,W){ss.debug("CHANGE:",X,W)}),U.commands.addCommand({name:"incrementItem",bindKey:{win:"Ctrl-Up",mac:"Command-Up"},exec:function(X){X.clearSelection();const W=X.getCursorPosition(),q=X.session.getLine(W.row),Q=L(q,W.column),G=new Ou.Range(W.row,0,W.row,q.length);X.session.replace(G,Q),X.moveCursorToPosition({row:W.row,column:W.column})}}),U.commands.addCommand({name:"decrementItem",bindKey:{win:"Ctrl-Down",mac:"Command-Down"},exec:function(X){X.clearSelection();const W=X.getCursorPosition(),q=X.session.getLine(W.row),Q=T(q,W.column),G=new Ou.Range(W.row,0,W.row,q.length);X.session.replace(G,Q),X.moveCursorToPosition({row:W.row,column:W.column})}}),k(),U.setOptions({animatedScroll:!0,cursorStyle:"smooth",behavioursEnabled:!0,wrapBehavioursEnabled:!0,autoScrollEditorIntoView:!0,wrap:!0,fontSize:"15px",fontFamily:"monospace",enableBasicAutocompletion:!0}),setTimeout(()=>{r()},200)}function L(U,X){const W=U.split(","),q=R(W,X);if(q!==-1){const Q=W[q];W[q]=P(Q,(G,oe)=>G+oe)}return W.join(",")}function T(U,X){const W=U.split(","),q=R(W,X);if(q!==-1){const Q=W[q];W[q]=P(Q,(G,oe)=>G-oe)}return W.join(",")}function R(U,X){let W=-1,q=0;for(let Q=0;Q<U.length;Q++){const G=U[Q];if(X>=q&&X<=q+G.length){W=Q;break}q+=G.length+1}return W}function P(U,X){const W=U.startsWith(" "),q=U.endsWith(" ");let Q=W?" ":"",G=q?" ":"";function oe(he){return`${Q}${he}${G}`}function ne(he,me,Pe){const Ee=parseFloat(he[2]),Ae=me*10===1?10:100,Fe=parseInt(String(Ae),2)/2,Be=Math.round(X(Ee,me)*Ae)/Ae;return Be===1&&!Pe?U.replace(`:${he[2]}`,"").slice(1,-1):U.replace(he[2],Be.toFixed(Fe))}if(U=U.trim(),!U.includes("(")&&!U.includes("<")){let he=X(1,.1);const me=`(${U}:${he.toFixed(1)})`;return oe(me)}let ce=/\(([^:]+):(\d+(\.\d+)?)\)/g,fe=ce.exec(U);if(fe){const he=ne(fe,.1);return oe(he)}if(ce=/<([^>]+):(\d+(\.\d+)?)>/g,fe=ce.exec(U),fe){const he=ne(fe,.05,!0);return oe(he)}}function D(){return COZY_NEST_CONFIG.carret_style==="bold"}function N(U){B(),f(U)}function B(){C()&&h.current&&h.current.editor&&h.current.editor.completer&&h.current.editor.completer.detach()}function Z(U){if(!C()){ss.debug("setupCompleters: TAC not found");return}if(!l||l==="")return;const X=l.trim();if(X[X.length-1]===",")return;ace.require("ace/autocomplete").Autocomplete.startCommand.exec(h.current.editor,{})}return j.jsxs(Qr,{style:{width:"100%"},children:[j.jsx("div",{className:D()?"CozyPrompt bold-cursor":"CozyPrompt",style:{height:`${p}px`},children:j.jsx(qM,{ref:h,onLoad:I,mode:"prompt",theme:"github_dark",showPrintMargin:!1,onChange:N,onBlur:v,onInput:Z,value:l,name:"ace-prompt-editor",editorProps:{$blockScrolling:!0},style:{width:"100%",height:"100%"}})}),j.jsxs(Cn,{children:[j.jsx(Er,{onClick:m,children:"Prettify"}),j.jsxs(Er,{onClick:b,children:[d?"Hide":"Show"," native textarea"]}),j.jsx(Er,{onClick:A,children:"Redo last prompt"}),j.jsx(jw,{style:{height:"100%"},message:"Delete prompt ?",confirmLabel:"Yes",buttonLabel:"Clear prompt",cancelLabel:"No",onConfirm:()=>$()})]}),j.jsx("div",{onMouseDown:w,className:"CozyPrompt__resize-handle",children:j.jsx("div",{className:"CozyPrompt__resize-handle-line"})})]})}async function mb(e,t,n){return new Promise((r,i)=>{try{wee(e,t,n,r)}catch(o){i(o)}})}function wee(e,t,n,r){if(!document.getElementById(e)){setTimeout(()=>mb(),200);return}const i=document.createElement("div");i.id=t,i.style="display: flex; height: fit-content; width: 100%;",document.getElementById(e).insertBefore(i,document.getElementById(e).firstChild),Da.createRoot(document.getElementById(t)).render(j.jsx(Le.StrictMode,{children:j.jsx(nf,{theme:sf,children:j.jsx(bee,{containerId:t,parentId:e,tabId:n,resolve:r})})}))}const qL=Le.createContext({ready:!1});function See(e,t){return new Promise(n=>{let r;new MutationObserver((o,s)=>{clearTimeout(r),r=setTimeout(()=>{s.disconnect(),n()},3e3)}).observe(e,{attributes:!0,childList:!0,subtree:!0}),!e.hasChildNodes()&&!e.attributes.length&&n()})}async function xee(e){const t=document.querySelector(`button#${wu.get("extra_networks_btn")(e)}`);t.style.display="none",$t.debug("triggering extra network",e);const n=document.querySelector(`div#${e}_extra_networks`);n.style.display="none",e==="txt2img"&&(n.parentNode.style.marginBottom="calc(var(--layout-gap) * -1)"),t.click(),await See(n),$t.debug("tabs loaded",e)}const vc={};function _ee({children:e,prefix:t}){const[n,r]=Le.useState(!1),[i,o]=Le.useState(!1);vc[t]||(vc[t]={loaded:!1,loading:!1}),Le.useEffect(()=>(tb(t),Rd.once(`extra_network-open:${t}`,d=>{$t.debug(`extra network load event received for ${d}`),o(!0)}),()=>{Rd.off(`extra_network-open:${t}`)}),[]),Le.useEffect(()=>{if(!i)return;const{ready:d,loading:a}=vc[t];d||a||(vc[t]={loaded:!1,loading:!0},(async()=>(await xee(t),vc[t]={loaded:!0,loading:!1},r(!0)))())},[i]);const s={ready:n};return j.jsx(qL.Provider,{value:s,children:e})}let hy=null,Bk=!1;function Cee({prefix:e}){const t=`civitai-helper-refresh-${e}`,n=Le.useRef(null),{ready:r}=Le.useContext(qL),[i,o]=Le.useState(!1);F.useEffect(()=>(r&&s(),()=>{d()}),[r]);function s(){if(!n.current)return;$t.debug("loading native elements",e);const c=document.querySelector(`#${e}_extra_tabs`);hy=c.parentNode;const u=document.querySelector(`button#${wu.get("extra_networks_btn")(e)}`);u.style.display="none";const l=document.querySelector(`div#${e}_extra_networks`);if(l.style.display="none",COZY_NEST_CONFIG.webui===Fa){const h=document.querySelector(`button#${e}_extra_close`);h.style.display="none"}let f=document.querySelector(`#civitai-helper-refresh-${e}`);if(!f&&(f=document.querySelector(`#${e}_extra_tabs > .tab-nav`).lastChild,f.textContent==="🔁")){f.style.display="none";const h=f.cloneNode(!0);h.textContent="🔁",h.style.display="block",h.id=`nevysha-civitai-helper-refresh-${e}`,h.onclick=()=>{a()},f.parentNode.appendChild(h),!f.id||f.id===""?f.id=t:f.id&&f.id!==t&&console.error("civitai refresh button has an ID in this probably newer version. You should maybe tell Nevysha because it will likely break extra network tweaks :)"),Bk=!0}n.current.appendChild(c)}function d(c){if(!n.current||!hy)return;c=c||!1,$t.debug("unloading native elements",e);const u=document.querySelector(`#${e}_extra_tabs`);if(c){const l=document.querySelector(`button#${e}_extra_networks`);l.style.display="block";const f=document.querySelector(`div#${e}_extra_networks`);if(f.style.display="block",Bk){const h=document.querySelector(`#civitai-helper-refresh-${e}`);h.style.display="block"}}hy.appendChild(u)}function a(){if(!n.current)return;$t.debug("civitai helper tweak",e),o(!0),d(),document.querySelector(`#${t}`).click(),setTimeout(()=>{o(!1),s()},1e3)}return j.jsxs(j.Fragment,{children:[(!r||i)&&j.jsx(Gw,{label:"Loading Extra Networks..."}),j.jsx("div",{ref:n,style:{height:"100%"}})]})}function Hk(e){return new Promise((t,n)=>{YL(e,t)})}function YL(e,t){if($t.debug("startExtraNetwork",e),!document.getElementById(`cozy-${e}-extra-network-react`)){$t.debug("waiting for extra network react",e),setTimeout(()=>YL(),200);return}t(),Da.createRoot(document.getElementById(`cozy-${e}-extra-network-react`)).render(j.jsx(Le.StrictMode,{children:j.jsx(_ee,{prefix:e,children:j.jsx(Cee,{prefix:e})})}))}function kee(){window.confirm_clear_prompt=function(e,t){return e="",t="",[e,t]}}const Eee={override_confirm_clear_prompt:kee};const $ee={transform:"rotate(-45deg)"},Tee={fill:"red"},Es={link:j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:j.jsx("path",{d:"M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"})}),image:j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:j.jsx("path",{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"})}),arrow:j.jsx("svg",{style:$ee,xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:j.jsx("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288 480 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-370.7 0 73.4-73.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-128 128z"})}),magicWand:j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:j.jsx("path",{d:"M234.7 42.7L197 56.8c-3 1.1-5 4-5 7.2s2 6.1 5 7.2l37.7 14.1L248.8 123c1.1 3 4 5 7.2 5s6.1-2 7.2-5l14.1-37.7L315 71.2c3-1.1 5-4 5-7.2s-2-6.1-5-7.2L277.3 42.7 263.2 5c-1.1-3-4-5-7.2-5s-6.1 2-7.2 5L234.7 42.7zM46.1 395.4c-18.7 18.7-18.7 49.1 0 67.9l34.6 34.6c18.7 18.7 49.1 18.7 67.9 0L529.9 116.5c18.7-18.7 18.7-49.1 0-67.9L495.3 14.1c-18.7-18.7-49.1-18.7-67.9 0L46.1 395.4zM484.6 82.6l-105 105-23.3-23.3 105-105 23.3 23.3zM7.5 117.2C3 118.9 0 123.2 0 128s3 9.1 7.5 10.8L64 160l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L128 160l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L128 96 106.8 39.5C105.1 35 100.8 32 96 32s-9.1 3-10.8 7.5L64 96 7.5 117.2zm352 256c-4.5 1.7-7.5 6-7.5 10.8s3 9.1 7.5 10.8L416 416l21.2 56.5c1.7 4.5 6 7.5 10.8 7.5s9.1-3 10.8-7.5L480 416l56.5-21.2c4.5-1.7 7.5-6 7.5-10.8s-3-9.1-7.5-10.8L480 352l-21.2-56.5c-1.7-4.5-6-7.5-10.8-7.5s-9.1 3-10.8 7.5L416 352l-56.5 21.2z"})}),eye:j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 576 512",children:j.jsx("path",{d:"M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"})}),eyeSlash:j.jsx("svg",{style:Tee,xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:j.jsx("path",{d:"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"})})},Aee=({children:e,placeholderClassName:t})=>{const[n,r]=F.useState(!1),i=F.useRef(null);return F.useEffect(()=>{const o=new IntersectionObserver(([s])=>{r(s.isIntersecting)},{root:null,rootMargin:"0px",threshold:.1});return i.current&&o.observe(i.current),()=>{i.current&&o.unobserve(i.current)}},[]),j.jsx("div",{ref:i,children:n?e:j.jsx("div",{className:t,children:"blank"})})};function Mee(e){function t(X,W,q,Q,G){for(var oe=0,ne=0,ce=0,fe=0,he,me,Pe=0,Ee=0,Ae,Fe=Ae=he=0,Be=0,lt=0,qt=0,pt=0,on=q.length,xt=on-1,ve,Se="",be="",De="",ot="",xe;Be<on;){if(me=q.charCodeAt(Be),Be===xt&&ne+fe+ce+oe!==0&&(ne!==0&&(me=ne===47?10:47),fe=ce=oe=0,on++,xt++),ne+fe+ce+oe===0){if(Be===xt&&(0<lt&&(Se=Se.replace(f,"")),0<Se.trim().length)){switch(me){case 32:case 9:case 59:case 13:case 10:break;default:Se+=q.charAt(Be)}me=59}switch(me){case 123:for(Se=Se.trim(),he=Se.charCodeAt(0),Ae=1,pt=++Be;Be<on;){switch(me=q.charCodeAt(Be)){case 123:Ae++;break;case 125:Ae--;break;case 47:switch(me=q.charCodeAt(Be+1)){case 42:case 47:e:{for(Fe=Be+1;Fe<xt;++Fe)switch(q.charCodeAt(Fe)){case 47:if(me===42&&q.charCodeAt(Fe-1)===42&&Be+2!==Fe){Be=Fe+1;break e}break;case 10:if(me===47){Be=Fe+1;break e}}Be=Fe}}break;case 91:me++;case 40:me++;case 34:case 39:for(;Be++<xt&&q.charCodeAt(Be)!==me;);}if(Ae===0)break;Be++}switch(Ae=q.substring(pt,Be),he===0&&(he=(Se=Se.replace(l,"").trim()).charCodeAt(0)),he){case 64:switch(0<lt&&(Se=Se.replace(f,"")),me=Se.charCodeAt(1),me){case 100:case 109:case 115:case 45:lt=W;break;default:lt=P}if(Ae=t(W,lt,Ae,me,G+1),pt=Ae.length,0<N&&(lt=n(P,Se,qt),xe=d(3,Ae,lt,W,L,I,pt,me,G,Q),Se=lt.join(""),xe!==void 0&&(pt=(Ae=xe.trim()).length)===0&&(me=0,Ae="")),0<pt)switch(me){case 115:Se=Se.replace(b,s);case 100:case 109:case 45:Ae=Se+"{"+Ae+"}";break;case 107:Se=Se.replace(S,"$1 $2"),Ae=Se+"{"+Ae+"}",Ae=R===1||R===2&&o("@"+Ae,3)?"@-webkit-"+Ae+"@"+Ae:"@"+Ae;break;default:Ae=Se+Ae,Q===112&&(Ae=(be+=Ae,""))}else Ae="";break;default:Ae=t(W,n(W,Se,qt),Ae,Q,G+1)}De+=Ae,Ae=qt=lt=Fe=he=0,Se="",me=q.charCodeAt(++Be);break;case 125:case 59:if(Se=(0<lt?Se.replace(f,""):Se).trim(),1<(pt=Se.length))switch(Fe===0&&(he=Se.charCodeAt(0),he===45||96<he&&123>he)&&(pt=(Se=Se.replace(" ",":")).length),0<N&&(xe=d(1,Se,W,X,L,I,be.length,Q,G,Q))!==void 0&&(pt=(Se=xe.trim()).length)===0&&(Se="\0\0"),he=Se.charCodeAt(0),me=Se.charCodeAt(1),he){case 0:break;case 64:if(me===105||me===99){ot+=Se+q.charAt(Be);break}default:Se.charCodeAt(pt-1)!==58&&(be+=i(Se,he,me,Se.charCodeAt(2)))}qt=lt=Fe=he=0,Se="",me=q.charCodeAt(++Be)}}switch(me){case 13:case 10:ne===47?ne=0:1+he===0&&Q!==107&&0<Se.length&&(lt=1,Se+="\0"),0<N*Z&&d(0,Se,W,X,L,I,be.length,Q,G,Q),I=1,L++;break;case 59:case 125:if(ne+fe+ce+oe===0){I++;break}default:switch(I++,ve=q.charAt(Be),me){case 9:case 32:if(fe+oe+ne===0)switch(Pe){case 44:case 58:case 9:case 32:ve="";break;default:me!==32&&(ve=" ")}break;case 0:ve="\\0";break;case 12:ve="\\f";break;case 11:ve="\\v";break;case 38:fe+ne+oe===0&&(lt=qt=1,ve="\f"+ve);break;case 108:if(fe+ne+oe+T===0&&0<Fe)switch(Be-Fe){case 2:Pe===112&&q.charCodeAt(Be-3)===58&&(T=Pe);case 8:Ee===111&&(T=Ee)}break;case 58:fe+ne+oe===0&&(Fe=Be);break;case 44:ne+ce+fe+oe===0&&(lt=1,ve+="\r");break;case 34:case 39:ne===0&&(fe=fe===me?0:fe===0?me:fe);break;case 91:fe+ne+ce===0&&oe++;break;case 93:fe+ne+ce===0&&oe--;break;case 41:fe+ne+oe===0&&ce--;break;case 40:if(fe+ne+oe===0){if(he===0)switch(2*Pe+3*Ee){case 533:break;default:he=1}ce++}break;case 64:ne+ce+fe+oe+Fe+Ae===0&&(Ae=1);break;case 42:case 47:if(!(0<fe+oe+ce))switch(ne){case 0:switch(2*me+3*q.charCodeAt(Be+1)){case 235:ne=47;break;case 220:pt=Be,ne=42}break;case 42:me===47&&Pe===42&&pt+2!==Be&&(q.charCodeAt(pt+2)===33&&(be+=q.substring(pt,Be+1)),ve="",ne=0)}}ne===0&&(Se+=ve)}Ee=Pe,Pe=me,Be++}if(pt=be.length,0<pt){if(lt=W,0<N&&(xe=d(2,be,lt,X,L,I,pt,Q,G,Q),xe!==void 0&&(be=xe).length===0))return ot+be+De;if(be=lt.join(",")+"{"+be+"}",R*T!==0){switch(R!==2||o(be,2)||(T=0),T){case 111:be=be.replace(v,":-moz-$1")+be;break;case 112:be=be.replace(E,"::-webkit-input-$1")+be.replace(E,"::-moz-$1")+be.replace(E,":-ms-input-$1")+be}T=0}}return ot+be+De}function n(X,W,q){var Q=W.trim().split(y);W=Q;var G=Q.length,oe=X.length;switch(oe){case 0:case 1:var ne=0;for(X=oe===0?"":X[0]+" ";ne<G;++ne)W[ne]=r(X,W[ne],q).trim();break;default:var ce=ne=0;for(W=[];ne<G;++ne)for(var fe=0;fe<oe;++fe)W[ce++]=r(X[fe]+" ",Q[ne],q).trim()}return W}function r(X,W,q){var Q=W.charCodeAt(0);switch(33>Q&&(Q=(W=W.trim()).charCodeAt(0)),Q){case 38:return W.replace(x,"$1"+X.trim());case 58:return X.trim()+W.replace(x,"$1"+X.trim());default:if(0<1*q&&0<W.indexOf("\f"))return W.replace(x,(X.charCodeAt(0)===58?"":"$1")+X.trim())}return X+W}function i(X,W,q,Q){var G=X+";",oe=2*W+3*q+4*Q;if(oe===944){X=G.indexOf(":",9)+1;var ne=G.substring(X,G.length-1).trim();return ne=G.substring(0,X).trim()+ne+";",R===1||R===2&&o(ne,1)?"-webkit-"+ne+ne:ne}if(R===0||R===2&&!o(G,1))return G;switch(oe){case 1015:return G.charCodeAt(10)===97?"-webkit-"+G+G:G;case 951:return G.charCodeAt(3)===116?"-webkit-"+G+G:G;case 963:return G.charCodeAt(5)===110?"-webkit-"+G+G:G;case 1009:if(G.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+G+G;case 978:return"-webkit-"+G+"-moz-"+G+G;case 1019:case 983:return"-webkit-"+G+"-moz-"+G+"-ms-"+G+G;case 883:if(G.charCodeAt(8)===45)return"-webkit-"+G+G;if(0<G.indexOf("image-set(",11))return G.replace(k,"$1-webkit-$2")+G;break;case 932:if(G.charCodeAt(4)===45)switch(G.charCodeAt(5)){case 103:return"-webkit-box-"+G.replace("-grow","")+"-webkit-"+G+"-ms-"+G.replace("grow","positive")+G;case 115:return"-webkit-"+G+"-ms-"+G.replace("shrink","negative")+G;case 98:return"-webkit-"+G+"-ms-"+G.replace("basis","preferred-size")+G}return"-webkit-"+G+"-ms-"+G+G;case 964:return"-webkit-"+G+"-ms-flex-"+G+G;case 1023:if(G.charCodeAt(8)!==99)break;return ne=G.substring(G.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+ne+"-webkit-"+G+"-ms-flex-pack"+ne+G;case 1005:return p.test(G)?G.replace(h,":-webkit-")+G.replace(h,":-moz-")+G:G;case 1e3:switch(ne=G.substring(13).trim(),W=ne.indexOf("-")+1,ne.charCodeAt(0)+ne.charCodeAt(W)){case 226:ne=G.replace(w,"tb");break;case 232:ne=G.replace(w,"tb-rl");break;case 220:ne=G.replace(w,"lr");break;default:return G}return"-webkit-"+G+"-ms-"+ne+G;case 1017:if(G.indexOf("sticky",9)===-1)break;case 975:switch(W=(G=X).length-10,ne=(G.charCodeAt(W)===33?G.substring(0,W):G).substring(X.indexOf(":",7)+1).trim(),oe=ne.charCodeAt(0)+(ne.charCodeAt(7)|0)){case 203:if(111>ne.charCodeAt(8))break;case 115:G=G.replace(ne,"-webkit-"+ne)+";"+G;break;case 207:case 102:G=G.replace(ne,"-webkit-"+(102<oe?"inline-":"")+"box")+";"+G.replace(ne,"-webkit-"+ne)+";"+G.replace(ne,"-ms-"+ne+"box")+";"+G}return G+";";case 938:if(G.charCodeAt(5)===45)switch(G.charCodeAt(6)){case 105:return ne=G.replace("-items",""),"-webkit-"+G+"-webkit-box-"+ne+"-ms-flex-"+ne+G;case 115:return"-webkit-"+G+"-ms-flex-item-"+G.replace($,"")+G;default:return"-webkit-"+G+"-ms-flex-line-pack"+G.replace("align-content","").replace($,"")+G}break;case 973:case 989:if(G.charCodeAt(3)!==45||G.charCodeAt(4)===122)break;case 931:case 953:if(C.test(X)===!0)return(ne=X.substring(X.indexOf(":")+1)).charCodeAt(0)===115?i(X.replace("stretch","fill-available"),W,q,Q).replace(":fill-available",":stretch"):G.replace(ne,"-webkit-"+ne)+G.replace(ne,"-moz-"+ne.replace("fill-",""))+G;break;case 962:if(G="-webkit-"+G+(G.charCodeAt(5)===102?"-ms-"+G:"")+G,q+Q===211&&G.charCodeAt(13)===105&&0<G.indexOf("transform",10))return G.substring(0,G.indexOf(";",27)+1).replace(g,"$1-webkit-$2")+G}return G}function o(X,W){var q=X.indexOf(W===1?":":"{"),Q=X.substring(0,W!==3?q:10);return q=X.substring(q+1,X.length-1),B(W!==2?Q:Q.replace(A,"$1"),q,W)}function s(X,W){var q=i(W,W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2));return q!==W+";"?q.replace(m," or ($1)").substring(4):"("+W+")"}function d(X,W,q,Q,G,oe,ne,ce,fe,he){for(var me=0,Pe=W,Ee;me<N;++me)switch(Ee=D[me].call(u,X,Pe,q,Q,G,oe,ne,ce,fe,he)){case void 0:case!1:case!0:case null:break;default:Pe=Ee}if(Pe!==W)return Pe}function a(X){switch(X){case void 0:case null:N=D.length=0;break;default:if(typeof X=="function")D[N++]=X;else if(typeof X=="object")for(var W=0,q=X.length;W<q;++W)a(X[W]);else Z=!!X|0}return a}function c(X){return X=X.prefix,X!==void 0&&(B=null,X?typeof X!="function"?R=1:(R=2,B=X):R=0),c}function u(X,W){var q=X;if(33>q.charCodeAt(0)&&(q=q.trim()),U=q,q=[U],0<N){var Q=d(-1,W,q,q,L,I,0,0,0,0);Q!==void 0&&typeof Q=="string"&&(W=Q)}var G=t(P,q,W,0,0);return 0<N&&(Q=d(-2,G,q,q,L,I,G.length,0,0,0),Q!==void 0&&(G=Q)),U="",T=0,I=L=1,G}var l=/^\0+/g,f=/[\0\r\f]/g,h=/: */g,p=/zoo|gra/,g=/([,: ])(transform)/g,y=/,\r+?/g,x=/([\t\r\n ])*\f?&/g,S=/@(k\w+)\s*(\S*)\s*/,E=/::(place)/g,v=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,b=/\(\s*(.*)\s*\)/g,m=/([\s\S]*?);/g,$=/-self|flex-/g,A=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,k=/([^-])(image-set\()/,I=1,L=1,T=0,R=1,P=[],D=[],N=0,B=null,Z=0,U="";return u.use=a,u.set=c,e!==void 0&&c(e),u}var Lee={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};function Mo(){return(Mo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Vk=function(e,t){for(var n=[e[0]],r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n},vb=function(e){return e!==null&&typeof e=="object"&&(e.toString?e.toString():Object.prototype.toString.call(e))==="[object Object]"&&!k1.typeOf(e)},ug=Object.freeze([]),Ia=Object.freeze({});function Dd(e){return typeof e=="function"}function Wk(e){return e.displayName||e.name||"Component"}function qw(e){return e&&typeof e.styledComponentId=="string"}var Nu=typeof process<"u"&&process.env!==void 0&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||"data-styled",Yw=typeof window<"u"&&"HTMLElement"in window,Ree=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&({}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==""?{}.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&{}.REACT_APP_SC_DISABLE_SPEEDY:{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==""&&{}.SC_DISABLE_SPEEDY!=="false"&&{}.SC_DISABLE_SPEEDY));function cf(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var Pee=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var r=0,i=0;i<n;i++)r+=this.groupSizes[i];return r},t.insertRules=function(n,r){if(n>=this.groupSizes.length){for(var i=this.groupSizes,o=i.length,s=o;n>=s;)(s<<=1)<0&&cf(16,""+n);this.groupSizes=new Uint32Array(s),this.groupSizes.set(i),this.length=s;for(var d=o;d<s;d++)this.groupSizes[d]=0}for(var a=this.indexOfGroup(n+1),c=0,u=r.length;c<u;c++)this.tag.insertRule(a,r[c])&&(this.groupSizes[n]++,a++)},t.clearGroup=function(n){if(n<this.length){var r=this.groupSizes[n],i=this.indexOfGroup(n),o=i+r;this.groupSizes[n]=0;for(var s=i;s<o;s++)this.tag.deleteRule(i)}},t.getGroup=function(n){var r="";if(n>=this.length||this.groupSizes[n]===0)return r;for(var i=this.groupSizes[n],o=this.indexOfGroup(n),s=o+i,d=o;d<s;d++)r+=this.tag.getRule(d)+`/*!sc*/
`;return r},e}(),qh=new Map,cg=new Map,ed=1,ih=function(e){if(qh.has(e))return qh.get(e);for(;cg.has(ed);)ed++;var t=ed++;return qh.set(e,t),cg.set(t,e),t},Iee=function(e){return cg.get(e)},Oee=function(e,t){t>=ed&&(ed=t+1),qh.set(e,t),cg.set(t,e)},Fee="style["+Nu+'][data-styled-version="5.3.11"]',Dee=new RegExp("^"+Nu+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Nee=function(e,t,n){for(var r,i=n.split(","),o=0,s=i.length;o<s;o++)(r=i[o])&&e.registerName(t,r)},zee=function(e,t){for(var n=(t.textContent||"").split(`/*!sc*/
`),r=[],i=0,o=n.length;i<o;i++){var s=n[i].trim();if(s){var d=s.match(Dee);if(d){var a=0|parseInt(d[1],10),c=d[2];a!==0&&(Oee(c,a),Nee(e,c,d[3]),e.getTag().insertRules(a,r)),r.length=0}else r.push(s)}}},jee=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},XL=function(e){var t=document.head,n=e||t,r=document.createElement("style"),i=function(d){for(var a=d.childNodes,c=a.length;c>=0;c--){var u=a[c];if(u&&u.nodeType===1&&u.hasAttribute(Nu))return u}}(n),o=i!==void 0?i.nextSibling:null;r.setAttribute(Nu,"active"),r.setAttribute("data-styled-version","5.3.11");var s=jee();return s&&r.setAttribute("nonce",s),n.insertBefore(r,o),r},Bee=function(){function e(n){var r=this.element=XL(n);r.appendChild(document.createTextNode("")),this.sheet=function(i){if(i.sheet)return i.sheet;for(var o=document.styleSheets,s=0,d=o.length;s<d;s++){var a=o[s];if(a.ownerNode===i)return a}cf(17)}(r),this.length=0}var t=e.prototype;return t.insertRule=function(n,r){try{return this.sheet.insertRule(r,n),this.length++,!0}catch{return!1}},t.deleteRule=function(n){this.sheet.deleteRule(n),this.length--},t.getRule=function(n){var r=this.sheet.cssRules[n];return r!==void 0&&typeof r.cssText=="string"?r.cssText:""},e}(),Hee=function(){function e(n){var r=this.element=XL(n);this.nodes=r.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(n,r){if(n<=this.length&&n>=0){var i=document.createTextNode(r),o=this.nodes[n];return this.element.insertBefore(i,o||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n<this.length?this.nodes[n].textContent:""},e}(),Vee=function(){function e(n){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(n,r){return n<=this.length&&(this.rules.splice(n,0,r),this.length++,!0)},t.deleteRule=function(n){this.rules.splice(n,1),this.length--},t.getRule=function(n){return n<this.length?this.rules[n]:""},e}(),Uk=Yw,Wee={isServer:!Yw,useCSSOMInjection:!Ree},ZL=function(){function e(n,r,i){n===void 0&&(n=Ia),r===void 0&&(r={}),this.options=Mo({},Wee,{},n),this.gs=r,this.names=new Map(i),this.server=!!n.isServer,!this.server&&Yw&&Uk&&(Uk=!1,function(o){for(var s=document.querySelectorAll(Fee),d=0,a=s.length;d<a;d++){var c=s[d];c&&c.getAttribute(Nu)!=="active"&&(zee(o,c),c.parentNode&&c.parentNode.removeChild(c))}}(this))}e.registerId=function(n){return ih(n)};var t=e.prototype;return t.reconstructWithOptions=function(n,r){return r===void 0&&(r=!0),new e(Mo({},this.options,{},n),this.gs,r&&this.names||void 0)},t.allocateGSInstance=function(n){return this.gs[n]=(this.gs[n]||0)+1},t.getTag=function(){return this.tag||(this.tag=(i=(r=this.options).isServer,o=r.useCSSOMInjection,s=r.target,n=i?new Vee(s):o?new Bee(s):new Hee(s),new Pee(n)));var n,r,i,o,s},t.hasNameForId=function(n,r){return this.names.has(n)&&this.names.get(n).has(r)},t.registerName=function(n,r){if(ih(n),this.names.has(n))this.names.get(n).add(r);else{var i=new Set;i.add(r),this.names.set(n,i)}},t.insertRules=function(n,r,i){this.registerName(n,r),this.getTag().insertRules(ih(n),i)},t.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},t.clearRules=function(n){this.getTag().clearGroup(ih(n)),this.clearNames(n)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(n){for(var r=n.getTag(),i=r.length,o="",s=0;s<i;s++){var d=Iee(s);if(d!==void 0){var a=n.names.get(d),c=r.getGroup(s);if(a&&c&&a.size){var u=Nu+".g"+s+'[id="'+d+'"]',l="";a!==void 0&&a.forEach(function(f){f.length>0&&(l+=f+",")}),o+=""+c+u+'{content:"'+l+`"}/*!sc*/
`}}}return o}(this)},e}(),Uee=/(a)(d)/gi,Gk=function(e){return String.fromCharCode(e+(e>25?39:97))};function yb(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Gk(t%52)+n;return(Gk(t%52)+n).replace(Uee,"$1-$2")}var nu=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},QL=function(e){return nu(5381,e)};function Gee(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(Dd(n)&&!qw(n))return!1}return!0}var Kee=QL("5.3.11"),qee=function(){function e(t,n,r){this.rules=t,this.staticRulesId="",this.isStatic=(r===void 0||r.isStatic)&&Gee(t),this.componentId=n,this.baseHash=nu(Kee,n),this.baseStyle=r,ZL.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,r){var i=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(t,n,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&n.hasNameForId(i,this.staticRulesId))o.push(this.staticRulesId);else{var s=zu(this.rules,t,n,r).join(""),d=yb(nu(this.baseHash,s)>>>0);if(!n.hasNameForId(i,d)){var a=r(s,"."+d,void 0,i);n.insertRules(i,d,a)}o.push(d),this.staticRulesId=d}else{for(var c=this.rules.length,u=nu(this.baseHash,r.hash),l="",f=0;f<c;f++){var h=this.rules[f];if(typeof h=="string")l+=h;else if(h){var p=zu(h,t,n,r),g=Array.isArray(p)?p.join(""):p;u=nu(u,g+f),l+=g}}if(l){var y=yb(u>>>0);if(!n.hasNameForId(i,y)){var x=r(l,"."+y,void 0,i);n.insertRules(i,y,x)}o.push(y)}}return o.join(" ")},e}(),Yee=/^\s*\/\/.*$/gm,Xee=[":","[",".","#"];function Zee(e){var t,n,r,i,o=e===void 0?Ia:e,s=o.options,d=s===void 0?Ia:s,a=o.plugins,c=a===void 0?ug:a,u=new Mee(d),l=[],f=function(g){function y(x){if(x)try{g(x+"}")}catch{}}return function(x,S,E,v,w,b,m,$,A,C){switch(x){case 1:if(A===0&&S.charCodeAt(0)===64)return g(S+";"),"";break;case 2:if($===0)return S+"/*|*/";break;case 3:switch($){case 102:case 112:return g(E[0]+S),"";default:return S+(C===0?"/*|*/":"")}case-2:S.split("/*|*/}").forEach(y)}}}(function(g){l.push(g)}),h=function(g,y,x){return y===0&&Xee.indexOf(x[n.length])!==-1||x.match(i)?g:"."+t};function p(g,y,x,S){S===void 0&&(S="&");var E=g.replace(Yee,""),v=y&&x?x+" "+y+" { "+E+" }":E;return t=S,n=y,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),u(x||!y?"":y,v)}return u.use([].concat(c,[function(g,y,x){g===2&&x.length&&x[0].lastIndexOf(n)>0&&(x[0]=x[0].replace(r,h))},f,function(g){if(g===-2){var y=l;return l=[],y}}])),p.hash=c.length?c.reduce(function(g,y){return y.name||cf(15),nu(g,y.name)},5381).toString():"",p}var JL=Le.createContext();JL.Consumer;var eR=Le.createContext(),Qee=(eR.Consumer,new ZL),bb=Zee();function Jee(){return F.useContext(JL)||Qee}function ete(){return F.useContext(eR)||bb}var tte=function(){function e(t,n){var r=this;this.inject=function(i,o){o===void 0&&(o=bb);var s=r.name+o.hash;i.hasNameForId(r.id,s)||i.insertRules(r.id,s,o(r.rules,s,"@keyframes"))},this.toString=function(){return cf(12,String(r.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=bb),this.name+t.hash},e}(),nte=/([A-Z])/,rte=/([A-Z])/g,ite=/^ms-/,ote=function(e){return"-"+e.toLowerCase()};function Kk(e){return nte.test(e)?e.replace(rte,ote).replace(ite,"-ms-"):e}var qk=function(e){return e==null||e===!1||e===""};function zu(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],s=0,d=e.length;s<d;s+=1)(i=zu(e[s],t,n,r))!==""&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}if(qk(e))return"";if(qw(e))return"."+e.styledComponentId;if(Dd(e)){if(typeof(c=e)!="function"||c.prototype&&c.prototype.isReactComponent||!t)return e;var a=e(t);return zu(a,t,n,r)}var c;return e instanceof tte?n?(e.inject(n,r),e.getName(r)):e:vb(e)?function u(l,f){var h,p,g=[];for(var y in l)l.hasOwnProperty(y)&&!qk(l[y])&&(Array.isArray(l[y])&&l[y].isCss||Dd(l[y])?g.push(Kk(y)+":",l[y],";"):vb(l[y])?g.push.apply(g,u(l[y],y)):g.push(Kk(y)+": "+(h=y,(p=l[y])==null||typeof p=="boolean"||p===""?"":typeof p!="number"||p===0||h in Lee||h.startsWith("--")?String(p).trim():p+"px")+";"));return f?[f+" {"].concat(g,["}"]):g}(e):e.toString()}var Yk=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function tR(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Dd(e)||vb(e)?Yk(zu(Vk(ug,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:Yk(zu(Vk(e,n)))}var ate=function(e,t,n){return n===void 0&&(n=Ia),e.theme!==n.theme&&e.theme||t||n.theme},ste=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,lte=/(^-|-$)/g;function py(e){return e.replace(ste,"-").replace(lte,"")}var ute=function(e){return yb(QL(e)>>>0)};function oh(e){return typeof e=="string"&&!0}var wb=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},cte=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function dte(e,t,n){var r=e[n];wb(t)&&wb(r)?nR(r,t):e[n]=t}function nR(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var s=o[i];if(wb(s))for(var d in s)cte(d)&&dte(e,s[d],d)}return e}var rR=Le.createContext();rR.Consumer;var gy={};function iR(e,t,n){var r=qw(e),i=!oh(e),o=t.attrs,s=o===void 0?ug:o,d=t.componentId,a=d===void 0?function(S,E){var v=typeof S!="string"?"sc":py(S);gy[v]=(gy[v]||0)+1;var w=v+"-"+ute("5.3.11"+v+gy[v]);return E?E+"-"+w:w}(t.displayName,t.parentComponentId):d,c=t.displayName,u=c===void 0?function(S){return oh(S)?"styled."+S:"Styled("+Wk(S)+")"}(e):c,l=t.displayName&&t.componentId?py(t.displayName)+"-"+t.componentId:t.componentId||a,f=r&&e.attrs?Array.prototype.concat(e.attrs,s).filter(Boolean):s,h=t.shouldForwardProp;r&&e.shouldForwardProp&&(h=t.shouldForwardProp?function(S,E,v){return e.shouldForwardProp(S,E,v)&&t.shouldForwardProp(S,E,v)}:e.shouldForwardProp);var p,g=new qee(n,l,r?e.componentStyle:void 0),y=g.isStatic&&s.length===0,x=function(S,E){return function(v,w,b,m){var $=v.attrs,A=v.componentStyle,C=v.defaultProps,k=v.foldedComponentIds,I=v.shouldForwardProp,L=v.styledComponentId,T=v.target,R=function(Q,G,oe){Q===void 0&&(Q=Ia);var ne=Mo({},G,{theme:Q}),ce={};return oe.forEach(function(fe){var he,me,Pe,Ee=fe;for(he in Dd(Ee)&&(Ee=Ee(ne)),Ee)ne[he]=ce[he]=he==="className"?(me=ce[he],Pe=Ee[he],me&&Pe?me+" "+Pe:me||Pe):Ee[he]}),[ne,ce]}(ate(w,F.useContext(rR),C)||Ia,w,$),P=R[0],D=R[1],N=function(Q,G,oe,ne){var ce=Jee(),fe=ete(),he=G?Q.generateAndInjectStyles(Ia,ce,fe):Q.generateAndInjectStyles(oe,ce,fe);return he}(A,m,P),B=b,Z=D.$as||w.$as||D.as||w.as||T,U=oh(Z),X=D!==w?Mo({},w,{},D):w,W={};for(var q in X)q[0]!=="$"&&q!=="as"&&(q==="forwardedAs"?W.as=X[q]:(I?I(q,E0,Z):!U||E0(q))&&(W[q]=X[q]));return w.style&&D.style!==w.style&&(W.style=Mo({},w.style,{},D.style)),W.className=Array.prototype.concat(k,L,N!==L?N:null,w.className,D.className).filter(Boolean).join(" "),W.ref=B,F.createElement(Z,W)}(p,S,E,y)};return x.displayName=u,(p=Le.forwardRef(x)).attrs=f,p.componentStyle=g,p.displayName=u,p.shouldForwardProp=h,p.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):ug,p.styledComponentId=l,p.target=r?e.target:e,p.withComponent=function(S){var E=t.componentId,v=function(b,m){if(b==null)return{};var $,A,C={},k=Object.keys(b);for(A=0;A<k.length;A++)$=k[A],m.indexOf($)>=0||(C[$]=b[$]);return C}(t,["componentId"]),w=E&&E+"-"+(oh(S)?S:py(Wk(S)));return iR(S,Mo({},v,{attrs:f,componentId:w}),n)},Object.defineProperty(p,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(S){this._foldedDefaultProps=r?nR({},e.defaultProps,S):S}}),Object.defineProperty(p,"toString",{value:function(){return"."+p.styledComponentId}}),i&&QO(p,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),p}var Sb=function(e){return function t(n,r,i){if(i===void 0&&(i=Ia),!k1.isValidElementType(r))return cf(1,String(r));var o=function(){return n(r,i,tR.apply(void 0,arguments))};return o.withConfig=function(s){return t(n,r,Mo({},i,{},s))},o.attrs=function(s){return t(n,r,Mo({},i,{attrs:Array.prototype.concat(i.attrs,s).filter(Boolean)}))},o}(iR,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){Sb[e]=Sb(e)});const $m=Sb;/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Os=function(){return Os=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Os.apply(this,arguments)};function df(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Xk,Zk,Qk,Jk,e2,fte=tR(Xk||(Xk=df([`
display: flex;
align-items: center;
min-width: 322px;
max-width: 508px;
height: 48px;
border: dashed 2px `,`;
padding: 8px 16px 8px 8px;
border-radius: 5px;
cursor: pointer;
flex-grow: 0;
&.is-disabled {
border: dashed 2px `,`;
cursor: no-drop;
svg {
fill: `,`;
color: `,`;
path {
fill: `,`;
color: `,`;
}
}
}
`],[`
display: flex;
align-items: center;
min-width: 322px;
max-width: 508px;
height: 48px;
border: dashed 2px `,`;
padding: 8px 16px 8px 8px;
border-radius: 5px;
cursor: pointer;
flex-grow: 0;
&.is-disabled {
border: dashed 2px `,`;
cursor: no-drop;
svg {
fill: `,`;
color: `,`;
path {
fill: `,`;
color: `,`;
}
}
}
`])),"#0658c2","#666","#666","#666","#666","#666"),hte=$m.label(Zk||(Zk=df([`
position: relative;
`,`;
&:focus-within {
outline: 2px solid black;
}
& > input {
display: block;
opacity: 0;
position: absolute;
pointer-events: none;
}
`],[`
position: relative;
`,`;
&:focus-within {
outline: 2px solid black;
}
& > input {
display: block;
opacity: 0;
position: absolute;
pointer-events: none;
}
`])),function(e){return e.overRide?"":fte}),pte=$m.div(Qk||(Qk=df([`
border: dashed 2px `,`;
border-radius: 5px;
background-color: `,`;
opacity: 0.5;
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
& > span {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
`],[`
border: dashed 2px `,`;
border-radius: 5px;
background-color: `,`;
opacity: 0.5;
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
& > span {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
`])),"#666","#999"),gte=$m.div(Jk||(Jk=df([`
display: flex;
justify-content: space-between;
flex-grow: 1;
& > span {
font-size: 12px;
color: `,`;
}
.file-types {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 100px;
}
`],[`
display: flex;
justify-content: space-between;
flex-grow: 1;
& > span {
font-size: 12px;
color: `,`;
}
.file-types {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 100px;
}
`])),function(e){return e.error?"red":"#666"}),mte=$m.span(e2||(e2=df([`
font-size: 14px;
color: `,`;
span {
text-decoration: underline;
}
`],[`
font-size: 14px;
color: `,`;
span {
text-decoration: underline;
}
`])),"#666"),t2=function(e){return e/1e3/1e3},vte=function(e){return e===void 0?"":e.map(function(t){return".".concat(t.toLowerCase())}).join(",")};function yte(e){var t=e.types,n=e.minSize,r=e.maxSize;if(t){var i=t.toString(),o="";return r&&(o+="size >= ".concat(r,", ")),n&&(o+="size <= ".concat(n,", ")),j.jsx("span",Os({title:"".concat(o,"types: ").concat(i),className:"file-types"},{children:i}),void 0)}return null}function bte(){return j.jsxs("svg",Os({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[j.jsx("path",{d:"M5.33317 6.66667H22.6665V16H25.3332V6.66667C25.3332 5.196 24.1372 4 22.6665 4H5.33317C3.8625 4 2.6665 5.196 2.6665 6.66667V22.6667C2.6665 24.1373 3.8625 25.3333 5.33317 25.3333H15.9998V22.6667H5.33317V6.66667Z",fill:"#0658C2"},void 0),j.jsx("path",{d:"M10.6665 14.6667L6.6665 20H21.3332L15.9998 12L11.9998 17.3333L10.6665 14.6667Z",fill:"#0658C2"},void 0),j.jsx("path",{d:"M25.3332 18.6667H22.6665V22.6667H18.6665V25.3333H22.6665V29.3333H25.3332V25.3333H29.3332V22.6667H25.3332V18.6667Z",fill:"#0658C2"},void 0)]}),void 0)}var my=0,wte=function(e,t,n,r,i){return n?j.jsx("span",{children:"File type/size error, Hovered on types!"},void 0):j.jsx(mte,{children:r?j.jsx("span",{children:"Upload disabled"},void 0):e||t?j.jsxs(j.Fragment,{children:[j.jsx("span",{children:"Uploaded Successfully!"},void 0)," Upload another?"]},void 0):j.jsx(j.Fragment,{children:j.jsxs(j.Fragment,i?{children:[j.jsx("span",{children:i.split(" ")[0]},void 0)," ",i.substr(i.indexOf(" ")+1)]}:{children:[j.jsx("span",{children:"Upload"},void 0)," or drop a file right here"]},void 0)},void 0)},void 0)},Ste=function(e){var t=e.name,n=e.hoverTitle,r=e.types,i=e.handleChange,o=e.classes,s=e.children,d=e.maxSize,a=e.minSize,c=e.fileOrFiles,u=e.onSizeError,l=e.onTypeError,f=e.onSelect,h=e.onDrop,p=e.disabled,g=e.label,y=e.multiple,x=e.required,S=e.onDraggingStateChange,E=e.dropMessageStyle,v=F.useRef(null),w=F.useRef(null),b=F.useState(!1),m=b[0],$=b[1],A=F.useState(null),C=A[0],k=A[1],I=F.useState(!1),L=I[0],T=I[1],R=function(N){return r&&!function(B,Z){var U=B.name.split(".").pop();return Z.map(function(X){return X.toLowerCase()}).includes(U.toLowerCase())}(N,r)?(T(!0),l&&l("File type is not supported"),!1):d&&t2(N.size)>d?(T(!0),u&&u("File size is too big"),!1):!(a&&t2(N.size)<a)||(T(!0),u&&u("File size is too small"),!1)},P=function(N){var B=!1;if(N){if(N instanceof File)B=!R(N);else for(var Z=0;Z<N.length;Z++){var U=N[Z];B=!R(U)||B}return!B&&(i&&i(N),k(N),$(!0),T(!1),!0)}return!1},D=function(N){var B=N.labelRef,Z=N.inputRef,U=N.multiple,X=N.handleChanges,W=N.onDrop,q=F.useState(!1),Q=q[0],G=q[1],oe=F.useCallback(function(){Z.current.click()},[Z]),ne=F.useCallback(function(me){me.preventDefault(),me.stopPropagation(),my++,me.dataTransfer.items&&me.dataTransfer.items.length!==0&&G(!0)},[]),ce=F.useCallback(function(me){me.preventDefault(),me.stopPropagation(),--my>0||G(!1)},[]),fe=F.useCallback(function(me){me.preventDefault(),me.stopPropagation()},[]),he=F.useCallback(function(me){me.preventDefault(),me.stopPropagation(),G(!1),my=0;var Pe=me.dataTransfer.files;if(Pe&&Pe.length>0){var Ee=U?Pe:Pe[0],Ae=X(Ee);W&&Ae&&W(Ee)}},[X]);return F.useEffect(function(){var me=B.current;return me.addEventListener("click",oe),me.addEventListener("dragenter",ne),me.addEventListener("dragleave",ce),me.addEventListener("dragover",fe),me.addEventListener("drop",he),function(){me.removeEventListener("click",oe),me.removeEventListener("dragenter",ne),me.removeEventListener("dragleave",ce),me.removeEventListener("dragover",fe),me.removeEventListener("drop",he)}},[oe,ne,ce,fe,he,B]),Q}({labelRef:v,inputRef:w,multiple:y,handleChanges:P,onDrop:h});return F.useEffect(function(){S==null||S(D)},[D]),F.useEffect(function(){c?($(!0),k(c)):(w.current&&(w.current.value=""),$(!1),k(null))},[c]),j.jsxs(hte,Os({overRide:s,className:"".concat(o||""," ").concat(p?"is-disabled":""),ref:v,htmlFor:t,onClick:function(N){N.preventDefault(),N.stopPropagation()}},{children:[j.jsx("input",{onClick:function(N){N.stopPropagation(),w&&w.current&&(w.current.value="",w.current.click())},onChange:function(N){var B=N.target.files,Z=y?B:B[0],U=P(Z);f&&U&&f(Z)},accept:vte(r),ref:w,type:"file",name:t,disabled:p,multiple:y,required:x},void 0),D&&j.jsx(pte,Os({style:E},{children:j.jsx("span",{children:n||"Drop Here"},void 0)}),void 0),!s&&j.jsxs(j.Fragment,{children:[j.jsx(bte,{},void 0),j.jsxs(gte,Os({error:L},{children:[wte(C,m,L,p,g),j.jsx(yte,{types:r,minSize:a,maxSize:d},void 0)]}),void 0)]},void 0),s]}),void 0)};const xte=["PNG","JPG","JPEG","WEBP"];function _te({visible:e,cancel:t,name:n,path:r,callback:i}){const[o,s]=F.useState(null),[d,a]=F.useState(!1),c=l=>{s(l)};async function u(){a(!0);const l=new FormData;l.append("file",o),l.append("path",r);const f=await fetch("/cozy-nest/extra_network/preview",{method:"POST",body:l});if(!f.ok){CozyLogger.error("Failed to upload image",f);return}i((await f.json()).previewPath),a(!1)}return j.jsx(j.Fragment,{children:e&&j.jsx(GL,{isVisible,children:j.jsxs("div",{className:"ImageUploadModal",children:[j.jsxs("div",{className:"name",children:[j.jsx("h1",{children:"Upload preview image"}),j.jsx("span",{children:n})]}),j.jsx(Ste,{handleChange:c,name:"file",types:xte}),j.jsxs("div",{className:"actions",children:[t,j.jsx(pw,{isDisabled:!o&&!d,onClick:l=>{l.preventDefault(),l.stopPropagation(),u()},children:d?"Uploading...":"Upload"})]})]})})})}const Cte={modelPage:"https://civitai.com/models/",modelId:"https://civitai.com/api/v1/models/",modelVersionId:"https://civitai.com/api/v1/model-versions/",hash:"https://civitai.com/api/v1/model-versions/by-hash/"};function kte({onClick:e,nsfw:t}){const[n,r]=Le.useState(!1);function i(){let o;return t?o=n?"eye":"eyeSlash":o=n?"eyeSlash":"eye",Es[o]}return j.jsx("button",{title:t?"Mark as SFW":"Mark as NSFW",onClick:e,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:i()})}function Ete({item:e,searchString:t,selectedFolder:n,nsfwFilter:r}){const[i,o]=Le.useState(!1),[s,d]=Le.useState(e.info||{}),[a,c]=Le.useState(e.info!==void 0),[u,l]=Le.useState(s!=null),[f,h]=Le.useState(!0),[p,g]=Le.useState(!1);F.useEffect(()=>{a||!i||(async()=>{const T=await fetch(`/cozy-nest/extra_network?path=${encodeURIComponent(e.path)}`);if(T.status!==200){CozyLogger.error("Failed to fetch extra network info",T);return}const R=await T.json();d(R),c(!0),l(R!==null)})()},[i]),F.useEffect(()=>{if(r&&s&&s.model&&s.model.nsfw){h(!1);return}h(x(t,n))},[n,t,r,s]),F.useEffect(()=>{f||o(!1),p&&o(!1)},[f,p]);function y(){return s&&s.model&&s.model.nsfw}function x(T,R){const P=R&&R!=="";function D(N){return N.replace(/[\/\\:]/g,"")}if(T!==""||P){if(P){if(T==="")return D(e.path).includes(D(R))}else return D(e.path).includes(T);return D(e.path).includes(T)||D(e.path).includes(D(R))}return!0}function S(T){T.preventDefault(),T.stopPropagation(),s.trainedWords.length!==0&&w(`${s.trainedWords.join(", ")}, `)}function E(T){const R=get_uiCurrentTabContent().id;let P=null;return R.includes("txt2img")?T?P=document.querySelector("#txt2img_neg_prompt label textarea"):P=document.querySelector("#txt2img_prompt label textarea"):R.includes("img2img")&&(T?P=document.querySelector("#img2img_neg_prompt label textarea"):P=document.querySelector("#img2img_prompt label textarea")),P}function v(T){let R=E(T);R.value=""}function w(T,R){if(!T||T.length===0)return;let P=E(R),D=P.value;D.length!==0?D=`${P.value}
${T}`:D=T,P.value=D;const N=new Event("input");P.dispatchEvent(N)}function b(T){if(T.preventDefault(),T.stopPropagation(),!s.modelId)return;const R=`${Cte.modelPage}/${s.modelId}`;window.open(R,"_blank")}function m(T){if(T.preventDefault(),T.stopPropagation(),s.images){for(const R of s.images)if(R.meta&&R.meta.prompt){v(),w(`${R.meta.prompt}, `),R.meta.negativePrompt&&(v(!0),w(`${R.meta.negativePrompt}, `,!0));return}}Ld.showToast("warning","Not available","No prompt found in preview")}function $(T){T.preventDefault(),T.stopPropagation(),g(!p)}function A(T){T.preventDefault(),T.stopPropagation(),e.type==="ckp"?selectCheckpoint(e.fullName):e.type==="ti"?w(`${e.name}, `):(e.type==="lora"||e.type==="lyco"||e.type==="hypernet")&&w(`<${e.type}:${e.name}:1.00>, `)}async function C(T){T.preventDefault(),T.stopPropagation();const R=await fetch("/cozy-nest/extra_network/toggle-nsfw",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.path})});if(R.status!==200){CozyLogger.error("Failed to toggle nsfw",R);return}const P=await R.json();e.info=P,d(P)}function k(T){e.previewPath=T,g(!1)}const I=s.trainedWords&&s.trainedWords.length>0,L=s.modelId!==void 0;return j.jsx("div",{className:"CozyExtraNetworksCard",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:A,title:e.name||e,style:{display:f?"flex":"none"},children:f&&j.jsxs("div",{className:"en-preview-wrapper",children:[i&&a&&u&&j.jsxs("div",{className:"cozy-en-actions",children:[j.jsx("button",{title:"Replace preview image",onClick:$,children:Es.image}),L&&j.jsx("button",{title:"Open model in civitai",onClick:b,children:Es.link}),I&&j.jsx("button",{title:"Add trigger words to prompt",onClick:S,children:Es.magicWand}),j.jsx("button",{title:"Use prompt from preview image",onClick:m,children:Es.arrow}),j.jsx(kte,{onClick:C,nsfw:y()})]}),e.previewPath&&j.jsx(Aee,{placeholderClassName:"en-preview-thumbnail",children:j.jsx("img",{className:"en-preview-thumbnail",src:`./sd_extra_networks/thumb?filename=${encodeURIComponent(e.previewPath)}&amp;mtime=${new Date().getTime()}`,alt:e.name})}),!e.previewPath&&j.jsx("div",{className:"en-preview-thumbnail black",children:"No preview"}),p&&j.jsx("div",{style:{zIndex:4},children:j.jsx(_te,{visible:p,name:e.name,path:e.path,cancel:j.jsx(pw,{onClick:T=>{T.preventDefault(),T.stopPropagation(),g(!1)},children:"Cancel"}),callback:k})}),j.jsx("div",{className:"cozy-en-info",children:j.jsx("div",{className:"en-preview-name",children:e.name||e})})]})})}var oR={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},n2=Le.createContext&&Le.createContext(oR),Oa=globalThis&&globalThis.__assign||function(){return Oa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Oa.apply(this,arguments)},$te=globalThis&&globalThis.__rest||function(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);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function aR(e){return e&&e.map(function(t,n){return Le.createElement(t.tag,Oa({key:n},t.attr),aR(t.child))})}function Tm(e){return function(t){return Le.createElement(Tte,Oa({attr:Oa({},e.attr)},t),aR(e.child))}}function Tte(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,s=$te(e,["attr","size","title"]),d=i||n.size||"1em",a;return n.className&&(a=n.className),e.className&&(a=(a?a+" ":"")+e.className),Le.createElement("svg",Oa({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:a,style:Oa(Oa({color:e.color||n.color},n.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),o&&Le.createElement("title",null,o),e.children)};return n2!==void 0?Le.createElement(n2.Consumer,null,function(n){return t(n)}):t(oR)}function Ate(e){return Tm({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M527.9 224H480v-48c0-26.5-21.5-48-48-48H272l-64-64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h400c16.5 0 31.9-8.5 40.7-22.6l79.9-128c20-31.9-3-73.4-40.7-73.4zM48 118c0-3.3 2.7-6 6-6h134.1l64 64H426c3.3 0 6 2.7 6 6v42H152c-16.8 0-32.4 8.8-41.1 23.2L48 351.4zm400 282H72l77.2-128H528z"}}]})(e)}function Mte(e){return Tm({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z"}}]})(e)}function Lte(e){return Tm({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Folder_Off"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M4.013,3.3a.5.5,0,0,0-.711.71l.25.25A2.438,2.438,0,0,0,2.062,6.5v11a2.453,2.453,0,0,0,2.451,2.44h14.72l.759.76c.461.46,1.171-.25.711-.7Zm.5,15.64A1.45,1.45,0,0,1,3.062,17.5V6.5a1.444,1.444,0,0,1,1.31-1.43C5.893,6.6,7.432,8.14,8.963,9.66q4.485,4.485,8.96,8.97l.31.31Z"}},{tag:"path",attr:{d:"M21.438,17.693a.5.5,0,0,1-.5-.5V9.175a1.445,1.445,0,0,0-1.445-1.444H12.827a1.5,1.5,0,0,1-1.474-1.225l-.05-.267a1.445,1.445,0,0,0-1.42-1.178H8.8a.5.5,0,0,1,0-1H9.883a2.446,2.446,0,0,1,2.4,1.994l.05.268a.5.5,0,0,0,.491.408h6.666a2.448,2.448,0,0,1,2.445,2.444v8.018A.5.5,0,0,1,21.438,17.693Z"}}]}]}]})(e)}var sR={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var s=typeof o;if(s==="string"||s==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var d=n.apply(null,o);d&&r.push(d)}}else if(s==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&r.push(a)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(sR);var Rte=sR.exports;const Yh=ki(Rte);function Xw(e){return(Xw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function vy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lR(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var o,s,d=[],a=!0,c=!1;try{for(i=i.call(n);!(a=(o=i.next()).done)&&(d.push(o.value),!r||d.length!==r);a=!0);}catch(u){c=!0,s=u}finally{try{a||i.return==null||i.return()}finally{if(c)throw s}}return d}}(e,t)||Zw(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ti(e){return function(t){if(Array.isArray(t))return xb(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Zw(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Zw(e,t){if(e){if(typeof e=="string")return xb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xb(e,t):void 0}}function xb(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rn(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Zw(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,d=!1;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return s=a.done,a},e:function(a){d=!0,o=a},f:function(){try{s||n.return==null||n.return()}finally{if(d)throw o}}}}function Qw(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"){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}var Fs=function(){},yy=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){var i,o=Rn(t);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s&&s(r),r.defaultPrevented)break}}catch(d){o.e(d)}finally{o.f()}}},Sa=function(e,t){var n,r=new Set,i=Rn(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.has(o)||r.add(o)}}catch(s){i.e(s)}finally{i.f()}return r},ah=function(e,t){return new Set([].concat(ti(Sa(e,t)),ti(Sa(t,e))))},r2=function(e){var t=F.useRef();return F.useEffect(function(){t.current=e},[e]),t.current},fr=function(e,t){var n;return!!(!((n=Bt(e,t).children)===null||n===void 0)&&n.length)},Va=function(e,t){return Bt(e,t).parent},Pte=function(e,t,n){for(var r=t,i=[];;){var o=Va(e,r);if(o===0||o==null||o!=null&&n.has(o))break;i.push(o),r=o}return i},ju=function(e,t,n){var r=[];return function i(o,s){var d=Bt(o,s);if(d.children!=null){var a,c=Rn(d.children.filter(function(l){return!n.has(l)}));try{for(c.s();!(a=c.n()).done;){var u=a.value;r.push(u),i(o,u)}}catch(l){c.e(l)}finally{c.f()}}}(e,t),r},uR=function(e,t){var n=Bt(e,t);return n.children==null?[]:n.children},cR=function(e,t,n){var r=Va(e,t);if(r!=null){var i=Bt(e,r),o=i.children.indexOf(t)+n;if(i.children[o])return i.children[o]}return null},_b=function(e,t,n){var r=Bt(e,t);for(yi(e).id===t&&(r=Bt(e,Bt(e,t).children[Bt(e,t).children.length-1]));n.has(r.id)&&fr(e,r.id);)r=Bt(e,r.children[r.children.length-1]);return r.id},Cb=function(e,t,n){if(t===yi(e).children[0])return null;var r=cR(e,t,-1);return r==null?Va(e,t):_b(e,r,n)},Rc=function(e,t,n){var r=Bt(e,t).id;if(fr(e,r)&&n.has(r))return Bt(e,r).children[0];for(;;){var i=cR(e,r,1);if(i!=null)return i;if((r=Va(e,r))==null)return null}},dR=function(e){var t=e.data,n=e.expandedIds,r=e.from,i=e.to,o=[],s=t.length,d=0,a=r;if(o.push(r),r<i)for(;d<s&&((a=Rc(t,a,n))!=null&&o.push(a),a!=null&&a!==i);)d+=1;else if(r>i)for(;d<s&&((a=Cb(t,a,n))!=null&&o.push(a),a!=null&&a!==i);)d+=1;return o},Ite=function(e){var t=0,n=[];return function r(i,o){var s,d={id:i.id||t,name:i.name,children:[],parent:o,metadata:i.metadata?Object.assign({},i.metadata):void 0};if(n.find(function(h){return h.id===d.id}))throw Error("Multiple TreeView nodes have the same ID (".concat(d.id,"). IDs must be unique."));if(n.push(d),t+=1,(s=i.children)===null||s===void 0?void 0:s.length){var a,c=Rn(i.children);try{for(c.s();!(a=c.n()).done;)r(a.value,d.id)}catch(h){c.e(h)}finally{c.f()}var u,l=Rn(n.values());try{for(l.s();!(u=l.n()).done;){var f=u.value;f.parent===d.id&&d.children.push(f.id)}}catch(h){l.e(h)}finally{l.f()}}}(e,null),n},Ote=function(e){var t=e.isSelected,n=e.isDisabled,r=e.multiSelect;return n||r?t:!!t||void 0},Fte=function(e){var t=e.isSelected,n=e.isDisabled,r=e.isHalfSelected,i=e.multiSelect;return n?t:r?"mixed":i?t:!!t||void 0},xa=function(e,t,n){return t.concat.apply(t,ti(t.filter(function(r){return fr(e,r)}).map(function(r){return ju(e,r,n)})))},Dte=function(e,t,n){t!=null?window.navigator.userAgent.match(/Trident/)?setTimeout(function(){return!t.contains(document.activeElement)&&n()},0):!t.contains(e.nativeEvent.relatedTarget)&&n():console.warn("ref not set on <ul>")},fR=function(e,t,n){return fr(e,t)&&n.has(t)&&ju(e,t,new Set).some(function(r){return n.has(r)})},Nte=function(e,t,n){var r=uR(e,t);return fr(e,t)&&!n.has(t)&&r.length===1&&r.every(function(i){return n.has(i)})},hR=function(e,t,n){var r=uR(e,t);return fr(e,t)&&n.has(t)&&r.length===1&&r.every(function(i){return n.has(i)})},yi=function(e){var t=e.find(function(n){return n.parent===null});if(!t)throw Error("TreeView data must contain parent node.");return t},Bt=function(e,t){var n=e.find(function(r){return r.id===t});if(n==null)throw Error("Node with id=".concat(t," doesn't exist in the tree."));return n},i2=function(e){var t=Array.from(new Set(e));return e.length!==t.length},Jw="COLLAPSE",Am="COLLAPSE_MANY",dg="EXPAND",eS="EXPAND_MANY",Mm="HALF_SELECT",Nd="SELECT",pR="DESELECT",Lm="TOGGLE",fg="TOGGLE_SELECT",ko="SELECT_MANY",gR="EXCLUSIVE_CHANGE_SELECT_MANY",lr="FOCUS",mR="BLUR",zte="DISABLE",jte="ENABLE",vR="CLEAR_MANUALLY_TOGGLED",yR="CONTROLLED_SELECT_MANY",Bte=function(e,t){switch(t.type){case Jw:var n=new Set(e.expandedIds);return n.delete(t.id),Object.assign(Object.assign({},e),{expandedIds:n,tabbableId:t.id,isFocused:!0,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case Am:var r,i=new Set(e.expandedIds),o=Rn(t.ids);try{for(o.s();!(r=o.n()).done;){var s=r.value;i.delete(s)}}catch(R){o.e(R)}finally{o.f()}return Object.assign(Object.assign({},e),{expandedIds:i,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case dg:var d=new Set(e.expandedIds);return d.add(t.id),Object.assign(Object.assign({},e),{expandedIds:d,tabbableId:t.id,isFocused:!0,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case eS:var a=new Set([].concat(ti(e.expandedIds),ti(t.ids)));return Object.assign(Object.assign({},e),{expandedIds:a,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case Lm:var c=new Set(e.expandedIds);return e.expandedIds.has(t.id)?c.delete(t.id):c.add(t.id),Object.assign(Object.assign({},e),{expandedIds:c,tabbableId:t.id,isFocused:!0,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case Mm:if(e.disabledIds.has(t.id))return e;var u=new Set(e.halfSelectedIds),l=new Set(e.selectedIds);return u.add(t.id),l.delete(t.id),Object.assign(Object.assign({},e),{selectedIds:l,halfSelectedIds:u,tabbableId:t.keepFocus?e.tabbableId:t.id,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled,lastUserSelect:t.NotUserAction?e.lastUserSelect:t.id});case Nd:if(!t.NotUserAction&&e.disabledIds.has(t.id))return e;var f;t.multiSelect?(f=new Set(e.selectedIds)).add(t.id):(f=new Set).add(t.id);var h=new Set(e.halfSelectedIds);return h.delete(t.id),Object.assign(Object.assign({},e),{selectedIds:f,halfSelectedIds:h,tabbableId:t.keepFocus?e.tabbableId:t.id,isFocused:!0,lastUserSelect:t.NotUserAction?e.lastUserSelect:t.id,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled});case pR:if(!t.NotUserAction&&e.disabledIds.has(t.id))return e;var p,g=new Set(e.selectedIds);return g.delete(t.id),t.multiSelect?(p=new Set(e.halfSelectedIds)).delete(t.id):p=new Set,Object.assign(Object.assign({},e),{selectedIds:g,halfSelectedIds:p,tabbableId:t.keepFocus?e.tabbableId:t.id,isFocused:!0,lastUserSelect:t.NotUserAction?e.lastUserSelect:t.id,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled});case fg:if(e.disabledIds.has(t.id))return e;var y,x=e.selectedIds.has(t.id);t.multiSelect?(y=new Set(e.selectedIds),x?y.delete(t.id):y.add(t.id)):(y=new Set,x||y.add(t.id));var S=new Set(e.halfSelectedIds);return S.delete(t.id),Object.assign(Object.assign({},e),{selectedIds:y,halfSelectedIds:S,tabbableId:t.id,isFocused:!0,lastUserSelect:t.NotUserAction?e.lastUserSelect:t.id,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled});case ko:var E,v=t.ids.filter(function(R){return!e.disabledIds.has(R)});if(t.multiSelect){E=t.select?new Set([].concat(ti(e.selectedIds),ti(v))):Sa(e.selectedIds,new Set(v));var w=Sa(e.halfSelectedIds,E);return Object.assign(Object.assign({},e),{selectedIds:E,halfSelectedIds:w,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled})}return e;case gR:var b,m=t.ids.filter(function(R){return!e.disabledIds.has(R)});if(t.multiSelect){b=t.select?new Set(m):Sa(e.selectedIds,new Set(m));var $=Sa(e.halfSelectedIds,b);return Object.assign(Object.assign({},e),{selectedIds:b,halfSelectedIds:$,lastAction:t.type,lastInteractedWith:t.lastInteractedWith,lastManuallyToggled:t.lastManuallyToggled})}return e;case yR:var A;if(t.multiSelect)A=new Set(t.ids);else{A=new Set,t.ids.length>1&&console.warn("Tree in singleSelect mode, only the first item from selectedIds will be selected.");var C=t.ids[0];C&&A.add(C)}var k=new Set(e.halfSelectedIds);t.ids.every(function(R){return k.delete(R)});var I=new Set(t.ids);return Object.assign(Object.assign({},e),{selectedIds:A,halfSelectedIds:k,controlledIds:I,isFocused:!0,lastAction:t.type});case lr:return Object.assign(Object.assign({},e),{tabbableId:t.id,isFocused:!0,lastAction:t.type,lastInteractedWith:t.lastInteractedWith});case mR:return Object.assign(Object.assign({},e),{isFocused:!1});case zte:var L=new Set(e.disabledIds);return L.add(t.id),Object.assign(Object.assign({},e),{disabledIds:L});case jte:var T=new Set(e.disabledIds);return T.delete(t.id),Object.assign(Object.assign({},e),{disabledIds:T});case vR:return Object.assign(Object.assign({},e),{lastManuallyToggled:null});default:throw new Error("Invalid action passed to the reducer")}},o2={root:"tree",node:"tree-node",branch:"tree-node__branch",branchWrapper:"tree-branch-wrapper",leafListItem:"tree-leaf-list-item",leaf:"tree-node__leaf",nodeGroup:"tree-node-group"},yu={select:"SELECT",focus:"FOCUS",exclusiveSelect:"EXCLUSIVE_SELECT"},Hte=Object.freeze(Object.values(yu)),Vte=Object.freeze(Object.values({check:"check",select:"select"})),bR=function(e){var t=e.element,n=e.dispatch,r=e.data,i=e.selectedIds,o=e.tabbableId,s=e.isFocused,d=e.expandedIds,a=e.disabledIds,c=e.halfSelectedIds,u=e.lastUserSelect,l=e.nodeRefs,f=e.leafRefs,h=e.baseClassNames,p=e.nodeRenderer,g=e.nodeAction,y=e.setsize,x=e.posinset,S=e.level,E=e.propagateCollapse,v=e.propagateSelect,w=e.multiSelect,b=e.togglableSelect,m=e.clickAction,$=e.state,A=function(T){if(!(T.ctrlKey||T.altKey||T.shiftKey))if(d.has(t.id)&&E){var R=[t.id].concat(ti(ju(r,t.id,new Set)));n({type:Am,ids:R,lastInteractedWith:t.id})}else n({type:Lm,id:t.id,lastInteractedWith:t.id})},C=function(){return n({type:lr,id:t.id,lastInteractedWith:t.id})},k=function(T){if(T.shiftKey){var R=dR({data:r,expandedIds:d,from:u,to:t.id}).filter(function(N){return!a.has(N)});R=v?xa(r,R,a):R,n({type:gR,select:!0,multiSelect:w,ids:R,lastInteractedWith:t.id,lastManuallyToggled:t.id})}else if(T.ctrlKey||m===yu.select){var P=fR(r,t.id,i),D=hR(r,t.id,i);n({type:b?P&&!D?Mm:fg:Nd,id:t.id,multiSelect:w,lastInteractedWith:t.id,lastManuallyToggled:t.id}),v&&!a.has(t.id)&&n({type:ko,ids:xa(r,[t.id],a),select:!b||!i.has(t.id),multiSelect:w,lastInteractedWith:t.id,lastManuallyToggled:t.id})}else m===yu.exclusiveSelect?n({type:b?fg:Nd,id:t.id,multiSelect:!1,lastInteractedWith:t.id,lastManuallyToggled:t.id}):m===yu.focus&&n({type:lr,id:t.id,lastInteractedWith:t.id})},I=function(T){var R;return Yh(T,(vy(R={},"".concat(T,"--expanded"),d.has(t.id)),vy(R,"".concat(T,"--selected"),i.has(t.id)),vy(R,"".concat(T,"--focused"),o===t.id&&s),R))},L=g==="select"?{"aria-selected":Ote({isSelected:i.has(t.id),isDisabled:a.has(t.id),multiSelect:w})}:{"aria-checked":Fte({isSelected:i.has(t.id),isDisabled:a.has(t.id),isHalfSelected:c.has(t.id),multiSelect:w})};return fr(r,t.id)||t.isBranch?Le.createElement("li",Object.assign({role:"treeitem","aria-expanded":d.has(t.id),"aria-setsize":y,"aria-posinset":x,"aria-level":S,"aria-disabled":a.has(t.id),tabIndex:o===t.id?0:-1,ref:function(T){(l==null?void 0:l.current)!=null&&T!=null&&(l.current[t.id]=T)},className:h.branchWrapper},L),Le.createElement(Le.Fragment,null,p({element:t,isBranch:!0,isSelected:i.has(t.id),isHalfSelected:c.has(t.id),isExpanded:d.has(t.id),isDisabled:a.has(t.id),dispatch:n,getNodeProps:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=T.onClick;return{onClick:R==null?yy(k,A,C):yy(R,C),className:Yh(I(h.node),h.branch),ref:function(P){(f==null?void 0:f.current)!=null&&(f.current[t.id]=P)}}},setsize:y,posinset:x,level:S,handleSelect:k,handleExpand:A,treeState:$}),Le.createElement(Wte,Object.assign({getClasses:I},function(T){return T.setsize,T.posinset,Qw(T,["setsize","posinset"])}(e))))):Le.createElement("li",{role:"none",className:I(h.leafListItem)},p({element:t,isBranch:!1,isSelected:i.has(t.id),isHalfSelected:!1,isExpanded:!1,isDisabled:a.has(t.id),dispatch:n,getNodeProps:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=T.onClick;return Object.assign({role:"treeitem",tabIndex:o===t.id?0:-1,onClick:yy(R??k,C),ref:function(P){(l==null?void 0:l.current)!=null&&(f==null?void 0:f.current)!=null&&(l.current[t.id]=P,f.current[t.id]=P)},className:Yh(I(h.node),h.leaf),"aria-setsize":y,"aria-posinset":x,"aria-level":S,disabled:a.has(t.id),"aria-disabled":a.has(t.id)},L)},setsize:y,posinset:x,level:S,handleSelect:k,handleExpand:Fs,treeState:$}))},Wte=function(e){var t=e.data,n=e.element,r=e.expandedIds,i=e.getClasses,o=e.baseClassNames,s=e.level,d=Qw(e,["data","element","expandedIds","getClasses","baseClassNames","level"]);return Le.createElement("ul",{role:"group",className:i(o.nodeGroup)},r.has(n.id)&&n.children.length>0&&n.children.map(function(a,c){return Le.createElement(bR,Object.assign({data:t,expandedIds:r,baseClassNames:o,key:"".concat(a,"-").concat(Xw(a)),element:Bt(t,a),setsize:n.children.length,posinset:c+1,level:s+1},d))}))},Ute=function(e){var t=e.data,n=e.controlledSelectedIds,r=e.controlledExpandedIds,i=e.defaultExpandedIds,o=e.defaultSelectedIds,s=e.defaultDisabledIds,d=e.nodeRefs,a=e.leafRefs,c=e.onSelect,u=e.onNodeSelect,l=e.onExpand,f=e.onLoadData,h=e.togglableSelect,p=e.multiSelect,g=e.propagateSelect,y=e.propagateSelectUpwards,x=yi(t),S=lR(F.useReducer(Bte,{selectedIds:new Set(n||o),controlledIds:new Set(n),tabbableId:x.children[0],isFocused:!1,expandedIds:new Set(r||i),halfSelectedIds:new Set,lastUserSelect:x.children[0],lastInteractedWith:null,lastManuallyToggled:null,disabledIds:new Set(s)}),2),E=S[0],v=S[1],w=E.selectedIds,b=E.controlledIds,m=E.expandedIds,$=E.disabledIds,A=E.tabbableId,C=E.halfSelectedIds,k=E.lastAction,I=E.lastInteractedWith,L=E.lastManuallyToggled,T=r2(w)||new Set,R=ah(w,T);F.useEffect(function(){var U;if(c!=null&&c!==Fs){var X,W=Rn(R);try{for(W.s();!(X=W.n()).done;){var q=X.value,Q=fr(t,q)||!!(!((U=Bt(t,A))===null||U===void 0)&&U.isBranch);c({element:Bt(t,q),isBranch:Q,isExpanded:!!Q&&m.has(q),isSelected:w.has(q),isDisabled:$.has(q),isHalfSelected:!!Q&&C.has(q),treeState:E})}}catch(G){W.e(G)}finally{W.f()}}},[t,w,m,$,C,R,c,E]),F.useEffect(function(){u!=null&&u!==Fs&&L!=null&&R.size&&(u({element:Bt(t,L),isSelected:w.has(L),isBranch:fr(t,L),treeState:E}),v({type:vR}))},[L,w,R]);var P=r2(m)||new Set;F.useEffect(function(){var U=ah(m,P);if(l!=null&&l!==Fs){var X,W=Rn(U);try{for(W.s();!(X=W.n()).done;){var q=X.value;l({element:Bt(t,q),isExpanded:m.has(q),isSelected:w.has(q),isDisabled:$.has(q),isHalfSelected:C.has(q),treeState:E})}}catch(Q){W.e(Q)}finally{W.f()}}},[t,w,m,$,C,P,l,E]);var D,N,B=(D=t,N=F.useRef(),F.useEffect(function(){N.current=D}),N.current||new Map);F.useEffect(function(){var U=ah(m,P);if(f){var X,W=Rn(U);try{for(W.s();!(X=W.n()).done;){var q=X.value;f({element:Bt(t,q),isExpanded:m.has(q),isSelected:w.has(q),isDisabled:$.has(q),isHalfSelected:C.has(q),treeState:E})}}catch(ne){W.e(ne)}finally{W.f()}if(B!==t&&h&&g){var Q,G=Rn(m);try{for(G.s();!(Q=G.n()).done;){var oe=Q.value;w.has(oe)&&v({type:ko,ids:xa(t,[oe],$),select:!0,multiSelect:p,lastInteractedWith:oe})}}catch(ne){G.e(ne)}finally{G.f()}}}},[t,w,m,$,C,P,f,E]);var Z=ah(new Set(n),b);return F.useEffect(function(){if(n){Z.size&&v({type:yR,ids:n,multiSelect:p});var U,X=Rn(n);try{for(X.s();!(U=X.n()).done;){var W=U.value;g&&!$.has(W)&&v({type:ko,ids:xa(t,[W],$),select:!0,multiSelect:p})}}catch(q){X.e(q)}finally{X.f()}}},[n]),F.useEffect(function(){var U=new Set(r),X=Sa(U,P),W=Sa(P,U);if(W.size){var q,Q=Rn(W);try{for(Q.s();!(q=Q.n()).done;){var G=q.value;if(fr(t,G)||Bt(t,G).isBranch){var oe=[G].concat(ti(ju(t,G,new Set)));v({type:Am,ids:oe,lastInteractedWith:G})}}}catch(me){Q.e(me)}finally{Q.f()}}if(X.size){var ne,ce=Rn(X);try{for(ce.s();!(ne=ce.n()).done;){var fe=ne.value;if(fr(t,fe)||Bt(t,fe).isBranch){var he=Va(t,fe);v(he?{type:eS,ids:[fe,he],lastInteractedWith:fe}:{type:dg,id:fe,lastInteractedWith:fe})}}}catch(me){ce.e(me)}finally{ce.f()}}},[r]),F.useEffect(function(){if(y){var U=new Set([].concat(ti(R),ti(b)));I&&k!==lr&&k!==Jw&&k!==dg&&k!==Lm&&U.add(I);var X=[];U.forEach(function(Fe){t.find(function(Be){return Be.id===Fe})||X.push(Fe)}),X.forEach(function(Fe){return U.delete(Fe)});var W,q=function(Fe,Be,lt,qt,pt,on){var xt,ve={every:new Set,some:new Set,none:new Set},Se=Rn(Be);try{for(Se.s();!(xt=Se.n()).done;)for(var be=xt.value;;){var De=Va(Fe,be);if(De===0||De==null||De!=null&&qt.has(De))break;var ot=Bt(Fe,De).children.filter(function(Re){return!qt.has(Re)});if(ot.length===0)break;if(ot.some(function(Re){return lt.has(Re)||ve.some.has(Re)||pt.has(Re)}))ot.every(function(Re){return lt.has(Re)})?ve.every.add(De):ve.some.add(De);else{var xe=Pte(Fe,be,qt).find(function(Re){return lt.has(Re)});if(!on&&xe){ju(Fe,xe,qt).forEach(function(Re){pt.has(Re)&&ve.none.add(Re)});break}ve.none.add(De)}be=De}}catch(Re){Se.e(Re)}finally{Se.f()}return ve}(t,U,w,$,C,p),Q=q.every,G=q.some,oe=q.none,ne=Rn(Q);try{for(ne.s();!(W=ne.n()).done;){var ce=W.value;w.has(ce)||v({type:Nd,id:ce,multiSelect:p||Nte(t,ce,w),keepFocus:!0,NotUserAction:!0,lastInteractedWith:I})}}catch(Fe){ne.e(Fe)}finally{ne.f()}var fe,he=Rn(G);try{for(he.s();!(fe=he.n()).done;){var me=fe.value;C.has(me)||v({type:Mm,id:me,lastInteractedWith:I,keepFocus:!0,NotUserAction:!0})}}catch(Fe){he.e(Fe)}finally{he.f()}var Pe,Ee=Rn(oe);try{for(Ee.s();!(Pe=Ee.n()).done;){var Ae=Pe.value;(w.has(Ae)||C.has(Ae))&&v({type:pR,id:Ae,multiSelect:p,keepFocus:!0,NotUserAction:!0,lastInteractedWith:I,lastManuallyToggled:L})}}catch(Fe){Ee.e(Fe)}finally{Ee.f()}}},[t,p,y,w,m,$,C,k,T,R,I,Z]),F.useEffect(function(){if(I!=null&&A!=null&&(d==null?void 0:d.current)!=null&&(a==null?void 0:a.current)!=null){var U=d.current[A];(function(X){X!=null&&X.scrollIntoView&&X.scrollIntoView({block:"nearest"})})(a.current[I]),function(X){X!=null&&X.focus&&X.focus({preventScroll:!0})}(U)}},[A,d,a,I]),[E,v]},wR=Le.forwardRef(function(e,t){var n=e.data,r=e.selectedIds,i=e.nodeRenderer,o=e.onSelect,s=o===void 0?Fs:o,d=e.onNodeSelect,a=d===void 0?Fs:d,c=e.onExpand,u=c===void 0?Fs:c,l=e.onLoadData,f=e.className,h=f===void 0?"":f,p=e.multiSelect,g=p!==void 0&&p,y=e.propagateSelect,x=y!==void 0&&y,S=e.propagateSelectUpwards,E=S!==void 0&&S,v=e.propagateCollapse,w=v!==void 0&&v,b=e.expandOnKeyboardSelect,m=b!==void 0&&b,$=e.togglableSelect,A=$!==void 0&&$,C=e.defaultExpandedIds,k=C===void 0?[]:C,I=e.defaultSelectedIds,L=I===void 0?[]:I,T=e.defaultDisabledIds,R=T===void 0?[]:T,P=e.clickAction,D=P===void 0?yu.select:P,N=e.nodeAction,B=N===void 0?"select":N,Z=e.expandedIds,U=e.onBlur,X=Qw(e,["data","selectedIds","nodeRenderer","onSelect","onNodeSelect","onExpand","onLoadData","className","multiSelect","propagateSelect","propagateSelectUpwards","propagateCollapse","expandOnKeyboardSelect","togglableSelect","defaultExpandedIds","defaultSelectedIds","defaultDisabledIds","clickAction","nodeAction","expandedIds","onBlur"]);(function(ce){if(i2(ce.map(function(fe){return fe.id})))throw Error("Multiple TreeView nodes have the same ID. IDs must be unique.");if(ce.forEach(function(fe){if(fe.id===fe.parent)throw Error("Node with id=".concat(fe.id," has parent reference to itself."));if(i2(fe.children))throw Error("Node with id=".concat(fe.id," contains duplicate ids in its children."))}),ce.filter(function(fe){return fe.parent===null}).length!==1)throw Error("TreeView can have only one root node.")})(n);var W=F.useRef({}),q=F.useRef({}),Q=lR(Ute({data:n,controlledSelectedIds:r,controlledExpandedIds:Z,defaultExpandedIds:k,defaultSelectedIds:L,defaultDisabledIds:R,nodeRefs:W,leafRefs:q,onSelect:s,onNodeSelect:a,onExpand:u,onLoadData:l,togglableSelect:A,multiSelect:g,propagateSelect:x,propagateSelectUpwards:E}),2),G=Q[0],oe=Q[1];x=x&&g;var ne=F.useRef(null);return t!=null&&(ne=t),Le.createElement("ul",Object.assign({className:Yh(o2.root,h),role:"tree","aria-multiselectable":B==="select"?g:void 0,ref:ne,onBlur:function(ce){Dte(ce,ne.current,function(){U&&U({treeState:G,dispatch:oe}),oe({type:mR})})},onKeyDown:Gte({data:n,tabbableId:G.tabbableId,expandedIds:G.expandedIds,selectedIds:G.selectedIds,disabledIds:G.disabledIds,halfSelectedIds:G.halfSelectedIds,clickAction:D,dispatch:oe,propagateCollapse:w,propagateSelect:x,multiSelect:g,expandOnKeyboardSelect:m,togglableSelect:A})},X),yi(n).children.map(function(ce,fe){return Le.createElement(bR,Object.assign({key:"".concat(ce,"-").concat(Xw(ce)),data:n,element:Bt(n,ce),setsize:yi(n).children.length,posinset:fe+1,level:1},G,{state:G,dispatch:oe,nodeRefs:W,leafRefs:q,baseClassNames:o2,nodeRenderer:i,propagateCollapse:w,propagateSelect:x,propagateSelectUpwards:E,multiSelect:g,togglableSelect:A,clickAction:D,nodeAction:B}))}))}),Gte=function(e){var t=e.data,n=e.expandedIds,r=e.selectedIds,i=e.disabledIds,o=e.tabbableId,s=e.dispatch,d=e.propagateCollapse,a=e.propagateSelect,c=e.multiSelect,u=e.expandOnKeyboardSelect,l=e.togglableSelect,f=e.clickAction;return function(h){var p=Bt(t,o),g=p.id;if(h.ctrlKey){if(h.key==="a"){h.preventDefault();var y=t.filter(function(R){return R.parent!==null}).map(function(R){return R.id}).filter(function(R){return!i.has(R)});s({type:ko,multiSelect:c,select:Array.from(r).filter(function(R){return!i.has(R)}).length!==y.length,ids:y,lastInteractedWith:p.id})}else if(h.shiftKey&&(h.key==="Home"||h.key==="End")){var x=h.key==="Home"?yi(t).children[0]:_b(t,g,n),S=dR({data:t,expandedIds:n,from:g,to:x}).filter(function(R){return!i.has(R)});s({type:ko,multiSelect:c,select:!0,ids:a?xa(t,S,i):S}),s({type:lr,id:x,lastInteractedWith:x})}}else{if(h.shiftKey)switch(h.key){case"ArrowUp":h.preventDefault();var E=Cb(t,g,n);return void(E==null||i.has(E)||(s({type:ko,ids:a?xa(t,[E],i):[E],select:!0,multiSelect:c,lastInteractedWith:E,lastManuallyToggled:E}),s({type:lr,id:E,lastInteractedWith:E})));case"ArrowDown":h.preventDefault();var v=Rc(t,g,n);return void(v==null||i.has(v)||(s({type:ko,ids:a?xa(t,[v],i):[v],multiSelect:c,select:!0,lastInteractedWith:v,lastManuallyToggled:v}),s({type:lr,id:v,lastInteractedWith:v})))}switch(h.key){case"ArrowDown":h.preventDefault();var w=Rc(t,g,n);return void(w!=null&&s({type:lr,id:w,lastInteractedWith:w}));case"ArrowUp":h.preventDefault();var b=Cb(t,g,n);return void(b!=null&&s({type:lr,id:b,lastInteractedWith:b}));case"ArrowLeft":if(h.preventDefault(),(fr(t,g)||p.isBranch)&&n.has(o))if(d){var m=[g].concat(ti(ju(t,g,new Set)));s({type:Am,ids:m,lastInteractedWith:p.id})}else s({type:Jw,id:g,lastInteractedWith:g});else if(!yi(t).children.includes(g)){var $=Va(t,g);if($==null)throw new Error("parentId of root element is null");s({type:lr,id:$,lastInteractedWith:$})}return;case"ArrowRight":return h.preventDefault(),void((fr(t,g)||p.isBranch)&&(n.has(o)?s({type:lr,id:p.children[0],lastInteractedWith:p.children[0]}):s({type:dg,id:g,lastInteractedWith:g})));case"Home":h.preventDefault(),s({type:lr,id:yi(t).children[0],lastInteractedWith:yi(t).children[0]});break;case"End":h.preventDefault();var A=_b(t,yi(t).id,n);return void s({type:lr,id:A,lastInteractedWith:A});case"*":h.preventDefault();var C=Va(t,g);if(C==null)throw new Error("parentId of element is null");var k=Bt(t,C).children.filter(function(R){return fr(t,R)||Bt(t,R).isBranch});return void s({type:eS,ids:k,lastInteractedWith:g});case"Enter":case" ":case"Spacebar":if(h.preventDefault(),f===yu.focus)return;var I=fR(t,p.id,r),L=hR(t,p.id,r);return s({type:l?I&&!L?Mm:fg:Nd,id:g,multiSelect:c,lastInteractedWith:g,lastManuallyToggled:g}),a&&!i.has(p.id)&&s({type:ko,ids:xa(t,[g],i),select:!l||!r.has(g),multiSelect:c,lastInteractedWith:g,lastManuallyToggled:g}),void(u&&s({type:Lm,id:g,lastInteractedWith:g}));default:if(h.key.length===1)for(var T=Rc(t,g,n);T!==g;)if(T!=null){if(Bt(t,T).name[0].toLowerCase()===h.key.toLowerCase())return void s({type:lr,id:T,lastInteractedWith:g});T=Rc(t,T,n)}else T=yi(t).children[0];return}}}};wR.propTypes={data:an.array.isRequired,onSelect:an.func,onNodeSelect:an.func,onExpand:an.func,className:an.string,nodeRenderer:an.func.isRequired,defaultExpandedIds:an.array,defaultSelectedIds:an.array,expandedIds:an.array,selectedIds:an.array,defaultDisabledIds:an.array,propagateCollapse:an.bool,propagateSelect:an.bool,propagateSelectUpwards:an.bool,multiSelect:an.bool,expandOnKeyboardSelect:an.bool,togglableSelect:an.bool,nodeAction:an.oneOf(Vte),clickAction:an.oneOf(Hte),onBlur:an.func,onLoadData:an.func};class Kte{constructor(){this.networks=new Map;const t=localStorage.getItem("CozyNest/FolderTreeFilter");t?this.networks=new Map(Object.entries(JSON.parse(t))):(this.networks.set("models",{selectedNodes:[]}),this.networks.set("embeddings",{selectedNodes:[]}),this.networks.set("lora",{selectedNodes:[]}),this.networks.set("hypernetworks",{selectedNodes:[]}),this.save())}selectNode(t,n){this.networks.has(t)||this.networks.set(t,{selectedNodes:[]}),this.networks.get(t).selectedNodes.push(n),this.save()}unSelectNode(t,n){this.networks.get(t).selectedNodes=this.networks.get(t).selectedNodes.filter(r=>r!==n),this.save()}save(){}}const by=new Kte;function qte({hasSubFolders:e,folder:t,selectHandler:n,forNetwork:r}){var u;const i={...t};e&&t.children[0].name!=="all"&&(i.children=[{name:"all",children:[]},...i.children]);const o=((u=by.networks.get(r))==null?void 0:u.selectedNodes)||[],s=Ite(i),d=s.filter(l=>o.includes(l.name)).map(l=>l.id);function a({element:l}){n({element:l})}function c(l){l.isExpanded?by.selectNode(r,l.element.name):by.unSelectNode(r,l.element.name)}return e?j.jsx("div",{className:"FolderTreeFilter nevysha nevysha-scrollable",children:j.jsx("div",{className:"directory",children:j.jsx(wR,{data:s,"aria-label":"directory tree",onNodeSelect:a,defaultExpandedIds:d,onExpand:c,nodeRenderer:({element:l,isBranch:f,isExpanded:h,getNodeProps:p,level:g})=>j.jsxs("div",{...p(),style:{paddingLeft:20*(g-1)},children:[f?j.jsx(Yte,{isOpen:h}):j.jsx(Xte,{filename:l.name}),l.name]})})})}):j.jsx("div",{className:"EmptyFolderTreeFilter"})}const Yte=({isOpen:e})=>e?j.jsx(Ate,{color:"e8a87c",className:"icon"}):j.jsx(Mte,{color:"e8a87c",className:"icon"}),Xte=()=>j.jsx(Lte,{color:"var(--nevysha-font-color)",className:"icon"});function Zte(e){return Tm({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"1 4 1 10 7 10"}},{tag:"polyline",attr:{points:"23 20 23 14 17 14"}},{tag:"path",attr:{d:"M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"}}]})(e)}const Qte={"&::-webkit-scrollbar":{width:"5px"},"&::-webkit-scrollbar-track":{backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:"var(--ae-primary-color)",borderRadius:"20px"}},wy=[];function Jte(){const[e,t]=Le.useState([]),[n,r]=Le.useState([]),[i,o]=Le.useState(!1),[s,d]=Le.useState(!1),[a,c]=Le.useState(""),[u,l]=Le.useState({models:!1}),[f,h]=Le.useState(!1),[p,g]=Le.useState(null);F.useEffect(()=>{(async()=>await y())()},[]);const y=async()=>{const C=COZY_NEST_CONFIG.deferred_cozy_extra_networks_loading?"/cozy-nest/extra_networks":"/cozy-nest/extra_networks/full",k=await fetch(C);if(k.status!==200){CozyLogger.error("failed to fetch extra networks",k);return}const I=await k.json(),L={};Object.keys(I).forEach((P,D)=>{P=String(P),L[P]=!1});const T=await fetch("/cozy-nest/extra_networks/folders");if(T.status!==200){CozyLogger.error("failed to fetch extra networks folders",T);return}const R=await T.json();r(R),t(I),l(L),o(!0),COZY_NEST_CONFIG.deferred_cozy_extra_networks_loading||d(!0)},x=async()=>{r([]),t([]),o(!1),d(!1),g(null),await y()};F.useEffect(()=>{f&&(s||(o(!1),(async()=>{const C=await fetch("/cozy-nest/extra_networks/full");if(C.status===200){const k=await C.json();t(k),o(!0),d(!0),g(wy[0])}else CozyLogger.error("failed to fetch full extra networks info",C)})()))},[f]);function S(){const C=[],k=[],I={border:"none",height:"100%",borderBottom:"1px solid var(--ae-input-border-color)",borderTop:"1px solid var(--tab-nav-background-color-selected)"};return Object.keys(e).forEach((L,T)=>{let R=String(L);wy.push(L),L==="embeddings"&&(R="Textual Inversion"),C.push(j.jsx(eu,{children:R},T)),k.push(j.jsx(Jl,{css:Qte,style:I,children:j.jsx("div",{className:"CozyExtraNetworksPanels",children:e[L].map((P,D)=>j.jsx(Ete,{item:P,searchString:a,selectedFolder:v,nsfwFilter:f},P.path))})},T))}),{EnTabs:C,EnTabPanels:k}}function E(C){g(wy[C]),w(null)}const[v,w]=Le.useState(null);function b({element:C}){if(CozyLogger.debug("folderSelectHandler",{element:C}),C.name==="all"||!C.metadata){w(null);return}w(C.metadata.path)}function m(C,k){u[C]=k,l({...u})}const $=S(),A=n[p]&&!n[p].empty;return j.jsxs("div",{className:"CozyExtraNetworks",children:[!i&&j.jsx(Gw,{label:"Loading Extra Networks..."}),i&&j.jsxs(Qr,{style:{width:"100%"},children:[j.jsx("textarea",{"data-testid":"textbox",placeholder:"Search...",rows:"1",spellCheck:"false","data-gramm":"false",style:{resize:"none",minHeight:"35px"},onChange:C=>c(C.target.value)}),j.jsxs(wo,{style:{margin:"3px 0"},children:[j.jsx(Mn,{isChecked:u[p||"models"],disabled:!A,onChange:C=>m(p,C.target.checked),children:"Display folder filter"}),j.jsx("div",{style:{flex:1}}),j.jsx("button",{className:"refreshEnBtn",onClick:x,title:"Reload extra networks",children:j.jsx(Zte,{color:"00d9ff",className:"icon"})}),j.jsxs("button",{onClick:()=>h(!f),title:"WARNING : this will take time as it will compute the info of all extra networks",className:"btn-settings toggleNsfwFilter",children:["Toggle sfw filter",j.jsx("span",{className:"sfwFilterInfo",children:f?Es.eye:Es.eyeSlash})]})]}),j.jsxs(Cn,{style:{height:"calc(100% - 90px)"},children:[u[p]&&j.jsx(qte,{hasSubFolders:A,folder:n[p],forNetwork:p,selectHandler:b}),j.jsxs(Aw,{variant:"nevysha",onChange:E,children:[j.jsx(Mw,{style:{backgroundColor:"var(--tab-nav-background-color)"},children:$.EnTabs}),j.jsx(Lw,{children:$.EnTabPanels})]})]})]})]})}function ene(){return new Promise((e,t)=>{SR(e)})}function SR(e){if($t.debug("startExtraNetwork"),!document.getElementById("cozy-extra-network-react")){$t.debug("waiting for extra network react"),setTimeout(()=>SR(),200);return}e(),tb("txt2img"),tb("img2img"),Da.createRoot(document.getElementById("cozy-extra-network-react")).render(j.jsx(Le.StrictMode,{children:j.jsx(nf,{theme:sf,children:j.jsx(Jte,{})})}))}window.CozyTools={stop:()=>setTimeout(function(){debugger},5e3)};async function tne(){if(await IM(),COZY_NEST_CONFIG.webui===Fa){const e=document.createElement("link");e.rel="stylesheet",e.href="/cozy-nest-client/assets/cozy-nest-style-sdnext.css",document.head.appendChild(e)}await Tq(async()=>{KL(),COZY_NEST_CONFIG.enable_cozy_prompt===!0&&(await mb("txt2img_prompt","cozy_nest_prompt_txt2img","txt2img"),await mb("img2img_prompt","cozy_nest_prompt_img2img","img2img"),Eee.override_confirm_clear_prompt()),COZY_NEST_CONFIG.enable_extra_network_tweaks===!0&&(await Hk("txt2img"),await Hk("img2img")),COZY_NEST_CONFIG.enable_cozy_extra_networks===!0&&await ene(),BL(),await Ld.prepareReactHost(),Rd.emit("cozy-nest-loaded")}),setTimeout(VK,1e3)}window.cozyNestLoader=tne;(async()=>{if(HK())return;const e=new CSSStyleSheet;e.replaceSync(RR),document.adoptedStyleSheets=[e],Cr.time(bu)})();