iterate-ui-overlay 0.1.2 → 0.1.3

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/index.js CHANGED
@@ -169,13 +169,15 @@ function getComponentInfo(element) {
169
169
  }
170
170
  }
171
171
  let el = element;
172
+ let isComponentRoot = true;
172
173
  while (el && el !== document.documentElement) {
173
174
  const component = el.getAttribute("data-iterate-component");
174
175
  const source = el.getAttribute("data-iterate-source");
175
176
  if (component) {
176
- return { component, source, isComponentRoot: false };
177
+ return { component, source, isComponentRoot };
177
178
  }
178
179
  el = el.parentElement;
180
+ isComponentRoot = false;
179
181
  }
180
182
  return { component: null, source: null, isComponentRoot: false };
181
183
  }
@@ -37,7 +37,7 @@ Error generating stack: `+l.message+`
37
37
  `);else{let g=u.before.rect,d=u.after.rect;l+=` Before: ${g.width.toFixed(0)}\xD7${g.height.toFixed(0)} at (${g.x.toFixed(0)}, ${g.y.toFixed(0)})
38
38
  `,l+=` After: ${d.width.toFixed(0)}\xD7${d.height.toFixed(0)} at (${d.x.toFixed(0)}, ${d.y.toFixed(0)})
39
39
  `}}l+=`
