@sillsdev/config-r 1.0.0-alpha.13 → 1.0.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ConfigrPane.d.ts +1 -0
- package/dist/configr.es.js +3 -1
- package/dist/configr.umd.js +1 -1
- package/package.json +1 -1
package/dist/ConfigrPane.d.ts
CHANGED
package/dist/configr.es.js
CHANGED
|
@@ -5507,7 +5507,9 @@ var c1 = function(e) {
|
|
|
5507
5507
|
});
|
|
5508
5508
|
};
|
|
5509
5509
|
const DP = (e) => {
|
|
5510
|
-
const [t, r] = ke(
|
|
5510
|
+
const [t, r] = ke(
|
|
5511
|
+
e.selectedGroupIndex ?? 0
|
|
5512
|
+
), n = e.themeOverrides ? Xi(Bo, e.themeOverrides) : Xi(Bo), a = q.Children.toArray(e.children).length > 1, [i, o] = ke(e.initialValues), s = (d) => {
|
|
5511
5513
|
e.onChange && e.onChange(d), o(d);
|
|
5512
5514
|
}, { onChange: c, ...u } = e;
|
|
5513
5515
|
return /* @__PURE__ */ ne(
|
package/dist/configr.umd.js
CHANGED
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
*
|
|
137
137
|
* This source code is licensed under the MIT license found in the
|
|
138
138
|
* LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/var Os;function py(){return Os||(Os=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=f,t=$s();function r(h,l){return h===l&&(h!==0||1/h===1/l)||h!==h&&l!==l}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,i=e.useRef,o=e.useEffect,s=e.useMemo,c=e.useDebugValue;function u(h,l,d,p,v){var g=i(null),m;g.current===null?(m={hasValue:!1,value:null},g.current=m):m=g.current;var x=s(function(){var b=!1,T,D,W=function(he){if(!b){b=!0,T=he;var Se=p(he);if(v!==void 0&&m.hasValue){var be=m.value;if(v(be,Se))return D=be,be}return D=Se,Se}var Ce=T,se=D;if(n(Ce,he))return se;var me=p(he);return v!==void 0&&v(se,me)?se:(T=he,D=me,me)},q=d===void 0?null:d,ge=function(){return W(l())},ae=q===null?void 0:function(){return W(q())};return[ge,ae]},[l,d,p,v]),C=x[0],_=x[1],S=a(h,C,_);return o(function(){m.hasValue=!0,m.value=S},[S]),c(S),S}la.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),la}(function(e){process.env.NODE_ENV==="production"?e.exports=hy():e.exports=py()})(uy);const vy=wc(aa),{useSyncExternalStoreWithSelector:gy}=vy;function As(e,t=e.getState,r){const n=gy(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return f.useDebugValue(n),n}const Ps=e=>{var t;((t={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:t.MODE)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const r=typeof e=="function"?ly(e):e,n=(a,i)=>As(r,a,i);return Object.assign(n,r),n},by=e=>e?Ps(e):Ps;var Ms=e=>{var t;return((t={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:t.MODE)!=="production"&&console.warn("[DEPRECATED] Default export is deprecated. Instead use `import { create } from 'zustand'`."),by(e)};function Is(){var e;((e={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:e.MODE)!=="production"&&console.warn("[DEPRECATED] `context` will be removed in a future version. Instead use `import { createStore, useStore } from 'zustand'`. See: https://github.com/pmndrs/zustand/discussions/1180.");const t=f.createContext(void 0);return{Provider:({createStore:i,children:o})=>{const s=f.useRef();return s.current||(s.current=i()),f.createElement(t.Provider,{value:s.current},o)},useStore:(i,o)=>{const s=f.useContext(t);if(!s)throw new Error("Seems like you have not used zustand provider as an ancestor.");return As(s,i,o)},useStoreApi:()=>{const i=f.useContext(t);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return f.useMemo(()=>({...i}),[i])}}}const Fs=(e,t)=>(...r)=>Object.assign({},e,t(...r));var yy=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(a){e.addRange(a)}),t&&t.focus()}},my=yy,ks={"text/plain":"Text","text/html":"Url",default:"Text"},xy="Copy to clipboard: #{key}, Enter";function Sy(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function wy(e,t){var r,n,a,i,o,s,c=!1;t||(t={}),r=t.debug||!1;try{a=my(),i=document.createRange(),o=document.getSelection(),s=document.createElement("span"),s.textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(h){if(h.stopPropagation(),t.format)if(h.preventDefault(),typeof h.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var l=ks[t.format]||ks.default;window.clipboardData.setData(l,e)}else h.clipboardData.clearData(),h.clipboardData.setData(t.format,e);t.onCopy&&(h.preventDefault(),t.onCopy(h.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),o.addRange(i);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");c=!0}catch(h){r&&console.error("unable to copy using execCommand: ",h),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(l){r&&console.error("unable to copy using clipboardData: ",l),r&&console.error("falling back to prompt"),n=Sy("message"in t?t.message:xy),window.prompt(n,e)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),s&&document.body.removeChild(s),a()}return c}var Ds=wy;function ua(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable}))),n.forEach(function(a){ua(e,a,r[a])})}return e}function Ey(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $r(e,t){return t=t??{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ey(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function ca(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _y(e){if(Array.isArray(e))return ca(e)}function js(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cy(){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 Ns(e,t){if(e){if(typeof e=="string")return ca(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ca(e,t)}}function ot(e){return _y(e)||js(e)||Ns(e)||Cy()}function $y(e){if(Array.isArray(e))return e}function Ty(){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 Me(e,t){return $y(e)||js(e)||Ns(e,t)||Ty()}var fa={scheme:"Light Theme",author:"mac gainor (https://github.com/mac-s-g)",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},Ls={scheme:"Dark Theme",author:"Chris Kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},Bs=function(){return null};Bs.when=function(){return!1};var da,ha,pa,va,ga,ba,ya,ma,xa,Sa,wa,Ea,_a,Ca,$a,Oy=function(e){return Ms(Fs({enableClipboard:(da=e.enableClipboard)!==null&&da!==void 0?da:!0,indentWidth:(ha=e.indentWidth)!==null&&ha!==void 0?ha:3,groupArraysAfterLength:(pa=e.groupArraysAfterLength)!==null&&pa!==void 0?pa:100,collapseStringsAfterLength:e.collapseStringsAfterLength===!1?Number.MAX_VALUE:(va=e.collapseStringsAfterLength)!==null&&va!==void 0?va:50,maxDisplayLength:(ga=e.maxDisplayLength)!==null&&ga!==void 0?ga:30,rootName:(ba=e.rootName)!==null&&ba!==void 0?ba:"root",onChange:(ya=e.onChange)!==null&&ya!==void 0?ya:function(){},onCopy:(ma=e.onCopy)!==null&&ma!==void 0?ma:void 0,keyRenderer:(xa=e.keyRenderer)!==null&&xa!==void 0?xa:Bs,editable:(Sa=e.editable)!==null&&Sa!==void 0?Sa:!1,defaultInspectDepth:(wa=e.defaultInspectDepth)!==null&&wa!==void 0?wa:5,objectSortKeys:(Ea=e.objectSortKeys)!==null&&Ea!==void 0?Ea:!1,quotesOnKeys:(_a=e.quotesOnKeys)!==null&&_a!==void 0?_a:!0,displayDataTypes:(Ca=e.displayDataTypes)!==null&&Ca!==void 0?Ca:!0,inspectCache:{},hoverPath:null,colorspace:fa,value:e.value,displayObjectSize:($a=e.displayObjectSize)!==null&&$a!==void 0?$a:!0},function(t,r){return{getInspectCache:function(n,a){var i=a!==void 0?n.join(".")+"[".concat(a,"]nt"):n.join(".");return r().inspectCache[i]},setInspectCache:function(n,a,i){var o=i!==void 0?n.join(".")+"[".concat(i,"]nt"):n.join(".");t(function(s){return{inspectCache:$r(ie({},s.inspectCache),ua({},o,typeof a=="function"?a(s.inspectCache[o]):a))}})},setHover:function(n,a){t({hoverPath:n?{path:n,nestedIndex:a}:null})}}}))},Ta=Is(),J=Ta.useStore,Hs=Ta.useStoreApi,Ay=Ta.Provider,Oa=function(){return J(function(e){return e.colorspace.base07})};function st(e,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Py(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.timeout,r=t===void 0?2e3:t,n=Me(f.useState(!1),2),a=n[0],i=n[1],o=f.useRef(null),s=f.useCallback(function(l){var d=o.current;d&&window.clearTimeout(d),o.current=window.setTimeout(function(){return i(!1)},r),i(l)},[r]),c=J(function(l){return l.onCopy}),u=f.useCallback(function(l,d){if(typeof c=="function")try{var p=c(l,d);st(p,Promise)?p.then(function(){s(!0)}).catch(function(g){console.error("error when copy ".concat(l.length===0?"src":"src[".concat(l.join(".")),"]"),g)}):s(!0)}catch(g){console.error("error when copy ".concat(l.length===0?"src":"src[".concat(l.join(".")),"]"),g)}else{var v=JSON.stringify(typeof d=="function"?d.toString():d,null," ");"clipboard"in navigator?navigator.clipboard.writeText(v).then(function(){return s(!0)}).catch(function(){return Ds(v)}):Ds(v)}},[s,c]),h=f.useCallback(function(){i(!1),o.current&&clearTimeout(o.current)},[]);return{copy:u,reset:h,copied:a}}var My=function(e,t,r){if(e===null||r===null||typeof e!="object"||typeof r!="object")return!1;if(Object.is(e,r)&&t.length!==0)return"";for(var n=[],a=ot(t),i=e;i!==r||a.length!==0;){if(typeof i!="object"||i===null)return!1;if(Object.is(i,r))return n.reduce(function(s,c,u){return typeof c=="number"?s+"[".concat(c,"]"):s+"".concat(u===0?"":".").concat(c)},"");var o=a.shift();n.push(o),i=i[o]}return!1};function Tr(e){return e===null?0:Array.isArray(e)?e.length:st(e,Map)||st(e,Set)?e.size:st(e,Date)?1:typeof e=="object"?Object.keys(e).length:typeof e=="string"?e.length:1}function Iy(e,t){for(var r=[],n=0;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r}function Aa(e,t){var r=J(function(n){return n.value});return f.useMemo(function(){return My(r,e,t)},[e,t,r])}function Fy(e,t,r){var n=e.length,a=Aa(e,t),i=J(function(d){return d.getInspectCache}),o=J(function(d){return d.setInspectCache}),s=J(function(d){return d.defaultInspectDepth});f.useEffect(function(){var d=i(e,r);if(d===void 0)if(r!==void 0)o(e,!1,r);else{var p=a?!1:n<s;o(e,p)}},[s,n,i,a,r,e,o]);var c=Me(f.useState(function(){var d=i(e,r);return d!==void 0?d:r!==void 0||a?!1:n<s}),2),u=c[0],h=c[1],l=f.useCallback(function(d){h(function(p){var v=typeof d=="boolean"?d:d(p);return o(e,v,r),v})},[r,e,o]);return[u,l]}function ky(e){return e&&e.constructor===Symbol?"symbol":typeof e}var lt=function(e){return y.jsx(F.Box,$r(ie({component:"div"},e),{sx:ie({display:"inline-block"},e.sx)}))},Gs=function(e){var t=e.dataType,r=e.enable,n=r===void 0?!0:r;return n?y.jsx(lt,{className:"data-type-label",sx:{mx:.5,fontSize:"0.7rem",opacity:.8,userSelect:"none"},children:t}):null};function tt(e,t,r){var n,a=(n=r.displayTypeLabel)!==null&&n!==void 0?n:!0,i=f.memo(t),o=function(u){var h=J(function(d){return d.displayDataTypes}),l=J(function(d){return d.colorspace[r.colorKey]});return y.jsxs(lt,{sx:{color:l},children:[a&&h&&y.jsx(Gs,{dataType:e}),y.jsx(lt,{className:"".concat(e,"-value"),children:y.jsx(i,{value:u.value})})]})};if(o.displayName="easy-".concat(e,"-type"),!r.fromString)return{Component:o};var s=r.fromString,c=function(u){var h=u.value,l=u.setValue,d=J(function(p){return p.colorspace[r.colorKey]});return y.jsx(F.InputBase,{value:h,onChange:f.useCallback(function(p){var v=s(p.target.value);l(v)},[l]),size:"small",multiline:!0,sx:{color:d,padding:.5,borderStyle:"solid",borderColor:"black",borderWidth:1,fontSize:"0.8rem",fontFamily:"monospace",display:"inline-flex"}})};return c.displayName="easy-".concat(e,"-type-editor"),{Component:o,Editor:c}}var Dy=function(e){var t=e.toString(),r=!0,n=t.indexOf(")"),a=t.indexOf("=>");return a!==-1&&a>n&&(r=!1),r?t.substring(t.indexOf("{",n)+1,t.lastIndexOf("}")):t.substring(t.indexOf("=>")+2)},jy=function(e){var t=e.toString(),r=t.indexOf("function")!==-1;return r?t.substring(8,t.indexOf("{")).trim():t.substring(0,t.indexOf("=>")+2).trim()},Ny="{",Ly="}",By=function(e){return y.jsxs(F.NoSsr,{children:[y.jsx(Gs,{dataType:"function"}),y.jsxs(F.Box,{component:"span",className:"data-function-start",sx:{letterSpacing:.5},children:[jy(e.value)," ",Ny]})]})},Hy=function(){return y.jsx(F.NoSsr,{children:y.jsx(F.Box,{component:"span",className:"data-function-end",children:Ly})})},Gy=function(e){var t=J(function(r){return r.colorspace.base05});return y.jsx(F.NoSsr,{children:y.jsx(F.Box,{className:"data-function",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?2:0,color:t},children:e.inspect?Dy(e.value):y.jsx(F.Box,{component:"span",className:"data-function-body",onClick:function(){return e.setInspect(!0)},sx:{"&:hover":{cursor:"pointer"},padding:.5},children:"…"})})})};function Vy(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Uy(e,t){if(e==null)return{};var r=Vy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var xt=function(e){var t=e.d,r=Uy(e,["d"]);return y.jsx(F.SvgIcon,$r(ie({},r),{children:y.jsx("path",{d:t})}))},zy="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",Wy="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",Ky="M 12 2 C 10.615 1.998 9.214625 2.2867656 7.890625 2.8847656 L 8.9003906 4.6328125 C 9.9043906 4.2098125 10.957 3.998 12 4 C 15.080783 4 17.738521 5.7633175 19.074219 8.3222656 L 17.125 9 L 21.25 11 L 22.875 7 L 20.998047 7.6523438 C 19.377701 4.3110398 15.95585 2 12 2 z M 6.5097656 4.4882812 L 2.2324219 5.0820312 L 3.734375 6.3808594 C 1.6515335 9.4550558 1.3615962 13.574578 3.3398438 17 C 4.0308437 18.201 4.9801562 19.268234 6.1601562 20.115234 L 7.1699219 18.367188 C 6.3019219 17.710187 5.5922656 16.904 5.0722656 16 C 3.5320014 13.332354 3.729203 10.148679 5.2773438 7.7128906 L 6.8398438 9.0625 L 6.5097656 4.4882812 z M 19.929688 13 C 19.794687 14.08 19.450734 15.098 18.927734 16 C 17.386985 18.668487 14.531361 20.090637 11.646484 19.966797 L 12.035156 17.9375 L 8.2402344 20.511719 L 10.892578 23.917969 L 11.265625 21.966797 C 14.968963 22.233766 18.681899 20.426323 20.660156 17 C 21.355156 15.801 21.805219 14.445 21.949219 13 L 19.929688 13 z",qy="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",Ry="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",Yy="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z",Xy="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z",Vs=function(e){return y.jsx(xt,ie({d:zy},e))},Jy=function(e){return y.jsx(xt,ie({d:Wy},e))},Zy=function(e){return y.jsx(xt,ie({d:Ky},e))},Qy=function(e){return y.jsx(xt,ie({d:qy},e))},em=function(e){return y.jsx(xt,ie({d:Ry},e))},tm=function(e){return y.jsx(xt,ie({d:Yy},e))},rm=function(e){return y.jsx(xt,ie({d:Xy},e))},nm="{",am="[",im="}",om="]";function Us(e){var t=Tr(e),r="";return(st(e,Map)||st(e,Set))&&(r=e[Symbol.toStringTag]),Object.prototype.hasOwnProperty.call(e,Symbol.toStringTag)&&(r=e[Symbol.toStringTag]),"".concat(t," Items").concat(r?" (".concat(r,")"):"")}var sm=function(e){var t=J(function(c){return c.colorspace.base04}),r=Oa(),n=f.useMemo(function(){return Array.isArray(e.value)},[e.value]),a=f.useMemo(function(){return Tr(e.value)===0},[e.value]),i=f.useMemo(function(){return Us(e.value)},[e.inspect,e.value]),o=J(function(c){return c.displayObjectSize}),s=Aa(e.path,e.value);return y.jsxs(F.Box,{component:"span",className:"data-object-start",sx:{letterSpacing:.5},children:[n?am:nm,o&&e.inspect&&!a&&y.jsx(F.Box,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:i}),s&&!e.inspect?y.jsxs(y.Fragment,{children:[y.jsx(Zy,{sx:{fontSize:12,color:r,mx:.5}}),s]}):null]})},lm=function(e){var t=J(function(o){return o.colorspace.base04}),r=f.useMemo(function(){return Array.isArray(e.value)},[e.value]),n=J(function(o){return o.displayObjectSize}),a=f.useMemo(function(){return Tr(e.value)===0},[e.value]),i=f.useMemo(function(){return Us(e.value)},[e.inspect,e.value]);return y.jsxs(F.Box,{component:"span",className:"data-object-end",children:[r?om:im,n&&(a||!e.inspect)?y.jsx(F.Box,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:i}):null]})};function um(e){return typeof(e==null?void 0:e[Symbol.iterator])=="function"}var cm=function(e){var t=Oa(),r=J(function(v){return v.colorspace.base02}),n=J(function(v){return v.groupArraysAfterLength}),a=Aa(e.path,e.value),i=Me(f.useState(J(function(v){return v.maxDisplayLength})),2),o=i[0],s=i[1],c=J(function(v){return v.objectSortKeys}),u=f.useMemo(function(){if(!e.inspect)return null;var v=e.value,g=um(v);if(g&&!Array.isArray(v)){var m=[];if(st(v,Map)){var x=!0,C=!1,_=void 0;try{for(var S=v[Symbol.iterator](),b;!(x=(b=S.next()).done);x=!0){var T=b.value,D=Me(T,2),W=D[0],q=D[1],ge="".concat(W);m.push(y.jsx(kt,{path:ot(e.path).concat([ge]),value:q,editable:!1},ge))}}catch(M){C=!0,_=M}finally{try{!x&&S.return!=null&&S.return()}finally{if(C)throw _}}}else{var ae=0,he=!0,Se=!1,be=void 0;try{for(var Ce=v[Symbol.iterator](),se;!(he=(se=Ce.next()).done);he=!0){var me=se.value;m.push(y.jsx(kt,{path:ot(e.path).concat(["iterator:".concat(ae)]),value:me,nestedIndex:ae,editable:!1},ae)),ae++}}catch(M){Se=!0,be=M}finally{try{!he&&Ce.return!=null&&Ce.return()}finally{if(Se)throw be}}}return m}if(Array.isArray(v)){if(v.length<=n){var Oe=v.slice(0,o).map(function(M,N){var L=ot(e.path).concat([N]);return y.jsx(kt,{path:L,value:M},N)});if(v.length>o){var Ae=v.length-o;Oe.push(y.jsxs(lt,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:function(){return s(function(M){return M*2})},children:["hidden ",Ae," items…"]},"last"))}return Oe}var $=Iy(v,n);return $.map(function(M,N){var L=ot(e.path);return y.jsx(kt,{path:L,value:M,nestedIndex:N},N)})}var A=Object.entries(v);c&&(A=c===!0?A.sort(function(M,N){var L=Me(M,1),H=L[0],P=Me(N,1),K=P[0];return H.localeCompare(K)}):A.sort(function(M,N){var L=Me(M,1),H=L[0],P=Me(N,1),K=P[0];return c(H,K)}));var U=A.slice(0,o).map(function(M){var N=Me(M,2),L=N[0],H=N[1],P=ot(e.path).concat([L]);return y.jsx(kt,{path:P,value:H},L)});if(A.length>o){var G=A.length-o;U.push(y.jsxs(lt,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:function(){return s(function(M){return M*2})},children:["hidden ",G," items…"]},"last"))}return U},[e.inspect,e.value,e.path,n,o,t,c]),h=e.inspect?.6:0,l=J(function(v){return v.indentWidth}),d=e.inspect?l-h:l,p=f.useMemo(function(){return Tr(e.value)===0},[e.value]);return p?null:y.jsx(F.Box,{className:"data-object",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?d-.6:0,marginLeft:h,color:t,borderLeft:e.inspect?"1px solid ".concat(r):"none"},children:e.inspect?u:a?null:y.jsx(F.Box,{component:"span",className:"data-object-body",onClick:function(){return e.setInspect(!0)},sx:{"&:hover":{cursor:"pointer"},padding:.5,userSelect:"none"},children:"…"})})},fm=function(){return Ms(Fs({registry:[]},function(e){return{registerTypes:function(t){e(function(r){return{registry:typeof t=="function"?t(r.registry):t}})}}}))},zs=Is(),dm=zs.Provider,Ws=zs.useStore,hm={is:function(e){return typeof e=="object"},Component:cm,PreComponent:sm,PostComponent:lm};function pm(e,t,r){var n,a=!0,i=!1,o=void 0;try{for(var s=r[Symbol.iterator](),c;!(a=(c=s.next()).done);a=!0){var u=c.value;if(u.is(e,t)&&(n=u,typeof e=="object"))return u}}catch(h){i=!0,o=h}finally{try{!a&&s.return!=null&&s.return()}finally{if(i)throw o}}if(n===void 0){if(typeof e=="object")return hm;throw new Error("this is not possible")}return n}function vm(e,t){var r=Ws(function(n){return n.registry});return f.useMemo(function(){return pm(e,t,r)},[e,t,r])}function gm(){var e=function(i){function o(s,c){var u,h;return Object.is(s.value,c.value)&&s.inspect&&c.inspect&&((u=s.path)===null||u===void 0?void 0:u.join("."))===((h=c.path)===null||h===void 0?void 0:h.join("."))}i.Component=f.memo(i.Component,o),i.Editor&&(i.Editor=f.memo(i.Editor,function(c,u){return Object.is(c.value,u.value)})),i.PreComponent&&(i.PreComponent=f.memo(i.PreComponent,o)),i.PostComponent&&(i.PostComponent=f.memo(i.PostComponent,o)),t.push(i)},t=[];e(ie({is:function(a){return typeof a=="boolean"}},tt("bool",function(a){var i=a.value;return y.jsx(y.Fragment,{children:i?"true":"false"})},{colorKey:"base0E",fromString:function(a){return Boolean(a)}})));var r={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"};e(ie({is:function(a){return st(a,Date)}},tt("date",function(a){var i=a.value;return y.jsx(y.Fragment,{children:i.toLocaleTimeString("en-us",r)})},{colorKey:"base0D"}))),e(ie({is:function(a){return a===null}},tt("null",function(){var a=J(function(i){return i.colorspace.base02});return y.jsx(F.Box,{sx:{fontSize:"0.8rem",backgroundColor:a,fontWeight:"bold",borderRadius:"3px",padding:"0.5px 2px"},children:"NULL"})},{colorKey:"base08",displayTypeLabel:!1}))),e(ie({is:function(a){return a===void 0}},tt("undefined",function(){var a=J(function(i){return i.colorspace.base02});return y.jsx(F.Box,{sx:{fontSize:"0.7rem",backgroundColor:a,borderRadius:"3px",padding:"0.5px 2px"},children:"undefined"})},{colorKey:"base05",displayTypeLabel:!1}))),e(ie({is:function(a){return typeof a=="string"}},tt("string",function(a){var i=Me(f.useState(!1),2),o=i[0],s=i[1],c=J(function(l){return l.collapseStringsAfterLength}),u=o?a.value:a.value.slice(0,c),h=a.value.length>c;return y.jsxs(F.Box,{component:"span",sx:{overflowWrap:"anywhere",cursor:h?"pointer":"inherit"},onClick:function(){h&&s(function(l){return!l})},children:['"',u,h&&!o&&y.jsx(F.Box,{component:"span",sx:{padding:.5},children:"…"}),'"']})},{colorKey:"base09",fromString:function(a){return a}}))),e({is:function(a){return typeof a=="function"},Component:Gy,PreComponent:By,PostComponent:Hy});var n=function(a){return a%1===0};return e(ie({is:function(a){return typeof a=="number"&&isNaN(a)}},tt("NaN",function(){var a=J(function(i){return i.colorspace.base02});return y.jsx(F.Box,{sx:{backgroundColor:a,fontSize:"0.8rem",fontWeight:"bold",borderRadius:"3px"},children:"NaN"})},{colorKey:"base08",displayTypeLabel:!1}))),e(ie({is:function(a){return typeof a=="number"&&!n(a)}},tt("float",function(a){var i=a.value;return y.jsx(y.Fragment,{children:i})},{colorKey:"base0B",fromString:function(a){return parseFloat(a)}}))),e(ie({is:function(a){return typeof a=="number"&&n(a)}},tt("int",function(a){var i=a.value;return y.jsx(y.Fragment,{children:i})},{colorKey:"base0F",fromString:function(a){return parseInt(a)}}))),e(ie({is:function(a){return(typeof a>"u"?"undefined":ky(a))==="bigint"}},tt("bigint",function(a){var i=a.value;return y.jsx(y.Fragment,{children:"".concat(i,"n")})},{colorKey:"base0F",fromString:function(a){return BigInt(a.replace(/\D/g,""))}}))),t}var tn=function(e){return y.jsx(F.Box,$r(ie({component:"span"},e),{sx:ie({cursor:"pointer",paddingLeft:"0.7rem"},e.sx)}))},kt=function(e){var t=e.value,r=e.path,n=e.nestedIndex,a,i=(a=e.editable)!==null&&a!==void 0?a:void 0,o=J(function(P){return P.editable}),s=f.useMemo(function(){return o===!1||i===!1?!1:typeof o=="function"?!!o(r,t):o},[r,i,o,t]),c=Me(f.useState(typeof t=="function"?function(){return t}:t),2),u=c[0],h=c[1],l=r.length,d=r[l-1],p=J(function(P){return P.hoverPath}),v=f.useMemo(function(){return p&&r.every(function(P,K){return P===p.path[K]&&n===p.nestedIndex})},[p,r,n]),g=J(function(P){return P.setHover}),m=J(function(P){return P.value}),x=Me(Fy(r,t,n),2),C=x[0],_=x[1],S=Me(f.useState(!1),2),b=S[0],T=S[1],D=J(function(P){return P.onChange}),W=Oa(),q=J(function(P){return P.colorspace.base0C}),ge=vm(t,r),ae=ge.Component,he=ge.PreComponent,Se=ge.PostComponent,be=ge.Editor,Ce=J(function(P){return P.quotesOnKeys}),se=J(function(P){return P.rootName}),me=m===t,Oe=Number.isInteger(Number(d)),Ae=J(function(P){return P.enableClipboard}),$=Py(),A=$.copy,U=$.copied,G=f.useMemo(function(){return b?y.jsxs(y.Fragment,{children:[y.jsx(tn,{children:y.jsx(Qy,{sx:{fontSize:".8rem"},onClick:function(){T(!1),h(t)}})}),y.jsx(tn,{children:y.jsx(Vs,{sx:{fontSize:".8rem"},onClick:function(){T(!1),D(r,t,u)}})})]}):y.jsxs(y.Fragment,{children:[Ae&&y.jsx(tn,{onClick:function(P){P.preventDefault();try{A(r,t)}catch(K){console.error(K)}},children:U?y.jsx(Vs,{sx:{fontSize:".8rem"}}):y.jsx(em,{sx:{fontSize:".8rem"}})}),be&&s&&y.jsx(tn,{onClick:function(P){P.preventDefault(),T(!0)},children:y.jsx(tm,{sx:{fontSize:".8rem"}})})]})},[be,U,A,s,b,Ae,D,r,u,t]),M=f.useMemo(function(){return Tr(t)===0},[t]),N=!M&&!!(he&&Se),L=J(function(P){return P.keyRenderer}),H=f.useMemo(function(){return{path:r,inspect:C,setInspect:_,value:t}},[C,r,_,t]);return y.jsxs(F.Box,{className:"data-key-pair","data-testid":"data-key-pair"+r.join("."),sx:{userSelect:"text"},onMouseEnter:f.useCallback(function(){return g(r,n)},[g,r,n]),children:[y.jsxs(lt,{component:"span",className:"data-key",sx:{lineHeight:1.5,color:W,letterSpacing:.5,opacity:.8},onClick:f.useCallback(function(P){P.isDefaultPrevented()||M||_(function(K){return!K})},[_]),children:[N?C?y.jsx(rm,{sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):y.jsx(Jy,{sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):null,me?se!==!1?Ce?y.jsxs(y.Fragment,{children:['"',se,'"']}):y.jsx(y.Fragment,{children:se}):null:L.when(H)?y.jsx(L,ie({},H)):n===void 0&&(Oe?y.jsx(F.Box,{component:"span",style:{color:q},children:d}):Ce?y.jsxs(y.Fragment,{children:['"',d,'"']}):y.jsx(y.Fragment,{children:d})),me?se!==!1?y.jsx(lt,{sx:{mr:.5},children:":"}):null:n===void 0&&y.jsx(lt,{sx:{mr:.5},children:":"}),he&&y.jsx(he,ie({},H)),v&&N&&C&&G]}),b&&s?be&&y.jsx(be,{value:u,setValue:h}):ae?y.jsx(ae,ie({},H)):y.jsx(F.Box,{component:"span",className:"data-value-fallback",children:"fallback: ".concat(t)}),Se&&y.jsx(Se,ie({},H)),v&&N&&!C&&G,v&&!N&&G]})},Ks="(prefers-color-scheme: dark)";function bm(){var e=Me(f.useState(!1),2),t=e[0],r=e[1];return f.useEffect(function(){var n=function(i){r(i.matches)};r(window.matchMedia(Ks).matches);var a=window.matchMedia(Ks);return a.addEventListener("change",n),function(){return a.removeEventListener("change",n)}},[]),t}function Le(e,t){var r=Hs();f.useEffect(function(){t!==void 0&&r.setState(ua({},e,t))},[e,t,r])}var ym=function(e){var t=Hs();Le("value",e.value),Le("editable",e.editable),Le("indentWidth",e.indentWidth),Le("onChange",e.onChange),Le("groupArraysAfterLength",e.groupArraysAfterLength),Le("keyRenderer",e.keyRenderer),Le("maxDisplayLength",e.maxDisplayLength),Le("enableClipboard",e.enableClipboard),Le("rootName",e.rootName),Le("displayDataTypes",e.displayDataTypes),Le("displayObjectSize",e.displayObjectSize),Le("onCopy",e.onCopy),f.useEffect(function(){e.theme==="light"?t.setState({colorspace:fa}):e.theme==="dark"?t.setState({colorspace:Ls}):typeof e.theme=="object"&&t.setState({colorspace:e.theme})},[t,e.theme]);var r=f.useRef(!0),n=f.useMemo(function(){return gm()},[]),a=Ws(function(u){return u.registerTypes});if(r.current){var i,o=ot(n);(i=e.valueTypes)===null||i===void 0||i.forEach(function(u){o.push(u)}),a(o),r.current=!1}f.useEffect(function(){var u,h=ot(n);(u=e.valueTypes)===null||u===void 0||u.forEach(function(l){h.push(l)}),a(h)},[n,e.valueTypes,a]);var s=J(function(u){return u.value}),c=J(function(u){return u.setHover});return y.jsx(F.Paper,{elevation:0,className:e.className,style:e.style,sx:{fontFamily:"monospace",userSelect:"none",contentVisibility:"auto"},onMouseLeave:f.useCallback(function(){c(null)},[c]),children:y.jsx(kt,{value:s,path:f.useMemo(function(){return[]},[])})})},mm=function(t){var r=bm(),n,a=f.useMemo(function(){return t.theme==="auto"?r?"light":"dark":(n=t.theme)!==null&&n!==void 0?n:"light"},[r,t.theme]),i=f.useMemo(function(){var s=typeof a=="object"?a.base00:a==="dark"?Ls.base00:fa.base00;return F.createTheme({components:{MuiPaper:{styleOverrides:{root:{backgroundColor:s}}}},palette:{mode:a==="dark"?"dark":"light",background:{default:s}}})},[a]),o=$r(ie({},t),{theme:a});return y.jsx(F.ThemeProvider,{theme:i,children:y.jsx(dm,{createStore:fm,children:y.jsx(Ay,{createStore:function(){return Oy(t)},children:y.jsx(ym,ie({},o))})})})};const xm=e=>{const[t,r]=f.useState(0),n=e.themeOverrides?nt.createTheme(Ss,e.themeOverrides):nt.createTheme(Ss),a=Y.Children.toArray(e.children).length>1,[i,o]=f.useState(e.initialValues),s=h=>{e.onChange&&e.onChange(h),o(h)},{onChange:c,...u}=e;return y.jsxs("div",{css:le.css`
|
|
139
|
+
*/var Os;function py(){return Os||(Os=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=f,t=$s();function r(h,l){return h===l&&(h!==0||1/h===1/l)||h!==h&&l!==l}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,i=e.useRef,o=e.useEffect,s=e.useMemo,c=e.useDebugValue;function u(h,l,d,p,v){var g=i(null),m;g.current===null?(m={hasValue:!1,value:null},g.current=m):m=g.current;var x=s(function(){var b=!1,T,D,W=function(he){if(!b){b=!0,T=he;var Se=p(he);if(v!==void 0&&m.hasValue){var be=m.value;if(v(be,Se))return D=be,be}return D=Se,Se}var Ce=T,se=D;if(n(Ce,he))return se;var me=p(he);return v!==void 0&&v(se,me)?se:(T=he,D=me,me)},q=d===void 0?null:d,ge=function(){return W(l())},ae=q===null?void 0:function(){return W(q())};return[ge,ae]},[l,d,p,v]),C=x[0],_=x[1],S=a(h,C,_);return o(function(){m.hasValue=!0,m.value=S},[S]),c(S),S}la.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),la}(function(e){process.env.NODE_ENV==="production"?e.exports=hy():e.exports=py()})(uy);const vy=wc(aa),{useSyncExternalStoreWithSelector:gy}=vy;function As(e,t=e.getState,r){const n=gy(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return f.useDebugValue(n),n}const Ps=e=>{var t;((t={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:t.MODE)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const r=typeof e=="function"?ly(e):e,n=(a,i)=>As(r,a,i);return Object.assign(n,r),n},by=e=>e?Ps(e):Ps;var Ms=e=>{var t;return((t={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:t.MODE)!=="production"&&console.warn("[DEPRECATED] Default export is deprecated. Instead use `import { create } from 'zustand'`."),by(e)};function Is(){var e;((e={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1})==null?void 0:e.MODE)!=="production"&&console.warn("[DEPRECATED] `context` will be removed in a future version. Instead use `import { createStore, useStore } from 'zustand'`. See: https://github.com/pmndrs/zustand/discussions/1180.");const t=f.createContext(void 0);return{Provider:({createStore:i,children:o})=>{const s=f.useRef();return s.current||(s.current=i()),f.createElement(t.Provider,{value:s.current},o)},useStore:(i,o)=>{const s=f.useContext(t);if(!s)throw new Error("Seems like you have not used zustand provider as an ancestor.");return As(s,i,o)},useStoreApi:()=>{const i=f.useContext(t);if(!i)throw new Error("Seems like you have not used zustand provider as an ancestor.");return f.useMemo(()=>({...i}),[i])}}}const Fs=(e,t)=>(...r)=>Object.assign({},e,t(...r));var yy=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(a){e.addRange(a)}),t&&t.focus()}},my=yy,ks={"text/plain":"Text","text/html":"Url",default:"Text"},xy="Copy to clipboard: #{key}, Enter";function Sy(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function wy(e,t){var r,n,a,i,o,s,c=!1;t||(t={}),r=t.debug||!1;try{a=my(),i=document.createRange(),o=document.getSelection(),s=document.createElement("span"),s.textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(h){if(h.stopPropagation(),t.format)if(h.preventDefault(),typeof h.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var l=ks[t.format]||ks.default;window.clipboardData.setData(l,e)}else h.clipboardData.clearData(),h.clipboardData.setData(t.format,e);t.onCopy&&(h.preventDefault(),t.onCopy(h.clipboardData))}),document.body.appendChild(s),i.selectNodeContents(s),o.addRange(i);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");c=!0}catch(h){r&&console.error("unable to copy using execCommand: ",h),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(l){r&&console.error("unable to copy using clipboardData: ",l),r&&console.error("falling back to prompt"),n=Sy("message"in t?t.message:xy),window.prompt(n,e)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),s&&document.body.removeChild(s),a()}return c}var Ds=wy;function ua(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable}))),n.forEach(function(a){ua(e,a,r[a])})}return e}function Ey(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function $r(e,t){return t=t??{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ey(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function ca(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _y(e){if(Array.isArray(e))return ca(e)}function js(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cy(){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 Ns(e,t){if(e){if(typeof e=="string")return ca(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ca(e,t)}}function ot(e){return _y(e)||js(e)||Ns(e)||Cy()}function $y(e){if(Array.isArray(e))return e}function Ty(){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 Me(e,t){return $y(e)||js(e)||Ns(e,t)||Ty()}var fa={scheme:"Light Theme",author:"mac gainor (https://github.com/mac-s-g)",base00:"rgba(0, 0, 0, 0)",base01:"rgb(245, 245, 245)",base02:"rgb(235, 235, 235)",base03:"#93a1a1",base04:"rgba(0, 0, 0, 0.3)",base05:"#586e75",base06:"#073642",base07:"#002b36",base08:"#d33682",base09:"#cb4b16",base0A:"#dc322f",base0B:"#859900",base0C:"#6c71c4",base0D:"#586e75",base0E:"#2aa198",base0F:"#268bd2"},Ls={scheme:"Dark Theme",author:"Chris Kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},Bs=function(){return null};Bs.when=function(){return!1};var da,ha,pa,va,ga,ba,ya,ma,xa,Sa,wa,Ea,_a,Ca,$a,Oy=function(e){return Ms(Fs({enableClipboard:(da=e.enableClipboard)!==null&&da!==void 0?da:!0,indentWidth:(ha=e.indentWidth)!==null&&ha!==void 0?ha:3,groupArraysAfterLength:(pa=e.groupArraysAfterLength)!==null&&pa!==void 0?pa:100,collapseStringsAfterLength:e.collapseStringsAfterLength===!1?Number.MAX_VALUE:(va=e.collapseStringsAfterLength)!==null&&va!==void 0?va:50,maxDisplayLength:(ga=e.maxDisplayLength)!==null&&ga!==void 0?ga:30,rootName:(ba=e.rootName)!==null&&ba!==void 0?ba:"root",onChange:(ya=e.onChange)!==null&&ya!==void 0?ya:function(){},onCopy:(ma=e.onCopy)!==null&&ma!==void 0?ma:void 0,keyRenderer:(xa=e.keyRenderer)!==null&&xa!==void 0?xa:Bs,editable:(Sa=e.editable)!==null&&Sa!==void 0?Sa:!1,defaultInspectDepth:(wa=e.defaultInspectDepth)!==null&&wa!==void 0?wa:5,objectSortKeys:(Ea=e.objectSortKeys)!==null&&Ea!==void 0?Ea:!1,quotesOnKeys:(_a=e.quotesOnKeys)!==null&&_a!==void 0?_a:!0,displayDataTypes:(Ca=e.displayDataTypes)!==null&&Ca!==void 0?Ca:!0,inspectCache:{},hoverPath:null,colorspace:fa,value:e.value,displayObjectSize:($a=e.displayObjectSize)!==null&&$a!==void 0?$a:!0},function(t,r){return{getInspectCache:function(n,a){var i=a!==void 0?n.join(".")+"[".concat(a,"]nt"):n.join(".");return r().inspectCache[i]},setInspectCache:function(n,a,i){var o=i!==void 0?n.join(".")+"[".concat(i,"]nt"):n.join(".");t(function(s){return{inspectCache:$r(ie({},s.inspectCache),ua({},o,typeof a=="function"?a(s.inspectCache[o]):a))}})},setHover:function(n,a){t({hoverPath:n?{path:n,nestedIndex:a}:null})}}}))},Ta=Is(),J=Ta.useStore,Hs=Ta.useStoreApi,Ay=Ta.Provider,Oa=function(){return J(function(e){return e.colorspace.base07})};function st(e,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Py(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.timeout,r=t===void 0?2e3:t,n=Me(f.useState(!1),2),a=n[0],i=n[1],o=f.useRef(null),s=f.useCallback(function(l){var d=o.current;d&&window.clearTimeout(d),o.current=window.setTimeout(function(){return i(!1)},r),i(l)},[r]),c=J(function(l){return l.onCopy}),u=f.useCallback(function(l,d){if(typeof c=="function")try{var p=c(l,d);st(p,Promise)?p.then(function(){s(!0)}).catch(function(g){console.error("error when copy ".concat(l.length===0?"src":"src[".concat(l.join(".")),"]"),g)}):s(!0)}catch(g){console.error("error when copy ".concat(l.length===0?"src":"src[".concat(l.join(".")),"]"),g)}else{var v=JSON.stringify(typeof d=="function"?d.toString():d,null," ");"clipboard"in navigator?navigator.clipboard.writeText(v).then(function(){return s(!0)}).catch(function(){return Ds(v)}):Ds(v)}},[s,c]),h=f.useCallback(function(){i(!1),o.current&&clearTimeout(o.current)},[]);return{copy:u,reset:h,copied:a}}var My=function(e,t,r){if(e===null||r===null||typeof e!="object"||typeof r!="object")return!1;if(Object.is(e,r)&&t.length!==0)return"";for(var n=[],a=ot(t),i=e;i!==r||a.length!==0;){if(typeof i!="object"||i===null)return!1;if(Object.is(i,r))return n.reduce(function(s,c,u){return typeof c=="number"?s+"[".concat(c,"]"):s+"".concat(u===0?"":".").concat(c)},"");var o=a.shift();n.push(o),i=i[o]}return!1};function Tr(e){return e===null?0:Array.isArray(e)?e.length:st(e,Map)||st(e,Set)?e.size:st(e,Date)?1:typeof e=="object"?Object.keys(e).length:typeof e=="string"?e.length:1}function Iy(e,t){for(var r=[],n=0;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r}function Aa(e,t){var r=J(function(n){return n.value});return f.useMemo(function(){return My(r,e,t)},[e,t,r])}function Fy(e,t,r){var n=e.length,a=Aa(e,t),i=J(function(d){return d.getInspectCache}),o=J(function(d){return d.setInspectCache}),s=J(function(d){return d.defaultInspectDepth});f.useEffect(function(){var d=i(e,r);if(d===void 0)if(r!==void 0)o(e,!1,r);else{var p=a?!1:n<s;o(e,p)}},[s,n,i,a,r,e,o]);var c=Me(f.useState(function(){var d=i(e,r);return d!==void 0?d:r!==void 0||a?!1:n<s}),2),u=c[0],h=c[1],l=f.useCallback(function(d){h(function(p){var v=typeof d=="boolean"?d:d(p);return o(e,v,r),v})},[r,e,o]);return[u,l]}function ky(e){return e&&e.constructor===Symbol?"symbol":typeof e}var lt=function(e){return y.jsx(F.Box,$r(ie({component:"div"},e),{sx:ie({display:"inline-block"},e.sx)}))},Gs=function(e){var t=e.dataType,r=e.enable,n=r===void 0?!0:r;return n?y.jsx(lt,{className:"data-type-label",sx:{mx:.5,fontSize:"0.7rem",opacity:.8,userSelect:"none"},children:t}):null};function tt(e,t,r){var n,a=(n=r.displayTypeLabel)!==null&&n!==void 0?n:!0,i=f.memo(t),o=function(u){var h=J(function(d){return d.displayDataTypes}),l=J(function(d){return d.colorspace[r.colorKey]});return y.jsxs(lt,{sx:{color:l},children:[a&&h&&y.jsx(Gs,{dataType:e}),y.jsx(lt,{className:"".concat(e,"-value"),children:y.jsx(i,{value:u.value})})]})};if(o.displayName="easy-".concat(e,"-type"),!r.fromString)return{Component:o};var s=r.fromString,c=function(u){var h=u.value,l=u.setValue,d=J(function(p){return p.colorspace[r.colorKey]});return y.jsx(F.InputBase,{value:h,onChange:f.useCallback(function(p){var v=s(p.target.value);l(v)},[l]),size:"small",multiline:!0,sx:{color:d,padding:.5,borderStyle:"solid",borderColor:"black",borderWidth:1,fontSize:"0.8rem",fontFamily:"monospace",display:"inline-flex"}})};return c.displayName="easy-".concat(e,"-type-editor"),{Component:o,Editor:c}}var Dy=function(e){var t=e.toString(),r=!0,n=t.indexOf(")"),a=t.indexOf("=>");return a!==-1&&a>n&&(r=!1),r?t.substring(t.indexOf("{",n)+1,t.lastIndexOf("}")):t.substring(t.indexOf("=>")+2)},jy=function(e){var t=e.toString(),r=t.indexOf("function")!==-1;return r?t.substring(8,t.indexOf("{")).trim():t.substring(0,t.indexOf("=>")+2).trim()},Ny="{",Ly="}",By=function(e){return y.jsxs(F.NoSsr,{children:[y.jsx(Gs,{dataType:"function"}),y.jsxs(F.Box,{component:"span",className:"data-function-start",sx:{letterSpacing:.5},children:[jy(e.value)," ",Ny]})]})},Hy=function(){return y.jsx(F.NoSsr,{children:y.jsx(F.Box,{component:"span",className:"data-function-end",children:Ly})})},Gy=function(e){var t=J(function(r){return r.colorspace.base05});return y.jsx(F.NoSsr,{children:y.jsx(F.Box,{className:"data-function",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?2:0,color:t},children:e.inspect?Dy(e.value):y.jsx(F.Box,{component:"span",className:"data-function-body",onClick:function(){return e.setInspect(!0)},sx:{"&:hover":{cursor:"pointer"},padding:.5},children:"…"})})})};function Vy(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Uy(e,t){if(e==null)return{};var r=Vy(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var xt=function(e){var t=e.d,r=Uy(e,["d"]);return y.jsx(F.SvgIcon,$r(ie({},r),{children:y.jsx("path",{d:t})}))},zy="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z",Wy="M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z",Ky="M 12 2 C 10.615 1.998 9.214625 2.2867656 7.890625 2.8847656 L 8.9003906 4.6328125 C 9.9043906 4.2098125 10.957 3.998 12 4 C 15.080783 4 17.738521 5.7633175 19.074219 8.3222656 L 17.125 9 L 21.25 11 L 22.875 7 L 20.998047 7.6523438 C 19.377701 4.3110398 15.95585 2 12 2 z M 6.5097656 4.4882812 L 2.2324219 5.0820312 L 3.734375 6.3808594 C 1.6515335 9.4550558 1.3615962 13.574578 3.3398438 17 C 4.0308437 18.201 4.9801562 19.268234 6.1601562 20.115234 L 7.1699219 18.367188 C 6.3019219 17.710187 5.5922656 16.904 5.0722656 16 C 3.5320014 13.332354 3.729203 10.148679 5.2773438 7.7128906 L 6.8398438 9.0625 L 6.5097656 4.4882812 z M 19.929688 13 C 19.794687 14.08 19.450734 15.098 18.927734 16 C 17.386985 18.668487 14.531361 20.090637 11.646484 19.966797 L 12.035156 17.9375 L 8.2402344 20.511719 L 10.892578 23.917969 L 11.265625 21.966797 C 14.968963 22.233766 18.681899 20.426323 20.660156 17 C 21.355156 15.801 21.805219 14.445 21.949219 13 L 19.929688 13 z",qy="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",Ry="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",Yy="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z",Xy="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z",Vs=function(e){return y.jsx(xt,ie({d:zy},e))},Jy=function(e){return y.jsx(xt,ie({d:Wy},e))},Zy=function(e){return y.jsx(xt,ie({d:Ky},e))},Qy=function(e){return y.jsx(xt,ie({d:qy},e))},em=function(e){return y.jsx(xt,ie({d:Ry},e))},tm=function(e){return y.jsx(xt,ie({d:Yy},e))},rm=function(e){return y.jsx(xt,ie({d:Xy},e))},nm="{",am="[",im="}",om="]";function Us(e){var t=Tr(e),r="";return(st(e,Map)||st(e,Set))&&(r=e[Symbol.toStringTag]),Object.prototype.hasOwnProperty.call(e,Symbol.toStringTag)&&(r=e[Symbol.toStringTag]),"".concat(t," Items").concat(r?" (".concat(r,")"):"")}var sm=function(e){var t=J(function(c){return c.colorspace.base04}),r=Oa(),n=f.useMemo(function(){return Array.isArray(e.value)},[e.value]),a=f.useMemo(function(){return Tr(e.value)===0},[e.value]),i=f.useMemo(function(){return Us(e.value)},[e.inspect,e.value]),o=J(function(c){return c.displayObjectSize}),s=Aa(e.path,e.value);return y.jsxs(F.Box,{component:"span",className:"data-object-start",sx:{letterSpacing:.5},children:[n?am:nm,o&&e.inspect&&!a&&y.jsx(F.Box,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:i}),s&&!e.inspect?y.jsxs(y.Fragment,{children:[y.jsx(Zy,{sx:{fontSize:12,color:r,mx:.5}}),s]}):null]})},lm=function(e){var t=J(function(o){return o.colorspace.base04}),r=f.useMemo(function(){return Array.isArray(e.value)},[e.value]),n=J(function(o){return o.displayObjectSize}),a=f.useMemo(function(){return Tr(e.value)===0},[e.value]),i=f.useMemo(function(){return Us(e.value)},[e.inspect,e.value]);return y.jsxs(F.Box,{component:"span",className:"data-object-end",children:[r?om:im,n&&(a||!e.inspect)?y.jsx(F.Box,{component:"span",sx:{pl:.5,fontStyle:"italic",color:t,userSelect:"none"},children:i}):null]})};function um(e){return typeof(e==null?void 0:e[Symbol.iterator])=="function"}var cm=function(e){var t=Oa(),r=J(function(v){return v.colorspace.base02}),n=J(function(v){return v.groupArraysAfterLength}),a=Aa(e.path,e.value),i=Me(f.useState(J(function(v){return v.maxDisplayLength})),2),o=i[0],s=i[1],c=J(function(v){return v.objectSortKeys}),u=f.useMemo(function(){if(!e.inspect)return null;var v=e.value,g=um(v);if(g&&!Array.isArray(v)){var m=[];if(st(v,Map)){var x=!0,C=!1,_=void 0;try{for(var S=v[Symbol.iterator](),b;!(x=(b=S.next()).done);x=!0){var T=b.value,D=Me(T,2),W=D[0],q=D[1],ge="".concat(W);m.push(y.jsx(kt,{path:ot(e.path).concat([ge]),value:q,editable:!1},ge))}}catch(M){C=!0,_=M}finally{try{!x&&S.return!=null&&S.return()}finally{if(C)throw _}}}else{var ae=0,he=!0,Se=!1,be=void 0;try{for(var Ce=v[Symbol.iterator](),se;!(he=(se=Ce.next()).done);he=!0){var me=se.value;m.push(y.jsx(kt,{path:ot(e.path).concat(["iterator:".concat(ae)]),value:me,nestedIndex:ae,editable:!1},ae)),ae++}}catch(M){Se=!0,be=M}finally{try{!he&&Ce.return!=null&&Ce.return()}finally{if(Se)throw be}}}return m}if(Array.isArray(v)){if(v.length<=n){var Oe=v.slice(0,o).map(function(M,N){var L=ot(e.path).concat([N]);return y.jsx(kt,{path:L,value:M},N)});if(v.length>o){var Ae=v.length-o;Oe.push(y.jsxs(lt,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:function(){return s(function(M){return M*2})},children:["hidden ",Ae," items…"]},"last"))}return Oe}var $=Iy(v,n);return $.map(function(M,N){var L=ot(e.path);return y.jsx(kt,{path:L,value:M,nestedIndex:N},N)})}var A=Object.entries(v);c&&(A=c===!0?A.sort(function(M,N){var L=Me(M,1),H=L[0],P=Me(N,1),K=P[0];return H.localeCompare(K)}):A.sort(function(M,N){var L=Me(M,1),H=L[0],P=Me(N,1),K=P[0];return c(H,K)}));var U=A.slice(0,o).map(function(M){var N=Me(M,2),L=N[0],H=N[1],P=ot(e.path).concat([L]);return y.jsx(kt,{path:P,value:H},L)});if(A.length>o){var G=A.length-o;U.push(y.jsxs(lt,{sx:{cursor:"pointer",lineHeight:1.5,color:t,letterSpacing:.5,opacity:.8,userSelect:"none"},onClick:function(){return s(function(M){return M*2})},children:["hidden ",G," items…"]},"last"))}return U},[e.inspect,e.value,e.path,n,o,t,c]),h=e.inspect?.6:0,l=J(function(v){return v.indentWidth}),d=e.inspect?l-h:l,p=f.useMemo(function(){return Tr(e.value)===0},[e.value]);return p?null:y.jsx(F.Box,{className:"data-object",sx:{display:e.inspect?"block":"inline-block",pl:e.inspect?d-.6:0,marginLeft:h,color:t,borderLeft:e.inspect?"1px solid ".concat(r):"none"},children:e.inspect?u:a?null:y.jsx(F.Box,{component:"span",className:"data-object-body",onClick:function(){return e.setInspect(!0)},sx:{"&:hover":{cursor:"pointer"},padding:.5,userSelect:"none"},children:"…"})})},fm=function(){return Ms(Fs({registry:[]},function(e){return{registerTypes:function(t){e(function(r){return{registry:typeof t=="function"?t(r.registry):t}})}}}))},zs=Is(),dm=zs.Provider,Ws=zs.useStore,hm={is:function(e){return typeof e=="object"},Component:cm,PreComponent:sm,PostComponent:lm};function pm(e,t,r){var n,a=!0,i=!1,o=void 0;try{for(var s=r[Symbol.iterator](),c;!(a=(c=s.next()).done);a=!0){var u=c.value;if(u.is(e,t)&&(n=u,typeof e=="object"))return u}}catch(h){i=!0,o=h}finally{try{!a&&s.return!=null&&s.return()}finally{if(i)throw o}}if(n===void 0){if(typeof e=="object")return hm;throw new Error("this is not possible")}return n}function vm(e,t){var r=Ws(function(n){return n.registry});return f.useMemo(function(){return pm(e,t,r)},[e,t,r])}function gm(){var e=function(i){function o(s,c){var u,h;return Object.is(s.value,c.value)&&s.inspect&&c.inspect&&((u=s.path)===null||u===void 0?void 0:u.join("."))===((h=c.path)===null||h===void 0?void 0:h.join("."))}i.Component=f.memo(i.Component,o),i.Editor&&(i.Editor=f.memo(i.Editor,function(c,u){return Object.is(c.value,u.value)})),i.PreComponent&&(i.PreComponent=f.memo(i.PreComponent,o)),i.PostComponent&&(i.PostComponent=f.memo(i.PostComponent,o)),t.push(i)},t=[];e(ie({is:function(a){return typeof a=="boolean"}},tt("bool",function(a){var i=a.value;return y.jsx(y.Fragment,{children:i?"true":"false"})},{colorKey:"base0E",fromString:function(a){return Boolean(a)}})));var r={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"};e(ie({is:function(a){return st(a,Date)}},tt("date",function(a){var i=a.value;return y.jsx(y.Fragment,{children:i.toLocaleTimeString("en-us",r)})},{colorKey:"base0D"}))),e(ie({is:function(a){return a===null}},tt("null",function(){var a=J(function(i){return i.colorspace.base02});return y.jsx(F.Box,{sx:{fontSize:"0.8rem",backgroundColor:a,fontWeight:"bold",borderRadius:"3px",padding:"0.5px 2px"},children:"NULL"})},{colorKey:"base08",displayTypeLabel:!1}))),e(ie({is:function(a){return a===void 0}},tt("undefined",function(){var a=J(function(i){return i.colorspace.base02});return y.jsx(F.Box,{sx:{fontSize:"0.7rem",backgroundColor:a,borderRadius:"3px",padding:"0.5px 2px"},children:"undefined"})},{colorKey:"base05",displayTypeLabel:!1}))),e(ie({is:function(a){return typeof a=="string"}},tt("string",function(a){var i=Me(f.useState(!1),2),o=i[0],s=i[1],c=J(function(l){return l.collapseStringsAfterLength}),u=o?a.value:a.value.slice(0,c),h=a.value.length>c;return y.jsxs(F.Box,{component:"span",sx:{overflowWrap:"anywhere",cursor:h?"pointer":"inherit"},onClick:function(){h&&s(function(l){return!l})},children:['"',u,h&&!o&&y.jsx(F.Box,{component:"span",sx:{padding:.5},children:"…"}),'"']})},{colorKey:"base09",fromString:function(a){return a}}))),e({is:function(a){return typeof a=="function"},Component:Gy,PreComponent:By,PostComponent:Hy});var n=function(a){return a%1===0};return e(ie({is:function(a){return typeof a=="number"&&isNaN(a)}},tt("NaN",function(){var a=J(function(i){return i.colorspace.base02});return y.jsx(F.Box,{sx:{backgroundColor:a,fontSize:"0.8rem",fontWeight:"bold",borderRadius:"3px"},children:"NaN"})},{colorKey:"base08",displayTypeLabel:!1}))),e(ie({is:function(a){return typeof a=="number"&&!n(a)}},tt("float",function(a){var i=a.value;return y.jsx(y.Fragment,{children:i})},{colorKey:"base0B",fromString:function(a){return parseFloat(a)}}))),e(ie({is:function(a){return typeof a=="number"&&n(a)}},tt("int",function(a){var i=a.value;return y.jsx(y.Fragment,{children:i})},{colorKey:"base0F",fromString:function(a){return parseInt(a)}}))),e(ie({is:function(a){return(typeof a>"u"?"undefined":ky(a))==="bigint"}},tt("bigint",function(a){var i=a.value;return y.jsx(y.Fragment,{children:"".concat(i,"n")})},{colorKey:"base0F",fromString:function(a){return BigInt(a.replace(/\D/g,""))}}))),t}var tn=function(e){return y.jsx(F.Box,$r(ie({component:"span"},e),{sx:ie({cursor:"pointer",paddingLeft:"0.7rem"},e.sx)}))},kt=function(e){var t=e.value,r=e.path,n=e.nestedIndex,a,i=(a=e.editable)!==null&&a!==void 0?a:void 0,o=J(function(P){return P.editable}),s=f.useMemo(function(){return o===!1||i===!1?!1:typeof o=="function"?!!o(r,t):o},[r,i,o,t]),c=Me(f.useState(typeof t=="function"?function(){return t}:t),2),u=c[0],h=c[1],l=r.length,d=r[l-1],p=J(function(P){return P.hoverPath}),v=f.useMemo(function(){return p&&r.every(function(P,K){return P===p.path[K]&&n===p.nestedIndex})},[p,r,n]),g=J(function(P){return P.setHover}),m=J(function(P){return P.value}),x=Me(Fy(r,t,n),2),C=x[0],_=x[1],S=Me(f.useState(!1),2),b=S[0],T=S[1],D=J(function(P){return P.onChange}),W=Oa(),q=J(function(P){return P.colorspace.base0C}),ge=vm(t,r),ae=ge.Component,he=ge.PreComponent,Se=ge.PostComponent,be=ge.Editor,Ce=J(function(P){return P.quotesOnKeys}),se=J(function(P){return P.rootName}),me=m===t,Oe=Number.isInteger(Number(d)),Ae=J(function(P){return P.enableClipboard}),$=Py(),A=$.copy,U=$.copied,G=f.useMemo(function(){return b?y.jsxs(y.Fragment,{children:[y.jsx(tn,{children:y.jsx(Qy,{sx:{fontSize:".8rem"},onClick:function(){T(!1),h(t)}})}),y.jsx(tn,{children:y.jsx(Vs,{sx:{fontSize:".8rem"},onClick:function(){T(!1),D(r,t,u)}})})]}):y.jsxs(y.Fragment,{children:[Ae&&y.jsx(tn,{onClick:function(P){P.preventDefault();try{A(r,t)}catch(K){console.error(K)}},children:U?y.jsx(Vs,{sx:{fontSize:".8rem"}}):y.jsx(em,{sx:{fontSize:".8rem"}})}),be&&s&&y.jsx(tn,{onClick:function(P){P.preventDefault(),T(!0)},children:y.jsx(tm,{sx:{fontSize:".8rem"}})})]})},[be,U,A,s,b,Ae,D,r,u,t]),M=f.useMemo(function(){return Tr(t)===0},[t]),N=!M&&!!(he&&Se),L=J(function(P){return P.keyRenderer}),H=f.useMemo(function(){return{path:r,inspect:C,setInspect:_,value:t}},[C,r,_,t]);return y.jsxs(F.Box,{className:"data-key-pair","data-testid":"data-key-pair"+r.join("."),sx:{userSelect:"text"},onMouseEnter:f.useCallback(function(){return g(r,n)},[g,r,n]),children:[y.jsxs(lt,{component:"span",className:"data-key",sx:{lineHeight:1.5,color:W,letterSpacing:.5,opacity:.8},onClick:f.useCallback(function(P){P.isDefaultPrevented()||M||_(function(K){return!K})},[_]),children:[N?C?y.jsx(rm,{sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):y.jsx(Jy,{sx:{fontSize:".8rem","&:hover":{cursor:"pointer"}}}):null,me?se!==!1?Ce?y.jsxs(y.Fragment,{children:['"',se,'"']}):y.jsx(y.Fragment,{children:se}):null:L.when(H)?y.jsx(L,ie({},H)):n===void 0&&(Oe?y.jsx(F.Box,{component:"span",style:{color:q},children:d}):Ce?y.jsxs(y.Fragment,{children:['"',d,'"']}):y.jsx(y.Fragment,{children:d})),me?se!==!1?y.jsx(lt,{sx:{mr:.5},children:":"}):null:n===void 0&&y.jsx(lt,{sx:{mr:.5},children:":"}),he&&y.jsx(he,ie({},H)),v&&N&&C&&G]}),b&&s?be&&y.jsx(be,{value:u,setValue:h}):ae?y.jsx(ae,ie({},H)):y.jsx(F.Box,{component:"span",className:"data-value-fallback",children:"fallback: ".concat(t)}),Se&&y.jsx(Se,ie({},H)),v&&N&&!C&&G,v&&!N&&G]})},Ks="(prefers-color-scheme: dark)";function bm(){var e=Me(f.useState(!1),2),t=e[0],r=e[1];return f.useEffect(function(){var n=function(i){r(i.matches)};r(window.matchMedia(Ks).matches);var a=window.matchMedia(Ks);return a.addEventListener("change",n),function(){return a.removeEventListener("change",n)}},[]),t}function Le(e,t){var r=Hs();f.useEffect(function(){t!==void 0&&r.setState(ua({},e,t))},[e,t,r])}var ym=function(e){var t=Hs();Le("value",e.value),Le("editable",e.editable),Le("indentWidth",e.indentWidth),Le("onChange",e.onChange),Le("groupArraysAfterLength",e.groupArraysAfterLength),Le("keyRenderer",e.keyRenderer),Le("maxDisplayLength",e.maxDisplayLength),Le("enableClipboard",e.enableClipboard),Le("rootName",e.rootName),Le("displayDataTypes",e.displayDataTypes),Le("displayObjectSize",e.displayObjectSize),Le("onCopy",e.onCopy),f.useEffect(function(){e.theme==="light"?t.setState({colorspace:fa}):e.theme==="dark"?t.setState({colorspace:Ls}):typeof e.theme=="object"&&t.setState({colorspace:e.theme})},[t,e.theme]);var r=f.useRef(!0),n=f.useMemo(function(){return gm()},[]),a=Ws(function(u){return u.registerTypes});if(r.current){var i,o=ot(n);(i=e.valueTypes)===null||i===void 0||i.forEach(function(u){o.push(u)}),a(o),r.current=!1}f.useEffect(function(){var u,h=ot(n);(u=e.valueTypes)===null||u===void 0||u.forEach(function(l){h.push(l)}),a(h)},[n,e.valueTypes,a]);var s=J(function(u){return u.value}),c=J(function(u){return u.setHover});return y.jsx(F.Paper,{elevation:0,className:e.className,style:e.style,sx:{fontFamily:"monospace",userSelect:"none",contentVisibility:"auto"},onMouseLeave:f.useCallback(function(){c(null)},[c]),children:y.jsx(kt,{value:s,path:f.useMemo(function(){return[]},[])})})},mm=function(t){var r=bm(),n,a=f.useMemo(function(){return t.theme==="auto"?r?"light":"dark":(n=t.theme)!==null&&n!==void 0?n:"light"},[r,t.theme]),i=f.useMemo(function(){var s=typeof a=="object"?a.base00:a==="dark"?Ls.base00:fa.base00;return F.createTheme({components:{MuiPaper:{styleOverrides:{root:{backgroundColor:s}}}},palette:{mode:a==="dark"?"dark":"light",background:{default:s}}})},[a]),o=$r(ie({},t),{theme:a});return y.jsx(F.ThemeProvider,{theme:i,children:y.jsx(dm,{createStore:fm,children:y.jsx(Ay,{createStore:function(){return Oy(t)},children:y.jsx(ym,ie({},o))})})})};const xm=e=>{const[t,r]=f.useState(e.selectedGroupIndex??0),n=e.themeOverrides?nt.createTheme(Ss,e.themeOverrides):nt.createTheme(Ss),a=Y.Children.toArray(e.children).length>1,[i,o]=f.useState(e.initialValues),s=h=>{e.onChange&&e.onChange(h),o(h)},{onChange:c,...u}=e;return y.jsxs("div",{css:le.css`
|
|
140
140
|
display: flex;
|
|
141
141
|
flex-direction: row;
|
|
142
142
|
`,children:[y.jsx(nt.ThemeProvider,{theme:n,children:y.jsx(jb,{children:y.jsx(It.Consumer,{children:({searchString:h,setSearchString:l})=>y.jsxs(Y.Fragment,{children:[e.showAppBar&&y.jsx(Sc,{label:e.label,showSearch:e.showSearch,searchValue:h,setSearchString:d=>{h!==d&&(l(d),r(d?void 0:0))}}),y.jsxs("div",{id:"configr-pane",css:le.css`
|