1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2465],{12465:function(e,t,n){n.r(t),n.d(t,{DocumentBlockEditor:function(){return eZ}});var o=n(37821),r=n(58078),l=n(14404),i=n(80388),a=n(87793),s=n(33502),u=n(98552),c=n(45410),d=n(99419),m=n(13346),h=n(82522),p=n(20981),f=n(39723),g=n(30561),x=n(34265),b=n(67632),v=n(80271),w=n(53392),k=n(18890),y=n(31237),j=n(9824),N=n(93925),Z=n(18590),C=n(21166),A=n(47315),S=n(79044),E=n(76744),T=n(4916),D=n(99985),L=n(37507),R=n(42226),B=n(94312),M=n(34621),z=n(76515),H=n(26135),I=n(5391),P=n(36136),_=n(5189),U=n(85319),F=n(55118),q=n(80013),O=n(32657),$=n(38580),J=n(57115),W=n(67004),K=n(47415),Q=n(77422),G=n(32563),V=n(33555),Y=n(51053);let X={spread:{default:!1,rendered:!1}},ee=e=>e.extend({addAttributes(){var e;return{...null===(e=this.parent)||void 0===e?void 0:e.call(this),...X}}}),et=K.ZP.extend({excludes:""}),en={align:{default:null,parseHTML:e=>e.style.textAlign||null,renderHTML:e=>e.align?{style:"text-align: ".concat(e.align)}:{}}},eo=e=>e.extend({addAttributes(){var e;return{...null===(e=this.parent)||void 0===e?void 0:e.call(this),...en}}}),er=W.V6.extend({addAttributes(){var e;return{...null===(e=this.parent)||void 0===e?void 0:e.call(this),kind:{default:null,parseHTML:e=>e.getAttribute("data-callout")||null,renderHTML:e=>e.kind?{"data-callout":String(e.kind)}:{}}}}}),el=G.ZP.extend({addAttributes(){var e;return{...null===(e=this.parent)||void 0===e?void 0:e.call(this),meta:{default:null,rendered:!1}}}}),ei=[J.Z.configure({bulletList:!1,orderedList:!1,listItem:!1,code:!1,codeBlock:!1,underline:!1,blockquote:!1}),er,et,el,ee(Q.DY),ee(Q.GS),ee(Q.HC),ee(Q.ax),ee(Q.Uf.configure({nested:!0})),V.iA,V.SC,eo(V.xD),eo(V.pj),Y.ZP.configure({inline:!0,allowBase64:!0})];var ea=n(79618),es=n(64589);async function eu(e){let t="".concat(ea._d.listUrl(),"?client_id=").concat(encodeURIComponent(e)),n=(0,es.Rf)(t),o=await fetch(t,{headers:n?{Authorization:"Bearer ".concat(n)}:{}});if(!o.ok)return[];let r=await o.json().catch(()=>null);return Array.isArray(null==r?void 0:r.commands)?r.commands:[]}async function ec(e){var t,n,o,r,l,i;let a=ea._d.runUrl(e.documentId),s=(0,es.Rf)(a),u=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",...s?{Authorization:"Bearer ".concat(s)}:{}},body:JSON.stringify({command_id:e.commandId,client_id:e.clientId,...e.selectionMd?{selection_md:e.selectionMd}:{}}),signal:e.signal});if(!u.ok){let e=await u.json().catch(()=>({}));throw Error((null==e?void 0:e.error)||"Command failed (".concat(u.status,")"))}let c=null===(t=u.body)||void 0===t?void 0:t.getReader();if(!c)throw Error("No response body");let d=new TextDecoder,m="",h="",p="",f=null;for(;;){let{done:t,value:a}=await c.read();if(t)break;let s=(m+=d.decode(a,{stream:!0})).split("\n");for(let t of(m=s.pop()||"",s)){let a;if(t.startsWith("data: ")){try{a=JSON.parse(t.slice(6))}catch(e){continue}"content_delta"===a.type&&"string"==typeof(null===(n=a.data)||void 0===n?void 0:n.content)?(h+=a.data.content,null===(r=e.onDelta)||void 0===r||r.call(e,h)):"content_done"===a.type&&"string"==typeof(null===(o=a.data)||void 0===o?void 0:o.content)?p=a.data.content:"error"===a.type&&(f=(null===(l=a.data)||void 0===l?void 0:l.message)||(null===(i=a.data)||void 0===i?void 0:i.error)||"The command failed.")}}}if(f)throw Error(f);let g=function(e){let t=e.trim(),n=/^```[\w-]*\n([\s\S]*)\n```$/.exec(t);if(!n)return t;let o=n[1];return o.includes("```")?t:o}(p||h);if(!g)throw Error("The command returned nothing.");return g}let ed={note:d.Z,tip:m.Z,important:h.Z,warning:p.Z,caution:f.Z},em={note:"Aside the reader should not miss",tip:"Advice that helps but is optional",important:"Cannot be skipped",warning:"Risk that needs attention",caution:"Consequences if ignored"},eh=(e,t)=>e.chain().focus().setBlockquote().updateAttributes("blockquote",{kind:t}).run(),ep=e=>({title:"note"===e?"Callout":"".concat(e[0].toUpperCase()).concat(e.slice(1)," callout"),hint:em[e],icon:ed[e],keywords:["callout","admonition","alert","aside","info",...O.$F],run:t=>eh(t,e)}),ef=[{title:"Text",hint:"Plain paragraph",icon:g.Z,keywords:["paragraph","body","p"],run:e=>e.chain().focus().setParagraph().run()},{title:"Heading 1",hint:"Large section heading",icon:x.Z,keywords:["h1","title"],run:e=>e.chain().focus().setNode("heading",{level:1}).run()},{title:"Heading 2",hint:"Medium section heading",icon:b.Z,keywords:["h2"],run:e=>e.chain().focus().setNode("heading",{level:2}).run()},{title:"Heading 3",hint:"Small section heading",icon:v.Z,keywords:["h3"],run:e=>e.chain().focus().setNode("heading",{level:3}).run()},{title:"Bulleted list",hint:"A simple bulleted list",icon:w.Z,keywords:["ul","unordered","bullet"],run:e=>e.chain().focus().toggleBulletList().run()},{title:"Numbered list",hint:"A list with numbering",icon:k.Z,keywords:["ol","ordered","number"],run:e=>e.chain().focus().toggleOrderedList().run()},{title:"To-do list",hint:"Track tasks with checkboxes",icon:y.Z,keywords:["task","checkbox","todo"],run:e=>e.chain().focus().toggleTaskList().run()},{title:"Quote",hint:"Capture a quotation",icon:j.Z,keywords:["blockquote","citation"],run:e=>e.chain().focus().toggleBlockquote().run()},ep("note"),{title:"Code block",hint:"Fenced code",icon:N.Z,keywords:["fence","pre","snippet"],run:e=>e.chain().focus().toggleCodeBlock().run()},{title:"Table",hint:"3\xd73 with a header row",icon:Z.Z,keywords:["grid","rows","columns"],run:e=>e.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},{title:"Divider",hint:"Horizontal rule",icon:C.Z,keywords:["hr","rule","separator","line"],run:e=>e.chain().focus().setHorizontalRule().run()}],eg={info:"note",aside:"note",callout:"note",danger:"caution",alert:"important",warn:"warning"},ex=e=>{var t,n;return e.length<2?null:null!==(n=null!==(t=O.$F.find(t=>t.startsWith(e)))&&void 0!==t?t:eg[e])&&void 0!==n?n:null},eb=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=e.trim().toLowerCase(),r=ep(null!==(t=ex(o))&&void 0!==t?t:"note"),l=ef.map(e=>e.title.endsWith("allout")?r:e),i=n.length?[...l,...n]:l;return o?i.filter(e=>e.title.toLowerCase().includes(o)||e.keywords.some(e=>e.includes(o))):i};function ev(e){let{state:t}=e;if(!t.rect||0===t.items.length)return null;let n=window.innerHeight-t.rect.bottom>320,l={position:"fixed",left:Math.min(t.rect.left,window.innerWidth-280),...n?{top:t.rect.bottom+6}:{bottom:window.innerHeight-t.rect.top+6}};return(0,o.jsx)("div",{style:l,className:"z-50 w-[264px] max-h-[300px] overflow-auto border-2 border-gunmetal rounded-neu bg-card shadow-neu py-1",children:t.items.map((e,n)=>{var l,i;let a=e.icon,s=e.group&&e.group!==(null===(l=t.items[n-1])||void 0===l?void 0:l.group);return(0,o.jsxs)(r.Fragment,{children:[s&&(0,o.jsx)("div",{className:"px-2.5 pt-2 pb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:e.group}),(0,o.jsxs)("button",{type:"button",onMouseDown:n=>{n.preventDefault(),t.command(e)},onMouseEnter:()=>t.select(n),className:(0,q.cn)("w-full flex items-center gap-2.5 px-2.5 py-1.5 text-left transition-colors",n===t.selected?"bg-primary/10":"hover:bg-muted/50"),children:[(0,o.jsx)("span",{className:"h-7 w-7 shrink-0 flex items-center justify-center border-2 border-gunmetal rounded-neu-sm bg-card",children:(0,o.jsx)(a,{className:"h-3.5 w-3.5 text-gunmetal"})}),(0,o.jsxs)("span",{className:"min-w-0",children:[(0,o.jsx)("span",{className:"block text-[13px] font-medium text-gunmetal leading-tight",children:e.title}),(0,o.jsx)("span",{className:"block text-[11px] text-muted-foreground truncate",children:e.hint})]})]})]},"".concat(null!==(i=e.group)&&void 0!==i?i:"",":").concat(e.title))})})}let ew=[{label:"Text",icon:g.Z,run:e=>e.chain().focus().setParagraph().run()},{label:"Heading 1",icon:x.Z,run:e=>e.chain().focus().setNode("heading",{level:1}).run()},{label:"Heading 2",icon:b.Z,run:e=>e.chain().focus().setNode("heading",{level:2}).run()},{label:"Heading 3",icon:v.Z,run:e=>e.chain().focus().setNode("heading",{level:3}).run()},{label:"Bulleted list",icon:w.Z,run:e=>e.chain().focus().toggleBulletList().run()},{label:"Numbered list",icon:k.Z,run:e=>e.chain().focus().toggleOrderedList().run()},{label:"To-do list",icon:y.Z,run:e=>e.chain().focus().toggleTaskList().run()},{label:"Quote",icon:j.Z,run:e=>e.chain().focus().toggleBlockquote().run()},{label:"Code",icon:N.Z,run:e=>e.chain().focus().toggleCodeBlock().run()},...O.$F.map(e=>({label:"".concat(e[0].toUpperCase()).concat(e.slice(1)," callout"),icon:ed[e],run:t=>eh(t,e)}))];
1function ek(e){let{editor:t,block:n,anchor:l,onClose:i}=e;(0,r.useEffect)(()=>{let e=()=>i(),t=e=>"Escape"===e.key&&i();return window.addEventListener("pointerdown",e),window.addEventListener("keydown",t),()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t)}},[i]);let a=e=>()=>{t.chain().focus().setTextSelection(n.pos+1).run(),e(t),i()},s=window.innerHeight-l.bottom>360,u={position:"fixed",left:l.left,...s?{top:l.bottom+6}:{bottom:window.innerHeight-l.top+6}};return(0,o.jsxs)("div",{style:u,onPointerDown:e=>e.stopPropagation(),className:"z-50 w-[210px] max-h-[360px] overflow-auto border-2 border-gunmetal rounded-neu bg-card shadow-neu py-1",children:[(0,o.jsx)(ey,{icon:A.Z,label:"Duplicate",onClick:()=>{let e=t.state.doc.nodeAt(n.pos);if(!e)return i();t.chain().focus().insertContentAt(n.pos+e.nodeSize,e.toJSON()).run(),i()}}),(0,o.jsx)(ey,{icon:S.Z,label:"Delete",onClick:()=>{let e=t.state.doc.nodeAt(n.pos);if(!e)return i();t.chain().focus().deleteRange({from:n.pos,to:n.pos+e.nodeSize}).run(),i()},danger:!0}),(0,o.jsx)("div",{className:"my-1 border-t-2 border-gunmetal/15"}),(0,o.jsx)("div",{className:"px-2.5 py-1 text-[10px] font-bold uppercase tracking-wider text-muted-foreground",children:"Turn into"}),ew.map(e=>(0,o.jsx)(ey,{icon:e.icon,label:e.label,onClick:a(e.run)},e.label))]})}function ey(e){let{icon:t,label:n,onClick:r,danger:l}=e;return(0,o.jsxs)("button",{type:"button",onMouseDown:e=>{e.preventDefault(),r()},className:(0,q.cn)("w-full flex items-center gap-2 px-2.5 py-1.5 text-left text-[13px] transition-colors",l?"text-destructive hover:bg-destructive/10":"text-gunmetal hover:bg-primary/10"),children:[(0,o.jsx)(t,{className:"h-3.5 w-3.5 shrink-0"}),n]})}function ej(e){let{editor:t,commands:n,onRun:l}=e,[a,s]=(0,r.useState)(!1),[u,c]=(0,r.useState)(""),[d,m]=(0,r.useState)(!1),h=n.filter(e=>"replace"===e.mode),p=e=>{let{icon:t,label:n,active:r,onClick:l}=e;return(0,o.jsx)("button",{type:"button",title:n,"aria-label":n,"aria-pressed":r,onMouseDown:e=>{e.preventDefault(),l()},className:(0,q.cn)("h-7 w-7 flex items-center justify-center rounded-neu-sm transition-colors",r?"bg-primary text-white":"text-gunmetal hover:bg-primary/10"),children:(0,o.jsx)(t,{className:"h-3.5 w-3.5"})})};return(0,o.jsx)(i.N,{editor:t,shouldShow:e=>{let{editor:t,from:n,to:o}=e;return n!==o&&!t.isActive("codeBlock")&&t.isEditable},options:{placement:"top"},children:(0,o.jsxs)("div",{className:"relative flex items-center gap-0.5 border-2 border-gunmetal rounded-neu bg-card shadow-neu p-1",children:[d&&h.length>0&&(0,o.jsx)("div",{className:"absolute left-0 top-full mt-1.5 z-50 w-[220px] border-2 border-gunmetal rounded-neu bg-card shadow-neu py-1",children:h.map(e=>{var t;let n=null!==(t=eN[e.id])&&void 0!==t?t:E.Z;return(0,o.jsxs)("button",{type:"button",onMouseDown:t=>{t.preventDefault(),m(!1),l(e)},className:"w-full flex items-center gap-2 px-2.5 py-1.5 text-left hover:bg-primary/10",children:[(0,o.jsx)(n,{className:"h-3.5 w-3.5 shrink-0 text-gunmetal"}),(0,o.jsx)("span",{className:"text-[12.5px] text-gunmetal",children:e.label})]},e.id)})}),a?(0,o.jsxs)("form",{className:"flex items-center gap-1",onSubmit:e=>{e.preventDefault();let n=u.trim();n&&t.chain().focus().setLink({href:n}).run(),s(!1),c("")},children:[(0,o.jsx)("input",{autoFocus:!0,value:u,onChange:e=>c(e.target.value),onKeyDown:e=>{"Escape"===e.key&&(s(!1),c(""))},placeholder:"https://â¦","aria-label":"Link URL",className:"w-[190px] bg-card border-2 border-gunmetal rounded-neu-sm px-1.5 py-0.5 text-[12px] text-gunmetal focus:outline-none focus:ring-2 focus:ring-primary"}),(0,o.jsx)("button",{type:"submit",className:"neu-button-sm !py-1 !px-2 !text-[11px]",children:"Link"})]}):(0,o.jsxs)(o.Fragment,{children:[h.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p,{icon:E.Z,label:"AI",active:d,onClick:()=>m(e=>!e)}),(0,o.jsx)("span",{className:"mx-0.5 h-5 w-px bg-gunmetal/25"})]}),(0,o.jsx)(p,{icon:T.Z,label:"Bold",active:t.isActive("bold"),onClick:()=>t.chain().focus().toggleBold().run()}),(0,o.jsx)(p,{icon:D.Z,label:"Italic",active:t.isActive("italic"),onClick:()=>t.chain().focus().toggleItalic().run()}
1),(0,o.jsx)(p,{icon:L.Z,label:"Strikethrough",active:t.isActive("strike"),onClick:()=>t.chain().focus().toggleStrike().run()}),(0,o.jsx)(p,{icon:R.Z,label:"Inline code",active:t.isActive("code"),onClick:()=>t.chain().focus().toggleCode().run()}),(0,o.jsx)("div",{className:"mx-0.5 self-stretch border-l-2 border-gunmetal/15"}),t.isActive("link")?(0,o.jsx)(p,{icon:B.Z,label:"Remove link",active:!0,onClick:()=>t.chain().focus().unsetLink().run()}):(0,o.jsx)(p,{icon:M.Z,label:"Add link",onClick:()=>{c(""),s(!0)}})]})]})})}let eN={summarize:z.Z,todos:H.Z,improve:I.Z,grammar:P.Z};function eZ(e){let{value:t,onChange:n,editable:i=!0,clientId:d,documentId:m}=e,[h,p]=(0,r.useState)(null),[f,g]=(0,r.useState)(null),[x,b]=(0,r.useState)(null),v=(0,r.useRef)(null),w=(0,r.useRef)(null),k=(0,r.useRef)(t),y=(0,r.useRef)(null),j=(0,r.useRef)([]),N=(0,r.useRef)(()=>{}),[,Z]=(0,r.useState)(0),[C,A]=(0,r.useState)(null),[S,T]=(0,r.useState)(null),D=(0,r.useRef)(!1),L=(0,r.useCallback)(()=>{d&&m&&i&&(D.current||j.current.length>0||(D.current=!0,eu(d).then(e=>{j.current=e,Z(e=>e+1)}).catch(()=>{}).finally(()=>{D.current=!1})))},[d,m,i]);(0,r.useEffect)(()=>{L()},[L]);let R=(0,r.useRef)(L);(0,r.useEffect)(()=>{R.current=L},[L]);let B=(0,r.useMemo)(()=>(function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];return s.hj.create({name:"slashMenu",addProseMirrorPlugins(){return[(0,a.ZP)({editor:this.editor,char:"/",allow:e=>{let{state:t,range:n}=e;return"codeBlock"!==t.doc.resolve(n.from).parent.type.name},command:e=>{let{editor:t,range:n,props:o}=e;t.chain().focus().deleteRange(n).run(),o.run(t)},items:e=>{let{query:t}=e;return eb(t,n())},render:()=>{let n=0,o=null,r=()=>{var t,l;if(!o)return e(null);e({items:o.items,rect:null!==(l=null===(t=o.clientRect)||void 0===t?void 0:t.call(o))&&void 0!==l?l:null,selected:n,select:e=>{n=e,r()},command:e=>null==o?void 0:o.command(e)})};return{onStart:l=>{o=l,n=0,r(),t(t=>{var l;let i=null!==(l=null==o?void 0:o.items)&&void 0!==l?l:[];if(0===i.length)return!1;if("ArrowDown"===t.key)return n=(n+1)%i.length,r(),!0;if("ArrowUp"===t.key)return n=(n-1+i.length)%i.length,r(),!0;if("Enter"===t.key||"Tab"===t.key){let e=i[n];return e&&(null==o||o.command(e)),!0}return"Escape"===t.key&&(e(null),!0)})},onUpdate:e=>{o=e,n>=e.items.length&&(n=0),r()},onExit:()=>{o=null,t(null),e(null)}}}})]}})})(p,e=>{w.current=e},()=>(R.current(),j.current.map(e=>{var t;return{title:e.label,hint:e.description,icon:null!==(t=eN[e.id])&&void 0!==t?t:E.Z,keywords:["ai",e.id,...e.label.toLowerCase().split(/\s+/)],group:"AI",run:()=>N.current(e)}}))),[]),M=(0,r.useMemo)(()=>(0,$.Iu)((0,O.rz)(t)),[]),z=(0,r.useCallback)(e=>{let t=(0,O.Ie)((0,$.$M)(e));k.current=t,n(t)},[n]),H=(0,l.jE)({editable:i,immediatelyRender:!1,extensions:[...ei,B,u.Z.configure({placeholder:"Write, or press / for blocksâ¦"})],content:M,editorProps:{attributes:{class:"outline-none"},handleKeyDown:(e,t)=>{var n,o;return null!==(o=null===(n=w.current)||void 0===n?void 0:n.call(w,t))&&void 0!==o&&o}},onFocus:()=>R.current(),onUpdate:e=>{let{editor:t}=e;y.current&&clearTimeout(y.current),y.current=setTimeout(()=>z(t.getJSON()),300)}});(0,r.useEffect)(()=>{H&&t!==k.current&&(k.current=t,H.commands.setContent((0,$.Iu)((0,O.rz)(t)),{emitUpdate:!1}))},[t,H]),(0,r.useEffect)(()=>{null==H||H.setEditable(i)},[i,H]);let I=(0,r.useCallback)(async e=>{var t,n,o,r;let l;if(!H||!d||!m)return;let{state:i}=H,{from:a,to:s,empty:u}=i.selection,c={from:a,to:s},h=!1,p=!1;if("insert"===e.mode&&u){let e=i.doc.resolve(a),t=e.parent;t.isTextblock&&0===t.content.size&&e.depth>0&&(c={from:e.before(e.depth),to:e.after(e.depth)},h=!0)}if("replace"===e.mode){if(u){let e=i.doc.resolve(a),t=e.depth>0?1:0;c={from:e.before(t),to:e.after(t)}}let e=null!==(t=i.doc.slice(c.from,c.to).content.toJSON())&&void 0!==t?t:[],n=Array.isArray(e)?e:[],o={type:"doc",content:(p=n.length>0&&n.every(e=>(null==e?void 0:e.type)==="text"||(null==e?void 0:e.type)==="hardBreak"))?[{type:"paragraph",content:n}]:n};if(!(l=(0,O.Ie)((0,$.$M)(o)).trim())){T("Select something to rewrite first.");return}}let f=new AbortController;T(null),A({label:e.label,abort:()=>f.abort()});try{let t=await ec({clientId:d,documentId:m,commandId:e.id,selectionMd:l,signal:f.
1signal}),i=(0,$.Iu)((0,O.rz)(t)),a=null!==(o=i.content)&&void 0!==o?o:[];if(0===a.length||p&&1===a.length&&(null===(n=a[0])||void 0===n?void 0:n.type)==="paragraph"&&(a=null!==(r=a[0].content)&&void 0!==r?r:[],0===a.length)){T("The command returned nothing usable.");return}H.chain().focus().insertContentAt("replace"===e.mode||h?c:c.to,a).run()}catch(e){if((null==e?void 0:e.name)==="AbortError")return;T((null==e?void 0:e.message)||"The command failed.")}finally{A(null)}},[H,d,m]);if((0,r.useEffect)(()=>{N.current=e=>{I(e)}},[I]),(0,r.useEffect)(()=>()=>{y.current&&clearTimeout(y.current)},[]),(0,r.useEffect)(()=>{if(null!==h||!H)return;let e=v.current;if(v.current=null,null===e)return;let t=H.state.doc.nodeAt(e);(null==t?void 0:t.type.name)==="paragraph"&&"/"===t.textContent&&H.chain().focus().deleteRange({from:e,to:e+t.nodeSize}).run()},[h,H]),!H)return(0,o.jsx)("div",{className:"flex-1"});let P=()=>{let e=f?H.state.doc.nodeAt(f.pos):null,t=e&&f?f.pos+e.nodeSize:H.state.doc.content.size;v.current=t,H.chain().focus().insertContentAt(t,{type:"paragraph"}).setTextSelection(t+1).insertContent("/").run()};return(0,o.jsxs)("div",{className:"flex-1 min-h-0 overflow-auto bg-card",children:[i&&(0,o.jsx)(c.Z,{editor:H,onNodeChange:e=>{let{pos:t,node:n}=e;n&&g({pos:t,size:n.nodeSize})},children:(0,o.jsxs)("div",{className:"flex items-center gap-0.5 pr-1",children:[(0,o.jsx)("button",{type:"button",title:"Insert block below","aria-label":"Insert block below",onMouseDown:e=>{e.preventDefault(),P()},className:"h-6 w-5 flex items-center justify-center rounded-neu-sm text-muted-foreground hover:text-gunmetal hover:bg-gunmetal/8",children:(0,o.jsx)(_.Z,{className:"h-4 w-4"})}),(0,o.jsx)("button",{type:"button",title:"Drag to move, click for block actions","aria-label":"Block actions","aria-haspopup":"menu",onMouseDown:e=>{e.stopPropagation()},onClick:e=>{let t=e.currentTarget.getBoundingClientRect();b(e=>e||!f?null:{anchor:t,block:f})},className:"h-6 w-5 flex items-center justify-center rounded-neu-sm cursor-grab active:cursor-grabbing text-muted-foreground hover:text-gunmetal hover:bg-gunmetal/8",children:(0,o.jsx)(U.Z,{className:"h-4 w-4"})})]})}),i&&x&&(0,o.jsx)(ek,{editor:H,block:x.block,anchor:x.anchor,onClose:()=>b(null)}),i&&(0,o.jsx)(ej,{editor:H,commands:j.current,onRun:e=>{I(e)}}),(0,o.jsx)(l.kg,{editor:H,className:"doc-block-surface mx-auto max-w-[760px] px-10 py-8"}),h&&(0,o.jsx)(ev,{state:h}),(C||S)&&(0,o.jsx)("div",{className:"sticky bottom-4 z-40 mx-auto w-fit max-w-[560px] px-4",children:C?(0,o.jsxs)("div",{className:"flex items-center gap-2.5 border-2 border-gunmetal rounded-neu bg-card shadow-neu px-3 py-2",children:[(0,o.jsx)(F.Z,{className:"h-3.5 w-3.5 animate-spin text-primary"}),(0,o.jsxs)("span",{className:"text-[12.5px] text-gunmetal",children:[C.label,"â¦"]}),(0,o.jsx)("button",{type:"button",onClick:C.abort,className:"text-[11.5px] font-medium text-muted-foreground hover:text-gunmetal underline underline-offset-2",children:"Cancel"})]}):(0,o.jsxs)("div",{className:"flex items-start gap-2.5 border-2 border-destructive rounded-neu bg-card shadow-neu px-3 py-2",children:[(0,o.jsx)("span",{className:"text-[12.5px] text-gunmetal",children:S}),(0,o.jsx)("button",{type:"button",onClick:()=>T(null),className:"text-[11.5px] font-medium text-muted-foreground hover:text-gunmetal underline underline-offset-2 shrink-0",children:"Dismiss"})]})})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.