@refinedev/devtools 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/iife/index.js +2 -2
- package/dist/iife/index.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/panel.d.ts +1 -1
- package/dist/panel.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/panel.tsx +11 -0
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import y from"react";import D from"react";import b from"react";import{createPortal as re}from"react-dom";import{getElementFromFiber as J,getFiberFromElement as Q,getFirstFiberHasName as ee,getFirstStateNodeFiber as te,getNameFromFiber as V,getParentOfFiber as _}from"@aliemir/dom-to-fiber-utils";import{DevToolsContext as oe}from"@refinedev/devtools-shared";import ne from"lodash/debounce";import x from"react";var O=e=>{let{devtoolsUrl:c}=x.useContext(oe),[m,s]=x.useState([]);x.useEffect(()=>{e&&fetch(`${c??"http://localhost:5001"}/api/unique-trace-items`).then(r=>r.json().then(i=>s(i.data)))},[e,c]);let[a,t]=x.useState({stateNode:null,nameFiber:null}),[o,d]=x.useState({stateNode:null,nameFiber:null,derived:!1});x.useEffect(()=>e?()=>{t({stateNode:null,nameFiber:null}),d({stateNode:null,nameFiber:null,derived:!1})}:()=>0,[e]);let w=x.useCallback(r=>{let i=r,l,v,H=!1;for(;!H&&i;)l=ee(i),v=te(l),H=m.includes(V(l)??""),H||(i=_(i));return v&&l?{stateNode:v,nameFiber:l}:{stateNode:null,nameFiber:null}},[m]),g=x.useCallback(r=>{let i=Q(r);t(w(i))},[m]);x.useEffect(()=>{(o.stateNode!==a.stateNode||o.nameFiber!==a.nameFiber)&&d({stateNode:a.stateNode,nameFiber:a.nameFiber,derived:!1})},[a]);let f=x.useRef({rect:{width:0,height:0,x:0,y:0},name:""}),{rect:n,name:u}=x.useMemo(()=>{var r;if(!e)return{rect:{width:0,height:0,x:0,y:0},name:""};if(o.stateNode||o.nameFiber){let i=o.stateNode?J(o.stateNode):null,l=o.nameFiber?V(o.nameFiber):null;if(!i)return{rect:f.current.rect,name:l??f.current.name};let v=(r=i.getBoundingClientRect)==null?void 0:r.call(i);return v?{rect:{width:v.width,height:v.height,x:v.left,y:v.top},name:l??f.current.name}:{rect:f.current.rect,name:l??f.current.name}}return f.current},[o,e]);return f.current={rect:n,name:u},x.useEffect(()=>{if(e){let r=i=>{if(i.key==="Shift"&&o.stateNode){i.stopPropagation(),i.preventDefault();let l=_(o.nameFiber),v=w(l);if(v.nameFiber&&v.stateNode){d({...v,derived:!0});return}}};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)}return()=>0},[o,e]),x.useEffect(()=>{if(e){let r=null,i=ne(l=>{if(l!=null&&l.target){if(r===l.target)return;g(l.target),r=l.target}},50);return document.addEventListener("mousemove",i),()=>document.removeEventListener("mousemove",i)}else return()=>0},[e,g]),{rect:n,name:u}};import C from"react";import*as E from"react";var B=e=>E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},E.createElement("path",{fill:"#303450",stroke:"url(#arrow-union-icon)",d:"M.5 8.495V15.5h15V8.495a4.5 4.5 0 0 1-3.816-2.483L9.341 1.33c-.553-1.105-2.13-1.105-2.683 0L4.317 6.012A4.5 4.5 0 0 1 .5 8.495Z"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"arrow-union-icon",x1:8,x2:8,y1:0,y2:10,gradientUnits:"userSpaceOnUse"},E.createElement("stop",{stopColor:"#474E6B"}),E.createElement("stop",{offset:.9,stopColor:"#474E6B"}),E.createElement("stop",{offset:.901,stopColor:"#474E6B",stopOpacity:0}))));var Z=38,A=7,G=({width:e,height:c,x:m,y:s,name:a})=>{let t=s>Z?"top":c>3*Z?"inset":"bottom",o=m>A&&s>A?"outside":"inside";return C.createElement("div",{id:"selector-box",style:{pointerEvents:"none",position:"fixed",opacity:a?1:0,transitionProperty:"width, height, transform, opacity",transitionDuration:"0.15s",transitionTimingFunction:"ease-out",border:"1.5px solid #47EBEB",borderRadius:"4px",background:"rgba(37,160,160, 0.25)",backdropFilter:"sepia(30%) hue-rotate(180deg)",zIndex:99998,...o==="outside"?{left:-6,top:-6,width:e+10,height:c+10,transform:`translate(${m}px, ${s}px)`}:{left:0,top:0,width:e-10,height:c-20,transform:`translate(${m+4}px, ${s+4}px)`}}},C.createElement("div",{style:{position:"absolute",left:"-1.5px",background:"#303450",border:"1px solid #474E6B",borderRadius:"4px",padding:"8px 12px",fontSize:"12px",lineHeight:"16px",fontWeight:400,color:"#ffffff",display:a?"block":"none",...t==="top"&&{top:"-38px"},...t==="bottom"&&{bottom:"-38px"},...t==="inset"&&{top:"4px",left:"8px"}}},a,C.createElement(B,{style:{position:"absolute",left:"30%",...t==="top"&&{transform:"translateX(-50%) rotate(180deg)",bottom:"-9px"},...t==="bottom"&&{transform:"translateX(-50%) ",top:"-9px"},...t==="inset"&&{transform:"translateX(-50%) rotate(-90deg)",top:"8px",left:"-1px"},display:a?"block":"none"}})))};import N from"react";var W=({active:e})=>N.createElement("div",{style:{color:"white",pointerEvents:"none",position:"absolute",left:"calc(-50% - 144px - 14px)",top:"-36px",width:"max-content",borderRadius:"8px",backgroundColor:"#40414A",opacity:e?1:0,transitionDuration:"0.2s",transitionProperty:"transform,opacity",transitionTimingFunction:"ease-in-out",padding:"8px",fontSize:"12px",lineHeight:"12px",fontWeight:400,textShadow:"0 0 2px #1D1E30, 1px 0 2px #1D1E30, -1px 0 2px #1D1E30, 0 1px 2px #1D1E30, 0 -1px 2px #1D1E30"}},N.createElement("kbd",{style:{marginLeft:"4px",padding:"2px 4px",borderRadius:"2px",background:"#1D1E30",color:"#CFD7E2",border:"none",textShadow:"none"}},"shift")," ","to move to parent.",N.createElement("kbd",{style:{marginLeft:"4px",padding:"2px 4px",borderRadius:"2px",background:"#1D1E30",color:"#CFD7E2",border:"none",textShadow:"none"}},"space")," ","to highlight in monitor.");var R=({onSelectorOpen:e,onHighlight:c,icon:m,style:s})=>{let[a,t]=b.useState(!1),[o,d]=b.useState(!1),{rect:w,name:g}=O(o),[f,n]=b.useState(null);return b.useEffect(()=>{if(!f){let u=document.createElement("div");u.id="selector-box-root",document.body.appendChild(u),n(u)}},[]),b.useEffect(()=>{o?document.body.style.cursor="crosshair":document.body.style.cursor="default"},[o]),b.useEffect(()=>{let u=r=>{o&&g&&(r==null||r.preventDefault(),r==null||r.stopPropagation(),r.stopImmediatePropagation(),c(g),d(!1))};return o?(document.addEventListener("click",u,{capture:!0}),()=>{document.removeEventListener("click",u,{capture:!0})}):()=>0},[g,c,o]),b.useEffect(()=>{o&&e()},[o,e]),b.createElement("div",{style:s},b.createElement("div",{role:"button",title:"Element Selector",onMouseOver:()=>t(!0),onMouseOut:()=>t(!1),onClick:u=>{var r;u.preventDefault(),u.stopPropagation(),(r=document==null?void 0:document.activeElement)==null||r.blur(),d(i=>!i)},style:{padding:0,margin:0,height:"100%",width:"100%",transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out"}},m),b.createElement(W,{active:o}),o&&f&&re(b.createElement(G,{...w,name:g}),f))};import*as P from"react";var X=e=>P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:157,height:25,viewBox:"0 0 157 25",fill:"none",...e},P.createElement("g",{filter:"url(#devtools-panel)"},P.createElement("path",{fill:"#1D1E30",d:"M17 1h123v24H17z"}),P.createElement("path",{fill:"#1D1E30",d:"M6.265 9.205A12 12 0 0 1 17.649 1H25v24H1L6.265 9.205ZM150.735 9.205A12 12 0 0 0 139.351 1H132v24h24l-5.265-15.795Z"}),P.createElement("path",{fill:"currentColor",d:"M25 14.333A1.333 1.333 0 1 1 25 17a1.333 1.333 0 0 1 0-2.667Z"}),P.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M23.211 20.578a4 4 0 0 0 3.578 0l4-2A4 4 0 0 0 33 15v-4a4 4 0 0 0-2.211-3.578l-4-2a4 4 0 0 0-3.578 0l-4 2A4 4 0 0 0 17 11v4a4 4 0 0 0 2.211 3.578l4 2Zm-.878-4.911a2.667 2.667 0 0 0 5.334 0v-5.334a2.667 2.667 0 0 0-5.334 0v5.334Z",clipRule:"evenodd"}),P.createElement("path",{fill:"#CFD7E2",d:"M42.152 17a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h4.2c.288 0 .56.056.816.168a2.135 2.135 0 0 1 1.14 1.128c.112.256.168.532.168.828v3.984c0 .296-.056.572-.168.828a2.135 2.135 0 0 1-1.14 1.128 2.014 2.014 0 0 1-.816.168h-4.2Zm1.38-1.644h2.82a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-3.984a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.82v4.944Zm13.18-5.196a.244.244 0 0 1-.253.252h-4.44v1.656h4.02c.072 0 .132.024.18.072a.227.227 0 0 1 .084.18v1.128a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072h-4.02v1.644h4.44c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-5.832a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h5.832c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.128ZM63.014 17h-2.232a.387.387 0 0 1-.216-.072.356.356 0 0 1-.144-.168l-1.716-4.296a.853.853 0 0 1-.072-.24 1.783 1.783 0 0 1-.024-.264V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h1.128c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v2.616c0 .072.008.156.024.252s.04.176.072.24l1.284 3.216h.528l1.284-3.216a.853.853 0 0 0 .072-.24c.016-.096.024-.18.024-.252V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.128c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v2.928c0 .072-.008.16-.024.264a.853.853 0 0 1-.072.24l-1.716 4.296a.356.356 0 0 1-.144.168.387.387 0 0 1-.216.072ZM73.29 8.768c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v1.128a.227.227 0 0 1-.084.18.244.244 0 0 1-.18.072h-2.208v6.324a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072H69.69a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192v-6.324H67.23a.287.287 0 0 1-.192-.072.244.244 0 0 1-.072-.18V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h6.06Zm6.507.012c.296 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.296 0-.572-.056-.828-.168a2.171 2.171 0 0 1-1.128-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.128-1.128c.256-.112.532-.168.828-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.336-.132h-2.34a.497.497 0 0 0-.348.132.455.455 0 0 0-.132.336v3.996c0 .136.044.248.132.336a.497.497 0 0 0 .348.132h2.34a.455.455 0 0 0 .336-.132.436.436 0 0 0 .144-.336v-3.996Zm7.888-2.112c.295 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.297 0-.573-.056-.829-.168a2.171 2.171 0 0 1-1.127-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.127-1.128c.257-.112.532-.168.829-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.337-.132h-2.34a.497.497 0 0 0-.347.132.455.455 0 0 0-.133.336v3.996c0 .136.044.248.133.336a.497.497 0 0 0 .347.132h2.34a.455.455 0 0 0 .337-.132.436.436 0 0 0 .143-.336v-3.996ZM98.294 17H92.68a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v6.324h4.236c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072Zm7.336-5.76a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192v-.084a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.352a.46.46 0 0 0-.336.144.455.455 0 0 0-.132.336v.696c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v.696c0 .296-.056.572-.168.828a2.171 2.171 0 0 1-1.128 1.128 2.014 2.014 0 0 1-.816.168h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.043 2.043 0 0 1-.168-.828v-.084c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v.084c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-.696a.455.455 0 0 0-.132-.336.455.455 0 0 0-.336-.132h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.099 2.099 0 0 1-.168-.828v-.696c0-.296.056-.572.168-.828a2.171 2.171 0 0 1 1.128-1.128c.256-.112.528-.168.816-.168h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.532.168.828v.084a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-1.128Z"})));import z from"react";var Y=e=>z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},z.createElement("path",{fill:"#0FBDBD",fillRule:"evenodd",d:"M9 1a1 1 0 0 0-2 0v2.1A5.006 5.006 0 0 0 3.1 7H1a1 1 0 0 0 0 2h2.1A5.006 5.006 0 0 0 7 12.9V15a1 1 0 1 0 2 0v-2.1A5.006 5.006 0 0 0 12.9 9H15a1 1 0 1 0 0-2h-2.1A5.006 5.006 0 0 0 9 3.1V1Zm2 7a3 3 0 1 0-6 0 3 3 0 0 0 6 0Z",clipRule:"evenodd"}));var $=({onClick:e,onSelectorHighlight:c,onSelectorOpen:m})=>{let[s,a]=D.useState(!1);return D.createElement("div",{onMouseOver:()=>a(!0),onMouseOut:()=>a(!1),style:{position:"relative",userSelect:"none",WebkitUserSelect:"none",background:"none",border:"none",padding:0,margin:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:s?"#0FBDBD":"#6C7793",transition:"color 0.1s ease-in-out"},onClick:e},D.createElement(X,null),D.createElement(R,{style:{position:"absolute",top:5,right:18,width:"16px",height:"16px"},icon:D.createElement(Y,{width:16,height:16,style:{pointerEvents:"none"}}),onSelectorOpen:m,onHighlight:c}))};import p from"react";var U=e=>e?"scaleX(1) translateY(0)":"scaleX(0) translateY(25vw)",S=50,h=10,ie=()=>typeof window<"u"?window.innerWidth*.7:1440*.7,se=()=>typeof window<"u"?window.innerHeight*.7:900*.7,j=640,q=360;var T=e=>{switch(e){case"left":return{left:`calc(${S}px + ${h}px)`,top:"50%",transform:"translateY(-50%)"};case"right":return{right:`calc(${S}px + ${h}px)`,top:"50%",transform:"translateY(-50%)"};case"top":return{left:"50%",top:`calc(${S}px + ${h}px)`,transform:"translateX(-50%)"};default:case"bottom":return{left:"50%",bottom:`calc(${S}px + ${h}px)`,transform:"translateX(-50%)"}}},I=e=>{switch(e){case"left":case"right":return-h-S-h+(typeof window<"u"?window.innerWidth:1440)-h;case"top":case"bottom":return-h+(typeof window<"u"?window.innerWidth:1440)-h}},k=e=>{switch(e){case"left":case"right":return-h+(typeof window<"u"?window.innerHeight:900)-h;case"top":case"bottom":return-h-S-h+(typeof window<"u"?window.innerHeight:900)-h}},L=(e,c)=>{let m={width:ie(),height:se()},s=I(e),a=k(e),t=Math.min(s,(c??m).width),o=Math.min(a,(c??m).height);return{width:t,height:o}};import F from"react";var M=e=>F.createElement("svg",{width:10,height:26,viewBox:"0 0 10 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},F.createElement("rect",{x:.5,y:.5,width:9,height:25,rx:4.5,fill:"#1D1E30"}),F.createElement("path",{d:"M7 5C7 6.10457 6.10457 7 5 7C3.89543 7 3 6.10457 3 5C3 3.89543 3.89543 3 5 3C6.10457 3 7 3.89543 7 5Z",fill:"#303450"}),F.createElement("path",{d:"M7 13C7 14.1046 6.10457 15 5 15C3.89543 15 3 14.1046 3 13C3 11.8954 3.89543 11 5 11C6.10457 11 7 11.8954 7 13Z",fill:"#303450"}),F.createElement("path",{d:"M7 21C7 22.1046 6.10457 23 5 23C3.89543 23 3 22.1046 3 21C3 19.8954 3.89543 19 5 19C6.10457 19 7 19.8954 7 21Z",fill:"#303450"}),F.createElement("rect",{x:.5,y:.5,width:9,height:25,rx:4.5,stroke:"#303450"}));var K=({placement:e,visible:c,children:m})=>{let[s,a]=p.useState(!1),[t,o]=p.useState(null),[d,w]=p.useState(null),[g,f]=p.useState(L(e));return p.useEffect(()=>{let n=()=>{f(u=>L(e,u))};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[e]),p.useEffect(()=>{let n=()=>{o(null)};if(t!==null)return window.addEventListener("mouseup",n),()=>{window.removeEventListener("mouseup",n)}},[t]),p.useEffect(()=>{let n=document.body.style.cursor;return t!=null&&t.includes("x")?document.body.style.cursor="col-resize":t!=null&&t.includes("y")&&(document.body.style.cursor="row-resize"),()=>{document.body.style.cursor=n}},[t]),p.useEffect(()=>{let n=u=>{if((t==null?void 0:t[1])==="x"){let r=u.clientX-((d==null?void 0:d.x)??u.clientX),i=g.width+(t==="lx"?-r:r)*2;f(l=>({...l,width:Math.min(I(e),Math.max(j,i))}))}else if((t==null?void 0:t[1])==="y"){let r=u.clientY-((d==null?void 0:d.y)??u.clientY),i=g.height+(t==="ty"?-r:r)*1;f(l=>({...l,height:Math.min(k(e),Math.max(q,i))}))}};if(t!==null)return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n)}},[t,e]),p.createElement("div",{style:{position:"absolute",borderRadius:"8px",boxShadow:"0 0 10px rgba(0, 0, 0, 0.5)",border:"1px solid rgba(0, 0, 0, 0.5)",transitionProperty:"transform, opacity",transitionTimingFunction:"ease-in-out",transitionDuration:"0.2s",...T(e),opacity:c?1:0,transform:`${T(e).transform} ${U(c??!1)}`,...g},onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)}},m({resizing:t}),p.createElement(p.Fragment,null,p.createElement("div",{style:{position:"absolute",left:0,top:"50%",width:"10px",height:"26px",transform:"translateY(-13px) translateX(-5px)",cursor:"col-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:s||t?"auto":"none",opacity:s||t?1:0},onMouseDown:n=>{o("lx"),w({x:n.clientX,y:n.clientY}),n.preventDefault()}},p.createElement(M,null)),p.createElement("div",{style:{position:"absolute",right:0,top:"50%",width:"10px",height:"26px",transform:"translateY(-13px) translateX(5px)",cursor:"col-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:s||t?"auto":"none",opacity:s||t?1:0},onMouseDown:n=>{o("rx"),w({x:n.clientX,y:n.clientY}),n.preventDefault()}},p.createElement(M,null)),p.createElement("div",{style:{position:"absolute",left:"50%",top:0,width:"26px",height:"10px",transform:"translateY(-5px) translateX(-13px)",cursor:"row-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:s||t?"auto":"none",opacity:s||t?1:0},onMouseDown:n=>{o("ty"),w({x:n.clientX,y:n.clientY}),n.preventDefault()}},p.createElement(M,{style:{transform:"rotate(90deg)",transformOrigin:"13px 13px"}})),p.createElement("div",{style:{position:"absolute",left:"50%",bottom:0,width:"26px",height:"10px",transform:"translateY(5px) translateX(-13px)",cursor:"row-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:s||t?"auto":"none",opacity:s||t?1:0},onMouseDown:n=>{o("by"),w({x:n.clientX,y:n.clientY}),n.preventDefault()}},p.createElement(M,{style:{transform:"rotate(90deg)",transformOrigin:"13px 13px"}}))))};import{DevToolsContext as ae,DevtoolsEvent as le,send as ce}from"@refinedev/devtools-shared";var de=process.env.NODE_ENV!=="development"?()=>null:()=>{let[e,c]=y.useState(!1),[m]=y.useState("bottom"),{devtoolsUrl:s,ws:a}=y.useContext(ae),t=y.useCallback(d=>{a&&ce(a,le.DEVTOOLS_HIGHLIGHT_IN_MONITOR,{name:d}),c(!0)},[a]),o=y.useCallback(()=>{c(!1)},[]);return y.createElement("div",{style:{position:"fixed",left:"50%",transform:"translateX(-50%)",bottom:0,zIndex:99999}},y.createElement($,{onClick:()=>c(d=>!d),onSelectorHighlight:t,onSelectorOpen:o}),y.createElement(K,{visible:e,placement:m},({resizing:d})=>y.createElement("iframe",{allow:"clipboard-write;",src:s,srcDoc:s?void 0:`
|
|
1
|
+
import y from"react";import D from"react";import w from"react";import{createPortal as re}from"react-dom";import{getElementFromFiber as J,getFiberFromElement as Q,getFirstFiberHasName as ee,getFirstStateNodeFiber as te,getNameFromFiber as V,getParentOfFiber as _}from"@aliemir/dom-to-fiber-utils";import{DevToolsContext as oe}from"@refinedev/devtools-shared";import ne from"lodash/debounce";import g from"react";var B=e=>{let{devtoolsUrl:c}=g.useContext(oe),[p,s]=g.useState([]);g.useEffect(()=>{e&&fetch(`${c??"http://localhost:5001"}/api/unique-trace-items`).then(r=>r.json().then(i=>s(i.data)))},[e,c]);let[a,t]=g.useState({stateNode:null,nameFiber:null}),[o,f]=g.useState({stateNode:null,nameFiber:null,derived:!1});g.useEffect(()=>e?()=>{t({stateNode:null,nameFiber:null}),f({stateNode:null,nameFiber:null,derived:!1})}:()=>0,[e]);let b=g.useCallback(r=>{let i=r,l,x,H=!1;for(;!H&&i;)l=ee(i),x=te(l),H=p.includes(V(l)??""),H||(i=_(i));return x&&l?{stateNode:x,nameFiber:l}:{stateNode:null,nameFiber:null}},[p]),m=g.useCallback(r=>{let i=Q(r);t(b(i))},[p]);g.useEffect(()=>{(o.stateNode!==a.stateNode||o.nameFiber!==a.nameFiber)&&f({stateNode:a.stateNode,nameFiber:a.nameFiber,derived:!1})},[a]);let h=g.useRef({rect:{width:0,height:0,x:0,y:0},name:""}),{rect:n,name:d}=g.useMemo(()=>{var r;if(!e)return{rect:{width:0,height:0,x:0,y:0},name:""};if(o.stateNode||o.nameFiber){let i=o.stateNode?J(o.stateNode):null,l=o.nameFiber?V(o.nameFiber):null;if(!i)return{rect:h.current.rect,name:l??h.current.name};let x=(r=i.getBoundingClientRect)==null?void 0:r.call(i);return x?{rect:{width:x.width,height:x.height,x:x.left,y:x.top},name:l??h.current.name}:{rect:h.current.rect,name:l??h.current.name}}return h.current},[o,e]);return h.current={rect:n,name:d},g.useEffect(()=>{if(e){let r=i=>{if(i.key==="Shift"&&o.stateNode){i.stopPropagation(),i.preventDefault();let l=_(o.nameFiber),x=b(l);if(x.nameFiber&&x.stateNode){f({...x,derived:!0});return}}};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)}return()=>0},[o,e]),g.useEffect(()=>{if(e){let r=null,i=ne(l=>{if(l!=null&&l.target){if(r===l.target)return;m(l.target),r=l.target}},50);return document.addEventListener("mousemove",i),()=>document.removeEventListener("mousemove",i)}else return()=>0},[e,m]),{rect:n,name:d}};import C from"react";import*as E from"react";var O=e=>E.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},E.createElement("path",{fill:"#303450",stroke:"url(#arrow-union-icon)",d:"M.5 8.495V15.5h15V8.495a4.5 4.5 0 0 1-3.816-2.483L9.341 1.33c-.553-1.105-2.13-1.105-2.683 0L4.317 6.012A4.5 4.5 0 0 1 .5 8.495Z"}),E.createElement("defs",null,E.createElement("linearGradient",{id:"arrow-union-icon",x1:8,x2:8,y1:0,y2:10,gradientUnits:"userSpaceOnUse"},E.createElement("stop",{stopColor:"#474E6B"}),E.createElement("stop",{offset:.9,stopColor:"#474E6B"}),E.createElement("stop",{offset:.901,stopColor:"#474E6B",stopOpacity:0}))));var Z=38,A=7,G=({width:e,height:c,x:p,y:s,name:a})=>{let t=s>Z?"top":c>3*Z?"inset":"bottom",o=p>A&&s>A?"outside":"inside";return C.createElement("div",{id:"selector-box",style:{pointerEvents:"none",position:"fixed",opacity:a?1:0,transitionProperty:"width, height, transform, opacity",transitionDuration:"0.15s",transitionTimingFunction:"ease-out",border:"1.5px solid #47EBEB",borderRadius:"4px",background:"rgba(37,160,160, 0.25)",backdropFilter:"sepia(30%) hue-rotate(180deg)",zIndex:99998,...o==="outside"?{left:-6,top:-6,width:e+10,height:c+10,transform:`translate(${p}px, ${s}px)`}:{left:0,top:0,width:e-10,height:c-20,transform:`translate(${p+4}px, ${s+4}px)`}}},C.createElement("div",{style:{position:"absolute",left:"-1.5px",background:"#303450",border:"1px solid #474E6B",borderRadius:"4px",padding:"8px 12px",fontSize:"12px",lineHeight:"16px",fontWeight:400,color:"#ffffff",display:a?"block":"none",...t==="top"&&{top:"-38px"},...t==="bottom"&&{bottom:"-38px"},...t==="inset"&&{top:"4px",left:"8px"}}},a,C.createElement(O,{style:{position:"absolute",left:"30%",...t==="top"&&{transform:"translateX(-50%) rotate(180deg)",bottom:"-9px"},...t==="bottom"&&{transform:"translateX(-50%) ",top:"-9px"},...t==="inset"&&{transform:"translateX(-50%) rotate(-90deg)",top:"8px",left:"-1px"},display:a?"block":"none"}})))};import N from"react";var W=({active:e})=>N.createElement("div",{style:{color:"white",pointerEvents:"none",position:"absolute",left:"calc(-50% - 144px - 14px)",top:"-36px",width:"max-content",borderRadius:"8px",backgroundColor:"#40414A",opacity:e?1:0,transitionDuration:"0.2s",transitionProperty:"transform,opacity",transitionTimingFunction:"ease-in-out",padding:"8px",fontSize:"12px",lineHeight:"12px",fontWeight:400,textShadow:"0 0 2px #1D1E30, 1px 0 2px #1D1E30, -1px 0 2px #1D1E30, 0 1px 2px #1D1E30, 0 -1px 2px #1D1E30"}},N.createElement("kbd",{style:{marginLeft:"4px",padding:"2px 4px",borderRadius:"2px",background:"#1D1E30",color:"#CFD7E2",border:"none",textShadow:"none"}},"shift")," ","to move to parent.",N.createElement("kbd",{style:{marginLeft:"4px",padding:"2px 4px",borderRadius:"2px",background:"#1D1E30",color:"#CFD7E2",border:"none",textShadow:"none"}},"space")," ","to highlight in monitor.");var R=({onSelectorOpen:e,onHighlight:c,icon:p,style:s})=>{let[a,t]=w.useState(!1),[o,f]=w.useState(!1),{rect:b,name:m}=B(o),[h,n]=w.useState(null);return w.useEffect(()=>{if(!h){let d=document.createElement("div");d.id="selector-box-root",document.body.appendChild(d),n(d)}},[]),w.useEffect(()=>{o?document.body.style.cursor="crosshair":document.body.style.cursor="default"},[o]),w.useEffect(()=>{let d=r=>{o&&m&&(r==null||r.preventDefault(),r==null||r.stopPropagation(),r.stopImmediatePropagation(),c(m),f(!1))};return o?(document.addEventListener("click",d,{capture:!0}),()=>{document.removeEventListener("click",d,{capture:!0})}):()=>0},[m,c,o]),w.useEffect(()=>{o&&e()},[o,e]),w.createElement("div",{style:s},w.createElement("div",{role:"button",title:"Element Selector",onMouseOver:()=>t(!0),onMouseOut:()=>t(!1),onClick:d=>{var r;d.preventDefault(),d.stopPropagation(),(r=document==null?void 0:document.activeElement)==null||r.blur(),f(i=>!i)},style:{padding:0,margin:0,height:"100%",width:"100%",transform:a?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out"}},p),w.createElement(W,{active:o}),o&&h&&re(w.createElement(G,{...b,name:m}),h))};import*as S from"react";var X=e=>S.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:157,height:25,viewBox:"0 0 157 25",fill:"none",...e},S.createElement("g",{filter:"url(#devtools-panel)"},S.createElement("path",{fill:"#1D1E30",d:"M17 1h123v24H17z"}),S.createElement("path",{fill:"#1D1E30",d:"M6.265 9.205A12 12 0 0 1 17.649 1H25v24H1L6.265 9.205ZM150.735 9.205A12 12 0 0 0 139.351 1H132v24h24l-5.265-15.795Z"}),S.createElement("path",{fill:"currentColor",d:"M25 14.333A1.333 1.333 0 1 1 25 17a1.333 1.333 0 0 1 0-2.667Z"}),S.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M23.211 20.578a4 4 0 0 0 3.578 0l4-2A4 4 0 0 0 33 15v-4a4 4 0 0 0-2.211-3.578l-4-2a4 4 0 0 0-3.578 0l-4 2A4 4 0 0 0 17 11v4a4 4 0 0 0 2.211 3.578l4 2Zm-.878-4.911a2.667 2.667 0 0 0 5.334 0v-5.334a2.667 2.667 0 0 0-5.334 0v5.334Z",clipRule:"evenodd"}),S.createElement("path",{fill:"#CFD7E2",d:"M42.152 17a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h4.2c.288 0 .56.056.816.168a2.135 2.135 0 0 1 1.14 1.128c.112.256.168.532.168.828v3.984c0 .296-.056.572-.168.828a2.135 2.135 0 0 1-1.14 1.128 2.014 2.014 0 0 1-.816.168h-4.2Zm1.38-1.644h2.82a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-3.984a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.82v4.944Zm13.18-5.196a.244.244 0 0 1-.253.252h-4.44v1.656h4.02c.072 0 .132.024.18.072a.227.227 0 0 1 .084.18v1.128a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072h-4.02v1.644h4.44c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-5.832a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h5.832c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.128ZM63.014 17h-2.232a.387.387 0 0 1-.216-.072.356.356 0 0 1-.144-.168l-1.716-4.296a.853.853 0 0 1-.072-.24 1.783 1.783 0 0 1-.024-.264V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h1.128c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v2.616c0 .072.008.156.024.252s.04.176.072.24l1.284 3.216h.528l1.284-3.216a.853.853 0 0 0 .072-.24c.016-.096.024-.18.024-.252V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.128c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v2.928c0 .072-.008.16-.024.264a.853.853 0 0 1-.072.24l-1.716 4.296a.356.356 0 0 1-.144.168.387.387 0 0 1-.216.072ZM73.29 8.768c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v1.128a.227.227 0 0 1-.084.18.244.244 0 0 1-.18.072h-2.208v6.324a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072H69.69a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192v-6.324H67.23a.287.287 0 0 1-.192-.072.244.244 0 0 1-.072-.18V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h6.06Zm6.507.012c.296 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.296 0-.572-.056-.828-.168a2.171 2.171 0 0 1-1.128-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.128-1.128c.256-.112.532-.168.828-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.336-.132h-2.34a.497.497 0 0 0-.348.132.455.455 0 0 0-.132.336v3.996c0 .136.044.248.132.336a.497.497 0 0 0 .348.132h2.34a.455.455 0 0 0 .336-.132.436.436 0 0 0 .144-.336v-3.996Zm7.888-2.112c.295 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.297 0-.573-.056-.829-.168a2.171 2.171 0 0 1-1.127-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.127-1.128c.257-.112.532-.168.829-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.337-.132h-2.34a.497.497 0 0 0-.347.132.455.455 0 0 0-.133.336v3.996c0 .136.044.248.133.336a.497.497 0 0 0 .347.132h2.34a.455.455 0 0 0 .337-.132.436.436 0 0 0 .143-.336v-3.996ZM98.294 17H92.68a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v6.324h4.236c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072Zm7.336-5.76a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192v-.084a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.352a.46.46 0 0 0-.336.144.455.455 0 0 0-.132.336v.696c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v.696c0 .296-.056.572-.168.828a2.171 2.171 0 0 1-1.128 1.128 2.014 2.014 0 0 1-.816.168h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.043 2.043 0 0 1-.168-.828v-.084c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v.084c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-.696a.455.455 0 0 0-.132-.336.455.455 0 0 0-.336-.132h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.099 2.099 0 0 1-.168-.828v-.696c0-.296.056-.572.168-.828a2.171 2.171 0 0 1 1.128-1.128c.256-.112.528-.168.816-.168h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.532.168.828v.084a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-1.128Z"})));import z from"react";var Y=e=>z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},z.createElement("path",{fill:"#0FBDBD",fillRule:"evenodd",d:"M9 1a1 1 0 0 0-2 0v2.1A5.006 5.006 0 0 0 3.1 7H1a1 1 0 0 0 0 2h2.1A5.006 5.006 0 0 0 7 12.9V15a1 1 0 1 0 2 0v-2.1A5.006 5.006 0 0 0 12.9 9H15a1 1 0 1 0 0-2h-2.1A5.006 5.006 0 0 0 9 3.1V1Zm2 7a3 3 0 1 0-6 0 3 3 0 0 0 6 0Z",clipRule:"evenodd"}));var $=({onClick:e,onSelectorHighlight:c,onSelectorOpen:p})=>{let[s,a]=D.useState(!1);return D.createElement("div",{onMouseOver:()=>a(!0),onMouseOut:()=>a(!1),style:{position:"relative",userSelect:"none",WebkitUserSelect:"none",background:"none",border:"none",padding:0,margin:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:s?"#0FBDBD":"#6C7793",transition:"color 0.1s ease-in-out"},onClick:e},D.createElement(X,null),D.createElement(R,{style:{position:"absolute",top:5,right:18,width:"16px",height:"16px"},icon:D.createElement(Y,{width:16,height:16,style:{pointerEvents:"none"}}),onSelectorOpen:p,onHighlight:c}))};import u from"react";var U=e=>e?"scaleX(1) translateY(0)":"scaleX(0) translateY(25vw)",P=50,v=10,ie=()=>typeof window<"u"?window.innerWidth*.7:1440*.7,se=()=>typeof window<"u"?window.innerHeight*.7:900*.7,j=640,q=360;var T=e=>{switch(e){case"left":return{left:`calc(${P}px + ${v}px)`,top:"50%",transform:"translateY(-50%)"};case"right":return{right:`calc(${P}px + ${v}px)`,top:"50%",transform:"translateY(-50%)"};case"top":return{left:"50%",top:`calc(${P}px + ${v}px)`,transform:"translateX(-50%)"};default:case"bottom":return{left:"50%",bottom:`calc(${P}px + ${v}px)`,transform:"translateX(-50%)"}}},I=e=>{switch(e){case"left":case"right":return-v-P-v+(typeof window<"u"?window.innerWidth:1440)-v;case"top":case"bottom":return-v+(typeof window<"u"?window.innerWidth:1440)-v}},k=e=>{switch(e){case"left":case"right":return-v+(typeof window<"u"?window.innerHeight:900)-v;case"top":case"bottom":return-v-P-v+(typeof window<"u"?window.innerHeight:900)-v}},L=(e,c)=>{let p={width:ie(),height:se()},s=I(e),a=k(e),t=Math.min(s,(c??p).width),o=Math.min(a,(c??p).height);return{width:t,height:o}};import F from"react";var M=e=>F.createElement("svg",{width:10,height:26,viewBox:"0 0 10 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},F.createElement("rect",{x:.5,y:.5,width:9,height:25,rx:4.5,fill:"#1D1E30"}),F.createElement("path",{d:"M7 5C7 6.10457 6.10457 7 5 7C3.89543 7 3 6.10457 3 5C3 3.89543 3.89543 3 5 3C6.10457 3 7 3.89543 7 5Z",fill:"#303450"}),F.createElement("path",{d:"M7 13C7 14.1046 6.10457 15 5 15C3.89543 15 3 14.1046 3 13C3 11.8954 3.89543 11 5 11C6.10457 11 7 11.8954 7 13Z",fill:"#303450"}),F.createElement("path",{d:"M7 21C7 22.1046 6.10457 23 5 23C3.89543 23 3 22.1046 3 21C3 19.8954 3.89543 19 5 19C6.10457 19 7 19.8954 7 21Z",fill:"#303450"}),F.createElement("rect",{x:.5,y:.5,width:9,height:25,rx:4.5,stroke:"#303450"}));var K=({placement:e,visible:c,children:p})=>{let[s,a]=u.useState(!1),[t,o]=u.useState(null),[f,b]=u.useState(null),[m,h]=u.useState(L(e));return u.useEffect(()=>{let n=()=>{h(d=>L(e,d))};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[e]),u.useEffect(()=>{let n=()=>{o(null)};if(t!==null)return window.addEventListener("mouseup",n),()=>{window.removeEventListener("mouseup",n)}},[t]),u.useEffect(()=>{let n=document.body.style.cursor;return t!=null&&t.includes("x")?document.body.style.cursor="col-resize":t!=null&&t.includes("y")&&(document.body.style.cursor="row-resize"),()=>{document.body.style.cursor=n}},[t]),u.useEffect(()=>{let n=d=>{if((t==null?void 0:t[1])==="x"){let r=d.clientX-((f==null?void 0:f.x)??d.clientX),i=m.width+(t==="lx"?-r:r)*2;h(l=>({...l,width:Math.min(I(e),Math.max(j,i))}))}else if((t==null?void 0:t[1])==="y"){let r=d.clientY-((f==null?void 0:f.y)??d.clientY),i=m.height+(t==="ty"?-r:r)*1;h(l=>({...l,height:Math.min(k(e),Math.max(q,i))}))}};if(t!==null)return window.addEventListener("mousemove",n),()=>{window.removeEventListener("mousemove",n)}},[t,e]),u.createElement("div",{style:{position:"absolute",borderRadius:"8px",boxShadow:"0 0 10px rgba(0, 0, 0, 0.5)",border:"1px solid rgba(0, 0, 0, 0.5)",transitionProperty:"transform, opacity",transitionTimingFunction:"ease-in-out",transitionDuration:"0.2s",...T(e),opacity:c?1:0,transform:`${T(e).transform} ${U(c??!1)}`,...m},onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)}},p({resizing:t}),u.createElement(u.Fragment,null,u.createElement("div",{style:{position:"absolute",left:0,top:"50%",width:"10px",height:"26px",transform:"translateY(-13px) translateX(-5px)",cursor:"col-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:s||t?"auto":"none",opacity:s||t?1:0},onMouseDown:n=>{o("lx"),b({x:n.clientX,y:n.clientY}),n.preventDefault()}},u.createElement(M,null)),u.createElement("div",{style:{position:"absolute",right:0,top:"50%",width:"10px",height:"26px",transform:"translateY(-13px) translateX(5px)",cursor:"col-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:s||t?"auto":"none",opacity:s||t?1:0},onMouseDown:n=>{o("rx"),b({x:n.clientX,y:n.clientY}),n.preventDefault()}},u.createElement(M,null)),u.createElement("div",{style:{position:"absolute",left:"50%",top:0,width:"26px",height:"10px",transform:"translateY(-5px) translateX(-13px)",cursor:"row-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:s||t?"auto":"none",opacity:s||t?1:0},onMouseDown:n=>{o("ty"),b({x:n.clientX,y:n.clientY}),n.preventDefault()}},u.createElement(M,{style:{transform:"rotate(90deg)",transformOrigin:"13px 13px"}})),u.createElement("div",{style:{position:"absolute",left:"50%",bottom:0,width:"26px",height:"10px",transform:"translateY(5px) translateX(-13px)",cursor:"row-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:s||t?"auto":"none",opacity:s||t?1:0},onMouseDown:n=>{o("by"),b({x:n.clientX,y:n.clientY}),n.preventDefault()}},u.createElement(M,{style:{transform:"rotate(90deg)",transformOrigin:"13px 13px"}}))))};import{DevToolsContext as ae,DevtoolsEvent as le,send as ce}from"@refinedev/devtools-shared";var de=process.env.NODE_ENV!=="development"?()=>null:()=>{let[e,c]=y.useState(!1),[p,s]=y.useState(!1),[a]=y.useState("bottom"),{devtoolsUrl:t,ws:o}=y.useContext(ae),f=y.useCallback(m=>{o&&ce(o,le.DEVTOOLS_HIGHLIGHT_IN_MONITOR,{name:m}),s(!0)},[o]),b=y.useCallback(()=>{s(!1)},[]);return y.useEffect(()=>{typeof window<"u"&&c(!0)},[]),e?y.createElement("div",{style:{position:"fixed",left:"50%",transform:"translateX(-50%)",bottom:0,zIndex:99999}},y.createElement($,{onClick:()=>s(m=>!m),onSelectorHighlight:f,onSelectorOpen:b}),y.createElement(K,{visible:p,placement:a},({resizing:m})=>y.createElement("iframe",{allow:"clipboard-write;",src:t,srcDoc:t?void 0:`
|
|
2
2
|
<html style="height:100%;padding:0;margin:0;">
|
|
3
3
|
<body style="display:flex;justify-content:center;height:100%;padding:24px;margin:0;align-items:center;box-sizing:border-box;">
|
|
4
4
|
<h1 style="font-family:ui-monospace,monospace;color:#CFD7E2;text-align:center;">Could not connect to the devtools server</h1>
|
|
5
5
|
</body>
|
|
6
6
|
</html>
|
|
7
|
-
`,style:{width:"100%",height:"100%",border:"none",borderRadius:"7px",pointerEvents:
|
|
7
|
+
`,style:{width:"100%",height:"100%",border:"none",borderRadius:"7px",pointerEvents:m?"none":"auto",background:"#14141F"}}))):null};import ue from"react";import{DevToolsContextProvider as pe}from"@refinedev/devtools-shared";var me=process.env.NODE_ENV!=="development"?({children:e})=>e:({children:e})=>ue.createElement(pe,null,e);export{de as DevtoolsPanel,me as DevtoolsProvider};
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/panel.tsx","../../src/components/devtools-pin.tsx","../../src/components/devtools-selector.tsx","../../src/utilities/use-selector.tsx","../../src/components/selector-box.tsx","../../src/components/icons/arrow-union-icon.tsx","../../src/components/selector-hint.tsx","../../src/components/icons/devtools-icon.tsx","../../src/components/icons/selector-button.tsx","../../src/components/resizable-pane.tsx","../../src/utilities/index.ts","../../src/components/icons/resize-handle-icon.tsx","../../src/provider.tsx"],"sourcesContent":["import React from \"react\";\nimport { DevtoolsPin } from \"./components/devtools-pin\";\nimport { ResizablePane } from \"./components/resizable-pane\";\n\nimport { Placement } from \"./interfaces/placement\";\nimport {\n DevToolsContext,\n DevtoolsEvent,\n send,\n} from \"@refinedev/devtools-shared\";\n\nexport const DevtoolsPanel =\n __DEV_CONDITION__ !== \"development\"\n ? () => null\n : () => {\n const [visible, setVisible] = React.useState(false);\n const [placement] = React.useState<Placement>(\"bottom\");\n const { devtoolsUrl, ws } = React.useContext(DevToolsContext);\n\n const onSelectorHighlight = React.useCallback(\n (name: string) => {\n if (ws) {\n send(\n ws,\n DevtoolsEvent.DEVTOOLS_HIGHLIGHT_IN_MONITOR,\n {\n name,\n },\n );\n }\n setVisible(true);\n },\n [ws],\n );\n\n const onSelectorOpen = React.useCallback(() => {\n setVisible(false);\n }, []);\n\n return (\n <div\n style={{\n position: \"fixed\",\n left: \"50%\",\n transform: \"translateX(-50%)\",\n bottom: 0,\n zIndex: 99999,\n }}\n >\n <DevtoolsPin\n onClick={() => setVisible((v) => !v)}\n onSelectorHighlight={onSelectorHighlight}\n onSelectorOpen={onSelectorOpen}\n />\n <ResizablePane visible={visible} placement={placement}>\n {({ resizing }) => (\n <iframe\n allow=\"clipboard-write;\"\n src={devtoolsUrl}\n srcDoc={\n devtoolsUrl\n ? undefined\n : `\n <html style=\"height:100%;padding:0;margin:0;\">\n <body style=\"display:flex;justify-content:center;height:100%;padding:24px;margin:0;align-items:center;box-sizing:border-box;\">\n <h1 style=\"font-family:ui-monospace,monospace;color:#CFD7E2;text-align:center;\">Could not connect to the devtools server</h1>\n </body>\n </html>\n `\n }\n style={{\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"7px\",\n pointerEvents: resizing ? \"none\" : \"auto\",\n background: \"#14141F\",\n }}\n />\n )}\n </ResizablePane>\n </div>\n );\n };\n","import React from \"react\";\nimport { DevtoolsSelector } from \"./devtools-selector\";\nimport { DevtoolsIcon } from \"./icons/devtools-icon\";\nimport { SelectorButtonIcon } from \"./icons/selector-button\";\n\ntype Props = {\n onClick?: () => void;\n groupHover?: boolean;\n onSelectorHighlight: (name: string) => void;\n onSelectorOpen: () => void;\n};\n\nexport const DevtoolsPin = ({\n onClick,\n onSelectorHighlight,\n onSelectorOpen,\n}: Props) => {\n const [hover, setHover] = React.useState(false);\n\n return (\n <div\n onMouseOver={() => setHover(true)}\n onMouseOut={() => setHover(false)}\n style={{\n position: \"relative\",\n userSelect: \"none\",\n WebkitUserSelect: \"none\",\n background: \"none\",\n border: \"none\",\n padding: 0,\n margin: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n cursor: \"pointer\",\n color: hover ? \"#0FBDBD\" : \"#6C7793\",\n transition: \"color 0.1s ease-in-out\",\n }}\n onClick={onClick}\n >\n <DevtoolsIcon />\n <DevtoolsSelector\n style={{\n position: \"absolute\",\n top: 5,\n right: 18,\n width: \"16px\",\n height: \"16px\",\n }}\n icon={\n <SelectorButtonIcon\n width={16}\n height={16}\n style={{ pointerEvents: \"none\" }}\n />\n }\n onSelectorOpen={onSelectorOpen}\n onHighlight={onSelectorHighlight}\n />\n </div>\n );\n};\n","import React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useSelector } from \"src/utilities/use-selector\";\nimport { SelectorBox } from \"./selector-box\";\nimport { SelectorHint } from \"./selector-hint\";\n\ntype Props = {\n onSelectorOpen: () => void;\n onHighlight: (name: string) => void;\n icon?: React.ReactNode;\n style?: React.CSSProperties;\n};\n\nexport const DevtoolsSelector = ({\n onSelectorOpen,\n onHighlight,\n icon,\n style,\n}: Props) => {\n const [hover, setHover] = React.useState(false);\n const [active, setActive] = React.useState(false);\n const { rect, name } = useSelector(active);\n\n const [selectorBoxRoot, setSelectorBoxRoot] =\n React.useState<HTMLElement | null>(null);\n\n React.useEffect(() => {\n if (!selectorBoxRoot) {\n const element = document.createElement(\"div\");\n element.id = \"selector-box-root\";\n\n document.body.appendChild(element);\n\n setSelectorBoxRoot(element);\n }\n }, []);\n\n React.useEffect(() => {\n if (active) {\n document.body.style.cursor = \"crosshair\";\n } else {\n document.body.style.cursor = \"default\";\n }\n }, [active]);\n\n React.useEffect(() => {\n const onMouseClick = (e: MouseEvent) => {\n if (!active) return;\n if (!name) return;\n\n e?.preventDefault();\n e?.stopPropagation();\n e.stopImmediatePropagation();\n onHighlight(name);\n setActive(false);\n };\n\n if (active) {\n document.addEventListener(\"click\", onMouseClick, {\n capture: true,\n });\n\n return () => {\n document.removeEventListener(\"click\", onMouseClick, {\n capture: true,\n });\n };\n }\n\n return () => 0;\n }, [name, onHighlight, active]);\n\n React.useEffect(() => {\n if (active) {\n onSelectorOpen();\n }\n }, [active, onSelectorOpen]);\n\n return (\n <div style={style}>\n <div\n role=\"button\"\n title=\"Element Selector\"\n onMouseOver={() => setHover(true)}\n onMouseOut={() => setHover(false)}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n (document?.activeElement as HTMLElement)?.blur();\n setActive((active) => !active);\n }}\n style={{\n padding: 0,\n margin: 0,\n height: \"100%\",\n width: \"100%\",\n transform: hover ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: \"transform 0.2s ease-in-out\",\n }}\n >\n {icon}\n </div>\n <SelectorHint active={active} />\n {active &&\n selectorBoxRoot &&\n createPortal(\n <SelectorBox {...rect} name={name} />,\n selectorBoxRoot,\n )}\n </div>\n );\n};\n","import {\n getElementFromFiber,\n getFiberFromElement,\n getFirstFiberHasName,\n getFirstStateNodeFiber,\n getNameFromFiber,\n getParentOfFiber,\n} from \"@aliemir/dom-to-fiber-utils\";\nimport { DevToolsContext } from \"@refinedev/devtools-shared\";\nimport debounce from \"lodash/debounce\";\nimport React from \"react\";\n\ntype Fiber = Exclude<ReturnType<typeof getFiberFromElement>, null>;\n\nexport const useSelector = (active: boolean) => {\n const { devtoolsUrl } = React.useContext(DevToolsContext);\n const [traceItems, setTraceItems] = React.useState<string[]>([]);\n\n React.useEffect(() => {\n if (active) {\n fetch(\n `${\n devtoolsUrl ?? \"http://localhost:5001\"\n }/api/unique-trace-items`,\n ).then((res) =>\n res\n .json()\n .then((data: { data: string[] }) =>\n setTraceItems(data.data),\n ),\n );\n }\n }, [active, devtoolsUrl]);\n\n const [selectedFiber, setSelectedFiber] = React.useState<{\n stateNode: Fiber | null;\n nameFiber: Fiber | null;\n }>({\n stateNode: null,\n nameFiber: null,\n });\n const [activeFiber, setActiveFiber] = React.useState<{\n stateNode: Fiber | null;\n nameFiber: Fiber | null;\n derived?: boolean;\n }>({\n stateNode: null,\n nameFiber: null,\n derived: false,\n });\n\n React.useEffect(() => {\n if (active) {\n return () => {\n setSelectedFiber({\n stateNode: null,\n nameFiber: null,\n });\n setActiveFiber({\n stateNode: null,\n nameFiber: null,\n derived: false,\n });\n };\n }\n\n return () => 0;\n }, [active]);\n\n const selectAppropriateFiber = React.useCallback(\n (start: Fiber | null) => {\n let fiber = start;\n let firstParentOfNodeWithName: Fiber | null;\n let fiberWithStateNode: Fiber | null;\n\n let acceptedName = false;\n\n while (!acceptedName && fiber) {\n // Get the first fiber node that has a name (look up the tree)\n firstParentOfNodeWithName = getFirstFiberHasName(fiber);\n // Get the first fiber node that has a state node (look up the tree)\n fiberWithStateNode = getFirstStateNodeFiber(\n firstParentOfNodeWithName,\n );\n acceptedName = traceItems.includes(\n getNameFromFiber(firstParentOfNodeWithName) ?? \"\",\n );\n if (!acceptedName) {\n fiber = getParentOfFiber(fiber);\n }\n }\n\n if (fiberWithStateNode && firstParentOfNodeWithName) {\n return {\n stateNode: fiberWithStateNode,\n nameFiber: firstParentOfNodeWithName,\n };\n } else {\n return {\n stateNode: null,\n nameFiber: null,\n };\n }\n },\n [traceItems],\n );\n\n const pickFiber = React.useCallback(\n (target: HTMLElement) => {\n const fiber = getFiberFromElement(target);\n\n setSelectedFiber(selectAppropriateFiber(fiber));\n return;\n },\n [traceItems],\n );\n\n React.useEffect(() => {\n if (\n activeFiber.stateNode !== selectedFiber.stateNode ||\n activeFiber.nameFiber !== selectedFiber.nameFiber\n ) {\n setActiveFiber({\n stateNode: selectedFiber.stateNode,\n nameFiber: selectedFiber.nameFiber,\n derived: false,\n });\n }\n }, [selectedFiber]);\n\n const previousValues = React.useRef<{\n rect: {\n width: number;\n height: number;\n x: number;\n y: number;\n };\n name: string;\n }>({\n rect: {\n width: 0,\n height: 0,\n x: 0,\n y: 0,\n },\n name: \"\",\n });\n\n const { rect, name } = React.useMemo(() => {\n if (!active) {\n return {\n rect: {\n width: 0,\n height: 0,\n x: 0,\n y: 0,\n },\n name: \"\",\n };\n }\n if (activeFiber.stateNode || activeFiber.nameFiber) {\n // Get the element from the fiber with a state node\n const element = activeFiber.stateNode\n ? getElementFromFiber(activeFiber.stateNode)\n : null;\n // Get the name of the fiber node with a name\n const fiberName = activeFiber.nameFiber\n ? getNameFromFiber(activeFiber.nameFiber)\n : null;\n\n if (!element) {\n return {\n rect: previousValues.current.rect,\n name: fiberName ?? previousValues.current.name,\n };\n }\n\n const bounding = element.getBoundingClientRect?.();\n\n if (!bounding) {\n return {\n rect: previousValues.current.rect,\n name: fiberName ?? previousValues.current.name,\n };\n }\n\n return {\n rect: {\n width: bounding.width,\n height: bounding.height,\n x: bounding.left,\n y: bounding.top,\n },\n name: fiberName ?? previousValues.current.name,\n };\n }\n\n return previousValues.current;\n }, [activeFiber, active]);\n\n previousValues.current = {\n rect,\n name,\n };\n\n React.useEffect(() => {\n if (active) {\n const listener = (e: KeyboardEvent) => {\n // if user presses shift, toggle the derived state and set the active fiber to the parent\n if (e.key === \"Shift\" && activeFiber.stateNode) {\n e.stopPropagation();\n e.preventDefault();\n\n const parent = getParentOfFiber(activeFiber.nameFiber);\n\n const fibers = selectAppropriateFiber(parent);\n\n if (fibers.nameFiber && fibers.stateNode) {\n setActiveFiber({\n ...fibers,\n derived: true,\n });\n return;\n }\n }\n };\n\n document.addEventListener(\"keydown\", listener);\n return () => document.removeEventListener(\"keydown\", listener);\n }\n return () => 0;\n }, [activeFiber, active]);\n\n React.useEffect(() => {\n if (active) {\n let previousTarget: HTMLElement | null = null;\n const listener = debounce((e: MouseEvent) => {\n if (e?.target) {\n if (previousTarget === e.target) {\n return;\n }\n pickFiber(e.target as HTMLElement);\n previousTarget = e.target as HTMLElement;\n }\n }, 50);\n\n document.addEventListener(\"mousemove\", listener);\n\n return () => document.removeEventListener(\"mousemove\", listener);\n } else {\n return () => 0;\n }\n }, [active, pickFiber]);\n\n return {\n rect,\n name,\n };\n};\n","import React from \"react\";\nimport { ArrowUnionIcon } from \"./icons/arrow-union-icon\";\n\nconst Y_OFFSET = 38;\nconst X_OFFSET = 7;\n\nexport const SelectorBox = ({\n width,\n height,\n x,\n y,\n name,\n}: {\n width: number;\n height: number;\n x: number;\n y: number;\n name: string;\n}) => {\n const namePosition =\n y > Y_OFFSET ? \"top\" : height > 3 * Y_OFFSET ? \"inset\" : \"bottom\";\n\n const outlinePosition = x > X_OFFSET && y > X_OFFSET ? \"outside\" : \"inside\";\n\n return (\n <div\n id=\"selector-box\"\n style={{\n pointerEvents: \"none\",\n position: \"fixed\",\n opacity: name ? 1 : 0,\n transitionProperty: \"width, height, transform, opacity\",\n transitionDuration: \"0.15s\",\n transitionTimingFunction: \"ease-out\",\n border: \"1.5px solid #47EBEB\",\n borderRadius: \"4px\",\n background: \"rgba(37,160,160, 0.25)\",\n backdropFilter: \"sepia(30%) hue-rotate(180deg)\",\n zIndex: 99998,\n ...(outlinePosition === \"outside\"\n ? {\n left: -6,\n top: -6,\n width: width + 10,\n height: height + 10,\n transform: `translate(${x}px, ${y}px)`,\n }\n : {\n left: 0,\n top: 0,\n width: width - 10,\n height: height - 20,\n transform: `translate(${x + 4}px, ${y + 4}px)`,\n }),\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: \"-1.5px\",\n background: \"#303450\",\n border: \"1px solid #474E6B\",\n borderRadius: \"4px\",\n padding: \"8px 12px\",\n fontSize: \"12px\",\n lineHeight: \"16px\",\n fontWeight: 400,\n color: \"#ffffff\",\n display: name ? \"block\" : \"none\",\n ...(namePosition === \"top\" && {\n top: \"-38px\",\n }),\n ...(namePosition === \"bottom\" && {\n bottom: \"-38px\",\n }),\n ...(namePosition === \"inset\" && {\n top: \"4px\",\n left: \"8px\",\n }),\n }}\n >\n {name}\n\n <ArrowUnionIcon\n style={{\n position: \"absolute\",\n left: \"30%\",\n ...(namePosition === \"top\" && {\n transform: \"translateX(-50%) rotate(180deg)\",\n bottom: \"-9px\",\n }),\n ...(namePosition === \"bottom\" && {\n transform: \"translateX(-50%) \",\n top: \"-9px\",\n }),\n ...(namePosition === \"inset\" && {\n transform: \"translateX(-50%) rotate(-90deg)\",\n top: \"8px\",\n left: \"-1px\",\n }),\n display: name ? \"block\" : \"none\",\n }}\n />\n </div>\n </div>\n );\n};\n","import * as React from \"react\";\nimport { SVGProps } from \"react\";\n\nexport const ArrowUnionIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"#303450\"\n stroke=\"url(#arrow-union-icon)\"\n d=\"M.5 8.495V15.5h15V8.495a4.5 4.5 0 0 1-3.816-2.483L9.341 1.33c-.553-1.105-2.13-1.105-2.683 0L4.317 6.012A4.5 4.5 0 0 1 .5 8.495Z\"\n />\n <defs>\n <linearGradient\n id=\"arrow-union-icon\"\n x1={8}\n x2={8}\n y1={0}\n y2={10}\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#474E6B\" />\n <stop offset={0.9} stopColor=\"#474E6B\" />\n <stop offset={0.901} stopColor=\"#474E6B\" stopOpacity={0} />\n </linearGradient>\n </defs>\n </svg>\n);\n","import React from \"react\";\n\nexport const SelectorHint = ({ active }: { active: boolean }) => {\n return (\n <div\n style={{\n color: \"white\",\n pointerEvents: \"none\",\n position: \"absolute\",\n left: \"calc(-50% - 144px - 14px)\",\n top: \"-36px\",\n width: \"max-content\",\n borderRadius: \"8px\",\n backgroundColor: \"#40414A\",\n opacity: active ? 1 : 0,\n transitionDuration: \"0.2s\",\n transitionProperty: \"transform,opacity\",\n transitionTimingFunction: \"ease-in-out\",\n padding: \"8px\",\n fontSize: \"12px\",\n lineHeight: \"12px\",\n fontWeight: 400,\n textShadow:\n \"0 0 2px #1D1E30, 1px 0 2px #1D1E30, -1px 0 2px #1D1E30, 0 1px 2px #1D1E30, 0 -1px 2px #1D1E30\",\n }}\n >\n <kbd\n style={{\n marginLeft: \"4px\",\n padding: \"2px 4px\",\n borderRadius: \"2px\",\n background: \"#1D1E30\",\n color: \"#CFD7E2\",\n border: \"none\",\n textShadow: \"none\",\n }}\n >\n shift\n </kbd>{\" \"}\n to move to parent.\n <kbd\n style={{\n marginLeft: \"4px\",\n padding: \"2px 4px\",\n borderRadius: \"2px\",\n background: \"#1D1E30\",\n color: \"#CFD7E2\",\n border: \"none\",\n textShadow: \"none\",\n }}\n >\n space\n </kbd>{\" \"}\n to highlight in monitor.\n </div>\n );\n};\n","import * as React from \"react\";\nimport { SVGProps } from \"react\";\n\nexport const DevtoolsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={157}\n height={25}\n viewBox=\"0 0 157 25\"\n fill=\"none\"\n {...props}\n >\n <g filter=\"url(#devtools-panel)\">\n <path fill=\"#1D1E30\" d=\"M17 1h123v24H17z\" />\n <path\n fill=\"#1D1E30\"\n d=\"M6.265 9.205A12 12 0 0 1 17.649 1H25v24H1L6.265 9.205ZM150.735 9.205A12 12 0 0 0 139.351 1H132v24h24l-5.265-15.795Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M25 14.333A1.333 1.333 0 1 1 25 17a1.333 1.333 0 0 1 0-2.667Z\"\n />\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M23.211 20.578a4 4 0 0 0 3.578 0l4-2A4 4 0 0 0 33 15v-4a4 4 0 0 0-2.211-3.578l-4-2a4 4 0 0 0-3.578 0l-4 2A4 4 0 0 0 17 11v4a4 4 0 0 0 2.211 3.578l4 2Zm-.878-4.911a2.667 2.667 0 0 0 5.334 0v-5.334a2.667 2.667 0 0 0-5.334 0v5.334Z\"\n clipRule=\"evenodd\"\n />\n <path\n fill=\"#CFD7E2\"\n d=\"M42.152 17a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h4.2c.288 0 .56.056.816.168a2.135 2.135 0 0 1 1.14 1.128c.112.256.168.532.168.828v3.984c0 .296-.056.572-.168.828a2.135 2.135 0 0 1-1.14 1.128 2.014 2.014 0 0 1-.816.168h-4.2Zm1.38-1.644h2.82a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-3.984a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.82v4.944Zm13.18-5.196a.244.244 0 0 1-.253.252h-4.44v1.656h4.02c.072 0 .132.024.18.072a.227.227 0 0 1 .084.18v1.128a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072h-4.02v1.644h4.44c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-5.832a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h5.832c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.128ZM63.014 17h-2.232a.387.387 0 0 1-.216-.072.356.356 0 0 1-.144-.168l-1.716-4.296a.853.853 0 0 1-.072-.24 1.783 1.783 0 0 1-.024-.264V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h1.128c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v2.616c0 .072.008.156.024.252s.04.176.072.24l1.284 3.216h.528l1.284-3.216a.853.853 0 0 0 .072-.24c.016-.096.024-.18.024-.252V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.128c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v2.928c0 .072-.008.16-.024.264a.853.853 0 0 1-.072.24l-1.716 4.296a.356.356 0 0 1-.144.168.387.387 0 0 1-.216.072ZM73.29 8.768c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v1.128a.227.227 0 0 1-.084.18.244.244 0 0 1-.18.072h-2.208v6.324a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072H69.69a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192v-6.324H67.23a.287.287 0 0 1-.192-.072.244.244 0 0 1-.072-.18V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h6.06Zm6.507.012c.296 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.296 0-.572-.056-.828-.168a2.171 2.171 0 0 1-1.128-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.128-1.128c.256-.112.532-.168.828-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.336-.132h-2.34a.497.497 0 0 0-.348.132.455.455 0 0 0-.132.336v3.996c0 .136.044.248.132.336a.497.497 0 0 0 .348.132h2.34a.455.455 0 0 0 .336-.132.436.436 0 0 0 .144-.336v-3.996Zm7.888-2.112c.295 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.297 0-.573-.056-.829-.168a2.171 2.171 0 0 1-1.127-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.127-1.128c.257-.112.532-.168.829-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.337-.132h-2.34a.497.497 0 0 0-.347.132.455.455 0 0 0-.133.336v3.996c0 .136.044.248.133.336a.497.497 0 0 0 .347.132h2.34a.455.455 0 0 0 .337-.132.436.436 0 0 0 .143-.336v-3.996ZM98.294 17H92.68a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v6.324h4.236c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072Zm7.336-5.76a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192v-.084a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.352a.46.46 0 0 0-.336.144.455.455 0 0 0-.132.336v.696c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v.696c0 .296-.056.572-.168.828a2.171 2.171 0 0 1-1.128 1.128 2.014 2.014 0 0 1-.816.168h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.043 2.043 0 0 1-.168-.828v-.084c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v.084c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-.696a.455.455 0 0 0-.132-.336.455.455 0 0 0-.336-.132h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.099 2.099 0 0 1-.168-.828v-.696c0-.296.056-.572.168-.828a2.171 2.171 0 0 1 1.128-1.128c.256-.112.528-.168.816-.168h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.532.168.828v.084a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-1.128Z\"\n />\n </g>\n </svg>\n);\n","import React from \"react\";\n\nexport const SelectorButtonIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"#0FBDBD\"\n fillRule=\"evenodd\"\n d=\"M9 1a1 1 0 0 0-2 0v2.1A5.006 5.006 0 0 0 3.1 7H1a1 1 0 0 0 0 2h2.1A5.006 5.006 0 0 0 7 12.9V15a1 1 0 1 0 2 0v-2.1A5.006 5.006 0 0 0 12.9 9H15a1 1 0 1 0 0-2h-2.1A5.006 5.006 0 0 0 9 3.1V1Zm2 7a3 3 0 1 0-6 0 3 3 0 0 0 6 0Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\n","import React from \"react\";\nimport { Placement } from \"src/interfaces/placement\";\nimport {\n MIN_PANEL_HEIGHT,\n MIN_PANEL_WIDTH,\n getDefaultPanelSize,\n getMaxPanelHeight,\n getMaxPanelWidth,\n getPanelPosition,\n getPanelToggleTransforms,\n} from \"src/utilities\";\nimport { ResizeHandleIcon } from \"./icons/resize-handle-icon\";\n\ntype Props = {\n placement: Placement;\n defaultWidth?: number;\n minWidth?: number;\n maxWidth?: number;\n defaultHeight?: number;\n minHeight?: number;\n maxHeight?: number;\n children: ({ resizing }: { resizing: string | null }) => React.ReactNode;\n onResize?: (width: number, height: number) => void;\n visible?: boolean;\n};\n\nexport const ResizablePane = ({ placement, visible, children }: Props) => {\n const [hover, setHover] = React.useState(false);\n const [resizing, setResizing] = React.useState<\n \"lx\" | \"rx\" | \"ty\" | \"by\" | null\n >(null);\n const [resizePosition, setResizePosition] = React.useState<{\n x: number;\n y: number;\n } | null>(null);\n const [panelSize, setPanelSize] = React.useState<\n Record<\"width\" | \"height\", number>\n >(getDefaultPanelSize(placement));\n\n React.useEffect(() => {\n const handleResize = () => {\n setPanelSize((p) => getDefaultPanelSize(placement, p));\n };\n\n handleResize();\n\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [placement]);\n\n React.useEffect(() => {\n const handleMouseUp = () => {\n setResizing(null);\n };\n\n if (resizing !== null) {\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }\n\n return;\n }, [resizing]);\n\n React.useEffect(() => {\n const currentCursor = document.body.style.cursor;\n\n if (resizing?.includes(\"x\")) {\n document.body.style.cursor = \"col-resize\";\n } else if (resizing?.includes(\"y\")) {\n document.body.style.cursor = \"row-resize\";\n }\n\n return () => {\n document.body.style.cursor = currentCursor;\n };\n }, [resizing]);\n\n React.useEffect(() => {\n const handleMouseMove = (e: MouseEvent) => {\n if (resizing?.[1] === \"x\") {\n const diff = e.clientX - (resizePosition?.x ?? e.clientX);\n const newWidth =\n panelSize.width + (resizing === \"lx\" ? -diff : diff) * 2;\n\n setPanelSize((p) => ({\n ...p,\n width: Math.min(\n getMaxPanelWidth(placement),\n Math.max(MIN_PANEL_WIDTH, newWidth),\n ),\n }));\n } else if (resizing?.[1] === \"y\") {\n const diff = e.clientY - (resizePosition?.y ?? e.clientY);\n const newHeight =\n panelSize.height + (resizing === \"ty\" ? -diff : diff) * 1;\n\n setPanelSize((p) => ({\n ...p,\n height: Math.min(\n getMaxPanelHeight(placement),\n Math.max(MIN_PANEL_HEIGHT, newHeight),\n ),\n }));\n }\n };\n\n if (resizing !== null) {\n window.addEventListener(\"mousemove\", handleMouseMove);\n\n return () => {\n window.removeEventListener(\"mousemove\", handleMouseMove);\n };\n }\n\n return;\n }, [resizing, placement]);\n\n return (\n <div\n style={{\n position: \"absolute\",\n borderRadius: \"8px\",\n boxShadow: \"0 0 10px rgba(0, 0, 0, 0.5)\",\n border: \"1px solid rgba(0, 0, 0, 0.5)\",\n transitionProperty: \"transform, opacity\",\n transitionTimingFunction: \"ease-in-out\",\n transitionDuration: \"0.2s\",\n ...getPanelPosition(placement),\n opacity: visible ? 1 : 0,\n transform: `${\n getPanelPosition(placement).transform\n } ${getPanelToggleTransforms(visible ?? false)}`,\n ...panelSize,\n }}\n onMouseEnter={() => {\n setHover(true);\n }}\n onMouseLeave={() => {\n setHover(false);\n }}\n >\n {children({ resizing })}\n {/* */}\n <React.Fragment>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: \"50%\",\n width: \"10px\",\n height: \"26px\",\n transform: \"translateY(-13px) translateX(-5px)\",\n cursor: \"col-resize\",\n transition: \"opacity ease-in-out 0.2s\",\n pointerEvents: hover || resizing ? \"auto\" : \"none\",\n opacity: hover || resizing ? 1 : 0,\n }}\n onMouseDown={(event) => {\n setResizing(\"lx\");\n setResizePosition({\n x: event.clientX,\n y: event.clientY,\n });\n\n event.preventDefault();\n }}\n >\n <ResizeHandleIcon />\n </div>\n <div\n style={{\n position: \"absolute\",\n right: 0,\n top: \"50%\",\n width: \"10px\",\n height: \"26px\",\n transform: `translateY(-13px) translateX(5px)`,\n cursor: \"col-resize\",\n transition: \"opacity ease-in-out 0.2s\",\n pointerEvents: hover || resizing ? \"auto\" : \"none\",\n opacity: hover || resizing ? 1 : 0,\n }}\n onMouseDown={(event) => {\n setResizing(\"rx\");\n setResizePosition({\n x: event.clientX,\n y: event.clientY,\n });\n\n event.preventDefault();\n }}\n >\n <ResizeHandleIcon />\n </div>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: 0,\n width: \"26px\",\n height: \"10px\",\n transform: \"translateY(-5px) translateX(-13px)\",\n cursor: \"row-resize\",\n transition: \"opacity ease-in-out 0.2s\",\n pointerEvents: hover || resizing ? \"auto\" : \"none\",\n opacity: hover || resizing ? 1 : 0,\n }}\n onMouseDown={(event) => {\n setResizing(\"ty\");\n setResizePosition({\n x: event.clientX,\n y: event.clientY,\n });\n\n event.preventDefault();\n }}\n >\n <ResizeHandleIcon\n style={{\n transform: \"rotate(90deg)\",\n transformOrigin: \"13px 13px\",\n }}\n />\n </div>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n bottom: 0,\n width: \"26px\",\n height: \"10px\",\n transform: \"translateY(5px) translateX(-13px)\",\n cursor: \"row-resize\",\n transition: \"opacity ease-in-out 0.2s\",\n pointerEvents: hover || resizing ? \"auto\" : \"none\",\n opacity: hover || resizing ? 1 : 0,\n }}\n onMouseDown={(event) => {\n setResizing(\"by\");\n setResizePosition({\n x: event.clientX,\n y: event.clientY,\n });\n\n event.preventDefault();\n }}\n >\n <ResizeHandleIcon\n style={{\n transform: \"rotate(90deg)\",\n transformOrigin: \"13px 13px\",\n }}\n />\n </div>\n </React.Fragment>\n </div>\n );\n};\n","import { Placement } from \"src/interfaces/placement\";\n\nexport const getPanelToggleTransforms = (visible: boolean) => {\n return visible ? \"scaleX(1) translateY(0)\" : `scaleX(0) translateY(25vw)`;\n};\n\nexport const SIZE = 50;\nexport const BUFFER = 10;\n\nconst PREFERRED_DEFAULT_WIDTH = () =>\n typeof window !== \"undefined\" ? window.innerWidth * 0.7 : 1440 * 0.7; // 70% of window width\nconst PREFERRED_DEFAULT_HEIGHT = () =>\n typeof window !== \"undefined\" ? window.innerHeight * 0.7 : 900 * 0.7; // 70% of window height\n\nexport const MIN_PANEL_WIDTH = 640;\nexport const MIN_PANEL_HEIGHT = 360;\n\nexport const getPinButtonTransform = (hover?: boolean) => {\n return `translateY(${hover ? \"0\" : \"50%\"})`;\n};\n\nexport const getPanelPosition = (placement: Placement) => {\n switch (placement) {\n case \"left\":\n return {\n left: `calc(${SIZE}px + ${BUFFER}px)`,\n top: \"50%\",\n transform: \"translateY(-50%)\",\n };\n case \"right\":\n return {\n right: `calc(${SIZE}px + ${BUFFER}px)`,\n top: \"50%\",\n transform: \"translateY(-50%)\",\n };\n case \"top\":\n return {\n left: \"50%\",\n top: `calc(${SIZE}px + ${BUFFER}px)`,\n transform: \"translateX(-50%)\",\n };\n default:\n case \"bottom\":\n return {\n left: \"50%\",\n bottom: `calc(${SIZE}px + ${BUFFER}px)`,\n transform: \"translateX(-50%)\",\n };\n }\n};\n\nexport const getMaxPanelWidth = (placement: Placement) => {\n switch (placement) {\n case \"left\":\n case \"right\":\n return (\n -BUFFER -\n SIZE -\n BUFFER +\n (typeof window !== \"undefined\" ? window.innerWidth : 1440) -\n BUFFER\n );\n case \"top\":\n case \"bottom\":\n return (\n -BUFFER +\n (typeof window !== \"undefined\" ? window.innerWidth : 1440) -\n BUFFER\n );\n }\n};\n\nexport const getMaxPanelHeight = (placement: Placement) => {\n switch (placement) {\n case \"left\":\n case \"right\":\n return (\n -BUFFER +\n (typeof window !== \"undefined\" ? window.innerHeight : 900) -\n BUFFER\n );\n case \"top\":\n case \"bottom\":\n return (\n -BUFFER -\n SIZE -\n BUFFER +\n (typeof window !== \"undefined\" ? window.innerHeight : 900) -\n BUFFER\n );\n }\n};\n\nexport const getDefaultPanelSize = (\n placement: Placement,\n preferredSize?: { width: number; height: number },\n): { width: number; height: number } => {\n const defaultPreferred = {\n width: PREFERRED_DEFAULT_WIDTH(),\n height: PREFERRED_DEFAULT_HEIGHT(),\n };\n\n const maxPanelWidth = getMaxPanelWidth(placement);\n const maxPanelHeight = getMaxPanelHeight(placement);\n\n const width = Math.min(\n maxPanelWidth,\n (preferredSize ?? defaultPreferred).width,\n );\n const height = Math.min(\n maxPanelHeight,\n (preferredSize ?? defaultPreferred).height,\n );\n\n return {\n width: width,\n height: height,\n };\n};\n","import React from \"react\";\n\nexport const ResizeHandleIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width={10}\n height={26}\n viewBox=\"0 0 10 26\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <rect x={0.5} y={0.5} width={9} height={25} rx={4.5} fill=\"#1D1E30\" />\n <path\n d=\"M7 5C7 6.10457 6.10457 7 5 7C3.89543 7 3 6.10457 3 5C3 3.89543 3.89543 3 5 3C6.10457 3 7 3.89543 7 5Z\"\n fill=\"#303450\"\n />\n <path\n d=\"M7 13C7 14.1046 6.10457 15 5 15C3.89543 15 3 14.1046 3 13C3 11.8954 3.89543 11 5 11C6.10457 11 7 11.8954 7 13Z\"\n fill=\"#303450\"\n />\n <path\n d=\"M7 21C7 22.1046 6.10457 23 5 23C3.89543 23 3 22.1046 3 21C3 19.8954 3.89543 19 5 19C6.10457 19 7 19.8954 7 21Z\"\n fill=\"#303450\"\n />\n <rect x={0.5} y={0.5} width={9} height={25} rx={4.5} stroke=\"#303450\" />\n </svg>\n);\n","import React from \"react\";\nimport { DevToolsContextProvider } from \"@refinedev/devtools-shared\";\n\nexport const DevtoolsProvider =\n __DEV_CONDITION__ !== \"development\"\n ? ({ children }: React.PropsWithChildren) => children as any\n : ({ children }: React.PropsWithChildren) => {\n return (\n <DevToolsContextProvider>{children}</DevToolsContextProvider>\n );\n };\n"],"mappings":"AAAA,OAAOA,MAAW,QCAlB,OAAOC,MAAW,QCAlB,OAAOC,MAAW,QAClB,OAAS,gBAAAC,OAAoB,YCD7B,OACI,uBAAAC,EACA,uBAAAC,EACA,wBAAAC,GACA,0BAAAC,GACA,oBAAAC,EACA,oBAAAC,MACG,8BACP,OAAS,mBAAAC,OAAuB,6BAChC,OAAOC,OAAc,kBACrB,OAAOC,MAAW,QAIX,IAAMC,EAAeC,GAAoB,CAC5C,GAAM,CAAE,YAAAC,CAAY,EAAIH,EAAM,WAAWF,EAAe,EAClD,CAACM,EAAYC,CAAa,EAAIL,EAAM,SAAmB,CAAC,CAAC,EAE/DA,EAAM,UAAU,IAAM,CACdE,GACA,MACI,GACIC,GAAe,gDAEvB,EAAE,KAAMG,GACJA,EACK,KAAK,EACL,KAAMC,GACHF,EAAcE,EAAK,IAAI,CAC3B,CACR,CAER,EAAG,CAACL,EAAQC,CAAW,CAAC,EAExB,GAAM,CAACK,EAAeC,CAAgB,EAAIT,EAAM,SAG7C,CACC,UAAW,KACX,UAAW,IACf,CAAC,EACK,CAACU,EAAaC,CAAc,EAAIX,EAAM,SAIzC,CACC,UAAW,KACX,UAAW,KACX,QAAS,EACb,CAAC,EAEDA,EAAM,UAAU,IACRE,EACO,IAAM,CACTO,EAAiB,CACb,UAAW,KACX,UAAW,IACf,CAAC,EACDE,EAAe,CACX,UAAW,KACX,UAAW,KACX,QAAS,EACb,CAAC,CACL,EAGG,IAAM,EACd,CAACT,CAAM,CAAC,EAEX,IAAMU,EAAyBZ,EAAM,YAChCa,GAAwB,CACrB,IAAIC,EAAQD,EACRE,EACAC,EAEAC,EAAe,GAEnB,KAAO,CAACA,GAAgBH,GAEpBC,EAA4BrB,GAAqBoB,CAAK,EAEtDE,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AAS,EAAID,EAAM,SAAoB,QAAQ,EAChD,CAAE,YAAAE,EAAa,GAAAC,CAAG,EAAIH,EAAM,WAAWN,EAAe,EAEtDU,EAAsBJ,EAAM,YAC7BK,GAAiB,CACVF,GACAP,GACIO,EACAR,GAAc,8BACd,CACI,KAAAU,CACJ,CACJ,EAEJN,EAAW,EAAI,CACnB,EACA,CAACI,CAAE,CACP,EAEMG,EAAiBN,EAAM,YAAY,IAAM,CAC3CD,EAAW,EAAK,CACpB,EAAG,CAAC,CAAC,EAEL,OACIC,EAAA,cAAC,OACG,MAAO,CACH,SAAU,QACV,KAAM,MACN,UAAW,mBACX,OAAQ,EACR,OAAQ,KACZ,GAEAA,EAAA,cAACO,EAAA,CACG,QAAS,IAAMR,EAAYS,GAAM,CAACA,CAAC,EACnC,oBAAqBJ,EACrB,eAAgBE,EACpB,EACAN,EAAA,cAACS,EAAA,CAAc,QAASX,EAAS,UAAWG,GACvC,CAAC,CAAE,SAAAS,CAAS,IACTV,EAAA,cAAC,UACG,MAAM,mBACN,IAAKE,EACL,OACIA,EACM,OACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAQV,MAAO,CACH,MAAO,OACP,OAAQ,OACR,OAAQ,OACR,aAAc,MACd,cAAeQ,EAAW,OAAS,OACnC,WAAY,SAChB,EACJ,CAER,CACJ,CAER,EYnFV,OAAOC,OAAW,QAClB,OAAS,2BAAAC,OAA+B,6BAEjC,IAAMC,GACT,uBAAsB,cAChB,CAAC,CAAE,SAAAC,CAAS,IAA+BA,EAC3C,CAAC,CAAE,SAAAA,CAAS,IAEJH,GAAA,cAACC,GAAA,KAAyBE,CAAS","names":["React","React","React","createPortal","getElementFromFiber","getFiberFromElement","getFirstFiberHasName","getFirstStateNodeFiber","getNameFromFiber","getParentOfFiber","DevToolsContext","debounce","React","useSelector","active","devtoolsUrl","traceItems","setTraceItems","res","data","selectedFiber","setSelectedFiber","activeFiber","setActiveFiber","selectAppropriateFiber","start","fiber","firstParentOfNodeWithName","fiberWithStateNode","acceptedName","pickFiber","target","previousValues","rect","name","_a","element","fiberName","bounding","listener","e","parent","fibers","previousTarget","React","React","ArrowUnionIcon","props","Y_OFFSET","X_OFFSET","SelectorBox","width","height","x","y","name","namePosition","outlinePosition","React","ArrowUnionIcon","React","SelectorHint","active","DevtoolsSelector","onSelectorOpen","onHighlight","icon","style","hover","setHover","React","active","setActive","rect","name","useSelector","selectorBoxRoot","setSelectorBoxRoot","element","onMouseClick","e","event","_a","SelectorHint","createPortal","SelectorBox","React","DevtoolsIcon","props","React","SelectorButtonIcon","props","DevtoolsPin","onClick","onSelectorHighlight","onSelectorOpen","hover","setHover","React","DevtoolsIcon","DevtoolsSelector","SelectorButtonIcon","React","getPanelToggleTransforms","visible","SIZE","BUFFER","PREFERRED_DEFAULT_WIDTH","PREFERRED_DEFAULT_HEIGHT","MIN_PANEL_WIDTH","MIN_PANEL_HEIGHT","getPanelPosition","placement","SIZE","BUFFER","getMaxPanelWidth","getMaxPanelHeight","getDefaultPanelSize","preferredSize","defaultPreferred","PREFERRED_DEFAULT_WIDTH","PREFERRED_DEFAULT_HEIGHT","maxPanelWidth","maxPanelHeight","width","height","React","ResizeHandleIcon","props","ResizablePane","placement","visible","children","hover","setHover","React","resizing","setResizing","resizePosition","setResizePosition","panelSize","setPanelSize","getDefaultPanelSize","handleResize","p","handleMouseUp","currentCursor","handleMouseMove","e","diff","newWidth","getMaxPanelWidth","MIN_PANEL_WIDTH","newHeight","getMaxPanelHeight","MIN_PANEL_HEIGHT","getPanelPosition","getPanelToggleTransforms","event","ResizeHandleIcon","DevToolsContext","DevtoolsEvent","send","DevtoolsPanel","visible","setVisible","React","placement","devtoolsUrl","ws","onSelectorHighlight","name","onSelectorOpen","DevtoolsPin","v","ResizablePane","resizing","React","DevToolsContextProvider","DevtoolsProvider","children"]}
|
|
1
|
+
{"version":3,"sources":["../../src/panel.tsx","../../src/components/devtools-pin.tsx","../../src/components/devtools-selector.tsx","../../src/utilities/use-selector.tsx","../../src/components/selector-box.tsx","../../src/components/icons/arrow-union-icon.tsx","../../src/components/selector-hint.tsx","../../src/components/icons/devtools-icon.tsx","../../src/components/icons/selector-button.tsx","../../src/components/resizable-pane.tsx","../../src/utilities/index.ts","../../src/components/icons/resize-handle-icon.tsx","../../src/provider.tsx"],"sourcesContent":["import React from \"react\";\nimport { DevtoolsPin } from \"./components/devtools-pin\";\nimport { ResizablePane } from \"./components/resizable-pane\";\n\nimport { Placement } from \"./interfaces/placement\";\nimport {\n DevToolsContext,\n DevtoolsEvent,\n send,\n} from \"@refinedev/devtools-shared\";\n\nexport const DevtoolsPanel =\n __DEV_CONDITION__ !== \"development\"\n ? () => null\n : () => {\n const [browser, setBrowser] = React.useState<boolean>(false);\n const [visible, setVisible] = React.useState(false);\n const [placement] = React.useState<Placement>(\"bottom\");\n const { devtoolsUrl, ws } = React.useContext(DevToolsContext);\n\n const onSelectorHighlight = React.useCallback(\n (name: string) => {\n if (ws) {\n send(\n ws,\n DevtoolsEvent.DEVTOOLS_HIGHLIGHT_IN_MONITOR,\n {\n name,\n },\n );\n }\n setVisible(true);\n },\n [ws],\n );\n\n const onSelectorOpen = React.useCallback(() => {\n setVisible(false);\n }, []);\n\n React.useEffect(() => {\n if (typeof window !== \"undefined\") {\n setBrowser(true);\n }\n }, []);\n\n if (!browser) {\n return null;\n }\n\n return (\n <div\n style={{\n position: \"fixed\",\n left: \"50%\",\n transform: \"translateX(-50%)\",\n bottom: 0,\n zIndex: 99999,\n }}\n >\n <DevtoolsPin\n onClick={() => setVisible((v) => !v)}\n onSelectorHighlight={onSelectorHighlight}\n onSelectorOpen={onSelectorOpen}\n />\n <ResizablePane visible={visible} placement={placement}>\n {({ resizing }) => (\n <iframe\n allow=\"clipboard-write;\"\n src={devtoolsUrl}\n srcDoc={\n devtoolsUrl\n ? undefined\n : `\n <html style=\"height:100%;padding:0;margin:0;\">\n <body style=\"display:flex;justify-content:center;height:100%;padding:24px;margin:0;align-items:center;box-sizing:border-box;\">\n <h1 style=\"font-family:ui-monospace,monospace;color:#CFD7E2;text-align:center;\">Could not connect to the devtools server</h1>\n </body>\n </html>\n `\n }\n style={{\n width: \"100%\",\n height: \"100%\",\n border: \"none\",\n borderRadius: \"7px\",\n pointerEvents: resizing ? \"none\" : \"auto\",\n background: \"#14141F\",\n }}\n />\n )}\n </ResizablePane>\n </div>\n );\n };\n","import React from \"react\";\nimport { DevtoolsSelector } from \"./devtools-selector\";\nimport { DevtoolsIcon } from \"./icons/devtools-icon\";\nimport { SelectorButtonIcon } from \"./icons/selector-button\";\n\ntype Props = {\n onClick?: () => void;\n groupHover?: boolean;\n onSelectorHighlight: (name: string) => void;\n onSelectorOpen: () => void;\n};\n\nexport const DevtoolsPin = ({\n onClick,\n onSelectorHighlight,\n onSelectorOpen,\n}: Props) => {\n const [hover, setHover] = React.useState(false);\n\n return (\n <div\n onMouseOver={() => setHover(true)}\n onMouseOut={() => setHover(false)}\n style={{\n position: \"relative\",\n userSelect: \"none\",\n WebkitUserSelect: \"none\",\n background: \"none\",\n border: \"none\",\n padding: 0,\n margin: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n cursor: \"pointer\",\n color: hover ? \"#0FBDBD\" : \"#6C7793\",\n transition: \"color 0.1s ease-in-out\",\n }}\n onClick={onClick}\n >\n <DevtoolsIcon />\n <DevtoolsSelector\n style={{\n position: \"absolute\",\n top: 5,\n right: 18,\n width: \"16px\",\n height: \"16px\",\n }}\n icon={\n <SelectorButtonIcon\n width={16}\n height={16}\n style={{ pointerEvents: \"none\" }}\n />\n }\n onSelectorOpen={onSelectorOpen}\n onHighlight={onSelectorHighlight}\n />\n </div>\n );\n};\n","import React from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useSelector } from \"src/utilities/use-selector\";\nimport { SelectorBox } from \"./selector-box\";\nimport { SelectorHint } from \"./selector-hint\";\n\ntype Props = {\n onSelectorOpen: () => void;\n onHighlight: (name: string) => void;\n icon?: React.ReactNode;\n style?: React.CSSProperties;\n};\n\nexport const DevtoolsSelector = ({\n onSelectorOpen,\n onHighlight,\n icon,\n style,\n}: Props) => {\n const [hover, setHover] = React.useState(false);\n const [active, setActive] = React.useState(false);\n const { rect, name } = useSelector(active);\n\n const [selectorBoxRoot, setSelectorBoxRoot] =\n React.useState<HTMLElement | null>(null);\n\n React.useEffect(() => {\n if (!selectorBoxRoot) {\n const element = document.createElement(\"div\");\n element.id = \"selector-box-root\";\n\n document.body.appendChild(element);\n\n setSelectorBoxRoot(element);\n }\n }, []);\n\n React.useEffect(() => {\n if (active) {\n document.body.style.cursor = \"crosshair\";\n } else {\n document.body.style.cursor = \"default\";\n }\n }, [active]);\n\n React.useEffect(() => {\n const onMouseClick = (e: MouseEvent) => {\n if (!active) return;\n if (!name) return;\n\n e?.preventDefault();\n e?.stopPropagation();\n e.stopImmediatePropagation();\n onHighlight(name);\n setActive(false);\n };\n\n if (active) {\n document.addEventListener(\"click\", onMouseClick, {\n capture: true,\n });\n\n return () => {\n document.removeEventListener(\"click\", onMouseClick, {\n capture: true,\n });\n };\n }\n\n return () => 0;\n }, [name, onHighlight, active]);\n\n React.useEffect(() => {\n if (active) {\n onSelectorOpen();\n }\n }, [active, onSelectorOpen]);\n\n return (\n <div style={style}>\n <div\n role=\"button\"\n title=\"Element Selector\"\n onMouseOver={() => setHover(true)}\n onMouseOut={() => setHover(false)}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n (document?.activeElement as HTMLElement)?.blur();\n setActive((active) => !active);\n }}\n style={{\n padding: 0,\n margin: 0,\n height: \"100%\",\n width: \"100%\",\n transform: hover ? \"rotate(180deg)\" : \"rotate(0deg)\",\n transition: \"transform 0.2s ease-in-out\",\n }}\n >\n {icon}\n </div>\n <SelectorHint active={active} />\n {active &&\n selectorBoxRoot &&\n createPortal(\n <SelectorBox {...rect} name={name} />,\n selectorBoxRoot,\n )}\n </div>\n );\n};\n","import {\n getElementFromFiber,\n getFiberFromElement,\n getFirstFiberHasName,\n getFirstStateNodeFiber,\n getNameFromFiber,\n getParentOfFiber,\n} from \"@aliemir/dom-to-fiber-utils\";\nimport { DevToolsContext } from \"@refinedev/devtools-shared\";\nimport debounce from \"lodash/debounce\";\nimport React from \"react\";\n\ntype Fiber = Exclude<ReturnType<typeof getFiberFromElement>, null>;\n\nexport const useSelector = (active: boolean) => {\n const { devtoolsUrl } = React.useContext(DevToolsContext);\n const [traceItems, setTraceItems] = React.useState<string[]>([]);\n\n React.useEffect(() => {\n if (active) {\n fetch(\n `${\n devtoolsUrl ?? \"http://localhost:5001\"\n }/api/unique-trace-items`,\n ).then((res) =>\n res\n .json()\n .then((data: { data: string[] }) =>\n setTraceItems(data.data),\n ),\n );\n }\n }, [active, devtoolsUrl]);\n\n const [selectedFiber, setSelectedFiber] = React.useState<{\n stateNode: Fiber | null;\n nameFiber: Fiber | null;\n }>({\n stateNode: null,\n nameFiber: null,\n });\n const [activeFiber, setActiveFiber] = React.useState<{\n stateNode: Fiber | null;\n nameFiber: Fiber | null;\n derived?: boolean;\n }>({\n stateNode: null,\n nameFiber: null,\n derived: false,\n });\n\n React.useEffect(() => {\n if (active) {\n return () => {\n setSelectedFiber({\n stateNode: null,\n nameFiber: null,\n });\n setActiveFiber({\n stateNode: null,\n nameFiber: null,\n derived: false,\n });\n };\n }\n\n return () => 0;\n }, [active]);\n\n const selectAppropriateFiber = React.useCallback(\n (start: Fiber | null) => {\n let fiber = start;\n let firstParentOfNodeWithName: Fiber | null;\n let fiberWithStateNode: Fiber | null;\n\n let acceptedName = false;\n\n while (!acceptedName && fiber) {\n // Get the first fiber node that has a name (look up the tree)\n firstParentOfNodeWithName = getFirstFiberHasName(fiber);\n // Get the first fiber node that has a state node (look up the tree)\n fiberWithStateNode = getFirstStateNodeFiber(\n firstParentOfNodeWithName,\n );\n acceptedName = traceItems.includes(\n getNameFromFiber(firstParentOfNodeWithName) ?? \"\",\n );\n if (!acceptedName) {\n fiber = getParentOfFiber(fiber);\n }\n }\n\n if (fiberWithStateNode && firstParentOfNodeWithName) {\n return {\n stateNode: fiberWithStateNode,\n nameFiber: firstParentOfNodeWithName,\n };\n } else {\n return {\n stateNode: null,\n nameFiber: null,\n };\n }\n },\n [traceItems],\n );\n\n const pickFiber = React.useCallback(\n (target: HTMLElement) => {\n const fiber = getFiberFromElement(target);\n\n setSelectedFiber(selectAppropriateFiber(fiber));\n return;\n },\n [traceItems],\n );\n\n React.useEffect(() => {\n if (\n activeFiber.stateNode !== selectedFiber.stateNode ||\n activeFiber.nameFiber !== selectedFiber.nameFiber\n ) {\n setActiveFiber({\n stateNode: selectedFiber.stateNode,\n nameFiber: selectedFiber.nameFiber,\n derived: false,\n });\n }\n }, [selectedFiber]);\n\n const previousValues = React.useRef<{\n rect: {\n width: number;\n height: number;\n x: number;\n y: number;\n };\n name: string;\n }>({\n rect: {\n width: 0,\n height: 0,\n x: 0,\n y: 0,\n },\n name: \"\",\n });\n\n const { rect, name } = React.useMemo(() => {\n if (!active) {\n return {\n rect: {\n width: 0,\n height: 0,\n x: 0,\n y: 0,\n },\n name: \"\",\n };\n }\n if (activeFiber.stateNode || activeFiber.nameFiber) {\n // Get the element from the fiber with a state node\n const element = activeFiber.stateNode\n ? getElementFromFiber(activeFiber.stateNode)\n : null;\n // Get the name of the fiber node with a name\n const fiberName = activeFiber.nameFiber\n ? getNameFromFiber(activeFiber.nameFiber)\n : null;\n\n if (!element) {\n return {\n rect: previousValues.current.rect,\n name: fiberName ?? previousValues.current.name,\n };\n }\n\n const bounding = element.getBoundingClientRect?.();\n\n if (!bounding) {\n return {\n rect: previousValues.current.rect,\n name: fiberName ?? previousValues.current.name,\n };\n }\n\n return {\n rect: {\n width: bounding.width,\n height: bounding.height,\n x: bounding.left,\n y: bounding.top,\n },\n name: fiberName ?? previousValues.current.name,\n };\n }\n\n return previousValues.current;\n }, [activeFiber, active]);\n\n previousValues.current = {\n rect,\n name,\n };\n\n React.useEffect(() => {\n if (active) {\n const listener = (e: KeyboardEvent) => {\n // if user presses shift, toggle the derived state and set the active fiber to the parent\n if (e.key === \"Shift\" && activeFiber.stateNode) {\n e.stopPropagation();\n e.preventDefault();\n\n const parent = getParentOfFiber(activeFiber.nameFiber);\n\n const fibers = selectAppropriateFiber(parent);\n\n if (fibers.nameFiber && fibers.stateNode) {\n setActiveFiber({\n ...fibers,\n derived: true,\n });\n return;\n }\n }\n };\n\n document.addEventListener(\"keydown\", listener);\n return () => document.removeEventListener(\"keydown\", listener);\n }\n return () => 0;\n }, [activeFiber, active]);\n\n React.useEffect(() => {\n if (active) {\n let previousTarget: HTMLElement | null = null;\n const listener = debounce((e: MouseEvent) => {\n if (e?.target) {\n if (previousTarget === e.target) {\n return;\n }\n pickFiber(e.target as HTMLElement);\n previousTarget = e.target as HTMLElement;\n }\n }, 50);\n\n document.addEventListener(\"mousemove\", listener);\n\n return () => document.removeEventListener(\"mousemove\", listener);\n } else {\n return () => 0;\n }\n }, [active, pickFiber]);\n\n return {\n rect,\n name,\n };\n};\n","import React from \"react\";\nimport { ArrowUnionIcon } from \"./icons/arrow-union-icon\";\n\nconst Y_OFFSET = 38;\nconst X_OFFSET = 7;\n\nexport const SelectorBox = ({\n width,\n height,\n x,\n y,\n name,\n}: {\n width: number;\n height: number;\n x: number;\n y: number;\n name: string;\n}) => {\n const namePosition =\n y > Y_OFFSET ? \"top\" : height > 3 * Y_OFFSET ? \"inset\" : \"bottom\";\n\n const outlinePosition = x > X_OFFSET && y > X_OFFSET ? \"outside\" : \"inside\";\n\n return (\n <div\n id=\"selector-box\"\n style={{\n pointerEvents: \"none\",\n position: \"fixed\",\n opacity: name ? 1 : 0,\n transitionProperty: \"width, height, transform, opacity\",\n transitionDuration: \"0.15s\",\n transitionTimingFunction: \"ease-out\",\n border: \"1.5px solid #47EBEB\",\n borderRadius: \"4px\",\n background: \"rgba(37,160,160, 0.25)\",\n backdropFilter: \"sepia(30%) hue-rotate(180deg)\",\n zIndex: 99998,\n ...(outlinePosition === \"outside\"\n ? {\n left: -6,\n top: -6,\n width: width + 10,\n height: height + 10,\n transform: `translate(${x}px, ${y}px)`,\n }\n : {\n left: 0,\n top: 0,\n width: width - 10,\n height: height - 20,\n transform: `translate(${x + 4}px, ${y + 4}px)`,\n }),\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: \"-1.5px\",\n background: \"#303450\",\n border: \"1px solid #474E6B\",\n borderRadius: \"4px\",\n padding: \"8px 12px\",\n fontSize: \"12px\",\n lineHeight: \"16px\",\n fontWeight: 400,\n color: \"#ffffff\",\n display: name ? \"block\" : \"none\",\n ...(namePosition === \"top\" && {\n top: \"-38px\",\n }),\n ...(namePosition === \"bottom\" && {\n bottom: \"-38px\",\n }),\n ...(namePosition === \"inset\" && {\n top: \"4px\",\n left: \"8px\",\n }),\n }}\n >\n {name}\n\n <ArrowUnionIcon\n style={{\n position: \"absolute\",\n left: \"30%\",\n ...(namePosition === \"top\" && {\n transform: \"translateX(-50%) rotate(180deg)\",\n bottom: \"-9px\",\n }),\n ...(namePosition === \"bottom\" && {\n transform: \"translateX(-50%) \",\n top: \"-9px\",\n }),\n ...(namePosition === \"inset\" && {\n transform: \"translateX(-50%) rotate(-90deg)\",\n top: \"8px\",\n left: \"-1px\",\n }),\n display: name ? \"block\" : \"none\",\n }}\n />\n </div>\n </div>\n );\n};\n","import * as React from \"react\";\nimport { SVGProps } from \"react\";\n\nexport const ArrowUnionIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"#303450\"\n stroke=\"url(#arrow-union-icon)\"\n d=\"M.5 8.495V15.5h15V8.495a4.5 4.5 0 0 1-3.816-2.483L9.341 1.33c-.553-1.105-2.13-1.105-2.683 0L4.317 6.012A4.5 4.5 0 0 1 .5 8.495Z\"\n />\n <defs>\n <linearGradient\n id=\"arrow-union-icon\"\n x1={8}\n x2={8}\n y1={0}\n y2={10}\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#474E6B\" />\n <stop offset={0.9} stopColor=\"#474E6B\" />\n <stop offset={0.901} stopColor=\"#474E6B\" stopOpacity={0} />\n </linearGradient>\n </defs>\n </svg>\n);\n","import React from \"react\";\n\nexport const SelectorHint = ({ active }: { active: boolean }) => {\n return (\n <div\n style={{\n color: \"white\",\n pointerEvents: \"none\",\n position: \"absolute\",\n left: \"calc(-50% - 144px - 14px)\",\n top: \"-36px\",\n width: \"max-content\",\n borderRadius: \"8px\",\n backgroundColor: \"#40414A\",\n opacity: active ? 1 : 0,\n transitionDuration: \"0.2s\",\n transitionProperty: \"transform,opacity\",\n transitionTimingFunction: \"ease-in-out\",\n padding: \"8px\",\n fontSize: \"12px\",\n lineHeight: \"12px\",\n fontWeight: 400,\n textShadow:\n \"0 0 2px #1D1E30, 1px 0 2px #1D1E30, -1px 0 2px #1D1E30, 0 1px 2px #1D1E30, 0 -1px 2px #1D1E30\",\n }}\n >\n <kbd\n style={{\n marginLeft: \"4px\",\n padding: \"2px 4px\",\n borderRadius: \"2px\",\n background: \"#1D1E30\",\n color: \"#CFD7E2\",\n border: \"none\",\n textShadow: \"none\",\n }}\n >\n shift\n </kbd>{\" \"}\n to move to parent.\n <kbd\n style={{\n marginLeft: \"4px\",\n padding: \"2px 4px\",\n borderRadius: \"2px\",\n background: \"#1D1E30\",\n color: \"#CFD7E2\",\n border: \"none\",\n textShadow: \"none\",\n }}\n >\n space\n </kbd>{\" \"}\n to highlight in monitor.\n </div>\n );\n};\n","import * as React from \"react\";\nimport { SVGProps } from \"react\";\n\nexport const DevtoolsIcon = (props: SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={157}\n height={25}\n viewBox=\"0 0 157 25\"\n fill=\"none\"\n {...props}\n >\n <g filter=\"url(#devtools-panel)\">\n <path fill=\"#1D1E30\" d=\"M17 1h123v24H17z\" />\n <path\n fill=\"#1D1E30\"\n d=\"M6.265 9.205A12 12 0 0 1 17.649 1H25v24H1L6.265 9.205ZM150.735 9.205A12 12 0 0 0 139.351 1H132v24h24l-5.265-15.795Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M25 14.333A1.333 1.333 0 1 1 25 17a1.333 1.333 0 0 1 0-2.667Z\"\n />\n <path\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n d=\"M23.211 20.578a4 4 0 0 0 3.578 0l4-2A4 4 0 0 0 33 15v-4a4 4 0 0 0-2.211-3.578l-4-2a4 4 0 0 0-3.578 0l-4 2A4 4 0 0 0 17 11v4a4 4 0 0 0 2.211 3.578l4 2Zm-.878-4.911a2.667 2.667 0 0 0 5.334 0v-5.334a2.667 2.667 0 0 0-5.334 0v5.334Z\"\n clipRule=\"evenodd\"\n />\n <path\n fill=\"#CFD7E2\"\n d=\"M42.152 17a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h4.2c.288 0 .56.056.816.168a2.135 2.135 0 0 1 1.14 1.128c.112.256.168.532.168.828v3.984c0 .296-.056.572-.168.828a2.135 2.135 0 0 1-1.14 1.128 2.014 2.014 0 0 1-.816.168h-4.2Zm1.38-1.644h2.82a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-3.984a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.82v4.944Zm13.18-5.196a.244.244 0 0 1-.253.252h-4.44v1.656h4.02c.072 0 .132.024.18.072a.227.227 0 0 1 .084.18v1.128a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072h-4.02v1.644h4.44c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-5.832a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h5.832c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.128ZM63.014 17h-2.232a.387.387 0 0 1-.216-.072.356.356 0 0 1-.144-.168l-1.716-4.296a.853.853 0 0 1-.072-.24 1.783 1.783 0 0 1-.024-.264V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h1.128c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v2.616c0 .072.008.156.024.252s.04.176.072.24l1.284 3.216h.528l1.284-3.216a.853.853 0 0 0 .072-.24c.016-.096.024-.18.024-.252V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.128c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v2.928c0 .072-.008.16-.024.264a.853.853 0 0 1-.072.24l-1.716 4.296a.356.356 0 0 1-.144.168.387.387 0 0 1-.216.072ZM73.29 8.768c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v1.128a.227.227 0 0 1-.084.18.244.244 0 0 1-.18.072h-2.208v6.324a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072H69.69a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192v-6.324H67.23a.287.287 0 0 1-.192-.072.244.244 0 0 1-.072-.18V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h6.06Zm6.507.012c.296 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.296 0-.572-.056-.828-.168a2.171 2.171 0 0 1-1.128-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.128-1.128c.256-.112.532-.168.828-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.336-.132h-2.34a.497.497 0 0 0-.348.132.455.455 0 0 0-.132.336v3.996c0 .136.044.248.132.336a.497.497 0 0 0 .348.132h2.34a.455.455 0 0 0 .336-.132.436.436 0 0 0 .144-.336v-3.996Zm7.888-2.112c.295 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.297 0-.573-.056-.829-.168a2.171 2.171 0 0 1-1.127-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.127-1.128c.257-.112.532-.168.829-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.337-.132h-2.34a.497.497 0 0 0-.347.132.455.455 0 0 0-.133.336v3.996c0 .136.044.248.133.336a.497.497 0 0 0 .347.132h2.34a.455.455 0 0 0 .337-.132.436.436 0 0 0 .143-.336v-3.996ZM98.294 17H92.68a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v6.324h4.236c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072Zm7.336-5.76a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192v-.084a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.352a.46.46 0 0 0-.336.144.455.455 0 0 0-.132.336v.696c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v.696c0 .296-.056.572-.168.828a2.171 2.171 0 0 1-1.128 1.128 2.014 2.014 0 0 1-.816.168h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.043 2.043 0 0 1-.168-.828v-.084c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v.084c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-.696a.455.455 0 0 0-.132-.336.455.455 0 0 0-.336-.132h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.099 2.099 0 0 1-.168-.828v-.696c0-.296.056-.572.168-.828a2.171 2.171 0 0 1 1.128-1.128c.256-.112.528-.168.816-.168h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.532.168.828v.084a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-1.128Z\"\n />\n </g>\n </svg>\n);\n","import React from \"react\";\n\nexport const SelectorButtonIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={16}\n height={16}\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n {...props}\n >\n <path\n fill=\"#0FBDBD\"\n fillRule=\"evenodd\"\n d=\"M9 1a1 1 0 0 0-2 0v2.1A5.006 5.006 0 0 0 3.1 7H1a1 1 0 0 0 0 2h2.1A5.006 5.006 0 0 0 7 12.9V15a1 1 0 1 0 2 0v-2.1A5.006 5.006 0 0 0 12.9 9H15a1 1 0 1 0 0-2h-2.1A5.006 5.006 0 0 0 9 3.1V1Zm2 7a3 3 0 1 0-6 0 3 3 0 0 0 6 0Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n);\n","import React from \"react\";\nimport { Placement } from \"src/interfaces/placement\";\nimport {\n MIN_PANEL_HEIGHT,\n MIN_PANEL_WIDTH,\n getDefaultPanelSize,\n getMaxPanelHeight,\n getMaxPanelWidth,\n getPanelPosition,\n getPanelToggleTransforms,\n} from \"src/utilities\";\nimport { ResizeHandleIcon } from \"./icons/resize-handle-icon\";\n\ntype Props = {\n placement: Placement;\n defaultWidth?: number;\n minWidth?: number;\n maxWidth?: number;\n defaultHeight?: number;\n minHeight?: number;\n maxHeight?: number;\n children: ({ resizing }: { resizing: string | null }) => React.ReactNode;\n onResize?: (width: number, height: number) => void;\n visible?: boolean;\n};\n\nexport const ResizablePane = ({ placement, visible, children }: Props) => {\n const [hover, setHover] = React.useState(false);\n const [resizing, setResizing] = React.useState<\n \"lx\" | \"rx\" | \"ty\" | \"by\" | null\n >(null);\n const [resizePosition, setResizePosition] = React.useState<{\n x: number;\n y: number;\n } | null>(null);\n const [panelSize, setPanelSize] = React.useState<\n Record<\"width\" | \"height\", number>\n >(getDefaultPanelSize(placement));\n\n React.useEffect(() => {\n const handleResize = () => {\n setPanelSize((p) => getDefaultPanelSize(placement, p));\n };\n\n handleResize();\n\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [placement]);\n\n React.useEffect(() => {\n const handleMouseUp = () => {\n setResizing(null);\n };\n\n if (resizing !== null) {\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }\n\n return;\n }, [resizing]);\n\n React.useEffect(() => {\n const currentCursor = document.body.style.cursor;\n\n if (resizing?.includes(\"x\")) {\n document.body.style.cursor = \"col-resize\";\n } else if (resizing?.includes(\"y\")) {\n document.body.style.cursor = \"row-resize\";\n }\n\n return () => {\n document.body.style.cursor = currentCursor;\n };\n }, [resizing]);\n\n React.useEffect(() => {\n const handleMouseMove = (e: MouseEvent) => {\n if (resizing?.[1] === \"x\") {\n const diff = e.clientX - (resizePosition?.x ?? e.clientX);\n const newWidth =\n panelSize.width + (resizing === \"lx\" ? -diff : diff) * 2;\n\n setPanelSize((p) => ({\n ...p,\n width: Math.min(\n getMaxPanelWidth(placement),\n Math.max(MIN_PANEL_WIDTH, newWidth),\n ),\n }));\n } else if (resizing?.[1] === \"y\") {\n const diff = e.clientY - (resizePosition?.y ?? e.clientY);\n const newHeight =\n panelSize.height + (resizing === \"ty\" ? -diff : diff) * 1;\n\n setPanelSize((p) => ({\n ...p,\n height: Math.min(\n getMaxPanelHeight(placement),\n Math.max(MIN_PANEL_HEIGHT, newHeight),\n ),\n }));\n }\n };\n\n if (resizing !== null) {\n window.addEventListener(\"mousemove\", handleMouseMove);\n\n return () => {\n window.removeEventListener(\"mousemove\", handleMouseMove);\n };\n }\n\n return;\n }, [resizing, placement]);\n\n return (\n <div\n style={{\n position: \"absolute\",\n borderRadius: \"8px\",\n boxShadow: \"0 0 10px rgba(0, 0, 0, 0.5)\",\n border: \"1px solid rgba(0, 0, 0, 0.5)\",\n transitionProperty: \"transform, opacity\",\n transitionTimingFunction: \"ease-in-out\",\n transitionDuration: \"0.2s\",\n ...getPanelPosition(placement),\n opacity: visible ? 1 : 0,\n transform: `${\n getPanelPosition(placement).transform\n } ${getPanelToggleTransforms(visible ?? false)}`,\n ...panelSize,\n }}\n onMouseEnter={() => {\n setHover(true);\n }}\n onMouseLeave={() => {\n setHover(false);\n }}\n >\n {children({ resizing })}\n {/* */}\n <React.Fragment>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: \"50%\",\n width: \"10px\",\n height: \"26px\",\n transform: \"translateY(-13px) translateX(-5px)\",\n cursor: \"col-resize\",\n transition: \"opacity ease-in-out 0.2s\",\n pointerEvents: hover || resizing ? \"auto\" : \"none\",\n opacity: hover || resizing ? 1 : 0,\n }}\n onMouseDown={(event) => {\n setResizing(\"lx\");\n setResizePosition({\n x: event.clientX,\n y: event.clientY,\n });\n\n event.preventDefault();\n }}\n >\n <ResizeHandleIcon />\n </div>\n <div\n style={{\n position: \"absolute\",\n right: 0,\n top: \"50%\",\n width: \"10px\",\n height: \"26px\",\n transform: `translateY(-13px) translateX(5px)`,\n cursor: \"col-resize\",\n transition: \"opacity ease-in-out 0.2s\",\n pointerEvents: hover || resizing ? \"auto\" : \"none\",\n opacity: hover || resizing ? 1 : 0,\n }}\n onMouseDown={(event) => {\n setResizing(\"rx\");\n setResizePosition({\n x: event.clientX,\n y: event.clientY,\n });\n\n event.preventDefault();\n }}\n >\n <ResizeHandleIcon />\n </div>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: 0,\n width: \"26px\",\n height: \"10px\",\n transform: \"translateY(-5px) translateX(-13px)\",\n cursor: \"row-resize\",\n transition: \"opacity ease-in-out 0.2s\",\n pointerEvents: hover || resizing ? \"auto\" : \"none\",\n opacity: hover || resizing ? 1 : 0,\n }}\n onMouseDown={(event) => {\n setResizing(\"ty\");\n setResizePosition({\n x: event.clientX,\n y: event.clientY,\n });\n\n event.preventDefault();\n }}\n >\n <ResizeHandleIcon\n style={{\n transform: \"rotate(90deg)\",\n transformOrigin: \"13px 13px\",\n }}\n />\n </div>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n bottom: 0,\n width: \"26px\",\n height: \"10px\",\n transform: \"translateY(5px) translateX(-13px)\",\n cursor: \"row-resize\",\n transition: \"opacity ease-in-out 0.2s\",\n pointerEvents: hover || resizing ? \"auto\" : \"none\",\n opacity: hover || resizing ? 1 : 0,\n }}\n onMouseDown={(event) => {\n setResizing(\"by\");\n setResizePosition({\n x: event.clientX,\n y: event.clientY,\n });\n\n event.preventDefault();\n }}\n >\n <ResizeHandleIcon\n style={{\n transform: \"rotate(90deg)\",\n transformOrigin: \"13px 13px\",\n }}\n />\n </div>\n </React.Fragment>\n </div>\n );\n};\n","import { Placement } from \"src/interfaces/placement\";\n\nexport const getPanelToggleTransforms = (visible: boolean) => {\n return visible ? \"scaleX(1) translateY(0)\" : `scaleX(0) translateY(25vw)`;\n};\n\nexport const SIZE = 50;\nexport const BUFFER = 10;\n\nconst PREFERRED_DEFAULT_WIDTH = () =>\n typeof window !== \"undefined\" ? window.innerWidth * 0.7 : 1440 * 0.7; // 70% of window width\nconst PREFERRED_DEFAULT_HEIGHT = () =>\n typeof window !== \"undefined\" ? window.innerHeight * 0.7 : 900 * 0.7; // 70% of window height\n\nexport const MIN_PANEL_WIDTH = 640;\nexport const MIN_PANEL_HEIGHT = 360;\n\nexport const getPinButtonTransform = (hover?: boolean) => {\n return `translateY(${hover ? \"0\" : \"50%\"})`;\n};\n\nexport const getPanelPosition = (placement: Placement) => {\n switch (placement) {\n case \"left\":\n return {\n left: `calc(${SIZE}px + ${BUFFER}px)`,\n top: \"50%\",\n transform: \"translateY(-50%)\",\n };\n case \"right\":\n return {\n right: `calc(${SIZE}px + ${BUFFER}px)`,\n top: \"50%\",\n transform: \"translateY(-50%)\",\n };\n case \"top\":\n return {\n left: \"50%\",\n top: `calc(${SIZE}px + ${BUFFER}px)`,\n transform: \"translateX(-50%)\",\n };\n default:\n case \"bottom\":\n return {\n left: \"50%\",\n bottom: `calc(${SIZE}px + ${BUFFER}px)`,\n transform: \"translateX(-50%)\",\n };\n }\n};\n\nexport const getMaxPanelWidth = (placement: Placement) => {\n switch (placement) {\n case \"left\":\n case \"right\":\n return (\n -BUFFER -\n SIZE -\n BUFFER +\n (typeof window !== \"undefined\" ? window.innerWidth : 1440) -\n BUFFER\n );\n case \"top\":\n case \"bottom\":\n return (\n -BUFFER +\n (typeof window !== \"undefined\" ? window.innerWidth : 1440) -\n BUFFER\n );\n }\n};\n\nexport const getMaxPanelHeight = (placement: Placement) => {\n switch (placement) {\n case \"left\":\n case \"right\":\n return (\n -BUFFER +\n (typeof window !== \"undefined\" ? window.innerHeight : 900) -\n BUFFER\n );\n case \"top\":\n case \"bottom\":\n return (\n -BUFFER -\n SIZE -\n BUFFER +\n (typeof window !== \"undefined\" ? window.innerHeight : 900) -\n BUFFER\n );\n }\n};\n\nexport const getDefaultPanelSize = (\n placement: Placement,\n preferredSize?: { width: number; height: number },\n): { width: number; height: number } => {\n const defaultPreferred = {\n width: PREFERRED_DEFAULT_WIDTH(),\n height: PREFERRED_DEFAULT_HEIGHT(),\n };\n\n const maxPanelWidth = getMaxPanelWidth(placement);\n const maxPanelHeight = getMaxPanelHeight(placement);\n\n const width = Math.min(\n maxPanelWidth,\n (preferredSize ?? defaultPreferred).width,\n );\n const height = Math.min(\n maxPanelHeight,\n (preferredSize ?? defaultPreferred).height,\n );\n\n return {\n width: width,\n height: height,\n };\n};\n","import React from \"react\";\n\nexport const ResizeHandleIcon = (props: React.SVGProps<SVGSVGElement>) => (\n <svg\n width={10}\n height={26}\n viewBox=\"0 0 10 26\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <rect x={0.5} y={0.5} width={9} height={25} rx={4.5} fill=\"#1D1E30\" />\n <path\n d=\"M7 5C7 6.10457 6.10457 7 5 7C3.89543 7 3 6.10457 3 5C3 3.89543 3.89543 3 5 3C6.10457 3 7 3.89543 7 5Z\"\n fill=\"#303450\"\n />\n <path\n d=\"M7 13C7 14.1046 6.10457 15 5 15C3.89543 15 3 14.1046 3 13C3 11.8954 3.89543 11 5 11C6.10457 11 7 11.8954 7 13Z\"\n fill=\"#303450\"\n />\n <path\n d=\"M7 21C7 22.1046 6.10457 23 5 23C3.89543 23 3 22.1046 3 21C3 19.8954 3.89543 19 5 19C6.10457 19 7 19.8954 7 21Z\"\n fill=\"#303450\"\n />\n <rect x={0.5} y={0.5} width={9} height={25} rx={4.5} stroke=\"#303450\" />\n </svg>\n);\n","import React from \"react\";\nimport { DevToolsContextProvider } from \"@refinedev/devtools-shared\";\n\nexport const DevtoolsProvider =\n __DEV_CONDITION__ !== \"development\"\n ? ({ children }: React.PropsWithChildren) => children as any\n : ({ children }: React.PropsWithChildren) => {\n return (\n <DevToolsContextProvider>{children}</DevToolsContextProvider>\n );\n };\n"],"mappings":"AAAA,OAAOA,MAAW,QCAlB,OAAOC,MAAW,QCAlB,OAAOC,MAAW,QAClB,OAAS,gBAAAC,OAAoB,YCD7B,OACI,uBAAAC,EACA,uBAAAC,EACA,wBAAAC,GACA,0BAAAC,GACA,oBAAAC,EACA,oBAAAC,MACG,8BACP,OAAS,mBAAAC,OAAuB,6BAChC,OAAOC,OAAc,kBACrB,OAAOC,MAAW,QAIX,IAAMC,EAAeC,GAAoB,CAC5C,GAAM,CAAE,YAAAC,CAAY,EAAIH,EAAM,WAAWF,EAAe,EAClD,CAACM,EAAYC,CAAa,EAAIL,EAAM,SAAmB,CAAC,CAAC,EAE/DA,EAAM,UAAU,IAAM,CACdE,GACA,MACI,GACIC,GA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AAS,IAAMP,EAAYQ,GAAM,CAACA,CAAC,EACnC,oBAAqBJ,EACrB,eAAgBE,EACpB,EACAR,EAAA,cAACW,EAAA,CAAc,QAASV,EAAS,UAAWE,GACvC,CAAC,CAAE,SAAAS,CAAS,IACTZ,EAAA,cAAC,UACG,MAAM,mBACN,IAAKI,EACL,OACIA,EACM,OACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAQV,MAAO,CACH,MAAO,OACP,OAAQ,OACR,OAAQ,OACR,aAAc,MACd,cAAeQ,EAAW,OAAS,OACnC,WAAY,SAChB,EACJ,CAER,CACJ,EA7CO,IA+Cf,EY9FV,OAAOC,OAAW,QAClB,OAAS,2BAAAC,OAA+B,6BAEjC,IAAMC,GACT,uBAAsB,cAChB,CAAC,CAAE,SAAAC,CAAS,IAA+BA,EAC3C,CAAC,CAAE,SAAAA,CAAS,IAEJH,GAAA,cAACC,GAAA,KAAyBE,CAAS","names":["React","React","React","createPortal","getElementFromFiber","getFiberFromElement","getFirstFiberHasName","getFirstStateNodeFiber","getNameFromFiber","getParentOfFiber","DevToolsContext","debounce","React","useSelector","active","devtoolsUrl","traceItems","setTraceItems","res","data","selectedFiber","setSelectedFiber","activeFiber","setActiveFiber","selectAppropriateFiber","start","fiber","firstParentOfNodeWithName","fiberWithStateNode","acceptedName","pickFiber","target","previousValues","rect","name","_a","element","fiberName","bounding","listener","e","parent","fibers","previousTarget","React","React","ArrowUnionIcon","props","Y_OFFSET","X_OFFSET","SelectorBox","width","height","x","y","name","namePosition","outlinePosition","React","ArrowUnionIcon","React","SelectorHint","active","DevtoolsSelector","onSelectorOpen","onHighlight","icon","style","hover","setHover","React","active","setActive","rect","name","useSelector","selectorBoxRoot","setSelectorBoxRoot","element","onMouseClick","e","event","_a","SelectorHint","createPortal","SelectorBox","React","DevtoolsIcon","props","React","SelectorButtonIcon","props","DevtoolsPin","onClick","onSelectorHighlight","onSelectorOpen","hover","setHover","React","DevtoolsIcon","DevtoolsSelector","SelectorButtonIcon","React","getPanelToggleTransforms","visible","SIZE","BUFFER","PREFERRED_DEFAULT_WIDTH","PREFERRED_DEFAULT_HEIGHT","MIN_PANEL_WIDTH","MIN_PANEL_HEIGHT","getPanelPosition","placement","SIZE","BUFFER","getMaxPanelWidth","getMaxPanelHeight","getDefaultPanelSize","preferredSize","defaultPreferred","PREFERRED_DEFAULT_WIDTH","PREFERRED_DEFAULT_HEIGHT","maxPanelWidth","maxPanelHeight","width","height","React","ResizeHandleIcon","props","ResizablePane","placement","visible","children","hover","setHover","React","resizing","setResizing","resizePosition","setResizePosition","panelSize","setPanelSize","getDefaultPanelSize","handleResize","p","handleMouseUp","currentCursor","handleMouseMove","e","diff","newWidth","getMaxPanelWidth","MIN_PANEL_WIDTH","newHeight","getMaxPanelHeight","MIN_PANEL_HEIGHT","getPanelPosition","getPanelToggleTransforms","event","ResizeHandleIcon","DevToolsContext","DevtoolsEvent","send","DevtoolsPanel","browser","setBrowser","React","visible","setVisible","placement","devtoolsUrl","ws","onSelectorHighlight","name","onSelectorOpen","DevtoolsPin","v","ResizablePane","resizing","React","DevToolsContextProvider","DevtoolsProvider","children"]}
|
package/dist/iife/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(()=>{var ge=Object.create;var W=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Ee=Object.prototype.hasOwnProperty;var h=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Se=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of be(t))!Ee.call(e,r)&&r!==n&&W(e,r,{get:()=>t[r],enumerable:!(i=xe(t,r))||i.enumerable});return e};var v=(e,t,n)=>(n=e!=null?ge(we(e)):{},Se(t||!e||!e.__esModule?W(n,"default",{value:e,enumerable:!0}):n,e));var H=ye((Ge,q)=>{var De=Object.create,_=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,Oe=Object.getOwnPropertyNames,Fe=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty,Te=(e,t)=>{for(var n in t)_(e,n,{get:t[n],enumerable:!0})},X=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Oe(t))!Ce.call(e,r)&&r!==n&&_(e,r,{get:()=>t[r],enumerable:!(i=Pe(t,r))||i.enumerable});return e},Me=(e,t,n)=>(n=e!=null?De(Fe(e)):{},X(t||!e||!e.__esModule?_(n,"default",{value:e,enumerable:!0}):n,e)),Le=e=>X(_({},"__esModule",{value:!0}),e),Y={};Te(Y,{DevToolsContext:()=>J,DevToolsContextProvider:()=>_e,DevtoolsEvent:()=>z,hooksByScope:()=>Ne,receive:()=>j,scopes:()=>$,send:()=>U});q.exports=Le(Y);var z=(e=>(e.RELOAD="devtools:reload",e.DEVTOOLS_INIT="devtools:init",e.DEVTOOLS_HANDSHAKE="devtools:handshake",e.DEVTOOLS_ALREADY_CONNECTED="devtools:already-connected",e.ACTIVITY="devtools:send-activity",e.DEVTOOLS_ACTIVITY_UPDATE="devtools:activity-update",e.DEVTOOLS_CONNECTED_APP="devtools:connected-app",e.DEVTOOLS_DISCONNECTED_APP="devtools:disconnected-app",e.DEVTOOLS_HIGHLIGHT_IN_MONITOR="devtools:highlight-in-monitor",e.DEVTOOLS_HIGHLIGHT_IN_MONITOR_ACTION="devtools:highlight-in-monitor-action",e.DEVTOOLS_LOGIN_SUCCESS="devtools:login-success",e.DEVTOOLS_RELOAD_AFTER_LOGIN="devtools:reload-after-login",e))(z||{}),$={useCan:"access-control",useLog:"audit-log",useLogList:"audit-log",useCreate:"data",useCreateMany:"data",useCustom:"data",useCustomMutation:"data",useDelete:"data",useDeleteMany:"data",useInfiniteList:"data",useList:"data",useMany:"data",useOne:"data",useUpdate:"data",useUpdateMany:"data",useForgotPassword:"auth",useGetIdentity:"auth",useIsAuthenticated:"auth",useLogin:"auth",useLogout:"auth",useOnError:"auth",usePermissions:"auth",useRegister:"auth",useUpdatePassword:"auth"},Ne=Object.entries($).reduce((e,[t,n])=>(e[n]||(e[n]=[]),e[n].push(t),e),{}),C=Me(h("react"));async function U(e,t,n){if(e.readyState!==e.OPEN){await new Promise(i=>{let r=()=>{e.send(JSON.stringify({event:t,payload:n})),i(),e.removeEventListener("open",r)};e.addEventListener("open",r)});return}else{e.send(JSON.stringify({event:t,payload:n}));return}}function j(e,t,n){let i=r=>{let{event:o,payload:s}=JSON.parse(r.data);t===o&&n(s)};return e.addEventListener("message",i),()=>{e.removeEventListener("message",i)}}var J=C.default.createContext({__devtools:!1,port:5002,url:"localhost",secure:!1,ws:null}),_e=({__devtools:e,port:t,children:n})=>{let[i,r]=C.default.useState({__devtools:e??!1,port:t??5002,url:"localhost",secure:!1,ws:null}),[o,s]=C.default.useState(null);C.default.useEffect(()=>{let g=new WebSocket(`${i.secure?"wss":"ws"}://localhost:${i.port}`),x=j(g,"devtools:handshake",f=>{r(a=>({...a,devtoolsUrl:f.url})),x()});return g.addEventListener("open",()=>{i.__devtools||U(g,"devtools:init",{url:window.location.origin})}),s(g),()=>{x(),g.close(1e3,window.location.origin)}},[]);let c=C.default.useMemo(()=>({...i,ws:o}),[i,o]);return C.default.createElement(J.Provider,{value:c},n)}});var D=v(h("react"));var T=v(h("react"));var S=v(h("react")),se=h("react-dom");var w=h("@aliemir/dom-to-fiber-utils"),K=v(H()),Q=v(h("lodash/debounce")),b=v(h("react")),ee=e=>{let{devtoolsUrl:t}=b.default.useContext(K.DevToolsContext),[n,i]=b.default.useState([]);b.default.useEffect(()=>{e&&fetch(`${t??"http://localhost:5001"}/api/unique-trace-items`).then(l=>l.json().then(d=>i(d.data)))},[e,t]);let[r,o]=b.default.useState({stateNode:null,nameFiber:null}),[s,c]=b.default.useState({stateNode:null,nameFiber:null,derived:!1});b.default.useEffect(()=>e?()=>{o({stateNode:null,nameFiber:null}),c({stateNode:null,nameFiber:null,derived:!1})}:()=>0,[e]);let g=b.default.useCallback(l=>{let d=l,u,y,A=!1;for(;!A&&d;)u=(0,w.getFirstFiberHasName)(d),y=(0,w.getFirstStateNodeFiber)(u),A=n.includes((0,w.getNameFromFiber)(u)??""),A||(d=(0,w.getParentOfFiber)(d));return y&&u?{stateNode:y,nameFiber:u}:{stateNode:null,nameFiber:null}},[n]),x=b.default.useCallback(l=>{let d=(0,w.getFiberFromElement)(l);o(g(d))},[n]);b.default.useEffect(()=>{(s.stateNode!==r.stateNode||s.nameFiber!==r.nameFiber)&&c({stateNode:r.stateNode,nameFiber:r.nameFiber,derived:!1})},[r]);let f=b.default.useRef({rect:{width:0,height:0,x:0,y:0},name:""}),{rect:a,name:m}=b.default.useMemo(()=>{var l;if(!e)return{rect:{width:0,height:0,x:0,y:0},name:""};if(s.stateNode||s.nameFiber){let d=s.stateNode?(0,w.getElementFromFiber)(s.stateNode):null,u=s.nameFiber?(0,w.getNameFromFiber)(s.nameFiber):null;if(!d)return{rect:f.current.rect,name:u??f.current.name};let y=(l=d.getBoundingClientRect)==null?void 0:l.call(d);return y?{rect:{width:y.width,height:y.height,x:y.left,y:y.top},name:u??f.current.name}:{rect:f.current.rect,name:u??f.current.name}}return f.current},[s,e]);return f.current={rect:a,name:m},b.default.useEffect(()=>{if(e){let l=d=>{if(d.key==="Shift"&&s.stateNode){d.stopPropagation(),d.preventDefault();let u=(0,w.getParentOfFiber)(s.nameFiber),y=g(u);if(y.nameFiber&&y.stateNode){c({...y,derived:!0});return}}};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)}return()=>0},[s,e]),b.default.useEffect(()=>{if(e){let l=null,d=(0,Q.default)(u=>{if(u!=null&&u.target){if(l===u.target)return;x(u.target),l=u.target}},50);return document.addEventListener("mousemove",d),()=>document.removeEventListener("mousemove",d)}else return()=>0},[e,x]),{rect:a,name:m}};var I=v(h("react"));var P=v(h("react")),te=e=>P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},P.createElement("path",{fill:"#303450",stroke:"url(#arrow-union-icon)",d:"M.5 8.495V15.5h15V8.495a4.5 4.5 0 0 1-3.816-2.483L9.341 1.33c-.553-1.105-2.13-1.105-2.683 0L4.317 6.012A4.5 4.5 0 0 1 .5 8.495Z"}),P.createElement("defs",null,P.createElement("linearGradient",{id:"arrow-union-icon",x1:8,x2:8,y1:0,y2:10,gradientUnits:"userSpaceOnUse"},P.createElement("stop",{stopColor:"#474E6B"}),P.createElement("stop",{offset:.9,stopColor:"#474E6B"}),P.createElement("stop",{offset:.901,stopColor:"#474E6B",stopOpacity:0}))));var oe=38,ne=7,re=({width:e,height:t,x:n,y:i,name:r})=>{let o=i>oe?"top":t>3*oe?"inset":"bottom",s=n>ne&&i>ne?"outside":"inside";return I.default.createElement("div",{id:"selector-box",style:{pointerEvents:"none",position:"fixed",opacity:r?1:0,transitionProperty:"width, height, transform, opacity",transitionDuration:"0.15s",transitionTimingFunction:"ease-out",border:"1.5px solid #47EBEB",borderRadius:"4px",background:"rgba(37,160,160, 0.25)",backdropFilter:"sepia(30%) hue-rotate(180deg)",zIndex:99998,...s==="outside"?{left:-6,top:-6,width:e+10,height:t+10,transform:`translate(${n}px, ${i}px)`}:{left:0,top:0,width:e-10,height:t-20,transform:`translate(${n+4}px, ${i+4}px)`}}},I.default.createElement("div",{style:{position:"absolute",left:"-1.5px",background:"#303450",border:"1px solid #474E6B",borderRadius:"4px",padding:"8px 12px",fontSize:"12px",lineHeight:"16px",fontWeight:400,color:"#ffffff",display:r?"block":"none",...o==="top"&&{top:"-38px"},...o==="bottom"&&{bottom:"-38px"},...o==="inset"&&{top:"4px",left:"8px"}}},r,I.default.createElement(te,{style:{position:"absolute",left:"30%",...o==="top"&&{transform:"translateX(-50%) rotate(180deg)",bottom:"-9px"},...o==="bottom"&&{transform:"translateX(-50%) ",top:"-9px"},...o==="inset"&&{transform:"translateX(-50%) rotate(-90deg)",top:"8px",left:"-1px"},display:r?"block":"none"}})))};var V=v(h("react")),ie=({active:e})=>V.default.createElement("div",{style:{color:"white",pointerEvents:"none",position:"absolute",left:"calc(-50% - 144px - 14px)",top:"-36px",width:"max-content",borderRadius:"8px",backgroundColor:"#40414A",opacity:e?1:0,transitionDuration:"0.2s",transitionProperty:"transform,opacity",transitionTimingFunction:"ease-in-out",padding:"8px",fontSize:"12px",lineHeight:"12px",fontWeight:400,textShadow:"0 0 2px #1D1E30, 1px 0 2px #1D1E30, -1px 0 2px #1D1E30, 0 1px 2px #1D1E30, 0 -1px 2px #1D1E30"}},V.default.createElement("kbd",{style:{marginLeft:"4px",padding:"2px 4px",borderRadius:"2px",background:"#1D1E30",color:"#CFD7E2",border:"none",textShadow:"none"}},"shift")," ","to move to parent.",V.default.createElement("kbd",{style:{marginLeft:"4px",padding:"2px 4px",borderRadius:"2px",background:"#1D1E30",color:"#CFD7E2",border:"none",textShadow:"none"}},"space")," ","to highlight in monitor.");var ae=({onSelectorOpen:e,onHighlight:t,icon:n,style:i})=>{let[r,o]=S.default.useState(!1),[s,c]=S.default.useState(!1),{rect:g,name:x}=ee(s),[f,a]=S.default.useState(null);return S.default.useEffect(()=>{if(!f){let m=document.createElement("div");m.id="selector-box-root",document.body.appendChild(m),a(m)}},[]),S.default.useEffect(()=>{s?document.body.style.cursor="crosshair":document.body.style.cursor="default"},[s]),S.default.useEffect(()=>{let m=l=>{s&&x&&(l==null||l.preventDefault(),l==null||l.stopPropagation(),l.stopImmediatePropagation(),t(x),c(!1))};return s?(document.addEventListener("click",m,{capture:!0}),()=>{document.removeEventListener("click",m,{capture:!0})}):()=>0},[x,t,s]),S.default.useEffect(()=>{s&&e()},[s,e]),S.default.createElement("div",{style:i},S.default.createElement("div",{role:"button",title:"Element Selector",onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),onClick:m=>{var l;m.preventDefault(),m.stopPropagation(),(l=document==null?void 0:document.activeElement)==null||l.blur(),c(d=>!d)},style:{padding:0,margin:0,height:"100%",width:"100%",transform:r?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out"}},n),S.default.createElement(ie,{active:s}),s&&f&&(0,se.createPortal)(S.default.createElement(re,{...g,name:x}),f))};var O=v(h("react")),le=e=>O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:157,height:25,viewBox:"0 0 157 25",fill:"none",...e},O.createElement("g",{filter:"url(#devtools-panel)"},O.createElement("path",{fill:"#1D1E30",d:"M17 1h123v24H17z"}),O.createElement("path",{fill:"#1D1E30",d:"M6.265 9.205A12 12 0 0 1 17.649 1H25v24H1L6.265 9.205ZM150.735 9.205A12 12 0 0 0 139.351 1H132v24h24l-5.265-15.795Z"}),O.createElement("path",{fill:"currentColor",d:"M25 14.333A1.333 1.333 0 1 1 25 17a1.333 1.333 0 0 1 0-2.667Z"}),O.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M23.211 20.578a4 4 0 0 0 3.578 0l4-2A4 4 0 0 0 33 15v-4a4 4 0 0 0-2.211-3.578l-4-2a4 4 0 0 0-3.578 0l-4 2A4 4 0 0 0 17 11v4a4 4 0 0 0 2.211 3.578l4 2Zm-.878-4.911a2.667 2.667 0 0 0 5.334 0v-5.334a2.667 2.667 0 0 0-5.334 0v5.334Z",clipRule:"evenodd"}),O.createElement("path",{fill:"#CFD7E2",d:"M42.152 17a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h4.2c.288 0 .56.056.816.168a2.135 2.135 0 0 1 1.14 1.128c.112.256.168.532.168.828v3.984c0 .296-.056.572-.168.828a2.135 2.135 0 0 1-1.14 1.128 2.014 2.014 0 0 1-.816.168h-4.2Zm1.38-1.644h2.82a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-3.984a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.82v4.944Zm13.18-5.196a.244.244 0 0 1-.253.252h-4.44v1.656h4.02c.072 0 .132.024.18.072a.227.227 0 0 1 .084.18v1.128a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072h-4.02v1.644h4.44c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-5.832a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h5.832c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.128ZM63.014 17h-2.232a.387.387 0 0 1-.216-.072.356.356 0 0 1-.144-.168l-1.716-4.296a.853.853 0 0 1-.072-.24 1.783 1.783 0 0 1-.024-.264V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h1.128c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v2.616c0 .072.008.156.024.252s.04.176.072.24l1.284 3.216h.528l1.284-3.216a.853.853 0 0 0 .072-.24c.016-.096.024-.18.024-.252V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.128c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v2.928c0 .072-.008.16-.024.264a.853.853 0 0 1-.072.24l-1.716 4.296a.356.356 0 0 1-.144.168.387.387 0 0 1-.216.072ZM73.29 8.768c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v1.128a.227.227 0 0 1-.084.18.244.244 0 0 1-.18.072h-2.208v6.324a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072H69.69a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192v-6.324H67.23a.287.287 0 0 1-.192-.072.244.244 0 0 1-.072-.18V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h6.06Zm6.507.012c.296 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.296 0-.572-.056-.828-.168a2.171 2.171 0 0 1-1.128-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.128-1.128c.256-.112.532-.168.828-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.336-.132h-2.34a.497.497 0 0 0-.348.132.455.455 0 0 0-.132.336v3.996c0 .136.044.248.132.336a.497.497 0 0 0 .348.132h2.34a.455.455 0 0 0 .336-.132.436.436 0 0 0 .144-.336v-3.996Zm7.888-2.112c.295 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.297 0-.573-.056-.829-.168a2.171 2.171 0 0 1-1.127-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.127-1.128c.257-.112.532-.168.829-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.337-.132h-2.34a.497.497 0 0 0-.347.132.455.455 0 0 0-.133.336v3.996c0 .136.044.248.133.336a.497.497 0 0 0 .347.132h2.34a.455.455 0 0 0 .337-.132.436.436 0 0 0 .143-.336v-3.996ZM98.294 17H92.68a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v6.324h4.236c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072Zm7.336-5.76a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192v-.084a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.352a.46.46 0 0 0-.336.144.455.455 0 0 0-.132.336v.696c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v.696c0 .296-.056.572-.168.828a2.171 2.171 0 0 1-1.128 1.128 2.014 2.014 0 0 1-.816.168h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.043 2.043 0 0 1-.168-.828v-.084c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v.084c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-.696a.455.455 0 0 0-.132-.336.455.455 0 0 0-.336-.132h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.099 2.099 0 0 1-.168-.828v-.696c0-.296.056-.572.168-.828a2.171 2.171 0 0 1 1.128-1.128c.256-.112.528-.168.816-.168h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.532.168.828v.084a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-1.128Z"})));var k=v(h("react")),de=e=>k.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},k.default.createElement("path",{fill:"#0FBDBD",fillRule:"evenodd",d:"M9 1a1 1 0 0 0-2 0v2.1A5.006 5.006 0 0 0 3.1 7H1a1 1 0 0 0 0 2h2.1A5.006 5.006 0 0 0 7 12.9V15a1 1 0 1 0 2 0v-2.1A5.006 5.006 0 0 0 12.9 9H15a1 1 0 1 0 0-2h-2.1A5.006 5.006 0 0 0 9 3.1V1Zm2 7a3 3 0 1 0-6 0 3 3 0 0 0 6 0Z",clipRule:"evenodd"}));var ue=({onClick:e,onSelectorHighlight:t,onSelectorOpen:n})=>{let[i,r]=T.default.useState(!1);return T.default.createElement("div",{onMouseOver:()=>r(!0),onMouseOut:()=>r(!1),style:{position:"relative",userSelect:"none",WebkitUserSelect:"none",background:"none",border:"none",padding:0,margin:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:i?"#0FBDBD":"#6C7793",transition:"color 0.1s ease-in-out"},onClick:e},T.default.createElement(le,null),T.default.createElement(ae,{style:{position:"absolute",top:5,right:18,width:"16px",height:"16px"},icon:T.default.createElement(de,{width:16,height:16,style:{pointerEvents:"none"}}),onSelectorOpen:n,onHighlight:t}))};var p=v(h("react"));var ce=e=>e?"scaleX(1) translateY(0)":"scaleX(0) translateY(25vw)",M=50,E=10,He=()=>typeof window<"u"?window.innerWidth*.7:1440*.7,Ie=()=>typeof window<"u"?window.innerHeight*.7:900*.7,pe=640,me=360;var G=e=>{switch(e){case"left":return{left:`calc(${M}px + ${E}px)`,top:"50%",transform:"translateY(-50%)"};case"right":return{right:`calc(${M}px + ${E}px)`,top:"50%",transform:"translateY(-50%)"};case"top":return{left:"50%",top:`calc(${M}px + ${E}px)`,transform:"translateX(-50%)"};default:case"bottom":return{left:"50%",bottom:`calc(${M}px + ${E}px)`,transform:"translateX(-50%)"}}},R=e=>{switch(e){case"left":case"right":return-E-M-E+(typeof window<"u"?window.innerWidth:1440)-E;case"top":case"bottom":return-E+(typeof window<"u"?window.innerWidth:1440)-E}},B=e=>{switch(e){case"left":case"right":return-E+(typeof window<"u"?window.innerHeight:900)-E;case"top":case"bottom":return-E-M-E+(typeof window<"u"?window.innerHeight:900)-E}},Z=(e,t)=>{let n={width:He(),height:Ie()},i=R(e),r=B(e),o=Math.min(i,(t??n).width),s=Math.min(r,(t??n).height);return{width:o,height:s}};var F=v(h("react")),N=e=>F.default.createElement("svg",{width:10,height:26,viewBox:"0 0 10 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},F.default.createElement("rect",{x:.5,y:.5,width:9,height:25,rx:4.5,fill:"#1D1E30"}),F.default.createElement("path",{d:"M7 5C7 6.10457 6.10457 7 5 7C3.89543 7 3 6.10457 3 5C3 3.89543 3.89543 3 5 3C6.10457 3 7 3.89543 7 5Z",fill:"#303450"}),F.default.createElement("path",{d:"M7 13C7 14.1046 6.10457 15 5 15C3.89543 15 3 14.1046 3 13C3 11.8954 3.89543 11 5 11C6.10457 11 7 11.8954 7 13Z",fill:"#303450"}),F.default.createElement("path",{d:"M7 21C7 22.1046 6.10457 23 5 23C3.89543 23 3 22.1046 3 21C3 19.8954 3.89543 19 5 19C6.10457 19 7 19.8954 7 21Z",fill:"#303450"}),F.default.createElement("rect",{x:.5,y:.5,width:9,height:25,rx:4.5,stroke:"#303450"}));var fe=({placement:e,visible:t,children:n})=>{let[i,r]=p.default.useState(!1),[o,s]=p.default.useState(null),[c,g]=p.default.useState(null),[x,f]=p.default.useState(Z(e));return p.default.useEffect(()=>{let a=()=>{f(m=>Z(e,m))};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[e]),p.default.useEffect(()=>{let a=()=>{s(null)};if(o!==null)return window.addEventListener("mouseup",a),()=>{window.removeEventListener("mouseup",a)}},[o]),p.default.useEffect(()=>{let a=document.body.style.cursor;return o!=null&&o.includes("x")?document.body.style.cursor="col-resize":o!=null&&o.includes("y")&&(document.body.style.cursor="row-resize"),()=>{document.body.style.cursor=a}},[o]),p.default.useEffect(()=>{let a=m=>{if((o==null?void 0:o[1])==="x"){let l=m.clientX-((c==null?void 0:c.x)??m.clientX),d=x.width+(o==="lx"?-l:l)*2;f(u=>({...u,width:Math.min(R(e),Math.max(pe,d))}))}else if((o==null?void 0:o[1])==="y"){let l=m.clientY-((c==null?void 0:c.y)??m.clientY),d=x.height+(o==="ty"?-l:l)*1;f(u=>({...u,height:Math.min(B(e),Math.max(me,d))}))}};if(o!==null)return window.addEventListener("mousemove",a),()=>{window.removeEventListener("mousemove",a)}},[o,e]),p.default.createElement("div",{style:{position:"absolute",borderRadius:"8px",boxShadow:"0 0 10px rgba(0, 0, 0, 0.5)",border:"1px solid rgba(0, 0, 0, 0.5)",transitionProperty:"transform, opacity",transitionTimingFunction:"ease-in-out",transitionDuration:"0.2s",...G(e),opacity:t?1:0,transform:`${G(e).transform} ${ce(t??!1)}`,...x},onMouseEnter:()=>{r(!0)},onMouseLeave:()=>{r(!1)}},n({resizing:o}),p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{style:{position:"absolute",left:0,top:"50%",width:"10px",height:"26px",transform:"translateY(-13px) translateX(-5px)",cursor:"col-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:i||o?"auto":"none",opacity:i||o?1:0},onMouseDown:a=>{s("lx"),g({x:a.clientX,y:a.clientY}),a.preventDefault()}},p.default.createElement(N,null)),p.default.createElement("div",{style:{position:"absolute",right:0,top:"50%",width:"10px",height:"26px",transform:"translateY(-13px) translateX(5px)",cursor:"col-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:i||o?"auto":"none",opacity:i||o?1:0},onMouseDown:a=>{s("rx"),g({x:a.clientX,y:a.clientY}),a.preventDefault()}},p.default.createElement(N,null)),p.default.createElement("div",{style:{position:"absolute",left:"50%",top:0,width:"26px",height:"10px",transform:"translateY(-5px) translateX(-13px)",cursor:"row-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:i||o?"auto":"none",opacity:i||o?1:0},onMouseDown:a=>{s("ty"),g({x:a.clientX,y:a.clientY}),a.preventDefault()}},p.default.createElement(N,{style:{transform:"rotate(90deg)",transformOrigin:"13px 13px"}})),p.default.createElement("div",{style:{position:"absolute",left:"50%",bottom:0,width:"26px",height:"10px",transform:"translateY(5px) translateX(-13px)",cursor:"row-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:i||o?"auto":"none",opacity:i||o?1:0},onMouseDown:a=>{s("by"),g({x:a.clientX,y:a.clientY}),a.preventDefault()}},p.default.createElement(N,{style:{transform:"rotate(90deg)",transformOrigin:"13px 13px"}}))))};var L=v(H()),Ve=process.env.NODE_ENV!=="development"?()=>null:()=>{let[e,t]=D.default.useState(!1),[n]=D.default.useState("bottom"),{devtoolsUrl:i,ws:r}=D.default.useContext(L.DevToolsContext),o=D.default.useCallback(c=>{r&&(0,L.send)(r,L.DevtoolsEvent.DEVTOOLS_HIGHLIGHT_IN_MONITOR,{name:c}),t(!0)},[r]),s=D.default.useCallback(()=>{t(!1)},[]);return D.default.createElement("div",{style:{position:"fixed",left:"50%",transform:"translateX(-50%)",bottom:0,zIndex:99999}},D.default.createElement(ue,{onClick:()=>t(c=>!c),onSelectorHighlight:o,onSelectorOpen:s}),D.default.createElement(fe,{visible:e,placement:n},({resizing:c})=>D.default.createElement("iframe",{allow:"clipboard-write;",src:i,srcDoc:i?void 0:`
|
|
1
|
+
(()=>{var ge=Object.create;var W=Object.defineProperty;var xe=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Ee=Object.prototype.hasOwnProperty;var g=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Se=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of be(t))!Ee.call(e,i)&&i!==n&&W(e,i,{get:()=>t[i],enumerable:!(r=xe(t,i))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?ge(we(e)):{},Se(t||!e||!e.__esModule?W(n,"default",{value:e,enumerable:!0}):n,e));var H=ye((Ge,q)=>{var De=Object.create,_=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,Oe=Object.getOwnPropertyNames,Fe=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty,Te=(e,t)=>{for(var n in t)_(e,n,{get:t[n],enumerable:!0})},X=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Oe(t))!Ce.call(e,i)&&i!==n&&_(e,i,{get:()=>t[i],enumerable:!(r=Pe(t,i))||r.enumerable});return e},Me=(e,t,n)=>(n=e!=null?De(Fe(e)):{},X(t||!e||!e.__esModule?_(n,"default",{value:e,enumerable:!0}):n,e)),Le=e=>X(_({},"__esModule",{value:!0}),e),Y={};Te(Y,{DevToolsContext:()=>J,DevToolsContextProvider:()=>_e,DevtoolsEvent:()=>z,hooksByScope:()=>Ne,receive:()=>j,scopes:()=>$,send:()=>U});q.exports=Le(Y);var z=(e=>(e.RELOAD="devtools:reload",e.DEVTOOLS_INIT="devtools:init",e.DEVTOOLS_HANDSHAKE="devtools:handshake",e.DEVTOOLS_ALREADY_CONNECTED="devtools:already-connected",e.ACTIVITY="devtools:send-activity",e.DEVTOOLS_ACTIVITY_UPDATE="devtools:activity-update",e.DEVTOOLS_CONNECTED_APP="devtools:connected-app",e.DEVTOOLS_DISCONNECTED_APP="devtools:disconnected-app",e.DEVTOOLS_HIGHLIGHT_IN_MONITOR="devtools:highlight-in-monitor",e.DEVTOOLS_HIGHLIGHT_IN_MONITOR_ACTION="devtools:highlight-in-monitor-action",e.DEVTOOLS_LOGIN_SUCCESS="devtools:login-success",e.DEVTOOLS_RELOAD_AFTER_LOGIN="devtools:reload-after-login",e))(z||{}),$={useCan:"access-control",useLog:"audit-log",useLogList:"audit-log",useCreate:"data",useCreateMany:"data",useCustom:"data",useCustomMutation:"data",useDelete:"data",useDeleteMany:"data",useInfiniteList:"data",useList:"data",useMany:"data",useOne:"data",useUpdate:"data",useUpdateMany:"data",useForgotPassword:"auth",useGetIdentity:"auth",useIsAuthenticated:"auth",useLogin:"auth",useLogout:"auth",useOnError:"auth",usePermissions:"auth",useRegister:"auth",useUpdatePassword:"auth"},Ne=Object.entries($).reduce((e,[t,n])=>(e[n]||(e[n]=[]),e[n].push(t),e),{}),C=Me(g("react"));async function U(e,t,n){if(e.readyState!==e.OPEN){await new Promise(r=>{let i=()=>{e.send(JSON.stringify({event:t,payload:n})),r(),e.removeEventListener("open",i)};e.addEventListener("open",i)});return}else{e.send(JSON.stringify({event:t,payload:n}));return}}function j(e,t,n){let r=i=>{let{event:o,payload:s}=JSON.parse(i.data);t===o&&n(s)};return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}var J=C.default.createContext({__devtools:!1,port:5002,url:"localhost",secure:!1,ws:null}),_e=({__devtools:e,port:t,children:n})=>{let[r,i]=C.default.useState({__devtools:e??!1,port:t??5002,url:"localhost",secure:!1,ws:null}),[o,s]=C.default.useState(null);C.default.useEffect(()=>{let h=new WebSocket(`${r.secure?"wss":"ws"}://localhost:${r.port}`),c=j(h,"devtools:handshake",v=>{i(a=>({...a,devtoolsUrl:v.url})),c()});return h.addEventListener("open",()=>{r.__devtools||U(h,"devtools:init",{url:window.location.origin})}),s(h),()=>{c(),h.close(1e3,window.location.origin)}},[]);let f=C.default.useMemo(()=>({...r,ws:o}),[r,o]);return C.default.createElement(J.Provider,{value:f},n)}});var D=x(g("react"));var T=x(g("react"));var S=x(g("react")),se=g("react-dom");var w=g("@aliemir/dom-to-fiber-utils"),K=x(H()),Q=x(g("lodash/debounce")),b=x(g("react")),ee=e=>{let{devtoolsUrl:t}=b.default.useContext(K.DevToolsContext),[n,r]=b.default.useState([]);b.default.useEffect(()=>{e&&fetch(`${t??"http://localhost:5001"}/api/unique-trace-items`).then(l=>l.json().then(d=>r(d.data)))},[e,t]);let[i,o]=b.default.useState({stateNode:null,nameFiber:null}),[s,f]=b.default.useState({stateNode:null,nameFiber:null,derived:!1});b.default.useEffect(()=>e?()=>{o({stateNode:null,nameFiber:null}),f({stateNode:null,nameFiber:null,derived:!1})}:()=>0,[e]);let h=b.default.useCallback(l=>{let d=l,u,y,A=!1;for(;!A&&d;)u=(0,w.getFirstFiberHasName)(d),y=(0,w.getFirstStateNodeFiber)(u),A=n.includes((0,w.getNameFromFiber)(u)??""),A||(d=(0,w.getParentOfFiber)(d));return y&&u?{stateNode:y,nameFiber:u}:{stateNode:null,nameFiber:null}},[n]),c=b.default.useCallback(l=>{let d=(0,w.getFiberFromElement)(l);o(h(d))},[n]);b.default.useEffect(()=>{(s.stateNode!==i.stateNode||s.nameFiber!==i.nameFiber)&&f({stateNode:i.stateNode,nameFiber:i.nameFiber,derived:!1})},[i]);let v=b.default.useRef({rect:{width:0,height:0,x:0,y:0},name:""}),{rect:a,name:m}=b.default.useMemo(()=>{var l;if(!e)return{rect:{width:0,height:0,x:0,y:0},name:""};if(s.stateNode||s.nameFiber){let d=s.stateNode?(0,w.getElementFromFiber)(s.stateNode):null,u=s.nameFiber?(0,w.getNameFromFiber)(s.nameFiber):null;if(!d)return{rect:v.current.rect,name:u??v.current.name};let y=(l=d.getBoundingClientRect)==null?void 0:l.call(d);return y?{rect:{width:y.width,height:y.height,x:y.left,y:y.top},name:u??v.current.name}:{rect:v.current.rect,name:u??v.current.name}}return v.current},[s,e]);return v.current={rect:a,name:m},b.default.useEffect(()=>{if(e){let l=d=>{if(d.key==="Shift"&&s.stateNode){d.stopPropagation(),d.preventDefault();let u=(0,w.getParentOfFiber)(s.nameFiber),y=h(u);if(y.nameFiber&&y.stateNode){f({...y,derived:!0});return}}};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)}return()=>0},[s,e]),b.default.useEffect(()=>{if(e){let l=null,d=(0,Q.default)(u=>{if(u!=null&&u.target){if(l===u.target)return;c(u.target),l=u.target}},50);return document.addEventListener("mousemove",d),()=>document.removeEventListener("mousemove",d)}else return()=>0},[e,c]),{rect:a,name:m}};var I=x(g("react"));var P=x(g("react")),te=e=>P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},P.createElement("path",{fill:"#303450",stroke:"url(#arrow-union-icon)",d:"M.5 8.495V15.5h15V8.495a4.5 4.5 0 0 1-3.816-2.483L9.341 1.33c-.553-1.105-2.13-1.105-2.683 0L4.317 6.012A4.5 4.5 0 0 1 .5 8.495Z"}),P.createElement("defs",null,P.createElement("linearGradient",{id:"arrow-union-icon",x1:8,x2:8,y1:0,y2:10,gradientUnits:"userSpaceOnUse"},P.createElement("stop",{stopColor:"#474E6B"}),P.createElement("stop",{offset:.9,stopColor:"#474E6B"}),P.createElement("stop",{offset:.901,stopColor:"#474E6B",stopOpacity:0}))));var oe=38,ne=7,re=({width:e,height:t,x:n,y:r,name:i})=>{let o=r>oe?"top":t>3*oe?"inset":"bottom",s=n>ne&&r>ne?"outside":"inside";return I.default.createElement("div",{id:"selector-box",style:{pointerEvents:"none",position:"fixed",opacity:i?1:0,transitionProperty:"width, height, transform, opacity",transitionDuration:"0.15s",transitionTimingFunction:"ease-out",border:"1.5px solid #47EBEB",borderRadius:"4px",background:"rgba(37,160,160, 0.25)",backdropFilter:"sepia(30%) hue-rotate(180deg)",zIndex:99998,...s==="outside"?{left:-6,top:-6,width:e+10,height:t+10,transform:`translate(${n}px, ${r}px)`}:{left:0,top:0,width:e-10,height:t-20,transform:`translate(${n+4}px, ${r+4}px)`}}},I.default.createElement("div",{style:{position:"absolute",left:"-1.5px",background:"#303450",border:"1px solid #474E6B",borderRadius:"4px",padding:"8px 12px",fontSize:"12px",lineHeight:"16px",fontWeight:400,color:"#ffffff",display:i?"block":"none",...o==="top"&&{top:"-38px"},...o==="bottom"&&{bottom:"-38px"},...o==="inset"&&{top:"4px",left:"8px"}}},i,I.default.createElement(te,{style:{position:"absolute",left:"30%",...o==="top"&&{transform:"translateX(-50%) rotate(180deg)",bottom:"-9px"},...o==="bottom"&&{transform:"translateX(-50%) ",top:"-9px"},...o==="inset"&&{transform:"translateX(-50%) rotate(-90deg)",top:"8px",left:"-1px"},display:i?"block":"none"}})))};var V=x(g("react")),ie=({active:e})=>V.default.createElement("div",{style:{color:"white",pointerEvents:"none",position:"absolute",left:"calc(-50% - 144px - 14px)",top:"-36px",width:"max-content",borderRadius:"8px",backgroundColor:"#40414A",opacity:e?1:0,transitionDuration:"0.2s",transitionProperty:"transform,opacity",transitionTimingFunction:"ease-in-out",padding:"8px",fontSize:"12px",lineHeight:"12px",fontWeight:400,textShadow:"0 0 2px #1D1E30, 1px 0 2px #1D1E30, -1px 0 2px #1D1E30, 0 1px 2px #1D1E30, 0 -1px 2px #1D1E30"}},V.default.createElement("kbd",{style:{marginLeft:"4px",padding:"2px 4px",borderRadius:"2px",background:"#1D1E30",color:"#CFD7E2",border:"none",textShadow:"none"}},"shift")," ","to move to parent.",V.default.createElement("kbd",{style:{marginLeft:"4px",padding:"2px 4px",borderRadius:"2px",background:"#1D1E30",color:"#CFD7E2",border:"none",textShadow:"none"}},"space")," ","to highlight in monitor.");var ae=({onSelectorOpen:e,onHighlight:t,icon:n,style:r})=>{let[i,o]=S.default.useState(!1),[s,f]=S.default.useState(!1),{rect:h,name:c}=ee(s),[v,a]=S.default.useState(null);return S.default.useEffect(()=>{if(!v){let m=document.createElement("div");m.id="selector-box-root",document.body.appendChild(m),a(m)}},[]),S.default.useEffect(()=>{s?document.body.style.cursor="crosshair":document.body.style.cursor="default"},[s]),S.default.useEffect(()=>{let m=l=>{s&&c&&(l==null||l.preventDefault(),l==null||l.stopPropagation(),l.stopImmediatePropagation(),t(c),f(!1))};return s?(document.addEventListener("click",m,{capture:!0}),()=>{document.removeEventListener("click",m,{capture:!0})}):()=>0},[c,t,s]),S.default.useEffect(()=>{s&&e()},[s,e]),S.default.createElement("div",{style:r},S.default.createElement("div",{role:"button",title:"Element Selector",onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),onClick:m=>{var l;m.preventDefault(),m.stopPropagation(),(l=document==null?void 0:document.activeElement)==null||l.blur(),f(d=>!d)},style:{padding:0,margin:0,height:"100%",width:"100%",transform:i?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out"}},n),S.default.createElement(ie,{active:s}),s&&v&&(0,se.createPortal)(S.default.createElement(re,{...h,name:c}),v))};var O=x(g("react")),le=e=>O.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:157,height:25,viewBox:"0 0 157 25",fill:"none",...e},O.createElement("g",{filter:"url(#devtools-panel)"},O.createElement("path",{fill:"#1D1E30",d:"M17 1h123v24H17z"}),O.createElement("path",{fill:"#1D1E30",d:"M6.265 9.205A12 12 0 0 1 17.649 1H25v24H1L6.265 9.205ZM150.735 9.205A12 12 0 0 0 139.351 1H132v24h24l-5.265-15.795Z"}),O.createElement("path",{fill:"currentColor",d:"M25 14.333A1.333 1.333 0 1 1 25 17a1.333 1.333 0 0 1 0-2.667Z"}),O.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M23.211 20.578a4 4 0 0 0 3.578 0l4-2A4 4 0 0 0 33 15v-4a4 4 0 0 0-2.211-3.578l-4-2a4 4 0 0 0-3.578 0l-4 2A4 4 0 0 0 17 11v4a4 4 0 0 0 2.211 3.578l4 2Zm-.878-4.911a2.667 2.667 0 0 0 5.334 0v-5.334a2.667 2.667 0 0 0-5.334 0v5.334Z",clipRule:"evenodd"}),O.createElement("path",{fill:"#CFD7E2",d:"M42.152 17a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h4.2c.288 0 .56.056.816.168a2.135 2.135 0 0 1 1.14 1.128c.112.256.168.532.168.828v3.984c0 .296-.056.572-.168.828a2.135 2.135 0 0 1-1.14 1.128 2.014 2.014 0 0 1-.816.168h-4.2Zm1.38-1.644h2.82a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-3.984a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.82v4.944Zm13.18-5.196a.244.244 0 0 1-.253.252h-4.44v1.656h4.02c.072 0 .132.024.18.072a.227.227 0 0 1 .084.18v1.128a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072h-4.02v1.644h4.44c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-5.832a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h5.832c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.128ZM63.014 17h-2.232a.387.387 0 0 1-.216-.072.356.356 0 0 1-.144-.168l-1.716-4.296a.853.853 0 0 1-.072-.24 1.783 1.783 0 0 1-.024-.264V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h1.128c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v2.616c0 .072.008.156.024.252s.04.176.072.24l1.284 3.216h.528l1.284-3.216a.853.853 0 0 0 .072-.24c.016-.096.024-.18.024-.252V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.128c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v2.928c0 .072-.008.16-.024.264a.853.853 0 0 1-.072.24l-1.716 4.296a.356.356 0 0 1-.144.168.387.387 0 0 1-.216.072ZM73.29 8.768c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v1.128a.227.227 0 0 1-.084.18.244.244 0 0 1-.18.072h-2.208v6.324a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072H69.69a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192v-6.324H67.23a.287.287 0 0 1-.192-.072.244.244 0 0 1-.072-.18V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h6.06Zm6.507.012c.296 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.296 0-.572-.056-.828-.168a2.171 2.171 0 0 1-1.128-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.128-1.128c.256-.112.532-.168.828-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.336-.132h-2.34a.497.497 0 0 0-.348.132.455.455 0 0 0-.132.336v3.996c0 .136.044.248.132.336a.497.497 0 0 0 .348.132h2.34a.455.455 0 0 0 .336-.132.436.436 0 0 0 .144-.336v-3.996Zm7.888-2.112c.295 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.297 0-.573-.056-.829-.168a2.171 2.171 0 0 1-1.127-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.127-1.128c.257-.112.532-.168.829-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.337-.132h-2.34a.497.497 0 0 0-.347.132.455.455 0 0 0-.133.336v3.996c0 .136.044.248.133.336a.497.497 0 0 0 .347.132h2.34a.455.455 0 0 0 .337-.132.436.436 0 0 0 .143-.336v-3.996ZM98.294 17H92.68a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v6.324h4.236c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072Zm7.336-5.76a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192v-.084a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.352a.46.46 0 0 0-.336.144.455.455 0 0 0-.132.336v.696c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v.696c0 .296-.056.572-.168.828a2.171 2.171 0 0 1-1.128 1.128 2.014 2.014 0 0 1-.816.168h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.043 2.043 0 0 1-.168-.828v-.084c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v.084c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-.696a.455.455 0 0 0-.132-.336.455.455 0 0 0-.336-.132h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.099 2.099 0 0 1-.168-.828v-.696c0-.296.056-.572.168-.828a2.171 2.171 0 0 1 1.128-1.128c.256-.112.528-.168.816-.168h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.532.168.828v.084a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-1.128Z"})));var k=x(g("react")),de=e=>k.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",fill:"none",...e},k.default.createElement("path",{fill:"#0FBDBD",fillRule:"evenodd",d:"M9 1a1 1 0 0 0-2 0v2.1A5.006 5.006 0 0 0 3.1 7H1a1 1 0 0 0 0 2h2.1A5.006 5.006 0 0 0 7 12.9V15a1 1 0 1 0 2 0v-2.1A5.006 5.006 0 0 0 12.9 9H15a1 1 0 1 0 0-2h-2.1A5.006 5.006 0 0 0 9 3.1V1Zm2 7a3 3 0 1 0-6 0 3 3 0 0 0 6 0Z",clipRule:"evenodd"}));var ue=({onClick:e,onSelectorHighlight:t,onSelectorOpen:n})=>{let[r,i]=T.default.useState(!1);return T.default.createElement("div",{onMouseOver:()=>i(!0),onMouseOut:()=>i(!1),style:{position:"relative",userSelect:"none",WebkitUserSelect:"none",background:"none",border:"none",padding:0,margin:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:r?"#0FBDBD":"#6C7793",transition:"color 0.1s ease-in-out"},onClick:e},T.default.createElement(le,null),T.default.createElement(ae,{style:{position:"absolute",top:5,right:18,width:"16px",height:"16px"},icon:T.default.createElement(de,{width:16,height:16,style:{pointerEvents:"none"}}),onSelectorOpen:n,onHighlight:t}))};var p=x(g("react"));var ce=e=>e?"scaleX(1) translateY(0)":"scaleX(0) translateY(25vw)",M=50,E=10,He=()=>typeof window<"u"?window.innerWidth*.7:1440*.7,Ie=()=>typeof window<"u"?window.innerHeight*.7:900*.7,pe=640,me=360;var G=e=>{switch(e){case"left":return{left:`calc(${M}px + ${E}px)`,top:"50%",transform:"translateY(-50%)"};case"right":return{right:`calc(${M}px + ${E}px)`,top:"50%",transform:"translateY(-50%)"};case"top":return{left:"50%",top:`calc(${M}px + ${E}px)`,transform:"translateX(-50%)"};default:case"bottom":return{left:"50%",bottom:`calc(${M}px + ${E}px)`,transform:"translateX(-50%)"}}},R=e=>{switch(e){case"left":case"right":return-E-M-E+(typeof window<"u"?window.innerWidth:1440)-E;case"top":case"bottom":return-E+(typeof window<"u"?window.innerWidth:1440)-E}},B=e=>{switch(e){case"left":case"right":return-E+(typeof window<"u"?window.innerHeight:900)-E;case"top":case"bottom":return-E-M-E+(typeof window<"u"?window.innerHeight:900)-E}},Z=(e,t)=>{let n={width:He(),height:Ie()},r=R(e),i=B(e),o=Math.min(r,(t??n).width),s=Math.min(i,(t??n).height);return{width:o,height:s}};var F=x(g("react")),N=e=>F.default.createElement("svg",{width:10,height:26,viewBox:"0 0 10 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},F.default.createElement("rect",{x:.5,y:.5,width:9,height:25,rx:4.5,fill:"#1D1E30"}),F.default.createElement("path",{d:"M7 5C7 6.10457 6.10457 7 5 7C3.89543 7 3 6.10457 3 5C3 3.89543 3.89543 3 5 3C6.10457 3 7 3.89543 7 5Z",fill:"#303450"}),F.default.createElement("path",{d:"M7 13C7 14.1046 6.10457 15 5 15C3.89543 15 3 14.1046 3 13C3 11.8954 3.89543 11 5 11C6.10457 11 7 11.8954 7 13Z",fill:"#303450"}),F.default.createElement("path",{d:"M7 21C7 22.1046 6.10457 23 5 23C3.89543 23 3 22.1046 3 21C3 19.8954 3.89543 19 5 19C6.10457 19 7 19.8954 7 21Z",fill:"#303450"}),F.default.createElement("rect",{x:.5,y:.5,width:9,height:25,rx:4.5,stroke:"#303450"}));var fe=({placement:e,visible:t,children:n})=>{let[r,i]=p.default.useState(!1),[o,s]=p.default.useState(null),[f,h]=p.default.useState(null),[c,v]=p.default.useState(Z(e));return p.default.useEffect(()=>{let a=()=>{v(m=>Z(e,m))};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[e]),p.default.useEffect(()=>{let a=()=>{s(null)};if(o!==null)return window.addEventListener("mouseup",a),()=>{window.removeEventListener("mouseup",a)}},[o]),p.default.useEffect(()=>{let a=document.body.style.cursor;return o!=null&&o.includes("x")?document.body.style.cursor="col-resize":o!=null&&o.includes("y")&&(document.body.style.cursor="row-resize"),()=>{document.body.style.cursor=a}},[o]),p.default.useEffect(()=>{let a=m=>{if((o==null?void 0:o[1])==="x"){let l=m.clientX-((f==null?void 0:f.x)??m.clientX),d=c.width+(o==="lx"?-l:l)*2;v(u=>({...u,width:Math.min(R(e),Math.max(pe,d))}))}else if((o==null?void 0:o[1])==="y"){let l=m.clientY-((f==null?void 0:f.y)??m.clientY),d=c.height+(o==="ty"?-l:l)*1;v(u=>({...u,height:Math.min(B(e),Math.max(me,d))}))}};if(o!==null)return window.addEventListener("mousemove",a),()=>{window.removeEventListener("mousemove",a)}},[o,e]),p.default.createElement("div",{style:{position:"absolute",borderRadius:"8px",boxShadow:"0 0 10px rgba(0, 0, 0, 0.5)",border:"1px solid rgba(0, 0, 0, 0.5)",transitionProperty:"transform, opacity",transitionTimingFunction:"ease-in-out",transitionDuration:"0.2s",...G(e),opacity:t?1:0,transform:`${G(e).transform} ${ce(t??!1)}`,...c},onMouseEnter:()=>{i(!0)},onMouseLeave:()=>{i(!1)}},n({resizing:o}),p.default.createElement(p.default.Fragment,null,p.default.createElement("div",{style:{position:"absolute",left:0,top:"50%",width:"10px",height:"26px",transform:"translateY(-13px) translateX(-5px)",cursor:"col-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:r||o?"auto":"none",opacity:r||o?1:0},onMouseDown:a=>{s("lx"),h({x:a.clientX,y:a.clientY}),a.preventDefault()}},p.default.createElement(N,null)),p.default.createElement("div",{style:{position:"absolute",right:0,top:"50%",width:"10px",height:"26px",transform:"translateY(-13px) translateX(5px)",cursor:"col-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:r||o?"auto":"none",opacity:r||o?1:0},onMouseDown:a=>{s("rx"),h({x:a.clientX,y:a.clientY}),a.preventDefault()}},p.default.createElement(N,null)),p.default.createElement("div",{style:{position:"absolute",left:"50%",top:0,width:"26px",height:"10px",transform:"translateY(-5px) translateX(-13px)",cursor:"row-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:r||o?"auto":"none",opacity:r||o?1:0},onMouseDown:a=>{s("ty"),h({x:a.clientX,y:a.clientY}),a.preventDefault()}},p.default.createElement(N,{style:{transform:"rotate(90deg)",transformOrigin:"13px 13px"}})),p.default.createElement("div",{style:{position:"absolute",left:"50%",bottom:0,width:"26px",height:"10px",transform:"translateY(5px) translateX(-13px)",cursor:"row-resize",transition:"opacity ease-in-out 0.2s",pointerEvents:r||o?"auto":"none",opacity:r||o?1:0},onMouseDown:a=>{s("by"),h({x:a.clientX,y:a.clientY}),a.preventDefault()}},p.default.createElement(N,{style:{transform:"rotate(90deg)",transformOrigin:"13px 13px"}}))))};var L=x(H()),Ve=process.env.NODE_ENV!=="development"?()=>null:()=>{let[e,t]=D.default.useState(!1),[n,r]=D.default.useState(!1),[i]=D.default.useState("bottom"),{devtoolsUrl:o,ws:s}=D.default.useContext(L.DevToolsContext),f=D.default.useCallback(c=>{s&&(0,L.send)(s,L.DevtoolsEvent.DEVTOOLS_HIGHLIGHT_IN_MONITOR,{name:c}),r(!0)},[s]),h=D.default.useCallback(()=>{r(!1)},[]);return D.default.useEffect(()=>{typeof window<"u"&&t(!0)},[]),e?D.default.createElement("div",{style:{position:"fixed",left:"50%",transform:"translateX(-50%)",bottom:0,zIndex:99999}},D.default.createElement(ue,{onClick:()=>r(c=>!c),onSelectorHighlight:f,onSelectorOpen:h}),D.default.createElement(fe,{visible:n,placement:i},({resizing:c})=>D.default.createElement("iframe",{allow:"clipboard-write;",src:o,srcDoc:o?void 0:`
|
|
2
2
|
<html style="height:100%;padding:0;margin:0;">
|
|
3
3
|
<body style="display:flex;justify-content:center;height:100%;padding:24px;margin:0;align-items:center;box-sizing:border-box;">
|
|
4
4
|
<h1 style="font-family:ui-monospace,monospace;color:#CFD7E2;text-align:center;">Could not connect to the devtools server</h1>
|
|
5
5
|
</body>
|
|
6
6
|
</html>
|
|
7
|
-
`,style:{width:"100%",height:"100%",border:"none",borderRadius:"7px",pointerEvents:c?"none":"auto",background:"#14141F"}})))};var he=
|
|
7
|
+
`,style:{width:"100%",height:"100%",border:"none",borderRadius:"7px",pointerEvents:c?"none":"auto",background:"#14141F"}}))):null};var he=x(g("react")),ve=x(H()),Ae=process.env.NODE_ENV!=="development"?({children:e})=>e:({children:e})=>he.default.createElement(ve.DevToolsContextProvider,null,e);})();
|
|
8
8
|
//# sourceMappingURL=index.js.map
|