effector-inspector
Advanced tools
Comparing version 0.10.1 to 0.10.2
@@ -6,3 +6,3 @@ export declare function createSetting(name: string, defaultValue: string): { | ||
}; | ||
export declare function createJsonSetting<T>(name: string, defaultValue: T): { | ||
export declare function createJsonSetting<T>(name: string, defaultValue: T, storage?: Storage): { | ||
read: () => T; | ||
@@ -9,0 +9,0 @@ write: (value: T) => T; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("effector"),n=require("forest"),t=require("foliage");function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function l(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,c=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(c)throw o}}return i}(e,n)||f(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,n){if(e){if("string"==typeof e)return d(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?d(e,n):void 0}}function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function m(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=f(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(c)throw i}}}}var p,v,g,y,b,h,x,k,w,S,E,j,O,z,$,q,A,P,T,C,I,D,M,L,N,F,J,B=["title"],R=t.styled.div(p||(p=l(["\n --primary: #ff8c00;\n --primary-light: #ffb152;\n --primary-dark: #c86e00;\n --primary-text: #fff;\n\n --text: #404040;\n --border: #dadada;\n --shadow: 0 4px 20px 4px rgba(0, 0, 0, 0.1);\n\n --scrollbar: var(--primary-light);\n\n --tabs-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);\n\n --tab-bg: #fff;\n --tab-text: #606060;\n --tab-text-active: var(--primary);\n --tab-shadow-active: var(--primary);\n\n --content-bg: #f9f9f9;\n\n --code-var: #ff8c00;\n --code-func: #249ec6;\n --code-string: #00a153;\n --code-bool: #ff62d3;\n --code-number: #7a70f3;\n --code-date: #333;\n --code-regexp: #95b70e;\n\n @media (prefers-color-scheme: dark) {\n --text: #ddd;\n --border: #111;\n --shadow: 0 4px 20px 4px rgba(0, 0, 0, 0.1);\n\n --scrollbar: var(--primary);\n\n --tabs-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n\n --tab-bg: #444;\n --tab-text: #ddd;\n --tab-text-active: var(--primary);\n --tab-shadow-active: var(--primary);\n\n --content-bg: #333;\n\n --code-var: #ff8c00;\n --code-func: #a5d4e2;\n --code-string: #2cb472;\n --code-bool: #ff62d3;\n --code-number: #9990ff;\n --code-date: #fff;\n --code-regexp: #e5ff7e;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: var(--scrollbar);\n }\n\n ::-webkit-scrollbar {\n width: 6px;\n }\n\n ::-webkit-scrollbar:horizontal {\n height: 6px;\n }\n\n position: fixed;\n top: 64px;\n right: 64px;\n bottom: 64px;\n z-index: 1000;\n\n display: flex;\n flex-direction: row;\n width: 736px;\n min-width: 400px;\n max-width: 90%;\n\n color: var(--text);\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Apple Color Emoji',\n 'Segoe UI Emoji', 'Segoe UI Symbol', 'PT Sans', Helvetica, Arial, sans-serif;\n line-height: 1.5;\n\n background-color: var(--bg);\n border-radius: 8px;\n box-shadow: var(--shadow);\n\n user-select: none;\n\n color-scheme: light dark;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n\n @media screen and (max-width: 700px) {\n max-width: 480px;\n }\n"]))),U=t.styled.div(v||(v=l(["\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 8px;\n margin-top: 48px;\n margin-bottom: 48px;\n margin-left: -10px;\n\n color: var(--primary);\n font-size: 14px;\n font-family: monospace;\n line-height: 6px;\n word-break: break-all;\n\n background-color: var(--bg);\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n cursor: col-resize;\n\n &:hover,\n &[data-active='true'] {\n color: var(--bg);\n\n background-color: var(--primary);\n }\n"]))),_=t.styled.section(g||(g=l(["\n position: relative;\n\n display: flex;\n flex-flow: column;\n width: 100%;\n\n border-radius: inherit;\n"]))),K=t.styled.div(y||(y=l(["\n position: sticky;\n top: 0;\n right: 0;\n left: 0;\n\n display: flex;\n\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n\n background-color: var(--tab-bg);\n border-bottom: 1px solid var(--border);\n border-radius: inherit;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n box-shadow: var(--tabs-shadow);\n"]))),W=t.styled.div(b||(b=l(["\n padding: 8px 16px;\n\n color: var(--tab-text);\n\n border-radius: inherit;\n border-top-right-radius: 0;\n cursor: pointer;\n\n &:hover {\n box-shadow: inset 0 -2px 0 0 var(--tab-shadow-active);\n }\n\n &:not(:first-child) {\n border-top-left-radius: 0;\n }\n\n &[data-active='true'] {\n color: var(--tab-text-active);\n\n box-shadow: inset 0 -2px 0 0 var(--tab-shadow-active);\n }\n"]))),V=t.styled.div(h||(h=l(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n overflow-y: auto;\n\n background-color: var(--content-bg);\n"]))),X=t.styled.ul(x||(x=l(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin: 0 0;\n padding: 0 0;\n overflow-x: auto;\n\n list-style-type: none;\n"]))),H=t.styled.li(k||(k=l(["\n display: flex;\n margin: 0 0;\n padding: 6px 10px;\n\n font-size: 12px;\n line-height: 1.3;\n"]))),G=t.styled.pre(w||(w=l(["\n display: flex;\n margin: 0 0;\n\n color: var(--code-var);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n"]))),Q=t.styled.pre(S||(S=l(["\n margin: 0 0;\n\n color: var(--code-func);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n"]))),Y=t.styled.button(E||(E=l(["\n margin: 0;\n margin-left: 1rem;\n padding: 0.2rem 0.4rem;\n\n color: var(--primary-text);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n\n background-color: var(--primary);\n border: var(--primary);\n border-radius: 4px;\n\n &:focus {\n outline: 0;\n box-shadow: 0 0 0 1px var(--primary-dark), 0 0 3px 0 var(--primary-dark);\n }\n\n &:hover {\n background-color: var(--primary-dark);\n }\n"]))),Z=t.styled.span(j||(j=l(["\n display: inline-block;\n\n [data-opened='true'] > & {\n display: block;\n padding-left: 8px;\n }\n\n &[data-hidden='folded'] {\n display: none;\n\n [data-opened='true'] > & {\n display: block;\n }\n }\n\n &[data-hidden='expanded'] {\n display: inline-block;\n\n [data-opened='true'] > & {\n display: none;\n }\n }\n\n &:not(:last-child)::after {\n content: ', ';\n }\n"]))),ee=t.styled.span(O||(O=l(["\n color: var(--code-bool);\n font-style: italic;\n"]))),ne=t.styled.span(z||(z=l(["\n color: var(--code-number);\n"]))),te=t.styled.span($||($=l(["\n color: var(--code-string);\n"]))),re=t.styled.span(q||(q=l(["\n color: var(--code-number);\n font-weight: bold;\n"]))),oe=t.styled.span(A||(A=l(["\n color: var(--code-date);\n"]))),ie=t.styled.span(P||(P=l(["\n /* nothing here */\n"]))),ae=t.styled.span(T||(T=l(["\n color: var(--code-regexp);\n"]))),ce=t.styled.div(C||(C=l(["\n display: flex;\n * + * {\n margin-left: 0.5rem;\n }\n"]))),le={boolean:ee,date:oe,keyword:re,number:ne,string:te,symbol:ie,regexp:ae},se=t.styled.div(I||(I=l(["\n display: flex;\n flex-shrink: 0;\n padding: 1rem;\n"]))),ue=t.styled.input(D||(D=l(["\n /* nothing here */\n"]))),fe=t.styled.label(M||(M=l(["\n display: flex;\n flex-shrink: 0;\n padding: 0 0.5rem;\n"]))),de=t.styled.input(L||(L=l(["\n display: flex;\n flex-shrink: 0;\n margin: 0 0.5rem;\n padding: 0 0.5rem;\n\n border: 1px solid var(--border);\n border-radius: 0.2rem;\n\n &:focus {\n border-color: var(--primary);\n outline: 0;\n box-shadow: 0 0 0 1px var(--primary);\n }\n"]))),me=t.styled.div(N||(N=l(["\n display: flex;\n flex-direction: column;\n"]))),pe=function(e){var t=e.title,r=c(e,B);fe((function(){ue((function(){n.spec({attr:{type:"checkbox"}}),n.spec(r)})),n.spec({text:t})}))},ve=t.styled.select(F||(F=l([""]))),ge=t.styled.input(J||(J=l(["\n display: flex;\n flex-shrink: 0;\n padding: 0 0.5rem;\n border: 1px solid var(--border);\n border-radius: 0.2rem;\n margin-bottom: 1rem;\n font-size: 1rem;\n line-height: 2rem;\n\n &:focus {\n border-color: var(--primary);\n outline: 0;\n box-shadow: 0 0 0 2px var(--primary);\n }\n"]))),ye=String.fromCharCode(parseInt("25B6",16)),be=String.fromCharCode(parseInt("25A0",16));function he(e){Y(o({text:"".concat(ye," Run")},e))}function xe(e){Y(o({text:"".concat(be," Pause")},e))}var ke=Math.pow(983020,2).toString(36);function we(e,n){var t;return null!==(t=localStorage.getItem("".concat(ke,"-").concat(e)))&&void 0!==t?t:n}function Se(e,n){return localStorage.setItem("".concat(ke,"-").concat(e),n),n}function Ee(n,t){var r=e.createEvent({loc:{file:"/src/setting.ts",line:11,column:17},name:"save",sid:"wnm0lw"});return r.watch((function(e){return Se(n,e)})),{read:function(){return we(n,t)},write:function(e){return Se(n,e)},save:r}}function je(n,t){var r=e.createEvent({loc:{file:"/src/setting.ts",line:20,column:17},name:"save",sid:"-o65dje"});return r.watch((function(e){return Se(n,JSON.stringify(e))})),{read:function(){return JSON.parse(we(n,JSON.stringify(t)))},write:function(e){return Se(n,JSON.stringify(e)),e},save:r}}function Oe(n){var t=Object.keys(n),r=t[0],o=Ee("last-tab",r),i=o.read(),a=t.includes(i)?i:r,c=e.createEvent({loc:{file:"/src/tabs.ts",line:10,column:22},name:"changeTab",sid:"-z2hzvl"}),l=e.createStore(a,{loc:{file:"/src/tabs.ts",line:11,column:17},name:"$tab",sid:"16xfb8"});l.on(c,(function(e,n){return n})),l.watch(o.write),_((function(){K((function(){var e,r=m(t);try{var o=function(){var t=e.value,r=n[t];W({text:r.title,data:{active:l.map((function(e){return e===t}))},handler:{click:c.prepend((function(){return t}))}})};for(r.s();!(e=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}));var e,r=m(t);try{var o=function(){var t=e.value,r=n[t];V({visible:l.map((function(e){return e===t})),fn:function(){r.fn({changeTab:c})}})};for(r.s();!(e=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}))}var ze="/node_modules/effector-storage/index.js",$e=new Map,qe=e.createEvent({loc:{file:ze,line:1,column:181},name:"d",sid:"-l8h06b"});qe.watch((function(e){return console.error(e.error)}));var Ae=function(n){return function(t){return function(n){var t=n.adapter,r=n.store,o=n.source,i=void 0===o?r:o,a=n.target,c=void 0===a?r:a,l=n.clock,u=void 0===l?i:l,f=n.done,d=n.fail,m=void 0===d?qe:d,p=n.finally,v=n.pickup,g=n.key,y=n.keyPrefix,b=void 0===y?"":y;if(!t)throw Error("Adapter is not defined");if(!i)throw Error("Store or source is not defined");if(!c)throw Error("Target is not defined");if(!g&&i.shortName===i.id)throw Error("Key or name is not defined");if(i===c&&!e.is.store(i,{loc:{file:ze,line:1,column:545},sid:"lf665x"}))throw Error("Source must be different from target");var h=g||i.shortName,x=function(n,t){var r=$e.get(n);void 0===r&&(r=new Map,$e.set(n,r));var o=r.get(t);return void 0!==o||(o=e.createStore(null,{and:{serialize:"ignore"},loc:{file:ze,line:1,column:732},name:"a",sid:"-9aqg30"}),r.set(t,o)),o}(t.keyArea||t,b+h),k=e.createNode(),w=function(){return e.clearNode(k)},S=function(e){return function(n){var t=n.status,r=n.params,o=n.result,i=n.error;return"done"===t?{status:t,key:h,keyPrefix:b,operation:e,value:"get"===e?o:r}:{status:t,key:h,keyPrefix:b,operation:e,value:r,error:i}}};return e.withRegion(k,(function(){var n=e.createEffect({loc:{file:ze,line:1,column:1008},name:"e",sid:"-a3ln7"}),r=e.createEffect({loc:{file:ze,line:1,column:1014},name:"o",sid:"-pypock"}),o=e.createEvent({loc:{file:ze,line:1,column:1020},name:"t",sid:"-3agoe2"}),a=o.filterMap((function(e){var n=e.status,t=e.key,r=e.keyPrefix,o=e.operation,i=e.value;return"done"===n?{key:t,keyPrefix:r,operation:o,value:i}:void 0})),l=o.filterMap((function(e){var n=e.status,t=e.key,r=e.keyPrefix,o=e.operation,i=e.error,a=e.value;return"fail"===n?{key:t,keyPrefix:r,operation:o,error:i,value:a}:void 0})),d=t(b+h,n);n.use(d.get),r.use(d.set);var g=e.createEvent({loc:{file:ze,line:1,column:1337},name:"d",sid:"-j0ptxv"});e.sample({and:[{source:i,clock:u,target:g}],or:{loc:{file:ze,line:1,column:1341},sid:"oq2y8g"}}),e.guard({and:[{source:e.sample({and:[x,g,function(e,n){return[n,e]}],or:{loc:{file:ze,line:1,column:1382},name:"source",sid:"y9wem"}}),filter:function(e){var n=s(e,2);return n[0]!==n[1]},target:r.prepend((function(e){return s(e,1)[0]}))}],or:{loc:{file:ze,line:1,column:1372},sid:"oq30he"}}),e.forward({and:{from:[n.doneData,r],to:x},or:{loc:{file:ze,line:1,column:1457},sid:"oq3m3u"}}),e.forward({and:{from:[n.doneData,x],to:c},or:{loc:{file:ze,line:1,column:1487},sid:"oq3obx"}}),e.forward({and:{from:[n.finally.map(S("get")),r.finally.map(S("set"))],to:o},or:{loc:{file:ze,line:1,column:1517},sid:"oq464l"}}),e.forward({and:{from:l,to:m},or:{loc:{file:ze,line:1,column:1582},sid:"oq4b75"}}),f&&e.forward({and:{from:a,to:f},or:{loc:{file:ze,line:1,column:1602},sid:"oq4s94"}}),p&&e.forward({and:{from:o,to:p},or:{loc:{file:ze,line:1,column:1622},sid:"oq4tqi"}}),v?e.forward({and:{from:v,to:n.prepend((function(){}))},or:{loc:{file:ze,line:1,column:1641},sid:"oq4v71"}}):n()})),w.unsubscribe=w}(o(o({},n),t))}}();function Pe(e){var n=function(){return{get:function(){},set:function(){}}};return n.keyArea=e,n}var Te="/node_modules/effector-storage/storage/index.js";function Ce(e){var n=e.storage,t=e.sync,r=void 0!==t&&t,o=e.serialize,i=void 0===o?JSON.stringify:o,a=e.deserialize,c=void 0===a?JSON.parse:a,l=function(e,t){return r&&"undefined"!=typeof addEventListener&&addEventListener("storage",(function(r){r.storageArea===n&&(r.key===e&&t(r.newValue,{loc:{file:Te,line:1,column:204},sid:"isnoip"}),null===r.key&&t(null,{loc:{file:Te,line:1,column:232},sid:"isnqp2"}))})),{get:function(t){var r=void 0!==t?t:n.getItem(e);return void 0===t&&null===r?void 0:c({and:[r],or:{loc:{file:Te,line:1,column:319},sid:"isocd8"}})},set:function(t){n.setItem(e,i(t,{loc:{file:Te,line:1,column:344},sid:"isoeh0"}))}}};return l.keyArea=n,l}function Ie(){try{return"undefined"!=typeof sessionStorage}catch(e){return!1}}var De=function(e){return function(n){return Ae(o(o({adapter:Ie()?Ce(o(o({storage:sessionStorage},e),n)):Pe("session")},e),n))}}(),Me=e.createEvent({loc:{file:"/src/tabs/log/model.ts",line:3,column:12},name:"log",sid:"jqruuq"}),Le=e.createEvent({loc:{file:"/src/tabs/log/model.ts",line:4,column:34},name:"isLogEnabledToggle",sid:"-d0xx9i"}),Ne=e.createEvent({loc:{file:"/src/tabs/log/model.ts",line:5,column:26},name:"logCleared",sid:"-flspef"}),Fe=e.createStore([],{and:{serialize:"ignore"},loc:{file:"/src/tabs/log/model.ts",line:6,column:21},name:"$logs",sid:"eafapu"}),Je=e.createStore(!1,{loc:{file:"/src/tabs/log/model.ts",line:7,column:29},name:"$isLogEnabled",sid:"39jaqp"}),Be=1e3,Re=e.createEffect({handler:function(e){var n=e.name,t=e.kind,r=e.payload;return{id:(++Be).toString(36),kind:t,name:n,payload:r,datetime:new Date}}},{loc:{file:"/src/tabs/log/model.ts",line:10,column:33},name:"createLogRecordFx",sid:"-kcm9v0"});Je.on(Le,(function(e){return!e})),Fe.on(Me,(function(e,n){return[n].concat(u(e))})).reset(Ne),e.guard({and:[{clock:Re.doneData,filter:Je,target:Me}],or:{loc:{file:"/src/tabs/log/model.ts",line:25,column:0},sid:"91qyh1"}}),De({store:Je});var Ue=/\[object ([\w\s]+)\]/;function _e(e){var n=Object.prototype.toString.call(e),t=Ue.exec(n);return t?t[1]:"unknown"}function Ke(t){var r=n.rec((function(t){var o=t.store,i=s(n.remap(o,["value","parentOpened"]),2),a=i[0],c=i[1],l=e.createEvent({loc:{file:"/src/object-view.ts",line:13,column:32},name:"foldableClicked",sid:"-stmnmb"}),f=e.createStore(!1,{and:{serialize:"ignore"},loc:{file:"/src/object-view.ts",line:14,column:29},name:"$localOpened",sid:"-lmwtnk"});f.on(l,(function(e){return!e}));var d=e.combine({and:[c,f,function(e,n){return!0===e&&n}],or:{loc:{file:"/src/object-view.ts",line:16,column:24},name:"$opened",sid:"7e1sme"}});n.variant({source:e.combine({and:[a,d,function(e,n){return{type:_e(e),value:e,opened:n}}],or:{loc:{file:"/src/object-view.ts",line:18,column:20},name:"source",sid:"-22s5pi"}}),key:"type",cases:{String:function(e){var t=e.store;return le.string({text:['"',n.remap(t,"value"),'"']})},Number:function(e){var t=e.store;return le.number({text:n.remap(t,"value")})},BigInt:function(e){var t=e.store;return le.number({text:[n.remap(t,"value"),"n"],attr:{title:"BigInt"}})},Boolean:function(e){var t=e.store;return le.boolean({text:n.remap(t,"value")})},Null:function(){return le.keyword({text:"null"})},Undefined:function(){return le.keyword({text:"undefined"})},Symbol:function(e){var t=e.store;return le.symbol({text:n.remap(t,"value")})},RegExp:function(e){var t=e.store,r=n.remap(t,"value"),o=s(n.remap(r,["source","flags"]),2),i=o[0],a=o[1];le.regexp({text:["/",i,"/",a]})},Function:function(e){var t=e.store,r=n.remap(t,"value"),o={title:r.map((function(e){return e.toString()}))};n.h("span",{text:"function",attr:o}),le.keyword({text:r.map((function(e){return e.name?" ".concat(e.name):""})),attr:o}),n.h("span",{text:"()",attr:o})},AsyncFunction:function(e){var t=e.store,r=n.remap(t,"value"),o={title:r.map((function(e){return e.toString()}))};n.h("span",{text:"async function",attr:o}),le.keyword({text:r.map((function(e){return e.name?" ".concat(e.name):""})),attr:o}),n.h("span",{text:"()",attr:o})},Window:function(e){var t=e.store,r=n.remap(t,"opened");n.h("span",(function(){n.spec({data:{opened:r}}),n.h("span",{text:"Window {...",fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.spec({text:"}"})}))},Date:function(){le.date({text:a.map((function(e){var n;return null===(n=e.toISOString)||void 0===n?void 0:n.call(e)})),attr:{title:a}})},Array:function(t){var o=t.store,i=s(n.remap(o,["value","opened"]),2),a=i[0],c=i[1];n.h("span",(function(){n.spec({data:{opened:c}}),n.h("span",{text:"Array [",data:{clickable:!0},fn:function(){n.handler({passive:!0,stop:!0,capture:!0,prevent:!0},{click:l})}}),n.list(a,(function(n){var t=n.store,o=n.key;return Z((function(){return r({store:e.combine({and:[{value:t,parentOpened:c,key:o.map(String)}],or:{loc:{file:"/src/object-view.ts",line:92,column:35},name:"store",sid:"xsx70e"}})})}))})),n.spec({text:"]"})}))},Arguments:function(t){var o=t.store,i=s(n.remap(o,["value","opened"]),2),a=i[0],c=i[1];n.h("span",(function(){n.spec({data:{opened:c}}),n.h("span",{text:"Arguments [",fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.list(a.map((function(e){return u(e)})),(function(n){var t=n.store,o=n.key;return Z((function(){return r({store:e.combine({and:[{value:t,parentOpened:c,key:o.map(String)}],or:{loc:{file:"/src/object-view.ts",line:112,column:35},name:"store",sid:"obhf9h"}})})}))})),n.spec({text:"]"})}))},Set:function(t){var o=t.store,i=s(n.remap(o,["value","opened"]),2),a=i[0],c=i[1];n.h("span",(function(){n.spec({data:{opened:c}}),n.h("span",{text:"Set [",fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.list(a.map((function(e){return u(e.values())})),(function(n){var t=n.store,o=n.key;return Z((function(){return r({store:e.combine({and:[{value:t,parentOpened:c,key:o.map(String)}],or:{loc:{file:"/src/object-view.ts",line:132,column:35},name:"store",sid:"-hcu29l"}})})}))})),n.spec({text:"]"})}))},Map:function(t){var o=t.store,i=s(n.remap(o,["value","opened"]),2),a=i[0],c=i[1];n.h("span",(function(){n.spec({data:{opened:c}}),n.h("span",(function(){n.spec({text:"Map {"}),n.handler({passive:!0,stop:!0,capture:!0},{click:l})})),n.list(a.map((function(e){return u(e.entries())})),(function(t){var o=t.store,i=s(n.remap(o,["0","1"]),2),a=i[0],u=i[1];Z((function(){le.string({text:['"',a,'"'],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.h("span",{text:" => "}),r({store:e.combine({and:[{value:u,parentOpened:c,key:a}],or:{loc:{file:"/src/object-view.ts",line:160,column:43},name:"store",sid:"pq9kb3"}})})}))})),n.spec({text:"}"})}))},Error:function(t){var o=t.store,i=s(n.remap(o,["value","opened"]),2),a=i[0],c=i[1],f=s(n.remap(a,["name","message"]),2),d=f[0],m=f[1],p=a.map((function(e){var n;return null!==(n=e.stack)&&void 0!==n?n:null}));n.h("span",(function(){n.spec({data:{opened:c}}),n.h("span",{text:[d," {"],attr:{title:a.map((function(e){return e.constructor.name}))},fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),Z((function(){n.spec({data:{hidden:"expanded"}}),le.string({text:['"message"'],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.h("span",{text:": "}),r({store:e.combine({and:[{value:m,parentOpened:c,key:"message"}],or:{loc:{file:"/src/object-view.ts",line:194,column:39},name:"store",sid:"mitzb"}})})})),Z((function(){n.spec({data:{hidden:"folded"}}),le.string({text:['"stack"'],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.h("span",{text:": "});var t=e.combine({and:[{value:p,parentOpened:c,key:"stack"}],or:{loc:{file:"/src/object-view.ts",line:210,column:42},name:"store",sid:"-iu3drq"}});r({store:t})})),n.list(a.map((function(e){return u(Object.entries(e))})),(function(t){var o=t.store,i=s(n.remap(o,["0","1"]),2),a=i[0],u=i[1];Z((function(){le.string({text:['"',a,'"'],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.h("span",{text:": "}),r({store:e.combine({and:[{value:u,parentOpened:c,key:a}],or:{loc:{file:"/src/object-view.ts",line:228,column:43},name:"store",sid:"-dc4da"}})})}))}))})),n.h("span",{text:"}"})},__:function(t){var o=t.store;n.h("span",(function(){var t=s(n.remap(o,["type","value","opened"]),3),i=t[0],a=t[1],c=t[2];n.spec({data:{opened:c}}),n.h("span",{text:[i," {"],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.list(a.map((function(e){return u(Object.entries(e))})),(function(t){var o=t.store,i=s(n.remap(o,["0","1"]),2),a=i[0],u=i[1];Z((function(){le.string({text:['"',a,'"'],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.h("span",{text:": "}),r({store:e.combine({and:[{value:u,parentOpened:c,key:a}],or:{loc:{file:"/src/object-view.ts",line:261,column:43},name:"store",sid:"-g06e7n"}})})}))}))})),n.h("span",{text:"}"})}}})})),o=t.value,i=e.combine({and:[{value:o,parentOpened:e.createStore(!0,{and:{serialize:"ignore"},loc:{file:"/src/object-view.ts",line:278,column:22},name:"parentOpened",sid:"-2ezew8"}),key:""},function(e){return e}],or:{loc:{file:"/src/object-view.ts",line:276,column:18},name:"store",sid:"11fxvl"}});r({store:i})}function We(e,n){return n.trimDomain?e.map((function(e){return e.replace("".concat(n.trimDomain,"/"),"")})):e}var Ve=je("filter-kinds",["event","store"]),Xe=Ee("filter-text","");function He(t){var r=e.createEvent({loc:{file:"/src/tabs/log/view.ts",line:12,column:23},name:"toggleKind",sid:"-baa876"}),o=e.createEvent({loc:{file:"/src/tabs/log/view.ts",line:13,column:26},name:"filterChanged",sid:"hjd1t2"}),i=e.createStore(Ve.read(),{and:{serialize:"ignore"},loc:{file:"/src/tabs/log/view.ts",line:14,column:19},name:"$kinds",sid:"-bkze8u"}),a=e.createStore(Xe.read(),{and:{serialize:"ignore"},loc:{file:"/src/tabs/log/view.ts",line:15,column:24},name:"$filterText",sid:"yurk6x"});a.on(o,(function(e,n){return n})),i.on(r,(function(e,n){return e.includes(n)?e.filter((function(e){return e!==n})):[].concat(u(e),[n])})).watch(Ve.write),a.watch(Xe.write),se((function(){n.h("span",{text:"Show: "}),pe({title:"Event",attr:{checked:i.map((function(e){return e.includes("event")}))},handler:{click:r.prepend((function(){return"event"}))}}),pe({title:"Store",attr:{checked:i.map((function(e){return e.includes("store")}))},handler:{click:r.prepend((function(){return"store"}))}}),pe({title:"Effect",attr:{checked:i.map((function(e){return e.includes("effect")}))},handler:{click:r.prepend((function(){return"effect"}))}}),n.h("span",{text:"Filter:"}),de({attr:{value:a},handler:{change:o.prepend((function(e){var n,t;return null!==(n=null===(t=e.currentTarget)||void 0===t?void 0:t.value)&&void 0!==n?n:""}))}}),Y({text:"Clear",handler:{click:Ne},attr:{title:"Press CTRL+L to clear logs"}}),he({visible:Je.map((function(e){return!e})),handler:{click:Le}}),xe({visible:Je,handler:{click:Le}})})),X((function(){n.list({source:Fe,key:"id",fields:["kind","name","payload","datetime"],fn:function(n){var r=s(n.fields,4),o=r[0],c=r[1],l=r[2],u=r[3],f=We(c,t),d=e.combine({and:[o,i,function(e,n){return n.includes(e)}],or:{loc:{file:"/src/tabs/log/view.ts",line:66,column:37},name:"$kindMatched",sid:"-vo5rk8"}}),m=e.combine({and:[a,f,function(e,n){return n.includes(e)}],or:{loc:{file:"/src/tabs/log/view.ts",line:67,column:37},name:"$textMatched",sid:"-t6cd3k"}}),p=e.combine({and:[d,m,function(e,n){return e&&n}],or:{loc:{file:"/src/tabs/log/view.ts",line:68,column:33},name:"$visible",sid:"-uclvbc"}});H({visible:p,fn:function(){var e=u.map((function(e){return e.toISOString()})),n=u.map((function(e){return e.toLocaleTimeString()}));G({text:[n," ▸ "],attr:{title:e}}),G({text:o}),G({text:[" «",f,"» "]}),Q((function(){return Ke({value:l})}))}})}})}))}var Ge;function Qe(t,r){var i=t.map((function(e){return Object.entries(e).map((function(e){var n=s(e,2);return o({name:n[0]},n[1])}))})),a=e.createEvent({loc:{file:"/src/stores.ts",line:9,column:26},name:"filterChanged",sid:"-l7aet0"}),c=e.createStore("",{and:{serialize:"ignore"},loc:{file:"/src/stores.ts",line:10,column:20},name:"$filter",sid:"h9pq98"});c.on(a,(function(e,n){return n}));var l=e.combine({and:[i,c,function(e,n){return e.filter((function(e){return e.name.includes(n)}))}],or:{loc:{file:"/src/stores.ts",line:12,column:26},name:"$filteredList",sid:"dk8gld"}}),u=a.prepend((function(e){var n;return null===(n=e.currentTarget)||void 0===n?void 0:n.value}));en((function(){ge({attr:{value:c,placeholder:"Type a part of store name"},handler:{input:u}})})),X((function(){n.list({source:l,key:"name",fields:["name","value"],fn:function(e){var n=s(e.fields,2),t=n[0],o=n[1];H((function(){G({text:[We(t,r),": "]}),Q((function(){Ke({value:o})}))}))}})}))}var Ye,Ze,en=t.styled.div(Ge||(Ge=l(["\n padding: 6px;\n\n "," {\n width: 100%;\n box-sizing: border-box;\n margin: 0;\n }\n"])),ge);function nn(e,t){X((function(){var r=e.map((function(e){return Object.entries(e).map((function(e){var n=s(e,2);return o({name:n[0]},n[1])}))}));n.list({source:r,key:"name",fields:["name","history"],fn:function(e){var n=s(e.fields,2),r=n[0];n[1],H((function(){G({text:[We(r,t)," "]})}))}})}))}function tn(e,t){X((function(){var r=e.map((function(e){return Object.entries(e).map((function(e){var n=s(e,2);return o({sid:n[0]},n[1])}))}));n.list({source:r,key:"sid",fields:["name","inFlight"],fn:function(e){var r=s(e.fields,2),o=r[0],i=r[1];H((function(){G({text:[We(o,t)," "]}),Q((function(){n.h("span",(function(){n.h("span",{text:[" {"]}),Z((function(){le.string({text:'"inFlight": '}),le.number({text:i})})),n.text(Ze||(Ze=l(["}"])))}))}))}))}})}))}t.styled.div(Ye||(Ye=l(["\n display: flex;\n flex-flow: row nowrap;\n\n :nth-child(2),\n :nth-child(3),\n :nth-child(4),\n :nth-child(5) {\n opacity: 0.8;\n }\n\n > :nth-child(n + 6) {\n opacity: 0.5;\n }\n\n > :not(:first-child) {\n margin-left: 0.5rem;\n }\n"])));var rn,on,an;function cn(t){var r=t.$files.map((function(e){return Object.keys(e).sort((function(e,n){return e<n?-1:e>n?1:0}))})),o=r.map((function(e){return e.length>0})),i=e.createEvent({loc:{file:"/src/files.ts",line:17,column:25},name:"fileSelected",sid:"-jqe342"}),a=e.createEvent({loc:{file:"/src/files.ts",line:18,column:24},name:"fileCleanup",sid:"hlqci5"}),c=e.createStore("",{and:{serialize:"ignore"},loc:{file:"/src/files.ts",line:19,column:25},name:"$currentFile",sid:"8hcd8i"}),l=c.map((function(e){return""!==e})),s=l.map((function(e){return!e}));c.on(i,(function(e,n){return n})).on(a,(function(){return""})),se({style:{flexDirection:"column"},visible:o,fn:function(){ce({visible:l,fn:function(){Y({text:"◀",handler:{click:a.prepend((function(){}))}}),n.h("span",{text:"File:"}),ve({handler:{change:i.prepend((function(e){return e.currentTarget.value}))},fn:function(){n.list(r,(function(t){var r=t.store;n.h("option",{attr:{value:r,selected:e.combine({and:[r,c,function(e,n){return e===n}],or:{loc:{file:"/src/files.ts",line:48,column:50},name:"selected",sid:"6n66ec"}})},text:r})}))}})}}),me({visible:s,fn:function(){var t=e.createEvent({loc:{file:"/src/files.ts",line:60,column:42},name:"filterChanged",sid:"k3tq2y"}),o=e.createStore("",{and:{serialize:"ignore"},loc:{file:"/src/files.ts",line:61,column:36},name:"$filter",sid:"ylqhpg"});o.on(t,(function(e,n){return n}));var a=e.combine({and:[o,r,function(e,n){return n.filter((function(n){return n.includes(e)}))}],or:{loc:{file:"/src/files.ts",line:63,column:43},name:"$filteredFiles",sid:"-ejnmvu"}});ln({text:"Please, select file from the list or type the name"});var c=t.prepend((function(e){var n;return null===(n=e.currentTarget)||void 0===n?void 0:n.value}));me((function(){ge({attr:{value:o,placeholder:"Type a part of the file name"},handler:{input:c}}),sn((function(){n.list(a,(function(n){var t=n.store;n.key;var r=e.createEvent({loc:{file:"/src/files.ts",line:76,column:51},name:"selectFile",sid:"5acmi3"});e.sample({and:[{source:t,clock:r,target:i}],or:{loc:{file:"/src/files.ts",line:77,column:32},sid:"zqz7j"}}),un({text:t,attr:{tabIndex:"0"},handler:{click:r}})}))}))}))}})}}),se({visible:l,fn:function(){var n=e.combine({and:[c,t.$files,t.$events,function(e,n,t){return""!==e&&n[e]?Object.fromEntries(n[e].filter((function(e){return"event"===e.kind})).map((function(e){var n=e.name;return[n,t[n]]}))):{}}],or:{loc:{file:"/src/files.ts",line:97,column:28},name:"$events",sid:"nptwt9"}}),r=e.combine({and:[c,t.$files,t.$stores,function(e,n,t){return""!==e&&n[e]?Object.fromEntries(n[e].filter((function(e){return"store"===e.kind})).map((function(e){var n=e.name;return[n,t[n]]}))):{}}],or:{loc:{file:"/src/files.ts",line:105,column:28},name:"$stores",sid:"-qckt5e"}}),o=e.combine({and:[c,t.$files,t.$effects,function(e,n,t){return""!==e&&n[e]?Object.fromEntries(n[e].filter((function(e){return"effect"===e.kind})).map((function(e){var n=e.name;return[n,t[n]]}))):{}}],or:{loc:{file:"/src/files.ts",line:113,column:29},name:"$effects",sid:"nlyty0"}});me((function(){nn(n,t.options),Qe(r,t.options),tn(o,t.options)}))}})}var ln=t.styled.h4(rn||(rn=l(["\n margin-top: 0;\n"]))),sn=t.styled.div(on||(on=l(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin: 0 0;\n padding: 0 0;\n overflow-x: auto;\n align-items: stretch;\n\n list-style-type: none;\n\n :nth-child(2n) {\n background-color: rgba(0, 0, 0, 0.1);\n }\n"]))),un=t.styled.button(an||(an=l(["\n color: var(--text);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n font-size: 14px;\n text-align: left;\n\n border: var(--primary);\n padding: 0.2rem 0.4rem;\n\n cursor: pointer;\n\n &:hover {\n background-color: var(--primary-dark);\n }\n\n &:focus {\n outline: none;\n box-shadow: inset 0 0 0 2px var(--primary-dark);\n }\n"]))),fn="/src/tabs/trace/model.ts",dn=e.createEvent({loc:{file:fn,line:3,column:32},name:"traceStoreChange",sid:"-e6lowl"}),mn=e.createEvent({loc:{file:fn,line:4,column:33},name:"traceEventTrigger",sid:"-8emk8e"}),pn=e.createEvent({loc:{file:fn,line:5,column:30},name:"traceEffectRun",sid:"3y91aa"}),vn=e.createEvent({loc:{file:fn,line:6,column:17},name:"traceAdd",sid:"qh0u7l"}),gn=e.createEvent({loc:{file:fn,line:7,column:22},name:"traceFinished",sid:"3qtg7v"}),yn=e.createEvent({loc:{file:fn,line:8,column:28},name:"traceCleared",sid:"yonfms"}),bn=e.createStore([],{loc:{file:fn,line:9,column:23},name:"$traces",sid:"-9ncx6r"}),hn=e.createStore({time:0,traces:[]},{loc:{file:fn,line:10,column:22},name:"$currentTrace",sid:"-h2leee"}),xn=e.createStore(!1,{loc:{file:fn,line:11,column:31},name:"$isTraceEnabled",sid:"-ylkox7"}),kn=e.createEvent({loc:{file:fn,line:12,column:34},name:"traceEnableToggled",sid:"s0i57z"});xn.on(kn,(function(e){return!e})),bn.on([yn],(function(){return[]})),hn.on(vn,(function(e,n){var t=e.time,r=e.traces;return{time:t||Date.now(),traces:[].concat(u(r),[n])}})),e.guard({and:[{clock:e.merge([dn,mn,pn],{loc:{file:fn,line:20,column:11},name:"clock",sid:"n2du8p"}),filter:xn,target:vn}],or:{loc:{file:fn,line:19,column:0},sid:"-ksninr"}}),e.guard({and:[{source:hn,clock:vn,filter:function(e){return 1===e.traces.length}}],or:{loc:{file:fn,line:24,column:0},sid:"-kecv8d"}}).watch((function(){return queueMicrotask(gn)}));var wn,Sn,En,jn,On,zn,$n,qn,An,Pn,Tn=e.sample({and:[{clock:gn,source:hn}],or:{loc:{file:fn,line:29,column:18},name:"moveTrace",sid:"t9r8kv"}});function Cn(){se((function(){Y({text:"Clear",handler:{click:yn},attr:{title:"Press CTRL+L to clear logs"}}),he({visible:xn.map((function(e){return!e})),handler:{click:kn}}),xe({visible:xn,handler:{click:kn}})})),X((function(){n.list({source:bn,key:"time",fn:function(e){var t=e.store;Mn((function(){Ke({value:n.remap(t,"time").map((function(e){return new Date(e)}))})})),Dn((function(){n.list(n.remap(t,"traces"),(function(e){var t=e.store;n.variant({source:t,key:"type",cases:{event:function(e){var t=e.store;H({fn:function(){Ln((function(){n.text(wn||(wn=l(['Event "']))),n.h("span",{attr:{class:"event"},text:n.remap(t,"name")}),n.text(Sn||(Sn=l(['" triggered with '])))})),Q((function(){return Ke({value:n.remap(t,"argument")})}))}})},store:function(e){var t=e.store;H({fn:function(){Ln((function(){n.text(En||(En=l(['Store "']))),n.h("span",{attr:{class:"store"},text:n.remap(t,"name")}),n.text(jn||(jn=l(['" changed from '])))})),Q((function(){return Ke({value:n.remap(t,"before")})})),Ln((function(){return n.text(On||(On=l([" to "])))})),Q((function(){return Ke({value:n.remap(t,"current")})}))}})},effect:function(e){var t=e.store;H({fn:function(){Ln((function(){n.text(zn||(zn=l(['Effect "']))),n.h("span",{attr:{class:"effect"},text:n.remap(t,"name")}),n.text($n||($n=l(['" triggered with '])))})),Q((function(){return Ke({value:n.remap(t,"argument")})}))}})}}})}))}))}})}))}bn.on(Tn,(function(e,n){return[].concat(u(e),[n])})),hn.reset(Tn),De({store:xn});var In,Dn=t.styled.div(qn||(qn=l(["\n display: flex;\n flex-direction: column;\n padding: 0.25rem 0.5rem;\n"]))),Mn=t.styled.div(An||(An=l(["\n font-size: 0.8rem;\n margin-top: 1rem;\n margin-left: 0.5rem;\n"]))),Ln=t.styled.div(Pn||(Pn=l(["\n display: flex;\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n margin: 0 0.5rem;\n flex-shrink: 0;\n\n .event {\n color: var(--code-var);\n }\n\n .store {\n color: var(--code-string);\n }\n\n .effect {\n color: var(--code-number);\n }\n"]))),Nn=e.createStore(!1,{and:{serialize:"ignore"},loc:{file:"/src/view.ts",line:14,column:19},name:"$isVisible",sid:"m45rq1"}),Fn=e.createEvent({loc:{file:"/src/view.ts",line:15,column:22},name:"togglePressed",sid:"-49o1h2"}),Jn=e.createEvent({loc:{file:"/src/view.ts",line:16,column:21},name:"clearPressed",sid:"m6ugh"}),Bn=e.createEvent({loc:{file:"/src/view.ts",line:17,column:22},name:"showInspector",sid:"-vcvppo"});function Rn(){var t=e.createStore(!1,{and:{serialize:"ignore"},loc:{file:"/src/view.ts",line:31,column:20},name:"$inDrag",sid:"ggb9xd"}),r=e.createEvent({loc:{file:"/src/view.ts",line:32,column:22},name:"mouseDown",sid:"2cyk2w"}),o=e.createEvent({loc:{file:"/src/view.ts",line:33,column:22},name:"mouseMove",sid:"-ynkdai"}),i=e.createEvent({loc:{file:"/src/view.ts",line:34,column:20},name:"mouseUp",sid:"-nqpkkf"});return t.on(r,(function(){return!0})).on(i,(function(){return!1})),n.spec({handler:{mousedown:r}}),r.watch((function(){document&&(document.addEventListener("mousemove",o),document.addEventListener("mouseup",i))})),i.watch((function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i)})),{mouseMove:o,mouseDown:r,mouseUp:i,$inDrag:t}}function Un(){var t=e.createEvent({loc:{file:"/src/view.ts",line:50,column:19},name:"setRef",sid:"-lwzk7m"}),r=e.createStore(null,{loc:{file:"/src/view.ts",line:51,column:17},name:"$ref",sid:"-ajz2fn"});return r.on(t,(function(e,n){return n})),n.node(t),r}function _n(t,r,o,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};a.visible&&Bn(),console.info("%c[effector-inspector] %cPress %cCTRL+B %cto open Inspector","color: gray; font-size: 1rem;","color: currentColor; font-size: 1rem;","color: deepskyblue; font-family: monospace; font-size: 1rem;","color: currentColor; font-size: 1rem;"),R({visible:Nn,fn:function(){var c=Un(),s=je("width",736),u=e.createStore(s.read(),{and:{serialize:"ignore"},loc:{file:"/src/view.ts",line:67,column:27},name:"$width",sid:"fp8sd8"});n.spec({style:{width:n.val(In||(In=l(["","px"])),u)}}),U({text:"∙∙∙",fn:function(){var t=Rn(),r=t.mouseMove,o=t.mouseDown,i=t.mouseUp,a=t.$inDrag;n.spec({data:{active:a}});var l=e.createStore(0,{and:{serialize:"ignore"},loc:{file:"/src/view.ts",line:74,column:35},name:"$shift",sid:"-ff0iwx"}),f=e.sample({and:[c,o,function(e,n){return{block:e,event:n}}],or:{loc:{file:"/src/view.ts",line:75,column:38},name:"dragStart",sid:"-wl29ed"}}),d=e.sample({and:[c,r,function(e,n){return e.getBoundingClientRect().right-n.clientX}],or:{loc:{file:"/src/view.ts",line:79,column:37},name:"dragMove",sid:"xynxy7"}}),m=e.sample({and:[l,d,function(e,n){return n-e}],or:{loc:{file:"/src/view.ts",line:83,column:41},name:"correctWidth",sid:"754ock"}});u.on(m,(function(e,n){return n})),l.on(f,(function(e,n){var t=n.block,r=n.event;return t?t.getBoundingClientRect().left-r.clientX:0})),e.sample({and:[u,i,s.save],or:{loc:{file:"/src/view.ts",line:86,column:20},sid:"ryakn8"}})}}),Oe({files:{title:"Files",fn:function(){cn({$stores:t,$events:r,$effects:o,$files:i,options:a})}},stores:{title:"Stores",fn:function(){Qe(t,a)}},effects:{title:"Effects",fn:function(){tn(o,a)}},events:{title:"Events",fn:function(){nn(r,a)}},traces:{title:"Traces",fn:function(){Cn()}},logs:{title:"Logs",fn:function(){He(a)}}})}})}"object"===("undefined"==typeof document?"undefined":i(document))&&document.addEventListener("keypress",(function(e){e.ctrlKey&&("l"!==e.key&&12!==e.keyCode||Jn(),"b"!==e.key&&2!==e.keyCode||Fn())})),Nn.on(Fn,(function(e){return!e})).on(Bn,(function(){return!0}));var Kn=e.createStore({},{and:{serialize:"ignore"},loc:{file:"/src/index.ts",line:7,column:15},name:"$files",sid:"-a7cljj"}),Wn=e.createEvent({loc:{file:"/src/index.ts",line:8,column:17},name:"storeAdd",sid:"-v9kibp"}),Vn=e.createEvent({loc:{file:"/src/index.ts",line:9,column:21},name:"storeUpdated",sid:"x1xerf"}),Xn=e.createStore({},{and:{serialize:"ignore"},loc:{file:"/src/index.ts",line:10,column:16},name:"$stores",sid:"-irqk0x"}),Hn=e.createEvent({loc:{file:"/src/index.ts",line:11,column:17},name:"eventAdd",sid:"-f2ymfo"}),Gn=e.createEvent({loc:{file:"/src/index.ts",line:12,column:23},name:"eventTriggered",sid:"-2xduee"}),Qn=e.createStore({},{and:{serialize:"ignore"},loc:{file:"/src/index.ts",line:13,column:16},name:"$events",sid:"-a9kmyz"}),Yn=e.createEvent({loc:{file:"/src/index.ts",line:14,column:18},name:"effectAdd",sid:"gco3z3"}),Zn=e.createEvent({loc:{file:"/src/index.ts",line:15,column:24},name:"effectTriggered",sid:"-v7pvlf"}),et=e.createStore({},{and:{serialize:"ignore"},loc:{file:"/src/index.ts",line:16,column:17},name:"$effects",sid:"1a0mls"});function nt(e){return e.graphite}function tt(n){var t=at(n);nt(n).seq.unshift(e.step.compute({fn:function(e,n,r){return pn({type:"effect",name:t,argument:null==e?void 0:e.param}),e}})),rt(n.doneData,"".concat(t,".doneData")),rt(n.failData,"".concat(t,".failData"))}function rt(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:at(n);nt(n).seq.unshift(e.step.compute({fn:function(e,n,r){return mn({type:"event",name:t,argument:e}),e}}))}function ot(n){var t,r=at(n);nt(n).seq.unshift(e.step.compute({fn:function(e,n){var r;return r=n.state.current,t=JSON.parse(JSON.stringify(r)),e}})),e.createNode({parent:[n],meta:{op:"watch"},family:{owners:n},regional:!0,node:[e.step.run({fn:function(e,n,o){dn({type:"store",name:r,before:t,current:e})}})]})}function it(e){var n,t;return null===(n=e.defaultConfig)||void 0===n||null===(t=n.loc)||void 0===t?void 0:t.file}function at(e){return e.compositeName.path.join("/")}Xn.on(Wn,(function(e,n){return o(o({},e),{},a({},n.name,{value:n.store.getState(),mapped:n.mapped}))})).on(Vn,(function(e,n){var t=n.name,r=n.value;return e[t]=o(o({},e[t]),{},{value:r}),o({},e)})),Kn.on(Wn,(function(e,n){var t=n.name,r=n.file;if(r){if(e[r]){var i=e[r];return o(o({},e),{},a({},r,[].concat(u(i),[{kind:"store",name:t}])))}return o(o({},e),{},a({},r,[{kind:"store",name:t}]))}return e})),Qn.on(Hn,(function(e,n){return o(o({},e),{},a({},n.name,{mapped:n.mapped,history:[]}))})).on(Gn,(function(e,n){var t=n.name,r=n.params,i=void 0===r?void 0:JSON.parse(JSON.stringify(r));return e[t]=o(o({},e[t]),{},{history:[i].concat(u(e[t].history))}),o({},e)})),Kn.on(Hn,(function(e,n){var t=n.name,r=n.file;if(r){if(e[r]){var i=e[r];return o(o({},e),{},a({},r,[].concat(u(i),[{kind:"event",name:t}])))}return o(o({},e),{},a({},r,[{kind:"event",name:t}]))}return e})),et.on(Yn,(function(e,n){return o(o({},e),{},a({},n.sid,{name:n.name,effect:n.effect,inFlight:n.effect.inFlight.getState()}))})).on(Zn,(function(e,n){var t=n.sid,r=e[t];return e[t]=o(o({},r),{},{inFlight:r.effect.inFlight.getState()}),o({},e)})),Kn.on(Yn,(function(e,n){var t=n.name,r=n.file;if(r){if(e[r]){var i=e[r];return o(o({},e),{},a({},r,[].concat(u(i),[{kind:"event",name:t}])))}return o(o({},e),{},a({},r,[{kind:"event",name:t}]))}return e})),e.forward({and:{from:Gn,to:Re.prepend((function(e){return{kind:"event",name:e.name,payload:e.params}}))},or:{loc:{file:"/src/index.ts",line:94,column:0},sid:"-7rqy50"}}),e.forward({and:{from:Vn,to:Re.prepend((function(e){return{kind:"store",name:e.name,payload:e.value}}))},or:{loc:{file:"/src/index.ts",line:102,column:0},sid:"-4yht98"}}),exports.addEffect=function(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=at(n),i=r.sid||n.sid||o;Yn({effect:n,name:o,sid:i,attached:null!==(t=r.attached)&&void 0!==t&&t,file:it(n)}),tt(n),e.forward({and:{from:[n,n.finally],to:Zn.prepend((function(){return{sid:i}}))},or:{loc:{file:"/src/index.ts",line:218,column:4},sid:"aa8v0m"}});var a=n.map((function(e){return{kind:"effect",name:o,payload:e}})),c=n.done.map((function(e){return{kind:"effect",name:o+".done",payload:e}})),l=n.fail.map((function(e){return{kind:"effect",name:o+".fail",payload:e}}));e.forward({and:{from:[a,c,l],to:Re},or:{loc:{file:"/src/index.ts",line:237,column:4},sid:"b7sb7n"}})},exports.addEvent=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.name||at(n);Hn({event:n,name:r,mapped:t.mapped||!1,file:it(n)}),rt(n),e.forward({and:{from:n.map((function(e){return{name:r,params:e}})),to:Gn},or:{loc:{file:"/src/index.ts",line:199,column:4},sid:"-l8ngi"}})},exports.addStore=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.name||at(n);Wn({store:n,name:r,mapped:t.mapped||!1,file:it(n)}),ot(n),e.forward({and:{from:n.updates.map((function(e){return{name:r,value:e}})),to:Vn},or:{loc:{file:"/src/index.ts",line:185,column:4},sid:"-14hg85"}})},exports.createInspector=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r="object"===("undefined"==typeof document?"undefined":i(document))&&document.createElement("div");if(r)return r.classList.add("effector-inspector"),document.body.append(r),n.using(r,(function(){return _n(Xn,Qn,et,Kn,e)})),n.using(r,t.StyledRoot),{root:r}}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("effector"),n=require("forest"),t=require("foliage");function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach((function(n){a(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function l(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function s(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,c=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(c)throw o}}return i}(e,n)||f(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,n){if(e){if("string"==typeof e)return d(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?d(e,n):void 0}}function d(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function m(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=f(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(c)throw i}}}}var p,v,b,g,y,h,x,w,k,S,j,E,O,z,$,C,T,q,A,I,D,P,M,F,L,B,J,N=["title"],R=t.styled.div(p||(p=l(["\n --primary: #ff8c00;\n --primary-light: #ffb152;\n --primary-dark: #c86e00;\n --primary-text: #fff;\n\n --text: #404040;\n --border: #dadada;\n --shadow: 0 4px 20px 4px rgba(0, 0, 0, 0.1);\n\n --scrollbar: var(--primary-light);\n\n --tabs-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);\n\n --tab-bg: #fff;\n --tab-text: #606060;\n --tab-text-active: var(--primary);\n --tab-shadow-active: var(--primary);\n\n --content-bg: #f9f9f9;\n\n --code-var: #ff8c00;\n --code-func: #249ec6;\n --code-string: #00a153;\n --code-bool: #ff62d3;\n --code-number: #7a70f3;\n --code-date: #333;\n --code-regexp: #95b70e;\n\n @media (prefers-color-scheme: dark) {\n --text: #ddd;\n --border: #111;\n --shadow: 0 4px 20px 4px rgba(0, 0, 0, 0.1);\n\n --scrollbar: var(--primary);\n\n --tabs-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n\n --tab-bg: #444;\n --tab-text: #ddd;\n --tab-text-active: var(--primary);\n --tab-shadow-active: var(--primary);\n\n --content-bg: #333;\n\n --code-var: #ff8c00;\n --code-func: #a5d4e2;\n --code-string: #2cb472;\n --code-bool: #ff62d3;\n --code-number: #9990ff;\n --code-date: #fff;\n --code-regexp: #e5ff7e;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: var(--scrollbar);\n }\n\n ::-webkit-scrollbar {\n width: 6px;\n }\n\n ::-webkit-scrollbar:horizontal {\n height: 6px;\n }\n\n position: fixed;\n top: 64px;\n right: 64px;\n bottom: 64px;\n z-index: 1000;\n\n display: flex;\n flex-direction: row;\n width: 736px;\n min-width: 400px;\n max-width: 90%;\n\n color: var(--text);\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Apple Color Emoji',\n 'Segoe UI Emoji', 'Segoe UI Symbol', 'PT Sans', Helvetica, Arial, sans-serif;\n line-height: 1.5;\n\n background-color: var(--bg);\n border-radius: 8px;\n box-shadow: var(--shadow);\n\n user-select: none;\n\n color-scheme: light dark;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n\n @media screen and (max-width: 700px) {\n max-width: 480px;\n }\n"]))),U=t.styled.div(v||(v=l(["\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 8px;\n margin-top: 48px;\n margin-bottom: 48px;\n margin-left: -10px;\n\n color: var(--primary);\n font-size: 14px;\n font-family: monospace;\n line-height: 6px;\n word-break: break-all;\n\n background-color: var(--bg);\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n cursor: col-resize;\n\n &:hover,\n &[data-active='true'] {\n color: var(--bg);\n\n background-color: var(--primary);\n }\n"]))),_=t.styled.section(b||(b=l(["\n position: relative;\n\n display: flex;\n flex-flow: column;\n width: 100%;\n\n border-radius: inherit;\n"]))),W=t.styled.div(g||(g=l(["\n position: sticky;\n top: 0;\n right: 0;\n left: 0;\n\n display: flex;\n\n font-weight: 500;\n font-size: 16px;\n line-height: 20px;\n\n background-color: var(--tab-bg);\n border-bottom: 1px solid var(--border);\n border-radius: inherit;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n box-shadow: var(--tabs-shadow);\n"]))),K=t.styled.div(y||(y=l(["\n padding: 8px 16px;\n\n color: var(--tab-text);\n\n border-radius: inherit;\n border-top-right-radius: 0;\n cursor: pointer;\n\n &:hover {\n box-shadow: inset 0 -2px 0 0 var(--tab-shadow-active);\n }\n\n &:not(:first-child) {\n border-top-left-radius: 0;\n }\n\n &[data-active='true'] {\n color: var(--tab-text-active);\n\n box-shadow: inset 0 -2px 0 0 var(--tab-shadow-active);\n }\n"]))),X=t.styled.div(h||(h=l(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n overflow-y: auto;\n\n background-color: var(--content-bg);\n"]))),H=t.styled.ul(x||(x=l(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin: 0 0;\n padding: 0 0;\n overflow-x: auto;\n\n list-style-type: none;\n"]))),V=t.styled.li(w||(w=l(["\n display: flex;\n margin: 0 0;\n padding: 6px 10px;\n\n font-size: 12px;\n line-height: 1.3;\n"]))),G=t.styled.pre(k||(k=l(["\n display: flex;\n margin: 0 0;\n\n color: var(--code-var);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n"]))),Q=t.styled.pre(S||(S=l(["\n margin: 0 0;\n\n color: var(--code-func);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n"]))),Y=t.styled.button(j||(j=l(["\n margin: 0;\n margin-left: 1rem;\n padding: 0.2rem 0.4rem;\n\n color: var(--primary-text);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n\n background-color: var(--primary);\n border: var(--primary);\n border-radius: 4px;\n\n &:focus {\n outline: 0;\n box-shadow: 0 0 0 1px var(--primary-dark), 0 0 3px 0 var(--primary-dark);\n }\n\n &:hover {\n background-color: var(--primary-dark);\n }\n"]))),Z=t.styled.span(E||(E=l(["\n display: inline-block;\n\n [data-opened='true'] > & {\n display: block;\n padding-left: 8px;\n }\n\n &[data-hidden='folded'] {\n display: none;\n\n [data-opened='true'] > & {\n display: block;\n }\n }\n\n &[data-hidden='expanded'] {\n display: inline-block;\n\n [data-opened='true'] > & {\n display: none;\n }\n }\n\n &:not(:last-child)::after {\n content: ', ';\n }\n"]))),ee=t.styled.span(O||(O=l(["\n color: var(--code-bool);\n font-style: italic;\n"]))),ne=t.styled.span(z||(z=l(["\n color: var(--code-number);\n"]))),te=t.styled.span($||($=l(["\n color: var(--code-string);\n"]))),re=t.styled.span(C||(C=l(["\n color: var(--code-number);\n font-weight: bold;\n"]))),oe=t.styled.span(T||(T=l(["\n color: var(--code-date);\n"]))),ie=t.styled.span(q||(q=l(["\n /* nothing here */\n"]))),ae=t.styled.span(A||(A=l(["\n color: var(--code-regexp);\n"]))),ce=t.styled.div(I||(I=l(["\n display: flex;\n * + * {\n margin-left: 0.5rem;\n }\n"]))),le={boolean:ee,date:oe,keyword:re,number:ne,string:te,symbol:ie,regexp:ae},se=t.styled.div(D||(D=l(["\n display: flex;\n flex-shrink: 0;\n padding: 1rem;\n"]))),ue=t.styled.input(P||(P=l(["\n /* nothing here */\n"]))),fe=t.styled.label(M||(M=l(["\n display: flex;\n flex-shrink: 0;\n padding: 0 0.5rem;\n"]))),de=t.styled.input(F||(F=l(["\n display: flex;\n flex-shrink: 0;\n margin: 0 0.5rem;\n padding: 0 0.5rem;\n\n border: 1px solid var(--border);\n border-radius: 0.2rem;\n\n &:focus {\n border-color: var(--primary);\n outline: 0;\n box-shadow: 0 0 0 1px var(--primary);\n }\n"]))),me=t.styled.div(L||(L=l(["\n display: flex;\n flex-direction: column;\n"]))),pe=function(e){var t=e.title,r=c(e,N);fe((function(){ue((function(){n.spec({attr:{type:"checkbox"}}),n.spec(r)})),n.spec({text:t})}))},ve=t.styled.select(B||(B=l([""]))),be=t.styled.input(J||(J=l(["\n display: flex;\n flex-shrink: 0;\n padding: 0 0.5rem;\n border: 1px solid var(--border);\n border-radius: 0.2rem;\n margin-bottom: 1rem;\n font-size: 1rem;\n line-height: 2rem;\n\n &:focus {\n border-color: var(--primary);\n outline: 0;\n box-shadow: 0 0 0 2px var(--primary);\n }\n"]))),ge=String.fromCharCode(parseInt("25B6",16)),ye=String.fromCharCode(parseInt("25A0",16));function he(e){Y(o({text:"".concat(ge," Run")},e))}function xe(e){Y(o({text:"".concat(ye," Pause")},e))}var we=Math.pow(983020,2).toString(36);function ke(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:localStorage;return null!==(t=r.getItem("".concat(we,"-").concat(e)))&&void 0!==t?t:n}function Se(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:localStorage;return t.setItem("".concat(we,"-").concat(e),n),n}function je(n,t){var r=e.createEvent({loc:{file:"/src/setting.ts",line:11,column:17},name:"save",sid:"wnm0lw"});return r.watch((function(e){return Se(n,e)})),{read:function(){return ke(n,t)},write:function(e){return Se(n,e)},save:r}}function Ee(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:localStorage,o=e.createEvent({loc:{file:"/src/setting.ts",line:20,column:17},name:"save",sid:"-o65dje"});return o.watch((function(e){return Se(n,JSON.stringify(e),r)})),{read:function(){return JSON.parse(ke(n,JSON.stringify(t),r))},write:function(e){return Se(n,JSON.stringify(e),r),e},save:o}}function Oe(n){var t=Object.keys(n),r=t[0],o=je("last-tab",r),i=o.read(),a=t.includes(i)?i:r,c=e.createEvent({loc:{file:"/src/tabs.ts",line:10,column:22},name:"changeTab",sid:"-z2hzvl"}),l=e.createStore(a,{loc:{file:"/src/tabs.ts",line:11,column:17},name:"$tab",sid:"16xfb8"});l.on(c,(function(e,n){return n})),l.watch(o.write),_((function(){W((function(){var e,r=m(t);try{var o=function(){var t=e.value,r=n[t];K({text:r.title,data:{active:l.map((function(e){return e===t}))},handler:{click:c.prepend((function(){return t}))}})};for(r.s();!(e=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}));var e,r=m(t);try{var o=function(){var t=e.value,r=n[t];X({visible:l.map((function(e){return e===t})),fn:function(){r.fn({changeTab:c})}})};for(r.s();!(e=r.n()).done;)o()}catch(e){r.e(e)}finally{r.f()}}))}var ze=e.createEvent({loc:{file:"/src/tabs/log/model.ts",line:3,column:12},name:"log",sid:"jqruuq"}),$e=e.createEvent({loc:{file:"/src/tabs/log/model.ts",line:4,column:34},name:"isLogEnabledToggle",sid:"-d0xx9i"}),Ce=e.createEvent({loc:{file:"/src/tabs/log/model.ts",line:5,column:26},name:"logCleared",sid:"-flspef"}),Te=e.createStore([],{and:{serialize:"ignore"},loc:{file:"/src/tabs/log/model.ts",line:6,column:21},name:"$logs",sid:"eafapu"}),qe=Ee("logs-enabled",!1,sessionStorage),Ae=e.createStore(qe.read(),{loc:{file:"/src/tabs/log/model.ts",line:8,column:29},name:"$isLogEnabled",sid:"3qkx4w"});Ae.watch(qe.write);var Ie=1e3,De=e.createEffect({handler:function(e){var n=e.name,t=e.kind,r=e.payload;return{id:(++Ie).toString(36),kind:t,name:n,payload:r,datetime:new Date}}},{loc:{file:"/src/tabs/log/model.ts",line:12,column:33},name:"createLogRecordFx",sid:"-jej12m"});Ae.on($e,(function(e){return!e})),Te.on(ze,(function(e,n){return[n].concat(u(e))})).reset(Ce),e.guard({and:[{clock:De.doneData,filter:Ae,target:ze}],or:{loc:{file:"/src/tabs/log/model.ts",line:27,column:0},sid:"92ujnr"}});var Pe=/\[object ([\w\s]+)\]/;function Me(e){var n=Object.prototype.toString.call(e),t=Pe.exec(n);return t?t[1]:"unknown"}function Fe(t){var r=n.rec((function(t){var o=t.store,i=s(n.remap(o,["value","parentOpened"]),2),a=i[0],c=i[1],l=e.createEvent({loc:{file:"/src/object-view.ts",line:13,column:32},name:"foldableClicked",sid:"-stmnmb"}),f=e.createStore(!1,{and:{serialize:"ignore"},loc:{file:"/src/object-view.ts",line:14,column:29},name:"$localOpened",sid:"-lmwtnk"});f.on(l,(function(e){return!e}));var d=e.combine({and:[c,f,function(e,n){return!0===e&&n}],or:{loc:{file:"/src/object-view.ts",line:16,column:24},name:"$opened",sid:"7e1sme"}});n.variant({source:e.combine({and:[a,d,function(e,n){return{type:Me(e),value:e,opened:n}}],or:{loc:{file:"/src/object-view.ts",line:18,column:20},name:"source",sid:"-22s5pi"}}),key:"type",cases:{String:function(e){var t=e.store;return le.string({text:['"',n.remap(t,"value"),'"']})},Number:function(e){var t=e.store;return le.number({text:n.remap(t,"value")})},BigInt:function(e){var t=e.store;return le.number({text:[n.remap(t,"value"),"n"],attr:{title:"BigInt"}})},Boolean:function(e){var t=e.store;return le.boolean({text:n.remap(t,"value")})},Null:function(){return le.keyword({text:"null"})},Undefined:function(){return le.keyword({text:"undefined"})},Symbol:function(e){var t=e.store;return le.symbol({text:n.remap(t,"value")})},RegExp:function(e){var t=e.store,r=n.remap(t,"value"),o=s(n.remap(r,["source","flags"]),2),i=o[0],a=o[1];le.regexp({text:["/",i,"/",a]})},Function:function(e){var t=e.store,r=n.remap(t,"value"),o={title:r.map((function(e){return e.toString()}))};n.h("span",{text:"function",attr:o}),le.keyword({text:r.map((function(e){return e.name?" ".concat(e.name):""})),attr:o}),n.h("span",{text:"()",attr:o})},AsyncFunction:function(e){var t=e.store,r=n.remap(t,"value"),o={title:r.map((function(e){return e.toString()}))};n.h("span",{text:"async function",attr:o}),le.keyword({text:r.map((function(e){return e.name?" ".concat(e.name):""})),attr:o}),n.h("span",{text:"()",attr:o})},Window:function(e){var t=e.store,r=n.remap(t,"opened");n.h("span",(function(){n.spec({data:{opened:r}}),n.h("span",{text:"Window {...",fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.spec({text:"}"})}))},Date:function(){le.date({text:a.map((function(e){var n;return null===(n=e.toISOString)||void 0===n?void 0:n.call(e)})),attr:{title:a}})},Array:function(t){var o=t.store,i=s(n.remap(o,["value","opened"]),2),a=i[0],c=i[1];n.h("span",(function(){n.spec({data:{opened:c}}),n.h("span",{text:"Array [",data:{clickable:!0},fn:function(){n.handler({passive:!0,stop:!0,capture:!0,prevent:!0},{click:l})}}),n.list(a,(function(n){var t=n.store,o=n.key;return Z((function(){return r({store:e.combine({and:[{value:t,parentOpened:c,key:o.map(String)}],or:{loc:{file:"/src/object-view.ts",line:92,column:35},name:"store",sid:"xsx70e"}})})}))})),n.spec({text:"]"})}))},Arguments:function(t){var o=t.store,i=s(n.remap(o,["value","opened"]),2),a=i[0],c=i[1];n.h("span",(function(){n.spec({data:{opened:c}}),n.h("span",{text:"Arguments [",fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.list(a.map((function(e){return u(e)})),(function(n){var t=n.store,o=n.key;return Z((function(){return r({store:e.combine({and:[{value:t,parentOpened:c,key:o.map(String)}],or:{loc:{file:"/src/object-view.ts",line:112,column:35},name:"store",sid:"obhf9h"}})})}))})),n.spec({text:"]"})}))},Set:function(t){var o=t.store,i=s(n.remap(o,["value","opened"]),2),a=i[0],c=i[1];n.h("span",(function(){n.spec({data:{opened:c}}),n.h("span",{text:"Set [",fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.list(a.map((function(e){return u(e.values())})),(function(n){var t=n.store,o=n.key;return Z((function(){return r({store:e.combine({and:[{value:t,parentOpened:c,key:o.map(String)}],or:{loc:{file:"/src/object-view.ts",line:132,column:35},name:"store",sid:"-hcu29l"}})})}))})),n.spec({text:"]"})}))},Map:function(t){var o=t.store,i=s(n.remap(o,["value","opened"]),2),a=i[0],c=i[1];n.h("span",(function(){n.spec({data:{opened:c}}),n.h("span",(function(){n.spec({text:"Map {"}),n.handler({passive:!0,stop:!0,capture:!0},{click:l})})),n.list(a.map((function(e){return u(e.entries())})),(function(t){var o=t.store,i=s(n.remap(o,["0","1"]),2),a=i[0],u=i[1];Z((function(){le.string({text:['"',a,'"'],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.h("span",{text:" => "}),r({store:e.combine({and:[{value:u,parentOpened:c,key:a}],or:{loc:{file:"/src/object-view.ts",line:160,column:43},name:"store",sid:"pq9kb3"}})})}))})),n.spec({text:"}"})}))},Error:function(t){var o=t.store,i=s(n.remap(o,["value","opened"]),2),a=i[0],c=i[1],f=s(n.remap(a,["name","message"]),2),d=f[0],m=f[1],p=a.map((function(e){var n;return null!==(n=e.stack)&&void 0!==n?n:null}));n.h("span",(function(){n.spec({data:{opened:c}}),n.h("span",{text:[d," {"],attr:{title:a.map((function(e){return e.constructor.name}))},fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),Z((function(){n.spec({data:{hidden:"expanded"}}),le.string({text:['"message"'],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.h("span",{text:": "}),r({store:e.combine({and:[{value:m,parentOpened:c,key:"message"}],or:{loc:{file:"/src/object-view.ts",line:194,column:39},name:"store",sid:"mitzb"}})})})),Z((function(){n.spec({data:{hidden:"folded"}}),le.string({text:['"stack"'],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.h("span",{text:": "});var t=e.combine({and:[{value:p,parentOpened:c,key:"stack"}],or:{loc:{file:"/src/object-view.ts",line:210,column:42},name:"store",sid:"-iu3drq"}});r({store:t})})),n.list(a.map((function(e){return u(Object.entries(e))})),(function(t){var o=t.store,i=s(n.remap(o,["0","1"]),2),a=i[0],u=i[1];Z((function(){le.string({text:['"',a,'"'],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.h("span",{text:": "}),r({store:e.combine({and:[{value:u,parentOpened:c,key:a}],or:{loc:{file:"/src/object-view.ts",line:228,column:43},name:"store",sid:"-dc4da"}})})}))}))})),n.h("span",{text:"}"})},__:function(t){var o=t.store;n.h("span",(function(){var t=s(n.remap(o,["type","value","opened"]),3),i=t[0],a=t[1],c=t[2];n.spec({data:{opened:c}}),n.h("span",{text:[i," {"],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.list(a.map((function(e){return u(Object.entries(e))})),(function(t){var o=t.store,i=s(n.remap(o,["0","1"]),2),a=i[0],u=i[1];Z((function(){le.string({text:['"',a,'"'],fn:function(){n.handler({passive:!0,stop:!0,capture:!0},{click:l})}}),n.h("span",{text:": "}),r({store:e.combine({and:[{value:u,parentOpened:c,key:a}],or:{loc:{file:"/src/object-view.ts",line:261,column:43},name:"store",sid:"-g06e7n"}})})}))}))})),n.h("span",{text:"}"})}}})})),o=t.value,i=e.combine({and:[{value:o,parentOpened:e.createStore(!0,{and:{serialize:"ignore"},loc:{file:"/src/object-view.ts",line:278,column:22},name:"parentOpened",sid:"-2ezew8"}),key:""},function(e){return e}],or:{loc:{file:"/src/object-view.ts",line:276,column:18},name:"store",sid:"11fxvl"}});r({store:i})}function Le(e,n){return n.trimDomain?e.map((function(e){return e.replace("".concat(n.trimDomain,"/"),"")})):e}var Be=Ee("filter-kinds",["event","store"]),Je=je("filter-text","");function Ne(t){var r=e.createEvent({loc:{file:"/src/tabs/log/view.ts",line:12,column:23},name:"toggleKind",sid:"-baa876"}),o=e.createEvent({loc:{file:"/src/tabs/log/view.ts",line:13,column:26},name:"filterChanged",sid:"hjd1t2"}),i=e.createStore(Be.read(),{and:{serialize:"ignore"},loc:{file:"/src/tabs/log/view.ts",line:14,column:19},name:"$kinds",sid:"-bkze8u"}),a=e.createStore(Je.read(),{and:{serialize:"ignore"},loc:{file:"/src/tabs/log/view.ts",line:15,column:24},name:"$filterText",sid:"yurk6x"});a.on(o,(function(e,n){return n})),i.on(r,(function(e,n){return e.includes(n)?e.filter((function(e){return e!==n})):[].concat(u(e),[n])})).watch(Be.write),a.watch(Je.write),se((function(){n.h("span",{text:"Show: "}),pe({title:"Event",attr:{checked:i.map((function(e){return e.includes("event")}))},handler:{click:r.prepend((function(){return"event"}))}}),pe({title:"Store",attr:{checked:i.map((function(e){return e.includes("store")}))},handler:{click:r.prepend((function(){return"store"}))}}),pe({title:"Effect",attr:{checked:i.map((function(e){return e.includes("effect")}))},handler:{click:r.prepend((function(){return"effect"}))}}),n.h("span",{text:"Filter:"}),de({attr:{value:a},handler:{change:o.prepend((function(e){var n,t;return null!==(n=null===(t=e.currentTarget)||void 0===t?void 0:t.value)&&void 0!==n?n:""}))}}),Y({text:"Clear",handler:{click:Ce},attr:{title:"Press CTRL+L to clear logs"}}),he({visible:Ae.map((function(e){return!e})),handler:{click:$e}}),xe({visible:Ae,handler:{click:$e}})})),H((function(){n.list({source:Te,key:"id",fields:["kind","name","payload","datetime"],fn:function(n){var r=s(n.fields,4),o=r[0],c=r[1],l=r[2],u=r[3],f=Le(c,t),d=e.combine({and:[o,i,function(e,n){return n.includes(e)}],or:{loc:{file:"/src/tabs/log/view.ts",line:66,column:37},name:"$kindMatched",sid:"-vo5rk8"}}),m=e.combine({and:[a,f,function(e,n){return n.includes(e)}],or:{loc:{file:"/src/tabs/log/view.ts",line:67,column:37},name:"$textMatched",sid:"-t6cd3k"}}),p=e.combine({and:[d,m,function(e,n){return e&&n}],or:{loc:{file:"/src/tabs/log/view.ts",line:68,column:33},name:"$visible",sid:"-uclvbc"}});V({visible:p,fn:function(){var e=u.map((function(e){return e.toISOString()})),n=u.map((function(e){return e.toLocaleTimeString()}));G({text:[n," ▸ "],attr:{title:e}}),G({text:o}),G({text:[" «",f,"» "]}),Q((function(){return Fe({value:l})}))}})}})}))}var Re;function Ue(t,r){var i=t.map((function(e){return Object.entries(e).map((function(e){var n=s(e,2);return o({name:n[0]},n[1])}))})),a=e.createEvent({loc:{file:"/src/stores.ts",line:9,column:26},name:"filterChanged",sid:"-l7aet0"}),c=e.createStore("",{and:{serialize:"ignore"},loc:{file:"/src/stores.ts",line:10,column:20},name:"$filter",sid:"h9pq98"});c.on(a,(function(e,n){return n}));var l=e.combine({and:[i,c,function(e,n){return e.filter((function(e){return e.name.includes(n)}))}],or:{loc:{file:"/src/stores.ts",line:12,column:26},name:"$filteredList",sid:"dk8gld"}}),u=a.prepend((function(e){var n;return null===(n=e.currentTarget)||void 0===n?void 0:n.value}));Ke((function(){be({attr:{value:c,placeholder:"Type a part of store name"},handler:{input:u}})})),H((function(){n.list({source:l,key:"name",fields:["name","value"],fn:function(e){var n=s(e.fields,2),t=n[0],o=n[1];V((function(){G({text:[Le(t,r),": "]}),Q((function(){Fe({value:o})}))}))}})}))}var _e,We,Ke=t.styled.div(Re||(Re=l(["\n padding: 6px;\n\n "," {\n width: 100%;\n box-sizing: border-box;\n margin: 0;\n }\n"])),be);function Xe(e,t){H((function(){var r=e.map((function(e){return Object.entries(e).map((function(e){var n=s(e,2);return o({name:n[0]},n[1])}))}));n.list({source:r,key:"name",fields:["name","history"],fn:function(e){var n=s(e.fields,2),r=n[0];n[1],V((function(){G({text:[Le(r,t)," "]})}))}})}))}function He(e,t){H((function(){var r=e.map((function(e){return Object.entries(e).map((function(e){var n=s(e,2);return o({sid:n[0]},n[1])}))}));n.list({source:r,key:"sid",fields:["name","inFlight"],fn:function(e){var r=s(e.fields,2),o=r[0],i=r[1];V((function(){G({text:[Le(o,t)," "]}),Q((function(){n.h("span",(function(){n.h("span",{text:[" {"]}),Z((function(){le.string({text:'"inFlight": '}),le.number({text:i})})),n.text(We||(We=l(["}"])))}))}))}))}})}))}t.styled.div(_e||(_e=l(["\n display: flex;\n flex-flow: row nowrap;\n\n :nth-child(2),\n :nth-child(3),\n :nth-child(4),\n :nth-child(5) {\n opacity: 0.8;\n }\n\n > :nth-child(n + 6) {\n opacity: 0.5;\n }\n\n > :not(:first-child) {\n margin-left: 0.5rem;\n }\n"])));var Ve,Ge,Qe;function Ye(t){var r=t.$files.map((function(e){return Object.keys(e).sort((function(e,n){return e<n?-1:e>n?1:0}))})),o=r.map((function(e){return e.length>0})),i=e.createEvent({loc:{file:"/src/files.ts",line:17,column:25},name:"fileSelected",sid:"-jqe342"}),a=e.createEvent({loc:{file:"/src/files.ts",line:18,column:24},name:"fileCleanup",sid:"hlqci5"}),c=e.createStore("",{and:{serialize:"ignore"},loc:{file:"/src/files.ts",line:19,column:25},name:"$currentFile",sid:"8hcd8i"}),l=c.map((function(e){return""!==e})),s=l.map((function(e){return!e}));c.on(i,(function(e,n){return n})).on(a,(function(){return""})),se({style:{flexDirection:"column"},visible:o,fn:function(){ce({visible:l,fn:function(){Y({text:"◀",handler:{click:a.prepend((function(){}))}}),n.h("span",{text:"File:"}),ve({handler:{change:i.prepend((function(e){return e.currentTarget.value}))},fn:function(){n.list(r,(function(t){var r=t.store;n.h("option",{attr:{value:r,selected:e.combine({and:[r,c,function(e,n){return e===n}],or:{loc:{file:"/src/files.ts",line:48,column:50},name:"selected",sid:"6n66ec"}})},text:r})}))}})}}),me({visible:s,fn:function(){var t=e.createEvent({loc:{file:"/src/files.ts",line:60,column:42},name:"filterChanged",sid:"k3tq2y"}),o=e.createStore("",{and:{serialize:"ignore"},loc:{file:"/src/files.ts",line:61,column:36},name:"$filter",sid:"ylqhpg"});o.on(t,(function(e,n){return n}));var a=e.combine({and:[o,r,function(e,n){return n.filter((function(n){return n.includes(e)}))}],or:{loc:{file:"/src/files.ts",line:63,column:43},name:"$filteredFiles",sid:"-ejnmvu"}});Ze({text:"Please, select file from the list or type the name"});var c=t.prepend((function(e){var n;return null===(n=e.currentTarget)||void 0===n?void 0:n.value}));me((function(){be({attr:{value:o,placeholder:"Type a part of the file name"},handler:{input:c}}),en((function(){n.list(a,(function(n){var t=n.store;n.key;var r=e.createEvent({loc:{file:"/src/files.ts",line:76,column:51},name:"selectFile",sid:"5acmi3"});e.sample({and:[{source:t,clock:r,target:i}],or:{loc:{file:"/src/files.ts",line:77,column:32},sid:"zqz7j"}}),nn({text:t,attr:{tabIndex:"0"},handler:{click:r}})}))}))}))}})}}),se({visible:l,fn:function(){var n=e.combine({and:[c,t.$files,t.$events,function(e,n,t){return""!==e&&n[e]?Object.fromEntries(n[e].filter((function(e){return"event"===e.kind})).map((function(e){var n=e.name;return[n,t[n]]}))):{}}],or:{loc:{file:"/src/files.ts",line:97,column:28},name:"$events",sid:"nptwt9"}}),r=e.combine({and:[c,t.$files,t.$stores,function(e,n,t){return""!==e&&n[e]?Object.fromEntries(n[e].filter((function(e){return"store"===e.kind})).map((function(e){var n=e.name;return[n,t[n]]}))):{}}],or:{loc:{file:"/src/files.ts",line:105,column:28},name:"$stores",sid:"-qckt5e"}}),o=e.combine({and:[c,t.$files,t.$effects,function(e,n,t){return""!==e&&n[e]?Object.fromEntries(n[e].filter((function(e){return"effect"===e.kind})).map((function(e){var n=e.name;return[n,t[n]]}))):{}}],or:{loc:{file:"/src/files.ts",line:113,column:29},name:"$effects",sid:"nlyty0"}});me((function(){Xe(n,t.options),Ue(r,t.options),He(o,t.options)}))}})}var Ze=t.styled.h4(Ve||(Ve=l(["\n margin-top: 0;\n"]))),en=t.styled.div(Ge||(Ge=l(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n margin: 0 0;\n padding: 0 0;\n overflow-x: auto;\n align-items: stretch;\n\n list-style-type: none;\n\n :nth-child(2n) {\n background-color: rgba(0, 0, 0, 0.1);\n }\n"]))),nn=t.styled.button(Qe||(Qe=l(["\n color: var(--text);\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n font-size: 14px;\n text-align: left;\n\n border: var(--primary);\n padding: 0.2rem 0.4rem;\n\n cursor: pointer;\n\n &:hover {\n background-color: var(--primary-dark);\n }\n\n &:focus {\n outline: none;\n box-shadow: inset 0 0 0 2px var(--primary-dark);\n }\n"]))),tn="/src/tabs/trace/model.ts",rn=e.createEvent({loc:{file:tn,line:3,column:32},name:"traceStoreChange",sid:"-e6lowl"}),on=e.createEvent({loc:{file:tn,line:4,column:33},name:"traceEventTrigger",sid:"-8emk8e"}),an=e.createEvent({loc:{file:tn,line:5,column:30},name:"traceEffectRun",sid:"3y91aa"}),cn=e.createEvent({loc:{file:tn,line:6,column:17},name:"traceAdd",sid:"qh0u7l"}),ln=e.createEvent({loc:{file:tn,line:7,column:22},name:"traceFinished",sid:"3qtg7v"}),sn=e.createEvent({loc:{file:tn,line:8,column:28},name:"traceCleared",sid:"yonfms"}),un=e.createStore([],{loc:{file:tn,line:9,column:23},name:"$traces",sid:"-9ncx6r"}),fn=e.createStore({time:0,traces:[]},{loc:{file:tn,line:10,column:22},name:"$currentTrace",sid:"-h2leee"}),dn=Ee("trace-enabled",!1,sessionStorage),mn=e.createStore(dn.read(),{loc:{file:tn,line:12,column:31},name:"$isTraceEnabled",sid:"-y4j2j0"});mn.watch(dn.write);var pn=e.createEvent({loc:{file:tn,line:14,column:34},name:"traceEnableToggled",sid:"syle0d"});mn.on(pn,(function(e){return!e})),un.on([sn],(function(){return[]})),fn.on(cn,(function(e,n){var t=e.time,r=e.traces;return{time:t||Date.now(),traces:[].concat(u(r),[n])}})),e.guard({and:[{clock:e.merge([rn,on,an],{loc:{file:tn,line:22,column:11},name:"clock",sid:"o0h313"}),filter:mn,target:cn}],or:{loc:{file:tn,line:21,column:0},sid:"-kg090g"}}),e.guard({and:[{source:fn,clock:cn,filter:function(e){return 1===e.traces.length}}],or:{loc:{file:tn,line:26,column:0},sid:"-kd9a1n"}}).watch((function(){return queueMicrotask(ln)}));var vn,bn,gn,yn,hn,xn,wn,kn,Sn,jn,En=e.sample({and:[{clock:ln,source:fn}],or:{loc:{file:tn,line:31,column:18},name:"moveTrace",sid:"-uvbibs"}});function On(){se((function(){Y({text:"Clear",handler:{click:sn},attr:{title:"Press CTRL+L to clear logs"}}),he({visible:mn.map((function(e){return!e})),handler:{click:pn}}),xe({visible:mn,handler:{click:pn}})})),H((function(){n.list({source:un,key:"time",fn:function(e){var t=e.store;Cn((function(){Fe({value:n.remap(t,"time").map((function(e){return new Date(e)}))})})),$n((function(){n.list(n.remap(t,"traces"),(function(e){var t=e.store;n.variant({source:t,key:"type",cases:{event:function(e){var t=e.store;V({fn:function(){Tn((function(){n.text(vn||(vn=l(['Event "']))),n.h("span",{attr:{class:"event"},text:n.remap(t,"name")}),n.text(bn||(bn=l(['" triggered with '])))})),Q((function(){return Fe({value:n.remap(t,"argument")})}))}})},store:function(e){var t=e.store;V({fn:function(){Tn((function(){n.text(gn||(gn=l(['Store "']))),n.h("span",{attr:{class:"store"},text:n.remap(t,"name")}),n.text(yn||(yn=l(['" changed from '])))})),Q((function(){return Fe({value:n.remap(t,"before")})})),Tn((function(){return n.text(hn||(hn=l([" to "])))})),Q((function(){return Fe({value:n.remap(t,"current")})}))}})},effect:function(e){var t=e.store;V({fn:function(){Tn((function(){n.text(xn||(xn=l(['Effect "']))),n.h("span",{attr:{class:"effect"},text:n.remap(t,"name")}),n.text(wn||(wn=l(['" triggered with '])))})),Q((function(){return Fe({value:n.remap(t,"argument")})}))}})}}})}))}))}})}))}un.on(En,(function(e,n){return[].concat(u(e),[n])})),fn.reset(En);var zn,$n=t.styled.div(kn||(kn=l(["\n display: flex;\n flex-direction: column;\n padding: 0.25rem 0.5rem;\n"]))),Cn=t.styled.div(Sn||(Sn=l(["\n font-size: 0.8rem;\n margin-top: 1rem;\n margin-left: 0.5rem;\n"]))),Tn=t.styled.div(jn||(jn=l(["\n display: flex;\n font-family: 'JetBrains Mono', hasklig, monofur, monospace;\n margin: 0 0.5rem;\n flex-shrink: 0;\n\n .event {\n color: var(--code-var);\n }\n\n .store {\n color: var(--code-string);\n }\n\n .effect {\n color: var(--code-number);\n }\n"]))),qn=e.createStore(!1,{and:{serialize:"ignore"},loc:{file:"/src/view.ts",line:14,column:19},name:"$isVisible",sid:"m45rq1"}),An=e.createEvent({loc:{file:"/src/view.ts",line:15,column:22},name:"togglePressed",sid:"-49o1h2"}),In=e.createEvent({loc:{file:"/src/view.ts",line:16,column:21},name:"clearPressed",sid:"m6ugh"}),Dn=e.createEvent({loc:{file:"/src/view.ts",line:17,column:22},name:"showInspector",sid:"-vcvppo"});function Pn(){var t=e.createStore(!1,{and:{serialize:"ignore"},loc:{file:"/src/view.ts",line:31,column:20},name:"$inDrag",sid:"ggb9xd"}),r=e.createEvent({loc:{file:"/src/view.ts",line:32,column:22},name:"mouseDown",sid:"2cyk2w"}),o=e.createEvent({loc:{file:"/src/view.ts",line:33,column:22},name:"mouseMove",sid:"-ynkdai"}),i=e.createEvent({loc:{file:"/src/view.ts",line:34,column:20},name:"mouseUp",sid:"-nqpkkf"});return t.on(r,(function(){return!0})).on(i,(function(){return!1})),n.spec({handler:{mousedown:r}}),r.watch((function(){document&&(document.addEventListener("mousemove",o),document.addEventListener("mouseup",i))})),i.watch((function(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i)})),{mouseMove:o,mouseDown:r,mouseUp:i,$inDrag:t}}function Mn(){var t=e.createEvent({loc:{file:"/src/view.ts",line:50,column:19},name:"setRef",sid:"-lwzk7m"}),r=e.createStore(null,{loc:{file:"/src/view.ts",line:51,column:17},name:"$ref",sid:"-ajz2fn"});return r.on(t,(function(e,n){return n})),n.node(t),r}function Fn(t,r,o,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};a.visible&&Dn(),console.info("%c[effector-inspector] %cPress %cCTRL+B %cto open Inspector","color: gray; font-size: 1rem;","color: currentColor; font-size: 1rem;","color: deepskyblue; font-family: monospace; font-size: 1rem;","color: currentColor; font-size: 1rem;"),R({visible:qn,fn:function(){var c=Mn(),s=Ee("width",736),u=e.createStore(s.read(),{and:{serialize:"ignore"},loc:{file:"/src/view.ts",line:67,column:27},name:"$width",sid:"fp8sd8"});n.spec({style:{width:n.val(zn||(zn=l(["","px"])),u)}}),U({text:"∙∙∙",fn:function(){var t=Pn(),r=t.mouseMove,o=t.mouseDown,i=t.mouseUp,a=t.$inDrag;n.spec({data:{active:a}});var l=e.createStore(0,{and:{serialize:"ignore"},loc:{file:"/src/view.ts",line:74,column:35},name:"$shift",sid:"-ff0iwx"}),f=e.sample({and:[c,o,function(e,n){return{block:e,event:n}}],or:{loc:{file:"/src/view.ts",line:75,column:38},name:"dragStart",sid:"-wl29ed"}}),d=e.sample({and:[c,r,function(e,n){return e.getBoundingClientRect().right-n.clientX}],or:{loc:{file:"/src/view.ts",line:79,column:37},name:"dragMove",sid:"xynxy7"}}),m=e.sample({and:[l,d,function(e,n){return n-e}],or:{loc:{file:"/src/view.ts",line:83,column:41},name:"correctWidth",sid:"754ock"}});u.on(m,(function(e,n){return n})),l.on(f,(function(e,n){var t=n.block,r=n.event;return t?t.getBoundingClientRect().left-r.clientX:0})),e.sample({and:[u,i,s.save],or:{loc:{file:"/src/view.ts",line:86,column:20},sid:"ryakn8"}})}}),Oe({files:{title:"Files",fn:function(){Ye({$stores:t,$events:r,$effects:o,$files:i,options:a})}},stores:{title:"Stores",fn:function(){Ue(t,a)}},effects:{title:"Effects",fn:function(){He(o,a)}},events:{title:"Events",fn:function(){Xe(r,a)}},traces:{title:"Traces",fn:function(){On()}},logs:{title:"Logs",fn:function(){Ne(a)}}})}})}"object"===("undefined"==typeof document?"undefined":i(document))&&document.addEventListener("keypress",(function(e){e.ctrlKey&&("l"!==e.key&&12!==e.keyCode||In(),"b"!==e.key&&2!==e.keyCode||An())})),qn.on(An,(function(e){return!e})).on(Dn,(function(){return!0}));var Ln=e.createStore({},{and:{serialize:"ignore"},loc:{file:"/src/index.ts",line:7,column:15},name:"$files",sid:"-a7cljj"}),Bn=e.createEvent({loc:{file:"/src/index.ts",line:8,column:17},name:"storeAdd",sid:"-v9kibp"}),Jn=e.createEvent({loc:{file:"/src/index.ts",line:9,column:21},name:"storeUpdated",sid:"x1xerf"}),Nn=e.createStore({},{and:{serialize:"ignore"},loc:{file:"/src/index.ts",line:10,column:16},name:"$stores",sid:"-irqk0x"}),Rn=e.createEvent({loc:{file:"/src/index.ts",line:11,column:17},name:"eventAdd",sid:"-f2ymfo"}),Un=e.createEvent({loc:{file:"/src/index.ts",line:12,column:23},name:"eventTriggered",sid:"-2xduee"}),_n=e.createStore({},{and:{serialize:"ignore"},loc:{file:"/src/index.ts",line:13,column:16},name:"$events",sid:"-a9kmyz"}),Wn=e.createEvent({loc:{file:"/src/index.ts",line:14,column:18},name:"effectAdd",sid:"gco3z3"}),Kn=e.createEvent({loc:{file:"/src/index.ts",line:15,column:24},name:"effectTriggered",sid:"-v7pvlf"}),Xn=e.createStore({},{and:{serialize:"ignore"},loc:{file:"/src/index.ts",line:16,column:17},name:"$effects",sid:"1a0mls"});function Hn(e){return e.graphite}function Vn(n){var t=Zn(n);Hn(n).seq.unshift(e.step.compute({fn:function(e,n,r){return an({type:"effect",name:t,argument:null==e?void 0:e.param}),e}})),Gn(n.doneData,"".concat(t,".doneData")),Gn(n.failData,"".concat(t,".failData"))}function Gn(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zn(n);Hn(n).seq.unshift(e.step.compute({fn:function(e,n,r){return on({type:"event",name:t,argument:e}),e}}))}function Qn(n){var t,r=Zn(n);Hn(n).seq.unshift(e.step.compute({fn:function(e,n){var r;return r=n.state.current,t=JSON.parse(JSON.stringify(r)),e}})),e.createNode({parent:[n],meta:{op:"watch"},family:{owners:n},regional:!0,node:[e.step.run({fn:function(e,n,o){rn({type:"store",name:r,before:t,current:e})}})]})}function Yn(e){var n,t;return null===(n=e.defaultConfig)||void 0===n||null===(t=n.loc)||void 0===t?void 0:t.file}function Zn(e){return e.compositeName.path.join("/")}Nn.on(Bn,(function(e,n){return o(o({},e),{},a({},n.name,{value:n.store.getState(),mapped:n.mapped}))})).on(Jn,(function(e,n){var t=n.name,r=n.value;return e[t]=o(o({},e[t]),{},{value:r}),o({},e)})),Ln.on(Bn,(function(e,n){var t=n.name,r=n.file;if(r){if(e[r]){var i=e[r];return o(o({},e),{},a({},r,[].concat(u(i),[{kind:"store",name:t}])))}return o(o({},e),{},a({},r,[{kind:"store",name:t}]))}return e})),_n.on(Rn,(function(e,n){return o(o({},e),{},a({},n.name,{mapped:n.mapped,history:[]}))})).on(Un,(function(e,n){var t=n.name,r=n.params,i=void 0===r?void 0:JSON.parse(JSON.stringify(r));return e[t]=o(o({},e[t]),{},{history:[i].concat(u(e[t].history))}),o({},e)})),Ln.on(Rn,(function(e,n){var t=n.name,r=n.file;if(r){if(e[r]){var i=e[r];return o(o({},e),{},a({},r,[].concat(u(i),[{kind:"event",name:t}])))}return o(o({},e),{},a({},r,[{kind:"event",name:t}]))}return e})),Xn.on(Wn,(function(e,n){return o(o({},e),{},a({},n.sid,{name:n.name,effect:n.effect,inFlight:n.effect.inFlight.getState()}))})).on(Kn,(function(e,n){var t=n.sid,r=e[t];return e[t]=o(o({},r),{},{inFlight:r.effect.inFlight.getState()}),o({},e)})),Ln.on(Wn,(function(e,n){var t=n.name,r=n.file;if(r){if(e[r]){var i=e[r];return o(o({},e),{},a({},r,[].concat(u(i),[{kind:"event",name:t}])))}return o(o({},e),{},a({},r,[{kind:"event",name:t}]))}return e})),e.forward({and:{from:Un,to:De.prepend((function(e){return{kind:"event",name:e.name,payload:e.params}}))},or:{loc:{file:"/src/index.ts",line:94,column:0},sid:"-7rqy50"}}),e.forward({and:{from:Jn,to:De.prepend((function(e){return{kind:"store",name:e.name,payload:e.value}}))},or:{loc:{file:"/src/index.ts",line:102,column:0},sid:"-4yht98"}}),exports.addEffect=function(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=Zn(n),i=r.sid||n.sid||o;Wn({effect:n,name:o,sid:i,attached:null!==(t=r.attached)&&void 0!==t&&t,file:Yn(n)}),Vn(n),e.forward({and:{from:[n,n.finally],to:Kn.prepend((function(){return{sid:i}}))},or:{loc:{file:"/src/index.ts",line:218,column:4},sid:"aa8v0m"}});var a=n.map((function(e){return{kind:"effect",name:o,payload:e}})),c=n.done.map((function(e){return{kind:"effect",name:o+".done",payload:e}})),l=n.fail.map((function(e){return{kind:"effect",name:o+".fail",payload:e}}));e.forward({and:{from:[a,c,l],to:De},or:{loc:{file:"/src/index.ts",line:237,column:4},sid:"b7sb7n"}})},exports.addEvent=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.name||Zn(n);Rn({event:n,name:r,mapped:t.mapped||!1,file:Yn(n)}),Gn(n),e.forward({and:{from:n.map((function(e){return{name:r,params:e}})),to:Un},or:{loc:{file:"/src/index.ts",line:199,column:4},sid:"-l8ngi"}})},exports.addStore=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.name||Zn(n);Bn({store:n,name:r,mapped:t.mapped||!1,file:Yn(n)}),Qn(n),e.forward({and:{from:n.updates.map((function(e){return{name:r,value:e}})),to:Jn},or:{loc:{file:"/src/index.ts",line:185,column:4},sid:"-14hg85"}})},exports.createInspector=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r="object"===("undefined"==typeof document?"undefined":i(document))&&document.createElement("div");if(r)return r.classList.add("effector-inspector"),document.body.append(r),n.using(r,(function(){return Fn(Nn,_n,Xn,Ln,e)})),n.using(r,t.StyledRoot),{root:r}}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "effector-inspector", | ||
"version": "0.10.1", | ||
"version": "0.10.2", | ||
"main": "index.js", | ||
@@ -78,3 +78,2 @@ "module": "index.mjs", | ||
"dependencies": { | ||
"effector-storage": "^5.0.1", | ||
"foliage": "^0.201.0", | ||
@@ -81,0 +80,0 @@ "forest": "^0.20.2" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
260722
517
- Removedeffector-storage@^5.0.1
- Removedeffector-storage@5.0.1(transitive)