40
- `}return l+="Please process this feedback and make the requested changes.",l}var Ln=ot(be(),1);function Ol(t){if(t.id)return`#${CSS.escape(t.id)}`;let e=[],n=t;for(;n&&n!==document.documentElement;){let l=n.tagName.toLowerCase(),a=Array.from(n.classList).filter(i=>!i.startsWith("__")&&!i.includes("svelte-")&&!/^[a-z]{1,2}$/.test(i)&&!/[_][a-zA-Z0-9]{5,}/.test(i)).slice(0,2);if(a.length>0&&(l+=a.map(i=>`.${CSS.escape(i)}`).join("")),n.parentElement&&n.parentElement.querySelectorAll(`:scope > ${l}`).length>1){let u=Array.from(n.parentElement.children).indexOf(n)+1;l+=`:nth-child(${u})`}if(e.unshift(l),document.querySelectorAll(e.join(" > ")).length===1)break;n=n.parentElement}return e.join(" > ")}function rm(t,e=4){let n=[],l=t,a=0;for(;l&&l!==document.documentElement&&a<e;){let i=l.tagName.toLowerCase(),u=Array.from(l.classList).filter(o=>!/[_][a-zA-Z0-9]{5,}/.test(o)).slice(0,1);n.unshift(u.length>0?`${i}.${u[0]}`:i),l=l.parentElement,a++}return n.join(" > ")}function us(t){let e=t.tagName.toLowerCase(),n=t.getAttribute("data-element");if(n)return n;if(e==="button"||t.getAttribute("role")==="button"){let a=t.getAttribute("aria-label");if(a)return`button [${a}]`;let i=t.textContent?.trim().slice(0,30);return i?`button "${i}"`:"button"}if(e==="a"){let a=t.textContent?.trim().slice(0,30);return a?`link "${a}"`:"link"}if(e==="input"){let a=t.type||"text",i=t.name,u=t.placeholder;return i?`input[${a}] "${i}"`:u?`input[${a}] "${u}"`:`input[${a}]`}if(e==="img"){let a=t.alt;return a?`image "${a.slice(0,30)}"`:"image"}if(/^h[1-6]$/.test(e)){let a=t.textContent?.trim().slice(0,30);return a?`${e} "${a}"`:e}if(t.id)return`#${t.id}`;let l=Array.from(t.classList).filter(a=>!/[_][a-zA-Z0-9]{5,}/.test(a)&&a.length>2).at(0);return l?`${e}.${l}`:e}function sm(t){let e=[],n=t.previousElementSibling;n?.textContent?.trim()&&e.push(`[prev] ${n.textContent.trim().slice(0,50)}`);let l=t.textContent?.trim();l&&e.push(l.slice(0,80));let a=t.nextElementSibling;return a?.textContent?.trim()&&e.push(`[next] ${a.textContent.trim().slice(0,50)}`),e.join(" | ")}function Fg(t){for(let e of Object.keys(t))if(e.startsWith("__reactFiber$")||e.startsWith("__reactInternalInstance$"))return t[e];return null}var Ig=new Set(["AppRouter","Router","HotReload","InnerLayoutRouter","OuterLayoutRouter","RenderFromTemplateContext","ScrollAndFocusHandler","InnerScrollAndFocusHandler","ClientPageRoot","SegmentViewNode","SegmentStateProvider","RootErrorBoundary","AppDevOverlayErrorBoundary","DevRootHTTPAccessFallbackBoundary","Root","ServerRoot","ErrorBoundary","ErrorBoundaryHandler","Suspense","RedirectBoundary","RedirectErrorBoundary","HTTPAccessFallbackBoundary","HTTPAccessFallbackErrorBoundary","LoadingBoundary"]);function Pg(t){if(!t||!t.type||typeof t.type=="string")return!1;let e=t.type.displayName||t.type.name;return!(!e||!/^[A-Z]/.test(e)||Ig.has(e)||/Context$|Provider$/.test(e))}function Hi(t){let e=Fg(t);if(e){let l=e,a=!0;for(;l;){if(Pg(l)){let i=l.type.displayName||l.type.name,u=l._debugSource,o=u?`${u.fileName}:${u.lineNumber}`:null;return{component:i,source:o,isComponentRoot:a}}l===e.return&&(a=!1),l=l.return}}let n=t;for(;n&&n!==document.documentElement;){let l=n.getAttribute("data-iterate-component"),a=n.getAttribute("data-iterate-source");if(l)return{component:l,source:a,isComponentRoot:!1};n=n.parentElement}return{component:null,source:null,isComponentRoot:!1}}var tp=new Set(["p","span","h1","h2","h3","h4","h5","h6","label","a","li"]),ep=new Set(["div","section","main","article","aside","nav","header","footer"]),np=new Set(["button","input","select","textarea"]),om=["color","font-size","font-weight","font-family","line-height","text-align","text-decoration","letter-spacing"],cm=["display","flex-direction","justify-content","align-items","gap","grid-template-columns","grid-template-rows","padding","margin","background-color","border-radius","overflow"],lp=["background-color","color","padding","border-radius","font-size","font-weight","border","cursor","outline"],ap=["position","top","left","right","bottom","z-index","width","height"],ip=new Set(["none","normal","auto","0px","transparent","rgba(0, 0, 0, 0)"]);function za(t){let e=window.getComputedStyle(t),n=t.tagName.toLowerCase(),l={},a=[...ap];tp.has(n)?a=a.concat(om):np.has(n)?a=a.concat(lp):ep.has(n)?a=a.concat(cm):a=a.concat(cm,om);for(let i of a){let u=e.getPropertyValue(i);u&&!ip.has(u)&&(l[i]=u)}return l}var sl=ot(Qt(),1);function hm({active:t,iframeRef:e,selectedElements:n,onSelect:l,suppressHover:a,justFinishedDragRef:i}){let[u,o]=(0,Ln.useState)(null),[c,r]=(0,Ln.useState)(""),[y,g]=(0,Ln.useState)(null),d=(0,Ln.useCallback)(()=>{try{return e.current?.contentDocument??document}catch{return document}},[e]);return(0,Ln.useEffect)(()=>{a&&(o(null),g(null))},[a]),(0,Ln.useEffect)(()=>{if(!t){o(null),g(null);return}let m=d(),b=f=>!!f.closest("#__iterate-overlay-root__")||!!f.closest("#__iterate-markers-layer__")||!!f.closest("#__iterate-fixed-markers-layer__"),E=f=>{if(a)return;let s=f.target;if(!s||s===m.documentElement||b(s)){o(null),g(null);return}let h=s.getBoundingClientRect();o({x:h.x,y:h.y,width:h.width,height:h.height}),g({x:f.clientX,y:f.clientY});let{component:p,isComponentRoot:C}=Hi(s);r(p&&C?`<${p}>`:us(s))},O=f=>{if(i?.current){i.current=!1;return}let s=f.target;if(!s||b(s))return;f.preventDefault(),f.stopPropagation();let h=Hl(s),p={x:f.clientX,y:f.clientY};if(f.ctrlKey||f.metaKey){let L=n.findIndex(A=>A.selector===h.selector);if(L>=0){let A=[...n];A.splice(L,1),l(A,p)}else l([...n,h],p)}else l([h],p)};return m.addEventListener("mousemove",E),m.addEventListener("click",O,{capture:!0}),()=>{m.removeEventListener("mousemove",E),m.removeEventListener("click",O,{capture:!0})}},[t,d,l,n,a]),t?(0,sl.jsx)("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:u&&(0,sl.jsxs)(sl.Fragment,{children:[(0,sl.jsx)("div",{style:{position:"absolute",left:u.x,top:u.y,width:u.width,height:u.height,border:"1.5px solid #6b9eff",backgroundColor:"rgba(107, 158, 255, 0.06)",borderRadius:4,pointerEvents:"none",boxSizing:"border-box",transition:"all 0.1s ease"}}),y&&(0,sl.jsx)("div",{style:{position:"absolute",left:y.x+12,top:y.y+16,background:"#6b9eff",color:"#fff",padding:"2px 8px",borderRadius:4,fontSize:11,fontFamily:"monospace",whiteSpace:"nowrap",pointerEvents:"none",maxWidth:400,overflow:"hidden",textOverflow:"ellipsis"},children:c})]})}):null}function Hl(t){let e=t.getBoundingClientRect(),{component:n,source:l,isComponentRoot:a}=Hi(t);return{domElement:t,selector:Ol(t),elementName:us(t),elementPath:rm(t),rect:{x:e.x,y:e.y,width:e.width,height:e.height},computedStyles:za(t),nearbyText:sm(t),componentName:a?n:null,sourceLocation:a?l:null}}var dn=ot(be(),1);var Li=ot(Qt(),1);function ym({active:t,iframeRef:e,onSelect:n,onDragStateChange:l,justFinishedDragRef:a}){let[i,u]=(0,dn.useState)(null),[o,c]=(0,dn.useState)(null),[r,y]=(0,dn.useState)([]),g=(0,dn.useRef)(0),d=(0,dn.useCallback)(()=>{try{return e.current?.contentDocument??document}catch{return document}},[e]);return(0,dn.useEffect)(()=>{if(!t){u(null),c(null);return}let m=d(),b=!1,E={x:0,y:0},O=h=>{if(h.button!==0||h.ctrlKey||h.metaKey)return;let p=h.target;p.closest("#__iterate-overlay-root__")||p.closest("#__iterate-markers-layer__")||(h.preventDefault(),b=!0,E={x:h.clientX,y:h.clientY},c(E),l?.(!0))},f=h=>{if(!b)return;let p=Math.min(E.x,h.clientX),C=Math.min(E.y,h.clientY),L=Math.abs(h.clientX-E.x),A=Math.abs(h.clientY-E.y);if(L>10||A>10){let q={x:p,y:C,width:L,height:A};u(q);let z=Date.now();if(z-g.current>80){g.current=z;let k=cp(m,q);y(k)}}},s=h=>{if(!b)return;b=!1,l?.(!1);let p={x:Math.min(E.x,h.clientX),y:Math.min(E.y,h.clientY),width:Math.abs(h.clientX-E.x),height:Math.abs(h.clientY-E.y)};if(u(null),c(null),y([]),p.width<20||p.height<20)return;let C=rp(m,p);C.length>0&&(a&&(a.current=!0),n(C))};return m.addEventListener("mousedown",O),m.addEventListener("mousemove",f),m.addEventListener("mouseup",s),()=>{m.removeEventListener("mousedown",O),m.removeEventListener("mousemove",f),m.removeEventListener("mouseup",s)}},[t,d,n,l]),!t||!i?null:(0,Li.jsxs)("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[(0,Li.jsx)("div",{style:{position:"absolute",left:i.x,top:i.y,width:i.width,height:i.height,border:"1.5px dashed #6b9eff",backgroundColor:"rgba(107, 158, 255, 0.06)",borderRadius:3,pointerEvents:"none"}}),r.map((m,b)=>(0,Li.jsx)("div",{style:{position:"absolute",left:m.x,top:m.y,width:m.width,height:m.height,border:"1.5px solid #6b9eff",borderRadius:4,pointerEvents:"none",boxSizing:"border-box"}},b))]})}function gm(t,e,n){return t.left>=e.x-n&&t.right<=e.x+e.width+n&&t.top>=e.y-n&&t.bottom<=e.y+e.height+n}var pm=new Set(["html","body","head","script","style","meta","link","noscript"]),vm=t=>!!t.closest("#__iterate-overlay-root__")||!!t.closest("#__iterate-markers-layer__"),bm=8;function cp(t,e){let n=new Set,l=t.querySelectorAll("*");for(let i of l){if(pm.has(i.tagName.toLowerCase())||vm(i))continue;let u=i.getBoundingClientRect();u.width===0||u.height===0||u.width>e.width*2&&u.height>e.height*2||gm(u,e,bm)&&n.add(i)}let a=[];for(let i of n){let u=i.parentElement,o=!1;for(;u;){if(n.has(u)){o=!0;break}u=u.parentElement}if(!o){let c=i.getBoundingClientRect();a.push({x:c.x,y:c.y,width:c.width,height:c.height})}}return a}function rp(t,e){let n=new Set,l=t.querySelectorAll("*");for(let i of l){if(pm.has(i.tagName.toLowerCase())||vm(i))continue;let u=i.getBoundingClientRect();u.width===0||u.height===0||u.width>e.width*2&&u.height>e.height*2||gm(u,e,bm)&&n.add(i)}let a=[];for(let i of n){let u=i.parentElement,o=!1;for(;u;){if(n.has(u)){o=!0;break}u=u.parentElement}o||a.push(Hl(i))}return a}var Ll=ot(be(),1);var yo=ot(Qt(),1);function Sm({active:t,iframeRef:e,onTextSelect:n}){let[l,a]=(0,Ll.useState)(null),[i,u]=(0,Ll.useState)(""),o=(0,Ll.useCallback)(()=>{try{return e.current?.contentDocument??document}catch{return document}},[e]);return(0,Ll.useEffect)(()=>{if(!t){a(null),u("");return}let c=o(),r=()=>{let m=c.getSelection();if(!m||m.isCollapsed||!m.rangeCount){a(null),u(""),n(null);return}let b=m.getRangeAt(0),E=m.toString().trim();if(!E||E.length<2){a(null),u("");return}let O=b.commonAncestorContainer,f=O.nodeType===Node.ELEMENT_NODE?O:O.parentElement;if(!f)return;let s=Hl(f),h=b.getBoundingClientRect();a({x:h.x+h.width/2,y:h.y-4}),u(E),n({text:E,containingElement:{selector:s.selector,elementName:s.elementName,elementPath:s.elementPath,rect:s.rect,computedStyles:s.computedStyles,nearbyText:s.nearbyText,componentName:s.componentName,sourceLocation:s.sourceLocation},startOffset:b.startOffset,endOffset:b.endOffset})},y,g=()=>{clearTimeout(y),y=setTimeout(r,150)};c.addEventListener("selectionchange",g);let d=()=>{setTimeout(r,50)};return c.addEventListener("mouseup",d),()=>{clearTimeout(y),c.removeEventListener("selectionchange",g),c.removeEventListener("mouseup",d)}},[t,o,n]),!t||!l||!i?null:(0,yo.jsx)("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:(0,yo.jsxs)("div",{style:{position:"absolute",left:l.x,top:l.y,transform:"translate(-50%, -100%)",background:"#2563eb",color:"#fff",padding:"3px 8px",borderRadius:4,fontSize:10,fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",whiteSpace:"nowrap",pointerEvents:"none",maxWidth:250,overflow:"hidden",textOverflow:"ellipsis"},children:['"',i.slice(0,50),i.length>50?"...":"",'"']})})}var tn=ot(be(),1);var Bl=ot(Qt(),1),Em="#2563eb",xm=3;function Mm({active:t,iframeRef:e,onDrawComplete:n}){let[l,a]=(0,tn.useState)(!1),[i,u]=(0,tn.useState)([]),[o,c]=(0,tn.useState)([]),r=(0,tn.useRef)([]),y=(0,tn.useCallback)(()=>{try{return e.current?.contentDocument??document}catch{return document}},[e]);if((0,tn.useEffect)(()=>{t||c([])},[t]),(0,tn.useEffect)(()=>{if(!t){a(!1),u([]),r.current=[];return}let d=y(),m=O=>{if(O.button!==0||O.target?.closest?.("#__iterate-markers-layer__, #__iterate-fixed-markers-layer__, [data-iterate-popup], [data-iterate-panel]"))return;O.preventDefault(),O.stopPropagation(),a(!0);let s={x:O.clientX,y:O.clientY};r.current=[s],u([s])},b=O=>{if(!l)return;let f={x:O.clientX,y:O.clientY};r.current.push(f),r.current.length%2===0&&u([...r.current])},E=O=>{if(!l)return;a(!1);let f=r.current;if(f.length<3){u([]),r.current=[];return}let s=Tm(f),h=sp(f),p={path:s,bounds:h,strokeColor:Em,strokeWidth:xm},C=fp(d,h);c(L=>[...L,p]),u([]),r.current=[],n(C,p)};return d.addEventListener("mousedown",m,{capture:!0}),d.addEventListener("mousemove",b),d.addEventListener("mouseup",E),()=>{d.removeEventListener("mousedown",m,{capture:!0}),d.removeEventListener("mousemove",b),d.removeEventListener("mouseup",E)}},[t,l,y,n]),!t)return null;let g=i.length>=2?Tm(i):null;return(0,Bl.jsxs)("div",{style:{position:"absolute",inset:0,pointerEvents:"none",cursor:"crosshair"},children:[(0,Bl.jsxs)("svg",{style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"},children:[o.map((d,m)=>(0,Bl.jsx)("path",{d:d.path,fill:"none",stroke:d.strokeColor,strokeWidth:d.strokeWidth,strokeLinecap:"round",strokeLinejoin:"round",opacity:.6},`completed-${m}`)),g&&(0,Bl.jsx)("path",{d:g,fill:"none",stroke:Em,strokeWidth:xm,strokeLinecap:"round",strokeLinejoin:"round"})]}),!l&&(0,Bl.jsx)("div",{style:{position:"absolute",inset:0,pointerEvents:"auto",cursor:"crosshair"}})]})}function Tm(t){if(t.length===0)return"";let e=[`M ${t[0].x} ${t[0].y}`];for(let n=1;n<t.length-1;n++){let l=t[n],a=t[n+1],i=(l.x+a.x)/2,u=(l.y+a.y)/2;e.push(`Q ${l.x} ${l.y} ${i} ${u}`)}if(t.length>1){let n=t[t.length-1];e.push(`L ${n.x} ${n.y}`)}return e.join(" ")}function sp(t){let e=1/0,n=1/0,l=-1/0,a=-1/0;for(let i of t)i.x<e&&(e=i.x),i.y<n&&(n=i.y),i.x>l&&(l=i.x),i.y>a&&(a=i.y);return{x:e,y:n,width:l-e,height:a-n}}function fp(t,e){let n=[],l=new Set,a=10,i={x:e.x-a,y:e.y-a,width:e.width+a*2,height:e.height+a*2},u=t.querySelectorAll("*");for(let o of u){let c=o.tagName.toLowerCase();if(["html","body","head","script","style","meta","link","noscript"].includes(c)||o.closest("#__iterate-overlay-root__")||o.closest("#__iterate-markers-layer__"))continue;let r=o.getBoundingClientRect();if(!(r.width===0||r.height===0)&&!(r.width>i.width*3&&r.height>i.height*3)&&r.left<i.x+i.width&&r.right>i.x&&r.top<i.y+i.height&&r.bottom>i.y){let y=!1,g=o.parentElement;for(;g;){if(l.has(g)){y=!0;break}g=g.parentElement}if(!y){for(let d=n.length-1;d>=0;d--)o.contains(n[d].domElement)&&n.splice(d,1);l.add(o),n.push(Hl(o))}}}return n}var Yt=ot(be(),1);var r2=ot(be(),1),gt=ot(Qt(),1);function Cm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M10 4H11C11 3.44772 10.5523 3 10 3V4ZM10 10V11C10.5523 11 11 10.5523 11 10H10ZM4 10H3C3 10.5523 3.44772 11 4 11V10ZM4.54601 4.10899L5 5L4.54601 4.10899ZM4.10899 4.54601L5 5L4.10899 4.54601ZM14 4V3C13.4477 3 13 3.44772 13 4H14ZM20 10V11C20.5523 11 21 10.5523 21 10H20ZM14 10H13C13 10.5523 13.4477 11 14 11V10ZM19.454 4.10899L19 5L19.454 4.10899ZM19.891 4.54601L19 5L19.891 4.54601ZM4 14V13C3.44772 13 3 13.4477 3 14H4ZM10 14H11C11 13.4477 10.5523 13 10 13V14ZM10 20V21C10.5523 21 11 20.5523 11 20H10ZM4.54601 19.891L5 19L4.54601 19.891ZM4.10899 19.454L5 19L4.10899 19.454ZM20.2929 21.7076C20.6834 22.0981 21.3166 22.0981 21.7071 21.7076C22.0976 21.317 22.0976 20.6839 21.7071 20.2934L21 21.0005L20.2929 21.7076ZM5.6 4V5H10V4V3H5.6V4ZM10 4H9V10H10H11V4H10ZM10 10V9H4V10V11H10V10ZM4 10H5V5.6H4H3V10H4ZM5.6 4V3C5.33647 3 5.07869 2.99922 4.86177 3.01695C4.63318 3.03562 4.36344 3.07969 4.09202 3.21799L4.54601 4.10899L5 5C4.94249 5.0293 4.91972 5.01887 5.02463 5.0103C5.14122 5.00078 5.30347 5 5.6 5V4ZM4 5.6H5C5 5.30347 5.00078 5.14122 5.0103 5.02463C5.01887 4.91972 5.0293 4.94249 5 5L4.10899 4.54601L3.21799 4.09202C3.07969 4.36344 3.03562 4.63318 3.01695 4.86177C2.99922 5.07869 3 5.33647 3 5.6H4ZM4.54601 4.10899L4.09202 3.21799C3.71569 3.40973 3.40973 3.71569 3.21799 4.09202L4.10899 4.54601L5 5V5L4.54601 4.10899ZM14 4V5H18.4V4V3H14V4ZM20 5.6H19V10H20H21V5.6H20ZM20 10V9H14V10V11H20V10ZM14 10H15V4H14H13V10H14ZM18.4 4V5C18.6965 5 18.8588 5.00078 18.9754 5.0103C19.0803 5.01887 19.0575 5.0293 19 5L19.454 4.10899L19.908 3.21799C19.6366 3.07969 19.3668 3.03562 19.1382 3.01695C18.9213 2.99922 18.6635 3 18.4 3V4ZM20 5.6H21C21 5.33647 21.0008 5.07869 20.9831 4.86177C20.9644 4.63318 20.9203 4.36344 20.782 4.09202L19.891 4.54601L19 5C18.9707 4.94249 18.9811 4.91972 18.9897 5.02463C18.9992 5.14122 19 5.30347 19 5.6H20ZM19.454 4.10899L19 5V5L19.891 4.54601L20.782 4.09202C20.5903 3.7157 20.2843 3.40973 19.908 3.21799L19.454 4.10899ZM4 14V15H10V14V13H4V14ZM10 14H9V20H10H11V14H10ZM10 20V19H5.6V20V21H10V20ZM4 18.4H5V14H4H3V18.4H4ZM5.6 20V19C5.30347 19 5.14122 18.9992 5.02463 18.9897C4.91972 18.9811 4.94249 18.9707 5 19L4.54601 19.891L4.09202 20.782C4.36344 20.9203 4.63318 20.9644 4.86177 20.9831C5.07869 21.0008 5.33647 21 5.6 21V20ZM4 18.4H3C3 18.6635 2.99922 18.9213 3.01695 19.1382C3.03562 19.3668 3.07969 19.6366 3.21799 19.908L4.10899 19.454L5 19C5.0293 19.0575 5.01887 19.0803 5.0103 18.9754C5.00078 18.8588 5 18.6965 5 18.4H4ZM4.54601 19.891L5 19V19L4.10899 19.454L3.21799 19.908C3.40973 20.2843 3.7157 20.5903 4.09202 20.782L4.54601 19.891ZM19.1213 19.1218L18.4142 18.4147C17.6332 19.1957 16.3668 19.1957 15.5858 18.4147L14.8787 19.1218L14.1716 19.8289C15.7337 21.391 18.2663 21.391 19.8284 19.8289L19.1213 19.1218ZM14.8787 19.1218L15.5858 18.4147C14.8047 17.6336 14.8047 16.3673 15.5858 15.5862L14.8787 14.8791L14.1716 14.172C12.6095 15.7341 12.6095 18.2668 14.1716 19.8289L14.8787 19.1218ZM14.8787 14.8791L15.5858 15.5862C16.3668 14.8052 17.6332 14.8052 18.4142 15.5862L19.1213 14.8791L19.8284 14.172C18.2663 12.6099 15.7337 12.6099 14.1716 14.172L14.8787 14.8791ZM19.1213 14.8791L18.4142 15.5862C19.1953 16.3673 19.1953 17.6336 18.4142 18.4147L19.1213 19.1218L19.8284 19.8289C21.3905 18.2668 21.3905 15.7341 19.8284 14.172L19.1213 14.8791ZM19.1213 19.1218L18.4142 19.8289L20.2929 21.7076L21 21.0005L21.7071 20.2934L19.8284 18.4147L19.1213 19.1218Z",fill:e})})}function wm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M15 9L9 15M15 15L9 9M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function _m({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M11 3V4.5M16.6569 5.34326L15.5962 6.40392M6.40381 15.5962L5.34315 16.6569M4.5 11H3M6.40381 6.40381L5.34315 5.34315M14.3136 20.7675L10.4536 10.7769C10.3754 10.5745 10.5745 10.3754 10.7769 10.4536L20.7675 14.3136C20.9626 14.3889 20.9844 14.6562 20.8042 14.7623L17.0559 16.9671C17.0192 16.9887 16.9887 17.0192 16.9671 17.0559L14.7623 20.8042C14.6562 20.9844 14.3889 20.9626 14.3136 20.7675Z",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Am({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M8.99989 5.74989L11.4696 3.28022C11.7624 2.98732 12.2373 2.98732 12.5302 3.28022L14.9999 5.74989M5.74989 8.99989L3.28022 11.4696C2.98732 11.7624 2.98732 12.2373 3.28022 12.5302L5.74989 14.9999M18.2499 8.99989L20.7196 11.4696C21.0125 11.7624 21.0125 12.2373 20.7196 12.5302L18.2499 14.9999M14.9999 18.2499L12.5302 20.7196C12.2373 21.0125 11.7624 21.0125 11.4696 20.7196L8.99989 18.2499M11.9999 3.99989V11.9999M11.9999 11.9999V19.9999M11.9999 11.9999H3.99989M11.9999 11.9999H19.9999",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Da({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M5.93777 20.0665L6.93555 20L5.93777 20.0665ZM18.0622 20.0665L17.0644 20L18.0622 20.0665ZM3 5C2.44772 5 2 5.44772 2 6C2 6.55228 2.44772 7 3 7V6V5ZM21 7C21.5523 7 22 6.55228 22 6C22 5.44772 21.5523 5 21 5V6V7ZM11 11C11 10.4477 10.5523 10 10 10C9.44772 10 9 10.4477 9 11H10H11ZM9 16C9 16.5523 9.44772 17 10 17C10.5523 17 11 16.5523 11 16H10H9ZM15 11C15 10.4477 14.5523 10 14 10C13.4477 10 13 10.4477 13 11H14H15ZM13 16C13 16.5523 13.4477 17 14 17C14.5523 17 15 16.5523 15 16H14H13ZM14.9056 6.24926C15.0432 6.78411 15.5884 7.1061 16.1233 6.96844C16.6581 6.83078 16.9801 6.28559 16.8424 5.75074L15.874 6L14.9056 6.24926ZM5 6L4.00221 6.06652L4.93998 20.133L5.93777 20.0665L6.93555 20L5.99779 5.93348L5 6ZM6.93555 21V22H17.0644V21V20H6.93555V21ZM18.0622 20.0665L19.06 20.133L19.9978 6.06652L19 6L18.0022 5.93348L17.0644 20L18.0622 20.0665ZM19 6V5H5V6V7H19V6ZM3 6V7H5V6V5H3V6ZM19 6V7H21V6V5H19V6ZM17.0644 21V22C18.1174 22 18.99 21.1836 19.06 20.133L18.0622 20.0665L17.0644 20H17.0644V21ZM5.93777 20.0665L4.93998 20.133C5.01002 21.1836 5.88262 22 6.93555 22V21V20V20L5.93777 20.0665ZM10 11H9V16H10H11V11H10ZM14 11H13V16H14H15V11H14ZM12 3V4C13.3965 4 14.5725 4.95512 14.9056 6.24926L15.874 6L16.8424 5.75074C16.2874 3.59442 14.3312 2 12 2V3ZM8.12604 6L9.09447 6.24926C9.42756 4.95512 10.6035 4 12 4V3V2C9.66885 2 7.7126 3.59442 7.1576 5.75074L8.12604 6Z",fill:e})})}function zm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M4.4834 14.6667C5.58163 17.7738 8.54493 20 12.0282 20C16.4465 20 20.0282 16.4183 20.0282 12C20.0282 7.58172 16.4465 4 12.0282 4C9.14453 4 7.27034 5.30135 5.41072 7.5M4.99986 4V7.5C4.99986 7.77614 5.22372 8 5.49986 8H8.99986",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Dm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M6.5 8C7.88071 8 9 6.88071 9 5.5C9 4.11929 7.88071 3 6.5 3C5.11929 3 4 4.11929 4 5.5C4 6.88071 5.11929 8 6.5 8ZM6.5 8V11C6.5 11.5523 6.94772 12 7.5 12H11C11.5523 12 12 12.4477 12 13M17.5 8C18.8807 8 20 6.88071 20 5.5C20 4.11929 18.8807 3 17.5 3C16.1193 3 15 4.11929 15 5.5C15 6.88071 16.1193 8 17.5 8ZM17.5 8V11C17.5 11.5523 17.0523 12 16.5 12H13C12.4477 12 12 12.4477 12 13M12 16C10.6193 16 9.5 17.1193 9.5 18.5C9.5 19.8807 10.6193 21 12 21C13.3807 21 14.5 19.8807 14.5 18.5C14.5 17.1193 13.3807 16 12 16ZM12 16V13",stroke:e,strokeWidth:2})})}function Rm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M6.5 8C7.88071 8 9 6.88071 9 5.5C9 4.11929 7.88071 3 6.5 3C5.11929 3 4 4.11929 4 5.5C4 6.88071 5.11929 8 6.5 8ZM6.5 8V16M6.5 16C5.11929 16 4 17.1193 4 18.5C4 19.8807 5.11929 21 6.5 21C7.88071 21 9 19.8807 9 18.5C9 17.1193 7.88071 16 6.5 16ZM17.5 16C16.1193 16 15 17.1193 15 18.5C15 19.8807 16.1193 21 17.5 21C18.8807 21 20 19.8807 20 18.5C20 17.1193 18.8807 16 17.5 16ZM17.5 16V6.5C17.5 5.94772 17.0523 5.5 16.5 5.5H12M12 5.5L14.5 3M12 5.5L14.5 8",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Om({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M9 9V3.5C9 3.22386 9.22386 3 9.5 3H20.5C20.7761 3 21 3.22386 21 3.5V14.5C21 14.7761 20.7761 15 20.5 15H15M14.5 9H3.5C3.22386 9 3 9.22386 3 9.5V20.5C3 20.7761 3.22386 21 3.5 21H14.5C14.7761 21 15 20.7761 15 20.5V9.5C15 9.22386 14.7761 9 14.5 9Z",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Hm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M11.2479 10L15.2496 14.0017M15.2513 10L11.2496 14.0017M3.41478 11.4188L7.7005 5.41876C7.88821 5.15597 8.19128 5 8.51423 5H19.9996C20.5519 5 20.9996 5.44772 20.9996 6V18C20.9996 18.5523 20.5519 19 19.9996 19H8.51423C8.19128 19 7.88821 18.844 7.7005 18.5812L3.41478 12.5812C3.16643 12.2335 3.16643 11.7665 3.41478 11.4188Z",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Lm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M12.0003 21C11.5003 21 8.93732 20.1294 6.71782 17.9099C3.00784 14.1999 2.05809 9.13461 4.5965 6.5962C6.68218 4.51052 10.4738 4.77972 13.8179 7.00001M17.1066 10C19.9927 13.3312 21.2146 16.7286 19.0003 18.5C17.3415 19.8271 15.2424 18.2924 14.0176 17.1094M11.0003 13H13.6027C13.8683 13 14.1231 12.8943 14.3107 12.7062L20.2949 6.70711C20.6846 6.31644 20.6842 5.68395 20.294 5.29377L18.7074 3.70711C18.3168 3.31659 17.6837 3.31659 17.2931 3.70711L11.2932 9.70712C11.1057 9.89465 11.0003 10.149 11.0003 10.4142V13Z",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Bm({size:t=24,color:e="currentColor",animate:n=!1}){return(0,gt.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,gt.jsx)("path",{d:"M7 13L10 16L17 8",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",...n?{strokeDasharray:20,strokeDashoffset:20,style:{animation:"iterate-check-draw 0.35s ease-out 0.1s forwards"}}:{}}),n&&(0,gt.jsx)("style",{children:"@keyframes iterate-check-draw { to { stroke-dashoffset: 0; } }"})]})}function go({size:t=24,color:e="currentColor"}){return(0,gt.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:{animation:"iterate-spin 0.8s linear infinite"},children:[(0,gt.jsx)("style",{children:"@keyframes iterate-spin { to { transform: rotate(360deg); } }"}),(0,gt.jsx)("circle",{cx:12,cy:12,r:9,stroke:e,strokeWidth:2,strokeLinecap:"round",strokeDasharray:"42 14"})]})}var en=ot(be(),1),Nm={panelBg:"#f7f7f7",cardBg:"#fff",toolbarBg:"#fff",drawerBg:"#efefef",hoverBg:"#f0f0f0",activeBg:"#e8e8e8",border:"#e0e0e0",textPrimary:"#333",textSecondary:"#666",textTertiary:"#999",textDisabled:"#888",iconDefault:"#666",iconHover:"#141414",suspenseOverlay:"rgba(255,255,255,0.75)",spinnerBg:"#e0e0e0",spinnerFg:"#666",tooltipBg:"#fff",tooltipText:"#333",tooltipKeyBg:"#f0f0f0",tooltipKeyText:"#888",buttonBg:"#333",buttonText:"#fff"},dp={panelBg:"#1e1e1e",cardBg:"#2a2a2a",toolbarBg:"#2a2a2a",drawerBg:"#252525",hoverBg:"#333",activeBg:"#3a3a3a",border:"#3a3a3a",textPrimary:"#e0e0e0",textSecondary:"#999",textTertiary:"#666",textDisabled:"#555",iconDefault:"#999",iconHover:"#e0e0e0",suspenseOverlay:"rgba(30,30,30,0.75)",spinnerBg:"#3a3a3a",spinnerFg:"#999",tooltipBg:"#2a2a2a",tooltipText:"#e0e0e0",tooltipKeyBg:"rgba(255,255,255,0.1)",tooltipKeyText:"#777",buttonBg:"#e0e0e0",buttonText:"#1e1e1e"};function mp(t){let e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);if(!e||(e[4]!==void 0?Number(e[4]):1)<.1)return null;let[l,a,i]=[Number(e[1])/255,Number(e[2])/255,Number(e[3])/255],u=o=>o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4);return .2126*u(l)+.7152*u(a)+.0722*u(i)}function os(t){let e=t??document,n=e.documentElement,l=n.getAttribute("data-theme")??n.getAttribute("data-color-mode")??"";if(l==="dark")return!0;if(l==="light")return!1;if(n.classList.contains("dark"))return!0;if(n.classList.contains("light"))return!1;let a=e.defaultView?.getComputedStyle(n).colorScheme??"";if(a==="dark")return!0;if(a==="light")return!1;let i=e.body;if(i){let u=e.defaultView?.getComputedStyle(i).colorScheme??"";if(u==="dark")return!0;if(u==="light")return!1}for(let u of[i,n]){if(!u)continue;let o=e.defaultView?.getComputedStyle(u).backgroundColor??"",c=mp(o);if(c!==null&&c<.2)return!0;if(c!==null&&c>.8)return!1}return window.matchMedia("(prefers-color-scheme: dark)").matches}var Um=(0,en.createContext)(Nm);function ve(){return(0,en.useContext)(Um)}function cs({children:t,targetDocument:e}){let[n,l]=(0,en.useState)(()=>os(e));return(0,en.useEffect)(()=>{l(os(e))},[e]),(0,en.useEffect)(()=>{let a=e??document,i=()=>l(os(a)),u=window.matchMedia("(prefers-color-scheme: dark)");u.addEventListener("change",i);let o=new MutationObserver(i);return o.observe(a.documentElement,{attributes:!0,attributeFilter:["class","data-theme","data-color-mode","style"]}),a.body&&o.observe(a.body,{attributes:!0,attributeFilter:["class","style"]}),()=>{u.removeEventListener("change",i),o.disconnect()}},[e]),en.default.createElement(Um.Provider,{value:n?dp:Nm},t)}var St=ot(Qt(),1),Bi="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",hp="cubic-bezier(0.34, 1.56, 0.64, 1)";function yp(){let t=ve();return(0,St.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",children:(0,St.jsx)("path",{d:"M20 9L12.7071 16.2929C12.3166 16.6834 11.6834 16.6834 11.2929 16.2929L4 9",stroke:t.textTertiary,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function qm({selectedElements:t,textSelection:e,onAddToBatch:n,onClearSelection:l,clickPosition:a,isDrawing:i,initialComment:u,onDelete:o,iframeRef:c}){let r=ve(),[y,g]=(0,Yt.useState)(""),[d,m]=(0,Yt.useState)(new Set),b=(0,Yt.useRef)(null),E=(0,Yt.useRef)(null),[O,f]=(0,Yt.useState)(0),[s,h]=(0,Yt.useState)("hidden"),p=(0,Yt.useRef)(null),C=t.length>0||e!==null||i===!0,L=(0,Yt.useRef)(!1);(0,Yt.useEffect)(()=>{C&&!L.current&&(g(u??""),m(new Set)),L.current=C},[C,u]),(0,Yt.useEffect)(()=>{if(C){p.current&&(clearTimeout(p.current),p.current=null),h("entering");let w=0,X=requestAnimationFrame(()=>{w=requestAnimationFrame(()=>{h("visible")})});return()=>{cancelAnimationFrame(X),cancelAnimationFrame(w)}}else h(w=>w==="hidden"?"hidden":"exiting"),p.current=setTimeout(()=>{h("hidden"),p.current=null},200)},[C]),(0,Yt.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]),(0,Yt.useEffect)(()=>{C&&setTimeout(()=>b.current?.focus(),100)},[C]);let[A,q]=(0,Yt.useState)(!1),z=(0,Yt.useRef)(null);if((0,Yt.useEffect)(()=>{if(s!=="visible")return;let w=N=>{E.current?.contains(N.target)||(N.preventDefault(),N.stopPropagation(),q(!0),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{q(!1),z.current=null},400),b.current?.focus())};document.addEventListener("mousedown",w,{capture:!0});let X=null;try{X=c?.current?.contentDocument??null}catch{}return X?.addEventListener("mousedown",w,{capture:!0}),()=>{document.removeEventListener("mousedown",w,{capture:!0}),X?.removeEventListener("mousedown",w,{capture:!0})}},[s,c]),(0,Yt.useEffect)(()=>()=>{z.current&&clearTimeout(z.current)},[]),(0,Yt.useLayoutEffect)(()=>{if(s==="hidden"||!E.current)return;let w=new ResizeObserver(X=>{for(let N of X)f(N.borderBoxSize?.[0]?.blockSize??N.target.getBoundingClientRect().height)});return w.observe(E.current),()=>w.disconnect()},[s]),s==="hidden")return null;let k=s==="visible",wt=w=>{w.preventDefault(),y.trim()&&(n(y.trim()),g(""),m(new Set))},Vt=w=>{w.key==="Enter"&&(w.metaKey||w.ctrlKey)&&wt(w),w.key==="Escape"&&l()},_t=w=>{m(X=>{let N=new Set(X);return N.has(w)?N.delete(w):N.add(w),N})},ee=[];if(i)ee.push({name:"Path",styles:{},key:"drawing-path"});else if(t.forEach((w,X)=>{ee.push({name:w.componentName||w.elementName,styles:w.computedStyles||{},key:w.selector+X})}),e&&t.length===0){let w=e.containingElement;ee.push({name:w.componentName||w.elementName,styles:w.computedStyles||{},key:"text-selection"})}let zt=300,kt=16,ne=window.innerHeight*.8,Tt=O>0?Math.min(O,ne):ne,qt=a??{x:window.scrollX+window.innerWidth-kt-zt,y:window.scrollY+window.innerHeight/2},he=qt.x-window.scrollX,Bt=qt.x+kt;he+kt+zt+kt>window.innerWidth&&(Bt=qt.x-zt-kt),Bt=Math.max(window.scrollX+kt,Math.min(Bt,window.scrollX+window.innerWidth-zt-kt));let Z=qt.y-Tt/2;return Z=Math.max(window.scrollY+kt,Math.min(Z,window.scrollY+window.innerHeight-Tt-kt)),(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)("style",{children:`
40
+ `}return l+="Please process this feedback and make the requested changes.",l}var Ln=ot(be(),1);function Ol(t){if(t.id)return`#${CSS.escape(t.id)}`;let e=[],n=t;for(;n&&n!==document.documentElement;){let l=n.tagName.toLowerCase(),a=Array.from(n.classList).filter(i=>!i.startsWith("__")&&!i.includes("svelte-")&&!/^[a-z]{1,2}$/.test(i)&&!/[_][a-zA-Z0-9]{5,}/.test(i)).slice(0,2);if(a.length>0&&(l+=a.map(i=>`.${CSS.escape(i)}`).join("")),n.parentElement&&n.parentElement.querySelectorAll(`:scope > ${l}`).length>1){let u=Array.from(n.parentElement.children).indexOf(n)+1;l+=`:nth-child(${u})`}if(e.unshift(l),document.querySelectorAll(e.join(" > ")).length===1)break;n=n.parentElement}return e.join(" > ")}function rm(t,e=4){let n=[],l=t,a=0;for(;l&&l!==document.documentElement&&a<e;){let i=l.tagName.toLowerCase(),u=Array.from(l.classList).filter(o=>!/[_][a-zA-Z0-9]{5,}/.test(o)).slice(0,1);n.unshift(u.length>0?`${i}.${u[0]}`:i),l=l.parentElement,a++}return n.join(" > ")}function us(t){let e=t.tagName.toLowerCase(),n=t.getAttribute("data-element");if(n)return n;if(e==="button"||t.getAttribute("role")==="button"){let a=t.getAttribute("aria-label");if(a)return`button [${a}]`;let i=t.textContent?.trim().slice(0,30);return i?`button "${i}"`:"button"}if(e==="a"){let a=t.textContent?.trim().slice(0,30);return a?`link "${a}"`:"link"}if(e==="input"){let a=t.type||"text",i=t.name,u=t.placeholder;return i?`input[${a}] "${i}"`:u?`input[${a}] "${u}"`:`input[${a}]`}if(e==="img"){let a=t.alt;return a?`image "${a.slice(0,30)}"`:"image"}if(/^h[1-6]$/.test(e)){let a=t.textContent?.trim().slice(0,30);return a?`${e} "${a}"`:e}if(t.id)return`#${t.id}`;let l=Array.from(t.classList).filter(a=>!/[_][a-zA-Z0-9]{5,}/.test(a)&&a.length>2).at(0);return l?`${e}.${l}`:e}function sm(t){let e=[],n=t.previousElementSibling;n?.textContent?.trim()&&e.push(`[prev] ${n.textContent.trim().slice(0,50)}`);let l=t.textContent?.trim();l&&e.push(l.slice(0,80));let a=t.nextElementSibling;return a?.textContent?.trim()&&e.push(`[next] ${a.textContent.trim().slice(0,50)}`),e.join(" | ")}function Fg(t){for(let e of Object.keys(t))if(e.startsWith("__reactFiber$")||e.startsWith("__reactInternalInstance$"))return t[e];return null}var Ig=new Set(["AppRouter","Router","HotReload","InnerLayoutRouter","OuterLayoutRouter","RenderFromTemplateContext","ScrollAndFocusHandler","InnerScrollAndFocusHandler","ClientPageRoot","SegmentViewNode","SegmentStateProvider","RootErrorBoundary","AppDevOverlayErrorBoundary","DevRootHTTPAccessFallbackBoundary","Root","ServerRoot","ErrorBoundary","ErrorBoundaryHandler","Suspense","RedirectBoundary","RedirectErrorBoundary","HTTPAccessFallbackBoundary","HTTPAccessFallbackErrorBoundary","LoadingBoundary"]);function Pg(t){if(!t||!t.type||typeof t.type=="string")return!1;let e=t.type.displayName||t.type.name;return!(!e||!/^[A-Z]/.test(e)||Ig.has(e)||/Context$|Provider$/.test(e))}function Hi(t){let e=Fg(t);if(e){let a=e,i=!0;for(;a;){if(Pg(a)){let u=a.type.displayName||a.type.name,o=a._debugSource,c=o?`${o.fileName}:${o.lineNumber}`:null;return{component:u,source:c,isComponentRoot:i}}a===e.return&&(i=!1),a=a.return}}let n=t,l=!0;for(;n&&n!==document.documentElement;){let a=n.getAttribute("data-iterate-component"),i=n.getAttribute("data-iterate-source");if(a)return{component:a,source:i,isComponentRoot:l};n=n.parentElement,l=!1}return{component:null,source:null,isComponentRoot:!1}}var tp=new Set(["p","span","h1","h2","h3","h4","h5","h6","label","a","li"]),ep=new Set(["div","section","main","article","aside","nav","header","footer"]),np=new Set(["button","input","select","textarea"]),om=["color","font-size","font-weight","font-family","line-height","text-align","text-decoration","letter-spacing"],cm=["display","flex-direction","justify-content","align-items","gap","grid-template-columns","grid-template-rows","padding","margin","background-color","border-radius","overflow"],lp=["background-color","color","padding","border-radius","font-size","font-weight","border","cursor","outline"],ap=["position","top","left","right","bottom","z-index","width","height"],ip=new Set(["none","normal","auto","0px","transparent","rgba(0, 0, 0, 0)"]);function za(t){let e=window.getComputedStyle(t),n=t.tagName.toLowerCase(),l={},a=[...ap];tp.has(n)?a=a.concat(om):np.has(n)?a=a.concat(lp):ep.has(n)?a=a.concat(cm):a=a.concat(cm,om);for(let i of a){let u=e.getPropertyValue(i);u&&!ip.has(u)&&(l[i]=u)}return l}var sl=ot(Qt(),1);function hm({active:t,iframeRef:e,selectedElements:n,onSelect:l,suppressHover:a,justFinishedDragRef:i}){let[u,o]=(0,Ln.useState)(null),[c,r]=(0,Ln.useState)(""),[y,g]=(0,Ln.useState)(null),d=(0,Ln.useCallback)(()=>{try{return e.current?.contentDocument??document}catch{return document}},[e]);return(0,Ln.useEffect)(()=>{a&&(o(null),g(null))},[a]),(0,Ln.useEffect)(()=>{if(!t){o(null),g(null);return}let m=d(),b=f=>!!f.closest("#__iterate-overlay-root__")||!!f.closest("#__iterate-markers-layer__")||!!f.closest("#__iterate-fixed-markers-layer__"),E=f=>{if(a)return;let s=f.target;if(!s||s===m.documentElement||b(s)){o(null),g(null);return}let h=s.getBoundingClientRect();o({x:h.x,y:h.y,width:h.width,height:h.height}),g({x:f.clientX,y:f.clientY});let{component:p,isComponentRoot:C}=Hi(s);r(p&&C?`<${p}>`:us(s))},O=f=>{if(i?.current){i.current=!1;return}let s=f.target;if(!s||b(s))return;f.preventDefault(),f.stopPropagation();let h=Hl(s),p={x:f.clientX,y:f.clientY};if(f.ctrlKey||f.metaKey){let L=n.findIndex(A=>A.selector===h.selector);if(L>=0){let A=[...n];A.splice(L,1),l(A,p)}else l([...n,h],p)}else l([h],p)};return m.addEventListener("mousemove",E),m.addEventListener("click",O,{capture:!0}),()=>{m.removeEventListener("mousemove",E),m.removeEventListener("click",O,{capture:!0})}},[t,d,l,n,a]),t?(0,sl.jsx)("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:u&&(0,sl.jsxs)(sl.Fragment,{children:[(0,sl.jsx)("div",{style:{position:"absolute",left:u.x,top:u.y,width:u.width,height:u.height,border:"1.5px solid #6b9eff",backgroundColor:"rgba(107, 158, 255, 0.06)",borderRadius:4,pointerEvents:"none",boxSizing:"border-box",transition:"all 0.1s ease"}}),y&&(0,sl.jsx)("div",{style:{position:"absolute",left:y.x+12,top:y.y+16,background:"#6b9eff",color:"#fff",padding:"2px 8px",borderRadius:4,fontSize:11,fontFamily:"monospace",whiteSpace:"nowrap",pointerEvents:"none",maxWidth:400,overflow:"hidden",textOverflow:"ellipsis"},children:c})]})}):null}function Hl(t){let e=t.getBoundingClientRect(),{component:n,source:l,isComponentRoot:a}=Hi(t);return{domElement:t,selector:Ol(t),elementName:us(t),elementPath:rm(t),rect:{x:e.x,y:e.y,width:e.width,height:e.height},computedStyles:za(t),nearbyText:sm(t),componentName:a?n:null,sourceLocation:a?l:null}}var dn=ot(be(),1);var Li=ot(Qt(),1);function ym({active:t,iframeRef:e,onSelect:n,onDragStateChange:l,justFinishedDragRef:a}){let[i,u]=(0,dn.useState)(null),[o,c]=(0,dn.useState)(null),[r,y]=(0,dn.useState)([]),g=(0,dn.useRef)(0),d=(0,dn.useCallback)(()=>{try{return e.current?.contentDocument??document}catch{return document}},[e]);return(0,dn.useEffect)(()=>{if(!t){u(null),c(null);return}let m=d(),b=!1,E={x:0,y:0},O=h=>{if(h.button!==0||h.ctrlKey||h.metaKey)return;let p=h.target;p.closest("#__iterate-overlay-root__")||p.closest("#__iterate-markers-layer__")||(h.preventDefault(),b=!0,E={x:h.clientX,y:h.clientY},c(E),l?.(!0))},f=h=>{if(!b)return;let p=Math.min(E.x,h.clientX),C=Math.min(E.y,h.clientY),L=Math.abs(h.clientX-E.x),A=Math.abs(h.clientY-E.y);if(L>10||A>10){let q={x:p,y:C,width:L,height:A};u(q);let z=Date.now();if(z-g.current>80){g.current=z;let k=cp(m,q);y(k)}}},s=h=>{if(!b)return;b=!1,l?.(!1);let p={x:Math.min(E.x,h.clientX),y:Math.min(E.y,h.clientY),width:Math.abs(h.clientX-E.x),height:Math.abs(h.clientY-E.y)};if(u(null),c(null),y([]),p.width<20||p.height<20)return;let C=rp(m,p);C.length>0&&(a&&(a.current=!0),n(C))};return m.addEventListener("mousedown",O),m.addEventListener("mousemove",f),m.addEventListener("mouseup",s),()=>{m.removeEventListener("mousedown",O),m.removeEventListener("mousemove",f),m.removeEventListener("mouseup",s)}},[t,d,n,l]),!t||!i?null:(0,Li.jsxs)("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[(0,Li.jsx)("div",{style:{position:"absolute",left:i.x,top:i.y,width:i.width,height:i.height,border:"1.5px dashed #6b9eff",backgroundColor:"rgba(107, 158, 255, 0.06)",borderRadius:3,pointerEvents:"none"}}),r.map((m,b)=>(0,Li.jsx)("div",{style:{position:"absolute",left:m.x,top:m.y,width:m.width,height:m.height,border:"1.5px solid #6b9eff",borderRadius:4,pointerEvents:"none",boxSizing:"border-box"}},b))]})}function gm(t,e,n){return t.left>=e.x-n&&t.right<=e.x+e.width+n&&t.top>=e.y-n&&t.bottom<=e.y+e.height+n}var pm=new Set(["html","body","head","script","style","meta","link","noscript"]),vm=t=>!!t.closest("#__iterate-overlay-root__")||!!t.closest("#__iterate-markers-layer__"),bm=8;function cp(t,e){let n=new Set,l=t.querySelectorAll("*");for(let i of l){if(pm.has(i.tagName.toLowerCase())||vm(i))continue;let u=i.getBoundingClientRect();u.width===0||u.height===0||u.width>e.width*2&&u.height>e.height*2||gm(u,e,bm)&&n.add(i)}let a=[];for(let i of n){let u=i.parentElement,o=!1;for(;u;){if(n.has(u)){o=!0;break}u=u.parentElement}if(!o){let c=i.getBoundingClientRect();a.push({x:c.x,y:c.y,width:c.width,height:c.height})}}return a}function rp(t,e){let n=new Set,l=t.querySelectorAll("*");for(let i of l){if(pm.has(i.tagName.toLowerCase())||vm(i))continue;let u=i.getBoundingClientRect();u.width===0||u.height===0||u.width>e.width*2&&u.height>e.height*2||gm(u,e,bm)&&n.add(i)}let a=[];for(let i of n){let u=i.parentElement,o=!1;for(;u;){if(n.has(u)){o=!0;break}u=u.parentElement}o||a.push(Hl(i))}return a}var Ll=ot(be(),1);var yo=ot(Qt(),1);function Sm({active:t,iframeRef:e,onTextSelect:n}){let[l,a]=(0,Ll.useState)(null),[i,u]=(0,Ll.useState)(""),o=(0,Ll.useCallback)(()=>{try{return e.current?.contentDocument??document}catch{return document}},[e]);return(0,Ll.useEffect)(()=>{if(!t){a(null),u("");return}let c=o(),r=()=>{let m=c.getSelection();if(!m||m.isCollapsed||!m.rangeCount){a(null),u(""),n(null);return}let b=m.getRangeAt(0),E=m.toString().trim();if(!E||E.length<2){a(null),u("");return}let O=b.commonAncestorContainer,f=O.nodeType===Node.ELEMENT_NODE?O:O.parentElement;if(!f)return;let s=Hl(f),h=b.getBoundingClientRect();a({x:h.x+h.width/2,y:h.y-4}),u(E),n({text:E,containingElement:{selector:s.selector,elementName:s.elementName,elementPath:s.elementPath,rect:s.rect,computedStyles:s.computedStyles,nearbyText:s.nearbyText,componentName:s.componentName,sourceLocation:s.sourceLocation},startOffset:b.startOffset,endOffset:b.endOffset})},y,g=()=>{clearTimeout(y),y=setTimeout(r,150)};c.addEventListener("selectionchange",g);let d=()=>{setTimeout(r,50)};return c.addEventListener("mouseup",d),()=>{clearTimeout(y),c.removeEventListener("selectionchange",g),c.removeEventListener("mouseup",d)}},[t,o,n]),!t||!l||!i?null:(0,yo.jsx)("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:(0,yo.jsxs)("div",{style:{position:"absolute",left:l.x,top:l.y,transform:"translate(-50%, -100%)",background:"#2563eb",color:"#fff",padding:"3px 8px",borderRadius:4,fontSize:10,fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",whiteSpace:"nowrap",pointerEvents:"none",maxWidth:250,overflow:"hidden",textOverflow:"ellipsis"},children:['"',i.slice(0,50),i.length>50?"...":"",'"']})})}var tn=ot(be(),1);var Bl=ot(Qt(),1),Em="#2563eb",xm=3;function Mm({active:t,iframeRef:e,onDrawComplete:n}){let[l,a]=(0,tn.useState)(!1),[i,u]=(0,tn.useState)([]),[o,c]=(0,tn.useState)([]),r=(0,tn.useRef)([]),y=(0,tn.useCallback)(()=>{try{return e.current?.contentDocument??document}catch{return document}},[e]);if((0,tn.useEffect)(()=>{t||c([])},[t]),(0,tn.useEffect)(()=>{if(!t){a(!1),u([]),r.current=[];return}let d=y(),m=O=>{if(O.button!==0||O.target?.closest?.("#__iterate-markers-layer__, #__iterate-fixed-markers-layer__, [data-iterate-popup], [data-iterate-panel]"))return;O.preventDefault(),O.stopPropagation(),a(!0);let s={x:O.clientX,y:O.clientY};r.current=[s],u([s])},b=O=>{if(!l)return;let f={x:O.clientX,y:O.clientY};r.current.push(f),r.current.length%2===0&&u([...r.current])},E=O=>{if(!l)return;a(!1);let f=r.current;if(f.length<3){u([]),r.current=[];return}let s=Tm(f),h=sp(f),p={path:s,bounds:h,strokeColor:Em,strokeWidth:xm},C=fp(d,h);c(L=>[...L,p]),u([]),r.current=[],n(C,p)};return d.addEventListener("mousedown",m,{capture:!0}),d.addEventListener("mousemove",b),d.addEventListener("mouseup",E),()=>{d.removeEventListener("mousedown",m,{capture:!0}),d.removeEventListener("mousemove",b),d.removeEventListener("mouseup",E)}},[t,l,y,n]),!t)return null;let g=i.length>=2?Tm(i):null;return(0,Bl.jsxs)("div",{style:{position:"absolute",inset:0,pointerEvents:"none",cursor:"crosshair"},children:[(0,Bl.jsxs)("svg",{style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"},children:[o.map((d,m)=>(0,Bl.jsx)("path",{d:d.path,fill:"none",stroke:d.strokeColor,strokeWidth:d.strokeWidth,strokeLinecap:"round",strokeLinejoin:"round",opacity:.6},`completed-${m}`)),g&&(0,Bl.jsx)("path",{d:g,fill:"none",stroke:Em,strokeWidth:xm,strokeLinecap:"round",strokeLinejoin:"round"})]}),!l&&(0,Bl.jsx)("div",{style:{position:"absolute",inset:0,pointerEvents:"auto",cursor:"crosshair"}})]})}function Tm(t){if(t.length===0)return"";let e=[`M ${t[0].x} ${t[0].y}`];for(let n=1;n<t.length-1;n++){let l=t[n],a=t[n+1],i=(l.x+a.x)/2,u=(l.y+a.y)/2;e.push(`Q ${l.x} ${l.y} ${i} ${u}`)}if(t.length>1){let n=t[t.length-1];e.push(`L ${n.x} ${n.y}`)}return e.join(" ")}function sp(t){let e=1/0,n=1/0,l=-1/0,a=-1/0;for(let i of t)i.x<e&&(e=i.x),i.y<n&&(n=i.y),i.x>l&&(l=i.x),i.y>a&&(a=i.y);return{x:e,y:n,width:l-e,height:a-n}}function fp(t,e){let n=[],l=new Set,a=10,i={x:e.x-a,y:e.y-a,width:e.width+a*2,height:e.height+a*2},u=t.querySelectorAll("*");for(let o of u){let c=o.tagName.toLowerCase();if(["html","body","head","script","style","meta","link","noscript"].includes(c)||o.closest("#__iterate-overlay-root__")||o.closest("#__iterate-markers-layer__"))continue;let r=o.getBoundingClientRect();if(!(r.width===0||r.height===0)&&!(r.width>i.width*3&&r.height>i.height*3)&&r.left<i.x+i.width&&r.right>i.x&&r.top<i.y+i.height&&r.bottom>i.y){let y=!1,g=o.parentElement;for(;g;){if(l.has(g)){y=!0;break}g=g.parentElement}if(!y){for(let d=n.length-1;d>=0;d--)o.contains(n[d].domElement)&&n.splice(d,1);l.add(o),n.push(Hl(o))}}}return n}var Yt=ot(be(),1);var r2=ot(be(),1),gt=ot(Qt(),1);function Cm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M10 4H11C11 3.44772 10.5523 3 10 3V4ZM10 10V11C10.5523 11 11 10.5523 11 10H10ZM4 10H3C3 10.5523 3.44772 11 4 11V10ZM4.54601 4.10899L5 5L4.54601 4.10899ZM4.10899 4.54601L5 5L4.10899 4.54601ZM14 4V3C13.4477 3 13 3.44772 13 4H14ZM20 10V11C20.5523 11 21 10.5523 21 10H20ZM14 10H13C13 10.5523 13.4477 11 14 11V10ZM19.454 4.10899L19 5L19.454 4.10899ZM19.891 4.54601L19 5L19.891 4.54601ZM4 14V13C3.44772 13 3 13.4477 3 14H4ZM10 14H11C11 13.4477 10.5523 13 10 13V14ZM10 20V21C10.5523 21 11 20.5523 11 20H10ZM4.54601 19.891L5 19L4.54601 19.891ZM4.10899 19.454L5 19L4.10899 19.454ZM20.2929 21.7076C20.6834 22.0981 21.3166 22.0981 21.7071 21.7076C22.0976 21.317 22.0976 20.6839 21.7071 20.2934L21 21.0005L20.2929 21.7076ZM5.6 4V5H10V4V3H5.6V4ZM10 4H9V10H10H11V4H10ZM10 10V9H4V10V11H10V10ZM4 10H5V5.6H4H3V10H4ZM5.6 4V3C5.33647 3 5.07869 2.99922 4.86177 3.01695C4.63318 3.03562 4.36344 3.07969 4.09202 3.21799L4.54601 4.10899L5 5C4.94249 5.0293 4.91972 5.01887 5.02463 5.0103C5.14122 5.00078 5.30347 5 5.6 5V4ZM4 5.6H5C5 5.30347 5.00078 5.14122 5.0103 5.02463C5.01887 4.91972 5.0293 4.94249 5 5L4.10899 4.54601L3.21799 4.09202C3.07969 4.36344 3.03562 4.63318 3.01695 4.86177C2.99922 5.07869 3 5.33647 3 5.6H4ZM4.54601 4.10899L4.09202 3.21799C3.71569 3.40973 3.40973 3.71569 3.21799 4.09202L4.10899 4.54601L5 5V5L4.54601 4.10899ZM14 4V5H18.4V4V3H14V4ZM20 5.6H19V10H20H21V5.6H20ZM20 10V9H14V10V11H20V10ZM14 10H15V4H14H13V10H14ZM18.4 4V5C18.6965 5 18.8588 5.00078 18.9754 5.0103C19.0803 5.01887 19.0575 5.0293 19 5L19.454 4.10899L19.908 3.21799C19.6366 3.07969 19.3668 3.03562 19.1382 3.01695C18.9213 2.99922 18.6635 3 18.4 3V4ZM20 5.6H21C21 5.33647 21.0008 5.07869 20.9831 4.86177C20.9644 4.63318 20.9203 4.36344 20.782 4.09202L19.891 4.54601L19 5C18.9707 4.94249 18.9811 4.91972 18.9897 5.02463C18.9992 5.14122 19 5.30347 19 5.6H20ZM19.454 4.10899L19 5V5L19.891 4.54601L20.782 4.09202C20.5903 3.7157 20.2843 3.40973 19.908 3.21799L19.454 4.10899ZM4 14V15H10V14V13H4V14ZM10 14H9V20H10H11V14H10ZM10 20V19H5.6V20V21H10V20ZM4 18.4H5V14H4H3V18.4H4ZM5.6 20V19C5.30347 19 5.14122 18.9992 5.02463 18.9897C4.91972 18.9811 4.94249 18.9707 5 19L4.54601 19.891L4.09202 20.782C4.36344 20.9203 4.63318 20.9644 4.86177 20.9831C5.07869 21.0008 5.33647 21 5.6 21V20ZM4 18.4H3C3 18.6635 2.99922 18.9213 3.01695 19.1382C3.03562 19.3668 3.07969 19.6366 3.21799 19.908L4.10899 19.454L5 19C5.0293 19.0575 5.01887 19.0803 5.0103 18.9754C5.00078 18.8588 5 18.6965 5 18.4H4ZM4.54601 19.891L5 19V19L4.10899 19.454L3.21799 19.908C3.40973 20.2843 3.7157 20.5903 4.09202 20.782L4.54601 19.891ZM19.1213 19.1218L18.4142 18.4147C17.6332 19.1957 16.3668 19.1957 15.5858 18.4147L14.8787 19.1218L14.1716 19.8289C15.7337 21.391 18.2663 21.391 19.8284 19.8289L19.1213 19.1218ZM14.8787 19.1218L15.5858 18.4147C14.8047 17.6336 14.8047 16.3673 15.5858 15.5862L14.8787 14.8791L14.1716 14.172C12.6095 15.7341 12.6095 18.2668 14.1716 19.8289L14.8787 19.1218ZM14.8787 14.8791L15.5858 15.5862C16.3668 14.8052 17.6332 14.8052 18.4142 15.5862L19.1213 14.8791L19.8284 14.172C18.2663 12.6099 15.7337 12.6099 14.1716 14.172L14.8787 14.8791ZM19.1213 14.8791L18.4142 15.5862C19.1953 16.3673 19.1953 17.6336 18.4142 18.4147L19.1213 19.1218L19.8284 19.8289C21.3905 18.2668 21.3905 15.7341 19.8284 14.172L19.1213 14.8791ZM19.1213 19.1218L18.4142 19.8289L20.2929 21.7076L21 21.0005L21.7071 20.2934L19.8284 18.4147L19.1213 19.1218Z",fill:e})})}function wm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M15 9L9 15M15 15L9 9M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:e,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function _m({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M11 3V4.5M16.6569 5.34326L15.5962 6.40392M6.40381 15.5962L5.34315 16.6569M4.5 11H3M6.40381 6.40381L5.34315 5.34315M14.3136 20.7675L10.4536 10.7769C10.3754 10.5745 10.5745 10.3754 10.7769 10.4536L20.7675 14.3136C20.9626 14.3889 20.9844 14.6562 20.8042 14.7623L17.0559 16.9671C17.0192 16.9887 16.9887 17.0192 16.9671 17.0559L14.7623 20.8042C14.6562 20.9844 14.3889 20.9626 14.3136 20.7675Z",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Am({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M8.99989 5.74989L11.4696 3.28022C11.7624 2.98732 12.2373 2.98732 12.5302 3.28022L14.9999 5.74989M5.74989 8.99989L3.28022 11.4696C2.98732 11.7624 2.98732 12.2373 3.28022 12.5302L5.74989 14.9999M18.2499 8.99989L20.7196 11.4696C21.0125 11.7624 21.0125 12.2373 20.7196 12.5302L18.2499 14.9999M14.9999 18.2499L12.5302 20.7196C12.2373 21.0125 11.7624 21.0125 11.4696 20.7196L8.99989 18.2499M11.9999 3.99989V11.9999M11.9999 11.9999V19.9999M11.9999 11.9999H3.99989M11.9999 11.9999H19.9999",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Da({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M5.93777 20.0665L6.93555 20L5.93777 20.0665ZM18.0622 20.0665L17.0644 20L18.0622 20.0665ZM3 5C2.44772 5 2 5.44772 2 6C2 6.55228 2.44772 7 3 7V6V5ZM21 7C21.5523 7 22 6.55228 22 6C22 5.44772 21.5523 5 21 5V6V7ZM11 11C11 10.4477 10.5523 10 10 10C9.44772 10 9 10.4477 9 11H10H11ZM9 16C9 16.5523 9.44772 17 10 17C10.5523 17 11 16.5523 11 16H10H9ZM15 11C15 10.4477 14.5523 10 14 10C13.4477 10 13 10.4477 13 11H14H15ZM13 16C13 16.5523 13.4477 17 14 17C14.5523 17 15 16.5523 15 16H14H13ZM14.9056 6.24926C15.0432 6.78411 15.5884 7.1061 16.1233 6.96844C16.6581 6.83078 16.9801 6.28559 16.8424 5.75074L15.874 6L14.9056 6.24926ZM5 6L4.00221 6.06652L4.93998 20.133L5.93777 20.0665L6.93555 20L5.99779 5.93348L5 6ZM6.93555 21V22H17.0644V21V20H6.93555V21ZM18.0622 20.0665L19.06 20.133L19.9978 6.06652L19 6L18.0022 5.93348L17.0644 20L18.0622 20.0665ZM19 6V5H5V6V7H19V6ZM3 6V7H5V6V5H3V6ZM19 6V7H21V6V5H19V6ZM17.0644 21V22C18.1174 22 18.99 21.1836 19.06 20.133L18.0622 20.0665L17.0644 20H17.0644V21ZM5.93777 20.0665L4.93998 20.133C5.01002 21.1836 5.88262 22 6.93555 22V21V20V20L5.93777 20.0665ZM10 11H9V16H10H11V11H10ZM14 11H13V16H14H15V11H14ZM12 3V4C13.3965 4 14.5725 4.95512 14.9056 6.24926L15.874 6L16.8424 5.75074C16.2874 3.59442 14.3312 2 12 2V3ZM8.12604 6L9.09447 6.24926C9.42756 4.95512 10.6035 4 12 4V3V2C9.66885 2 7.7126 3.59442 7.1576 5.75074L8.12604 6Z",fill:e})})}function zm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M4.4834 14.6667C5.58163 17.7738 8.54493 20 12.0282 20C16.4465 20 20.0282 16.4183 20.0282 12C20.0282 7.58172 16.4465 4 12.0282 4C9.14453 4 7.27034 5.30135 5.41072 7.5M4.99986 4V7.5C4.99986 7.77614 5.22372 8 5.49986 8H8.99986",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Dm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M6.5 8C7.88071 8 9 6.88071 9 5.5C9 4.11929 7.88071 3 6.5 3C5.11929 3 4 4.11929 4 5.5C4 6.88071 5.11929 8 6.5 8ZM6.5 8V11C6.5 11.5523 6.94772 12 7.5 12H11C11.5523 12 12 12.4477 12 13M17.5 8C18.8807 8 20 6.88071 20 5.5C20 4.11929 18.8807 3 17.5 3C16.1193 3 15 4.11929 15 5.5C15 6.88071 16.1193 8 17.5 8ZM17.5 8V11C17.5 11.5523 17.0523 12 16.5 12H13C12.4477 12 12 12.4477 12 13M12 16C10.6193 16 9.5 17.1193 9.5 18.5C9.5 19.8807 10.6193 21 12 21C13.3807 21 14.5 19.8807 14.5 18.5C14.5 17.1193 13.3807 16 12 16ZM12 16V13",stroke:e,strokeWidth:2})})}function Rm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M6.5 8C7.88071 8 9 6.88071 9 5.5C9 4.11929 7.88071 3 6.5 3C5.11929 3 4 4.11929 4 5.5C4 6.88071 5.11929 8 6.5 8ZM6.5 8V16M6.5 16C5.11929 16 4 17.1193 4 18.5C4 19.8807 5.11929 21 6.5 21C7.88071 21 9 19.8807 9 18.5C9 17.1193 7.88071 16 6.5 16ZM17.5 16C16.1193 16 15 17.1193 15 18.5C15 19.8807 16.1193 21 17.5 21C18.8807 21 20 19.8807 20 18.5C20 17.1193 18.8807 16 17.5 16ZM17.5 16V6.5C17.5 5.94772 17.0523 5.5 16.5 5.5H12M12 5.5L14.5 3M12 5.5L14.5 8",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Om({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M9 9V3.5C9 3.22386 9.22386 3 9.5 3H20.5C20.7761 3 21 3.22386 21 3.5V14.5C21 14.7761 20.7761 15 20.5 15H15M14.5 9H3.5C3.22386 9 3 9.22386 3 9.5V20.5C3 20.7761 3.22386 21 3.5 21H14.5C14.7761 21 15 20.7761 15 20.5V9.5C15 9.22386 14.7761 9 14.5 9Z",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Hm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M11.2479 10L15.2496 14.0017M15.2513 10L11.2496 14.0017M3.41478 11.4188L7.7005 5.41876C7.88821 5.15597 8.19128 5 8.51423 5H19.9996C20.5519 5 20.9996 5.44772 20.9996 6V18C20.9996 18.5523 20.5519 19 19.9996 19H8.51423C8.19128 19 7.88821 18.844 7.7005 18.5812L3.41478 12.5812C3.16643 12.2335 3.16643 11.7665 3.41478 11.4188Z",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Lm({size:t=24,color:e="currentColor"}){return(0,gt.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:(0,gt.jsx)("path",{d:"M12.0003 21C11.5003 21 8.93732 20.1294 6.71782 17.9099C3.00784 14.1999 2.05809 9.13461 4.5965 6.5962C6.68218 4.51052 10.4738 4.77972 13.8179 7.00001M17.1066 10C19.9927 13.3312 21.2146 16.7286 19.0003 18.5C17.3415 19.8271 15.2424 18.2924 14.0176 17.1094M11.0003 13H13.6027C13.8683 13 14.1231 12.8943 14.3107 12.7062L20.2949 6.70711C20.6846 6.31644 20.6842 5.68395 20.294 5.29377L18.7074 3.70711C18.3168 3.31659 17.6837 3.31659 17.2931 3.70711L11.2932 9.70712C11.1057 9.89465 11.0003 10.149 11.0003 10.4142V13Z",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})})}function Bm({size:t=24,color:e="currentColor",animate:n=!1}){return(0,gt.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[(0,gt.jsx)("path",{d:"M7 13L10 16L17 8",stroke:e,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",...n?{strokeDasharray:20,strokeDashoffset:20,style:{animation:"iterate-check-draw 0.35s ease-out 0.1s forwards"}}:{}}),n&&(0,gt.jsx)("style",{children:"@keyframes iterate-check-draw { to { stroke-dashoffset: 0; } }"})]})}function go({size:t=24,color:e="currentColor"}){return(0,gt.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:{animation:"iterate-spin 0.8s linear infinite"},children:[(0,gt.jsx)("style",{children:"@keyframes iterate-spin { to { transform: rotate(360deg); } }"}),(0,gt.jsx)("circle",{cx:12,cy:12,r:9,stroke:e,strokeWidth:2,strokeLinecap:"round",strokeDasharray:"42 14"})]})}var en=ot(be(),1),Nm={panelBg:"#f7f7f7",cardBg:"#fff",toolbarBg:"#fff",drawerBg:"#efefef",hoverBg:"#f0f0f0",activeBg:"#e8e8e8",border:"#e0e0e0",textPrimary:"#333",textSecondary:"#666",textTertiary:"#999",textDisabled:"#888",iconDefault:"#666",iconHover:"#141414",suspenseOverlay:"rgba(255,255,255,0.75)",spinnerBg:"#e0e0e0",spinnerFg:"#666",tooltipBg:"#fff",tooltipText:"#333",tooltipKeyBg:"#f0f0f0",tooltipKeyText:"#888",buttonBg:"#333",buttonText:"#fff"},dp={panelBg:"#1e1e1e",cardBg:"#2a2a2a",toolbarBg:"#2a2a2a",drawerBg:"#252525",hoverBg:"#333",activeBg:"#3a3a3a",border:"#3a3a3a",textPrimary:"#e0e0e0",textSecondary:"#999",textTertiary:"#666",textDisabled:"#555",iconDefault:"#999",iconHover:"#e0e0e0",suspenseOverlay:"rgba(30,30,30,0.75)",spinnerBg:"#3a3a3a",spinnerFg:"#999",tooltipBg:"#2a2a2a",tooltipText:"#e0e0e0",tooltipKeyBg:"rgba(255,255,255,0.1)",tooltipKeyText:"#777",buttonBg:"#e0e0e0",buttonText:"#1e1e1e"};function mp(t){let e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);if(!e||(e[4]!==void 0?Number(e[4]):1)<.1)return null;let[l,a,i]=[Number(e[1])/255,Number(e[2])/255,Number(e[3])/255],u=o=>o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4);return .2126*u(l)+.7152*u(a)+.0722*u(i)}function os(t){let e=t??document,n=e.documentElement,l=n.getAttribute("data-theme")??n.getAttribute("data-color-mode")??"";if(l==="dark")return!0;if(l==="light")return!1;if(n.classList.contains("dark"))return!0;if(n.classList.contains("light"))return!1;let a=e.defaultView?.getComputedStyle(n).colorScheme??"";if(a==="dark")return!0;if(a==="light")return!1;let i=e.body;if(i){let u=e.defaultView?.getComputedStyle(i).colorScheme??"";if(u==="dark")return!0;if(u==="light")return!1}for(let u of[i,n]){if(!u)continue;let o=e.defaultView?.getComputedStyle(u).backgroundColor??"",c=mp(o);if(c!==null&&c<.2)return!0;if(c!==null&&c>.8)return!1}return window.matchMedia("(prefers-color-scheme: dark)").matches}var Um=(0,en.createContext)(Nm);function ve(){return(0,en.useContext)(Um)}function cs({children:t,targetDocument:e}){let[n,l]=(0,en.useState)(()=>os(e));return(0,en.useEffect)(()=>{l(os(e))},[e]),(0,en.useEffect)(()=>{let a=e??document,i=()=>l(os(a)),u=window.matchMedia("(prefers-color-scheme: dark)");u.addEventListener("change",i);let o=new MutationObserver(i);return o.observe(a.documentElement,{attributes:!0,attributeFilter:["class","data-theme","data-color-mode","style"]}),a.body&&o.observe(a.body,{attributes:!0,attributeFilter:["class","style"]}),()=>{u.removeEventListener("change",i),o.disconnect()}},[e]),en.default.createElement(Um.Provider,{value:n?dp:Nm},t)}var St=ot(Qt(),1),Bi="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",hp="cubic-bezier(0.34, 1.56, 0.64, 1)";function yp(){let t=ve();return(0,St.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",children:(0,St.jsx)("path",{d:"M20 9L12.7071 16.2929C12.3166 16.6834 11.6834 16.6834 11.2929 16.2929L4 9",stroke:t.textTertiary,strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function qm({selectedElements:t,textSelection:e,onAddToBatch:n,onClearSelection:l,clickPosition:a,isDrawing:i,initialComment:u,onDelete:o,iframeRef:c}){let r=ve(),[y,g]=(0,Yt.useState)(""),[d,m]=(0,Yt.useState)(new Set),b=(0,Yt.useRef)(null),E=(0,Yt.useRef)(null),[O,f]=(0,Yt.useState)(0),[s,h]=(0,Yt.useState)("hidden"),p=(0,Yt.useRef)(null),C=t.length>0||e!==null||i===!0,L=(0,Yt.useRef)(!1);(0,Yt.useEffect)(()=>{C&&!L.current&&(g(u??""),m(new Set)),L.current=C},[C,u]),(0,Yt.useEffect)(()=>{if(C){p.current&&(clearTimeout(p.current),p.current=null),h("entering");let w=0,X=requestAnimationFrame(()=>{w=requestAnimationFrame(()=>{h("visible")})});return()=>{cancelAnimationFrame(X),cancelAnimationFrame(w)}}else h(w=>w==="hidden"?"hidden":"exiting"),p.current=setTimeout(()=>{h("hidden"),p.current=null},200)},[C]),(0,Yt.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]),(0,Yt.useEffect)(()=>{C&&setTimeout(()=>b.current?.focus(),100)},[C]);let[A,q]=(0,Yt.useState)(!1),z=(0,Yt.useRef)(null);if((0,Yt.useEffect)(()=>{if(s!=="visible")return;let w=N=>{E.current?.contains(N.target)||(N.preventDefault(),N.stopPropagation(),q(!0),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{q(!1),z.current=null},400),b.current?.focus())};document.addEventListener("mousedown",w,{capture:!0});let X=null;try{X=c?.current?.contentDocument??null}catch{}return X?.addEventListener("mousedown",w,{capture:!0}),()=>{document.removeEventListener("mousedown",w,{capture:!0}),X?.removeEventListener("mousedown",w,{capture:!0})}},[s,c]),(0,Yt.useEffect)(()=>()=>{z.current&&clearTimeout(z.current)},[]),(0,Yt.useLayoutEffect)(()=>{if(s==="hidden"||!E.current)return;let w=new ResizeObserver(X=>{for(let N of X)f(N.borderBoxSize?.[0]?.blockSize??N.target.getBoundingClientRect().height)});return w.observe(E.current),()=>w.disconnect()},[s]),s==="hidden")return null;let k=s==="visible",wt=w=>{w.preventDefault(),y.trim()&&(n(y.trim()),g(""),m(new Set))},Vt=w=>{w.key==="Enter"&&(w.metaKey||w.ctrlKey)&&wt(w),w.key==="Escape"&&l()},_t=w=>{m(X=>{let N=new Set(X);return N.has(w)?N.delete(w):N.add(w),N})},ee=[];if(i)ee.push({name:"Path",styles:{},key:"drawing-path"});else if(t.forEach((w,X)=>{ee.push({name:w.componentName||w.elementName,styles:w.computedStyles||{},key:w.selector+X})}),e&&t.length===0){let w=e.containingElement;ee.push({name:w.componentName||w.elementName,styles:w.computedStyles||{},key:"text-selection"})}let zt=300,kt=16,ne=window.innerHeight*.8,Tt=O>0?Math.min(O,ne):ne,qt=a??{x:window.scrollX+window.innerWidth-kt-zt,y:window.scrollY+window.innerHeight/2},he=qt.x-window.scrollX,Bt=qt.x+kt;he+kt+zt+kt>window.innerWidth&&(Bt=qt.x-zt-kt),Bt=Math.max(window.scrollX+kt,Math.min(Bt,window.scrollX+window.innerWidth-zt-kt));let Z=qt.y-Tt/2;return Z=Math.max(window.scrollY+kt,Math.min(Z,window.scrollY+window.innerHeight-Tt-kt)),(0,St.jsxs)(St.Fragment,{children:[(0,St.jsx)("style",{children:`
41
41
  @keyframes iterate-panel-shake {
42
42
  0% { transform: translateX(0); }
43
43
  15% { transform: translateX(-6px); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iterate-ui-overlay",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "iterate browser overlay — annotation canvas, element inspector, DOM manipulation",
5
5
  "license": "MIT",
6
6
  "repository": {