mobx-view-model-devtools 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--spacing:.25rem;--font-weight-semibold:600;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.container_ueeVi{width:100%}@media(min-width:40rem){.container_ueeVi{max-width:40rem}}@media(min-width:48rem){.container_ueeVi{max-width:48rem}}@media(min-width:64rem){.container_ueeVi{max-width:64rem}}@media(min-width:80rem){.container_ueeVi{max-width:80rem}}@media(min-width:96rem){.container_ueeVi{max-width:96rem}}.block_O8-1d{display:block}.inline_gmkRL{display:inline}.blur_9rZ6A{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.vmButton_Xr1Q6{z-index:99;width:calc(var(--spacing)*9);height:calc(var(--spacing)*9);cursor:pointer;border-radius:var(--radius-lg);font-family:var(--font-mono);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));position:fixed}.vmButton_Xr1Q6[data-position=top-right],.vmButton_Xr1Q6[data-position=undefined]{top:calc(var(--spacing)*3);right:calc(var(--spacing)*3)}:is(.vmButton_Xr1Q6[data-position=top-right],.vmButton_Xr1Q6[data-position=undefined]).opened_gewqL{top:calc(var(--spacing)*-10)}.vmButton_Xr1Q6[data-position=top-left]{top:calc(var(--spacing)*3);left:calc(var(--spacing)*3)}.vmButton_Xr1Q6[data-position=top-left].opened_gewqL{top:calc(var(--spacing)*-10)}.vmButton_Xr1Q6[data-position=bottom-left]{bottom:calc(var(--spacing)*3);left:calc(var(--spacing)*3)}.vmButton_Xr1Q6[data-position=bottom-left].opened_gewqL{bottom:calc(var(--spacing)*-10)}.vmButton_Xr1Q6[data-position=bottom-right]{right:calc(var(--spacing)*3);bottom:calc(var(--spacing)*3)}.vmButton_Xr1Q6[data-position=bottom-right].opened_gewqL{bottom:calc(var(--spacing)*-10)}.vmButton_Xr1Q6>img{pointer-events:none;inset:calc(var(--spacing)*0);border-radius:var(--radius-lg);position:absolute}.vmButton_Xr1Q6>div{pointer-events:none;inset:calc(var(--spacing)*0);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:2px;border-color:#00000057;position:absolute}.vmButton_Xr1Q6>span{pointer-events:none;top:calc(var(--spacing)*-1);left:calc(var(--spacing)*-1);border-radius:var(--radius-lg);padding:calc(var(--spacing)*.5);--tw-leading:1;--tw-font-weight:var(--font-weight-semibold);font-size:12px;line-height:1;font-weight:var(--font-weight-semibold);color:#2aff0a;background-color:#005c26cf;display:flex;position:absolute}.vmButton_Xr1Q6.opened_gewqL{pointer-events:none}.vmPopup_Q4l4j{z-index:99;border-radius:var(--radius-lg);width:520px;height:calc(100vh - 24px);position:fixed}.vmPopup_Q4l4j>header button{width:28px;padding:6px}.vmPopup_Q4l4j[data-position=top-right],.vmPopup_Q4l4j[data-position=undefined]{top:calc(var(--spacing)*3);right:calc(var(--spacing)*3)}.vmPopup_Q4l4j[data-position=top-left]{top:calc(var(--spacing)*3);left:calc(var(--spacing)*3)}.vmPopup_Q4l4j[data-position=bottom-left]{bottom:calc(var(--spacing)*3);left:calc(var(--spacing)*3)}.vmPopup_Q4l4j[data-position=bottom-right]{right:calc(var(--spacing)*3);bottom:calc(var(--spacing)*3)}.vmContent_VAE7p{color:#ccc;font-family:var(--font-mono);background-color:#1e1e1e;overflow:auto}.vmContent_VAE7p>header{height:calc(var(--spacing)*8);padding-left:calc(var(--spacing)*2);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);justify-content:space-between;align-items:center;display:flex}.vmContent_VAE7p *{font-family:var(--font-mono)}.vmContentTree_BB36O{padding-inline:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*2);flex-direction:column;display:flex}.vmTreeItem_t-7jc{flex-direction:column;display:flex}.vmTreeItem_t-7jc.line_Xgaua{top:calc(22px + 22px*var(--level,0));background:#1e1e1e;position:sticky}.vmTreeItem_t-7jc>header{z-index:1;cursor:pointer;align-items:center;gap:calc(var(--spacing)*1);text-overflow:ellipsis;white-space:nowrap;background-color:#1e1e1e;margin-block:auto;display:flex;overflow:hidden}.vmTreeItem_t-7jc>header>label{background:#0f6013;border-radius:4px;padding:0 4px}.vmTreeItem_t-7jc>header>span{color:#5ab65e;text-overflow:ellipsis;white-space:nowrap;font-size:14px;overflow:hidden}.vmTreeItem_t-7jc:not([data-fitted=true])>header{opacity:.6}.vmContentFilters_No1QW{z-index:99;background:#1e1e1e;width:100%;padding:0 8px;position:sticky;top:0}.vmContentFilters_No1QW input{background:#343434;border-radius:4px;outline:0;width:100%;padding:3px 4px;font-size:14px}.propertyMeta_XxYHc{text-overflow:ellipsis;white-space:nowrap;color:#616161;overflow:hidden}.propertyMeta_XxYHc.small_Ipy6s{font-size:10px;line-height:15px}.propertyValue_s9qHJ{text-overflow:ellipsis;white-space:nowrap;color:#616161;overflow:hidden}.propertyValue_s9qHJ:has(+.property-name_2-sJi){margin-right:calc(var(--spacing)*1)}.line_Xgaua{text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-mono);white-space:pre;height:22px;z-index:calc((var(--level,0) + 1)*10000 + (var(--order,0)));padding-left:calc(10px + (var(--level)*14px));background:#1e1e1e;flex-direction:row;align-items:center;font-size:14px;display:flex;position:relative;overflow:hidden}.line_Xgaua:has(>.expandButton_EObqt.expanded_uFpb7){top:calc(22px + 22px*(var(--level,0) + 1));position:sticky}.property_eoWZv[data-fitted=false]{opacity:.5}.property_eoWZv.instance_B-kEn>.propertyValue_s9qHJ{color:#ba82be}:is(.property_eoWZv.primitive_5yfCy.boolean_TwUVp,.property_eoWZv.primitive_5yfCy.number_AVdzm,.property_eoWZv.primitive_5yfCy.object_kn8wQ,.property_eoWZv.primitive_5yfCy.undefined_SMcns,.property_eoWZv.primitive_5yfCy.bigint_ZrO3O,.property_eoWZv.primitive_5yfCy.symbol_9GN4U)>.propertyValue_s9qHJ{color:#5999cd}.property_eoWZv.primitive_5yfCy.string_m1Kkx>.propertyValue_s9qHJ{color:#af7249}.expandButton_EObqt{color:#a0a0a0;cursor:pointer;width:16px;height:16px;font-weight:700;opacity:1!important}.expandButton_EObqt.expanded_uFpb7{color:#b8b8b8;transform:rotate(90deg)}.expandButton_EObqt.disabled_IDojS{opacity:.35!important}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
1
+ !function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode('/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--spacing:.25rem;--font-weight-semibold:600;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.static_g5P-G{position:static}.blur_9rZ6A{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.vmButton_Xr1Q6{z-index:99;width:calc(var(--spacing)*9);height:calc(var(--spacing)*9);cursor:pointer;border-radius:var(--radius-lg);font-family:var(--font-mono);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));position:fixed}.vmButton_Xr1Q6[data-position=top-right],.vmButton_Xr1Q6[data-position=undefined]{top:calc(var(--spacing)*3);right:calc(var(--spacing)*3)}:is(.vmButton_Xr1Q6[data-position=top-right],.vmButton_Xr1Q6[data-position=undefined]).opened_gewqL{top:calc(var(--spacing)*-10)}.vmButton_Xr1Q6[data-position=top-left]{top:calc(var(--spacing)*3);left:calc(var(--spacing)*3)}.vmButton_Xr1Q6[data-position=top-left].opened_gewqL{top:calc(var(--spacing)*-10)}.vmButton_Xr1Q6[data-position=bottom-left]{bottom:calc(var(--spacing)*3);left:calc(var(--spacing)*3)}.vmButton_Xr1Q6[data-position=bottom-left].opened_gewqL{bottom:calc(var(--spacing)*-10)}.vmButton_Xr1Q6[data-position=bottom-right]{right:calc(var(--spacing)*3);bottom:calc(var(--spacing)*3)}.vmButton_Xr1Q6[data-position=bottom-right].opened_gewqL{bottom:calc(var(--spacing)*-10)}.vmButton_Xr1Q6>img{pointer-events:none;inset:calc(var(--spacing)*0);border-radius:var(--radius-lg);position:absolute}.vmButton_Xr1Q6>div{pointer-events:none;inset:calc(var(--spacing)*0);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:2px;border-color:#00000057;position:absolute}.vmButton_Xr1Q6>span{pointer-events:none;top:calc(var(--spacing)*-1);left:calc(var(--spacing)*-1);border-radius:var(--radius-lg);padding:calc(var(--spacing)*.5);--tw-leading:1;--tw-font-weight:var(--font-weight-semibold);font-size:12px;line-height:1;font-weight:var(--font-weight-semibold);color:#2aff0a;background-color:#005c26cf;display:flex;position:absolute}.vmButton_Xr1Q6.opened_gewqL{pointer-events:none}.vmPopup_Q4l4j{z-index:99;border-radius:var(--radius-lg);width:520px;height:calc(100vh - 24px);position:fixed}.vmPopup_Q4l4j>header button{width:28px;padding:6px}.vmPopup_Q4l4j[data-position=top-right],.vmPopup_Q4l4j[data-position=undefined]{top:calc(var(--spacing)*3);right:calc(var(--spacing)*3)}.vmPopup_Q4l4j[data-position=top-left]{top:calc(var(--spacing)*3);left:calc(var(--spacing)*3)}.vmPopup_Q4l4j[data-position=bottom-left]{bottom:calc(var(--spacing)*3);left:calc(var(--spacing)*3)}.vmPopup_Q4l4j[data-position=bottom-right]{right:calc(var(--spacing)*3);bottom:calc(var(--spacing)*3)}.vmContent_VAE7p{color:#ccc;font-family:var(--font-mono);background-color:#1e1e1e;overflow:auto}.vmContent_VAE7p>header{height:calc(var(--spacing)*8);padding-left:calc(var(--spacing)*2);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);justify-content:space-between;align-items:center;display:flex}.vmContent_VAE7p *{font-family:var(--font-mono)}.vmContentTree_BB36O{padding-inline:calc(var(--spacing)*2);padding-block:calc(var(--spacing)*2);flex-direction:column;display:flex}.vmTreeItem_t-7jc{flex-direction:column;display:flex}.vmTreeItem_t-7jc.line_Xgaua{top:calc(22px + 22px*var(--level,0));background:#1e1e1e;position:sticky}.vmTreeItem_t-7jc>header{z-index:1;cursor:pointer;align-items:center;gap:calc(var(--spacing)*1);text-overflow:ellipsis;white-space:nowrap;background-color:#1e1e1e;margin-block:auto;display:flex;overflow:hidden}.vmTreeItem_t-7jc>header>label{background:#0f6013;border-radius:4px;padding:0 4px}.vmTreeItem_t-7jc>header>span{color:#5ab65e;text-overflow:ellipsis;white-space:nowrap;font-size:14px;overflow:hidden}.vmTreeItem_t-7jc:not([data-fitted=true])>header{opacity:.6}.vmContentFilters_No1QW{z-index:99;background:#1e1e1e;width:100%;padding:0 8px;position:sticky;top:0}.vmContentFilters_No1QW input{background:#343434;border-radius:4px;outline:0;width:100%;padding:3px 4px;font-size:14px}.propertyMeta_XxYHc{text-overflow:ellipsis;white-space:nowrap;color:#616161;overflow:hidden}.propertyMeta_XxYHc.small_Ipy6s{font-size:10px;line-height:15px}.propertyValue_s9qHJ{text-overflow:ellipsis;white-space:nowrap;color:#616161;overflow:hidden}.propertyValue_s9qHJ:has(+.property-name_2-sJi){margin-right:calc(var(--spacing)*1)}.line_Xgaua{text-overflow:ellipsis;white-space:nowrap;font-family:var(--font-mono);white-space:pre;height:22px;z-index:calc((var(--level,0) + 1)*10000 + (var(--order,0)));padding-left:calc(10px + (var(--level)*14px));background:#1e1e1e;flex-direction:row;align-items:center;font-size:14px;display:flex;position:relative;overflow:hidden}.line_Xgaua:has(>.expandButton_EObqt.expanded_uFpb7){top:calc(22px + 22px*(var(--level,0) + 1));position:sticky}.property_eoWZv[data-fitted=false]{opacity:.5}.property_eoWZv.instance_B-kEn>.propertyValue_s9qHJ{color:#ba82be}:is(.property_eoWZv.primitive_5yfCy.boolean_TwUVp,.property_eoWZv.primitive_5yfCy.number_AVdzm,.property_eoWZv.primitive_5yfCy.object_kn8wQ,.property_eoWZv.primitive_5yfCy.undefined_SMcns,.property_eoWZv.primitive_5yfCy.bigint_ZrO3O,.property_eoWZv.primitive_5yfCy.symbol_9GN4U)>.propertyValue_s9qHJ{color:#5999cd}.property_eoWZv.primitive_5yfCy.string_m1Kkx>.propertyValue_s9qHJ{color:#af7249}.expandButton_EObqt{color:#a0a0a0;cursor:pointer;width:16px;height:16px;font-weight:700;opacity:1!important}.expandButton_EObqt.expanded_uFpb7{color:#b8b8b8;transform:rotate(90deg)}.expandButton_EObqt.disabled_IDojS{opacity:.35!important}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -47,179 +47,10 @@ var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use
47
47
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
48
48
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
49
49
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
50
- var _searchCache_dec, _a2, _init;
50
+ var _searchCache_dec, _init;
51
51
  import require$$0, { useState, forwardRef, memo, createContext, useContext, useRef, useEffect, useLayoutEffect, useMemo, useReducer, useImperativeHandle, createElement } from "react";
52
52
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
53
53
  import require$$0$1, { unstable_batchedUpdates, flushSync } from "react-dom";
54
- var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
55
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
56
- var root = freeGlobal || freeSelf || Function("return this")();
57
- var Symbol$1 = root.Symbol;
58
- var objectProto$1 = Object.prototype;
59
- var hasOwnProperty = objectProto$1.hasOwnProperty;
60
- var nativeObjectToString$1 = objectProto$1.toString;
61
- var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
62
- function getRawTag(value) {
63
- var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
64
- try {
65
- value[symToStringTag$1] = void 0;
66
- var unmasked = true;
67
- } catch (e) {
68
- }
69
- var result = nativeObjectToString$1.call(value);
70
- if (unmasked) {
71
- if (isOwn) {
72
- value[symToStringTag$1] = tag;
73
- } else {
74
- delete value[symToStringTag$1];
75
- }
76
- }
77
- return result;
78
- }
79
- var objectProto = Object.prototype;
80
- var nativeObjectToString = objectProto.toString;
81
- function objectToString(value) {
82
- return nativeObjectToString.call(value);
83
- }
84
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
85
- var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
86
- function baseGetTag(value) {
87
- if (value == null) {
88
- return value === void 0 ? undefinedTag : nullTag;
89
- }
90
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
91
- }
92
- function isObjectLike(value) {
93
- return value != null && typeof value == "object";
94
- }
95
- var symbolTag = "[object Symbol]";
96
- function isSymbol$1(value) {
97
- return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
98
- }
99
- var reWhitespace = /\s/;
100
- function trimmedEndIndex(string2) {
101
- var index = string2.length;
102
- while (index-- && reWhitespace.test(string2.charAt(index))) {
103
- }
104
- return index;
105
- }
106
- var reTrimStart = /^\s+/;
107
- function baseTrim(string2) {
108
- return string2 ? string2.slice(0, trimmedEndIndex(string2) + 1).replace(reTrimStart, "") : string2;
109
- }
110
- function isObject$2(value) {
111
- var type = typeof value;
112
- return value != null && (type == "object" || type == "function");
113
- }
114
- var NAN = 0 / 0;
115
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
116
- var reIsBinary = /^0b[01]+$/i;
117
- var reIsOctal = /^0o[0-7]+$/i;
118
- var freeParseInt = parseInt;
119
- function toNumber(value) {
120
- if (typeof value == "number") {
121
- return value;
122
- }
123
- if (isSymbol$1(value)) {
124
- return NAN;
125
- }
126
- if (isObject$2(value)) {
127
- var other = typeof value.valueOf == "function" ? value.valueOf() : value;
128
- value = isObject$2(other) ? other + "" : other;
129
- }
130
- if (typeof value != "string") {
131
- return value === 0 ? value : +value;
132
- }
133
- value = baseTrim(value);
134
- var isBinary = reIsBinary.test(value);
135
- return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
136
- }
137
- var now = function() {
138
- return root.Date.now();
139
- };
140
- var FUNC_ERROR_TEXT = "Expected a function";
141
- var nativeMax = Math.max, nativeMin = Math.min;
142
- function debounce(func, wait, options) {
143
- var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
144
- if (typeof func != "function") {
145
- throw new TypeError(FUNC_ERROR_TEXT);
146
- }
147
- wait = toNumber(wait) || 0;
148
- if (isObject$2(options)) {
149
- leading = !!options.leading;
150
- maxing = "maxWait" in options;
151
- maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
152
- trailing = "trailing" in options ? !!options.trailing : trailing;
153
- }
154
- function invokeFunc(time) {
155
- var args = lastArgs, thisArg = lastThis;
156
- lastArgs = lastThis = void 0;
157
- lastInvokeTime = time;
158
- result = func.apply(thisArg, args);
159
- return result;
160
- }
161
- function leadingEdge(time) {
162
- lastInvokeTime = time;
163
- timerId = setTimeout(timerExpired, wait);
164
- return leading ? invokeFunc(time) : result;
165
- }
166
- function remainingWait(time) {
167
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
168
- return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
169
- }
170
- function shouldInvoke(time) {
171
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
172
- return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
173
- }
174
- function timerExpired() {
175
- var time = now();
176
- if (shouldInvoke(time)) {
177
- return trailingEdge(time);
178
- }
179
- timerId = setTimeout(timerExpired, remainingWait(time));
180
- }
181
- function trailingEdge(time) {
182
- timerId = void 0;
183
- if (trailing && lastArgs) {
184
- return invokeFunc(time);
185
- }
186
- lastArgs = lastThis = void 0;
187
- return result;
188
- }
189
- function cancel() {
190
- if (timerId !== void 0) {
191
- clearTimeout(timerId);
192
- }
193
- lastInvokeTime = 0;
194
- lastArgs = lastCallTime = lastThis = timerId = void 0;
195
- }
196
- function flush() {
197
- return timerId === void 0 ? result : trailingEdge(now());
198
- }
199
- function debounced() {
200
- var time = now(), isInvoking = shouldInvoke(time);
201
- lastArgs = arguments;
202
- lastThis = this;
203
- lastCallTime = time;
204
- if (isInvoking) {
205
- if (timerId === void 0) {
206
- return leadingEdge(lastCallTime);
207
- }
208
- if (maxing) {
209
- clearTimeout(timerId);
210
- timerId = setTimeout(timerExpired, wait);
211
- return invokeFunc(lastCallTime);
212
- }
213
- }
214
- if (timerId === void 0) {
215
- timerId = setTimeout(timerExpired, wait);
216
- }
217
- return result;
218
- }
219
- debounced.cancel = cancel;
220
- debounced.flush = flush;
221
- return debounced;
222
- }
223
54
  var niceErrors = {
224
55
  0: "Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",
225
56
  1: function _(annotationType, key) {
@@ -424,8 +255,8 @@ function isES6Map(thing) {
424
255
  }
425
256
  function isPlainES6Map(thing) {
426
257
  var mapProto = Object.getPrototypeOf(thing);
427
- var objectProto2 = Object.getPrototypeOf(mapProto);
428
- var nullProto = Object.getPrototypeOf(objectProto2);
258
+ var objectProto = Object.getPrototypeOf(mapProto);
259
+ var nullProto = Object.getPrototypeOf(objectProto);
429
260
  return nullProto === null;
430
261
  }
431
262
  function isES6Set(thing) {
@@ -4960,9 +4791,9 @@ var TimerBasedFinalizationRegistry = (
4960
4791
  }
4961
4792
  clearTimeout(_this.sweepTimeout);
4962
4793
  _this.sweepTimeout = void 0;
4963
- var now2 = Date.now();
4794
+ var now = Date.now();
4964
4795
  _this.registrations.forEach(function(registration, token) {
4965
- if (now2 - registration.registeredAt >= maxAge) {
4796
+ if (now - registration.registeredAt >= maxAge) {
4966
4797
  _this.finalize(registration.value);
4967
4798
  _this.registrations.delete(token);
4968
4799
  }
@@ -5016,8 +4847,8 @@ var TimerBasedFinalizationRegistry = (
5016
4847
  );
5017
4848
  var UniversalFinalizationRegistry = typeof FinalizationRegistry !== "undefined" ? FinalizationRegistry : TimerBasedFinalizationRegistry;
5018
4849
  var observerFinalizationRegistry = new UniversalFinalizationRegistry(function(adm) {
5019
- var _a3;
5020
- (_a3 = adm.reaction) === null || _a3 === void 0 ? void 0 : _a3.dispose();
4850
+ var _a2;
4851
+ (_a2 = adm.reaction) === null || _a2 === void 0 ? void 0 : _a2.dispose();
5021
4852
  adm.reaction = null;
5022
4853
  });
5023
4854
  var shim = { exports: {} };
@@ -5166,9 +4997,9 @@ function requireShim() {
5166
4997
  var shimExports = requireShim();
5167
4998
  function createReaction(adm) {
5168
4999
  adm.reaction = new Reaction("observer".concat(adm.name), function() {
5169
- var _a3;
5000
+ var _a2;
5170
5001
  adm.stateVersion = Symbol();
5171
- (_a3 = adm.onStoreChange) === null || _a3 === void 0 ? void 0 : _a3.call(adm);
5002
+ (_a2 = adm.onStoreChange) === null || _a2 === void 0 ? void 0 : _a2.call(adm);
5172
5003
  });
5173
5004
  }
5174
5005
  function useObserver(render, baseComponentName) {
@@ -5190,9 +5021,9 @@ function useObserver(render, baseComponentName) {
5190
5021
  adm_1.stateVersion = Symbol();
5191
5022
  }
5192
5023
  return function() {
5193
- var _a3;
5024
+ var _a2;
5194
5025
  adm_1.onStoreChange = null;
5195
- (_a3 = adm_1.reaction) === null || _a3 === void 0 ? void 0 : _a3.dispose();
5026
+ (_a2 = adm_1.reaction) === null || _a2 === void 0 ? void 0 : _a2.dispose();
5196
5027
  adm_1.reaction = null;
5197
5028
  };
5198
5029
  },
@@ -5241,12 +5072,12 @@ var ReactMemoSymbol = hasSymbol ? Symbol.for("react.memo") : typeof memo === "fu
5241
5072
  return null;
5242
5073
  })["$$typeof"];
5243
5074
  function observer(baseComponent, options) {
5244
- var _a3;
5075
+ var _a2;
5245
5076
  if (process.env.NODE_ENV !== "production" && warnObserverOptionsDeprecated && options) ;
5246
5077
  if (ReactMemoSymbol && baseComponent["$$typeof"] === ReactMemoSymbol) {
5247
5078
  throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");
5248
5079
  }
5249
- var useForwardRef = (_a3 = void 0) !== null && _a3 !== void 0 ? _a3 : false;
5080
+ var useForwardRef = (_a2 = void 0) !== null && _a2 !== void 0 ? _a2 : false;
5250
5081
  var render = baseComponent;
5251
5082
  var baseComponentName = baseComponent.displayName || baseComponent.name;
5252
5083
  if (ReactForwardRefSymbol && baseComponent["$$typeof"] === ReactForwardRefSymbol) {
@@ -5284,8 +5115,8 @@ function observer(baseComponent, options) {
5284
5115
  if ("production" !== process.env.NODE_ENV) {
5285
5116
  Object.defineProperty(observerComponent, "contextTypes", {
5286
5117
  set: function() {
5287
- var _a4, _b2;
5288
- throw new Error("[mobx-react-lite] `".concat(this.displayName || ((_a4 = this.type) === null || _a4 === void 0 ? void 0 : _a4.displayName) || ((_b2 = this.type) === null || _b2 === void 0 ? void 0 : _b2.name) || "Component", ".contextTypes` must be set before applying `observer`."));
5118
+ var _a3, _b2;
5119
+ throw new Error("[mobx-react-lite] `".concat(this.displayName || ((_a3 = this.type) === null || _a3 === void 0 ? void 0 : _a3.displayName) || ((_b2 = this.type) === null || _b2 === void 0 ? void 0 : _b2.name) || "Component", ".contextTypes` must be set before applying `observer`."));
5289
5120
  }
5290
5121
  });
5291
5122
  }
@@ -5719,7 +5550,7 @@ const _createHooksMap = function _createHooksMap2() {
5719
5550
  };
5720
5551
  function createDOMPurify() {
5721
5552
  let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
5722
- const DOMPurify = (root2) => createDOMPurify(root2);
5553
+ const DOMPurify = (root) => createDOMPurify(root);
5723
5554
  DOMPurify.version = "3.3.0";
5724
5555
  DOMPurify.removed = [];
5725
5556
  if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
@@ -6122,10 +5953,10 @@ function createDOMPurify() {
6122
5953
  }
6123
5954
  return WHOLE_DOCUMENT ? doc.documentElement : body;
6124
5955
  };
6125
- const _createNodeIterator = function _createNodeIterator2(root2) {
5956
+ const _createNodeIterator = function _createNodeIterator2(root) {
6126
5957
  return createNodeIterator.call(
6127
- root2.ownerDocument || root2,
6128
- root2,
5958
+ root.ownerDocument || root,
5959
+ root,
6129
5960
  // eslint-disable-next-line no-bitwise
6130
5961
  NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION,
6131
5962
  null
@@ -6709,12 +6540,12 @@ const useCreateViewModelSimple = (VM, payload) => {
6709
6540
  const useViewModel = (vmLookup) => {
6710
6541
  const viewModels = useContext(ViewModelsContext);
6711
6542
  const activeViewModel = useContext(ActiveViewModelContext);
6712
- const model = viewModels?.get(vmLookup);
6543
+ viewModels?.get(vmLookup);
6713
6544
  let devModeModelRef = void 0;
6714
6545
  if (process.env.NODE_ENV !== "production") {
6715
6546
  devModeModelRef = useRef();
6716
6547
  }
6717
- if (vmLookup == null || !viewModels) {
6548
+ {
6718
6549
  if (process.env.NODE_ENV !== "production" && !viewModels) {
6719
6550
  console.warn(
6720
6551
  "Warning #1: ViewModelStore not found.\n",
@@ -6738,35 +6569,6 @@ const useViewModel = (vmLookup) => {
6738
6569
  }
6739
6570
  return activeViewModel;
6740
6571
  }
6741
- if (!model) {
6742
- let displayName = "";
6743
- if (typeof vmLookup === "string") {
6744
- displayName = vmLookup;
6745
- } else if ("name" in vmLookup) {
6746
- displayName = vmLookup.name;
6747
- } else {
6748
- displayName = vmLookup.displayName;
6749
- }
6750
- if (process.env.NODE_ENV !== "production") {
6751
- if (devModeModelRef.current) {
6752
- return devModeModelRef.current;
6753
- } else {
6754
- throw new Error(
6755
- `Error #2: View model not found for ${displayName}.
6756
- This happened because your "vmLookup" provided for hook "useViewModel" is not found in "ViewModelStore".
6757
- More info: https://js2me.github.io/mobx-view-model/errors/2`
6758
- );
6759
- }
6760
- } else {
6761
- throw new Error(
6762
- "Error #2: https://js2me.github.io/mobx-view-model/errors/2"
6763
- );
6764
- }
6765
- }
6766
- if (process.env.NODE_ENV !== "production") {
6767
- devModeModelRef.current = activeViewModel;
6768
- }
6769
- return model;
6770
6572
  };
6771
6573
  observer(
6772
6574
  ({
@@ -7254,356 +7056,93 @@ class ViewModelStoreBase {
7254
7056
  this.viewModelsTempHeap.clear();
7255
7057
  }
7256
7058
  }
7257
- class LinkedAbortController extends AbortController {
7258
- constructor(...abortSignals) {
7259
- super();
7260
- this.link(...abortSignals);
7261
- }
7262
- link(...abortSignals) {
7263
- abortSignals.forEach((abortSignal) => {
7264
- abortSignal?.addEventListener("abort", () => {
7265
- this.abort(abortSignal.reason);
7266
- });
7267
- });
7268
- }
7059
+ class DevtoolsClientVM extends ViewModelBase {
7060
+ devtools = this.payload.devtools;
7269
7061
  }
7270
- const callFunction = (fn, ...args) => {
7271
- if (typeof fn === "function") {
7272
- return fn(...args);
7273
- }
7274
- return fn;
7275
- };
7276
- class KeyboardHandler {
7277
- constructor(config) {
7278
- this.config = config;
7279
- this.abortController = new LinkedAbortController(config.abortSignal);
7280
- this.activateStrategy = this.config.activateStrategy ?? {
7281
- type: "immidiately"
7062
+ class DevtoolsVMImpl extends ViewModelBase {
7063
+ }
7064
+ var client = {};
7065
+ var hasRequiredClient;
7066
+ function requireClient() {
7067
+ if (hasRequiredClient) return client;
7068
+ hasRequiredClient = 1;
7069
+ var m2 = require$$0$1;
7070
+ if (process.env.NODE_ENV === "production") {
7071
+ client.createRoot = m2.createRoot;
7072
+ client.hydrateRoot = m2.hydrateRoot;
7073
+ } else {
7074
+ var i = m2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
7075
+ client.createRoot = function(c, o) {
7076
+ i.usingClientEntryPoint = true;
7077
+ try {
7078
+ return m2.createRoot(c, o);
7079
+ } finally {
7080
+ i.usingClientEntryPoint = false;
7081
+ }
7082
+ };
7083
+ client.hydrateRoot = function(c, h2, o) {
7084
+ i.usingClientEntryPoint = true;
7085
+ try {
7086
+ return m2.hydrateRoot(c, h2, o);
7087
+ } finally {
7088
+ i.usingClientEntryPoint = false;
7089
+ }
7282
7090
  };
7283
- this.isActivated = !!(this.activateStrategy.type === "immidiately");
7284
- observable.ref(this, "isActivated");
7285
- computed.struct(this, "actions");
7286
- action.bound(this, "handleKeyboardClick");
7287
- makeObservable(this);
7288
- if (this.activateStrategy.type === "element-focus") {
7289
- const ref = this.activateStrategy.ref;
7290
- let nodeAbortController = new LinkedAbortController();
7291
- reaction(
7292
- () => ref.current,
7293
- (node) => {
7294
- if (node) {
7295
- if (globalThis.document?.activeElement === node) {
7296
- this.activate();
7297
- }
7298
- node.addEventListener("focus", this.activate, {
7299
- signal: nodeAbortController.signal
7300
- });
7301
- node.addEventListener("blur", this.deactivate, {
7302
- signal: nodeAbortController.signal
7303
- });
7304
- } else {
7305
- nodeAbortController.abort();
7306
- nodeAbortController = new LinkedAbortController(
7307
- this.abortController.signal
7308
- );
7309
- }
7310
- },
7311
- { fireImmediately: true, signal: this.abortController.signal }
7312
- );
7313
- }
7314
- globalThis.addEventListener("keydown", this.handleKeyboardClick, {
7315
- signal: this.abortController.signal
7316
- });
7317
- if (config.activateStrategy?.type === "keyclick") {
7318
- globalThis.addEventListener("click", this.activate, {
7319
- signal: this.abortController.signal
7320
- });
7321
- globalThis.addEventListener("mousemove", this.activate, {
7322
- signal: this.abortController.signal
7323
- });
7324
- }
7325
- }
7326
- abortController;
7327
- activateStrategy;
7328
- /**
7329
- * Is user using keyboard input
7330
- */
7331
- isActivated;
7332
- /**
7333
- * User actions
7334
- */
7335
- get actions() {
7336
- return callFunction(this.config.actions) ?? [];
7337
7091
  }
7338
- activate = () => {
7339
- if (this.isActivated) {
7340
- return;
7092
+ return client;
7093
+ }
7094
+ var clientExports = requireClient();
7095
+ function r(e) {
7096
+ var t, f, n = "";
7097
+ if ("string" == typeof e || "number" == typeof e) n += e;
7098
+ else if ("object" == typeof e) if (Array.isArray(e)) {
7099
+ var o = e.length;
7100
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
7101
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
7102
+ return n;
7103
+ }
7104
+ function clsx() {
7105
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
7106
+ return n;
7107
+ }
7108
+ const CLASS_PART_SEPARATOR = "-";
7109
+ const createClassGroupUtils = (config) => {
7110
+ const classMap = createClassMap(config);
7111
+ const {
7112
+ conflictingClassGroups,
7113
+ conflictingClassGroupModifiers
7114
+ } = config;
7115
+ const getClassGroupId = (className) => {
7116
+ const classParts = className.split(CLASS_PART_SEPARATOR);
7117
+ if (classParts[0] === "" && classParts.length !== 1) {
7118
+ classParts.shift();
7341
7119
  }
7342
- this.isActivated = true;
7343
- this.config.onActivate?.();
7120
+ return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
7344
7121
  };
7345
- deactivate = () => {
7346
- if (!this.isActivated) {
7347
- return;
7122
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
7123
+ const conflicts = conflictingClassGroups[classGroupId] || [];
7124
+ if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
7125
+ return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
7348
7126
  }
7349
- this.isActivated = false;
7350
- this.config.onDeactivate?.();
7127
+ return conflicts;
7351
7128
  };
7352
- handleKeyboardClick(event) {
7353
- this.config.onKeyClick?.(event);
7354
- if (this.activateStrategy.type === "keyclick") {
7355
- this.activate();
7356
- }
7357
- if (!this.isActivated) {
7358
- return;
7359
- }
7360
- for (const action2 of this.actions) {
7361
- const disabled2 = callFunction(action2.disabled);
7362
- if (disabled2) {
7363
- continue;
7364
- }
7365
- for (const shortcut of action2.shortcuts) {
7366
- const combinatedShortcuts = shortcut.split("+");
7367
- if (combinatedShortcuts.every(
7368
- (shortcut2) => this.checkShortcut(event, shortcut2)
7369
- )) {
7370
- runInAction(() => {
7371
- action2.action(event);
7372
- });
7373
- return;
7374
- }
7375
- }
7376
- }
7129
+ return {
7130
+ getClassGroupId,
7131
+ getConflictingClassGroupIds
7132
+ };
7133
+ };
7134
+ const getGroupRecursive = (classParts, classPartObject) => {
7135
+ if (classParts.length === 0) {
7136
+ return classPartObject.classGroupId;
7377
7137
  }
7378
- checkShortcut(event, shortcut) {
7379
- if (shortcut === "Shift" && event.shiftKey) return true;
7380
- if (shortcut === "Ctrl" && event.ctrlKey) return true;
7381
- if (shortcut === "Alt" && event.altKey) return true;
7382
- return shortcut === event.key;
7138
+ const currentClassPart = classParts[0];
7139
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
7140
+ const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
7141
+ if (classGroupFromNextClassPart) {
7142
+ return classGroupFromNextClassPart;
7383
7143
  }
7384
- destroy() {
7385
- this.abortController.abort();
7386
- }
7387
- }
7388
- class KeyHanders extends KeyboardHandler {
7389
- constructor(vm) {
7390
- super({
7391
- abortSignal: vm.unmountSignal,
7392
- actions: [
7393
- {
7394
- shortcuts: ["Ctrl+Shift+F12"],
7395
- action: () => {
7396
- vm.handleToggleOpen();
7397
- }
7398
- },
7399
- {
7400
- shortcuts: ["Ctrl+ArrowLeft"],
7401
- action: () => {
7402
- vm.isAllVmsExpandedByDefault = false;
7403
- }
7404
- },
7405
- {
7406
- shortcuts: ["Ctrl+ArrowRight"],
7407
- action: () => {
7408
- vm.isAllVmsExpandedByDefault = true;
7409
- }
7410
- },
7411
- {
7412
- shortcuts: ["Ctrl+ArrowDown"],
7413
- action: () => {
7414
- requestAnimationFrame(() => {
7415
- vm.containerRef.current.scrollTop += 200;
7416
- });
7417
- }
7418
- },
7419
- {
7420
- shortcuts: ["Ctrl+ArrowUp"],
7421
- action: () => {
7422
- requestAnimationFrame(() => {
7423
- vm.containerRef.current.scrollTop -= 200;
7424
- });
7425
- }
7426
- }
7427
- ]
7428
- });
7429
- }
7430
- }
7431
- class DevtoolsVMImpl extends ViewModelBase {
7432
- }
7433
- const checkPath = (obj, path) => {
7434
- const parts = path.split(".");
7435
- let current = obj;
7436
- for (const part of parts) {
7437
- if (part in current) {
7438
- current = current[part];
7439
- } else {
7440
- return false;
7441
- }
7442
- }
7443
- return true;
7444
- };
7445
- const createFocusableRef = () => {
7446
- const ref = createRef({
7447
- meta: {
7448
- focused: false
7449
- },
7450
- onSet: (input) => {
7451
- if (document.activeElement === input) {
7452
- runInAction(() => {
7453
- ref.meta.focused = true;
7454
- });
7455
- }
7456
- input.addEventListener(
7457
- "focus",
7458
- action(() => {
7459
- ref.meta.focused = true;
7460
- })
7461
- );
7462
- input.addEventListener(
7463
- "blur",
7464
- action(() => {
7465
- ref.meta.focused = false;
7466
- })
7467
- );
7468
- }
7469
- });
7470
- return ref;
7471
- };
7472
- const ignoredKeys = /* @__PURE__ */ new Set(["constructor"]);
7473
- const ignoredPrototypes = /* @__PURE__ */ new Set([
7474
- globalThis.Object.prototype,
7475
- globalThis.Function.prototype,
7476
- globalThis.Array.prototype,
7477
- globalThis.String.prototype,
7478
- globalThis.Number.prototype,
7479
- globalThis.Boolean.prototype,
7480
- globalThis.Symbol.prototype,
7481
- globalThis.Date.prototype,
7482
- globalThis.RegExp.prototype,
7483
- globalThis.Error.prototype,
7484
- globalThis.Map.prototype,
7485
- globalThis.Set.prototype,
7486
- globalThis.WeakMap.prototype,
7487
- globalThis.WeakSet.prototype,
7488
- globalThis.ArrayBuffer.prototype,
7489
- globalThis.DataView.prototype,
7490
- globalThis.Float32Array.prototype,
7491
- globalThis.Float64Array.prototype,
7492
- globalThis.Int8Array.prototype,
7493
- globalThis.Int16Array.prototype,
7494
- globalThis.Int32Array.prototype,
7495
- globalThis.Uint8Array.prototype,
7496
- globalThis.Uint8ClampedArray.prototype,
7497
- globalThis.Uint16Array.prototype,
7498
- globalThis.Uint32Array.prototype,
7499
- globalThis.BigInt64Array.prototype,
7500
- globalThis.BigUint64Array.prototype,
7501
- globalThis.Promise.prototype,
7502
- globalThis.Iterator.prototype
7503
- ]);
7504
- function getAllKeys(instance2) {
7505
- const keysSet = new Set(Object.keys(instance2));
7506
- let currentPrototype = Object.getPrototypeOf(instance2);
7507
- while (currentPrototype) {
7508
- if (currentPrototype === globalThis.Object.prototype) {
7509
- break;
7510
- }
7511
- const descriptors = Object.getOwnPropertyDescriptors(currentPrototype);
7512
- for (const key in descriptors) {
7513
- if (!ignoredKeys.has(key)) {
7514
- keysSet.add(key);
7515
- }
7516
- }
7517
- const nextPrototype = Object.getPrototypeOf(currentPrototype);
7518
- if (ignoredPrototypes.has(nextPrototype)) {
7519
- break;
7520
- }
7521
- currentPrototype = nextPrototype;
7522
- }
7523
- return Array.from(keysSet);
7524
- }
7525
- var client = {};
7526
- var hasRequiredClient;
7527
- function requireClient() {
7528
- if (hasRequiredClient) return client;
7529
- hasRequiredClient = 1;
7530
- var m2 = require$$0$1;
7531
- if (process.env.NODE_ENV === "production") {
7532
- client.createRoot = m2.createRoot;
7533
- client.hydrateRoot = m2.hydrateRoot;
7534
- } else {
7535
- var i = m2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
7536
- client.createRoot = function(c, o) {
7537
- i.usingClientEntryPoint = true;
7538
- try {
7539
- return m2.createRoot(c, o);
7540
- } finally {
7541
- i.usingClientEntryPoint = false;
7542
- }
7543
- };
7544
- client.hydrateRoot = function(c, h2, o) {
7545
- i.usingClientEntryPoint = true;
7546
- try {
7547
- return m2.hydrateRoot(c, h2, o);
7548
- } finally {
7549
- i.usingClientEntryPoint = false;
7550
- }
7551
- };
7552
- }
7553
- return client;
7554
- }
7555
- var clientExports = requireClient();
7556
- function r(e) {
7557
- var t, f, n = "";
7558
- if ("string" == typeof e || "number" == typeof e) n += e;
7559
- else if ("object" == typeof e) if (Array.isArray(e)) {
7560
- var o = e.length;
7561
- for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
7562
- } else for (f in e) e[f] && (n && (n += " "), n += f);
7563
- return n;
7564
- }
7565
- function clsx() {
7566
- for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
7567
- return n;
7568
- }
7569
- const CLASS_PART_SEPARATOR = "-";
7570
- const createClassGroupUtils = (config) => {
7571
- const classMap = createClassMap(config);
7572
- const {
7573
- conflictingClassGroups,
7574
- conflictingClassGroupModifiers
7575
- } = config;
7576
- const getClassGroupId = (className) => {
7577
- const classParts = className.split(CLASS_PART_SEPARATOR);
7578
- if (classParts[0] === "" && classParts.length !== 1) {
7579
- classParts.shift();
7580
- }
7581
- return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className);
7582
- };
7583
- const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
7584
- const conflicts = conflictingClassGroups[classGroupId] || [];
7585
- if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) {
7586
- return [...conflicts, ...conflictingClassGroupModifiers[classGroupId]];
7587
- }
7588
- return conflicts;
7589
- };
7590
- return {
7591
- getClassGroupId,
7592
- getConflictingClassGroupIds
7593
- };
7594
- };
7595
- const getGroupRecursive = (classParts, classPartObject) => {
7596
- if (classParts.length === 0) {
7597
- return classPartObject.classGroupId;
7598
- }
7599
- const currentClassPart = classParts[0];
7600
- const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
7601
- const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : void 0;
7602
- if (classGroupFromNextClassPart) {
7603
- return classGroupFromNextClassPart;
7604
- }
7605
- if (classPartObject.validators.length === 0) {
7606
- return void 0;
7144
+ if (classPartObject.validators.length === 0) {
7145
+ return void 0;
7607
7146
  }
7608
7147
  const classRest = classParts.join(CLASS_PART_SEPARATOR);
7609
7148
  return classPartObject.validators.find(({
@@ -10518,9 +10057,6 @@ const getDefaultConfig = () => {
10518
10057
  };
10519
10058
  const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
10520
10059
  const cx = (...args) => twMerge(clsx(...args));
10521
- const container = "container_ueeVi";
10522
- const block = "block_O8-1d";
10523
- const inline = "inline_gmkRL";
10524
10060
  const blur = "blur_9rZ6A";
10525
10061
  const vmButton = "vmButton_Xr1Q6";
10526
10062
  const opened = "opened_gewqL";
@@ -10547,9 +10083,7 @@ const symbol = "symbol_9GN4U";
10547
10083
  const string = "string_m1Kkx";
10548
10084
  const disabled = "disabled_IDojS";
10549
10085
  const css = {
10550
- container,
10551
- block,
10552
- inline,
10086
+ "static": "static_g5P-G",
10553
10087
  blur,
10554
10088
  vmButton,
10555
10089
  opened,
@@ -10579,25 +10113,24 @@ const css = {
10579
10113
  disabled
10580
10114
  };
10581
10115
  const VmDevtoolsButton = observer(() => {
10582
- const model = useViewModel(DevtoolsVM);
10583
- console.log("ddd", model);
10116
+ const model = useViewModel();
10584
10117
  return /* @__PURE__ */ jsxs(
10585
10118
  "button",
10586
10119
  {
10587
10120
  className: cx(
10588
10121
  css.vmButton,
10589
10122
  {
10590
- [css.opened]: model.isOpened
10123
+ [css.opened]: model.devtools.isOpened
10591
10124
  },
10592
- model.payload.buttonClassName
10125
+ model.devtools.config.buttonClassName
10593
10126
  ),
10594
- "data-position": `${model.payload.position}`,
10595
- ref: model.buttonRef,
10596
- onClick: model.handleToggleOpen,
10127
+ "data-position": `${model.devtools.config.position}`,
10128
+ ref: model.devtools.buttonRef,
10129
+ onClick: model.devtools.handleToggleOpen,
10597
10130
  children: [
10598
- /* @__PURE__ */ jsx("img", { src: model.logoUrl }),
10131
+ /* @__PURE__ */ jsx("img", { src: model.devtools.logoUrl }),
10599
10132
  /* @__PURE__ */ jsx("div", {}),
10600
- /* @__PURE__ */ jsx("span", { children: model.allVms.length })
10133
+ /* @__PURE__ */ jsx("span", { children: model.devtools.allVms.length })
10601
10134
  ]
10602
10135
  }
10603
10136
  );
@@ -10959,40 +10492,6 @@ const ExpandButton = ({
10959
10492
  }
10960
10493
  );
10961
10494
  };
10962
- class VmTreeItemRenderVM extends DevtoolsVMImpl {
10963
- constructor(vmParams) {
10964
- super({
10965
- ...vmParams,
10966
- vmConfig: {
10967
- observable: {
10968
- viewModels: {
10969
- useDecorators: false
10970
- },
10971
- viewModelStores: {
10972
- useDecorators: false
10973
- }
10974
- }
10975
- }
10976
- });
10977
- makeObservable(this, {
10978
- devtoolsVM: computed.struct,
10979
- handleExpandPropertyClick: action,
10980
- handleVmItemHeaderClick: action
10981
- });
10982
- }
10983
- get devtoolsVM() {
10984
- return this.payload.devtoolsVM;
10985
- }
10986
- isPathExpanded(path) {
10987
- return this.devtoolsVM.checkIsPathExpanded(this.payload.vmItem, path);
10988
- }
10989
- handleExpandPropertyClick(path) {
10990
- this.devtoolsVM.handleExpandPropertyClick(this.payload.vmItem, path);
10991
- }
10992
- handleVmItemHeaderClick(vmItem) {
10993
- this.devtoolsVM.handleVmItemHeaderClick(vmItem);
10994
- }
10995
- }
10996
10495
  const ArrayProperty = observer((props) => {
10997
10496
  const { name: property2, value } = props;
10998
10497
  const model = useViewModel();
@@ -11051,23 +10550,76 @@ const FunctionProperty = observer((props) => {
11051
10550
  }
11052
10551
  );
11053
10552
  });
11054
- const InstanceProperty = observer((props) => {
11055
- const { name, value } = props;
11056
- const model = useViewModel();
11057
- const isExpanded = model.isPathExpanded(props.path);
11058
- const Constructor = value.constructor;
11059
- const className = Constructor.name;
11060
- const keys = getAllKeys(value);
11061
- return /* @__PURE__ */ jsxs(Fragment, { children: [
11062
- /* @__PURE__ */ jsxs(
11063
- "div",
11064
- {
11065
- className: cx(css.line, css.property, css.instance),
11066
- style: { "--level": props.level, "--order": props.order },
11067
- onClick: () => model.handleExpandPropertyClick(props.path),
11068
- "data-fitted": props.isFitted,
11069
- children: [
11070
- /* @__PURE__ */ jsx(ExpandButton, { expandable: true, expanded: isExpanded }),
10553
+ const ignoredKeys = /* @__PURE__ */ new Set(["constructor"]);
10554
+ const ignoredPrototypes = /* @__PURE__ */ new Set([
10555
+ globalThis.Object.prototype,
10556
+ globalThis.Function.prototype,
10557
+ globalThis.Array.prototype,
10558
+ globalThis.String.prototype,
10559
+ globalThis.Number.prototype,
10560
+ globalThis.Boolean.prototype,
10561
+ globalThis.Symbol.prototype,
10562
+ globalThis.Date.prototype,
10563
+ globalThis.RegExp.prototype,
10564
+ globalThis.Error.prototype,
10565
+ globalThis.Map.prototype,
10566
+ globalThis.Set.prototype,
10567
+ globalThis.WeakMap.prototype,
10568
+ globalThis.WeakSet.prototype,
10569
+ globalThis.ArrayBuffer.prototype,
10570
+ globalThis.DataView.prototype,
10571
+ globalThis.Float32Array.prototype,
10572
+ globalThis.Float64Array.prototype,
10573
+ globalThis.Int8Array.prototype,
10574
+ globalThis.Int16Array.prototype,
10575
+ globalThis.Int32Array.prototype,
10576
+ globalThis.Uint8Array.prototype,
10577
+ globalThis.Uint8ClampedArray.prototype,
10578
+ globalThis.Uint16Array.prototype,
10579
+ globalThis.Uint32Array.prototype,
10580
+ globalThis.BigInt64Array.prototype,
10581
+ globalThis.BigUint64Array.prototype,
10582
+ globalThis.Promise.prototype,
10583
+ globalThis.Iterator.prototype
10584
+ ]);
10585
+ function getAllKeys(instance2) {
10586
+ const keysSet = new Set(Object.keys(instance2));
10587
+ let currentPrototype = Object.getPrototypeOf(instance2);
10588
+ while (currentPrototype) {
10589
+ if (currentPrototype === globalThis.Object.prototype) {
10590
+ break;
10591
+ }
10592
+ const descriptors = Object.getOwnPropertyDescriptors(currentPrototype);
10593
+ for (const key in descriptors) {
10594
+ if (!ignoredKeys.has(key)) {
10595
+ keysSet.add(key);
10596
+ }
10597
+ }
10598
+ const nextPrototype = Object.getPrototypeOf(currentPrototype);
10599
+ if (ignoredPrototypes.has(nextPrototype)) {
10600
+ break;
10601
+ }
10602
+ currentPrototype = nextPrototype;
10603
+ }
10604
+ return Array.from(keysSet);
10605
+ }
10606
+ const InstanceProperty = observer((props) => {
10607
+ const { name, value } = props;
10608
+ const model = useViewModel();
10609
+ const isExpanded = model.isPathExpanded(props.path);
10610
+ const Constructor = value.constructor;
10611
+ const className = Constructor.name;
10612
+ const keys = getAllKeys(value);
10613
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
10614
+ /* @__PURE__ */ jsxs(
10615
+ "div",
10616
+ {
10617
+ className: cx(css.line, css.property, css.instance),
10618
+ style: { "--level": props.level, "--order": props.order },
10619
+ onClick: () => model.handleExpandPropertyClick(props.path),
10620
+ "data-fitted": props.isFitted,
10621
+ children: [
10622
+ /* @__PURE__ */ jsx(ExpandButton, { expandable: true, expanded: isExpanded }),
11071
10623
  /* @__PURE__ */ jsx("span", { className: css.propertyName, children: name }),
11072
10624
  /* @__PURE__ */ jsx("span", { className: css.propertyMeta, children: ": " }),
11073
10625
  /* @__PURE__ */ jsx("span", { className: css.propertyValue, children: `${className}` })
@@ -11170,8 +10722,8 @@ const VmTreeItemRender = withViewModel(
11170
10722
  VmTreeItemRenderVM,
11171
10723
  ({ model }) => {
11172
10724
  const vmItem = model.payload.vmItem;
11173
- const isExpanded = model.devtoolsVM.isExpanded(vmItem);
11174
- const fittedInfo = model.devtoolsVM.getVMFittedInfo(vmItem);
10725
+ const isExpanded = model.devtools.isExpanded(vmItem);
10726
+ const fittedInfo = model.devtools.getVMFittedInfo(vmItem);
11175
10727
  return /* @__PURE__ */ jsxs(Fragment, { children: [
11176
10728
  /* @__PURE__ */ jsx(
11177
10729
  "div",
@@ -11185,7 +10737,7 @@ const VmTreeItemRender = withViewModel(
11185
10737
  {
11186
10738
  expandable: vmItem.children.length > 0,
11187
10739
  expanded: isExpanded,
11188
- disabled: model.devtoolsVM.isAllVmsExpandedByDefault
10740
+ disabled: model.devtools.isAllVmsExpandedByDefault
11189
10741
  }
11190
10742
  ),
11191
10743
  /* @__PURE__ */ jsx("label", { title: vmItem.displayName, children: vmItem.displayName }),
@@ -11200,7 +10752,7 @@ const VmTreeItemRender = withViewModel(
11200
10752
  name: property2,
11201
10753
  order,
11202
10754
  value: vmItem.vm[property2],
11203
- isFitted: model.devtoolsVM.checkIsPropertyFitted(vmItem, property2),
10755
+ isFitted: model.devtools.checkIsPropertyFitted(vmItem, property2),
11204
10756
  level: vmItem.depth,
11205
10757
  path: property2
11206
10758
  },
@@ -11209,7 +10761,7 @@ const VmTreeItemRender = withViewModel(
11209
10761
  isExpanded && vmItem.children.map((child) => /* @__PURE__ */ jsx(
11210
10762
  VmTreeItemRender,
11211
10763
  {
11212
- payload: { vmItem: child, devtoolsVM: model.devtoolsVM }
10764
+ payload: { vmItem: child, devtools: model.devtools }
11213
10765
  },
11214
10766
  child.key
11215
10767
  ))
@@ -11228,7 +10780,7 @@ const VmDevtoolsContent = observer(
11228
10780
  {
11229
10781
  ...props,
11230
10782
  className: cx(css.vmContent, className),
11231
- ref: model.containerRef,
10783
+ ref: model.devtools.containerRef,
11232
10784
  children: [
11233
10785
  /* @__PURE__ */ jsxs("header", { children: [
11234
10786
  /* @__PURE__ */ jsx("span", { children: "mobx-view-model devtools" }),
@@ -11237,17 +10789,17 @@ const VmDevtoolsContent = observer(
11237
10789
  /* @__PURE__ */ jsx("div", { className: css.vmContentFilters, children: /* @__PURE__ */ jsx(
11238
10790
  "input",
11239
10791
  {
11240
- value: model.search,
11241
- ref: model.inputRef,
10792
+ value: model.devtools.search,
10793
+ ref: model.devtools.inputRef,
11242
10794
  autoFocus: true,
11243
10795
  placeholder: "search by property path or ViewModel name",
11244
- onChange: model.handleSearchChange
10796
+ onChange: model.devtools.handleSearchChange
11245
10797
  }
11246
10798
  ) }),
11247
- /* @__PURE__ */ jsx("div", { className: css.vmContentTree, children: /* @__PURE__ */ jsx(te, { children: model.vmTree.map((vmItem) => /* @__PURE__ */ jsx(
10799
+ /* @__PURE__ */ jsx("div", { className: css.vmContentTree, children: /* @__PURE__ */ jsx(te, { children: model.devtools.vmTree.map((vmItem) => /* @__PURE__ */ jsx(
11248
10800
  VmTreeItemRender,
11249
10801
  {
11250
- payload: { vmItem, devtoolsVM: model }
10802
+ payload: { vmItem, devtools: model.devtools }
11251
10803
  },
11252
10804
  vmItem.key
11253
10805
  )) }) })
@@ -11262,8 +10814,8 @@ const VmDevtoolsPopup = observer(() => {
11262
10814
  VmDevtoolsContent,
11263
10815
  {
11264
10816
  className: css.vmPopup,
11265
- "data-position": `${model.payload.position}`,
11266
- headerContent: /* @__PURE__ */ jsx("button", { onClick: model.handleToggleOpen, children: /* @__PURE__ */ jsx(
10817
+ "data-position": `${model.devtools.config.position}`,
10818
+ headerContent: /* @__PURE__ */ jsx("button", { onClick: model.devtools.handleToggleOpen, children: /* @__PURE__ */ jsx(
11267
10819
  "svg",
11268
10820
  {
11269
10821
  xmlns: "http://www.w3.org/2000/svg",
@@ -11283,50 +10835,261 @@ const VmDevtoolsPopup = observer(() => {
11283
10835
  }
11284
10836
  );
11285
10837
  });
11286
- const DevtoolsClientView = observer(({ model }) => {
11287
- return /* @__PURE__ */ jsx(ViewModelsProvider, { value: model.vmStore, children: /* @__PURE__ */ jsxs(ActiveViewModelProvider, { value: model, children: [
10838
+ const DevtoolsClient = withViewModel(DevtoolsClientVM, ({ model }) => {
10839
+ return /* @__PURE__ */ jsx(ViewModelsProvider, { value: model.devtools.vmStore, children: /* @__PURE__ */ jsxs(ActiveViewModelProvider, { value: model, children: [
11288
10840
  /* @__PURE__ */ jsx(VmDevtoolsButton, {}),
11289
- model.isOpened && model.displayType === "popup" && /* @__PURE__ */ jsx(VmDevtoolsPopup, {})
10841
+ model.devtools.isOpened && model.devtools.displayType === "popup" && /* @__PURE__ */ jsx(VmDevtoolsPopup, {})
11290
10842
  ] }) });
11291
10843
  });
11292
- const renderDevtools = (container2, model) => {
11293
- const root2 = clientExports.createRoot(container2);
11294
- root2.render(
11295
- /* @__PURE__ */ jsx(DevtoolsClientView, { model })
11296
- );
10844
+ class LinkedAbortController extends AbortController {
10845
+ constructor(...abortSignals) {
10846
+ super();
10847
+ this.link(...abortSignals);
10848
+ }
10849
+ link(...abortSignals) {
10850
+ abortSignals.forEach((abortSignal) => {
10851
+ abortSignal?.addEventListener("abort", () => {
10852
+ this.abort(abortSignal.reason);
10853
+ });
10854
+ });
10855
+ }
10856
+ }
10857
+ const callFunction = (fn, ...args) => {
10858
+ if (typeof fn === "function") {
10859
+ return fn(...args);
10860
+ }
10861
+ return fn;
11297
10862
  };
11298
- class DevtoolsVM extends (_a2 = DevtoolsVMImpl, _searchCache_dec = [computed], _a2) {
11299
- constructor(vmParams) {
11300
- super({
11301
- ...vmParams,
11302
- vmConfig: {
11303
- observable: {
11304
- viewModels: {
11305
- useDecorators: false
10863
+ let KeyboardHandler$1 = class KeyboardHandler {
10864
+ constructor(config) {
10865
+ this.config = config;
10866
+ this.abortController = new LinkedAbortController(config.abortSignal);
10867
+ this.activateStrategy = this.config.activateStrategy ?? {
10868
+ type: "immidiately"
10869
+ };
10870
+ this.isActivated = !!(this.activateStrategy.type === "immidiately");
10871
+ observable.ref(this, "isActivated");
10872
+ computed.struct(this, "actions");
10873
+ action.bound(this, "handleKeyboardClick");
10874
+ makeObservable(this);
10875
+ if (this.activateStrategy.type === "element-focus") {
10876
+ const ref = this.activateStrategy.ref;
10877
+ let nodeAbortController = new LinkedAbortController();
10878
+ reaction(
10879
+ () => ref.current,
10880
+ (node) => {
10881
+ if (node) {
10882
+ if (globalThis.document?.activeElement === node) {
10883
+ this.activate();
10884
+ }
10885
+ node.addEventListener("focus", this.activate, {
10886
+ signal: nodeAbortController.signal
10887
+ });
10888
+ node.addEventListener("blur", this.deactivate, {
10889
+ signal: nodeAbortController.signal
10890
+ });
10891
+ } else {
10892
+ nodeAbortController.abort();
10893
+ nodeAbortController = new LinkedAbortController(
10894
+ this.abortController.signal
10895
+ );
11306
10896
  }
10897
+ },
10898
+ { fireImmediately: true, signal: this.abortController.signal }
10899
+ );
10900
+ }
10901
+ globalThis.addEventListener("keydown", this.handleKeyboardClick, {
10902
+ signal: this.abortController.signal
10903
+ });
10904
+ if (config.activateStrategy?.type === "keyclick") {
10905
+ globalThis.addEventListener("click", this.activate, {
10906
+ signal: this.abortController.signal
10907
+ });
10908
+ globalThis.addEventListener("mousemove", this.activate, {
10909
+ signal: this.abortController.signal
10910
+ });
10911
+ }
10912
+ }
10913
+ abortController;
10914
+ activateStrategy;
10915
+ /**
10916
+ * Is user using keyboard input
10917
+ */
10918
+ isActivated;
10919
+ /**
10920
+ * User actions
10921
+ */
10922
+ get actions() {
10923
+ return callFunction(this.config.actions) ?? [];
10924
+ }
10925
+ activate = () => {
10926
+ if (this.isActivated) {
10927
+ return;
10928
+ }
10929
+ this.isActivated = true;
10930
+ this.config.onActivate?.();
10931
+ };
10932
+ deactivate = () => {
10933
+ if (!this.isActivated) {
10934
+ return;
10935
+ }
10936
+ this.isActivated = false;
10937
+ this.config.onDeactivate?.();
10938
+ };
10939
+ handleKeyboardClick(event) {
10940
+ this.config.onKeyClick?.(event);
10941
+ if (this.activateStrategy.type === "keyclick") {
10942
+ this.activate();
10943
+ }
10944
+ if (!this.isActivated) {
10945
+ return;
10946
+ }
10947
+ for (const action2 of this.actions) {
10948
+ const disabled2 = callFunction(action2.disabled);
10949
+ if (disabled2) {
10950
+ continue;
10951
+ }
10952
+ for (const shortcut of action2.shortcuts) {
10953
+ const combinatedShortcuts = shortcut.split("+");
10954
+ if (combinatedShortcuts.every(
10955
+ (shortcut2) => this.checkShortcut(event, shortcut2)
10956
+ )) {
10957
+ runInAction(() => {
10958
+ action2.action(event);
10959
+ });
10960
+ return;
11307
10961
  }
11308
10962
  }
10963
+ }
10964
+ }
10965
+ checkShortcut(event, shortcut) {
10966
+ if (shortcut === "Shift" && event.shiftKey) return true;
10967
+ if (shortcut === "Ctrl" && event.ctrlKey) return true;
10968
+ if (shortcut === "Alt" && event.altKey) return true;
10969
+ return shortcut === event.key;
10970
+ }
10971
+ destroy() {
10972
+ this.abortController.abort();
10973
+ }
10974
+ };
10975
+ class KeyboardHandler2 extends KeyboardHandler$1 {
10976
+ constructor(devtools) {
10977
+ super({
10978
+ actions: [
10979
+ {
10980
+ shortcuts: ["Ctrl+Shift+F12"],
10981
+ action: () => {
10982
+ devtools.handleToggleOpen();
10983
+ }
10984
+ },
10985
+ {
10986
+ shortcuts: ["Ctrl+ArrowLeft"],
10987
+ action: () => {
10988
+ devtools.isAllVmsExpandedByDefault = false;
10989
+ }
10990
+ },
10991
+ {
10992
+ shortcuts: ["Ctrl+ArrowRight"],
10993
+ action: () => {
10994
+ devtools.isAllVmsExpandedByDefault = true;
10995
+ }
10996
+ },
10997
+ {
10998
+ shortcuts: ["Ctrl+ArrowDown"],
10999
+ action: () => {
11000
+ requestAnimationFrame(() => {
11001
+ devtools.containerRef.current.scrollTop += 200;
11002
+ });
11003
+ }
11004
+ },
11005
+ {
11006
+ shortcuts: ["Ctrl+ArrowUp"],
11007
+ action: () => {
11008
+ requestAnimationFrame(() => {
11009
+ devtools.containerRef.current.scrollTop -= 200;
11010
+ });
11011
+ }
11012
+ }
11013
+ ]
11309
11014
  });
11015
+ }
11016
+ }
11017
+ const checkPath = (obj, path) => {
11018
+ const parts = path.split(".");
11019
+ let current = obj;
11020
+ for (const part of parts) {
11021
+ if (part in current) {
11022
+ current = current[part];
11023
+ } else {
11024
+ return false;
11025
+ }
11026
+ }
11027
+ return true;
11028
+ };
11029
+ const createFocusableRef = () => {
11030
+ const ref = createRef({
11031
+ meta: {
11032
+ focused: false
11033
+ },
11034
+ onSet: (input) => {
11035
+ if (document.activeElement === input) {
11036
+ runInAction(() => {
11037
+ ref.meta.focused = true;
11038
+ });
11039
+ }
11040
+ input.addEventListener(
11041
+ "focus",
11042
+ action(() => {
11043
+ ref.meta.focused = true;
11044
+ })
11045
+ );
11046
+ input.addEventListener(
11047
+ "blur",
11048
+ action(() => {
11049
+ ref.meta.focused = false;
11050
+ })
11051
+ );
11052
+ }
11053
+ });
11054
+ return ref;
11055
+ };
11056
+ _searchCache_dec = [computed];
11057
+ const _ViewModelDevtools = class _ViewModelDevtools {
11058
+ constructor(config) {
11310
11059
  __runInitializers(_init, 5, this);
11311
- __publicField(this, "isOpened", !!this.payload.defaultIsOpened);
11312
- __publicField(this, "displayType", "popup");
11313
- __publicField(this, "vmStore", new ViewModelStoreBase());
11314
- __publicField(this, "projectVmStore", this.payload.viewModels);
11315
- __publicField(this, "handleToggleOpen", () => {
11316
- this.isOpened = !this.isOpened;
11317
- });
11318
- __publicField(this, "expandedVmsSet", observable.set());
11319
- __publicField(this, "isAllVmsExpandedByDefault", true);
11320
- __publicField(this, "expandedVmItemsPaths", observable.set());
11321
- __publicField(this, "logoUrl", "https://js2me.github.io/mobx-view-model/logo.png");
11322
- __publicField(this, "inputRef", createFocusableRef());
11323
- __publicField(this, "containerRef", createFocusableRef());
11324
- __publicField(this, "buttonRef", createRef());
11325
- __publicField(this, "keyboardHandler", new KeyHanders(this));
11326
- __publicField(this, "search", "");
11060
+ __publicField(this, "isOpened");
11061
+ __publicField(this, "displayType");
11062
+ __publicField(this, "vmStore");
11063
+ __publicField(this, "projectVmStore");
11064
+ __publicField(this, "isAllVmsExpandedByDefault");
11065
+ __publicField(this, "expandedVmItemsPaths");
11066
+ __publicField(this, "logoUrl");
11067
+ __publicField(this, "inputRef");
11068
+ __publicField(this, "containerRef");
11069
+ __publicField(this, "buttonRef");
11070
+ __publicField(this, "keyboardHandler");
11071
+ __publicField(this, "search");
11072
+ __publicField(this, "expandedVmsSet");
11327
11073
  __publicField(this, "handleSearchChange", (e) => {
11328
11074
  this.search = e.target.value;
11329
11075
  });
11076
+ __publicField(this, "handleToggleOpen", () => {
11077
+ this.isOpened = !this.isOpened;
11078
+ });
11079
+ this.config = config;
11080
+ this.isOpened = !!this.config.defaultIsOpened;
11081
+ this.search = "";
11082
+ this.displayType = "popup";
11083
+ this.vmStore = new ViewModelStoreBase();
11084
+ this.projectVmStore = this.config.viewModels;
11085
+ this.expandedVmsSet = observable.set();
11086
+ this.isAllVmsExpandedByDefault = true;
11087
+ this.expandedVmItemsPaths = observable.set();
11088
+ this.logoUrl = "https://js2me.github.io/mobx-view-model/logo.png";
11089
+ this.inputRef = createFocusableRef();
11090
+ this.containerRef = createFocusableRef();
11091
+ this.buttonRef = createRef();
11092
+ this.keyboardHandler = new KeyboardHandler2(this);
11330
11093
  makeObservable(this, {
11331
11094
  isOpened: observable.ref,
11332
11095
  isAllVmsExpandedByDefault: observable,
@@ -11340,24 +11103,7 @@ class DevtoolsVM extends (_a2 = DevtoolsVMImpl, _searchCache_dec = [computed], _
11340
11103
  rootVms: computed.struct,
11341
11104
  handleSearchChange: action
11342
11105
  });
11343
- const debouncedFocusOnFittedElement = debounce(([search]) => {
11344
- if (search) {
11345
- document.querySelector('[data-fitted="true"]')?.scrollIntoView({
11346
- behavior: "smooth",
11347
- block: "center",
11348
- inline: "center"
11349
- });
11350
- }
11351
- }, 140);
11352
- reaction(
11353
- () => [
11354
- this.formattedSearch,
11355
- this.allVms,
11356
- this.isAllVmsExpandedByDefault
11357
- ],
11358
- debouncedFocusOnFittedElement,
11359
- { signal: this.unmountSignal }
11360
- );
11106
+ this.render();
11361
11107
  }
11362
11108
  get vmMap() {
11363
11109
  return this.getViewModelsMap();
@@ -11528,22 +11274,62 @@ class DevtoolsVM extends (_a2 = DevtoolsVMImpl, _searchCache_dec = [computed], _
11528
11274
  return null;
11529
11275
  }
11530
11276
  getViewModelsMap() {
11531
- const vmStore = this.payload.viewModels ?? this.projectVmStore;
11277
+ const vmStore = this.config.viewModels ?? this.projectVmStore;
11532
11278
  return vmStore?.viewModels ?? /* @__PURE__ */ new Map();
11533
11279
  }
11534
- willMount() {
11535
- this.vmStore.attach(this);
11536
- const container2 = document.createElement("div");
11537
- document.body.appendChild(container2);
11538
- renderDevtools(container2, this);
11280
+ render() {
11281
+ const containerId = this.config.containerId ?? "view-model-devtools";
11282
+ let existedContainer = document.querySelector(
11283
+ `#${containerId}`
11284
+ );
11285
+ if (!existedContainer) {
11286
+ existedContainer = document.createElement("div");
11287
+ existedContainer.style = "display: contents;";
11288
+ existedContainer.id = containerId;
11289
+ document.body.appendChild(existedContainer);
11290
+ }
11291
+ const root = clientExports.createRoot(existedContainer);
11292
+ root.render(createElement(DevtoolsClient, { payload: { devtools: this } }));
11293
+ }
11294
+ static connect(config) {
11295
+ new _ViewModelDevtools(config);
11296
+ }
11297
+ };
11298
+ _init = __decoratorStart(null);
11299
+ __decorateElement(_init, 2, "searchCache", _searchCache_dec, _ViewModelDevtools);
11300
+ __decoratorMetadata(_init, _ViewModelDevtools);
11301
+ let ViewModelDevtools = _ViewModelDevtools;
11302
+ class VmTreeItemRenderVM extends DevtoolsVMImpl {
11303
+ devtools = this.payload.devtools;
11304
+ constructor(vmParams) {
11305
+ super({
11306
+ ...vmParams,
11307
+ vmConfig: {
11308
+ observable: {
11309
+ viewModels: {
11310
+ useDecorators: false
11311
+ },
11312
+ viewModelStores: {
11313
+ useDecorators: false
11314
+ }
11315
+ }
11316
+ }
11317
+ });
11318
+ makeObservable(this, {
11319
+ handleExpandPropertyClick: action,
11320
+ handleVmItemHeaderClick: action
11321
+ });
11322
+ }
11323
+ isPathExpanded(path) {
11324
+ return this.devtools.checkIsPathExpanded(this.payload.vmItem, path);
11325
+ }
11326
+ handleExpandPropertyClick(path) {
11327
+ this.devtools.handleExpandPropertyClick(this.payload.vmItem, path);
11328
+ }
11329
+ handleVmItemHeaderClick(vmItem) {
11330
+ this.devtools.handleVmItemHeaderClick(vmItem);
11539
11331
  }
11540
11332
  }
11541
- _init = __decoratorStart(_a2);
11542
- __decorateElement(_init, 2, "searchCache", _searchCache_dec, DevtoolsVM);
11543
- __decoratorMetadata(_init, DevtoolsVM);
11544
- const ViewModelDevTools = withViewModel(DevtoolsVM, ({ model }) => {
11545
- return null;
11546
- });
11547
11333
  export {
11548
- ViewModelDevTools
11334
+ ViewModelDevtools
11549
11335
  };