@alepha/devtools 0.13.6 → 0.13.8
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/assets/devtools/asset.BZV40eAE.css +1 -0
- package/assets/devtools/asset.Bhpm0ujk.css +1 -0
- package/assets/devtools/chunk.17gtbQUO.js +1 -0
- package/assets/devtools/chunk.1mem8WHh.js +1 -0
- package/assets/devtools/chunk.B0aYes_4.js +1 -0
- package/assets/devtools/chunk.BULoWCgJ.js +7 -0
- package/assets/devtools/chunk.BYrPfJRg.js +1 -0
- package/assets/devtools/chunk.BjFrJKj1.js +1 -0
- package/assets/devtools/chunk.BlqFPyLh.js +1 -0
- package/assets/devtools/chunk.BmJ7-uBd.js +1 -0
- package/assets/devtools/chunk.BzE7YYkj.js +6 -0
- package/assets/devtools/chunk.C49FcqzR.js +1 -0
- package/assets/devtools/chunk.CBGZOsrp.js +9 -0
- package/assets/devtools/chunk.CHRbA_gU.js +1 -0
- package/assets/devtools/chunk.Ct58VlQl.js +1 -0
- package/assets/devtools/chunk.Cw2RCl4F.js +1 -0
- package/assets/devtools/chunk.CyQeq1kA.js +1 -0
- package/assets/devtools/chunk.CzbujtK7.js +1 -0
- package/assets/devtools/chunk.DA9XnVAa.js +1 -0
- package/assets/devtools/chunk.DEUHUxKv.js +1 -0
- package/assets/devtools/chunk.DGW-W4Kc.js +1 -0
- package/assets/devtools/chunk.DHWcJNNS.js +1 -0
- package/assets/devtools/chunk.DIfRZc20.js +1 -0
- package/assets/devtools/chunk.DJJIo7HU.js +1 -0
- package/assets/devtools/chunk.DJOi4_So.js +1 -0
- package/assets/devtools/chunk.DR0SHXXd.js +1 -0
- package/assets/devtools/chunk.DinJSUfH.js +1 -0
- package/assets/devtools/chunk.DooL4OcT.js +1 -0
- package/assets/devtools/chunk.Dry2LXOT.js +1 -0
- package/assets/devtools/chunk.IVvrfXp1.js +1 -0
- package/assets/devtools/chunk.OlMI8g2F.js +1 -0
- package/assets/devtools/chunk.Pj_uCbSv.js +1 -0
- package/assets/devtools/chunk.RTodzvo0.js +2 -0
- package/assets/devtools/chunk.YXYL4YAO.js +2 -0
- package/assets/devtools/chunk.fpKvkQeU.js +1 -0
- package/assets/devtools/chunk.qDx9cjbN.js +1 -0
- package/assets/devtools/chunk.rJToME5k.js +1 -0
- package/assets/devtools/chunk.rohGhT-A.js +1 -0
- package/assets/devtools/chunk.uyVen0u2.js +1 -0
- package/assets/devtools/entry.BY4L2Uc6.js +75 -0
- package/assets/devtools/index.html +11 -0
- package/dist/index.d.ts +249 -32
- package/dist/index.js +253 -22
- package/dist/index.js.map +1 -1
- package/package.json +18 -12
- package/src/{DevToolsProvider.ts → api/DevToolsProvider.ts} +29 -1
- package/src/{providers → api/providers}/DevToolsMetadataProvider.ts +210 -2
- package/src/api/schemas/DevAtomMetadata.ts +26 -0
- package/src/api/schemas/DevCommandMetadata.ts +9 -0
- package/src/api/schemas/DevEntityMetadata.ts +57 -0
- package/src/api/schemas/DevEnvMetadata.ts +22 -0
- package/src/{schemas → api/schemas}/DevMetadata.ts +10 -1
- package/src/api/schemas/DevRouteMetadata.ts +8 -0
- package/src/index.ts +23 -16
- package/src/ui/AppRouter.tsx +85 -2
- package/src/ui/components/DevAtomsViewer.tsx +636 -0
- package/src/ui/components/DevCacheInspector.tsx +423 -0
- package/src/ui/components/DevDashboard.tsx +188 -0
- package/src/ui/components/DevEnvExplorer.tsx +462 -0
- package/src/ui/components/DevLayout.tsx +65 -4
- package/src/ui/components/DevLogViewer.tsx +161 -163
- package/src/ui/components/DevQueueMonitor.tsx +51 -0
- package/src/ui/components/DevTopicsViewer.tsx +690 -0
- package/src/ui/components/actions/ActionGroup.tsx +37 -0
- package/src/ui/components/actions/ActionItem.tsx +138 -0
- package/src/ui/components/actions/DevActionsExplorer.tsx +132 -0
- package/src/ui/components/actions/MethodBadge.tsx +18 -0
- package/src/ui/components/actions/SchemaViewer.tsx +21 -0
- package/src/ui/components/actions/TryItPanel.tsx +140 -0
- package/src/ui/components/actions/constants.ts +7 -0
- package/src/ui/components/actions/helpers.ts +18 -0
- package/src/ui/components/actions/index.ts +8 -0
- package/src/ui/components/db/ColumnBadge.tsx +55 -0
- package/src/ui/components/db/DevDbStudio.tsx +485 -0
- package/src/ui/components/db/constants.ts +11 -0
- package/src/ui/components/db/index.ts +4 -0
- package/src/ui/components/db/types.ts +7 -0
- package/src/ui/components/graph/DevDependencyGraph.tsx +358 -0
- package/src/ui/components/graph/GraphControls.tsx +162 -0
- package/src/ui/components/graph/NodeDetails.tsx +181 -0
- package/src/ui/components/graph/ProviderNode.tsx +97 -0
- package/src/ui/components/graph/constants.ts +35 -0
- package/src/ui/components/graph/helpers.ts +443 -0
- package/src/ui/components/graph/index.ts +7 -0
- package/src/ui/components/graph/types.ts +28 -0
- package/src/ui/styles.css +0 -6
- package/src/ui/resources/wotfardregular/stylesheet.css +0 -12
- package/src/ui/resources/wotfardregular/wotfard-regular-webfont.eot +0 -0
- package/src/ui/resources/wotfardregular/wotfard-regular-webfont.ttf +0 -0
- package/src/ui/resources/wotfardregular/wotfard-regular-webfont.woff2 +0 -0
- /package/src/{entities → api/entities}/logs.ts +0 -0
- /package/src/{providers → api/providers}/DevToolsDatabaseProvider.ts +0 -0
- /package/src/{repositories → api/repositories}/LogRepository.ts +0 -0
- /package/src/{schemas → api/schemas}/DevActionMetadata.ts +0 -0
- /package/src/{schemas → api/schemas}/DevBucketMetadata.ts +0 -0
- /package/src/{schemas → api/schemas}/DevCacheMetadata.ts +0 -0
- /package/src/{schemas → api/schemas}/DevModuleMetadata.ts +0 -0
- /package/src/{schemas → api/schemas}/DevPageMetadata.ts +0 -0
- /package/src/{schemas → api/schemas}/DevProviderMetadata.ts +0 -0
- /package/src/{schemas → api/schemas}/DevQueueMetadata.ts +0 -0
- /package/src/{schemas → api/schemas}/DevRealmMetadata.ts +0 -0
- /package/src/{schemas → api/schemas}/DevSchedulerMetadata.ts +0 -0
- /package/src/{schemas → api/schemas}/DevTopicMetadata.ts +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{an as me,r as F,j as G,f as _e,b as Ae,q as We,s as Ze,av as ot,a0 as Te,aC as ut,U as Me,a3 as He,ay as st,d as lt,au as Ne,t as ge,aB as Xe,aG as ct,$ as ft,B as je,v as dt,a1 as vt,w as mt}from"./entry.BY4L2Uc6.js";import{n as Oe}from"./chunk.BjFrJKj1.js";import{I as gt,a as ht,b as pt}from"./chunk.qDx9cjbN.js";function qe(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r}var be;(function(e){e.event="event",e.props="prop"})(be||(be={}));function ie(){}function bt(e){var t,r=void 0;return function(){for(var a=[],n=arguments.length;n--;)a[n]=arguments[n];return t&&a.length===t.length&&a.every(function(i,l){return i===t[l]})||(t=a,r=e.apply(void 0,a)),r}}function Se(e){return!!(e||"").match(/\d/)}function he(e){return e==null}function St(e){return typeof e=="number"&&isNaN(e)}function Je(e){return he(e)||St(e)||typeof e=="number"&&!isFinite(e)}function Qe(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function wt(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function xt(e,t,r){var a=wt(r),n=e.search(/[1-9]/);return n=n===-1?e.length:n,e.substring(0,n)+e.substring(n,e.length).replace(a,"$1"+t)}function Nt(e){var t=F.useRef(e);t.current=e;var r=F.useRef(function(){for(var a=[],n=arguments.length;n--;)a[n]=arguments[n];return t.current.apply(t,a)});return r.current}function Be(e,t){t===void 0&&(t=!0);var r=e[0]==="-",a=r&&t;e=e.replace("-","");var n=e.split("."),i=n[0],l=n[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:r,addNegation:a}}function yt(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),a=r[0].replace(/^0+/,"")||"0",n=r[1]||"";return(t?"-":"")+a+(n?"."+n:"")}function Ye(e,t,r){for(var a="",n=r?"0":"",i=0;i<=t-1;i++)a+=e[i]||n;return a}function Le(e,t){return Array(t+1).join(e)}function et(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var a=t.split(/[eE]/g),n=a[0],i=a[1];if(i=Number(i),!i)return r+n;n=n.replace(".","");var l=1+i,S=n.length;return l<0?n="0."+Le("0",Math.abs(l))+n:l>=S?n=n+Le("0",l-S):n=(n.substring(0,l)||"0")+"."+n.substring(l),r+n}function Ge(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var a=(e.indexOf(".")!==-1||r)&&t,n=Be(e),i=n.beforeDecimal,l=n.afterDecimal,S=n.hasNegation,N=parseFloat("0."+(l||"0")),w=l.length<=t?"0."+l:N.toFixed(t),x=w.split("."),g=i;i&&Number(x[0])&&(g=i.split("").reverse().reduce(function(C,D,m){return C.length>m?(Number(C[0])+Number(D)).toString()+C.substring(1,C.length):D+C},x[0]));var d=Ye(x[1]||"",t,r),h=S?"-":"",f=a?".":"";return""+h+g+f+d}function ce(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var tt=bt(function(e,t){for(var r=0,a=0,n=e.length,i=t.length;e[r]===t[r]&&r<n;)r++;for(;e[n-1-a]===t[i-1-a]&&i-a>r&&n-a>r;)a++;return{from:{start:r,end:n-a},to:{start:r,end:i-a}}}),Vt=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Ct(e,t,r){return Math.min(Math.max(e,t),r)}function De(e){return Math.max(e.selectionStart,e.selectionEnd)}function Dt(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function It(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Rt(e){var t=e.currentValue,r=e.formattedValue,a=e.currentValueIndex,n=e.formattedValueIndex;return t[a]===r[n]}function Et(e,t,r,a,n,i,l){l===void 0&&(l=Rt);var S=n.findIndex(function(Z){return Z}),N=e.slice(0,S);!t&&!r.startsWith(N)&&(t=N,r=N+r,a=a+N.length);for(var w=r.length,x=e.length,g={},d=new Array(w),h=0;h<w;h++){d[h]=-1;for(var f=0,C=x;f<C;f++){var D=l({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:h,formattedValueIndex:f});if(D&&g[f]!==!0){d[h]=f,g[f]=!0;break}}}for(var m=a;m<w&&(d[m]===-1||!i(r[m]));)m++;var k=m===w||d[m]===-1?x:d[m];for(m=a-1;m>0&&d[m]===-1;)m--;var M=m===-1||d[m]===-1?0:d[m]+1;return M>k?k:a-M<k-a?M:k}function Ke(e,t,r,a){var n=e.length;if(t=Ct(t,0,n),a==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=n&&!r[t];)t++;t>n&&(t=r.lastIndexOf(!0))}return t===-1&&(t=n),t}function _t(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,a=t.length;r<a;r++)t[r]=!!(Se(e[r])||Se(e[r-1]));return t}function rt(e,t,r,a,n,i){i===void 0&&(i=ie);var l=Nt(function(f,C){var D,m;return Je(f)?(m="",D=""):typeof f=="number"||C?(m=typeof f=="number"?et(f):f,D=a(m)):(m=n(f,void 0),D=a(m)),{formattedValue:D,numAsString:m}}),S=F.useState(function(){return l(he(e)?t:e,r)}),N=S[0],w=S[1],x=function(f,C){f.formattedValue!==N.formattedValue&&w({formattedValue:f.formattedValue,numAsString:f.value}),i(f,C)},g=e,d=r;he(e)&&(g=N.numAsString,d=!0);var h=l(g,d);return F.useMemo(function(){w(h)},[h.formattedValue]),[N,x]}function At(e){return e.replace(/[^0-9]/g,"")}function Tt(e){return e}function Bt(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var a=e.customInput,n=e.renderText,i=e.getInputRef,l=e.format;l===void 0&&(l=Tt);var S=e.removeFormatting;S===void 0&&(S=At);var N=e.defaultValue,w=e.valueIsNumericString,x=e.onValueChange,g=e.isAllowed,d=e.onChange;d===void 0&&(d=ie);var h=e.onKeyDown;h===void 0&&(h=ie);var f=e.onMouseUp;f===void 0&&(f=ie);var C=e.onFocus;C===void 0&&(C=ie);var D=e.onBlur;D===void 0&&(D=ie);var m=e.value,k=e.getCaretBoundary;k===void 0&&(k=_t);var M=e.isValidInputCharacter;M===void 0&&(M=Se);var Z=e.isCharacterSame,j=qe(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),J=rt(m,N,!!w,l,S,x),$=J[0],I=$.formattedValue,O=$.numAsString,K=J[1],U=F.useRef(),H=F.useRef({formattedValue:I,numAsString:O}),z=function(o,s){H.current={formattedValue:o.formattedValue,numAsString:o.value},K(o,s)},Q=F.useState(!1),q=Q[0],v=Q[1],c=F.useRef(null),R=F.useRef({setCaretTimeout:null,focusTimeout:null});F.useEffect(function(){return v(!0),function(){clearTimeout(R.current.setCaretTimeout),clearTimeout(R.current.focusTimeout)}},[]);var T=l,B=function(o,s){var p=parseFloat(s);return{formattedValue:o,value:s,floatValue:isNaN(p)?void 0:p}},y=function(o,s,p){o.selectionStart===0&&o.selectionEnd===o.value.length||(ce(o,s),R.current.setCaretTimeout=setTimeout(function(){o.value===p&&o.selectionStart!==s&&ce(o,s)},0))},P=function(o,s,p){return Ke(o,s,k(o),p)},Y=function(o,s,p){var _=k(s),L=Et(s,I,o,p,_,M,Z);return L=Ke(s,L,_),L},X=function(o){var s=o.formattedValue;s===void 0&&(s="");var p=o.input,_=o.source,L=o.event,E=o.numAsString,V;if(p){var W=o.inputValue||p.value,ee=De(p);p.value=s,V=Y(W,s,ee),V!==void 0&&y(p,V,s)}s!==I&&z(B(s,E),{event:L,source:_})};F.useEffect(function(){var o=H.current,s=o.formattedValue,p=o.numAsString;(I!==s||O!==p)&&z(B(I,O),{event:void 0,source:be.props})},[I,O]);var oe=c.current?De(c.current):void 0,fe=typeof window<"u"?F.useLayoutEffect:F.useEffect;fe(function(){var o=c.current;if(I!==H.current.formattedValue&&o){var s=Y(H.current.formattedValue,I,oe);o.value=I,y(o,s,I)}},[I]);var A=function(o,s,p){var _=s.target,L=U.current?Vt(U.current,_.selectionEnd):tt(I,o),E=Object.assign(Object.assign({},L),{lastValue:I}),V=S(o,E),W=T(V);if(V=S(W,void 0),g&&!g(B(W,V))){var ee=s.target,u=De(ee),b=Y(o,I,u);return ee.value=I,y(ee,b,I),!1}return X({formattedValue:W,numAsString:V,inputValue:o,event:s,source:p,input:s.target}),!0},ae=function(o,s){s===void 0&&(s=0);var p=o.selectionStart,_=o.selectionEnd;U.current={selectionStart:p,selectionEnd:_+s}},we=function(o){var s=o.target,p=s.value,_=A(p,o,be.event);_&&d(o),U.current=void 0},te=function(o){var s=o.target,p=o.key,_=s.selectionStart,L=s.selectionEnd,E=s.value;E===void 0&&(E="");var V;p==="ArrowLeft"||p==="Backspace"?V=Math.max(_-1,0):p==="ArrowRight"?V=Math.min(_+1,E.length):p==="Delete"&&(V=_);var W=0;p==="Delete"&&_===L&&(W=1);var ee=p==="ArrowLeft"||p==="ArrowRight";if(V===void 0||_!==L&&!ee){h(o),ae(s,W);return}var u=V;if(ee){var b=p==="ArrowLeft"?"left":"right";u=P(E,V,b),u!==V&&o.preventDefault()}else p==="Delete"&&!M(E[V])?u=P(E,V,"right"):p==="Backspace"&&!M(E[V])&&(u=P(E,V,"left"));u!==V&&y(s,u,E),h(o),ae(s,W)},ue=function(o){var s=o.target,p=function(){var _=s.selectionStart,L=s.selectionEnd,E=s.value;if(E===void 0&&(E=""),_===L){var V=P(E,_);V!==_&&y(s,V,E)}};p(),requestAnimationFrame(function(){p()}),f(o),ae(s)},pe=function(o){o.persist&&o.persist();var s=o.target,p=o.currentTarget;c.current=s,R.current.focusTimeout=setTimeout(function(){var _=s.selectionStart,L=s.selectionEnd,E=s.value;E===void 0&&(E="");var V=P(E,_);V!==_&&!(_===0&&L===E.length)&&y(s,V,E),C(Object.assign(Object.assign({},o),{currentTarget:p}))},0)},Ve=function(o){c.current=null,clearTimeout(R.current.focusTimeout),clearTimeout(R.current.setCaretTimeout),D(o)},se=q&&Dt()?"numeric":void 0,de=Object.assign({inputMode:se},j,{type:t,value:I,onChange:we,onKeyDown:te,onMouseUp:ue,onFocus:pe,onBlur:Ve});if(r==="text")return n?me.createElement(me.Fragment,null,n(I,j)||null):me.createElement("span",Object.assign({},j,{ref:i}),I);if(a){var ve=a;return me.createElement(ve,Object.assign({},de,{ref:i}))}return me.createElement("input",Object.assign({},de,{ref:i}))}function $e(e,t){var r=t.decimalScale,a=t.fixedDecimalScale,n=t.prefix;n===void 0&&(n="");var i=t.suffix;i===void 0&&(i="");var l=t.allowNegative,S=t.thousandsGroupStyle;if(S===void 0&&(S="thousand"),e===""||e==="-")return e;var N=ye(t),w=N.thousandSeparator,x=N.decimalSeparator,g=r!==0&&e.indexOf(".")!==-1||r&&a,d=Be(e,l),h=d.beforeDecimal,f=d.afterDecimal,C=d.addNegation;return r!==void 0&&(f=Ye(f,r,!!a)),w&&(h=xt(h,w,S)),n&&(h=n+h),i&&(f=f+i),C&&(h="-"+h),e=h+(g&&x||"")+f,e}function ye(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,a=e.allowedDecimalSeparators;return r===!0&&(r=","),a||(a=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:a}}function Pt(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),a=new RegExp("(-)(.)*(-)"),n=r.test(e),i=a.test(e);return e=e.replace(/-/g,""),n&&!i&&t&&(e="-"+e),e}function kt(e,t){return new RegExp("(^-)|[0-9]|"+Qe(e),"g")}function Ft(e,t,r){return e===""?!0:!t?.match(/\d/)&&!r?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function Mt(e,t,r){var a;t===void 0&&(t=It(e));var n=r.allowNegative,i=r.prefix;i===void 0&&(i="");var l=r.suffix;l===void 0&&(l="");var S=r.decimalScale,N=t.from,w=t.to,x=w.start,g=w.end,d=ye(r),h=d.allowedDecimalSeparators,f=d.decimalSeparator,C=e[g]===f;if(Se(e)&&(e===i||e===l)&&t.lastValue==="")return e;if(g-x===1&&h.indexOf(e[x])!==-1){var D=S===0?"":f;e=e.substring(0,x)+D+e.substring(x+1,e.length)}var m=function(c,R,T){var B=!1,y=!1;i.startsWith("-")?B=!1:c.startsWith("--")?(B=!1,y=!0):l.startsWith("-")&&c.length===l.length?B=!1:c[0]==="-"&&(B=!0);var P=B?1:0;return y&&(P=2),P&&(c=c.substring(P),R-=P,T-=P),{value:c,start:R,end:T,hasNegation:B}},k=m(e,x,g),M=k.hasNegation;a=k,e=a.value,x=a.start,g=a.end;var Z=m(t.lastValue,N.start,N.end),j=Z.start,J=Z.end,$=Z.value,I=e.substring(x,g);e.length&&$.length&&(j>$.length-l.length||J<i.length)&&!(I&&l.startsWith(I))&&(e=$);var O=0;e.startsWith(i)?O+=i.length:x<i.length&&(O=x),e=e.substring(O),g-=O;var K=e.length,U=e.length-l.length;e.endsWith(l)?K=U:(g>U||g>e.length-l.length)&&(K=g),e=e.substring(0,K),e=Pt(M?"-"+e:e,n),e=(e.match(kt(f))||[]).join("");var H=e.indexOf(f);e=e.replace(new RegExp(Qe(f),"g"),function(c,R){return R===H?".":""});var z=Be(e,n),Q=z.beforeDecimal,q=z.afterDecimal,v=z.addNegation;return w.end-w.start<N.end-N.start&&Q===""&&C&&!parseFloat(q)&&(e=v?"-":""),e}function jt(e,t){var r=t.prefix;r===void 0&&(r="");var a=t.suffix;a===void 0&&(a="");var n=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";n.fill(!1,0,r.length+(i?1:0));var l=e.length;return n.fill(!1,l-a.length+1,l+1),n}function Ot(e){var t=ye(e),r=t.thousandSeparator,a=t.decimalSeparator,n=e.prefix;n===void 0&&(n="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===a)throw new Error(`
|
|
2
|
+
Decimal separator can't be same as thousand separator.
|
|
3
|
+
thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
4
|
+
decimalSeparator: `+a+` (default value for decimalSeparator is .)
|
|
5
|
+
`);return n.startsWith("-")&&i&&(console.error(`
|
|
6
|
+
Prefix can't start with '-' when allowNegative is true.
|
|
7
|
+
prefix: `+n+`
|
|
8
|
+
allowNegative: `+i+`
|
|
9
|
+
`),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function Lt(e){e=Ot(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,r=e.allowNegative,a=e.allowLeadingZeros,n=e.onKeyDown;n===void 0&&(n=ie);var i=e.onBlur;i===void 0&&(i=ie);var l=e.thousandSeparator,S=e.decimalScale,N=e.fixedDecimalScale,w=e.prefix;w===void 0&&(w="");var x=e.defaultValue,g=e.value,d=e.valueIsNumericString,h=e.onValueChange,f=qe(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),C=ye(e),D=C.decimalSeparator,m=C.allowedDecimalSeparators,k=function(v){return $e(v,e)},M=function(v,c){return Mt(v,c,e)},Z=he(g)?x:g,j=d??Ft(Z,w,t);he(g)?he(x)||(j=j||typeof x=="number"):j=j||typeof g=="number";var J=function(v){return Je(v)?v:(typeof v=="number"&&(v=et(v)),j&&typeof S=="number"?Ge(v,S,!!N):v)},$=rt(J(g),J(x),!!j,k,M,h),I=$[0],O=I.numAsString,K=I.formattedValue,U=$[1],H=function(v){var c=v.target,R=v.key,T=c.selectionStart,B=c.selectionEnd,y=c.value;if(y===void 0&&(y=""),(R==="Backspace"||R==="Delete")&&B<w.length){v.preventDefault();return}if(T!==B){n(v);return}R==="Backspace"&&y[0]==="-"&&T===w.length+1&&r&&ce(c,1),S&&N&&(R==="Backspace"&&y[T-1]===D?(ce(c,T-1),v.preventDefault()):R==="Delete"&&y[T]===D&&v.preventDefault()),m?.includes(R)&&y[T]===D&&ce(c,T+1);var P=l===!0?",":l;R==="Backspace"&&y[T-1]===P&&ce(c,T-1),R==="Delete"&&y[T]===P&&ce(c,T+1),n(v)},z=function(v){var c=O;if(c.match(/\d/g)||(c=""),a||(c=yt(c)),N&&S&&(c=Ge(c,S,N)),c!==O){var R=$e(c,e);U({formattedValue:R,value:c,floatValue:parseFloat(c)},{event:v,source:be.event})}i(v)},Q=function(v){return v===D?!0:Se(v)},q=function(v){var c=v.currentValue,R=v.lastValue,T=v.formattedValue,B=v.currentValueIndex,y=v.formattedValueIndex,P=c[B],Y=T[y],X=tt(R,c),oe=X.to,fe=function(A){return M(A).indexOf(".")+w.length};return g===0&&N&&S&&c[oe.start]===D&&fe(c)<B&&fe(T)>y?!1:B>=oe.start&&B<oe.end&&m&&m.includes(P)&&Y===D?!0:P===Y};return Object.assign(Object.assign({},f),{value:K,valueIsNumericString:!1,isValidInputCharacter:Q,isCharacterSame:q,onValueChange:U,format:k,removeFormatting:M,getCaretBoundary:function(v){return jt(v,e)},onKeyDown:H,onBlur:z})}function Gt(e){var t=Lt(e);return me.createElement(Bt,Object.assign({},t))}function Ue({direction:e,style:t,...r}){return G.jsx("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:e==="up"?"rotate(180deg)":void 0,...t},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:G.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var Re={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};const Kt=/^(0\.0*|-0(\.0*)?)$/,$t=/^-?0\d+(\.\d+)?\.?$/,Ut=/\.\d*0$/;function Ee(e){return typeof e=="string"&&e!==""&&!Number.isNaN(Number(e))}function Ie(e){return typeof e=="number"?e<Number.MAX_SAFE_INTEGER:e===""||Ee(e)&&Number(e)<Number.MAX_SAFE_INTEGER}function zt(e){return e.toString().replace(".","").length}function Wt(e,t){return(typeof e=="number"?e<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&zt(t)<14&&t!==""}function ze(e,t,r){if(e===void 0)return!0;const a=t===void 0||e>=t,n=r===void 0||e<=r;return a&&n}const Zt={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[".",","]},Ht=Ze((e,{size:t})=>({controls:{"--ni-chevron-size":ge(t,"ni-chevron-size")}}));function Xt(e,t,r){const a=e.toString().replace(/^0+(?=\d)/,""),n=parseFloat(a);return Number.isNaN(n)?a:n>Number.MAX_SAFE_INTEGER?t!==void 0?t:a:Ne(n,r,t)}const at=_e((e,t)=>{const r=Ae("NumberInput",Zt,e),{className:a,classNames:n,styles:i,unstyled:l,vars:S,onChange:N,onValueChange:w,value:x,defaultValue:g,max:d,min:h,step:f,hideControls:C,rightSection:D,isAllowed:m,clampBehavior:k,onBlur:M,allowDecimal:Z,decimalScale:j,onKeyDown:J,onKeyDownCapture:$,handlersRef:I,startValue:O,disabled:K,rightSectionPointerEvents:U,allowNegative:H,readOnly:z,size:Q,rightSectionWidth:q,stepHoldInterval:v,stepHoldDelay:c,allowLeadingZeros:R,withKeyboardEvents:T,trimLeadingZeroesOnBlur:B,allowedDecimalSeparators:y,attributes:P,...Y}=r,X=We({name:"NumberInput",classes:Re,props:r,classNames:n,styles:i,unstyled:l,attributes:P,vars:S,varsResolver:Ht}),{resolvedClassNames:oe,resolvedStyles:fe}=ot({classNames:n,styles:i,props:r}),[A,ae]=Te({value:x,defaultValue:g,finalValue:"",onChange:N}),we=c!==void 0&&v!==void 0,te=F.useRef(null),ue=F.useRef(null),pe=F.useRef(0),Ve=(u,b)=>{b.source==="event"&&ae(Wt(u.floatValue,u.value)&&!Kt.test(u.value)&&!(R&&$t.test(u.value))&&!Ut.test(u.value)?u.floatValue:u.value),w?.(u,b)},se=u=>{const b=String(u).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},de=u=>{te.current&&typeof u<"u"&&te.current.setSelectionRange(u,u)},ve=F.useRef(Oe);ve.current=()=>{if(!Ie(A))return;let u;const b=se(A),Ce=se(f),xe=Math.max(b,Ce),re=10**xe;if(!Ee(A)&&(typeof A!="number"||Number.isNaN(A)))u=Ne(O,h,d);else if(d!==void 0){const le=(Math.round(Number(A)*re)+Math.round(f*re))/re;u=le<=d?le:d}else u=(Math.round(Number(A)*re)+Math.round(f*re))/re;const ne=u.toFixed(xe);ae(parseFloat(ne)),w?.({floatValue:parseFloat(ne),formattedValue:ne,value:ne},{source:"increment"}),setTimeout(()=>de(te.current?.value.length),0)};const o=F.useRef(Oe);o.current=()=>{if(!Ie(A))return;let u;const b=h!==void 0?h:H?Number.MIN_SAFE_INTEGER:0,Ce=se(A),xe=se(f),re=Math.max(Ce,xe),ne=10**re;if(!Ee(A)&&typeof A!="number"||Number.isNaN(A))u=Ne(O,b,d);else{const Fe=(Math.round(Number(A)*ne)-Math.round(f*ne))/ne;u=b!==void 0&&Fe<b?b:Fe}const le=u.toFixed(re);ae(parseFloat(le)),w?.({floatValue:parseFloat(le),formattedValue:le,value:le},{source:"decrement"}),setTimeout(()=>de(te.current?.value.length),0)};const s=u=>{J?.(u),!(z||!T)&&(u.key==="ArrowUp"&&(u.preventDefault(),ve.current?.()),u.key==="ArrowDown"&&(u.preventDefault(),o.current?.()))},p=u=>{if($?.(u),u.key==="Backspace"){const b=te.current;b&&b.selectionStart===0&&b.selectionStart===b.selectionEnd&&(u.preventDefault(),window.setTimeout(()=>de(0),0))}},_=u=>{let b=A;k==="blur"&&typeof b=="number"&&(b=Ne(b,h,d)),B&&typeof b=="string"&&se(b)<15&&(b=Xt(b,d,h)),A!==b&&ae(b),M?.(u)};ut(I,{increment:ve.current,decrement:o.current});const L=u=>{u?ve.current?.():o.current?.(),pe.current+=1},E=u=>{if(L(u),we){const b=typeof v=="number"?v:v(pe.current);ue.current=window.setTimeout(()=>E(u),b)}},V=(u,b)=>{u.preventDefault(),te.current?.focus(),L(b),we&&(ue.current=window.setTimeout(()=>E(b),c))},W=()=>{ue.current&&window.clearTimeout(ue.current),ue.current=null,pe.current=0},ee=G.jsxs("div",{...X("controls"),children:[G.jsx(Me,{...X("control"),tabIndex:-1,"aria-hidden":!0,disabled:K||typeof A=="number"&&d!==void 0&&A>=d,mod:{direction:"up"},onMouseDown:u=>u.preventDefault(),onPointerDown:u=>{V(u,!0)},onPointerUp:W,onPointerLeave:W,children:G.jsx(Ue,{direction:"up"})}),G.jsx(Me,{...X("control"),tabIndex:-1,"aria-hidden":!0,disabled:K||typeof A=="number"&&h!==void 0&&A<=h,mod:{direction:"down"},onMouseDown:u=>u.preventDefault(),onPointerDown:u=>{V(u,!1)},onPointerUp:W,onPointerLeave:W,children:G.jsx(Ue,{direction:"down"})})]});return G.jsx(He,{component:Gt,allowNegative:H,className:lt(Re.root,a),size:Q,inputMode:"decimal",...Y,readOnly:z,disabled:K,value:A,getInputRef:st(t,te),onValueChange:Ve,rightSection:C||z||!Ie(A)?D:D||ee,classNames:oe,styles:fe,unstyled:l,__staticSelector:"NumberInput",decimalScale:Z?j:0,onKeyDown:s,onKeyDownCapture:p,rightSectionPointerEvents:U??(K?"none":void 0),rightSectionWidth:q??`var(--ni-right-section-width-${Q||"sm"})`,allowLeadingZeros:R,allowedDecimalSeparators:y,onBlur:_,attributes:P,isAllowed:u=>k==="strict"?m?m(u)&&ze(u.floatValue,h,d):ze(u.floatValue,h,d):m?m(u):!0})});at.classes={...He.classes,...Re};at.displayName="@mantine/core/NumberInput";const nt=F.createContext(null),qt=nt.Provider,Jt=()=>F.useContext(nt),Pe=_e((e,t)=>{const{value:r,defaultValue:a,onChange:n,size:i,wrapperProps:l,children:S,readOnly:N,disabled:w,...x}=Ae("SwitchGroup",null,e),[g,d]=Te({value:r,defaultValue:a,finalValue:[],onChange:n}),h=f=>{const C=f.currentTarget.value;!N&&d(g.includes(C)?g.filter(D=>D!==C):[...g,C])};return G.jsx(qt,{value:{value:g,onChange:h,size:i,disabled:w},children:G.jsx(Xe.Wrapper,{size:i,ref:t,...l,...x,labelElement:"div",__staticSelector:"SwitchGroup",children:G.jsx(gt,{role:"group",children:S})})})});Pe.classes=Xe.Wrapper.classes;Pe.displayName="@mantine/core/SwitchGroup";var it={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};const Qt={labelPosition:"right",withThumbIndicator:!0},Yt=Ze((e,{radius:t,color:r,size:a})=>({root:{"--switch-radius":t===void 0?void 0:vt(t),"--switch-height":ge(a,"switch-height"),"--switch-width":ge(a,"switch-width"),"--switch-thumb-size":ge(a,"switch-thumb-size"),"--switch-label-font-size":ge(a,"switch-label-font-size"),"--switch-track-label-padding":ge(a,"switch-track-label-padding"),"--switch-color":r?dt(r,e):void 0}})),ke=_e((e,t)=>{const r=Ae("Switch",Qt,e),{classNames:a,className:n,style:i,styles:l,unstyled:S,vars:N,color:w,label:x,offLabel:g,onLabel:d,id:h,size:f,radius:C,wrapperProps:D,thumbIcon:m,checked:k,defaultChecked:M,onChange:Z,labelPosition:j,description:J,error:$,disabled:I,variant:O,rootRef:K,mod:U,withThumbIndicator:H,attributes:z,...Q}=r,q=Jt(),v=f||q?.size,c=We({name:"Switch",props:r,classes:it,className:n,style:i,classNames:a,styles:l,unstyled:S,attributes:z,vars:N,varsResolver:Yt}),{styleProps:R,rest:T}=ct(Q),B=ft(h),y={checked:q?.value.includes(T.value)??k,onChange:X=>{q?.onChange(X),Z?.(X)},disabled:q?.disabled??I},[P,Y]=Te({value:y.checked??k,defaultValue:M,finalValue:!1});return G.jsxs(ht,{...c("root"),__staticSelector:"Switch",__stylesApiProps:r,id:B,size:v,labelPosition:j,label:x,description:J,error:$,disabled:y.disabled,bodyElement:"label",labelElement:"span",classNames:a,styles:l,unstyled:S,"data-checked":y.checked,variant:O,ref:K,mod:U,...R,...D,children:[G.jsx("input",{...T,...y,checked:P,"data-checked":y.checked,onChange:X=>{y.onChange?.(X),Y(X.currentTarget.checked)},id:B,ref:t,type:"checkbox",role:"switch",...c("input")}),G.jsxs(je,{"aria-hidden":"true",component:"span",mod:{error:$,"label-position":j,"without-labels":!d&&!g},...c("track"),children:[G.jsx(je,{component:"span",mod:{"reduce-motion":!0,"with-thumb-indicator":H&&!m},...c("thumb"),children:m}),G.jsx("span",{...c("trackLabel"),children:P?d:g})]})]})});ke.classes={...it,...pt};ke.displayName="@mantine/core/Switch";ke.Group=Pe;const er=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],nr=mt("outline","refresh","Refresh",er);export{nr as I,at as N,ke as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as C,Y as O,Z as R,r as x,j as e,F as m,T as i,B as c,H as j,ae as D,z as B,ac as z,O as S,E as F,G as _,af as w,ad as v,a5 as $,a9 as I}from"./entry.BY4L2Uc6.js";import{d as A}from"./chunk.Cw2RCl4F.js";import{S as f,B as T}from"./chunk.Dry2LXOT.js";import{I as H}from"./chunk.DEUHUxKv.js";import{T as g}from"./chunk.rJToME5k.js";import{I as J}from"./chunk.DIfRZc20.js";import{I as V,a as G}from"./chunk.C49FcqzR.js";import{T as Y}from"./chunk.DHWcJNNS.js";import"./chunk.BlqFPyLh.js";import"./chunk.uyVen0u2.js";const Z=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],q=C("outline","folder-open","FolderOpen",Z);const K=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],Q=C("outline","folder","Folder",K);const U=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],L=C("outline","send","Send",U),M={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},E=s=>M[s]??M.default,W=s=>{const o={name:"",fullPath:"",children:new Map};for(const p of s){const a=p.name.split(/[./]/);let l=o;for(let n=0;n<a.length;n++){const r=a[n],d=a.slice(0,n+1).join("/");l.children.has(r)||l.children.set(r,{name:r,fullPath:d,children:new Map}),l=l.children.get(r)}l.topic=p}return o},N=({node:s,depth:o,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n})=>{const r=s.children.size>0,d=l.has(s.fullPath),b=s.topic&&p?.name===s.topic.name,t=s.topic?E(s.topic.provider):"#495057",u=()=>{s.topic&&a(s.topic),r&&n(s.fullPath)};return e.jsxs(c,{children:[e.jsxs(m,{align:"center",gap:4,px:"sm",py:4,onClick:u,style:{cursor:"pointer",paddingLeft:o*16+8,backgroundColor:b?`${t}15`:void 0,borderLeft:b?`2px solid ${t}`:"2px solid transparent",borderBottom:`1px solid ${j.colors.border}`},children:[r?d?e.jsx(F,{size:12,opacity:.5}):e.jsx(_,{size:12,opacity:.5}):e.jsx(c,{w:12}),r?d?e.jsx(q,{size:14,opacity:.5}):e.jsx(Q,{size:14,opacity:.5}):e.jsx(S,{size:14,opacity:.5}),e.jsx(i,{size:"sm",style:{flex:1},truncate:!0,fw:s.topic?500:400,children:s.name}),s.topic&&e.jsx(T,{size:"xs",variant:"light",color:s.topic.provider==="redis"?"red":"green",children:s.topic.provider})]}),r&&d&&e.jsx(c,{children:Array.from(s.children.values()).sort((h,y)=>{const P=h.children.size>0,k=y.children.size>0;return P&&!k?-1:!P&&k?1:h.name.localeCompare(y.name)}).map(h=>e.jsx(N,{node:h,depth:o+1,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n},h.fullPath))})]})},X=({topics:s,selectedTopic:o,onSelectTopic:p,search:a,onSearchChange:l})=>{const[n,r]=x.useState(new Set),d=x.useMemo(()=>W(s),[s]);x.useEffect(()=>{const t=new Set,u=h=>{h.fullPath&&t.add(h.fullPath);for(const y of h.children.values())u(y)};u(d),r(t)},[d]);const b=x.useCallback(t=>{r(u=>{const h=new Set(u);return h.has(t)?h.delete(t):h.add(t),h})},[]);return e.jsxs(f,{gap:0,h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsx(D,{placeholder:"Search topics...",leftSection:e.jsx(B,{size:14}),size:"xs",value:a,onChange:t=>l(t.target.value)})}),e.jsx(z,{style:{flex:1},children:Array.from(d.children.values()).sort((t,u)=>t.name.localeCompare(u.name)).map(t=>e.jsx(N,{node:t,depth:0,selectedTopic:o,onSelectTopic:p,expandedNodes:n,onToggleExpand:b},t.fullPath))})]})},ee=({topic:s})=>e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"lg",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Topic Info"}),e.jsxs(f,{gap:"xs",children:[e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Name"}),e.jsx(i,{size:"sm",ff:"monospace",children:s.name})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Provider"}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Description"}),e.jsx(i,{size:"sm",children:s.description})]})]})]}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Message Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:5,size:"xs"})})]})]})}),se=({topic:s})=>{const[o,p]=x.useState([]),[a,l]=x.useState(!1),n=x.useCallback(()=>{const r=s.schema?{example:"data",topic:s.name,timestamp:new Date().toISOString()}:{message:`Hello from ${s.name}`};p(d=>[{id:Math.random().toString(36).slice(2),timestamp:new Date,payload:r},...d.slice(0,49)])},[s]);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsxs(m,{gap:"sm",align:"center",justify:"space-between",children:[e.jsxs(m,{gap:"sm",align:"center",children:[e.jsx(v,{label:a?"Stop listening (coming soon)":"Start listening (coming soon)",children:e.jsx($,{size:"xs",variant:"light",color:a?"red":"green",leftSection:e.jsx(J,{size:14}),onClick:()=>l(!a),disabled:!0,children:a?"Stop":"Listen"})}),e.jsxs(i,{size:"xs",c:"dimmed",children:[o.length," messages"]})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(v,{label:"Add fake message (for demo)",children:e.jsx(I,{size:"sm",variant:"light",onClick:n,children:e.jsx(L,{size:14})})}),e.jsx(v,{label:"Clear messages",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:()=>p([]),children:e.jsx(V,{size:14})})})]})]})}),o.length===0?e.jsx(m,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"No messages yet"}),e.jsx(i,{size:"xs",c:"dimmed",children:"Click the send icon to add a fake message for demo"})]})}):e.jsx(z,{style:{flex:1},children:e.jsx(f,{gap:0,children:o.map(r=>e.jsxs(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:[e.jsxs(m,{align:"center",gap:"xs",mb:"xs",children:[e.jsx(G,{size:12,opacity:.5}),e.jsx(i,{size:"xs",c:"dimmed",children:r.timestamp.toLocaleTimeString()})]}),e.jsx(c,{p:"xs",style:{backgroundColor:j.colors.surface,borderRadius:4},children:e.jsx(w,{data:r.payload,maxDepth:3,size:"xs",copyable:!1})})]},r.id))})})]})},re=({topic:s})=>{const[o,p]=x.useState(JSON.stringify({message:"Hello",timestamp:new Date().toISOString()},null,2)),[a,l]=x.useState(null),n=()=>{try{JSON.parse(o),l(null),alert(`Message would be published to "${s.name}" (coming soon)`)}catch{l("Invalid JSON")}};return e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"md",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Publish Message"}),e.jsx(i,{size:"xs",c:"dimmed",mb:"sm",children:"Send a test message to this topic (coming soon)"})]}),e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Payload (JSON)"}),e.jsx(Y,{value:o,onChange:r=>p(r.target.value),minRows:8,maxRows:15,autosize:!0,ff:"monospace",size:"xs",error:a,styles:{input:{backgroundColor:j.colors.surface}}})]}),e.jsx(v,{label:"Publish message (coming soon)",children:e.jsx($,{size:"sm",variant:"light",leftSection:e.jsx(L,{size:16}),onClick:n,disabled:!0,children:"Publish"})}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Expected Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:3,size:"xs"})})]})]})})},ie=({topic:s})=>{const o=E(s.provider);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsxs(c,{px:"md",py:"sm",style:{borderBottom:`1px solid ${j.colors.border}`,backgroundColor:`${o}08`},children:[e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(S,{size:18,opacity:.7}),e.jsx(i,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsx(i,{size:"xs",c:"dimmed",mt:4,children:s.description})]}),e.jsxs(g,{defaultValue:"schema",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(g.List,{px:"md",children:[e.jsx(g.Tab,{value:"schema",children:"Schema"}),e.jsx(g.Tab,{value:"messages",children:"Messages"}),e.jsx(g.Tab,{value:"publish",children:"Publish"})]}),e.jsx(g.Panel,{value:"schema",style:{flex:1,overflow:"hidden"},children:e.jsx(ee,{topic:s})}),e.jsx(g.Panel,{value:"messages",style:{flex:1,overflow:"hidden"},children:e.jsx(se,{topic:s})}),e.jsx(g.Panel,{value:"publish",style:{flex:1,overflow:"hidden"},children:e.jsx(re,{topic:s})})]})]})},oe=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"Select a topic to view details"})]})}),te=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(H,{size:48,opacity:.3}),e.jsx(i,{children:"No topics found"}),e.jsx(i,{size:"sm",c:"dimmed",children:"Add topics using $topic primitive to see them here"})]})}),ue=()=>{const s=O(R),[o,p]=x.useState([]),[a,l]=x.useState(!0),[n,r]=x.useState(null),[d,b]=x.useState("");x.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:A}}).then(u=>{p(u.data.topics),l(!1)})},[]);const t=x.useMemo(()=>{if(!d)return o;const u=d.toLowerCase();return o.filter(h=>h.name.toLowerCase().includes(u))},[o,d]);return a?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(i,{c:"dimmed",children:"Loading..."})}):o.length===0?e.jsx(te,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(c,{w:280,style:{borderRight:`1px solid ${j.colors.border}`,backgroundColor:j.colors.surface},children:e.jsx(X,{topics:t,selectedTopic:n,onSelectTopic:r,search:d,onSearchChange:b})}),e.jsx(c,{style:{flex:1,overflow:"hidden"},children:n?e.jsx(ie,{topic:n}):e.jsx(oe,{})})]})};export{ue as DevTopicsViewer,ue as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as a}from"./entry.BY4L2Uc6.js";const e=[["path",{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z",key:"svg-0"}],["path",{d:"M15 9h.01",key:"svg-1"}]],o=a("outline","key","Key",e);export{o as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ap as t}from"./entry.BY4L2Uc6.js";const e=t.object({name:t.text(),group:t.text(),method:t.text(),path:t.text(),prefix:t.text(),fullPath:t.text(),description:t.optional(t.text()),summary:t.optional(t.text()),disabled:t.optional(t.boolean()),secure:t.optional(t.boolean()),hide:t.optional(t.boolean()),body:t.optional(t.any()),params:t.optional(t.any()),query:t.optional(t.any()),response:t.optional(t.any()),bodyContentType:t.optional(t.text())}),a=t.object({name:t.text(),description:t.optional(t.text()),schema:t.any(),defaultValue:t.optional(t.any()),currentValue:t.optional(t.any())}),o=t.object({name:t.text(),description:t.optional(t.text()),mimeTypes:t.optional(t.array(t.text())),maxSize:t.optional(t.number()),provider:t.text()}),n=t.object({name:t.text(),ttl:t.optional(t.any()),disabled:t.optional(t.boolean()),provider:t.text()}),r=t.object({name:t.text(),description:t.optional(t.text()),hidden:t.optional(t.boolean())}),i=t.object({name:t.text(),type:t.text(),nullable:t.boolean(),primaryKey:t.boolean(),identity:t.boolean(),createdAt:t.boolean(),updatedAt:t.boolean(),deletedAt:t.boolean(),version:t.boolean(),hasDefault:t.boolean(),ref:t.optional(t.object({entity:t.text(),column:t.text(),onUpdate:t.optional(t.text()),onDelete:t.optional(t.text())}))}),l=t.object({name:t.optional(t.text()),columns:t.array(t.text()),unique:t.boolean()}),c=t.object({name:t.optional(t.text()),columns:t.array(t.text()),foreignEntity:t.text(),foreignColumns:t.array(t.text())}),s=t.object({name:t.optional(t.text()),columns:t.array(t.text()),unique:t.boolean(),hasCheck:t.boolean()}),p=t.object({name:t.text(),provider:t.text(),columns:t.array(i),indexes:t.array(l),foreignKeys:t.array(c),constraints:t.array(s)}),d=t.object({propertyKey:t.text(),schema:t.any(),values:t.record(t.text(),t.any()),serviceName:t.optional(t.text())}),m=t.object({name:t.text(),providers:t.array(t.text())}),y=t.object({name:t.text(),description:t.optional(t.text()),path:t.optional(t.text()),params:t.optional(t.any()),query:t.optional(t.any()),hasComponent:t.boolean(),hasLazy:t.boolean(),hasResolve:t.boolean(),hasChildren:t.boolean(),hasParent:t.boolean(),hasErrorHandler:t.boolean(),static:t.optional(t.boolean()),cache:t.optional(t.any()),client:t.optional(t.any()),animation:t.optional(t.any())}),x=t.object({name:t.text(),module:t.optional(t.text()),dependencies:t.array(t.text()),aliases:t.optional(t.array(t.text()))}),b=t.object({name:t.text(),description:t.optional(t.text()),schema:t.optional(t.any()),provider:t.text()}),h=t.object({name:t.text(),description:t.optional(t.text()),roles:t.optional(t.array(t.any())),type:t.enum(["internal","external"]),settings:t.optional(t.object({accessTokenExpiration:t.optional(t.any()),refreshTokenExpiration:t.optional(t.any()),hasOnCreateSession:t.boolean(),hasOnRefreshSession:t.boolean(),hasOnDeleteSession:t.boolean()}))}),u=t.object({method:t.text(),path:t.text()}),v=t.object({name:t.text(),description:t.optional(t.text()),cron:t.optional(t.text()),interval:t.optional(t.any()),lock:t.optional(t.boolean())}),S=t.object({name:t.text(),description:t.optional(t.text()),schema:t.optional(t.any()),provider:t.text()}),M=t.object({actions:t.array(e),queues:t.array(b),schedulers:t.array(v),topics:t.array(S),buckets:t.array(o),realms:t.array(h),caches:t.array(n),pages:t.array(y),providers:t.array(x),modules:t.array(m),entities:t.array(p),commands:t.array(r),routes:t.array(u),envs:t.array(d),atoms:t.array(a)});export{M as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as b,b as x,q as f,s as g,j,B as N,v as R}from"./entry.BY4L2Uc6.js";var a={root:"m_b183c0a2"};const h=g((e,{color:s})=>({root:{"--code-bg":s?R(s,e):void 0}})),r=b((e,s)=>{const o=x("Code",null,e),{classNames:c,className:l,style:n,styles:m,unstyled:d,vars:p,color:B,block:t,variant:i,mod:v,attributes:u,...y}=o,C=f({name:"Code",props:o,classes:a,className:l,style:n,classNames:c,styles:m,unstyled:d,attributes:u,vars:p,varsResolver:h});return j.jsx(N,{component:t?"pre":"code",variant:i,ref:s,mod:[{block:t},v],...C("root"),...y,dir:"ltr"})});r.classes=a;r.displayName="@mantine/core/Code";export{r as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m,f as E,b as A,q as se,s as re,j as i,B as L,v as ee,t as oe,c as Eo,aB as me,b7 as jo,b8 as Ue,ay as ge,bc as Po,$ as fe,a0 as te,aI as He,e as Ce,aw as Ro,U as To,a1 as we,b6 as qe,ai as We,aj as Ze,aG as $o,ac as Vo,d as Mo,av as Bo,a3 as Je,w as ye}from"./entry.BY4L2Uc6.js";import{I as zo,a as Fo,b as Lo}from"./chunk.qDx9cjbN.js";import{P as he}from"./chunk.fpKvkQeU.js";function Go(e){const o=m.useRef(void 0);return m.useEffect(()=>{o.current=e},[e]),o.current}function be(e,o=document){const t=o.querySelector(e);if(t)return t;const s=o.querySelectorAll("*");for(let r=0;r<s.length;r+=1){const a=s[r];if(a.shadowRoot){const n=be(e,a.shadowRoot);if(n)return n}}return null}function U(e,o=document){const t=[],s=o.querySelectorAll(e);t.push(...Array.from(s));const r=o.querySelectorAll("*");for(let a=0;a<r.length;a+=1){const n=r[a];if(n.shadowRoot){const l=U(e,n.shadowRoot);t.push(...l)}}return t}function H(e){if(!e)return document;const o=e.getRootNode();return o instanceof ShadowRoot||o instanceof Document?o:document}function Qe(e){return typeof e=="string"?{value:e,label:e}:"value"in e&&!("label"in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e=="number"?{value:e.toString(),label:e.toString()}:"group"in e?{group:e.group,items:e.items.map(o=>Qe(o))}:e}function Ko(e){return e?e.map(o=>Qe(o)):[]}function Xe(e){return e.reduce((o,t)=>"group"in t?{...o,...Xe(t.items)}:(o[t.value]=t,o),{})}var P={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2",optionsDropdownCheckPlaceholder:"m_a530ee0a"};const Ho={error:null},Uo=re((e,{size:o,color:t})=>({chevron:{"--combobox-chevron-size":oe(o,"combobox-chevron-size"),"--combobox-chevron-color":t?ee(t,e):void 0}})),ke=E((e,o)=>{const t=A("ComboboxChevron",Ho,e),{size:s,error:r,style:a,className:n,classNames:l,styles:c,unstyled:d,vars:p,mod:u,...b}=t,x=se({name:"ComboboxChevron",classes:P,props:t,style:a,className:n,classNames:l,styles:c,unstyled:d,vars:p,varsResolver:Uo,rootSelector:"chevron"});return i.jsx(L,{component:"svg",...b,...x("chevron"),size:s,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:r},u],ref:o,children:i.jsx("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});ke.classes=P;ke.displayName="@mantine/core/ComboboxChevron";const[qo,M]=Eo("Combobox component was not found in tree"),Ye=m.forwardRef(({size:e,onMouseDown:o,onClick:t,onClear:s,...r},a)=>i.jsx(me.ClearButton,{ref:a,tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:n=>{n.preventDefault(),o?.(n)},onClick:n=>{s(),t?.(n)}}));Ye.displayName="@mantine/core/ComboboxClearButton";const Se=E((e,o)=>{const{classNames:t,styles:s,className:r,style:a,hidden:n,...l}=A("ComboboxDropdown",null,e),c=M();return i.jsx(he.Dropdown,{...l,ref:o,role:"presentation","data-hidden":n||void 0,...c.getStyles("dropdown",{className:r,style:a,classNames:t,styles:s})})});Se.classes=P;Se.displayName="@mantine/core/ComboboxDropdown";const Wo={refProp:"ref"},eo=E((e,o)=>{const{children:t,refProp:s}=A("ComboboxDropdownTarget",Wo,e);if(M(),!jo(t))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return i.jsx(he.Target,{ref:o,refProp:s,children:t})});eo.displayName="@mantine/core/ComboboxDropdownTarget";const Oe=E((e,o)=>{const{classNames:t,className:s,style:r,styles:a,vars:n,...l}=A("ComboboxEmpty",null,e),c=M();return i.jsx(L,{ref:o,...c.getStyles("empty",{className:s,classNames:t,styles:a,style:r}),...l})});Oe.classes=P;Oe.displayName="@mantine/core/ComboboxEmpty";function De({onKeyDown:e,withKeyboardNavigation:o,withAriaAttributes:t,withExpandedAttribute:s,targetType:r,autoComplete:a}){const n=M(),[l,c]=m.useState(null),d=u=>{if(e?.(u),!n.readOnly&&o){if(u.nativeEvent.isComposing)return;if(u.nativeEvent.code==="ArrowDown"&&(u.preventDefault(),n.store.dropdownOpened?c(n.store.selectNextOption()):(n.store.openDropdown("keyboard"),c(n.store.selectActiveOption()),n.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="ArrowUp"&&(u.preventDefault(),n.store.dropdownOpened?c(n.store.selectPreviousOption()):(n.store.openDropdown("keyboard"),c(n.store.selectActiveOption()),n.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="Enter"||u.nativeEvent.code==="NumpadEnter"){if(u.nativeEvent.keyCode===229)return;const b=n.store.getSelectedOptionIndex();n.store.dropdownOpened&&b!==-1?(u.preventDefault(),n.store.clickSelectedOption()):r==="button"&&(u.preventDefault(),n.store.openDropdown("keyboard"))}u.key==="Escape"&&n.store.closeDropdown("keyboard"),u.nativeEvent.code==="Space"&&r==="button"&&(u.preventDefault(),n.store.toggleDropdown("keyboard"))}};return{...t?{"aria-haspopup":"listbox","aria-expanded":s?!!(n.store.listId&&n.store.dropdownOpened):void 0,"aria-controls":n.store.dropdownOpened&&n.store.listId?n.store.listId:void 0,"aria-activedescendant":n.store.dropdownOpened&&l||void 0,autoComplete:a,"data-expanded":n.store.dropdownOpened||void 0,"data-mantine-stop-propagation":n.store.dropdownOpened||void 0}:{},onKeyDown:d}}const Zo={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},oo=E((e,o)=>{const{children:t,refProp:s,withKeyboardNavigation:r,withAriaAttributes:a,withExpandedAttribute:n,targetType:l,autoComplete:c,...d}=A("ComboboxEventsTarget",Zo,e),p=Ue(t);if(!p)throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=M(),b=De({targetType:l,withAriaAttributes:a,withKeyboardNavigation:r,withExpandedAttribute:n,onKeyDown:p.props.onKeyDown,autoComplete:c});return m.cloneElement(p,{...b,...d,[s]:ge(o,u.store.targetRef,Po(p))})});oo.displayName="@mantine/core/ComboboxEventsTarget";const _e=E((e,o)=>{const{classNames:t,className:s,style:r,styles:a,vars:n,...l}=A("ComboboxFooter",null,e),c=M();return i.jsx(L,{ref:o,...c.getStyles("footer",{className:s,classNames:t,style:r,styles:a}),...l,onMouseDown:d=>{d.preventDefault()}})});_e.classes=P;_e.displayName="@mantine/core/ComboboxFooter";const Ne=E((e,o)=>{const{classNames:t,className:s,style:r,styles:a,vars:n,children:l,label:c,id:d,...p}=A("ComboboxGroup",null,e),u=M(),b=fe(d);return i.jsxs(L,{ref:o,role:"group","aria-labelledby":c?b:void 0,...u.getStyles("group",{className:s,classNames:t,style:r,styles:a}),...p,children:[c&&i.jsx("div",{id:b,...u.getStyles("groupLabel",{classNames:t,styles:a}),children:c}),l]})});Ne.classes=P;Ne.displayName="@mantine/core/ComboboxGroup";const Ie=E((e,o)=>{const{classNames:t,className:s,style:r,styles:a,vars:n,...l}=A("ComboboxHeader",null,e),c=M();return i.jsx(L,{ref:o,...c.getStyles("header",{className:s,classNames:t,style:r,styles:a}),...l,onMouseDown:d=>{d.preventDefault()}})});Ie.classes=P;Ie.displayName="@mantine/core/ComboboxHeader";function to({value:e,valuesDivider:o=",",...t}){return i.jsx("input",{type:"hidden",value:Array.isArray(e)?e.join(o):e||"",...t})}to.displayName="@mantine/core/ComboboxHiddenInput";const Ae=E((e,o)=>{const t=A("ComboboxOption",null,e),{classNames:s,className:r,style:a,styles:n,vars:l,onClick:c,id:d,active:p,onMouseDown:u,onMouseOver:b,disabled:x,selected:k,mod:g,...w}=t,S=M(),D=m.useId(),_=d||D;return i.jsx(L,{...S.getStyles("option",{className:r,classNames:s,styles:n,style:a}),...w,ref:o,id:_,mod:["combobox-option",{"combobox-active":p,"combobox-disabled":x,"combobox-selected":k},g],role:"option",onClick:h=>{x?h.preventDefault():(S.onOptionSubmit?.(t.value,t),c?.(h))},onMouseDown:h=>{h.preventDefault(),u?.(h)},onMouseOver:h=>{S.resetSelectionOnOptionHover&&S.store.resetSelectedOption(),b?.(h)}})});Ae.classes=P;Ae.displayName="@mantine/core/ComboboxOption";const Ee=E((e,o)=>{const t=A("ComboboxOptions",null,e),{classNames:s,className:r,style:a,styles:n,id:l,onMouseDown:c,labelledBy:d,...p}=t,u=M(),b=fe(l);return m.useEffect(()=>{u.store.setListId(b)},[b]),i.jsx(L,{ref:o,...u.getStyles("options",{className:r,style:a,classNames:s,styles:n}),...p,id:b,role:"listbox","aria-labelledby":d,onMouseDown:x=>{x.preventDefault(),c?.(x)}})});Ee.classes=P;Ee.displayName="@mantine/core/ComboboxOptions";const Jo={withAriaAttributes:!0,withKeyboardNavigation:!0},je=E((e,o)=>{const t=A("ComboboxSearch",Jo,e),{classNames:s,styles:r,unstyled:a,vars:n,withAriaAttributes:l,onKeyDown:c,withKeyboardNavigation:d,size:p,...u}=t,b=M(),x=b.getStyles("search"),k=De({targetType:"input",withAriaAttributes:l,withKeyboardNavigation:d,withExpandedAttribute:!1,onKeyDown:c,autoComplete:"off"});return i.jsx(me,{ref:ge(o,b.store.searchRef),classNames:[{input:x.className},s],styles:[{input:x.style},r],size:p||b.size,...k,...u,__staticSelector:"Combobox"})});je.classes=P;je.displayName="@mantine/core/ComboboxSearch";const Qo={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},no=E((e,o)=>{const{children:t,refProp:s,withKeyboardNavigation:r,withAriaAttributes:a,withExpandedAttribute:n,targetType:l,autoComplete:c,...d}=A("ComboboxTarget",Qo,e),p=Ue(t);if(!p)throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const u=M(),b=De({targetType:l,withAriaAttributes:a,withKeyboardNavigation:r,withExpandedAttribute:n,onKeyDown:p.props.onKeyDown,autoComplete:c}),x=m.cloneElement(p,{...b,...d});return i.jsx(he.Target,{ref:ge(o,u.store.targetRef),children:x})});no.displayName="@mantine/core/ComboboxTarget";function Xo(e,o,t){for(let s=e-1;s>=0;s-=1)if(!o[s].hasAttribute("data-combobox-disabled"))return s;if(t){for(let s=o.length-1;s>-1;s-=1)if(!o[s].hasAttribute("data-combobox-disabled"))return s}return e}function Yo(e,o,t){for(let s=e+1;s<o.length;s+=1)if(!o[s].hasAttribute("data-combobox-disabled"))return s;if(t){for(let s=0;s<o.length;s+=1)if(!o[s].hasAttribute("data-combobox-disabled"))return s}return e}function et(e){for(let o=0;o<e.length;o+=1)if(!e[o].hasAttribute("data-combobox-disabled"))return o;return-1}function so({defaultOpened:e,opened:o,onOpenedChange:t,onDropdownClose:s,onDropdownOpen:r,loop:a=!0,scrollBehavior:n="instant"}={}){const[l,c]=te({value:o,defaultValue:e,finalValue:!1,onChange:t}),d=m.useRef(null),p=m.useRef(-1),u=m.useRef(null),b=m.useRef(null),x=m.useRef(-1),k=m.useRef(-1),g=m.useRef(-1),w=m.useCallback((f="unknown")=>{l||(c(!0),r?.(f))},[c,r,l]),S=m.useCallback((f="unknown")=>{l&&(c(!1),s?.(f))},[c,s,l]),D=m.useCallback((f="unknown")=>{l?S(f):w(f)},[S,w,l]),_=m.useCallback(()=>{const f=H(b.current),O=be(`#${d.current} [data-combobox-selected]`,f);O?.removeAttribute("data-combobox-selected"),O?.removeAttribute("aria-selected")},[]),h=m.useCallback(f=>{const O=H(b.current),z=be(`#${d.current}`,O),N=z?U("[data-combobox-option]",z):null;if(!N)return null;const I=f>=N.length?0:f<0?N.length-1:f;return p.current=I,N?.[I]&&!N[I].hasAttribute("data-combobox-disabled")?(_(),N[I].setAttribute("data-combobox-selected","true"),N[I].setAttribute("aria-selected","true"),N[I].scrollIntoView({block:"nearest",behavior:n}),N[I].id):null},[n,_]),C=m.useCallback(()=>{const f=H(b.current),O=be(`#${d.current} [data-combobox-active]`,f);if(O){const N=U(`#${d.current} [data-combobox-option]`,f).findIndex(I=>I===O);return h(N)}return h(0)},[h]),j=m.useCallback(()=>{const f=H(b.current),O=U(`#${d.current} [data-combobox-option]`,f);return h(Yo(p.current,O,a))},[h,a]),R=m.useCallback(()=>{const f=H(b.current),O=U(`#${d.current} [data-combobox-option]`,f);return h(Xo(p.current,O,a))},[h,a]),ce=m.useCallback(()=>{const f=H(b.current),O=U(`#${d.current} [data-combobox-option]`,f);return h(et(O))},[h]),J=m.useCallback((f="selected",O)=>{g.current=window.setTimeout(()=>{const z=H(b.current),N=U(`#${d.current} [data-combobox-option]`,z),I=N.findIndex(Y=>Y.hasAttribute(`data-combobox-${f}`));p.current=I,O?.scrollIntoView&&N[I]?.scrollIntoView({block:"nearest",behavior:n})},0)},[]),le=m.useCallback(()=>{p.current=-1,_()},[_]),q=m.useCallback(()=>{const f=H(b.current);U(`#${d.current} [data-combobox-option]`,f)?.[p.current]?.click()},[]),B=m.useCallback(f=>{d.current=f},[]),Q=m.useCallback(()=>{x.current=window.setTimeout(()=>u.current?.focus(),0)},[]),K=m.useCallback(()=>{k.current=window.setTimeout(()=>b.current?.focus(),0)},[]),X=m.useCallback(()=>p.current,[]);return m.useEffect(()=>()=>{window.clearTimeout(x.current),window.clearTimeout(k.current),window.clearTimeout(g.current)},[]),{dropdownOpened:l,openDropdown:w,closeDropdown:S,toggleDropdown:D,selectedOptionIndex:p.current,getSelectedOptionIndex:X,selectOption:h,selectFirstOption:ce,selectActiveOption:C,selectNextOption:j,selectPreviousOption:R,resetSelectedOption:le,updateSelectedOptionIndex:J,listId:d.current,setListId:B,clickSelectedOption:q,searchRef:u,focusSearchInput:Q,targetRef:b,focusTarget:K}}const ot={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0},size:"sm"},tt=re((e,{size:o,dropdownPadding:t})=>({options:{"--combobox-option-fz":He(o),"--combobox-option-padding":oe(o,"combobox-option-padding")},dropdown:{"--combobox-padding":t===void 0?void 0:Ce(t),"--combobox-option-fz":He(o),"--combobox-option-padding":oe(o,"combobox-option-padding")}}));function v(e){const o=A("Combobox",ot,e),{classNames:t,styles:s,unstyled:r,children:a,store:n,vars:l,onOptionSubmit:c,onClose:d,size:p,dropdownPadding:u,resetSelectionOnOptionHover:b,__staticSelector:x,readOnly:k,attributes:g,...w}=o,S=so(),D=n||S,_=se({name:x||"Combobox",classes:P,props:o,classNames:t,styles:s,unstyled:r,attributes:g,vars:l,varsResolver:tt}),h=()=>{d?.(),D.closeDropdown()};return i.jsx(qo,{value:{getStyles:_,store:D,onOptionSubmit:c,size:p,resetSelectionOnOptionHover:b,readOnly:k},children:i.jsx(he,{opened:D.dropdownOpened,preventPositionChangeWhenVisible:!0,...w,onChange:C=>!C&&h(),withRoles:!1,unstyled:r,children:a})})}const nt=e=>e;v.extend=nt;v.classes=P;v.displayName="@mantine/core/Combobox";v.Target=no;v.Dropdown=Se;v.Options=Ee;v.Option=Ae;v.Search=je;v.Empty=Oe;v.Chevron=ke;v.Footer=_e;v.Header=Ie;v.EventsTarget=oo;v.DropdownTarget=eo;v.Group=Ne;v.ClearButton=Ye;v.HiddenInput=to;const ro=m.createContext(null),st=ro.Provider,ao=()=>m.useContext(ro),[rt,at]=Ro();var co={card:"m_26775b0a"};const ct={withBorder:!0},lt=re((e,{radius:o})=>({card:{"--card-radius":we(o)}})),Pe=E((e,o)=>{const t=A("CheckboxCard",ct,e),{classNames:s,className:r,style:a,styles:n,unstyled:l,vars:c,checked:d,mod:p,withBorder:u,value:b,onClick:x,defaultChecked:k,onChange:g,attributes:w,...S}=t,D=se({name:"CheckboxCard",classes:co,props:t,className:r,style:a,classNames:s,styles:n,unstyled:l,attributes:w,vars:c,varsResolver:lt,rootSelector:"card"}),_=ao(),h=typeof d=="boolean"?d:_?_.value.includes(b||""):void 0,[C,j]=te({value:h,defaultValue:k,finalValue:!1,onChange:g});return i.jsx(rt,{value:{checked:C},children:i.jsx(To,{ref:o,mod:[{"with-border":u,checked:C},p],...D("card"),...S,role:"checkbox","aria-checked":C,onClick:R=>{x?.(R),_?.onChange(b||""),j(!C)}})})});Pe.displayName="@mantine/core/CheckboxCard";Pe.classes=co;const Re=E((e,o)=>{const{value:t,defaultValue:s,onChange:r,size:a,wrapperProps:n,children:l,readOnly:c,disabled:d,...p}=A("CheckboxGroup",null,e),[u,b]=te({value:t,defaultValue:s,finalValue:[],onChange:r}),x=k=>{const g=typeof k=="string"?k:k.currentTarget.value;!c&&b(u.includes(g)?u.filter(w=>w!==g):[...u,g])};return i.jsx(st,{value:{value:u,onChange:x,size:a,disabled:d},children:i.jsx(me.Wrapper,{size:a,ref:o,...n,...p,labelElement:"div",__staticSelector:"CheckboxGroup",children:i.jsx(zo,{role:"group",children:l})})})});Re.classes=me.Wrapper.classes;Re.displayName="@mantine/core/CheckboxGroup";function lo({size:e,style:o,...t}){const s=e!==void 0?{width:Ce(e),height:Ce(e),...o}:o;return i.jsx("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:s,"aria-hidden":!0,...t,children:i.jsx("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function io({indeterminate:e,...o}){return e?i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...o,children:i.jsx("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):i.jsx(lo,{...o})}var uo={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};const it={icon:io,variant:"filled"},dt=re((e,{radius:o,color:t,size:s,iconColor:r,variant:a,autoContrast:n})=>{const l=qe({color:t||e.primaryColor,theme:e}),c=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{indicator:{"--checkbox-size":oe(s,"checkbox-size"),"--checkbox-radius":o===void 0?void 0:we(o),"--checkbox-color":a==="outline"?c:ee(t,e),"--checkbox-icon-color":r?ee(r,e):Ze(n,e)?We({color:t,theme:e,autoContrast:n}):void 0}}}),Te=E((e,o)=>{const t=A("CheckboxIndicator",it,e),{classNames:s,className:r,style:a,styles:n,unstyled:l,vars:c,icon:d,indeterminate:p,radius:u,color:b,iconColor:x,autoContrast:k,checked:g,mod:w,variant:S,disabled:D,attributes:_,...h}=t,C=se({name:"CheckboxIndicator",classes:uo,props:t,className:r,style:a,classNames:s,styles:n,unstyled:l,attributes:_,vars:c,varsResolver:dt,rootSelector:"indicator"}),j=at(),R=typeof g=="boolean"||typeof p=="boolean"?g||p:j?.checked||!1;return i.jsx(L,{ref:o,...C("indicator",{variant:S}),variant:S,mod:[{checked:R,disabled:D},w],...h,children:i.jsx(d,{indeterminate:p,...C("icon")})})});Te.displayName="@mantine/core/CheckboxIndicator";Te.classes=uo;var po={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};const ut={labelPosition:"right",icon:io,variant:"filled"},pt=re((e,{radius:o,color:t,size:s,iconColor:r,variant:a,autoContrast:n})=>{const l=qe({color:t||e.primaryColor,theme:e}),c=l.isThemeColor&&l.shade===void 0?`var(--mantine-color-${l.color}-outline)`:l.color;return{root:{"--checkbox-size":oe(s,"checkbox-size"),"--checkbox-radius":o===void 0?void 0:we(o),"--checkbox-color":a==="outline"?c:ee(t,e),"--checkbox-icon-color":r?ee(r,e):Ze(n,e)?We({color:t,theme:e,autoContrast:n}):void 0}}}),ae=E((e,o)=>{const t=A("Checkbox",ut,e),{classNames:s,className:r,style:a,styles:n,unstyled:l,vars:c,color:d,label:p,id:u,size:b,radius:x,wrapperProps:k,checked:g,labelPosition:w,description:S,error:D,disabled:_,variant:h,indeterminate:C,icon:j,rootRef:R,iconColor:ce,onChange:J,autoContrast:le,mod:q,attributes:B,...Q}=t,K=ao(),X=b||K?.size,f=se({name:"Checkbox",props:t,classes:po,className:r,style:a,classNames:s,styles:n,unstyled:l,attributes:B,vars:c,varsResolver:pt}),{styleProps:O,rest:z}=$o(Q),N=fe(u),I={checked:K?.value.includes(z.value)??g,onChange:ie=>{K?.onChange(ie),J?.(ie)},disabled:K?.disabled??_},Y=m.useRef(null),F=o||Y;return m.useEffect(()=>{F&&"current"in F&&F.current&&(F.current.indeterminate=C||!1,C?F.current.setAttribute("data-indeterminate","true"):F.current.removeAttribute("data-indeterminate"))},[C,F]),i.jsx(Fo,{...f("root"),__staticSelector:"Checkbox",__stylesApiProps:t,id:N,size:X,labelPosition:w,label:p,description:S,error:D,disabled:I.disabled,classNames:s,styles:n,unstyled:l,"data-checked":I.checked||g||void 0,variant:h,ref:R,mod:q,...O,...k,children:i.jsxs(L,{...f("inner"),mod:{"data-label-position":w},children:[i.jsx(L,{component:"input",id:N,ref:F,mod:{error:!!D},...f("input",{focusable:!0,variant:h}),...z,...I,type:"checkbox"}),i.jsx(j,{indeterminate:C,...f("icon")})]})})});ae.classes={...po,...Lo};ae.displayName="@mantine/core/Checkbox";ae.Group=Re;ae.Indicator=Te;ae.Card=Pe;function ne(e){return"group"in e}function bo({options:e,search:o,limit:t}){const s=o.trim().toLowerCase(),r=[];for(let a=0;a<e.length;a+=1){const n=e[a];if(r.length===t)return r;ne(n)&&r.push({group:n.group,items:bo({options:n.items,search:o,limit:t-r.length})}),ne(n)||n.label.toLowerCase().includes(s)&&r.push(n)}return r}function bt(e){if(e.length===0)return!0;for(const o of e)if(!("group"in o)||o.items.length>0)return!1;return!0}function mo(e,o=new Set){if(Array.isArray(e))for(const t of e)if(ne(t))mo(t.items,o);else{if(typeof t.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof t.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof t.value}`);if(o.has(t.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${t.value}" was provided more than once`);o.add(t.value)}}function mt(e,o){return Array.isArray(e)?e.includes(o):e===o}function fo({data:e,withCheckIcon:o,withAlignedLabels:t,value:s,checkIconPosition:r,unstyled:a,renderOption:n}){if(!ne(e)){const c=mt(s,e.value),d=o&&(c?i.jsx(lo,{className:P.optionsDropdownCheckIcon}):t?i.jsx("div",{className:P.optionsDropdownCheckPlaceholder}):null),p=i.jsxs(i.Fragment,{children:[r==="left"&&d,i.jsx("span",{children:e.label}),r==="right"&&d]});return i.jsx(v.Option,{value:e.value,disabled:e.disabled,className:Mo({[P.optionsDropdownOption]:!a}),"data-reverse":r==="right"||void 0,"data-checked":c||void 0,"aria-selected":c,active:c,children:typeof n=="function"?n({option:e,checked:c}):p})}const l=e.items.map(c=>i.jsx(fo,{data:c,value:s,unstyled:a,withCheckIcon:o,withAlignedLabels:t,checkIconPosition:r,renderOption:n},c.value));return i.jsx(v.Group,{label:e.group,children:l})}function ft({data:e,hidden:o,hiddenWhenEmpty:t,filter:s,search:r,limit:a,maxDropdownHeight:n,withScrollArea:l=!0,filterOptions:c=!0,withCheckIcon:d=!1,withAlignedLabels:p=!1,value:u,checkIconPosition:b,nothingFoundMessage:x,unstyled:k,labelId:g,renderOption:w,scrollAreaProps:S,"aria-label":D}){mo(e);const h=typeof r=="string"?(s||bo)({options:e,search:c?r:"",limit:a??1/0}):e,C=bt(h),j=h.map(R=>i.jsx(fo,{data:R,withCheckIcon:d,withAlignedLabels:p,value:u,checkIconPosition:b,unstyled:k,renderOption:w},ne(R)?R.group:R.value));return i.jsx(v.Dropdown,{hidden:o||t&&C,"data-composed":!0,children:i.jsxs(v.Options,{labelledBy:g,"aria-label":D,children:[l?i.jsx(Vo.Autosize,{mah:n??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...S,children:j}):j,C&&x&&i.jsx(v.Empty,{children:x})]})})}const ht={withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},ho=E((e,o)=>{const t=A("Select",ht,e),{classNames:s,styles:r,unstyled:a,vars:n,dropdownOpened:l,defaultDropdownOpened:c,onDropdownClose:d,onDropdownOpen:p,onFocus:u,onBlur:b,onClick:x,onChange:k,data:g,value:w,defaultValue:S,selectFirstOptionOnChange:D,onOptionSubmit:_,comboboxProps:h,readOnly:C,disabled:j,filter:R,limit:ce,withScrollArea:J,maxDropdownHeight:le,size:q,searchable:B,rightSection:Q,checkIconPosition:K,withCheckIcon:X,withAlignedLabels:f,nothingFoundMessage:O,name:z,form:N,searchValue:I,defaultSearchValue:Y,onSearchChange:F,allowDeselect:ie,error:$e,rightSectionPointerEvents:xo,id:vo,clearable:Co,clearButtonProps:go,hiddenInputProps:wo,renderOption:yo,onClear:ko,autoComplete:So,scrollAreaProps:Oo,__defaultRightSection:gt,__clearSection:wt,__clearable:yt,chevronColor:Do,autoSelectOnBlur:Ve,attributes:Me,...de}=t,xe=m.useMemo(()=>Ko(g),[g]),ue=m.useRef({}),$=m.useMemo(()=>Xe(xe),[xe]),Be=fe(vo),[y,ze,Fe]=te({value:w,defaultValue:S,finalValue:null,onChange:k}),G=typeof y=="string"?y in $?$[y]:ue.current[y]:void 0,Le=Go(G),[pe,_o,No]=te({value:I,defaultValue:Y,finalValue:G?G.label:"",onChange:F}),V=so({opened:l,defaultOpened:c,onDropdownOpen:()=>{p?.(),V.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{d?.(),setTimeout(V.resetSelectedOption,0)}}),W=T=>{_o(T),V.resetSelectedOption()},{resolvedClassNames:Ge,resolvedStyles:Ke}=Bo({props:t,styles:r,classNames:s});m.useEffect(()=>{D&&V.selectFirstOption()},[D,pe]),m.useEffect(()=>{w===null&&W(""),typeof w=="string"&&G&&(Le?.value!==G.value||Le?.label!==G.label)&&W(G.label)},[w,G]),m.useEffect(()=>{!Fe&&!No&&W(typeof y=="string"?y in $?$[y]?.label:ue.current[y]?.label||"":"")},[$,y]),m.useEffect(()=>{y&&y in $&&(ue.current[y]=$[y])},[$,y]);const Io=i.jsx(v.ClearButton,{...go,onClear:()=>{ze(null,null),W(""),ko?.()}}),Ao=Co&&!!y&&!j&&!C;return i.jsxs(i.Fragment,{children:[i.jsxs(v,{store:V,__staticSelector:"Select",classNames:Ge,styles:Ke,unstyled:a,readOnly:C,size:q,attributes:Me,keepMounted:Ve,onOptionSubmit:T=>{_?.(T);const Z=ie&&$[T].value===y?null:$[T],ve=Z?Z.value:null;ve!==y&&ze(ve,Z),!Fe&&W(typeof ve=="string"&&Z?.label||""),V.closeDropdown()},...h,children:[i.jsx(v.Target,{targetType:B?"input":"button",autoComplete:So,children:i.jsx(Je,{id:Be,ref:o,__defaultRightSection:i.jsx(v.Chevron,{size:q,error:$e,unstyled:a,color:Do}),__clearSection:Io,__clearable:Ao,rightSection:Q,rightSectionPointerEvents:xo||"none",...de,size:q,__staticSelector:"Select",disabled:j,readOnly:C||!B,value:pe,onChange:T=>{W(T.currentTarget.value),V.openDropdown(),D&&V.selectFirstOption()},onFocus:T=>{B&&V.openDropdown(),u?.(T)},onBlur:T=>{Ve&&V.clickSelectedOption(),B&&V.closeDropdown();const Z=typeof y=="string"&&(y in $?$[y]:ue.current[y]);W(Z&&Z.label||""),b?.(T)},onClick:T=>{B?V.openDropdown():V.toggleDropdown(),x?.(T)},classNames:Ge,styles:Ke,unstyled:a,pointer:!B,error:$e,attributes:Me})}),i.jsx(ft,{data:xe,hidden:C||j,filter:R,search:pe,limit:ce,hiddenWhenEmpty:!O,withScrollArea:J,maxDropdownHeight:le,filterOptions:!!B&&G?.label!==pe,value:y,checkIconPosition:K,withCheckIcon:X,withAlignedLabels:f,nothingFoundMessage:O,unstyled:a,labelId:de.label?`${Be}-label`:void 0,"aria-label":de.label?void 0:de["aria-label"],renderOption:yo,scrollAreaProps:Oo})]}),i.jsx(v.HiddenInput,{value:y,name:z,form:N,disabled:j,...wo})]})});ho.classes={...Je.classes,...v.classes};ho.displayName="@mantine/core/Select";const xt=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 13l-6 6",key:"svg-1"}],["path",{d:"M6 13l6 6",key:"svg-2"}]],Dt=ye("outline","arrow-down","ArrowDown",xt);const vt=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]],_t=ye("outline","arrow-up","ArrowUp",vt);const Ct=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],Nt=ye("outline","plus","Plus",Ct);export{ae as C,Dt as I,ft as O,ho as S,_t as a,Nt as b,Xe as c,v as d,lo as e,Ko as g,ne as i,so as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as e}from"./entry.BY4L2Uc6.js";const o=[["path",{d:"M5 7l5 5l-5 5",key:"svg-0"}],["path",{d:"M12 19l7 0",key:"svg-1"}]],n=e("outline","terminal","Terminal",o);export{n as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as e}from"./entry.BY4L2Uc6.js";const a=[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]],o=e("outline","server","Server",a);export{o as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as o}from"./entry.BY4L2Uc6.js";const l=[["path",{d:"M3 21h4l13 -13a1.5 1.5 0 0 0 -4 -4l-13 13v4",key:"svg-0"}],["path",{d:"M14.5 5.5l4 4",key:"svg-1"}],["path",{d:"M12 8l-5 -5l-4 4l5 5",key:"svg-2"}],["path",{d:"M7 8l-1.5 1.5",key:"svg-3"}],["path",{d:"M16 12l5 5l-4 4l-5 -5",key:"svg-4"}],["path",{d:"M16 17l-1.5 1.5",key:"svg-5"}]],e=o("outline","tools","Tools",l);export{e as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,an as y,ba as I,bb as j,f as B,b as N,j as P,a3 as W}from"./entry.BY4L2Uc6.js";import{g as M}from"./chunk.uyVen0u2.js";var $=c.useLayoutEffect,G=function(e){var r=y.useRef(e);return $(function(){r.current=e}),r},E=function(e,r){if(typeof e=="function"){e(r);return}e.current=r},O=function(e,r){var t=y.useRef();return y.useCallback(function(i){e.current=i,t.current&&E(t.current,null),t.current=r,r&&E(r,i)},[r])},H={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Y=function(e){Object.keys(H).forEach(function(r){e.style.setProperty(r,H[r],"important")})},T=Y,o=null,C=function(e,r){var t=e.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?t+r.borderSize:t-r.paddingSize};function q(n,e,r,t){r===void 0&&(r=1),t===void 0&&(t=1/0),o||(o=document.createElement("textarea"),o.setAttribute("tabindex","-1"),o.setAttribute("aria-hidden","true"),T(o)),o.parentNode===null&&document.body.appendChild(o);var i=n.paddingSize,d=n.borderSize,a=n.sizingStyle,h=a.boxSizing;Object.keys(a).forEach(function(l){var m=l;o.style[m]=a[m]}),T(o),o.value=e;var s=C(o,n);o.value=e,s=C(o,n),o.value="x";var f=o.scrollHeight-i,g=f*r;h==="border-box"&&(g=g+i+d),s=Math.max(g,s);var v=f*t;return h==="border-box"&&(v=v+i+d),s=Math.min(v,s),[s,f]}var F=function(){},U=function(e,r){return e.reduce(function(t,i){return t[i]=r[i],t},{})},X=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Z=!!document.documentElement.currentStyle,D=function(e){var r=window.getComputedStyle(e);if(r===null)return null;var t=U(X,r),i=t.boxSizing;if(i==="")return null;Z&&i==="border-box"&&(t.width=parseFloat(t.width)+parseFloat(t.borderRightWidth)+parseFloat(t.borderLeftWidth)+parseFloat(t.paddingRight)+parseFloat(t.paddingLeft)+"px");var d=parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),a=parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth);return{sizingStyle:t,paddingSize:d,borderSize:a}},J=D;function R(n,e,r){var t=G(r);c.useLayoutEffect(function(){var i=function(a){return t.current(a)};if(n)return n.addEventListener(e,i),function(){return n.removeEventListener(e,i)}},[])}var K=function(e,r){R(document.body,"reset",function(t){e.current.form===t.target&&r(t)})},Q=function(e){R(window,"resize",e)},V=function(e){R(document.fonts,"loadingdone",e)},ee=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],te=function(e,r){var t=e.cacheMeasurements,i=e.maxRows,d=e.minRows,a=e.onChange,h=a===void 0?F:a,s=e.onHeightChange,f=s===void 0?F:s,g=I(e,ee),v=g.value!==void 0,l=c.useRef(null),m=O(l,r),L=c.useRef(0),x=c.useRef(),p=function(){var u=l.current,z=t&&x.current?x.current:J(u);if(z){x.current=z;var w=q(z,u.value||u.placeholder||"x",d,i),b=w[0],k=w[1];L.current!==b&&(L.current=b,u.style.setProperty("height",b+"px","important"),f(b,{rowHeight:k}))}},A=function(u){v||p(),h(u)};return c.useLayoutEffect(p),K(l,function(){if(!v){var S=l.current.value;requestAnimationFrame(function(){var u=l.current;u&&S!==u.value&&p()})}}),Q(p),V(p),c.createElement("textarea",j({},g,{onChange:A,ref:m}))},re=c.forwardRef(te);const ne={size:"sm"},_=B((n,e)=>{const{autosize:r,maxRows:t,minRows:i,__staticSelector:d,resize:a,...h}=N("Textarea",ne,n),s=r&&M()!=="test",f=s?{maxRows:t,minRows:i}:{};return P.jsx(W,{component:s?re:"textarea",ref:e,...h,__staticSelector:d||"Textarea",multiline:!0,"data-no-overflow":r&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});_.classes=W.classes;_.displayName="@mantine/core/Textarea";export{_ as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as a}from"./entry.BY4L2Uc6.js";const e=[["path",{d:"M7 4v16l13 -8z",key:"svg-0"}]],t=a("outline","player-play","PlayerPlay",e);export{t as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as M,f as w,b as B,j as a,B as N,q as P,s as $,ac as Q,e as C,v as x,g as O}from"./entry.BY4L2Uc6.js";const[X,Y]=M("Table component was not found in the tree");var f={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function Z(e,r){if(!r)return;const t={};return r.columnBorder&&e.withColumnBorders&&(t["data-with-column-border"]=!0),r.rowBorder&&e.withRowBorders&&(t["data-with-row-border"]=!0),r.striped&&e.striped&&(t["data-striped"]=e.striped),r.highlightOnHover&&e.highlightOnHover&&(t["data-hover"]=!0),r.captionSide&&e.captionSide&&(t["data-side"]=e.captionSide),r.stickyHeader&&e.stickyHeader&&(t["data-sticky"]=!0),t}function b(e,r){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,o=w((l,i)=>{const n=B(t,{},l),{classNames:c,className:d,style:m,styles:u,...h}=n,p=Y();return a.jsx(N,{component:e,ref:i,...Z(p,r),...p.getStyles(e,{className:d,classNames:c,style:m,styles:u,props:n}),...h})});return o.displayName=`@mantine/core/${t}`,o.classes=f,o}const j=b("th",{columnBorder:!0}),A=b("td",{columnBorder:!0}),v=b("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),D=b("thead",{stickyHeader:!0}),z=b("tbody"),E=b("tfoot"),I=b("caption",{captionSide:!0});function R({data:e}){return a.jsxs(a.Fragment,{children:[e.caption&&a.jsx(I,{children:e.caption}),e.head&&a.jsx(D,{children:a.jsx(v,{children:e.head.map((r,t)=>a.jsx(j,{children:r},t))})}),e.body&&a.jsx(z,{children:e.body.map((r,t)=>a.jsx(v,{children:r.map((o,l)=>a.jsx(A,{children:o},l))},t))}),e.foot&&a.jsx(E,{children:a.jsx(v,{children:e.foot.map((r,t)=>a.jsx(j,{children:r},t))})})]})}R.displayName="@mantine/core/TableDataRenderer";const ee={type:"scrollarea"},te=$((e,{minWidth:r,maxHeight:t,type:o})=>({scrollContainer:{"--table-min-width":C(r),"--table-max-height":C(t),"--table-overflow":o==="native"?"auto":void 0}})),H=w((e,r)=>{const t=B("TableScrollContainer",ee,e),{classNames:o,className:l,style:i,styles:n,unstyled:c,vars:d,children:m,minWidth:u,maxHeight:h,type:p,scrollAreaProps:g,attributes:T,...S}=t,y=P({name:"TableScrollContainer",classes:f,props:t,className:l,style:i,classNames:o,styles:n,unstyled:c,attributes:T,vars:d,varsResolver:te,rootSelector:"scrollContainer"});return a.jsx(N,{component:p==="scrollarea"?Q:"div",...p==="scrollarea"?h?{offsetScrollbars:"xy",...g}:{offsetScrollbars:"x",...g}:{},ref:r,...y("scrollContainer"),...S,children:a.jsx("div",{...y("scrollContainerInner"),children:m})})});H.classes=f;H.displayName="@mantine/core/TableScrollContainer";const re={withRowBorders:!0,verticalSpacing:7},ae=$((e,{layout:r,captionSide:t,horizontalSpacing:o,verticalSpacing:l,borderColor:i,stripedColor:n,highlightOnHoverColor:c,striped:d,highlightOnHover:m,stickyHeaderOffset:u,stickyHeader:h})=>({table:{"--table-layout":r,"--table-caption-side":t,"--table-horizontal-spacing":O(o),"--table-vertical-spacing":O(l),"--table-border-color":i?x(i,e):void 0,"--table-striped-color":d&&n?x(n,e):void 0,"--table-highlight-on-hover-color":m&&c?x(c,e):void 0,"--table-sticky-header-offset":h?C(u):void 0}})),s=w((e,r)=>{const t=B("Table",re,e),{classNames:o,className:l,style:i,styles:n,unstyled:c,vars:d,horizontalSpacing:m,verticalSpacing:u,captionSide:h,stripedColor:p,highlightOnHoverColor:g,striped:T,highlightOnHover:S,withColumnBorders:y,withRowBorders:q,withTableBorder:F,borderColor:oe,layout:se,variant:U,data:_,children:V,stickyHeader:W,stickyHeaderOffset:le,mod:G,tabularNums:J,attributes:K,...L}=t,k=P({name:"Table",props:t,className:l,style:i,classes:f,classNames:o,styles:n,unstyled:c,attributes:K,rootSelector:"table",vars:d,varsResolver:ae});return a.jsx(X,{value:{getStyles:k,stickyHeader:W,striped:T===!0?"odd":T||void 0,highlightOnHover:S,withColumnBorders:y,withRowBorders:q,captionSide:h||"bottom"},children:a.jsx(N,{component:"table",variant:U,ref:r,mod:[{"data-with-table-border":F,"data-tabular-nums":J},G],...k("table"),...L,children:V||!!_&&a.jsx(R,{data:_})})})});s.classes=f;s.displayName="@mantine/core/Table";s.Td=A;s.Th=j;s.Tr=v;s.Thead=D;s.Tbody=z;s.Tfoot=E;s.Caption=I;s.ScrollContainer=H;s.DataRenderer=R;export{s as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,F as o,L as n,T as s}from"./entry.BY4L2Uc6.js";import{T as r}from"./chunk.OlMI8g2F.js";const t=()=>e.jsxs(o,{direction:"column",gap:"xl",w:"100%",p:"xl",children:[e.jsxs(o,{align:"center",gap:"sm",children:[e.jsx(r,{size:32,variant:"light",color:"orange",children:e.jsx(n,{size:20})}),e.jsx(s,{size:"xl",fw:600,children:"Queue Monitor"})]}),e.jsx(s,{c:"dimmed",children:"Background job queues - coming soon"})]});export{t as DevQueueMonitor,t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{at as oe,Y as re,a$ as De,r as f,A as z,b4 as je,aK as ke,x as Ie,b5 as Te,p as H,b as M,j as s,T as Ae,d as Pe,c as Ee,f as B,B as se,ay as K,aw as Ne,i as q,ah as ie,b6 as ae,U as ce,b7 as Re,$ as Le,b8 as Fe,q as Oe,a0 as _e,av as Be,a2 as Ke,aZ as $e,H as Ve,F as te,ad as ze,a5 as R,G as He,aa as qe}from"./entry.BY4L2Uc6.js";import{T as le}from"./chunk.OlMI8g2F.js";import{f as Ue,c as ue}from"./chunk.BlqFPyLh.js";import{P as L}from"./chunk.fpKvkQeU.js";import{A as Ge}from"./chunk.DinJSUfH.js";function de(t,o){const n=oe(),r=re(De),[a,i]=f.useState(!1),[e,c]=f.useState(),l=f.useRef(!1),u=f.useRef(void 0),d=f.useRef(void 0),y=f.useRef(!0),m=f.useRef(void 0);f.useEffect(()=>()=>{y.current=!1,u.current&&(r.clearTimeout(u.current),u.current=void 0),m.current&&(r.clearInterval(m.current),m.current=void 0),d.current&&(d.current.abort(),d.current=void 0)},[]);const v=f.useCallback(async(...g)=>{if(l.current)return;d.current&&d.current.abort();const b=new AbortController;d.current=b,l.current=!0,i(!0),c(void 0),await n.events.emit("react:action:begin",{type:"custom",id:t.id});try{const x=await t.handler(...g,{signal:b.signal});return!y.current||b.signal.aborted?void 0:(await n.events.emit("react:action:success",{type:"custom",id:t.id}),t.onSuccess&&await t.onSuccess(x),x)}catch(x){if(x instanceof Error&&x.name==="AbortError"||!y.current)return;const p=x;if(c(p),await n.events.emit("react:action:error",{type:"custom",id:t.id,error:p}),t.onError)await t.onError(p);else throw p}finally{l.current=!1,i(!1),await n.events.emit("react:action:end",{type:"custom",id:t.id}),d.current===b&&(d.current=void 0)}},[...o,t.id,t.onError,t.onSuccess]),w=f.useCallback(async(...g)=>t.debounce?(u.current&&r.clearTimeout(u.current),new Promise(b=>{u.current=r.createTimeout(async()=>{const x=await v(...g);b(x)},t.debounce??0)})):v(...g),[v,t.debounce]),h=f.useCallback(()=>{u.current&&(r.clearTimeout(u.current),u.current=void 0),d.current&&(d.current.abort(),d.current=void 0),y.current&&(l.current=!1,i(!1))},[]);return f.useEffect(()=>{t.runOnInit&&w()},o),f.useEffect(()=>{if(t.runEvery)return m.current=r.createInterval(()=>w(),t.runEvery,!0),()=>{m.current&&(r.clearInterval(m.current),m.current=void 0)}},[w,t.runEvery]),{run:w,loading:a,error:e,cancel:h}}const We=t=>{const o=z(),[n,r]=f.useState(!1);je().url.pathname;const i=typeof t=="string"?{href:t}:{...t,href:t.href},e=i.href,c=o.isActive(e,i);return{isPending:n,isActive:c,anchorProps:{href:o.base(e),onClick:async l=>{if(l?.stopPropagation(),l?.preventDefault(),!c&&!n){r(!0);try{await o.go(e)}finally{r(!1)}}}}}},me=(t,o=["loading","dirty","error"])=>{const n=oe(),r=o,[a,i]=f.useState(!1),[e,c]=f.useState(!1),[l,u]=f.useState(void 0),[d,y]=f.useState(void 0),m="form"in t?t.form:t,v="path"in t?t.path:void 0,w=r.includes("values"),h=r.includes("error"),g=r.includes("dirty"),b=r.includes("loading");return f.useEffect(()=>{const x=[];return(h||w||g)&&x.push(n.events.on("form:change",p=>{p.id===m.id&&((!v||p.path===v)&&(g&&i(!0),h&&u(void 0)),w&&y(m.currentValues))})),w&&x.push(n.events.on("form:reset",p=>{p.id===m.id&&y(p.values)})),b&&x.push(n.events.on("form:submit:begin",p=>{p.id===m.id&&c(!0)}),n.events.on("form:submit:end",p=>{p.id===m.id&&c(!1)})),(w||g)&&x.push(n.events.on("form:submit:success",p=>{p.id===m.id&&(w&&y(p.values),g&&i(!1))})),h&&x.push(n.events.on("form:submit:error",p=>{p.id===m.id&&(!v||p.error instanceof ke&&p.error.value.path===v)&&u(p.error)})),()=>{for(const p of x)p()}},[]),{dirty:a,loading:e,error:l,values:d}},ht=()=>(Ie("alepha.react.i18n.lang"),re(Te));function C(t,o){return n=>{t?.(n),o?.(n)}}function Ye(t,o,n){return n?Array.from(Ue(n,o)?.querySelectorAll(t)||[]).findIndex(r=>r===n):null}function Ze(t=!1,o={}){const[n,r]=f.useState(t),a=f.useCallback(()=>{r(c=>c||(o.onOpen?.(),!0))},[o.onOpen]),i=f.useCallback(()=>{r(c=>c&&(o.onClose?.(),!1))},[o.onClose]),e=f.useCallback(()=>{n?i():a()},[i,a,n]);return[n,{open:a,close:i,toggle:e}]}function fe({open:t,close:o,openDelay:n,closeDelay:r}){const a=f.useRef(-1),i=f.useRef(-1),e=()=>{window.clearTimeout(a.current),window.clearTimeout(i.current)},c=()=>{e(),n===0||n===void 0?t():a.current=window.setTimeout(t,n)},l=()=>{e(),r===0||r===void 0?o():i.current=window.setTimeout(o,r)};return f.useEffect(()=>e,[]),{openDropdown:c,closeDropdown:l}}var he={root:"m_849cf0da"};const Je={underline:"hover"},U=H((t,o)=>{const{underline:n,className:r,unstyled:a,mod:i,...e}=M("Anchor",Je,t);return s.jsx(Ae,{component:"a",ref:o,className:Pe({[he.root]:!a},r),...e,mod:[{underline:n},i],__staticSelector:"Anchor",unstyled:a})});U.classes=he;U.displayName="@mantine/core/Anchor";const[Qe,k]=Ee("Menu component was not found in the tree");var I={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const G=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,...c}=M("MenuDivider",null,t),l=k();return s.jsx(se,{ref:o,...l.getStyles("divider",{className:r,style:a,styles:i,classNames:n}),...c})});G.classes=I;G.displayName="@mantine/core/MenuDivider";const W=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,onMouseEnter:c,onMouseLeave:l,onKeyDown:u,children:d,...y}=M("MenuDropdown",null,t),m=f.useRef(null),v=k(),w=C(u,b=>{(b.key==="ArrowUp"||b.key==="ArrowDown")&&(b.preventDefault(),m.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),h=C(c,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),g=C(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return s.jsxs(L.Dropdown,{...y,onMouseEnter:h,onMouseLeave:g,role:"menu","aria-orientation":"vertical",ref:K(o,m),...v.getStyles("dropdown",{className:r,style:a,styles:i,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:w,children:[v.withInitialFocusPlaceholder&&s.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),d]})});W.classes=I;W.displayName="@mantine/core/MenuDropdown";const[Xe,$]=Ne(),Y=H((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,color:c,closeMenuOnClick:l,leftSection:u,rightSection:d,children:y,disabled:m,"data-disabled":v,...w}=M("MenuItem",null,t),h=k(),g=$(),b=q(),{dir:x}=ie(),p=f.useRef(null),D=w,T=C(D.onClick,()=>{v||(typeof l=="boolean"?l&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),j=c?b.variantColorResolver({color:c,theme:b,variant:"light"}):void 0,A=c?ae({color:c,theme:b}):null,O=C(D.onKeyDown,P=>{P.key==="ArrowLeft"&&g&&(g.close(),g.focusParentItem())});return s.jsxs(ce,{onMouseDown:P=>P.preventDefault(),...w,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles("item",{className:r,style:a,styles:i,classNames:n}),ref:K(p,o),role:"menuitem",disabled:m,"data-menu-item":!0,"data-disabled":m||v||void 0,"data-mantine-stop-propagation":!0,onClick:T,onKeyDown:ue({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:h.loop,dir:x,orientation:"vertical",onKeyDown:O}),__vars:{"--menu-item-color":A?.isThemeColor&&A?.shade===void 0?`var(--mantine-color-${A.color}-6)`:j?.color,"--menu-item-hover":j?.hover},children:[u&&s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"left",children:u}),y&&s.jsx("div",{...h.getStyles("itemLabel",{styles:i,classNames:n}),children:y}),d&&s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"right",children:d})]})});Y.classes=I;Y.displayName="@mantine/core/MenuItem";const Z=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,...c}=M("MenuLabel",null,t),l=k();return s.jsx(se,{ref:o,...l.getStyles("label",{className:r,style:a,styles:i,classNames:n}),...c})});Z.classes=I;Z.displayName="@mantine/core/MenuLabel";const J=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,onMouseEnter:c,onMouseLeave:l,onKeyDown:u,children:d,...y}=M("MenuSubDropdown",null,t),m=f.useRef(null),v=k(),w=$(),h=C(c,w?.open),g=C(l,w?.close);return s.jsx(L.Dropdown,{...y,onMouseEnter:h,onMouseLeave:g,role:"menu","aria-orientation":"vertical",ref:K(o,m),...v.getStyles("dropdown",{className:r,style:a,styles:i,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:d})});J.classes=I;J.displayName="@mantine/core/MenuSubDropdown";const Q=H((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,color:c,leftSection:l,rightSection:u,children:d,disabled:y,"data-disabled":m,closeMenuOnClick:v,...w}=M("MenuSubItem",null,t),h=k(),g=$(),b=q(),{dir:x}=ie(),p=f.useRef(null),D=w,T=c?b.variantColorResolver({color:c,theme:b,variant:"light"}):void 0,j=c?ae({color:c,theme:b}):null,A=C(D.onKeyDown,N=>{N.key==="ArrowRight"&&(g?.open(),g?.focusFirstItem()),N.key==="ArrowLeft"&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),O=C(D.onClick,()=>{!m&&v&&h.closeDropdownImmediately()}),P=C(D.onMouseEnter,g?.open),E=C(D.onMouseLeave,g?.close);return s.jsxs(ce,{onMouseDown:N=>N.preventDefault(),...w,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles("item",{className:r,style:a,styles:i,classNames:n}),ref:K(p,o),role:"menuitem",disabled:y,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":y||m||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:P,onMouseLeave:E,onClick:O,onKeyDown:ue({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:h.loop,dir:x,orientation:"vertical",onKeyDown:A}),__vars:{"--menu-item-color":j?.isThemeColor&&j?.shade===void 0?`var(--mantine-color-${j.color}-6)`:T?.color,"--menu-item-hover":T?.hover},children:[l&&s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"left",children:l}),d&&s.jsx("div",{...h.getStyles("itemLabel",{styles:i,classNames:n}),children:d}),s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"right",children:u||s.jsx(Ge,{...h.getStyles("chevron"),size:14})})]})});Q.classes=I;Q.displayName="@mantine/core/MenuSubItem";function pe({children:t,refProp:o}){if(!Re(t))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return k(),s.jsx(L.Target,{refProp:o,popupType:"menu",children:t})}pe.displayName="@mantine/core/MenuSubTarget";const et={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function F(t){const{children:o,closeDelay:n,openDelay:r,...a}=M("MenuSub",et,t),i=Le(),[e,{open:c,close:l}]=Ze(!1),u=$(),{openDropdown:d,closeDropdown:y}=fe({open:c,close:l,closeDelay:n,openDelay:r}),m=()=>window.setTimeout(()=>{document.getElementById(`${i}-dropdown`)?.querySelectorAll("[data-menu-item]:not([data-disabled])")[0]?.focus()},16),v=()=>window.setTimeout(()=>{document.getElementById(`${i}-target`)?.focus()},16);return s.jsx(Xe,{value:{opened:e,close:y,open:d,focusFirstItem:m,focusParentItem:v,parentContext:u},children:s.jsx(L,{opened:e,withinPortal:!1,withArrow:!1,id:i,...a,children:o})})}F.extend=t=>t;F.displayName="@mantine/core/MenuSub";F.Target=pe;F.Dropdown=J;F.Item=Q;const tt={refProp:"ref"},ve=f.forwardRef((t,o)=>{const{children:n,refProp:r,...a}=M("MenuTarget",tt,t),i=Fe(n);if(!i)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const e=k(),c=i.props,l=C(c.onClick,()=>{e.trigger==="click"?e.toggleDropdown():e.trigger==="click-hover"&&(e.setOpenedViaClick(!0),e.opened||e.openDropdown())}),u=C(c.onMouseEnter,()=>(e.trigger==="hover"||e.trigger==="click-hover")&&e.openDropdown()),d=C(c.onMouseLeave,()=>{(e.trigger==="hover"||e.trigger==="click-hover"&&!e.openedViaClick)&&e.closeDropdown()});return s.jsx(L.Target,{refProp:r,popupType:"menu",ref:o,...a,children:f.cloneElement(i,{onClick:l,onMouseEnter:u,onMouseLeave:d,"data-expanded":e.opened?!0:void 0})})});ve.displayName="@mantine/core/MenuTarget";const nt={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function S(t){const o=M("Menu",nt,t),{children:n,onOpen:r,onClose:a,opened:i,defaultOpened:e,trapFocus:c,onChange:l,closeOnItemClick:u,loop:d,closeOnEscape:y,trigger:m,openDelay:v,closeDelay:w,classNames:h,styles:g,unstyled:b,variant:x,vars:p,menuItemTabIndex:D,keepMounted:T,withInitialFocusPlaceholder:j,attributes:A,...O}=o,P=Oe({name:"Menu",classes:I,props:o,classNames:h,styles:g,unstyled:b,attributes:A}),[E,N]=_e({value:i,defaultValue:e,finalValue:!1,onChange:l}),[ye,X]=f.useState(!1),_=()=>{N(!1),X(!1),E&&a?.()},V=()=>{N(!0),!E&&r?.()},ee=()=>{E?_():V()},{openDropdown:be,closeDropdown:we}=fe({open:V,close:_,closeDelay:w,openDelay:v}),xe=Me=>Ye("[data-menu-item]","[data-menu-dropdown]",Me),{resolvedClassNames:Se,resolvedStyles:Ce}=Be({classNames:h,styles:g,props:o});return s.jsx(Qe,{value:{getStyles:P,opened:E,toggleDropdown:ee,getItemIndex:xe,openedViaClick:ye,setOpenedViaClick:X,closeOnItemClick:u,closeDropdown:m==="click"?_:we,openDropdown:m==="click"?V:be,closeDropdownImmediately:_,loop:d,trigger:m,unstyled:b,menuItemTabIndex:D,withInitialFocusPlaceholder:j},children:s.jsx(L,{returnFocus:!0,...O,opened:E,onChange:ee,defaultOpened:e,trapFocus:T?!1:c,closeOnEscape:y,__staticSelector:"Menu",classNames:Se,styles:Ce,unstyled:b,variant:x,keepMounted:T,children:n})})}S.extend=t=>t;S.withProps=Ke(S);S.classes=I;S.displayName="@mantine/core/Menu";S.Item=Y;S.Label=Z;S.Dropdown=W;S.Target=ve;S.Divider=G;S.Sub=F;const ge=t=>{const{item:o,index:n}=t,r=z(),a=de({handler:async e=>{await o.onClick?.()}},[o.onClick]);if(o.type==="divider")return s.jsx(S.Divider,{},n);if(o.type==="label")return s.jsx(S.Label,{children:o.label},n);if(o.children&&o.children.length>0)return s.jsxs(S,{trigger:"hover",position:"right-start",offset:2,children:[s.jsx(S.Target,{children:s.jsx(S.Item,{leftSection:o.icon,rightSection:s.jsx(He,{size:14}),children:o.label})}),s.jsx(S.Dropdown,{children:o.children.map((e,c)=>s.jsx(ge,{item:e,index:c},c))})]},n);const i={};return t.item.onClick?i.onClick=a.run:t.item.href&&Object.assign(i,r.anchor(t.item.href)),s.jsx(S.Item,{leftSection:o.icon,onClick:o.onClick,color:o.color,rightSection:o.active?s.jsx(le,{size:"xs",variant:"transparent",children:s.jsx(qe,{})}):void 0,...i,children:o.label},n)},ne=t=>{const o=q(),n={...t},{tooltip:r,menu:a,icon:i,...e}=n;if(n.variant==="subtle"&&(e.c??="var(--mantine-color-text)",e.color??="gray"),n.intent&&(n.intent==="none"?(e.c??="var(--mantine-color-text)",e.color??="gray"):n.intent==="primary"?(e.c??="white",e.color??=o.primaryColor):n.intent==="success"?(e.c??="white",e.color??="green"):n.intent==="danger"?(e.c??="white",e.color??="red"):n.intent==="warning"?(e.c??="var(--mantine-color-text)",e.color??="yellow"):n.intent==="info"&&(e.c??="white",e.color??="blue")),n.icon){const u=$e(n.icon)?s.jsx(n.icon,{size:Ve.sizes.icon.md}):s.jsx(le,{w:24,variant:"transparent",size:"sm",c:"var(--mantine-color-text)",...n.themeIconProps,children:n.icon});n.children?e.leftSection=u:(e.children=f.Children.only(u),e.px??="xs")}if(n.leftSection&&!n.children&&(e.px??="xs"),n.textVisibleFrom){const{children:u,textVisibleFrom:d,leftSection:y,...m}=e;return s.jsxs(s.Fragment,{children:[s.jsx(te,{w:"100%",visibleFrom:d,children:s.jsx(ne,{flex:1,...m,leftSection:y,tooltip:r,menu:a,children:u})}),s.jsx(te,{w:"100%",hiddenFrom:d,children:s.jsx(ne,{px:"xs",...m,tooltip:r,menu:a,children:y})})]})}let l="href"in e&&e.href?e.href.startsWith("http")||e.target?s.jsx(ct,{...e,href:e.href,children:e.children}):s.jsx(at,{...e,href:e.href,children:e.children}):(delete e.classNameActive,delete e.variantActive,"action"in e&&e.action?s.jsx(st,{...e,action:e.action,children:e.children}):"onClick"in e&&e.onClick?s.jsx(it,{...e,onClick:e.onClick,children:e.children}):"form"in e&&e.form?e.type==="reset"?s.jsx(rt,{...e,form:e.form,children:e.children}):s.jsx(ot,{...e,form:e.form,children:e.children}):s.jsx(R,{...e,children:e.children}));if(a&&(l=s.jsxs(S,{position:a.position||"bottom-start",width:a.width||200,shadow:a.shadow||"md",trigger:a.on==="hover"?"hover":"click",...a.menuProps,children:[s.jsx(S.Target,{...a.targetProps,children:l}),s.jsx(S.Dropdown,{children:a.items.map((u,d)=>s.jsx(ge,{item:u,index:d},d))})]})),r){const u={openDelay:1e3},d=typeof r=="string"||typeof r=="number"?{...u,label:r,children:l}:{...u,...r,children:l};return s.jsx(ze,{...d})}return l},ot=t=>{const{form:o,...n}=t,r=me(o);return s.jsx(R,{...n,loading:r.loading,disabled:r.loading,type:"submit",children:t.children})},rt=t=>{const{form:o,...n}=t,r=me(o);return s.jsx(R,{...n,disabled:r.loading,type:"reset",children:t.children})},st=t=>{const{action:o,...n}=t;return s.jsx(R,{...n,disabled:o.loading||t.disabled,loading:o.loading,onClick:()=>o.run(),children:t.children})},it=t=>{const o=de({handler:async n=>{await t.onClick(n)}},[t.onClick]);return s.jsx(R,{...t,disabled:o.loading||t.disabled,loading:o.loading,onClick:o.run,children:t.children})},at=t=>{const{active:o,classNameActive:n,variantActive:r,routerGoOptions:a,...i}=t,e=z(),{isPending:c,isActive:l}=We(o?{href:t.href,...o}:{href:t.href}),u=e.anchor(t.href,a),d=i.className||"";return l&&o!==!1&&n&&(i.className=`${d} ${n}`.trim()),t.anchorProps?s.jsx(U,{component:"a",...u,...t.anchorProps,children:t.children}):s.jsx(R,{component:"a",loading:c,...i,...u,variant:l&&o!==!1?r??"filled":i.variant??"subtle",children:t.children})},ct=t=>{const{active:o,classNameActive:n,variantActive:r,routerGoOptions:a,target:i,...e}=t;return s.jsx(R,{component:"a",target:i,...e,children:t.children})};export{ne as A,Ze as a,me as b,C as c,ht as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o,e as n}from"./entry.BY4L2Uc6.js";function i({style:r,size:e=16,...l}){return o.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...r,width:n(e),height:n(e),display:"block"},...l,children:o.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}i.displayName="@mantine/core/AccordionChevron";export{i as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aD as h,g as d,j as i,I as q,i as w,k as p,b9 as v,f as C,b as P,q as V,aE as E,B}from"./entry.BY4L2Uc6.js";import{a as F}from"./chunk.17gtbQUO.js";function f(s){return typeof s=="object"&&s!==null?"base"in s?s.base:void 0:s}function I({spacing:s,verticalSpacing:o,cols:t,selector:m}){const a=w(),l=o===void 0?s:o,c=h({"--sg-spacing-x":d(f(s)),"--sg-spacing-y":d(f(l)),"--sg-cols":f(t)?.toString()}),u=p(a.breakpoints).reduce((e,n)=>(e[n]||(e[n]={}),typeof s=="object"&&s[n]!==void 0&&(e[n]["--sg-spacing-x"]=d(s[n])),typeof l=="object"&&l[n]!==void 0&&(e[n]["--sg-spacing-y"]=d(l[n])),typeof t=="object"&&t[n]!==void 0&&(e[n]["--sg-cols"]=t[n]),e),{}),r=F(p(u),a.breakpoints).filter(e=>p(u[e.value]).length>0).map(e=>({query:`(min-width: ${a.breakpoints[e.value]})`,styles:u[e.value]}));return i.jsx(q,{styles:c,media:r,selector:m})}function x(s){return typeof s=="object"&&s!==null?p(s):[]}function M(s){return s.sort((o,t)=>v(o)-v(t))}function R({spacing:s,verticalSpacing:o,cols:t}){const m=Array.from(new Set([...x(s),...x(o),...x(t)]));return M(m)}function A({spacing:s,verticalSpacing:o,cols:t,selector:m}){const a=o===void 0?s:o,l=h({"--sg-spacing-x":d(f(s)),"--sg-spacing-y":d(f(a)),"--sg-cols":f(t)?.toString()}),c=R({spacing:s,verticalSpacing:o,cols:t}),u=c.reduce((r,e)=>(r[e]||(r[e]={}),typeof s=="object"&&s[e]!==void 0&&(r[e]["--sg-spacing-x"]=d(s[e])),typeof a=="object"&&a[e]!==void 0&&(r[e]["--sg-spacing-y"]=d(a[e])),typeof t=="object"&&t[e]!==void 0&&(r[e]["--sg-cols"]=t[e]),r),{}),y=c.map(r=>({query:`simple-grid (min-width: ${r})`,styles:u[r]}));return i.jsx(q,{styles:l,container:y,selector:m})}var N={container:"m_925c2d2c",root:"m_2415a157"};const D={cols:1,spacing:"md",type:"media"},G=C((s,o)=>{const t=P("SimpleGrid",D,s),{classNames:m,className:a,style:l,styles:c,unstyled:u,vars:y,cols:r,verticalSpacing:e,spacing:n,type:_,attributes:$,...S}=t,j=V({name:"SimpleGrid",classes:N,props:t,className:a,style:l,classNames:m,styles:c,unstyled:u,attributes:$,vars:y}),g=E();return _==="container"?i.jsxs(i.Fragment,{children:[i.jsx(A,{...t,selector:`.${g}`}),i.jsx("div",{...j("container"),children:i.jsx(B,{ref:o,...j("root",{className:g}),...S})})]}):i.jsxs(i.Fragment,{children:[i.jsx(I,{...t,selector:`.${g}`}),i.jsx(B,{ref:o,...j("root",{className:g}),...S})]})});G.classes=N;G.displayName="@mantine/core/SimpleGrid";export{G as S,f as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as q,b as v,q as y,s as f,j as g,B as h,v as z,a1 as E,t as u,f as F,g as T}from"./entry.BY4L2Uc6.js";var x={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const V=f((a,{radius:e,color:s,gradient:o,variant:t,size:r,autoContrast:l,circle:c})=>{const d=a.variantColorResolver({color:s||a.primaryColor,theme:a,gradient:o,variant:t||"filled",autoContrast:l});return{root:{"--badge-height":u(r,"badge-height"),"--badge-padding-x":u(r,"badge-padding-x"),"--badge-fz":u(r,"badge-fz"),"--badge-radius":c||e===void 0?void 0:E(e),"--badge-bg":s||t?d.background:void 0,"--badge-color":s||t?d.color:void 0,"--badge-bd":s||t?d.border:void 0,"--badge-dot-color":t==="dot"?z(s,a):void 0}}}),S=q((a,e)=>{const s=v("Badge",null,a),{classNames:o,className:t,style:r,styles:l,unstyled:c,vars:d,radius:B,color:R,gradient:N,leftSection:i,rightSection:n,children:m,variant:p,fullWidth:_,autoContrast:D,circle:C,mod:w,attributes:P,...$}=s,b=y({name:"Badge",props:s,classes:x,className:t,style:r,classNames:o,styles:l,unstyled:c,attributes:P,vars:d,varsResolver:V});return g.jsxs(h,{variant:p,mod:[{block:_,circle:C,"with-right-section":!!n,"with-left-section":!!i},w],...b("root",{variant:p}),ref:e,...$,children:[i&&g.jsx("span",{...b("section"),"data-position":"left",children:i}),g.jsx("span",{...b("label"),children:m}),n&&g.jsx("span",{...b("section"),"data-position":"right",children:n})]})});S.classes=x;S.displayName="@mantine/core/Badge";var j={root:"m_6d731127"};const W={gap:"md",align:"stretch",justify:"flex-start"},A=f((a,{gap:e,align:s,justify:o})=>({root:{"--stack-gap":T(e),"--stack-align":s,"--stack-justify":o}})),k=F((a,e)=>{const s=v("Stack",W,a),{classNames:o,className:t,style:r,styles:l,unstyled:c,vars:d,align:B,justify:R,gap:N,variant:i,attributes:n,...m}=s,p=y({name:"Stack",props:s,classes:j,className:t,style:r,classNames:o,styles:l,unstyled:c,attributes:n,vars:d,varsResolver:A});return g.jsx(h,{ref:e,...p("root"),variant:i,...m})});k.classes=j;k.displayName="@mantine/core/Stack";export{S as B,k as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as T,Y as J,Z as R,r as u,j as e,F as m,T as o,B as j,H as f,V as z,ae as C,z as B,ac as k,af as w,ad as D,a9 as I,a5 as A,ag as M}from"./entry.BY4L2Uc6.js";import{d as O}from"./chunk.Cw2RCl4F.js";import{S as y,B as E}from"./chunk.Dry2LXOT.js";import{T as b}from"./chunk.rJToME5k.js";import{S as N,I as L,N as F}from"./chunk.CBGZOsrp.js";import{T as $}from"./chunk.DHWcJNNS.js";import"./chunk.BlqFPyLh.js";import"./chunk.BjFrJKj1.js";import"./chunk.qDx9cjbN.js";import"./chunk.uyVen0u2.js";const _=[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]],P=T("outline","device-floppy","DeviceFloppy",_);const H=[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]],U=T("outline","edit","Edit",H),X=({atoms:t,selectedAtom:r,onSelectAtom:i,search:x,onSearchChange:l})=>e.jsxs(y,{gap:0,h:"100%",children:[e.jsx(j,{p:"sm",style:{borderBottom:`1px solid ${f.colors.border}`},children:e.jsx(C,{placeholder:"Search atoms...",leftSection:e.jsx(B,{size:14}),size:"xs",value:x,onChange:n=>l(n.target.value)})}),e.jsx(k,{style:{flex:1},children:e.jsxs(j,{children:[e.jsxs(o,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:f.colors.background,borderBottom:`1px solid ${f.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:["Atoms (",t.length,")"]}),t.map(n=>{const h=r?.name===n.name,s=n.currentValue!==void 0;return e.jsxs(m,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>i(n),style:{cursor:"pointer",backgroundColor:h?"#228be615":void 0,borderLeft:h?"2px solid #228be6":"2px solid transparent",borderBottom:`1px solid ${f.colors.border}`},children:[e.jsx(z,{size:14,opacity:.5}),e.jsx(o,{size:"sm",style:{flex:1},truncate:!0,children:n.name}),s&&e.jsx(E,{size:"xs",variant:"light",color:"green",children:"set"})]},n.name)})]})})]}),V=({schema:t,value:r,onChange:i,path:x=""})=>{if(!t)return null;let l=t;if(t.anyOf){const s=t.anyOf.find(c=>c.type!=="null");s&&(l=s)}const n=l.type,h=l.format;if(n==="object"&&l.properties)return e.jsx(y,{gap:"sm",children:Object.entries(l.properties).map(([s,c])=>e.jsxs(j,{children:[e.jsxs(o,{size:"sm",fw:500,mb:4,children:[c.title||s,c.description&&e.jsx(o,{span:!0,size:"xs",c:"dimmed",ml:"xs",children:c.description})]}),e.jsx(V,{schema:c,value:r?.[s],onChange:d=>i({...r,[s]:d}),path:x?`${x}.${s}`:s})]},s))});if(n==="array"){const s=r??[];return e.jsxs(y,{gap:"xs",children:[s.map((c,d)=>e.jsxs(m,{gap:"xs",align:"center",children:[e.jsx(j,{style:{flex:1},children:e.jsx(V,{schema:l.items,value:c,onChange:g=>{const v=[...s];v[d]=g,i(v)},path:`${x}[${d}]`})}),e.jsx(I,{size:"sm",variant:"light",color:"red",onClick:()=>{const g=s.filter((v,p)=>p!==d);i(g)},children:e.jsx(M,{size:14})})]},d)),e.jsx(A,{size:"xs",variant:"light",onClick:()=>i([...s,void 0]),children:"Add item"})]})}return n==="boolean"?e.jsx(N,{checked:r??!1,onChange:s=>i(s.currentTarget.checked)}):n==="number"||n==="integer"?e.jsx(F,{size:"sm",value:r??"",onChange:s=>i(s===""?void 0:s),allowDecimal:n==="number"}):l.enum?e.jsxs("select",{value:r??"",onChange:s=>i(s.target.value||void 0),style:{padding:"6px 10px",borderRadius:4,border:`1px solid ${f.colors.border}`,backgroundColor:f.colors.surface,width:"100%"},children:[e.jsx("option",{value:"",children:"Select..."}),l.enum.map(s=>e.jsx("option",{value:s,children:s},s))]}):h==="date"||h==="date-time"?e.jsx(C,{size:"sm",type:h==="date"?"date":"datetime-local",value:r??"",onChange:s=>i(s.target.value||void 0)}):h==="textarea"||l.multiline?e.jsx($,{size:"sm",value:r??"",onChange:s=>i(s.target.value||void 0),autosize:!0,minRows:2,maxRows:6}):e.jsx(C,{size:"sm",value:r??"",onChange:s=>i(s.target.value||void 0)})},Y=({atom:t})=>e.jsx(k,{h:"100%",p:"md",children:e.jsxs(y,{gap:"lg",children:[t.description&&e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Description"}),e.jsx(o,{size:"sm",c:"dimmed",children:t.description})]}),e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Current Value"}),t.currentValue!==void 0?e.jsx(w,{data:t.currentValue,maxDepth:3}):e.jsx(o,{size:"sm",c:"dimmed",fs:"italic",children:"(not set - using default)"})]}),e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Default Value"}),t.defaultValue!==void 0?e.jsx(w,{data:t.defaultValue,maxDepth:3}):e.jsx(o,{size:"sm",c:"dimmed",fs:"italic",children:"(no default)"})]}),e.jsxs(j,{children:[e.jsx(o,{size:"sm",fw:600,mb:"xs",children:"Schema"}),e.jsx(w,{data:t.schema,maxDepth:2})]})]})}),Z=({atom:t,onSave:r})=>{const[i,x]=u.useState(t.currentValue??t.defaultValue),[l,n]=u.useState(!1),[h,s]=u.useState(""),[c,d]=u.useState(null);u.useEffect(()=>{const a=t.currentValue??t.defaultValue;x(a),s(JSON.stringify(a,null,2)),d(null)},[t]);const g=a=>{s(a);try{const S=JSON.parse(a);x(S),d(null)}catch{d("Invalid JSON")}},v=()=>{r(i)},p=()=>{const a=t.defaultValue;x(a),s(JSON.stringify(a,null,2)),d(null)};return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(j,{p:"sm",style:{borderBottom:`1px solid ${f.colors.border}`},children:e.jsxs(m,{align:"center",justify:"space-between",children:[e.jsx(m,{gap:"xs",align:"center",children:e.jsx(N,{size:"xs",label:"JSON mode",checked:l,onChange:a=>n(a.currentTarget.checked)})}),e.jsxs(m,{gap:"xs",children:[e.jsx(D,{label:"Reset to default",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:p,children:e.jsx(L,{size:14})})}),e.jsx(A,{size:"xs",leftSection:e.jsx(P,{size:14}),onClick:v,disabled:l&&!!c,children:"Save"})]})]})}),e.jsx(k,{style:{flex:1},p:"md",children:l?e.jsxs(y,{gap:"xs",children:[e.jsx($,{value:h,onChange:a=>g(a.target.value),autosize:!0,minRows:10,maxRows:20,error:c,styles:{input:{fontFamily:"monospace"}}}),c&&e.jsx(o,{size:"xs",c:"red",children:c})]}):e.jsx(V,{schema:t.schema,value:i,onChange:x})})]})},q=({atom:t,onSave:r})=>{const i=t.currentValue!==void 0;return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(j,{px:"md",py:"sm",style:{borderBottom:`1px solid ${f.colors.border}`,backgroundColor:"#228be608"},children:e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(z,{size:18,opacity:.7}),e.jsx(o,{size:"md",fw:600,children:t.name}),e.jsx(E,{size:"xs",variant:"light",color:i?"green":"gray",children:i?"has value":"default"})]})}),e.jsxs(b,{defaultValue:"info",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(b.List,{px:"md",children:[e.jsx(b.Tab,{value:"info",children:"Info"}),e.jsx(b.Tab,{value:"edit",leftSection:e.jsx(U,{size:14}),children:"Edit"})]}),e.jsx(b.Panel,{value:"info",style:{flex:1,overflow:"hidden"},children:e.jsx(Y,{atom:t})}),e.jsx(b.Panel,{value:"edit",style:{flex:1,overflow:"hidden"},children:e.jsx(Z,{atom:t,onSave:x=>r(t,x)})})]})]})},G=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(y,{align:"center",gap:"xs",children:[e.jsx(z,{size:48,opacity:.3}),e.jsx(o,{size:"sm",children:"Select an atom to view its details"})]})}),K=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(y,{align:"center",gap:"xs",children:[e.jsx(z,{size:48,opacity:.3}),e.jsx(o,{children:"No atoms found"}),e.jsx(o,{size:"sm",c:"dimmed",children:"Use $atom primitive to define state atoms"})]})}),oe=()=>{const t=J(R),[r,i]=u.useState([]),[x,l]=u.useState(!0),[n,h]=u.useState(null),[s,c]=u.useState(""),d=u.useCallback(()=>{t.fetch("/devtools/api/metadata",{schema:{response:O}}).then(p=>{if(i(p.data.atoms),l(!1),n){const a=p.data.atoms.find(S=>S.name===n.name);a&&h(a)}})},[n?.name]);u.useEffect(()=>{d()},[]);const g=u.useMemo(()=>{if(!s)return r;const p=s.toLowerCase();return r.filter(a=>a.name.toLowerCase().includes(p))},[r,s]),v=u.useCallback(async(p,a)=>{try{await t.fetch("/devtools/api/atoms",{method:"POST",body:JSON.stringify({name:p.name,value:a})}),d()}catch(S){console.error("Failed to save atom:",S)}},[d]);return x?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(o,{c:"dimmed",children:"Loading..."})}):r.length===0?e.jsx(K,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(j,{w:260,style:{borderRight:`1px solid ${f.colors.border}`,backgroundColor:f.colors.surface},children:e.jsx(X,{atoms:g,selectedAtom:n,onSelectAtom:h,search:s,onSearchChange:c})}),e.jsx(j,{style:{flex:1,overflow:"hidden"},children:n?e.jsx(q,{atom:n,onSave:v}):e.jsx(G,{})})]})};export{oe as DevAtomsViewer,oe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as p,b as y,q as b,s as g,j as x,B as R,a1 as T,t as f}from"./entry.BY4L2Uc6.js";var c={root:"m_7341320d"};const I=g((e,{size:a,radius:t,variant:s,gradient:i,color:o,autoContrast:l})=>{const r=e.variantColorResolver({color:o||e.primaryColor,theme:e,gradient:i,variant:s||"filled",autoContrast:l});return{root:{"--ti-size":f(a,"ti-size"),"--ti-radius":t===void 0?void 0:T(t),"--ti-bg":o||s?r.background:void 0,"--ti-color":o||s?r.color:void 0,"--ti-bd":o||s?r.border:void 0}}}),n=p((e,a)=>{const t=y("ThemeIcon",null,e),{classNames:s,className:i,style:o,styles:l,unstyled:r,vars:d,autoContrast:h,attributes:m,...u}=t,v=b({name:"ThemeIcon",classes:c,props:t,className:i,style:o,classNames:s,styles:l,unstyled:r,attributes:m,vars:d,varsResolver:I});return x.jsx(R,{ref:a,...v("root"),...u})});n.classes=c;n.displayName="@mantine/core/ThemeIcon";export{n as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Y as B,Z as L,r as c,j as e,F as t,T as r,B as x,H as a,ae as T,z as C,ac as S,P as v,ad as w,a5 as P,a9 as A}from"./entry.BY4L2Uc6.js";import{d as E}from"./chunk.Cw2RCl4F.js";import{S as g,B as u}from"./chunk.Dry2LXOT.js";import{I as M}from"./chunk.DEUHUxKv.js";import{T as j}from"./chunk.rJToME5k.js";import{T as n}from"./chunk.DJJIo7HU.js";import{a as O,I}from"./chunk.C49FcqzR.js";import{I as R}from"./chunk.Ct58VlQl.js";import"./chunk.BlqFPyLh.js";const z={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},$=s=>z[s]??z.default,D=s=>s?typeof s=="number"?s<60?`${s}s`:s<3600?`${Math.floor(s/60)}m`:s<86400?`${Math.floor(s/3600)}h`:`${Math.floor(s/86400)}d`:String(s):"No TTL",K=({caches:s,selectedCache:l,onSelectCache:p,search:f,onSearchChange:b})=>{const h=c.useMemo(()=>{const i={};for(const o of s){const d=o.provider||"default";i[d]||(i[d]=[]),i[d].push(o)}return i},[s]),y=Object.keys(h).sort();return e.jsxs(g,{gap:0,h:"100%",children:[e.jsx(x,{p:"sm",style:{borderBottom:`1px solid ${a.colors.border}`},children:e.jsx(T,{placeholder:"Search caches...",leftSection:e.jsx(C,{size:14}),size:"xs",value:f,onChange:i=>b(i.target.value)})}),e.jsx(S,{style:{flex:1},children:y.map(i=>e.jsxs(x,{children:[e.jsx(r,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:a.colors.background,borderBottom:`1px solid ${a.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:i}),h[i].map(o=>{const d=l?.name===o.name,m=$(o.provider);return e.jsxs(t,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>p(o),style:{cursor:"pointer",backgroundColor:d?`${m}15`:void 0,borderLeft:d?`2px solid ${m}`:"2px solid transparent",borderBottom:`1px solid ${a.colors.border}`,opacity:o.disabled?.5:1},children:[e.jsx(v,{size:14,opacity:.5}),e.jsx(r,{size:"sm",style:{flex:1},truncate:!0,children:o.name}),o.disabled&&e.jsx(u,{size:"xs",variant:"light",color:"gray",children:"off"})]},o.name)})]},i))})]})},N=({cache:s})=>e.jsx(S,{h:"100%",p:"md",children:e.jsxs(g,{gap:"lg",children:[e.jsxs(x,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Configuration"}),e.jsx(n,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:e.jsxs(n.Tbody,{children:[e.jsxs(n.Tr,{children:[e.jsx(n.Td,{w:150,children:e.jsx(r,{size:"sm",c:"dimmed",children:"Name"})}),e.jsx(n.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.name})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Provider"})}),e.jsx(n.Td,{children:e.jsx(u,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"TTL"})}),e.jsx(n.Td,{children:e.jsxs(t,{align:"center",gap:"xs",children:[e.jsx(O,{size:14,opacity:.5}),e.jsx(r,{size:"sm",ff:"monospace",children:D(s.ttl)})]})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Status"})}),e.jsx(n.Td,{children:e.jsx(u,{size:"xs",variant:"light",color:s.disabled?"gray":"green",children:s.disabled?"Disabled":"Enabled"})})]})]})})]}),e.jsxs(x,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Actions"}),e.jsx(t,{gap:"sm",children:e.jsx(w,{label:"Clear all cached entries (coming soon)",children:e.jsx(P,{size:"xs",variant:"light",color:"red",leftSection:e.jsx(I,{size:14}),disabled:!0,children:"Clear All"})})})]})]})}),F=({cache:s})=>{const[l,p]=c.useState("");return e.jsxs(t,{direction:"column",h:"100%",children:[e.jsx(x,{p:"sm",style:{borderBottom:`1px solid ${a.colors.border}`},children:e.jsxs(t,{gap:"sm",align:"center",children:[e.jsx(T,{placeholder:"Filter by pattern...",leftSection:e.jsx(C,{size:14}),size:"xs",value:l,onChange:f=>p(f.target.value),style:{flex:1}}),e.jsx(w,{label:"Invalidate matching keys (coming soon)",children:e.jsx(A,{size:"sm",variant:"light",color:"orange",disabled:!0,children:e.jsx(I,{size:14})})})]})}),e.jsx(t,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(R,{size:48,opacity:.3}),e.jsx(r,{size:"sm",children:"Key browser coming soon"}),e.jsxs(r,{size:"xs",c:"dimmed",children:["Browse and manage cached keys for ",s.name]})]})})]})},H=({cache:s})=>{const l=$(s.provider);return e.jsxs(t,{direction:"column",h:"100%",children:[e.jsx(x,{px:"md",py:"sm",style:{borderBottom:`1px solid ${a.colors.border}`,backgroundColor:`${l}08`},children:e.jsxs(t,{align:"center",gap:"sm",children:[e.jsx(v,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,children:s.name}),e.jsx(u,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider}),s.disabled&&e.jsx(u,{size:"xs",variant:"light",color:"gray",children:"disabled"})]})}),e.jsxs(j,{defaultValue:"config",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(j.List,{px:"md",children:[e.jsx(j.Tab,{value:"config",children:"Config"}),e.jsx(j.Tab,{value:"keys",children:"Keys"})]}),e.jsx(j.Panel,{value:"config",style:{flex:1,overflow:"hidden"},children:e.jsx(N,{cache:s})}),e.jsx(j.Panel,{value:"keys",style:{flex:1,overflow:"hidden"},children:e.jsx(F,{cache:s})})]})]})},V=()=>e.jsx(t,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(v,{size:48,opacity:.3}),e.jsx(r,{size:"sm",children:"Select a cache to view its configuration"})]})}),Y=()=>e.jsx(t,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(M,{size:48,opacity:.3}),e.jsx(r,{children:"No caches found"}),e.jsx(r,{size:"sm",c:"dimmed",children:"Add caches using $cache primitive to see them here"})]})}),ee=()=>{const s=B(L),[l,p]=c.useState([]),[f,b]=c.useState(!0),[h,y]=c.useState(null),[i,o]=c.useState("");c.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:E}}).then(m=>{p(m.data.caches),b(!1)})},[]);const d=c.useMemo(()=>{if(!i)return l;const m=i.toLowerCase();return l.filter(k=>k.name.toLowerCase().includes(m))},[l,i]);return f?e.jsx(t,{align:"center",justify:"center",h:"100%",children:e.jsx(r,{c:"dimmed",children:"Loading..."})}):l.length===0?e.jsx(Y,{}):e.jsxs(t,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(x,{w:240,style:{borderRight:`1px solid ${a.colors.border}`,backgroundColor:a.colors.surface},children:e.jsx(K,{caches:d,selectedCache:h,onSelectCache:y,search:i,onSearchChange:o})}),e.jsx(x,{style:{flex:1,overflow:"hidden"},children:h?e.jsx(H,{cache:h}):e.jsx(V,{})})]})};export{ee as DevCacheInspector,ee as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as W,f as B,b as N,j as e,U as xe,B as w,_ as fe,$ as ve,a0 as Q,q as je,s as ge,a1 as ye,e as be,a2 as Se,r as f,a3 as Ce,T as b,Y as X,Z as Y,a4 as A,a5 as Ie,a6 as Z,a7 as ze,a8 as ee,a9 as se,aa as te,ab as oe,ac as re,ad as Ae,G as we,H as G,F as J,K as Pe,ae as Te,z as Ne}from"./entry.BY4L2Uc6.js";import{d as Ee}from"./chunk.Cw2RCl4F.js";import{B as k,S as O}from"./chunk.Dry2LXOT.js";import{C as U}from"./chunk.CyQeq1kA.js";import{T as Re}from"./chunk.DHWcJNNS.js";import{I as _e}from"./chunk.DIfRZc20.js";import{g as V,T as z}from"./chunk.rJToME5k.js";import{A as ne}from"./chunk.DinJSUfH.js";import{c as Oe}from"./chunk.BlqFPyLh.js";import{I as Be}from"./chunk.BYrPfJRg.js";import{I as ke}from"./chunk.DA9XnVAa.js";import{S as Le}from"./chunk.BmJ7-uBd.js";import"./chunk.uyVen0u2.js";const[Je,$]=W("Accordion component was not found in the tree"),[Ue,ae]=W("Accordion.Item component was not found in the tree");var E={root:"m_9bdbb667",panel:"m_df78851f",content:"m_4ba554d4",itemTitle:"m_8fa820a0",control:"m_4ba585b8","control--default":"m_6939a5e9","control--contained":"m_4271d21b",label:"m_df3ffa0f",chevron:"m_3f35ae96",icon:"m_9bd771fe",item:"m_9bd7b098","item--default":"m_fe19b709","item--contained":"m_1f921b3b","item--filled":"m_2cdf939a","item--separated":"m_9f59b069"};const D=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,chevron:c,icon:m,onClick:u,onKeyDown:n,children:r,disabled:i,mod:h,...p}=N("AccordionControl",null,s),{value:y}=ae(),a=$(),S=a.isItemActive(y),R=typeof a.order=="number",T=`h${a.order}`,v=e.jsxs(xe,{...p,...a.getStyles("control",{className:d,classNames:t,style:x,styles:l,variant:a.variant}),unstyled:a.unstyled,mod:["accordion-control",{active:S,"chevron-position":a.chevronPosition,disabled:i},h],ref:o,onClick:P=>{u?.(P),a.onChange(y)},type:"button",disabled:i,"aria-expanded":S,"aria-controls":a.getRegionId(y),id:a.getControlId(y),onKeyDown:Oe({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:a.loop,orientation:"vertical",onKeyDown:n}),children:[e.jsx(w,{component:"span",mod:{rotate:!a.disableChevronRotation&&S,position:a.chevronPosition},...a.getStyles("chevron",{classNames:t,styles:l}),children:c||a.chevron}),e.jsx("span",{...a.getStyles("label",{classNames:t,styles:l}),children:r}),m&&e.jsx(w,{component:"span",mod:{"chevron-position":a.chevronPosition},...a.getStyles("icon",{classNames:t,styles:l}),children:m})]});return R?e.jsx(T,{...a.getStyles("itemTitle",{classNames:t,styles:l}),children:v}):v});D.displayName="@mantine/core/AccordionControl";D.classes=E;const M=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,value:c,mod:m,...u}=N("AccordionItem",null,s),n=$();return e.jsx(Ue,{value:{value:c},children:e.jsx(w,{ref:o,mod:[{active:n.isItemActive(c)},m],...n.getStyles("item",{className:d,classNames:t,styles:l,style:x,variant:n.variant}),...u})})});M.displayName="@mantine/core/AccordionItem";M.classes=E;const F=B((s,o)=>{const{classNames:t,className:d,style:x,styles:l,vars:g,children:c,...m}=N("AccordionPanel",null,s),{value:u}=ae(),n=$();return e.jsx(fe,{ref:o,...n.getStyles("panel",{className:d,classNames:t,style:x,styles:l}),...m,in:n.isItemActive(u),transitionDuration:n.transitionDuration??200,role:"region",id:n.getRegionId(u),"aria-labelledby":n.getControlId(u),children:e.jsx("div",{...n.getStyles("content",{classNames:t,styles:l}),children:c})})});F.displayName="@mantine/core/AccordionPanel";F.classes=E;const $e={multiple:!1,disableChevronRotation:!1,chevronPosition:"right",variant:"default",chevronSize:"auto",chevronIconSize:16},De=ge((s,{transitionDuration:o,chevronSize:t,radius:d})=>({root:{"--accordion-transition-duration":o===void 0?void 0:`${o}ms`,"--accordion-chevron-size":t===void 0?void 0:be(t),"--accordion-radius":d===void 0?void 0:ye(d)}}));function j(s){const o=N("Accordion",$e,s),{classNames:t,className:d,style:x,styles:l,unstyled:g,vars:c,children:m,multiple:u,value:n,defaultValue:r,onChange:i,id:h,loop:p,transitionDuration:y,disableChevronRotation:a,chevronPosition:S,chevronSize:R,order:T,chevron:v,variant:P,radius:Qe,chevronIconSize:le,attributes:ie,...ce}=o,L=ve(h),[C,de]=Q({value:n,defaultValue:r,finalValue:u?[]:null,onChange:i}),ue=I=>Array.isArray(C)?C.includes(I):I===C,me=I=>{const he=Array.isArray(C)?C.includes(I)?C.filter(pe=>pe!==I):[...C,I]:I===C?null:I;de(he)},q=je({name:"Accordion",classes:E,props:o,className:d,style:x,classNames:t,styles:l,unstyled:g,attributes:ie,vars:c,varsResolver:De});return e.jsx(Je,{value:{isItemActive:ue,onChange:me,getControlId:V(`${L}-control`,"Accordion.Item component was rendered with invalid value or without value"),getRegionId:V(`${L}-panel`,"Accordion.Item component was rendered with invalid value or without value"),chevron:v===null?null:v||e.jsx(ne,{size:le}),transitionDuration:y,disableChevronRotation:a,chevronPosition:S,order:T,loop:p,getStyles:q,variant:P,unstyled:g},children:e.jsx(w,{...q("root"),id:L,...ce,variant:P,"data-accordion":!0,children:m})})}const Me=s=>s;j.extend=Me;j.withProps=Se(j);j.classes=E;j.displayName="@mantine/core/Accordion";j.Item=M;j.Panel=F;j.Control=D;j.Chevron=ne;function K(s,o){if(typeof s=="string"&&s.trim().length===0)return!0;try{return o(s),!0}catch{return!1}}const Fe={serialize:JSON.stringify,deserialize:JSON.parse,size:"sm"},H=B((s,o)=>{const{value:t,defaultValue:d,onChange:x,formatOnBlur:l,validationError:g,serialize:c,deserialize:m,onFocus:u,onBlur:n,readOnly:r,error:i,...h}=N("JsonInput",Fe,s),[p,y]=Q({value:t,defaultValue:d,finalValue:"",onChange:x}),[a,S]=f.useState(K(p,m)),R=v=>{u?.(v),S(!0)},T=v=>{typeof n=="function"&&n(v);const P=K(v.currentTarget.value,m);l&&!r&&P&&v.currentTarget.value.trim()!==""&&y(c(m(v.currentTarget.value),null,2)),S(P)};return e.jsx(Re,{value:p,onChange:v=>y(v.currentTarget.value),onFocus:R,onBlur:T,ref:o,readOnly:r,...h,autoComplete:"off",__staticSelector:"JsonInput",error:a?i:g||!0,"data-monospace":!0})});H.classes=Ce.classes;H.displayName="@mantine/core/JsonInput";const He=(s,o)=>{const t=[`curl -X ${s.method.toUpperCase()}`];return t.push(` '${window.location.origin}${s.fullPath}'`),s.body,t.join(` \\
|
|
2
|
+
`)},qe={GET:"teal",POST:"blue",PUT:"orange",PATCH:"yellow",DELETE:"red"},Ge=({method:s})=>e.jsx(k,{variant:"light",color:qe[s.toUpperCase()]||"gray",size:"sm",radius:"sm",w:60,children:s.toUpperCase()}),_=({schema:s,label:o})=>s?e.jsxs(w,{children:[e.jsx(b,{size:"xs",fw:500,c:"dimmed",mb:4,children:o}),e.jsx(U,{block:!0,style:{fontSize:11,maxHeight:200,overflow:"auto"},children:JSON.stringify(s,null,2)})]}):null,Ve=({action:s})=>{const o=X(Y),[t,d]=f.useState("{}"),[x,l]=f.useState(null),[g,c]=f.useState(!1),[m,u]=f.useState(null),[n,r]=f.useState(null),i=f.useCallback(async()=>{c(!0),r(null),l(null);const h=performance.now();try{let p;if(s.body&&t)try{p=JSON.parse(t)}catch{r("Invalid JSON body"),c(!1);return}const y=await o.fetch(s.fullPath,{method:s.method.toUpperCase(),body:p?JSON.stringify(p):void 0,headers:p?{"Content-Type":"application/json"}:void 0});u(Math.round(performance.now()-h)),l(JSON.stringify(y.data,null,2))}catch(p){u(Math.round(performance.now()-h)),r(p instanceof Error?p.message:"Request failed")}finally{c(!1)}},[o,s,t]);return e.jsxs(O,{gap:"md",children:[s.body&&e.jsx(H,{label:"Request Body",placeholder:'{"key": "value"}',value:t,onChange:d,minRows:4,maxRows:10,autosize:!0,formatOnBlur:!0,validationError:"Invalid JSON"}),e.jsxs(A,{children:[e.jsx(Ie,{leftSection:g?e.jsx(Z,{size:14}):e.jsx(_e,{size:14}),onClick:i,disabled:g,size:"sm",children:"Execute"}),m!==null&&e.jsxs(b,{size:"xs",c:"dimmed",children:[m,"ms"]})]}),n&&e.jsx(ze,{p:"sm",bg:"var(--mantine-color-red-light)",children:e.jsx(b,{size:"sm",c:"red",children:n})}),x&&e.jsxs(w,{children:[e.jsxs(A,{justify:"space-between",mb:4,children:[e.jsx(b,{size:"xs",fw:500,c:"dimmed",children:"Response"}),e.jsx(ee,{value:x,children:({copied:h,copy:p})=>e.jsx(se,{size:"xs",variant:"subtle",onClick:p,children:h?e.jsx(te,{size:12}):e.jsx(oe,{size:12})})})]}),e.jsx(re,{h:200,children:e.jsx(U,{block:!0,style:{fontSize:11},children:x})})]})]})},Ke=({action:s})=>{const o=f.useMemo(()=>He(s),[s]);return e.jsxs(j.Item,{value:s.fullPath,opacity:s.disabled?.5:1,children:[e.jsx(j.Control,{children:e.jsxs(A,{gap:"sm",wrap:"nowrap",children:[e.jsx(Ge,{method:s.method}),e.jsx(b,{size:"sm",ff:"monospace",style:{wordBreak:"break-all"},children:s.fullPath}),s.secure&&e.jsx(Ae,{label:"Requires authentication",children:e.jsx(Be,{size:14,opacity:.5})}),s.disabled&&e.jsx(k,{size:"xs",variant:"light",color:"gray",children:"disabled"})]})}),e.jsx(j.Panel,{children:e.jsxs(O,{gap:"md",children:[(s.description||s.summary)&&e.jsx(b,{size:"sm",c:"dimmed",children:s.description||s.summary}),e.jsxs(z,{defaultValue:"schema",variant:"outline",children:[e.jsxs(z.List,{children:[e.jsx(z.Tab,{value:"schema",size:"xs",children:"Schema"}),e.jsx(z.Tab,{value:"try",size:"xs",children:"Try It"}),e.jsx(z.Tab,{value:"curl",size:"xs",leftSection:e.jsx(ke,{size:12}),children:"cURL"})]}),e.jsx(z.Panel,{value:"schema",pt:"md",children:e.jsxs(O,{gap:"md",children:[e.jsxs(A,{gap:"xl",align:"flex-start",children:[e.jsx(_,{schema:s.params,label:"Path Parameters"}),e.jsx(_,{schema:s.query,label:"Query Parameters"})]}),e.jsx(_,{schema:s.body,label:"Request Body"}),e.jsx(_,{schema:s.response,label:"Response"}),!s.params&&!s.query&&!s.body&&!s.response&&e.jsx(b,{size:"sm",c:"dimmed",children:"No schema defined"})]})}),e.jsx(z.Panel,{value:"try",pt:"md",children:e.jsx(Ve,{action:s})}),e.jsx(z.Panel,{value:"curl",pt:"md",children:e.jsxs(w,{pos:"relative",children:[e.jsx(ee,{value:o,children:({copied:t,copy:d})=>e.jsx(se,{size:"sm",variant:"subtle",onClick:d,pos:"absolute",top:8,right:8,children:t?e.jsx(te,{size:14}):e.jsx(oe,{size:14})})}),e.jsx(U,{block:!0,style:{fontSize:11},children:o})]})})]})]})})]})},We=({group:s,actions:o})=>e.jsxs(w,{children:[e.jsxs(A,{gap:"xs",mb:"xs",children:[e.jsx(we,{size:14,opacity:.5}),e.jsx(b,{size:"xs",fw:600,tt:"uppercase",c:"dimmed",children:s}),e.jsx(k,{variant:"light",color:"gray",size:"xs",children:o.length})]}),e.jsx(j,{variant:"separated",styles:{item:{backgroundColor:G.colors.surface,border:`1px solid ${G.colors.border}`}},children:o.map(t=>e.jsx(Ke,{action:t},t.fullPath))})]}),ds=()=>{const s=X(Y),[o,t]=f.useState([]),[d,x]=f.useState(!0),[l,g]=f.useState(""),[c,m]=f.useState("all");f.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:Ee}}).then(r=>{t(r.data.actions),x(!1)})},[]);const u=f.useMemo(()=>o.filter(r=>{if(r.hide||c!=="all"&&r.method.toUpperCase()!==c)return!1;if(l){const i=l.toLowerCase();return r.fullPath.toLowerCase().includes(i)||r.name.toLowerCase().includes(i)||r.group.toLowerCase().includes(i)||r.description?.toLowerCase().includes(i)}return!0}),[o,l,c]),n=f.useMemo(()=>{const r={};for(const i of u){const h=i.group||"Other";r[h]||(r[h]=[]),r[h].push(i)}return Object.entries(r).sort(([i],[h])=>i.localeCompare(h))},[u]);return d?e.jsx(J,{align:"center",justify:"center",h:"100%",children:e.jsx(Z,{size:"sm"})}):e.jsxs(J,{direction:"column",gap:"md",w:"100%",h:"100%",p:"xl",children:[e.jsx(A,{justify:"space-between",wrap:"nowrap",children:e.jsxs(A,{gap:"sm",children:[e.jsx(Pe,{size:24,opacity:.7}),e.jsx(b,{size:"lg",fw:500,children:"Actions"}),e.jsx(k,{variant:"light",color:"gray",size:"sm",children:u.length})]})}),e.jsxs(A,{gap:"sm",children:[e.jsx(Te,{placeholder:"Search actions...",leftSection:e.jsx(Ne,{size:14}),value:l,onChange:r=>g(r.currentTarget.value),style:{flex:1},size:"sm"}),e.jsx(Le,{size:"xs",value:c,onChange:m,data:[{label:"All",value:"all"},{label:"GET",value:"GET"},{label:"POST",value:"POST"},{label:"PUT",value:"PUT"},{label:"DELETE",value:"DELETE"}]})]}),e.jsx(re,{flex:1,offsetScrollbars:!0,children:n.length===0?e.jsx(J,{align:"center",justify:"center",h:200,children:e.jsx(b,{c:"dimmed",children:"No actions found"})}):e.jsx(O,{gap:"md",children:n.map(([r,i])=>e.jsx(We,{group:r,actions:i},r))})})]})};export{ds as DevActionsExplorer,ds as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{w as T,Y as C,Z as k,r as h,j as e,F as x,T as r,B as a,H as p,ae as L,z as E,ac as v,S as z,a8 as V,ad as B,aa as I,ab as M}from"./entry.BY4L2Uc6.js";import{d as $}from"./chunk.Cw2RCl4F.js";import{S as y,B as b}from"./chunk.Dry2LXOT.js";import{C as w}from"./chunk.CyQeq1kA.js";import{T as t}from"./chunk.DJJIo7HU.js";import{I as H}from"./chunk.Ct58VlQl.js";const N=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],O=T("outline","settings","Settings",N),A=s=>{const n=new Map;for(const l of s){const i=l.schema;if(i?.properties)for(const[o,c]of Object.entries(i.properties)){if(n.has(o))continue;const d=c,u=l.values[o];let g=d.type??"unknown",m=d.format;if(d.anyOf){const j=d.anyOf.find(f=>f.type!=="null");j&&(g=j.type??"unknown",m=j.format)}n.set(o,{name:o,value:u,type:g,description:d.description,format:m})}}return Array.from(n.values()).sort((l,i)=>l.name.localeCompare(i.name))},F=({variables:s,selectedVar:n,onSelectVar:l,search:i,onSearchChange:o})=>e.jsxs(y,{gap:0,h:"100%",children:[e.jsx(a,{p:"sm",style:{borderBottom:`1px solid ${p.colors.border}`},children:e.jsx(L,{placeholder:"Search variables...",leftSection:e.jsx(E,{size:14}),size:"xs",value:i,onChange:c=>o(c.target.value)})}),e.jsx(v,{style:{flex:1},children:e.jsxs(a,{children:[e.jsxs(r,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:p.colors.background,borderBottom:`1px solid ${p.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:["Variables (",s.length,")"]}),s.map(c=>{const d=n?.name===c.name;return e.jsxs(x,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>l(c),style:{cursor:"pointer",backgroundColor:d?"#228be615":void 0,borderLeft:d?"2px solid #228be6":"2px solid transparent",borderBottom:`1px solid ${p.colors.border}`},children:[e.jsx(z,{size:14,opacity:.5}),e.jsx(r,{size:"sm",style:{flex:1},truncate:!0,ff:"monospace",children:c.name})]},c.name)})]})})]}),R=({variable:s})=>{const n=s.value!==void 0&&s.value!=="",l=n?String(s.value):"(not set)",i=s.name.toLowerCase().includes("secret")||s.name.toLowerCase().includes("password")||s.name.toLowerCase().includes("key")||s.name.toLowerCase().includes("token");return e.jsxs(x,{direction:"column",h:"100%",children:[e.jsx(a,{px:"md",py:"sm",style:{borderBottom:`1px solid ${p.colors.border}`,backgroundColor:"#228be608"},children:e.jsxs(x,{align:"center",gap:"sm",children:[e.jsx(z,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(b,{size:"xs",variant:"outline",color:"blue",children:s.format||s.type})]})}),e.jsx(v,{style:{flex:1},p:"md",children:e.jsxs(y,{gap:"lg",children:[s.description&&e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Description"}),e.jsx(r,{size:"sm",c:"dimmed",children:s.description})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Current Value"}),e.jsxs(x,{align:"center",gap:"sm",children:[e.jsx(w,{block:!0,style:{flex:1,filter:i&&n?"blur(4px)":void 0,transition:"filter 0.2s"},onMouseEnter:o=>{i&&(o.currentTarget.style.filter="none")},onMouseLeave:o=>{i&&n&&(o.currentTarget.style.filter="blur(4px)")},children:l}),n&&e.jsx(V,{value:String(s.value),children:({copied:o,copy:c})=>e.jsx(B,{label:o?"Copied!":"Copy value",children:e.jsx(a,{onClick:c,style:{cursor:"pointer"},c:o?"teal":"dimmed",children:o?e.jsx(I,{size:16}):e.jsx(M,{size:16})})})})]}),i&&e.jsx(r,{size:"xs",c:"dimmed",mt:"xs",children:"Hover to reveal sensitive value"})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Schema"}),e.jsx(t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:e.jsxs(t.Tbody,{children:[e.jsxs(t.Tr,{children:[e.jsx(t.Td,{w:120,children:e.jsx(r,{size:"sm",c:"dimmed",children:"Type"})}),e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.type})})]}),s.format&&e.jsxs(t.Tr,{children:[e.jsx(t.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Format"})}),e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.format})})]})]})})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Usage"}),e.jsx(w,{block:!0,children:`# Set in .env file or environment
|
|
2
|
+
${s.name}=${n?s.value:"<value>"}`})]})]})})]})},D=()=>e.jsx(x,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(y,{align:"center",gap:"xs",children:[e.jsx(O,{size:48,opacity:.3}),e.jsx(r,{children:"No environment variables found"}),e.jsx(r,{size:"sm",c:"dimmed",children:"Use $env primitive to define expected environment variables"})]})}),U=({variables:s})=>e.jsx(v,{h:"100%",p:"md",children:e.jsx(y,{gap:"lg",children:e.jsxs(a,{children:[e.jsxs(x,{align:"center",gap:"xs",mb:"sm",children:[e.jsx(H,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,children:"All Environment Variables"}),e.jsxs(b,{size:"sm",variant:"light",children:[s.length," variables"]})]}),e.jsxs(t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[e.jsx(t.Thead,{children:e.jsxs(t.Tr,{children:[e.jsx(t.Th,{children:"Name"}),e.jsx(t.Th,{children:"Type"}),e.jsx(t.Th,{children:"Value"})]})}),e.jsx(t.Tbody,{children:s.map(n=>{const l=n.value!==void 0&&n.value!=="",i=n.name.toLowerCase().includes("secret")||n.name.toLowerCase().includes("password")||n.name.toLowerCase().includes("key")||n.name.toLowerCase().includes("token");return e.jsxs(t.Tr,{children:[e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",fw:500,children:n.name})}),e.jsx(t.Td,{children:e.jsx(b,{size:"xs",variant:"outline",color:"blue",children:n.format||n.type})}),e.jsx(t.Td,{children:l?e.jsxs(r,{size:"sm",ff:"monospace",c:"dimmed",style:{filter:i?"blur(4px)":void 0},children:[String(n.value).slice(0,30),String(n.value).length>30?"...":""]}):e.jsx(r,{size:"sm",c:"dimmed",fs:"italic",children:"(not set)"})})]},n.name)})})]})]})})}),G=()=>{const s=C(k),[n,l]=h.useState([]),[i,o]=h.useState(!0),[c,d]=h.useState(null),[u,g]=h.useState("");h.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:$}}).then(f=>{l(f.data.envs),o(!1)})},[]);const m=h.useMemo(()=>A(n),[n]),j=h.useMemo(()=>{if(!u)return m;const f=u.toLowerCase();return m.filter(S=>S.name.toLowerCase().includes(f))},[m,u]);return i?e.jsx(x,{align:"center",justify:"center",h:"100%",children:e.jsx(r,{c:"dimmed",children:"Loading..."})}):m.length===0?e.jsx(D,{}):e.jsxs(x,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(a,{w:280,style:{borderRight:`1px solid ${p.colors.border}`,backgroundColor:p.colors.surface},children:e.jsx(F,{variables:j,selectedVar:c,onSelectVar:d,search:u,onSearchChange:g})}),e.jsx(a,{style:{flex:1,overflow:"hidden"},children:c?e.jsx(R,{variable:c}):e.jsx(U,{variables:m})})]})};export{G as DevEnvExplorer,G as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,c as Me,f as S,b as P,bd as $e,ay as q,j as g,be as B,aJ as J,bf as Ae,B as T,bg as Le,e as He,b8 as Ke,bc as Ue,d as We,bh as Z,a0 as Xe,bi as Ye,bj as K,ax as U,n as qe,bk as Be,bl as Je,bm as Ze,bn as W,bo as X,bp as Y,bq as Ge,br as Qe,o as eo,q as G,s as Q,av as oo,ah as to,$ as ro,bs as so,bt as no,bu as ao,a1 as io,t as lo,v as co}from"./entry.BY4L2Uc6.js";import{n as po}from"./chunk.BjFrJKj1.js";function uo(e,s={active:!0}){return typeof e!="function"||!s.active?s.onKeyDown||po:r=>{r.key==="Escape"&&(e(r),s.onTrigger?.())}}const fo=["mousedown","touchstart"];function go(e,s,r){const t=u.useRef(null),l=s||fo;return u.useEffect(()=>{const p=i=>{const{target:n}=i??{};if(Array.isArray(r)){const a=!document.body.contains(n)&&n?.tagName!=="HTML";r.every(d=>!!d&&!i.composedPath().includes(d))&&!a&&e(i)}else t.current&&!t.current.contains(n)&&e(i)};return l.forEach(i=>document.addEventListener(i,p)),()=>{l.forEach(i=>document.removeEventListener(i,p))}},[t,e,r]),t}const[wo,ee]=Me("Popover component was not found in the tree");var oe={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const N=S((e,s)=>{const r=P("PopoverDropdown",null,e),{className:t,style:l,vars:p,children:i,onKeyDownCapture:n,variant:a,classNames:w,styles:d,...f}=r,o=ee(),m=$e({opened:o.opened,shouldReturnFocus:o.returnFocus}),v=o.withRoles?{"aria-labelledby":o.getTargetId(),id:o.getDropdownId(),role:"dialog",tabIndex:-1}:{},y=q(s,o.floating);return o.disabled?null:g.jsx(B,{...o.portalProps,withinPortal:o.withinPortal,children:g.jsx(J,{mounted:o.opened,...o.transitionProps,transition:o.transitionProps?.transition||"fade",duration:o.transitionProps?.duration??150,keepMounted:o.keepMounted,exitDuration:typeof o.transitionProps?.exitDuration=="number"?o.transitionProps.exitDuration:o.transitionProps?.duration,children:b=>g.jsx(Ae,{active:o.trapFocus&&o.opened,innerRef:y,children:g.jsxs(T,{...v,...f,variant:a,onKeyDownCapture:uo(()=>{o.onClose?.(),o.onDismiss?.()},{active:o.closeOnEscape,onTrigger:m,onKeyDown:n}),"data-position":o.placement,"data-fixed":o.floatingStrategy==="fixed"||void 0,...o.getStyles("dropdown",{className:t,props:r,classNames:w,styles:d,style:[{...b,zIndex:o.zIndex,top:o.y??0,left:o.x??0,width:o.width==="target"?void 0:He(o.width),...o.referenceHidden?{display:"none"}:null},o.resolvedStyles.dropdown,d?.dropdown,l]}),children:[i,g.jsx(Le,{ref:o.arrowRef,arrowX:o.arrowX,arrowY:o.arrowY,visible:o.withArrow,position:o.placement,arrowSize:o.arrowSize,arrowRadius:o.arrowRadius,arrowOffset:o.arrowOffset,arrowPosition:o.arrowPosition,...o.getStyles("arrow",{props:r,classNames:w,styles:d})})]})})})})});N.classes=oe;N.displayName="@mantine/core/PopoverDropdown";const ho={refProp:"ref",popupType:"dialog"},te=S((e,s)=>{const{children:r,refProp:t,popupType:l,...p}=P("PopoverTarget",ho,e),i=Ke(r);if(!i)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const n=p,a=ee(),w=q(a.reference,Ue(i),s),d=a.withRoles?{"aria-haspopup":l,"aria-expanded":a.opened,"aria-controls":a.getDropdownId(),id:a.getTargetId()}:{},f=i.props;return u.cloneElement(i,{...n,...d,...a.targetProps,className:We(a.targetProps.className,n.className,f.className),[t]:w,...a.controlled?null:{onClick:()=>{a.onToggle(),f.onClick?.()}}})});te.displayName="@mantine/core/PopoverTarget";function mo(e){if(e===void 0)return{shift:!0,flip:!0};const s={...e};return e.shift===void 0&&(s.shift=!0),e.flip===void 0&&(s.flip=!0),s}function vo(e,s,r){const t=mo(e.middlewares),l=[Be(e.offset),Je()];return e.dropdownVisible&&r!=="test"&&e.preventPositionChangeWhenVisible&&(t.flip=!1),t.shift&&l.push(Ze(typeof t.shift=="boolean"?{limiter:W(),padding:5}:{limiter:W(),padding:5,...t.shift})),t.flip&&l.push(typeof t.flip=="boolean"?X():X(t.flip)),t.inline&&l.push(typeof t.inline=="boolean"?Y():Y(t.inline)),l.push(Ge({element:e.arrowRef,padding:e.arrowOffset})),(t.size||e.width==="target")&&l.push(Qe({...typeof t.size=="boolean"?{}:t.size,apply({rects:p,availableWidth:i,availableHeight:n,...a}){const d=s().refs.floating.current?.style??{};t.size&&(typeof t.size=="object"&&t.size.apply?t.size.apply({rects:p,availableWidth:i,availableHeight:n,...a}):Object.assign(d,{maxWidth:`${i}px`,maxHeight:`${n}px`})),e.width==="target"&&Object.assign(d,{width:`${p.reference.width}px`})}})),l}function yo(e){const s=Z(),[r,t]=Xe({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),l=u.useRef(r),p=()=>{r&&!e.disabled&&t(!1)},i=()=>{e.disabled||t(!r)},n=Ye({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:vo(e,()=>n,s),whileElementsMounted:e.keepMounted?void 0:K});return u.useEffect(()=>{if(!(!n.refs.reference.current||!n.refs.floating.current)&&r)return K(n.refs.reference.current,n.refs.floating.current,n.update)},[r,n.update]),U(()=>{e.onPositionChange?.(n.placement),e.positionRef.current=n.placement},[n.placement,e.preventPositionChangeWhenVisible]),U(()=>{r!==l.current&&(r?e.onOpen?.():e.onClose?.()),l.current=r},[r,e.onClose,e.onOpen]),qe(()=>{let a=-1;return r&&(a=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(a)}},[r,e.position]),{floating:n,controlled:typeof e.opened=="boolean",opened:r,onClose:p,onToggle:i}}const bo={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:eo("popover"),__staticSelector:"Popover",width:"max-content"},Po=Q((e,{radius:s,shadow:r})=>({dropdown:{"--popover-radius":s===void 0?void 0:io(s),"--popover-shadow":ao(r)}}));function x(e){const s=P("Popover",bo,e),{children:r,position:t,offset:l,onPositionChange:p,positionDependencies:i,opened:n,transitionProps:a,onExitTransitionEnd:w,onEnterTransitionEnd:d,width:f,middlewares:o,withArrow:m,arrowSize:v,arrowOffset:y,arrowRadius:b,arrowPosition:ne,unstyled:z,classNames:D,styles:E,closeOnClickOutside:ae,withinPortal:j,portalProps:ie,closeOnEscape:le,clickOutsideEvents:de,trapFocus:ce,onClose:pe,onDismiss:R,onOpen:ue,onChange:fe,zIndex:ge,radius:we,shadow:he,id:me,defaultOpened:F,__staticSelector:I,withRoles:ve,disabled:k,returnFocus:ye,variant:be,keepMounted:V,vars:Pe,floatingStrategy:_,withOverlay:xe,overlayProps:C,hideDetached:De,attributes:Ee,preventPositionChangeWhenVisible:O,...Re}=s,M=G({name:I,props:s,classes:oe,classNames:D,styles:E,unstyled:z,attributes:Ee,rootSelector:"dropdown",vars:Pe,varsResolver:Po}),{resolvedStyles:Ce}=oo({classNames:D,styles:E,props:s}),[Oe,$]=u.useState(n??F??!1),A=u.useRef(t),L=u.useRef(null),[Te,Se]=u.useState(null),[Ne,ze]=u.useState(null),{dir:je}=to(),Fe=Z(),H=ro(me),c=yo({middlewares:o,width:f,position:so(je,t),offset:typeof l=="number"?l+(m?v/2:0):l,arrowRef:L,arrowOffset:y,onPositionChange:p,positionDependencies:i,opened:n,defaultOpened:F,onChange:fe,onOpen:ue,onClose:pe,onDismiss:R,strategy:_,dropdownVisible:Oe,setDropdownVisible:$,positionRef:A,disabled:k,preventPositionChangeWhenVisible:O,keepMounted:V});go(()=>{ae&&(c.onClose(),R?.())},de,[Te,Ne]);const Ie=u.useCallback(h=>{Se(h),c.floating.refs.setReference(h)},[c.floating.refs.setReference]),ke=u.useCallback(h=>{ze(h),c.floating.refs.setFloating(h)},[c.floating.refs.setFloating]),Ve=u.useCallback(()=>{a?.onExited?.(),w?.(),$(!1),O||(A.current=t)},[a?.onExited,w,O,t]),_e=u.useCallback(()=>{a?.onEntered?.(),d?.()},[a?.onEntered,d]);return g.jsxs(wo,{value:{returnFocus:ye,disabled:k,controlled:c.controlled,reference:Ie,floating:ke,x:c.floating.x,y:c.floating.y,arrowX:c.floating?.middlewareData?.arrow?.x,arrowY:c.floating?.middlewareData?.arrow?.y,opened:c.opened,arrowRef:L,transitionProps:{...a,onExited:Ve,onEntered:_e},width:f,withArrow:m,arrowSize:v,arrowOffset:y,arrowRadius:b,arrowPosition:ne,placement:c.floating.placement,trapFocus:ce,withinPortal:j,portalProps:ie,zIndex:ge,radius:we,shadow:he,closeOnEscape:le,onDismiss:R,onClose:c.onClose,onToggle:c.onToggle,getTargetId:()=>`${H}-target`,getDropdownId:()=>`${H}-dropdown`,withRoles:ve,targetProps:Re,__staticSelector:I,classNames:D,styles:E,unstyled:z,variant:be,keepMounted:V,getStyles:M,resolvedStyles:Ce,floatingStrategy:_,referenceHidden:De&&Fe!=="test"?c.floating.middlewareData.hide?.referenceHidden:!1},children:[r,xe&&g.jsx(J,{transition:"fade",mounted:c.opened,duration:a?.duration||250,exitDuration:a?.exitDuration||250,children:h=>g.jsx(B,{withinPortal:j,children:g.jsx(no,{...C,...M("overlay",{className:C?.className,style:[h,C?.style]})})})})]})}x.Target=te;x.Dropdown=N;x.displayName="@mantine/core/Popover";x.extend=e=>e;var re={root:"m_3eebeb36",label:"m_9e365f20"};const xo={orientation:"horizontal"},Do=Q((e,{color:s,variant:r,size:t})=>({root:{"--divider-color":s?co(s,e):void 0,"--divider-border-style":r,"--divider-size":lo(t,"divider-size")}})),se=S((e,s)=>{const r=P("Divider",xo,e),{classNames:t,className:l,style:p,styles:i,unstyled:n,vars:a,color:w,orientation:d,label:f,labelPosition:o,mod:m,attributes:v,...y}=r,b=G({name:"Divider",classes:re,props:r,className:l,style:p,classNames:t,styles:i,unstyled:n,attributes:v,vars:a,varsResolver:Do});return g.jsx(T,{ref:s,mod:[{orientation:d,"with-label":!!f},m],...b("root"),...y,role:"separator",children:f&&g.jsx(T,{component:"span",mod:{position:o},...b("label"),children:f})})});se.classes=re;se.displayName="@mantine/core/Divider";export{se as D,x as P,go as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as W,q as C,j as e,B as o,t as R,aI as q,aB as x,aF as w}from"./entry.BY4L2Uc6.js";var u={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};const N=u,D=W.forwardRef(({__staticSelector:t,__stylesApiProps:l,className:s,classNames:f,styles:I,unstyled:_,children:h,label:i,description:d,id:p,disabled:b,error:n,size:r,labelPosition:j="left",bodyElement:c="div",labelElement:m="label",variant:v,style:y,vars:E,mod:F,attributes:S,...g},B)=>{const a=C({name:t,props:l,className:s,style:y,classes:u,classNames:f,styles:I,unstyled:_,attributes:S});return e.jsx(o,{...a("root"),ref:B,__vars:{"--label-fz":q(r),"--label-lh":R(r,"label-lh")},mod:[{"label-position":j},F],variant:v,size:r,...g,children:e.jsxs(o,{component:c,htmlFor:c==="label"?p:void 0,...a("body"),children:[h,e.jsxs("div",{...a("labelWrapper"),"data-disabled":b||void 0,children:[i&&e.jsx(o,{component:m,htmlFor:m==="label"?p:void 0,...a("label"),"data-disabled":b||void 0,children:i}),d&&e.jsx(x.Description,{size:r,__inheritStyles:!1,...a("description"),children:d}),n&&typeof n!="boolean"&&e.jsx(x.Error,{size:r,__inheritStyles:!1,...a("error"),children:n})]})]})})});D.displayName="@mantine/core/InlineInput";function k({children:t,role:l}){const s=w();return s?e.jsx("div",{role:l,"aria-labelledby":s.labelId,"aria-describedby":s.describedBy,children:t}):e.jsx(e.Fragment,{children:t})}export{k as I,D as a,N as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as q,f as w,b as C,j as u,B as k,i as F,ah as H,U as G,v as z,$ as J,a0 as Q,q as X,s as Y,ai as Z,a1 as tt,aj as et}from"./entry.BY4L2Uc6.js";import{c as at}from"./chunk.BlqFPyLh.js";function E(s,o){return a=>{if(typeof a!="string"||a.trim().length===0)throw new Error(o);return`${s}-${a}`}}const[st,K]=q("Tabs component was not found in the tree");var g={root:"m_89d60db1","list--default":"m_576c9d4",list:"m_89d33d6d",tab:"m_4ec4dce6",panel:"m_b0c91715",tabSection:"m_fc420b1f",tabLabel:"m_42bbd1ae","tab--default":"m_539e827b","list--outline":"m_6772fbd5","tab--outline":"m_b59ab47c","tab--pills":"m_c3381914"};const D=w((s,o)=>{const a=C("TabsList",null,s),{children:l,className:c,grow:r,justify:i,classNames:n,styles:m,style:v,mod:d,...b}=a,e=K();return u.jsx(k,{...b,...e.getStyles("list",{className:c,style:v,classNames:n,styles:m,props:a,variant:e.variant}),ref:o,role:"tablist",variant:e.variant,mod:[{grow:r,orientation:e.orientation,placement:e.orientation==="vertical"&&e.placement,inverted:e.inverted},d],"aria-orientation":e.orientation,__vars:{"--tabs-justify":i},children:l})});D.classes=g;D.displayName="@mantine/core/TabsList";const M=w((s,o)=>{const a=C("TabsPanel",null,s),{children:l,className:c,value:r,classNames:i,styles:n,style:m,mod:v,keepMounted:d,...b}=a,e=K(),p=e.value===r,y=e.keepMounted||d||p?l:null;return u.jsx(k,{...e.getStyles("panel",{className:c,classNames:i,styles:n,style:[m,p?void 0:{display:"none"}],props:a}),ref:o,mod:[{orientation:e.orientation},v],role:"tabpanel",id:e.getPanelId(r),"aria-labelledby":e.getTabId(r),...b,children:y})});M.classes=g;M.displayName="@mantine/core/TabsPanel";const V=w((s,o)=>{const a=C("TabsTab",null,s),{className:l,children:c,rightSection:r,leftSection:i,value:n,onClick:m,onKeyDown:v,disabled:d,color:b,style:e,classNames:p,styles:y,vars:N,mod:x,tabIndex:S,...P}=a,I=F(),{dir:_}=H(),t=K(),T=n===t.value,L=R=>{t.onChange(t.allowTabDeactivation&&n===t.value?null:n),m?.(R)},h={classNames:p,styles:y,props:a};return u.jsxs(G,{...t.getStyles("tab",{className:l,style:e,variant:t.variant,...h}),disabled:d,unstyled:t.unstyled,variant:t.variant,mod:[{active:T,disabled:d,orientation:t.orientation,inverted:t.inverted,placement:t.orientation==="vertical"&&t.placement},x],ref:o,role:"tab",id:t.getTabId(n),"aria-selected":T,tabIndex:S!==void 0?S:T||t.value===null?0:-1,"aria-controls":t.getPanelId(n),onClick:L,__vars:{"--tabs-color":b?z(b,I):void 0},onKeyDown:at({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:t.activateTabWithKeyboard,loop:t.loop,orientation:t.orientation||"horizontal",dir:_,onKeyDown:v}),...P,children:[i&&u.jsx("span",{...t.getStyles("tabSection",h),"data-position":"left",children:i}),c&&u.jsx("span",{...t.getStyles("tabLabel",h),children:c}),r&&u.jsx("span",{...t.getStyles("tabSection",h),"data-position":"right",children:r})]})});V.classes=g;V.displayName="@mantine/core/TabsTab";const U="Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value",nt={keepMounted:!0,orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,variant:"default",placement:"left"},ot=Y((s,{radius:o,color:a,autoContrast:l})=>({root:{"--tabs-radius":tt(o),"--tabs-color":z(a,s),"--tabs-text-color":et(l,s)?Z({color:a,theme:s,autoContrast:l}):void 0}})),f=w((s,o)=>{const a=C("Tabs",nt,s),{defaultValue:l,value:c,onChange:r,orientation:i,children:n,loop:m,id:v,activateTabWithKeyboard:d,allowTabDeactivation:b,variant:e,color:p,radius:y,inverted:N,placement:x,keepMounted:S,classNames:P,styles:I,unstyled:_,className:t,style:T,vars:L,autoContrast:h,mod:R,attributes:A,...B}=a,j=J(v),[W,O]=Q({value:c,defaultValue:l,finalValue:null,onChange:r}),$=X({name:"Tabs",props:a,classes:g,className:t,style:T,classNames:P,styles:I,unstyled:_,attributes:A,vars:L,varsResolver:ot});return u.jsx(st,{value:{placement:x,value:W,orientation:i,id:j,loop:m,activateTabWithKeyboard:d,getTabId:E(`${j}-tab`,U),getPanelId:E(`${j}-panel`,U),onChange:O,allowTabDeactivation:b,variant:e,color:p,radius:y,inverted:N,keepMounted:S,unstyled:_,getStyles:$},children:u.jsx(k,{ref:o,id:j,variant:e,mod:[{orientation:i,inverted:i==="horizontal"&&N,placement:i==="vertical"&&x},R],...$("root"),...B,children:n})})});f.classes=g;f.displayName="@mantine/core/Tabs";f.Tab=V;f.Panel=M;f.List=D;export{f as T,E as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as we,r as b,M as Ne,a as Ie,c as Ae,f as S,b as v,j as n,B as x,d as H,R as $,e as m,k as N,g as Ce,h as te,i as ze,l as ke,I as ye,p as Be,m as Pe,n as Re,o as Te,q as W,s as O,U as _e,t as ne,v as Ve,w as A,x as T,F as f,y as Ee,z as Fe,T as q,A as _,C as k,D as ae,E as Le,G as De,H as j,N as le,J as He,K as $e,L as We,O as Oe,P as qe,Q as Ke,S as Xe,V as Qe,W as Ge,X as Ue}from"./entry.BY4L2Uc6.js";import{A as I,u as Ye}from"./chunk.DR0SHXXd.js";import{n as Je}from"./chunk.BjFrJKj1.js";import{S as Me}from"./chunk.BmJ7-uBd.js";import{D as Ze}from"./chunk.fpKvkQeU.js";import{g as ie,a as se}from"./chunk.17gtbQUO.js";import{I as et}from"./chunk.DGW-W4Kc.js";import"./chunk.OlMI8g2F.js";import"./chunk.BlqFPyLh.js";import"./chunk.DinJSUfH.js";import"./chunk.uyVen0u2.js";function ce(e,t){return we("(prefers-color-scheme: dark)",e==="dark",t)?"dark":"light"}function oe(e){const t=document.createElement("style");return t.setAttribute("data-mantine-styles","inline"),t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(s=>s.remove())}function de({keepTransitions:e}={}){const t=b.useRef(Je),o=b.useRef(-1),s=b.useContext(Ne),d=Ie(),l=b.useRef(d?.());if(!s)throw new Error("[@mantine/core] MantineProvider was not found in tree");const a=p=>{s.setColorScheme(p),t.current=e?()=>{}:oe(l.current),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{t.current?.()},10)},c=()=>{s.clearColorScheme(),t.current=e?()=>{}:oe(l.current),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{t.current?.()},10)},r=ce("light",{getInitialValueInEffect:!1}),h=s.colorScheme==="auto"?r:s.colorScheme,i=b.useCallback(()=>a(h==="light"?"dark":"light"),[a,h]);return b.useEffect(()=>()=>{t.current?.(),window.clearTimeout(o.current)},[]),{colorScheme:s.colorScheme,setColorScheme:a,clearColorScheme:c,toggleColorScheme:i}}function tt(e,t={getInitialValueInEffect:!0}){const o=ce(e,t),{colorScheme:s}=de();return s==="auto"?o:s}const[st,C]=Ae("AppShell was not found in tree");var w={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const K=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellAside",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"aside",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("aside",{className:H({[$.classNames.zeroRight]:u.offsetScrollbars},s),classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-aside-z-index":`calc(${h??u.zIndex} + 1)`}})});K.classes=w;K.displayName="@mantine/core/AppShellAside";const X=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellFooter",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"footer",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("footer",{className:H({[$.classNames.zeroRight]:u.offsetScrollbars},s),classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-footer-z-index":(h??u.zIndex)?.toString()}})});X.classes=w;X.displayName="@mantine/core/AppShellFooter";const Q=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellHeader",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"header",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("header",{className:H({[$.classNames.zeroRight]:u.offsetScrollbars},s),classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-header-z-index":(h??u.zIndex)?.toString()}})});Q.classes=w;Q.displayName="@mantine/core/AppShellHeader";const G=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,vars:a,...c}=v("AppShellMain",null,e),r=C();return n.jsx(x,{component:"main",ref:t,...r.getStyles("main",{className:s,style:d,classNames:o,styles:l}),...c})});G.classes=w;G.displayName="@mantine/core/AppShellMain";function y(e){return typeof e=="object"?e.base:e}function B(e){const t=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||t}function P(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function ot({baseStyles:e,minMediaStyles:t,maxMediaStyles:o,aside:s,theme:d}){const l=s?.width,a="translateX(var(--app-shell-aside-width))",c="translateX(calc(var(--app-shell-aside-width) * -1))";if(s?.breakpoint&&!s?.collapsed?.mobile&&(o[s?.breakpoint]=o[s?.breakpoint]||{},o[s?.breakpoint]["--app-shell-aside-width"]="100%",o[s?.breakpoint]["--app-shell-aside-offset"]="0px"),B(l)){const r=m(y(l));e["--app-shell-aside-width"]=r,e["--app-shell-aside-offset"]=r}if(P(l)&&(typeof l.base<"u"&&(e["--app-shell-aside-width"]=m(l.base),e["--app-shell-aside-offset"]=m(l.base)),N(l).forEach(r=>{r!=="base"&&(t[r]=t[r]||{},t[r]["--app-shell-aside-width"]=m(l[r]),t[r]["--app-shell-aside-offset"]=m(l[r]))})),s?.collapsed?.desktop){const r=s.breakpoint;t[r]=t[r]||{},t[r]["--app-shell-aside-transform"]=a,t[r]["--app-shell-aside-transform-rtl"]=c,t[r]["--app-shell-aside-offset"]="0px !important",t[r]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if(s?.collapsed?.mobile){const r=ie(s.breakpoint,d.breakpoints)-.1;o[r]=o[r]||{},o[r]["--app-shell-aside-width"]="100%",o[r]["--app-shell-aside-offset"]="0px",o[r]["--app-shell-aside-transform"]=a,o[r]["--app-shell-aside-transform-rtl"]=c,o[r]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function rt({baseStyles:e,minMediaStyles:t,footer:o}){const s=o?.height,d="translateY(var(--app-shell-footer-height))",l=o?.offset??!0;if(B(s)){const a=m(y(s));e["--app-shell-footer-height"]=a,l&&(e["--app-shell-footer-offset"]=a)}P(s)&&(typeof s.base<"u"&&(e["--app-shell-footer-height"]=m(s.base),l&&(e["--app-shell-footer-offset"]=m(s.base))),N(s).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-footer-height"]=m(s[a]),l&&(t[a]["--app-shell-footer-offset"]=m(s[a])))})),o?.collapsed&&(e["--app-shell-footer-transform"]=d,e["--app-shell-footer-offset"]="0px !important")}function nt({baseStyles:e,minMediaStyles:t,header:o}){const s=o?.height,d="translateY(calc(var(--app-shell-header-height) * -1))",l=o?.offset??!0;if(B(s)){const a=m(y(s));e["--app-shell-header-height"]=a,l&&(e["--app-shell-header-offset"]=a)}P(s)&&(typeof s.base<"u"&&(e["--app-shell-header-height"]=m(s.base),l&&(e["--app-shell-header-offset"]=m(s.base))),N(s).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-header-height"]=m(s[a]),l&&(t[a]["--app-shell-header-offset"]=m(s[a])))})),o?.collapsed&&(e["--app-shell-header-transform"]=d,e["--app-shell-header-offset"]="0px !important")}function at({baseStyles:e,minMediaStyles:t,maxMediaStyles:o,navbar:s,theme:d}){const l=s?.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",c="translateX(var(--app-shell-navbar-width))";if(s?.breakpoint&&!s?.collapsed?.mobile&&(o[s?.breakpoint]=o[s?.breakpoint]||{},o[s?.breakpoint]["--app-shell-navbar-width"]="100%",o[s?.breakpoint]["--app-shell-navbar-offset"]="0px"),B(l)){const r=m(y(l));e["--app-shell-navbar-width"]=r,e["--app-shell-navbar-offset"]=r}if(P(l)&&(typeof l.base<"u"&&(e["--app-shell-navbar-width"]=m(l.base),e["--app-shell-navbar-offset"]=m(l.base)),N(l).forEach(r=>{r!=="base"&&(t[r]=t[r]||{},t[r]["--app-shell-navbar-width"]=m(l[r]),t[r]["--app-shell-navbar-offset"]=m(l[r]))})),s?.collapsed?.desktop){const r=s.breakpoint;t[r]=t[r]||{},t[r]["--app-shell-navbar-transform"]=a,t[r]["--app-shell-navbar-transform-rtl"]=c,t[r]["--app-shell-navbar-offset"]="0px !important"}if(s?.collapsed?.mobile){const r=ie(s.breakpoint,d.breakpoints)-.1;o[r]=o[r]||{},o[r]["--app-shell-navbar-width"]="100%",o[r]["--app-shell-navbar-offset"]="0px",o[r]["--app-shell-navbar-transform"]=a,o[r]["--app-shell-navbar-transform-rtl"]=c}}function L(e){return Number(e)===0?"0px":Ce(e)}function lt({padding:e,baseStyles:t,minMediaStyles:o}){B(e)&&(t["--app-shell-padding"]=L(y(e))),P(e)&&(e.base&&(t["--app-shell-padding"]=L(e.base)),N(e).forEach(s=>{s!=="base"&&(o[s]=o[s]||{},o[s]["--app-shell-padding"]=L(e[s]))}))}function it({navbar:e,header:t,footer:o,aside:s,padding:d,theme:l}){const a={},c={},r={};at({baseStyles:r,minMediaStyles:a,maxMediaStyles:c,navbar:e,theme:l}),ot({baseStyles:r,minMediaStyles:a,maxMediaStyles:c,aside:s,theme:l}),nt({baseStyles:r,minMediaStyles:a,header:t}),rt({baseStyles:r,minMediaStyles:a,footer:o}),lt({baseStyles:r,minMediaStyles:a,padding:d});const h=se(N(a),l.breakpoints).map(u=>({query:`(min-width: ${te(u.px)})`,styles:a[u.value]})),i=se(N(c),l.breakpoints).map(u=>({query:`(max-width: ${te(u.px)})`,styles:c[u.value]})),p=[...h,...i];return{baseStyles:r,media:p}}function ct({navbar:e,header:t,aside:o,footer:s,padding:d}){const l=ze(),a=ke(),{media:c,baseStyles:r}=it({navbar:e,header:t,footer:s,aside:o,padding:d,theme:l});return n.jsx(ye,{media:c,styles:r,selector:a.cssVariablesSelector})}const U=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellNavbar",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"nav",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("navbar",{className:s,classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-navbar-z-index":`calc(${h??u.zIndex} + 1)`}})});U.classes=w;U.displayName="@mantine/core/AppShellNavbar";const Y=Be((e,t)=>{const{classNames:o,className:s,style:d,styles:l,vars:a,grow:c,mod:r,...h}=v("AppShellSection",null,e),i=C();return n.jsx(x,{ref:t,mod:[{grow:c},r],...i.getStyles("section",{className:s,style:d,classNames:o,styles:l}),...h})});Y.classes=w;Y.displayName="@mantine/core/AppShellSection";function dt({transitionDuration:e,disabled:t}){const[o,s]=b.useState(!0),d=b.useRef(-1),l=b.useRef(-1);return Pe("resize",()=>{s(!0),clearTimeout(d.current),d.current=window.setTimeout(()=>b.startTransition(()=>{s(!1)}),200)}),Re(()=>{s(!0),clearTimeout(l.current),l.current=window.setTimeout(()=>b.startTransition(()=>{s(!1)}),e||0)},[t,e]),o}const ht={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Te("app")},pt=O((e,{transitionDuration:t,transitionTimingFunction:o})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":o}})),g=S((e,t)=>{const o=v("AppShell",ht,e),{classNames:s,className:d,style:l,styles:a,unstyled:c,vars:r,navbar:h,withBorder:i,padding:p,transitionDuration:u,transitionTimingFunction:V,header:z,zIndex:E,layout:R,disabled:F,aside:me,footer:be,offsetScrollbars:ge=!0,mod:ve,attributes:xe,...je}=o,ee=W({name:"AppShell",classes:w,props:o,className:d,style:l,classNames:s,styles:a,unstyled:c,attributes:xe,vars:r,varsResolver:pt}),Se=dt({disabled:F,transitionDuration:u});return n.jsxs(st,{value:{getStyles:ee,withBorder:i,zIndex:E,disabled:F,offsetScrollbars:ge},children:[n.jsx(ct,{navbar:h,header:z,aside:me,footer:be,padding:p}),n.jsx(x,{ref:t,...ee("root"),mod:[{resizing:Se,layout:R,disabled:F},ve],...je})]})});g.classes=w;g.displayName="@mantine/core/AppShell";g.Navbar=U;g.Header=Q;g.Main=G;g.Aside=K;g.Footer=X;g.Section=Y;var he={root:"m_fea6bf1a",burger:"m_d4fb9cad"};const ut=O((e,{color:t,size:o,lineSize:s,transitionDuration:d,transitionTimingFunction:l})=>({root:{"--burger-color":t?Ve(t,e):void 0,"--burger-size":ne(o,"burger-size"),"--burger-line-size":s?m(s):void 0,"--burger-transition-duration":d===void 0?void 0:`${d}ms`,"--burger-transition-timing-function":l}})),J=S((e,t)=>{const o=v("Burger",null,e),{classNames:s,className:d,style:l,styles:a,unstyled:c,vars:r,opened:h,children:i,transitionDuration:p,transitionTimingFunction:u,lineSize:V,attributes:z,...E}=o,R=W({name:"Burger",classes:he,props:o,className:d,style:l,classNames:s,styles:a,unstyled:c,attributes:z,vars:r,varsResolver:ut});return n.jsxs(_e,{...R("root"),ref:t,...E,children:[n.jsx(x,{mod:["reduce-motion",{opened:h}],...R("burger")}),i]})});J.classes=he;J.displayName="@mantine/core/Burger";var pe={root:"m_dc6f14e2"};const ft=O((e,{size:t})=>({root:{"--kbd-fz":ne(t,"kbd-fz")}})),M=S((e,t)=>{const o=v("Kbd",null,e),{classNames:s,className:d,style:l,styles:a,unstyled:c,vars:r,attributes:h,...i}=o,p=W({name:"Kbd",classes:pe,props:o,className:d,style:l,classNames:s,styles:a,unstyled:c,attributes:h,vars:r,varsResolver:ft});return n.jsx(x,{component:"kbd",ref:t,...p("root"),...i})});M.classes=pe;M.displayName="@mantine/core/Kbd";const mt=[["path",{d:"M9 6.371c0 4.418 -2.239 6.629 -5 6.629",key:"svg-0"}],["path",{d:"M4 6.371h7",key:"svg-1"}],["path",{d:"M5 9c0 2.144 2.252 3.908 6 4",key:"svg-2"}],["path",{d:"M12 20l4 -9l4 9",key:"svg-3"}],["path",{d:"M19.1 18h-6.2",key:"svg-4"}],["path",{d:"M6.694 3l.793 .582",key:"svg-5"}]],bt=A("outline","language","Language",mt);const gt=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M9 4v16",key:"svg-1"}],["path",{d:"M15 10l-2 2l2 2",key:"svg-2"}]],vt=A("outline","layout-sidebar-left-collapse","LayoutSidebarLeftCollapse",gt);const xt=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M15 4v16",key:"svg-1"}],["path",{d:"M9 10l2 2l-2 2",key:"svg-2"}]],jt=A("outline","layout-sidebar-right-collapse","LayoutSidebarRightCollapse",xt);const St=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]],re=A("outline","moon","Moon",St);const wt=[["path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z",key:"svg-0"}]],Nt=A("outline","square-rounded","SquareRounded",wt);const It=[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],D=A("outline","sun","Sun",It),At=e=>{const[t,o]=T("alepha.ui.sidebar.opened");return n.jsx(J,{opened:t,onClick:()=>o(!t),hiddenFrom:"sm",size:"sm",...e})},ue=e=>{const{setColorScheme:t}=de(),o=tt("light"),[s,d]=b.useState("default"),l=e.mode??"minimal";b.useEffect(()=>{d(o)},[o]);const a=()=>{t(o==="dark"?"light":"dark")};return l==="segmented"?n.jsx(Me,{value:s,onChange:c=>t(c),data:[{value:"light",label:n.jsx(f,{h:20,align:"center",justify:"center",children:n.jsx(D,{size:16})})},{value:"dark",label:n.jsx(f,{h:20,align:"center",justify:"center",children:n.jsx(re,{size:16})})}],w:e.fullWidth?"100%":void 0,...e.segmentedProps}):n.jsx(I,{onClick:a,variant:e.variant??"subtle",size:e.size??"sm","aria-label":"Toggle color scheme",px:"xs",fullWidth:e.fullWidth??!1,icon:s==="dark"?D:s==="light"?re:D,...e.actionProps})},Ct=e=>{const t=Ye();return n.jsx(I,{variant:"default",icon:bt,menu:{items:t.languages.map(o=>({label:t.tr(o),onClick:()=>t.setLang(o),active:t.lang===o}))},...e.actionProps})},Z=e=>n.jsx(I,{variant:"default",onClick:Ee.open,justify:"space-between",rightSection:n.jsx(M,{visibleFrom:"sm",size:"sm",children:"⌘+K"}),radius:"md",...e.actionProps,children:n.jsxs(f,{align:"center",gap:"xs",children:[n.jsx(Fe,{size:16,color:"gray"}),n.jsx(f,{visibleFrom:"sm",miw:192,children:n.jsx(q,{size:"xs",c:"dimmed",children:"Search..."})})]})}),zt=e=>{const{items:t=[]}=e,o=(a,c)=>{if("type"in a){if(a.type==="burger")return n.jsx(At,{},c);if(a.type==="dark")return n.jsx(ue,{...a.props},c);if(a.type==="search")return n.jsx(Z,{...a.props},c);if(a.type==="lang")return n.jsx(Ct,{...a.props},c);if(a.type==="spacer")return n.jsx(f,{w:16},c);if(a.type==="divider")return n.jsx(Ze,{orientation:"vertical"},c)}return"element"in a?a.element:null},s=t.filter(a=>a.position==="left"),d=t.filter(a=>a.position==="center"),l=t.filter(a=>a.position==="right");return n.jsxs(f,{h:"100%",align:"center",px:"md",justify:"space-between",...e.flexProps,children:[n.jsx(f,{flex:1,children:s.map((a,c)=>n.jsx(f,{ml:c===0?0:"md",align:"center",children:o(a,c)},c))}),n.jsx(f,{children:d.map((a,c)=>n.jsx(f,{mx:"md",align:"center",children:o(a,c)},c))}),n.jsx(f,{flex:1,align:"center",justify:"end",children:l.map((a,c)=>n.jsx(f,{ml:c===0?0:"md",align:"center",children:o(a,c)},c))})]})},kt=()=>{const[e,t]=T("alepha.ui.sidebar.collapsed");return n.jsx(f,{children:n.jsx(I,{icon:e?n.jsx(jt,{}):n.jsx(vt,{}),variant:"subtle",size:"md",onClick:()=>t(!e),tooltip:{position:"right",label:e?"Show sidebar":"Hide sidebar"}})})},yt=e=>{const t=_(),{top:o=[],bottom:s=[],onItemClick:d}=e,l=(i,p)=>{if("type"in i){if(i.type==="spacer")return n.jsx(f,{h:16},p);if(i.type==="divider")return n.jsx(f,{h:1,bg:"var(--alepha-border)",my:"md",mx:"sm"},p);if(i.type==="search")return n.jsx(Z,{collapsed:e.collapsed},p);if(i.type==="toggle")return n.jsx(kt,{},p);if(i.type==="section")return e.collapsed?void 0:n.jsxs(f,{mt:"md",mb:"xs",align:"center",gap:"xs",children:[k(i.icon),n.jsx(q,{size:"xs",c:"dimmed",tt:"uppercase",fw:"bold",children:i.label},p)]},p)}return"element"in i?n.jsx(f,{children:i.element},p):i.can&&!i.can()?null:e.collapsed?n.jsx(Bt,{item:i,level:0,onItemClick:d,theme:e.theme??{}},p):n.jsx(fe,{item:i,level:0,onItemClick:d,theme:e.theme??{}},p)},a=()=>{if(e.menu)return e.menu;if(e.autoPopulateMenu){const i=t.concretePages.map(p=>({label:p.label??p.name,description:p.description?.slice(0,32),icon:k(p.icon),href:t.path(p.name)}));if(typeof e.autoPopulateMenu=="object"&&e.autoPopulateMenu.startsWith){const p=e.autoPopulateMenu.startsWith;return i.filter(u=>u.href?.startsWith(p))}}return[]},c="md",r=e.menu?e.gap:"xs",h=b.useMemo(()=>a(),[]);return n.jsxs(f,{flex:1,py:c,direction:"column",className:"overflow-auto",...e.flexProps,children:[n.jsxs(f,{gap:r,px:c,direction:"column",children:[o.map((i,p)=>l(i,p)),h.filter(i=>i.position==="top").map((i,p)=>l(i,p+o.length))]}),n.jsx(f,{gap:r,px:c,direction:"column",flex:1,className:"overflow-auto",children:h.filter(i=>!i.position).map((i,p)=>l(i,p))}),n.jsxs(f,{gap:r,px:c,direction:"column",children:[s.map((i,p)=>l(i,p)),h.filter(i=>i.position==="bottom").map((i,p)=>l(i,p+s.length))]})]})},fe=e=>{const{item:t,level:o}=e,s=2,d=_(),l=b.useCallback(h=>{if(!h.children)return!1;for(const i of h.children)if(i.href&&d.isActive(i.href)||l(i))return!0;return!1},[]),[a,c]=b.useState(l(t));if(ae({"react:transition:end":()=>{l(t)&&c(!0)}},[]),o>s)return null;const r=h=>{e.item.target||h.preventDefault(),t.children&&t.children.length>0?c(!a):(e.onItemClick?.(t),t.onClick?.())};return n.jsxs(f,{direction:"column",ps:o===0?0:32,pos:"relative",children:[n.jsx(I,{w:"100%",justify:"space-between",href:e.item.href,target:e.item.target,size:e.item.theme?.size??e.theme.button?.size??(o===0?"sm":"xs"),c:"var(--mantine-color-text)",color:"gray",variant:"subtle",variantActive:"default",radius:e.item.theme?.radius??e.theme.button?.radius??"md",onClick:r,leftSection:n.jsxs(f,{w:"100%",align:"center",gap:"sm",children:[k(t.icon),n.jsxs(f,{direction:"column",children:[n.jsx(f,{children:t.label}),t.description&&n.jsx(q,{size:"xs",c:"dimmed",children:t.description})]})]}),rightSection:t.children?n.jsx(f,{children:a?n.jsx(Le,{size:14}):n.jsx(De,{size:14})}):e.item.rightSection,...e.item.actionProps}),t.children&&a&&n.jsxs(f,{direction:"column","data-parent-level":o,children:[n.jsx(f,{style:{position:"absolute",width:1,background:"linear-gradient(to bottom, transparent, var(--alepha-border), transparent)",top:48,left:20+32*o,bottom:16}}),t.children.filter(h=>!h.can||h.can()).map((h,i)=>n.jsx(fe,{item:h,level:o+1,onItemClick:e.onItemClick,theme:e.theme},i))]})]})},Bt=e=>{const{item:t,level:o}=e,s=_(),d=b.useCallback(r=>{if(!r.children)return!1;for(const h of r.children)if(h.href&&s.isActive(h.href)||d(h))return!0;return!1},[]),[l,a]=b.useState(d(t)),c=r=>{e.item.target||r.preventDefault(),t.children&&t.children.length>0?a(!l):(e.onItemClick?.(t),t.onClick?.())};return n.jsx(I,{size:e.item.theme?.size??e.theme.button?.size??(o===0?"sm":"xs"),variant:"subtle",variantActive:"default",tooltip:t.children?void 0:{label:t.label,position:"right"},radius:e.item.theme?.radius??e.theme.button?.radius??"md",onClick:c,icon:k(t.icon)??n.jsx(Nt,{}),href:e.item.href,target:e.item.target,menu:t.children?{position:"right",on:"hover",items:t.children.filter(r=>!r.can||r.can()).map(r=>({label:r.label,href:r.href,icon:k(r.icon),children:r.children?.filter(h=>!h.can||h.can())}))}:void 0,...e.item.actionProps})},Pt=e=>{const t=_(),[o,s]=T("alepha.ui.sidebar.opened"),[d]=T("alepha.ui.sidebar.collapsed",e.sidebarProps?.collapsed),l=()=>{if(e.noSidebarWhen?.paths){for(const z of e.noSidebarWhen.paths)if(t.isActive(z,{startWith:!0}))return!1}return!0},[a,c]=b.useState(l());ae({"react:transition:end":()=>{c(l())},"react:transition:begin":()=>{s(!1)}},[]);const r=[{position:"left",type:"burger"}],h=a&&e.sidebarProps!==void 0,i=h||e.appBarProps||e.header,p=i?60:0,u=e.footer?24:0,V=h?d?78:300:0;return n.jsxs(g,{w:"100%",flex:1,padding:"md",header:i?{height:60}:void 0,navbar:h?{width:d?{base:78}:{base:300},breakpoint:"sm",collapsed:{mobile:!o}}:void 0,footer:e.footer?{height:24}:void 0,...e.appShellProps,children:[n.jsx(g.Header,{bg:j.colors.surface,...e.appShellHeaderProps,children:e.header??n.jsx(zt,{items:r,...e.appBarProps})}),h&&n.jsx(g.Navbar,{bg:j.colors.surface,...e.appShellNavbarProps,children:n.jsx(yt,{collapsed:d,...e.sidebarProps??{}})}),n.jsx(g.Main,{pl:V,pt:p,pb:u,pr:0,display:"flex",flex:1,style:{flexDirection:"column"},...e.appShellMainProps,children:e.children??n.jsx(le,{})}),e.footer&&n.jsx(g.Footer,{bg:j.colors.surface,...e.appShellFooterProps,children:e.footer})]})},Ot=()=>n.jsx(Pt,{appShellProps:{withBorder:!1,bg:j.colors.background},appShellNavbarProps:{bg:j.colors.transparent},appShellHeaderProps:{bg:j.colors.transparent,style:{backdropFilter:"blur(10px)"}},sidebarProps:{gap:"xs",collapsed:!0,menu:[{label:"Dashboard",icon:n.jsx(He,{}),href:"/"},{type:"divider"},{label:"Actions",icon:n.jsx($e,{}),href:"/actions"},{label:"Queues",icon:n.jsx(We,{}),href:"/queues"},{label:"Topics",icon:n.jsx(Oe,{}),href:"/topics"},{label:"Caches",icon:n.jsx(qe,{}),href:"/caches"},{label:"DB Studio",icon:n.jsx(Ke,{}),href:"/db"},{type:"divider"},{label:"Environment",icon:n.jsx(Xe,{}),href:"/env"},{label:"Atoms",icon:n.jsx(Qe,{}),href:"/atoms"},{type:"divider"},{label:"Graph",icon:n.jsx(Ge,{}),href:"/graph"},{label:"Logs",icon:n.jsx(Ue,{}),href:"/logs"}]},appBarProps:{items:[{position:"left",type:"burger"},{position:"left",element:n.jsx(I,{intent:"none",icon:et,href:"/",active:!1,children:"Devtools"})},{position:"center",element:n.jsx(Z,{})},{position:"right",element:n.jsx(ue,{})}]},children:n.jsx(f,{className:"overflow-auto",w:"100%",flex:1,direction:"column",bd:`1px solid ${j.colors.border}`,bg:j.colors.elevated,ml:-16,mr:-16,mt:-16,style:{borderTopLeftRadius:16},children:n.jsx(le,{})})});export{Ot as DevLayout,Ot as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={};function n(){return typeof process<"u"&&e?"production":"development"}export{n as g};
|