1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6960],{20408:(e,t,a)=>{a.d(t,{SettingsProvider:()=>o,t:()=>s});var r=a(95155),n=a(12115);let l=(0,n.createContext)(void 0),i={settings:null,menus:null,setSettings:()=>{},setMenus:()=>{},ads:null,setAds:()=>{},financialData:void 0,setFinancialData:()=>{},cities:[],setCities:()=>{},noAds:!1,setNoAds:()=>{},noStickyHeader:!1,setNoStickyHeader:()=>{},noMainMinHeight:!1,setNoMainMinHeight:()=>{}};function s(){let e=n.useContext(l);return void 0===e?i:e}function o({children:e,initialSettings:t}){let[a,i]=(0,n.useState)(t.settings),[s,o]=(0,n.useState)(t.menus),[c,d]=(0,n.useState)(t.ads),[u,h]=(0,n.useState)(t.financialData),[m,p]=(0,n.useState)(t.cities),[g,f]=(0,n.useState)(!1),[b,x]=(0,n.useState)(!1),[v,k]=(0,n.useState)(!1),j=(0,n.useCallback)(e=>{i(e)},[]),A=(0,n.useCallback)(e=>{o(e)},[]),w=(0,n.useCallback)(e=>{d(e)},[]),C=(0,n.useCallback)(e=>{h(e)},[]),y=(0,n.useCallback)(e=>{p(e)},[]),N=(0,n.useCallback)(e=>{f(e)},[]),S=(0,n.useCallback)(e=>{x(e)},[]),L=(0,n.useCallback)(e=>{k(e)},[]),M=(0,n.useMemo)(()=>({settings:a,menus:s,setSettings:j,setMenus:A,ads:c,setAds:w,financialData:u,setFinancialData:C,cities:m,setCities:y,noAds:g,setNoAds:N,noStickyHeader:b,setNoStickyHeader:S,noMainMinHeight:v,setNoMainMinHeight:L}),[a,s,j,A,c,w,u,C,m,y,g,N,b,S,v,L]);return(0,r.jsx)(l.Provider,{value:M,children:e})}},26960:(e,t,a)=>{a.r(t),a.d(t,{default:()=>ar});var r=a(95155),n=a(12115),l=a(35203),i=a(59434),s=a(66695),o=a(66424),c=a(93654),d=a(6670),u=a(30285);let h=[{name:"arabic",label:"Arap\xe7a",value:"ar"},{name:"chinese",label:"\xc7ince",value:"zh"},{name:"english",label:"İngilizce",value:"en"},{name:"french",label:"Fransızca",value:"fr"},{name:"german",label:"Almanca",value:"de"},{name:"greek",label:"Yunanca",value:"gr"},{name:"italian",label:"İtalyanca",value:"it"},{name:"japanese",label:"Japonca",value:"jp"},{name:"korean",label:"Korece",value:"ko"},{name:"russian",label:"Rus\xe7a",value:"ru"},{name:"spanish",label:"İspanyolca",value:"es"},{name:"swedish",label:"İsve\xe7ce",value:"sv"},{name:"ukrainian",label:"Ukraynaca",value:"ua"}],m=[{name:"academic",label:"Akademik",value:"academic"},{name:"business",label:"Kurumsal",value:"business"},{name:"casual",label:"EÄlenceli",value:"casual"},{name:"childfriendly",label:"\xc7ocuklara \xd6zel",value:"childfriendly"},{name:"conversational",label:"KonuÅma Dili",value:"conversational"},{name:"emotional",label:"Duygusal",value:"emotional"},{name:"humorous",label:"Mizahi",value:"humorous"},{name:"informative",label:"Bilgi verici",value:"informative"},{name:"inspirational",label:"İlham Verici",value:"inspirational"},{name:"memeify",label:"Meme OluÅtur",value:"meme"},{name:"narrative",label:"Anlatı",value:"narrative"},{name:"objective",label:"Objektif",value:"objective"},{name:"persuasive",label:"İkna edici",value:"persuasive"},{name:"poetic",label:"Åiirsel",value:"poetic"}],p=["#fb7185","#fdba74","#d9f99d","#a7f3d0","#a5f3fc","#a5b4fc"];var g=a(52596),f=a(39688);let b=(e,t)=>{let{view:a,state:{selection:{from:r}}}=e,n=document.querySelectorAll(".has-focus"),l=n.length,i=n[l-1];if(i&&i.getAttribute("data-type")&&i.getAttribute("data-type")===t||i&&i.classList&&i.classList.contains(t))return i;let s=a.domAtPos(r).node,o=s;for(o.tagName||(o=s.parentElement);o&&!(o.getAttribute("data-type")&&o.getAttribute("data-type")===t)&&!o.classList.contains(t);)o=o.parentElement;return o};var x=a(2130),v=a(4652),k=a(17e3),j=a(74979),A=a(84109),w=a(66377),C=a(50099),y=a(4589),N=a(61788),S=a(290),L=a(24927),M=a(27192);a(24106),a(61261),a(53872);var T=a(11585),z=a(4701),B=a(52571),R=a(42695);let I=z.YY.create({name:"selection",addProseMirrorPlugins(){let{editor:e}=this;return[new B.k_({key:new B.hs("selection"),props:{decorations:t=>t.selection.empty||!0===e.isFocused?null:R.zF.create(t.doc,[R.NZ.inline(t.selection.from,t.selection.to,{class:"selection"})])}})]}}),H=a(85696).Ay.configure({resizable:!0,lastColumnResizable:!1});var q=a(8688);let $=e=>t=>
1{let a=q.J3.get(t.$anchorCell.node(-1)),r=t.$anchorCell.start(-1),n=a.cellsInRect(e),l=a.cellsInRect(a.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r));for(let e=0,t=n.length;e<t;e+=1)if(-1===l.indexOf(n[e]))return!1;return!0},O=e=>(0,z.KP)(e=>e.type.spec.tableRole&&"table"===e.type.spec.tableRole)(e),_=e=>e instanceof q.rn,F=e=>t=>!!_(t)&&$({left:e,right:e+1,top:0,bottom:q.J3.get(t.$anchorCell.node(-1)).height})(t),P=e=>t=>!!_(t)&&$({left:0,right:q.J3.get(t.$anchorCell.node(-1)).width,top:e,bottom:e+1})(t),D=e=>{if(_(e)){let t=q.J3.get(e.$anchorCell.node(-1));return $({left:0,right:t.width,top:0,bottom:t.height})(e)}return!1},V=e=>t=>{let a=O(t);if(a){let t=q.J3.get(a.node);return(Array.isArray(e)?e:Array.from([e])).reduce((e,r)=>{if(r>=0&&r<=t.width-1){let n=t.cellsInRect({left:r,right:r+1,top:0,bottom:t.height});return e.concat(n.map(e=>{let t=a.node.nodeAt(e),r=e+a.start;return{pos:r,start:r+1,node:t}}))}return e},[])}return null},E=e=>t=>{let a=O(t);if(a){let t=q.J3.get(a.node);return(Array.isArray(e)?e:Array.from([e])).reduce((e,r)=>{if(r>=0&&r<=t.height-1){let n=t.cellsInRect({left:0,right:t.width,top:r,bottom:r+1});return e.concat(n.map(e=>{let t=a.node.nodeAt(e),r=e+a.start;return{pos:r,start:r+1,node:t}}))}return e},[])}return null},K=e=>t=>a=>{let r=O(a.selection),n="row"===e;if(r){let e=q.J3.get(r.node);if(t>=0&&t<(n?e.height:e.width)){let l=n?0:t,i=n?t:0,s=n?e.width:t+1,o=n?t+1:e.height,c=e.cellsInRect({left:l,top:i,right:n?s:l+1,bottom:n?i+1:o}),d=o-i==1?c:e.cellsInRect({left:n?l:s-1,top:n?o-1:i,right:s,bottom:o}),u=r.start+c[0],h=r.start+d[d.length-1],m=a.doc.resolve(u),p=a.doc.resolve(h);return a.setSelection(new q.rn(p,m))}}return a},J=K("column"),U=K("row"),Z=z.bP.create({name:"tableCell",content:"block+",tableRole:"cell",isolating:!0,addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",(0,z.KV)(this.options.HTMLAttributes,e),0]},addAttributes:()=>({colspan:{default:1,parseHTML:e=>{let t=e.getAttribute("colspan");return t?parseInt(t,10):1}},rowspan:{default:1,parseHTML:e=>{let t=e.getAttribute("rowspan");return t?parseInt(t,10):1}},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}},style:{default:null}}),addProseMirrorPlugins(){return[new B.k_({props:{decorations:e=>{let{isEditable:t}=this.editor;if(!t)return R.zF.empty;let{doc:a,selection:r}=e,n=[],l=V(0)(r);return l&&l.forEach(({pos:e},t)=>{n.push(R.NZ.widget(e+1,()=>{let e=P(t)(r),a="grip-row";e&&(a+=" selected"),0===t&&(a+=" first"),t===l.length-1&&(a+=" last");let n=document.createElement("a");return n.className=a,n.addEventListener("mousedown",e=>{e.preventDefault(),e.stopImmediatePropagation(),this.editor.view.dispatch(U(t)(this.editor.state.tr))}),n}))}),R.zF.create(a,n)}}})]}}),W=a(423).A.extend({allowGapCursor:!1,content:"(tableCell | tableHeader)*"}),Y=a(79030).h.extend({addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{let t=e.getAttribute("colwidth");return t?t.split(",").map(e=>parseInt(e,10)):null}},style:{default:null}}),addProseMirrorPlugins(){return[new B.k_({props:{decorations:e=>{let{isEditable:t}=this.editor;if(!t)return R.zF.empty;let{doc:a,selection:r}=e,n=[],l=E(0)(r);return l&&l.forEach(({pos:e},t)=>{n.push(R.NZ.widget(e+1,()=>{let e=F(t)(r),a="grip-column";e&&(a+=" selected"),0===t&&(a+=" first"),t===l.length-1&&(a+=" last");let n=document.createElement("a");return n.className=a,n.addEventListener("mousedown",e=>{e.preventDefault(),e.stopImmediatePropagation(),this.editor.view.dispatch(J(t)(this.editor.state.tr))}),n}))}),R.zF.create(a,n)}}})]}}
1),Q=a(40951).A.extend({renderHTML(){return["div",(0,z.KV)(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]}}),G=a(60882).A.extend({renderHTML({node:e,HTMLAttributes:t}){let a=parseInt(e.attrs.level,10),r=this.options.levels.includes(a)?a:this.options.levels[0];return[`h${r}`,(0,z.KV)(this.options.HTMLAttributes,t),0]}});var X=a(45254),ee=a(10034),et=a(28033),ea=a(5625),er=a(54923),en=a(73709),el=a(82348),ei=a(78084),es=a(29514),eo=a(90528);let ec=(0,ee.$)();ec.register("javascript",et.A),ec.register("typescript",ea.A),ec.register("html",er.A),ec.register("css",en.A),ec.register("json",el.A),ec.register("python",ei.A),ec.register("sql",es.A),ec.register("bash",eo.A);let ed=X.d.configure({lowlight:ec,defaultLanguage:"javascript"}),eu=a(43711).y.extend({content:"block+"});function eh({types:e,node:t}){return Array.isArray(e)&&e.includes(t.type)||t.type===e}let em=z.YY.create({name:"trailingNode",addOptions:()=>({node:"paragraph",notAfter:["paragraph"]}),addProseMirrorPlugins(){let e=new B.hs(this.name),t=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>this.options.notAfter.includes(e.name));return[new B.k_({key:e,appendTransaction:(t,a,r)=>{let{doc:n,tr:l,schema:i}=r,s=e.getState(r),o=n.content.size,c=i.nodes[this.options.node];if(s)return l.insert(o,c.create())},state:{init:(e,a)=>!eh({node:a.tr.doc.lastChild,types:t}),apply:(e,a)=>e.docChanged?!eh({node:e.doc.lastChild,types:t}):a}})]}}),ep=z.bP.create({name:"figure",addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"block figcaption",draggable:!0,defining:!0,selectable:!0,isolating:!0,parseHTML(){return[{tag:`figure[data-type="${this.name}"]`}]},renderHTML({HTMLAttributes:e}){return["figure",(0,z.KV)(e,{"data-type":this.name}),0]}}),eg=a(81891)._V.extend({group:"block"}),ef=z.bP.create({name:"figcaption",addOptions:()=>({HTMLAttributes:{}}),content:"inline*",selectable:!1,draggable:!1,marks:"link",group:"figure",parseHTML:()=>[{tag:"figcaption"}],addKeyboardShortcuts(){return{Enter:({editor:e})=>{let{state:{selection:{$from:t,empty:a}}}=e;if(!a||t.parent.type!==this.type||t.parentOffset!==t.parent.nodeSize-2)return!1;let r=e.state.selection.$from.end();return e.chain().focus(r).insertContentAt(r,{type:"paragraph"}).run()},Backspace:({editor:e})=>{let{state:{selection:{$from:t,empty:a}}}=e;if(!a||t.parent.type!==this.type||0!==t.parentOffset)return!1;let r=e.state.doc.nodeAt(t.pos-2);return r?.type.name===eg.name}}},renderHTML:({HTMLAttributes:e})=>["figcaption",(0,z.KV)(e),0]}),eb=z.bP.create({name:"quote",content:"block+",group:"block",defining:!0,marks:"",parseHTML:()=>[{tag:"div"}],renderHTML:({HTMLAttributes:e})=>["div",e,0],addKeyboardShortcuts:()=>({Backspace:({editor:e})=>{let{state:{selection:{$from:t,empty:a}}}=e;if(a&&"paragraph"===t.parent.type.name&&0===t.parent.content.size){let a=t.depth,r=null;for(let e=a;e>0;e--)if("blockquoteFigure"===t.node(e).type.name){r=t.before(e);break}if(null!==r)return e.commands.deleteNode("blockquoteFigure"),!0}return!1}})}),ex=z.bP.create({name:"quoteCaption",group:"block",content:"text*",defining:!0,isolating:!0,parseHTML:()=>[{tag:"figcaption"}],renderHTML:({HTMLAttributes:e})=>["span",e,0],addKeyboardShortcuts(){return{Enter:({editor:e})=>{let{state:{selection:{$from:t,empty:a}}}=e;if(!a||t.parent.type!==this.type||t.parentOffset!==t.parent.nodeSize-2)return!1;let r=e.state.selection.$from.end();return e.chain().focus(r).insertContentAt(r,{type:"paragraph"}).run()}}}}),ev=ep.extend({name:"blockquoteFigure",group:"block",content:"quote quoteCaption",isolating:!0,addExtensions:()=>[eb,ex],renderHTML({HTMLAttributes:e}){return["blockquote",(0,z.KV)(e,{"data-type":this.name}),0]},addKeyboardShortcuts:()=>({Enter:()=>!1}),addAttributes(){return{...this.parent?.()}},addCommands(){return{setBlockquote:()=>({state:e,chain:t,editor:a})=>{let{from:r,to:n}=e.selection;if(a.isActive("blockquoteFigure")||a.isActive("quote")||a.isActive("blockquote")||a.isActive("blockquoteCaption"))return!1;let l=r!==n,i=r,s=n,o=[];if(l)o=e.selection.content().content.toJSON()||[{type:"paragraph",attrs:{textAlign:"left"}}];else{let t=e.selection.$from,a=t.depth,r=null;for(;a>0;){if("paragraph"===(r=t.node(a)).type.name){i=t.before(a),s=t.after(a),o=[r.toJSON()];break}a--}r&&"paragraph"===r.type.name||(o=[{type:"paragraph",attrs:{textAlign:"left"}}])}return t().focus().deleteRange({from:i,to:s}).insertContentAt(i,{type:this.name,content:[{type:"quote",content:o},{type:"quoteCaption"}]}).focus().run()},unsetBlockquote:()=>({state:e,chain:t,editor:a})=>{if(!(a.isActive("blockquoteFigure")||a.isActive("quote")||a.isActive("quoteCaption")))return!1;let{from:r,to:n}=e.selection,l=null,i=null;if(r!==n)e.doc.nodesBetween(r,n,(e,t)=>
1"blockquoteFigure"!==e.type.name||(l=t,i=e,!1));else{let t=e.selection.$from,a=t.depth;for(;a>0;){let e=t.node(a);if("blockquoteFigure"===e.type.name){l=t.before(a),i=e;break}a--}}if(null===l){let t=e.selection.$from.depth;for(;t>0;){let a=e.selection.$from.node(t);if("blockquoteFigure"===a.type.name){l=e.selection.$from.before(t),i=a;break}t--}}if(null===l||!i)return!1;let s=i.nodeSize,o=[];return i.descendants(e=>"quote"!==e.type.name||(e.content.forEach(e=>{e.content&&o.push(e.toJSON())}),!1)),0===o.length&&o.push({type:"paragraph",attrs:{textAlign:"left"}}),t().deleteRange({from:l,to:l+s}).insertContentAt(l,o).focus().run()},toggleBlockquote:()=>({state:e,chain:t,editor:a})=>{if(a.isActive("blockquoteFigure")||a.isActive("quote")||a.isActive("quoteCaption")){if(!(a.isActive("blockquoteFigure")||a.isActive("quote")||a.isActive("quoteCaption")))return!1;let{from:r,to:n}=e.selection,l=null,i=null;if(r!==n)e.doc.nodesBetween(r,n,(e,t)=>"blockquoteFigure"!==e.type.name||(l=t,i=e,!1));else{let t=e.selection.$from,a=t.depth;for(;a>0;){let e=t.node(a);if("blockquoteFigure"===e.type.name){l=t.before(a),i=e;break}a--}}if(null===l){let t=e.selection.$from.depth;for(;t>0;){let a=e.selection.$from.node(t);if("blockquoteFigure"===a.type.name){l=e.selection.$from.before(t),i=a;break}t--}}if(null===l||!i)return!1;let s=i.nodeSize,o=[];return i.descendants(e=>"quote"!==e.type.name||(e.content.forEach(e=>{e.content&&o.push(e.toJSON())}),!1)),0===o.length&&o.push({type:"paragraph",attrs:{textAlign:"left"}}),t().deleteRange({from:l,to:l+s}).insertContentAt(l,o).focus().run()}{let{from:r,to:n}=e.selection;if(a.isActive("blockquoteFigure")||a.isActive("quote")||a.isActive("blockquote")||a.isActive("blockquoteCaption"))return!1;let l=r!==n,i=r,s=n,o=[];if(l)o=e.selection.content().content.toJSON()||[{type:"paragraph",attrs:{textAlign:"left"}}];else{let t=e.selection.$from,a=t.depth,r=null;for(;a>0;){if("paragraph"===(r=t.node(a)).type.name){i=t.before(a),s=t.after(a),o=[r.toJSON()];break}a--}r&&"paragraph"===r.type.name||(o=[{type:"paragraph",attrs:{textAlign:"left"}}])}return t().focus().deleteRange({from:i,to:s}).insertContentAt(i,{type:this.name,content:[{type:"quote",content:o},{type:"quoteCaption"}]}).focus().run()}}}}}),ek=a(36761).Ay.extend({inclusive:!1,parseHTML:()=>[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])',getAttrs:e=>!e.getAttribute("href")?.toLowerCase().startsWith("javascript:")&&null}],renderHTML({HTMLAttributes:e}){return e.href?.toLowerCase().startsWith("javascript:")?["a",(0,z.KV)(this.options.HTMLAttributes,{...e,href:""},{class:"link"}),0]:["a",(0,z.KV)(this.options.HTMLAttributes,e,{class:"link"}),0]},addProseMirrorPlugins(){let{editor:e}=this;return[...this.parent?.()||[],new B.k_({props:{handleKeyDown:(t,a)=>{let{selection:r}=e.state;return"Escape"===a.key&&!0!==r.empty&&e.commands.focus(r.to,{scrollIntoView:!1}),!1}}})]}});var ej=a(62525);let eA=e=>{let{editor:t,getPos:a,node:i}=e,s=(0,n.useRef)(null),{src:o}
1=i.attrs,c=eL("left"===i.attrs.align?"ml-0":"ml-auto","right"===i.attrs.align?"mr-0":"mr-auto","center"===i.attrs.align&&"mx-auto"),d=(0,n.useCallback)(()=>{t.commands.setNodeSelection(a())},[a,t.commands]),u=(0,n.useCallback)(()=>{t.commands.setNodeSelection(a()),t.commands.deleteSelection()},[a,t.commands]);return(0,r.jsx)(l.VR,{children:(0,r.jsx)("div",{className:c,style:{width:i.attrs.width},"data-drag-handle":!0,children:(0,r.jsxs)("div",{className:"relative",contentEditable:!1,ref:s,children:[(0,r.jsx)("img",{className:"block",src:o,alt:"",onClick:d}),(0,r.jsx)("div",{className:"absolute top-2 right-2",children:(0,r.jsxs)("button",{className:"bg-destructive/70 hover:bg-destructive flex items-center gap-1 rounded-full p-1 px-2 text-white hover:text-white",onClick:e=>{e.preventDefault(),e.stopPropagation(),u()},children:[(0,r.jsx)(ej.A,{className:"h-4 w-4"}),"Sil"]})})]})})})},ew=eg.extend({name:"imageBlock",group:"block",defining:!0,isolating:!0,draggable:!0,addAttributes:()=>({src:{default:"",parseHTML:e=>e.getAttribute("src"),renderHTML:e=>({src:e.src})},width:{default:"100%",parseHTML:e=>e.getAttribute("data-width"),renderHTML:e=>({"data-width":e.width})},align:{default:"center",parseHTML:e=>e.getAttribute("data-align"),renderHTML:e=>({"data-align":e.align})},alt:{default:void 0,parseHTML:e=>e.getAttribute("alt"),renderHTML:e=>({alt:e.alt})},title:{default:void 0,parseHTML:e=>e.getAttribute("title"),renderHTML:e=>({title:e.title})}}),parseHTML:()=>[{tag:'img[src*="tiptap.dev"]:not([src^="data:"]), img[src*="windows.net"]:not([src^="data:"])'}],renderHTML({HTMLAttributes:e}){return["img",(0,z.KV)(this.options.HTMLAttributes,e)]},addCommands:()=>({setImageBlock:e=>({commands:t})=>t.insertContent({type:"imageBlock",attrs:{src:e.src,alt:e.alt,title:e.title}}),setImageBlockAt:e=>({commands:t})=>t.insertContentAt(e.pos,{type:"imageBlock",attrs:{src:e.src,alt:e.alt,title:e.title}}),setImageBlockAlign:e=>({commands:t})=>t.updateAttributes("imageBlock",{align:e}),setImageBlockWidth:e=>({commands:t})=>t.updateAttributes("imageBlock",{width:`${Math.max(0,Math.min(100,e))}%`})}),addNodeView:()=>(0,l.gu)(eA)});var eC=a(73007);let ey=e=>{let t=e;for(;t&&!["TD","TH"].includes(t.tagName);)t=t.parentElement;let a=t&&t.querySelector&&t.querySelector("a.grip-column.selected"),r=t&&t.querySelector&&t.querySelector("a.grip-row.selected");return!!a||!!r},eN=(e,t)=>[Q.name,ew.name,ed.name,ew.name,ek.name,ef.name,ev.name].some(t=>e.isActive(t))||ey(t),eS=({editor:e})=>{let{state:{doc:t,selection:a,selection:{empty:r,from:n,to:l}}}=e,i=!t.textBetween(n,l).length&&(0,z.eE)(a);return!r&&!i&&!!e.isEditable};function eL(...e){return(0,f.QP)((0,g.$)(e))}let eM=(0,n.memo)(({color:e,active:t,onColorChange:a})=>{let l=eL("flex items-center justify-center px-1.5 py-1.5 rounded group",!t&&"hover:bg-neutral-100",t&&"bg-neutral-100"),i=eL("w-4 h-4 rounded bg-slate-100 shadow-xs ring-offset-2 ring-current",!t&&"hover:ring-1",t&&"ring-1"),s=(0,n.useCallback)(()=>{a&&a(e||"")},[a,e]);return(0,r.jsx)("button",{onClick:s,className:l,children:(0,r.jsx)("div",{style:{backgroundColor:e,color:e},className:i})})});eM.displayName="ColorButton";var eT=a(38164),ez=a(62523),eB=a(85057),eR=a(4884);function eI({className:e,...t}){return(0,r.jsx)(eR.bL,{"data-slot":"switch",className:(0,i.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,r.jsx)(eR.zi,{"data-slot":"switch-thumb",className:(0,i.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}let eH=({onSetLink:e,initialUrl:t,initialOpenInNewTab:a,initialDoFollow:r})=>
1{let[l,i]=(0,n.useState)(t||""),[s,o]=(0,n.useState)(a||!1),[c,d]=(0,n.useState)(r||!1),u=(0,n.useCallback)(e=>{i(e.target.value)},[]),h=(0,n.useMemo)(()=>/^(\S+):(\/\/)?\S+$/.test(l),[l]),m=(0,n.useCallback)(t=>{t.preventDefault(),h&&e(l,s,c)},[l,h,s,e,c]);return{url:l,setUrl:i,openInNewTab:s,setOpenInNewTab:o,onChange:u,handleSubmit:m,isValidUrl:h,doFollow:c,setDoFollow:d}},eq=({onSetLink:e,initialOpenInNewTab:t,initialUrl:a,initialDoFollow:n})=>{let l=eH({onSetLink:e,initialOpenInNewTab:t,initialUrl:a,initialDoFollow:n});return(0,r.jsxs)("div",{className:"flex w-full flex-col gap-2 rounded-lg border border-neutral-200 bg-white p-2 shadow-xs dark:border-neutral-800 dark:bg-black",children:[(0,r.jsx)("form",{onSubmit:l.handleSubmit,className:"flex items-center gap-2",children:(0,r.jsxs)(eB.J,{className:"flex cursor-text items-center gap-2 rounded-lg bg-neutral-100 p-2 dark:bg-neutral-900",children:[(0,r.jsx)(eT.A,{className:"flex-none text-black dark:text-white"}),(0,r.jsx)(ez.p,{type:"url",className:"min-w-[12rem] flex-1 bg-transparent text-sm text-black outline-hidden dark:text-white",placeholder:"URL girin",value:l.url,onChange:l.onChange}),(0,r.jsx)(u.$,{type:"submit",disabled:!l.isValidUrl,children:"Ekle"})]})}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("div",{children:(0,r.jsxs)(eB.J,{className:"flex cursor-pointer items-center justify-start gap-2 text-sm font-semibold text-neutral-500 select-none dark:text-neutral-400",children:["Yeni sekmede a\xe7",(0,r.jsx)(eI,{checked:l.openInNewTab,onCheckedChange:l.setOpenInNewTab})]})}),(0,r.jsx)("div",{children:(0,r.jsxs)(eB.J,{className:"flex cursor-pointer items-center justify-start gap-2 text-sm font-semibold text-neutral-500 select-none dark:text-neutral-400",children:["DoFollow",(0,r.jsx)(eI,{checked:l.doFollow,onCheckedChange:l.setDoFollow})]})})]})]})};var e$=a(89917),eO=a(87489);function e_({className:e,orientation:t="horizontal",decorative:a=!0,...n}){return(0,r.jsx)(eO.b,{"data-slot":"separator",decorative:a,orientation:t,className:(0,i.cn)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...n})}var eF=a(46102),eP=a(74260);let eD=({onClear:e,onEdit:t,url:a})=>{let n=a?.startsWith("javascript:")?"":a;return(0,r.jsxs)("div",{className:"flex h-12 w-full items-center gap-2 rounded-lg border border-neutral-200 bg-white p-2 shadow-xs dark:border-neutral-800 dark:bg-black",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(eP.default,{href:n,className:"text-sm text-blue-600 underline",children:a})}),(0,r.jsx)(e_,{orientation:"vertical"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(eF.k$,{asChild:!0,children:(0,r.jsx)(u.$,{variant:"ghost",size:"sm",onClick:t,children:(0,r.jsx)(e$.A,{})})}),(0,r.jsx)(eF.ZI,{sideOffset:10,children:"D\xfczenle"})]}),(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(eF.k$,{asChild:!0,children:(0,r.jsx)(u.$,{variant:"ghost",size:"sm",onClick:e,children:(0,r.jsx)(ej.A,{})})}),(0,r.jsx)(eF.ZI,{sideOffset:10,children:"Sil"})]})]})]})},eV=({editor:e,appendTo:t})=>{let[a,i]=(0,n.useState)(!1),{link:s,target:o,rel:c}=(0,l.er)({editor:e,selector:e=>{let t=e.editor.getAttributes("link");return{link:t.href,target:t.target,rel:t.rel}}}),d=(0,n.useCallback)(()=>e.isActive("link"),[e]),u=(0,n.useCallback)(()=>{i(!0)},[]),h=(0,n.useCallback)((t,a,r)=>{e.chain().focus().extendMarkRange("link").setLink({href:t,target:a?"_blank":"",rel:r?"":"noopener noreferrer nofollow"}).run(),i(!1)},[e]),m=(0,n.useCallback)(()=>(e.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1),null),[e]);return(0,r.jsx)(l.mM,{editor:e,pluginKey:"textMenu",shouldShow:d,updateDelay:0,tippyOptions:{popperOptions:{modifiers:[{name:"flip",enabled:!1}]},appendTo:()=>t?.current,onHidden:()=>{i(!1)}},children:a?(0,r.jsx)(eq,{initialUrl:s,initialOpenInNewTab:"_blank"===o,initialDoFollow:""===c,onSetLink:h}):(0,r.jsx)(eD,{url:s,onClear:m,onEdit:u})})};var eE=a(9727),eK=a(19144),eJ=a(17240),eU=a(33127),eZ=a(74347),eW=a(40224),eY=a(15968),eQ=a(89140),eG=a(5623),eX=a(57539),e0=a(18673),e1=a(72976),e2=a(87325),e5=a(67733),e4=a(88702),e8=a(56340),e9=a(32643),e6=a(14636),e3=a(2925);let e7=({initialUrl:e,onSetLink:t})=>
1{let[a,r]=(0,n.useState)(e||""),[l,i]=(0,n.useState)(null),s=(0,n.useCallback)(e=>{r(e.target.value)},[]),o=(0,n.useMemo)(()=>/^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})(?:[&?].*)?$/.test(a),[a]),c=(0,n.useCallback)(e=>{i(null),e.preventDefault(),o&&t(a),o||i("Ge\xe7ersiz YouTube URL'si")},[a,o,t]);return{url:a,setUrl:r,onChange:s,handleSubmit:c,isValidUrl:o,error:l}},te=({onSetLink:e,initialUrl:t})=>{let a=e7({onSetLink:e,initialUrl:t});return(0,r.jsx)("div",{className:"flex w-full flex-col gap-2 rounded-lg border border-neutral-200 bg-white p-2 shadow-xs dark:border-neutral-800 dark:bg-black",children:(0,r.jsxs)("form",{onSubmit:a.handleSubmit,className:"flex items-center gap-2",children:[(0,r.jsxs)(eB.J,{className:"flex cursor-text items-center gap-2 rounded-lg bg-neutral-100 p-2 dark:bg-neutral-900",children:[(0,r.jsx)(e3.A,{className:"flex-none text-black dark:text-white"}),(0,r.jsx)(ez.p,{type:"url",className:"min-w-[12rem] flex-1 bg-transparent text-sm text-black outline-hidden dark:text-white",placeholder:"Youtube linki girin",value:a.url,onChange:a.onChange}),(0,r.jsx)(u.$,{type:"submit",disabled:!a.isValidUrl,children:"Ekle"})]}),a.error&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:a.error})]})})},tt=({onSetLink:e})=>(0,r.jsxs)(e6.AM,{children:[(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(e6.Wv,{asChild:!0,children:(0,r.jsx)(eF.k$,{asChild:!0,children:(0,r.jsx)(u.$,{className:(0,i.cn)("h-8 w-8"),variant:"ghost",size:"icon",children:(0,r.jsx)(e3.A,{})})})}),(0,r.jsx)(eF.ZI,{children:"Youtube Video Ekle"})]}),(0,r.jsx)(e6.hl,{className:"w-full rounded-lg border-none p-0",children:(0,r.jsx)(te,{onSetLink:e})})]});var ta=a(53311),tr=a(66474),tn=a(86692),tl=a(93104),ti=a(18538),ts=a(4881),to=a(97207),tc=a(47835),td=a(44940),tu=a(44838);let th=({onCompleteSentence:e,onFixSpelling:t,onMakeLonger:a,onMakeShorter:l,onSimplify:i,onTone:s,onTranslate:o})=>{let c=(0,n.useCallback)(e=>()=>s(e),[s]),d=(0,n.useCallback)(e=>()=>o(e),[o]);return(0,r.jsxs)(tu.rI,{children:[(0,r.jsx)(tu.ty,{asChild:!0,children:(0,r.jsxs)(u.$,{variant:"ghost",size:"sm",className:"text-purple-500 hover:text-purple-600 active:text-purple-600 data-[state=open]:text-purple-600 data-[state=open]:hover:text-purple-600 dark:text-purple-400 dark:hover:text-purple-300 dark:active:text-purple-400 data-[state=open]:dark:text-purple-400 data-[state=open]:dark:hover:text-purple-200",children:[(0,r.jsx)(ta.A,{className:"mr-1 h-2 w-2"}),(0,r.jsx)(tr.A,{className:"ml-1 h-2 w-2"})]})}),(0,r.jsx)(tu.SQ,{className:"w-56",children:(0,r.jsxs)(tu.I,{children:[(0,r.jsxs)(tu._2,{onClick:i,children:[(0,r.jsx)(tn.A,{className:"mr-1 h-4 w-4"}),"BasitleÅtir"]}),(0,r.jsxs)(tu._2,{onClick:t,children:[(0,r.jsx)(tl.A,{className:"mr-1 h-4 w-4"}),"Yazım hatasını d\xfczelt"]}),(0,r.jsxs)(tu._2,{onClick:l,children:[(0,r.jsx)(ti.A,{className:"mr-1 h-4 w-4"}),"Kısalt"]}),(0,r.jsxs)(tu._2,{onClick:a,children:[(0,r.jsx)(ts.A,{className:"mr-1 h-4 w-4"}),"Uzat"]}),(0,r.jsxs)(tu.lv,{children:[(0,r.jsxs)(tu.nV,{children:[(0,r.jsx)(to.A,{className:"mr-1 h-4 w-4"}),"Yazı tonunu deÄiÅtir"]}),(0,r.jsx)(tu.dc,{children:(0,r.jsx)(tu.M5,{className:"flex max-h-[20rem] min-w-[15rem] flex-col overflow-auto p-2",children:m.map(e=>(0,r.jsx)(tu._2,{onClick:c(e.value),children:e.label},e.value))})})]}),(0,r.jsxs)(tu.lv,{children:[(0,r.jsxs)(tu.nV,{children:[(0,r.jsx)(tc.A,{className:"mr-1 h-4 w-4"}),"\xc7evir"]}),(0,r.jsx)(tu.dc,{children:(0,r.jsx)(tu.M5,{className:"flex max-h-[20rem] min-w-[15rem] flex-col overflow-auto p-2",children:h.map(e=>(0,r.jsx)(tu._2,{onClick:d(e.value),children:e.label},e.value))})})]}),(0,r.jsxs)(tu._2,{onClick:e,children:[(0,r.jsx)(td.A,{className:"mr-1 h-4 w-4"}),"C\xfcmleyi tamamla"]})]})})]})};var tm=a(12130);let tp=e=>"option"===e.type,tg=e=>"category"===e.type,tf=({onSetLink:e})=>(0,r.jsxs)(e6.AM,{children:[(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(e6.Wv,{asChild:!0,children:(0,r.jsx)(eF.k$,{asChild:!0,children:(0,r.jsx)(u.$,{className:(0,i.cn)("h-8 w-8"),variant:"ghost",size:"icon",children:(0,r.jsx)(eT.A,{})})})}),(0,r.jsx)(eF.ZI,{children:"BaÄlantı Ekle"})]}),(0,r.jsx)(e6.hl,{className:"w-full rounded-lg border-none p-0",children:(0,r.jsx)(eq,{onSetLink:e})})]}),tb=e=>{let t=(0,n.useCallback)(()=>e.chain().focus().toggleBold().run(),[e]),a=(0,n.useCallback)(()=>e.chain().focus().toggleItalic().run(),[e]),r=(0,n.useCallback)(()=>e.chain().focus().toggleStrike().run(),[e]),l=(0,n.useCallback)(()=>e.chain().focus().toggleUnderline().run(),[e]),i=(0,n.useCallback)(()=>e.chain().focus().toggleCodeBlock().run(),[e]),s=(0,n.useCallback)(()=>e.chain().focus().toggleBlockquote().run(),[e]),o=(0,n.useCallback)(()=>e.chain().focus().unsetBlockquote().run(),[e]),c=(0,n.useCallback)(()=>e.chain().focus().toggleBulletList().run(),[e]),d=(0,n.useCallback)(()=>e.chain().focus().toggleOrderedList().run(),[e]),u=(0,n.useCallback)(()=>e.chain().focus().toggleSubscript().run(),[e]),h=(0,n.useCallback)(()=>e.chain().focus().toggleSuperscript().run(),[e]),m=(0,n.useCallback)(()=>e.chain().focus().setTextAlign("left").run(),[e]),p=(0,n.useCallback)(()=>e.chain().focus().setTextAlign("center").run(),[e]),g=(0,n.useCallback)(()=>e.chain().focus().setTextAlign("right").run(),[e]),f=(0,n.useCallback)(()=>e.chain().focus().setTextAlign("justify").run(),[e]),b=(0,n.useCallback)(t=>e.chain().setColor(t).run(),[e]),x=(0,n.useCallback)(()=>e.chain().focus().unsetColor().run(),[e]),v=(0,n.useCallback)(t=>e.chain().setHighlight({color:t}).run(),[e]),k=(0,n.useCallback)(()=>e.chain().focus().unsetHighlight().run(),[e]);return{unsetQuote:o,onBold:t,onItalic:a,onStrike:r,onUnderline:l,onCodeBlock:i,onSubscript:u,onSuperscript:h,onAlignLeft:m,onAlignCenter:p,onAlignRight:g,onAlignJustify:f,onChangeColor:b,onClearColor:x,onChangeHighlight:v,onClearHighlight:k,onLink:(0,n.useCallback)((t,a)=>e.chain().focus().setLink({href:t,target:a?"_blank":""}).run(),[e]),onQuote:s,onBulletList:c,onOrderedList:d,onAddYoutube:(0,n.useCallback)(t=>e.chain().focus().setYoutubeVideo({src:t}).run(),[e])}};var tx=a(22705),tv=a(92406),tk=a(76047),tj=a(21852);let tA=e=>(0,l.er)({editor:e,selector:e=>[{type:"category",label:"Kategori",id:"hierarchy"},{icon:tm.A,onClick:()=>e.editor.chain().focus().lift("codeBlock").liftListItem("listItem").setParagraph().run(),id:"paragraph",disabled:()=>!e.editor.can().setParagraph(),isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList"),label:"Paragraf",type:"option"},{icon:tx.A,onClick:()=>e.editor.chain().focus().lift("codeBlock").liftListItem("listItem").setHeading({level:2}).run(),id:"heading2",disabled:()=>!e.editor.can().setHeading({level:2}),isActive:()=>e.editor.isActive("heading",{level:2}),label:"BaÅlık 2",type:"option"},{icon:tv.A,onClick:()=>e.editor.chain().focus().lift("codeBlock").liftListItem("listItem").setHeading({level:3}).run(),id:"heading3",disabled:()=>!e.editor.can().setHeading({level:3}),isActive:()=>e.editor.isActive("heading",{level:3}),label:"BaÅlık 3",type:"option"},{icon:tk.A,onClick:()=>e.editor.chain().focus().lift("codeBlock").liftListItem("listItem").setHeading({level:4}).run(),id:"heading4",disabled:()=>!e.editor.can().setHeading({level:4}),isActive:()=>e.editor.isActive("heading",{level:4}),label:"BaÅlık 4",type:"option"},{icon:tj.A,onClick:()=>e.editor.chain().focus().lift("codeBlock").liftListItem("listItem").setHeading({level:5}).run(),id:"heading5",disabled:()=>!e.editor.can().setHeading({level:5}),isActive:()=>e.editor.isActive("heading",{level:5}),label:"BaÅlık 5",type:"option"},{type:"category",label:"Listeler",id:"lists"},{icon:eY.A,onClick:()=>e.editor.chain().focus().toggleBulletList().run(),id:"bulletList",disabled:()=>!e.editor.can().toggleBulletList(),isActive:()=>e.editor.isActive("bulletList"),label:"Madde iÅaretli liste",type:"option"},{icon:eQ.A,onClick:()=>e.editor.chain().focus().toggleOrderedList().run(),id:"orderedList",disabled:()=>!e.editor.can().toggleOrderedList(),isActive:()=>e.editor.isActive("orderedList"),label:"NumaralandırılmıŠliste",type:"option"}]}),tw=e=>{let t=(0,l.er)({editor:e,selector:e=>({isBold:e.editor.isActive("bold"),isItalic:e.editor.isActive("italic"),isStrike:e.editor.isActive("strike"),isUnderline:e.editor.isActive("underline"),isCode:e.editor.isActive("code"),isSubscript:e.editor.isActive("subscript"),isSuperscript:e.editor.isActive("superscript"),isAlignLeft:e.editor.isActive({textAlign:"left"}),isAlignCenter:e.editor.isActive({textAlign:"center"}),isTextSelected:e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),isBulletList:e.editor.isActive("bulletList")&&e.editor.can().toggleBulletList(),isOrderedList:e.editor.isActive("orderedList")&&e.editor.can().toggleOrderedList(),isQuote:e.editor.isActive("blockquoteFigure")||e.editor.isActive("quote")||e.editor.isActive("blockquote")||e.editor.isActive("blockquoteCaption")||!e.editor.can().toggleBlockquote(),isAlignRight:e.editor.isActive({textAlign:"right"}),isAlignJustify:e.editor.isActive({textAlign:"justify"}),currentColor:e.editor.getAttributes("textStyle")?.color||void 0,currentHighlight:e.editor.getAttributes("highlight")?.color||void 0,currentFont:e.editor.getAttributes("textStyle")?.fontFamily||void 0,currentSize:e.editor.getAttributes("textStyle")?.fontSize||void 0})});return{shouldShow:(0,n.useCallback)(({view:t,from:a})=>{if(!t||e.view.dragging)return!1;let r=t.domAtPos(a||0).node;
1return!eN(e,t.nodeDOM(a||0)||r)&&eS({editor:e})},[e]),...t}};var tC=a(34477);let ty=(0,tC.createServerReference)("40fe6f06e80e99abe018704b562e20454b0ea73c7f",tC.callServer,void 0,tC.findSourceMapURL,"simplifyText"),tN=(0,tC.createServerReference)("40839d63266a426063caea99db9b6e7416fdd9a050",tC.callServer,void 0,tC.findSourceMapURL,"fixSpelling"),tS=(0,tC.createServerReference)("40b0e5bae981ef66fe4a44550498e0a2befaac16eb",tC.callServer,void 0,tC.findSourceMapURL,"makeShorter"),tL=(0,tC.createServerReference)("409d9638dba55e8eb5465a5a6682187f0c5a4b9962",tC.callServer,void 0,tC.findSourceMapURL,"makeLonger"),tM=(0,tC.createServerReference)("60ef0b3a6e26fb754220e9bc2b13add8ad10f8d740",tC.callServer,void 0,tC.findSourceMapURL,"changeTone"),tT=(0,tC.createServerReference)("6006a3d99f58eeb524969e4dc1eacf757c0ee99dc8",tC.callServer,void 0,tC.findSourceMapURL,"translateText"),tz=(0,tC.createServerReference)("401d562f5f45857dbf65c55b099ab7d755ab2f4884",tC.callServer,void 0,tC.findSourceMapURL,"completeSentence"),tB=e=>{let[t,a]=(0,n.useState)(!1),r=(0,n.useCallback)(()=>{let{from:t,to:a}=e.state.selection;return e.state.doc.textBetween(t,a," ")},[e]),l=(0,n.useCallback)(t=>{let{from:a,to:r}=e.state.selection;e.chain().focus().deleteRange({from:a,to:r}).insertContent(t).run()},[e]),i=(0,n.useCallback)(async e=>{let t=r();if(t.trim()){a(!0);try{let a=await e(t);a.success&&a.data?.text&&l(a.data.text)}finally{a(!1)}}},[r,l]),s=(0,n.useCallback)(()=>i(ty),[i]),o=(0,n.useCallback)(()=>i(tN),[i]),c=(0,n.useCallback)(()=>i(tS),[i]),d=(0,n.useCallback)(()=>i(tL),[i]),u=(0,n.useCallback)(e=>i(t=>tM(t,e)),[i]);return{isLoading:t,onSimplify:s,onFixSpelling:o,onMakeShorter:c,onMakeLonger:d,onTone:u,onTranslate:(0,n.useCallback)(e=>i(t=>tT(t,e)),[i]),onCompleteSentence:(0,n.useCallback)(()=>i(tz),[i])}},tR=(0,n.memo)(function({isActive:e,icon:t,command:a,name:n,shortcut:l,id:s}){return(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(eF.k$,{asChild:!0,children:a?(0,r.jsx)(u.$,{...s?{id:s}:{},className:(0,i.cn)("h-8 w-8",e&&"bg-accent text-accent-foreground"),variant:"ghost",size:"icon",onClick:a,children:t}):(0,r.jsx)(u.$,{...s?{id:s}:{},className:(0,i.cn)("h-8 w-8",e&&"bg-accent text-accent-foreground"),variant:"ghost",size:"icon",children:t})}),(0,r.jsxs)(eF.ZI,{className:"flex flex-row items-center gap-2",children:[n,l&&(0,r.jsx)("div",{className:"bg-accent text-muted-foreground rounded-md p-0.5 px-2",children:(0,r.jsx)("small",{children:l})})]})]})}),tI=(0,n.memo)(({color:e,onChange:t,onClear:a})=>{let[l,i]=(0,n.useState)(e||""),s=(0,n.useCallback)(e=>{i(e.target.value)},[]),o=(0,n.useCallback)(()=>{if(!/^#([0-9A-F]{3}){1,2}$/i.test(l)){t&&t("");return}t&&t(l)},[l,t]);return(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)(d.jI,{className:"w-full",color:e||"",onChange:t}),(0,r.jsx)("input",{type:"text",className:"w-full rounded border border-neutral-200 bg-white p-2 text-black focus:ring-0 focus:outline-1 focus:outline-neutral-300 dark:border-neutral-800 dark:bg-black dark:text-white dark:focus:outline-neutral-700",placeholder:"#000000",value:l,onChange:s,onBlur:o}),(0,r.jsxs)("div",{className:"flex max-w-[15rem] flex-wrap items-center justify-center gap-1",children:[p.map(a=>(0,r.jsx)(eM,{active:a===e,color:a,onColorChange:t},a)),(0,r.jsxs)(u.$,{variant:"outline",size:"sm",onClick:a,children:[(0,r.jsx)(c.A,{}),(0,r.jsx)("span",{children:"Varsayılan renge sıfırla"})]})]})]})}),tH=(0,n.memo)(({options:e})=>{let t=(0,n.useMemo)(()=>e.find(e=>"option"===e.type&&e.isActive()),[e]);return(0,r.jsxs)(tu.rI,{children:[(0,r.jsx)(tu.ty,{asChild:!0,children:(0,r.jsxs)(u.$,{variant:"ghost",className:(0,i.cn)("h-8 px-1.5 py-0",t?.id!=="paragraph"&&!!t?.type&&"bg-neutral-100 text-neutral-800 dark:bg-neutral-900 dark:text-neutral-200"),children:[t?.type==="option"&&(0,r.jsx)(t.icon,{})||(0,r.jsx)(tm.A,{}),(0,r.jsx)(tr.A,{className:"h-2 w-2"})]})}),(0,r.jsx)(tu.SQ,{children:(0,r.jsx)(tu.I,{children:e?.map(e=>tp(e)?(0,r.jsxs)(tu._2,{onClick:e.onClick,disabled:e.isActive(),children:[(0,r.jsx)(e.icon,{}),e.label]},e.id):tg(e)?(0,r.jsx)(tu.lp,{children:e.label},e.id):void 0)})})]})}),tq=({editor:e})=>{let t=tb(e),a=tw(e),n=tA(e),l=tB(e);return(0,r.jsx)("div",{children:(0,r.jsx)(eF.Bc,{children:(0,r.jsxs)("div",{className:"flex h-8 flex-row items-center justify-center gap-0.5 leading-none text-black",children:[(0,r.jsx)(th,{onSimplify:l.onSimplify,onFixSpelling:l.onFixSpelling,onMakeShorter:l.onMakeShorter,onMakeLonger:l.onMakeLonger,onTone:l.onTone,onTranslate:l.onTranslate,onCompleteSentence:l.onCompleteSentence}),(0,r.jsx)(e_,{orientation:"vertical",className:"m-1"}),(0,r.jsx)(tH,{options:n}),(0,r.jsx)(e_,{orientation:"vertical",className:"m-1"}),(0,r.jsx)(tR,{isActive:a.isBold,icon:(0,r.jsx)(eE.A,{}),command:t.onBold,name:"Kalın"}),(0,r.jsx)(tR,{isActive:a.isItalic,icon:(0,r.jsx)(eK.A,{}),command:t.onItalic,name:"İtalik"}),(0,r.jsx)(tR,{isActive:a.isUnderline,icon:(0,r.jsx)(eJ.A,{}),command:t.onUnderline,name:"Altı \xe7izili"}),(0,r.jsxs)(e6.AM,{children:[(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(e6.Wv,{asChild:!0,children:(0,r.jsx)(eF.k$,{asChild:!0,children:(0,r.jsx)(u.$,{className:(0,i.cn)("h-8 w-8",!!a.currentColor&&"bg-accent text-accent-foreground"),variant:"ghost",size:"icon",children:(0,r.jsx)(eU.A,{})})})}),(0,r.jsx)(eF.ZI,{children:"Metin Rengi"})]}),(0,r.jsx)(e6.hl,{className:"w-60",children:(0,r.jsx)(tI,{color:a.currentColor,onChange:t.onChangeColor,onClear:t.onClearColor})})]}),(0,r.jsxs)(e6.AM,{children:[(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(e6.Wv,{asChild:!0,children:(0,r.jsx)(eF.k$,{asChild:!0,children:(0,r.jsx)(u.$,{className:(0,i.cn)("h-8 w-8",!!a.currentHighlight&&"bg-accent text-accent-foreground"),variant:"ghost",size:"icon",children:(0,r.jsx)(eZ.A,{})})})}),(0,r.jsx)(eF.ZI,{children:"Metni Vurgula"})]}),(0,r.jsx)(e6.hl,{className:"w-60",children:(0,r.jsx)(tI,{color:a.currentHighlight,onChange:t.onChangeHighlight,onClear:t.onClearHighlight})})]}),(0,r.jsx)(e_,{orientation:"vertical",className:"m-1"}),(0,r.jsx)(tf,{onSetLink:t.onLink}),(0,r.jsx)(tR,{isActive:a.isQuote,icon:(0,r.jsx)(eW.A,{}),command:t.onQuote,name:"Alıntı"}),(0,r.jsx)(tR,{isActive:a.isBulletList,icon:(0,r.jsx)(eY.A,{}),command:t.onBulletList,name:"Liste"}),(0,r.jsx)(tR,{isActive:a.isOrderedList,icon:(0,r.jsx)(eQ.A,{}),command:t.onOrderedList,name:"Numaralı Liste"}),(0,r.jsx)(tt,{onSetLink:t.onAddYoutube}),(0,r.jsxs)(e6.AM,{children:[(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(e6.Wv,{asChild:!0,children:(0,r.jsx)(eF.k$,{asChild:!0,children:(0,r.jsx)(u.$,{className:(0,i.cn)("h-8 w-8"),variant:"ghost",size:"icon",children:(0,r.jsx)(eG.A,{})})})}),(0,r.jsx)(eF.ZI,{children:"Daha Fazla"})]}),(0,r.jsxs)(e6.hl,{side:"top",className:"flex w-92 flex-row items-center gap-1",children:[(0,r.jsx)(tR,{icon:(0,r.jsx)(eX.A,{}),command:t.onCodeBlock,name:"Kod Blok"}),(0,r.jsx)(tR,{icon:(0,r.jsx)(e0.A,{}),command:t.onSubscript,name:"Alt Simge",shortcut:"CTRL + .",isActive:a.isSubscript}),(0,r.jsx)(tR,{icon:(0,r.jsx)(e1.A,{}),command:t.onSuperscript,name:"\xdcst Simge",shortcut:"CTRL + ,",isActive:a.isSuperscript}),(0,r.jsx)(tR,{icon:(0,r.jsx)(e2.A,{}),command:t.onAlignLeft,name:"Sola Hizala",shortcut:"Shift + CTRL + L",isActive:a.isAlignLeft}),(0,r.jsx)(tR,{icon:(0,r.jsx)(e5.A,{}),command:t.onAlignCenter,name:"Ortaya Hizala",shortcut:"Shift + CTRL + E",isActive:a.isAlignCenter}),(0,r.jsx)(tR,{icon:(0,r.jsx)(e4.A,{}),command:t.onAlignRight,name:"SaÄa Hizala",shortcut:"Shift + CTRL + R",isActive:a.isAlignRight}),(0,r.jsx)(tR,{icon:(0,r.jsx)(e8.A,{}),command:t.onAlignJustify,name:"İki Yana Hizala",shortcut:"Shift + CTRL + J",isActive:a.isAlignJustify}),(0,r.jsx)(tR,{isActive:a.isStrike,icon:(0,r.jsx)(e9.A,{}),command:t.onStrike,name:"\xdcst\xfc \xe7izili",shortcut:"CTRL + SHIFT + S"})]})]})]})})})};var t$=a(50381),tO=a(16394),t_=a(8572),tF=a(82921),tP=a(85055),tD=a(54073);function tV({className:e,defaultValue:t,value:a,min:l=0,max:s=100,...o}){let c=n.useMemo(()=>Array.isArray(a)?a:Array.isArray(t)?t:[l,s],[a,t,l,s]);return(0,r.jsxs)(tD.bL,{"data-slot":"slider",defaultValue:t,value:a,min:l,max:s,className:(0,i.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...o,children:[(0,r.jsx)(tD.CC,{"data-slot":"slider-track",className:(0,i.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,r.jsx)(tD.Q6,{"data-slot":"slider-range",className:(0,i.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:c.length},(e,t)=>(0,r.jsx)(tD.zi,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},t))]})}let tE=(0,n.memo)(({onChange:e,value:t})=>
1{let[a,l]=(0,n.useState)([t]),i=(0,n.useCallback)(t=>{e(t[0]),l(t)},[e]);return(0,r.jsxs)("div",{className:"flex w-60 items-center gap-2",children:[(0,r.jsx)(tV,{value:a,onValueChange:i,max:100,step:1}),(0,r.jsxs)("span",{className:"text-xs font-semibold text-neutral-500 select-none",children:[a[0],"%"]})]})});tE.displayName="ImageBlockWidth";let tK=({editor:e,appendTo:t})=>{let a=(0,n.useRef)(null),i=(0,n.useRef)(null),s=(0,n.useCallback)(()=>{let t=b(e,"node-imageBlock");return t?.getBoundingClientRect()||new DOMRect(-1e3,-1e3,0,0)},[e]),o=(0,n.useCallback)(()=>e.isActive("imageBlock"),[e]),c=(0,n.useCallback)(()=>{e.chain().focus(void 0,{scrollIntoView:!1}).setImageBlockAlign("left").run()},[e]),d=(0,n.useCallback)(()=>{e.chain().focus(void 0,{scrollIntoView:!1}).setImageBlockAlign("center").run()},[e]),h=(0,n.useCallback)(()=>{e.chain().focus(void 0,{scrollIntoView:!1}).setImageBlockAlign("right").run()},[e]),m=(0,n.useCallback)(t=>{e.chain().focus(void 0,{scrollIntoView:!1}).setImageBlockWidth(t).run()},[e]),{isImageCenter:p,isImageLeft:g,isImageRight:f,width:x}=(0,l.er)({editor:e,selector:e=>({isImageLeft:e.editor.isActive("imageBlock",{align:"left"}),isImageCenter:e.editor.isActive("imageBlock",{align:"center"}),isImageRight:e.editor.isActive("imageBlock",{align:"right"}),width:parseInt(e.editor.getAttributes("imageBlock")?.width||0)})});return(0,r.jsx)(l.mM,{editor:e,pluginKey:`imageBlockMenu-${(0,tP.A)()}`,shouldShow:o,updateDelay:0,tippyOptions:{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},getReferenceClientRect:s,onCreate:e=>{i.current=e},appendTo:()=>t?.current,plugins:[tF.qf],sticky:"popper"},children:o()&&(0,r.jsxs)("div",{className:"inline-flex h-full gap-0.5 rounded-lg bg-white leading-none text-black shadow-xs dark:bg-black",ref:a,children:[(0,r.jsxs)(eF.Bc,{children:[(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(eF.k$,{asChild:!0,children:(0,r.jsx)(u.$,{variant:"ghost",disabled:g,onClick:c,children:(0,r.jsx)(t$.A,{})})}),(0,r.jsx)(eF.ZI,{children:(0,r.jsx)("p",{children:"Resmi sola hizala"})})]}),(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(eF.k$,{asChild:!0,children:(0,r.jsx)(u.$,{variant:"ghost",disabled:p,onClick:d,children:(0,r.jsx)(tO.A,{})})}),(0,r.jsx)(eF.ZI,{children:(0,r.jsx)("p",{children:"Resmi ortaya hizala"})})]}),(0,r.jsxs)(eF.m_,{children:[(0,r.jsx)(eF.k$,{asChild:!0,children:(0,r.jsx)(u.$,{variant:"ghost",disabled:f,onClick:h,children:(0,r.jsx)(t_.A,{})})}),(0,r.jsx)(eF.ZI,{children:(0,r.jsx)("p",{children:"Resmi saÄa hizala"})})]})]}),(0,r.jsx)(tE,{onChange:m,value:x})]})})};var tJ=a(49792);let tU=(0,n.memo)(({name:e,className:t,strokeWidth:a})=>{let n=tJ[e];return n?(0,r.jsx)(n,{className:eL("h-4 w-4",t),strokeWidth:a||2.5}):null});tU.displayName="Icon";var tZ=a(20547);let tW=(0,n.forwardRef)(({children:e,className:t,withShadow:a=!0,withBorder:n=!0,...l},i)=>{let s=eL(t,"bg-white rounded-lg dark:bg-black",a?"shadow-xs":"",n?"border border-neutral-200 dark:border-neutral-800":"");return(0,r.jsx)("div",{className:s,...l,ref:i,children:e})});tW.displayName="Surface";let tY=n.forwardRef(({active:e,buttonSize:t="medium",children:a,disabled:n,variant:l="primary",className:i,activeClassname:s,...o},c)=>{let d=eL("flex group items-center justify-center border border-transparent gap-2 text-sm font-semibold rounded-md disabled:opacity-50 whitespace-nowrap","primary"===l&&eL("text-white bg-black border-black dark:text-black dark:bg-white dark:border-white",!n&&!e&&"hover:bg-neutral-800 active:bg-neutral-900 dark:hover:bg-neutral-200 dark:active:bg-neutral-300",e&&eL("bg-neutral-900 dark:bg-neutral-300",s)),"secondary"===l&&eL("text-neutral-900 dark:text-white",!n&&!e&&"hover:bg-neutral-100 active:bg-neutral-200 dark:hover:bg-neutral-900 dark:active:bg-neutral-800",e&&"bg-neutral-200 dark:bg-neutral-800"),"tertiary"===l&&eL("bg-neutral-50 text-neutral-900 dark:bg-neutral-900 dark:text-white dark:border-neutral-900",!n&&!e&&"hover:bg-neutral-100 active:bg-neutral-200 dark:hover:bg-neutral-800 dark:active:bg-neutral-700",e&&eL("bg-neutral-200 dark:bg-neutral-800",s)),"ghost"===l&&eL("bg-transparent border-transparent text-neutral-500 dark:text-neutral-400",!n&&!e&&"hover:bg-black/5 hover:text-neutral-700 active:bg-black/10 active:text-neutral-800 dark:hover:bg-white/10 dark:hover:text-neutral-300 dark:active:text-neutral-200",e&&eL("bg-black/10 text-neutral-800 dark:bg-white/20 dark:text-neutral-200",s)),"medium"===t&&"py-2 px-3","small"===t&&"py-1 px-2","icon"===t&&"w-8 h-8","iconSmall"===t&&"w-6 h-6",i);return(0,r.jsx)("button",{ref:c,disabled:n,className:d,...o,children:a})});tY.displayName="Button";var tQ=a(51403);let tG=navigator.platform.toUpperCase().indexOf("MAC")>=0,tX=({children:e})=>{let t="inline-flex items-center justify-center w-5 h-5 p-1 text-[0.625rem] rounded font-semibold leading-none border border-neutral-200 text-neutral-500 border-b-2";return"Mod"===e?(0,r.jsx)("kbd",{className:t,children:tG?"â":"Ctrl"}):"Shift"===e?(0,r.jsx)("kbd",{className:t,children:"â§"}):"Alt"===e?(0,r.jsx)("kbd",{className:t,children:tG?"â¥":"Alt"}):(0,r.jsx)("kbd",{className:t,children:e})},t0=(0,n.forwardRef)(({children:e},t)=>(0,r.jsx)("span",{ref:t,children:e}));t0.displayName="TooltipChild";let t1=({children:e,enabled:t=!0,title:a,shortcut:l,tippyOptions:i={}})=>{let s=(0,n.useCallback)(e=>(0,r.jsxs)("span",{className:"z-[999] flex items-center gap-2 rounded-lg border border-neutral-100 bg-white px-2.5 py-1 shadow-xs",tabIndex:-1,"data-placement":e["data-
1placement"],"data-reference-hidden":e["data-reference-hidden"],"data-escaped":e["data-escaped"],children:[a&&(0,r.jsx)("span",{className:"text-xs font-medium text-neutral-500",children:a}),l&&(0,r.jsx)("span",{className:"flex items-center gap-0.5",children:l.map(e=>(0,r.jsx)(tX,{children:e},e))})]}),[l,a]);return t?(0,r.jsx)(tQ.Ay,{delay:500,offset:[0,8],touch:!1,zIndex:99999,appendTo:document.body,...i,render:s,children:(0,r.jsx)(t0,{children:e})}):(0,r.jsx)(r.Fragment,{children:e})},t2=(0,n.forwardRef)(({shouldShowContent:e=!0,children:t,isVertical:a=!1,className:n,...l},i)=>{let s=eL("text-black inline-flex h-full leading-none gap-0.5",a?"flex-col p-2":"flex-row p-1 items-center",n);return e&&(0,r.jsx)(tW,{className:s,...l,ref:i,withBorder:!1,withShadow:!0,children:t})});t2.displayName="Toolbar",(0,n.forwardRef)(({horizontal:e,className:t,...a},n)=>{let l=eL("bg-neutral-200 dark:bg-neutral-800",e?"w-full min-w-[1.5rem] h-[1px] my-1 first:mt-0 last:mt-0":"h-full min-h-[1.5rem] w-[1px] mx-1 first:ml-0 last:mr-0",t);return(0,r.jsx)("div",{className:l,ref:n,...a})}).displayName="Toolbar.Divider";let t5=(0,n.forwardRef)(({children:e,buttonSize:t="icon",variant:a="ghost",className:n,tooltip:l,tooltipShortcut:i,activeClassname:s,...o},c)=>{let d=eL("gap-1 min-w-[2rem] px-2 w-auto",n),u=(0,r.jsx)(tY,{activeClassname:s,className:d,variant:a,buttonSize:t,ref:c,...o,children:e});return l?(0,r.jsx)(t1,{title:l,shortcut:i,children:u}):u});t5.displayName="ToolbarButton";let t4={Wrapper:t2};tZ.l9,tZ.ZL;let t8=({label:e,close:t=!0,icon:a,iconComponent:n,disabled:l,onClick:i,isActive:s})=>{let o=eL("flex items-center gap-2 p-1.5 text-sm font-medium text-neutral-500 text-left bg-transparent w-full rounded",!s&&!l,"hover:bg-neutral-100 hover:text-neutral-800 dark:hover:bg-neutral-900 dark:hover:text-neutral-200",s&&!l&&"bg-neutral-100 text-neutral-800 dark:bg-neutral-900 dark:text-neutral-200",l&&"text-neutral-400 cursor-not-allowed dark:text-neutral-600"),c=a?tJ[a]:null,d=t?tZ.bm:"button";return(0,r.jsxs)(d,{className:o,onClick:i,disabled:l,children:[c&&(0,r.jsx)(c,{className:"h-4 w-4"}),n||null,e]})};(0,n.forwardRef)((e,t)=>(0,r.jsx)("hr",{...e,ref:t,className:"my-1 border-neutral-200 dark:border-neutral-800"})).displayName="Divider";let t9=({editor:e,view:t,state:a,from:r})=>{let n=t.domAtPos(r).node,l=t.nodeDOM(r)||n;if(!e.isActive(H.name)||!l||D(a.selection))return!1;let i=l;for(;i&&!["TD","TH"].includes(i.tagName);)i=i.parentElement;return!!(i&&i.querySelector&&i.querySelector("a.grip-column.selected"))},t6=n.memo(({editor:e,appendTo:t})=>{let a=(0,n.useCallback)(({view:t,state:a,from:r})=>!!a&&t9({editor:e,view:t,state:a,from:r||0}),[e]),i=(0,n.useCallback)(()=>{e.chain().focus().addColumnBefore().run()},[e]),s=(0,n.useCallback)(()=>{e.chain().focus().addColumnAfter().run()},[e]),o=(0,n.useCallback)(()=>{e.chain().focus().deleteColumn().run()},[e]);return(0,r.jsx)(l.mM,{editor:e,pluginKey:"tableColumnMenu",updateDelay:0,tippyOptions:{appendTo:()=>t?.current,offset:[0,15],popperOptions:{modifiers:[{name:"flip",enabled:!1}]}},shouldShow:a,children:(0,r.jsxs)(t4.Wrapper,{isVertical:!0,children:[(0,r.jsx)(t8,{iconComponent:(0,r.jsx)(tU,{name:"ArrowLeftToLine"}),close:!1,label:"\xd6ncesine s\xfctun ekle",onClick:i}),(0,r.jsx)(t8,{iconComponent:(0,r.jsx)(tU,{name:"ArrowRightToLine"}),close:!1,label:"Sonrasına s\xfctun ekle",onClick:s}),(0,r.jsx)(t8,{icon:"Trash",close:!1,label:"S\xfctun sil",onClick:o})]})})});t6.displayName="TableColumnMenu";let t3=({editor:e,view:t,state:a,from:r})=>{let n=t.domAtPos(r).node,l=t.nodeDOM(r)||n;if(!e.isActive(H.name)||!l||D(a.selection))return!1;let i=l;for(;i&&!["TD","TH"].includes(i.tagName);)i=i.parentElement;return!!(i&&i.querySelector&&i.querySelector("a.grip-row.selected"))},t7=n.memo(({editor:e,appendTo:t})=>{let a=(0,n.useCallback)(({view:t,state:a,from:r})=>!!a&&!!r&&t3({editor:e,view:t,state:a,from:r}),[e]),i=(0,n.useCallback)(()=>{e.chain().focus().addRowBefore().run()},[e]),s=(0,n.useCallback)(()=>{e.chain().focus().addRowAfter().run()},[e]),o=(0,n.useCallback)(()=>{e.chain().focus().deleteRow().run()},[e]);return(0,r.jsx)(l.mM,{editor:e,pluginKey:"tableRowMenu",updateDelay:0,tippyOptions:{appendTo:()=>t?.current,placement:"left",offset:[0,15],popperOptions:{modifiers:[{name:"flip",enabled:!1}]}},shouldShow:a,children:(0,r.jsxs)(t4.Wrapper,{isVertical:!0,children:[(0,r.jsx)(t8,{iconComponent:(0,r.jsx)(tU,{name:"ArrowUpToLine"}
1),close:!1,label:"\xd6ncesine satır ekle",onClick:i}),(0,r.jsx)(t8,{iconComponent:(0,r.jsx)(tU,{name:"ArrowDownToLine"}),close:!1,label:"Sonrasına satır ekle",onClick:s}),(0,r.jsx)(t8,{icon:"Trash",close:!1,label:"Satır sil",onClick:o})]})})});t7.displayName="TableRowMenu";var ae=a(8342);let at=()=>[eu,ae.A,eC.k,eg,I,G.configure({levels:[2,3,4,5]}),Q,x.W.configure({document:!1,dropcursor:!1,heading:!1,horizontalRule:!1,blockquote:!1,history:!1,codeBlock:!1,gapcursor:!1}),T.B,ed,w.x,y.Q,em,ek.configure({openOnClick:!1}),v.f4.configure({multicolor:!0}),k.z,ew,A.n.extend({addKeyboardShortcuts:()=>({})}).configure({types:["heading","paragraph"]}),L.E,M.Z,H,Z,Y,W,C.o5,j.O.configure({includeChildren:!0,showOnlyCurrent:!1,placeholder:({node:e})=>"titleNode"===e.type.name?"BaÅlık ekleyin":"Yazmaya baÅlayın"}),N.J,ef,ev,S.Q.configure({width:2,class:"ProseMirror-dropcursor border-black"}),ep],aa=({...e})=>{let t=(0,l.hG)({...e,immediatelyRender:!1,shouldRerenderOnTransaction:!1,autofocus:!0,extensions:[...at()].filter(e=>void 0!==e),editorProps:{attributes:{autocomplete:"off",autocorrect:"off",autocapitalize:"off",class:"min-h-full"}}},[]);return window.editor=t,{editor:t}},ar=({content:e,setContent:t})=>{let a=(0,n.useRef)(null),{editor:c}=aa({onCreate:t=>{e&&t.editor.commands.setContent(e,!0),t.editor.commands.focus(e?"end":"start",{scrollIntoView:!0})},onUpdate:e=>{t(e.editor.getJSON())}});return(0,r.jsx)("section",{className:"space-y-6",children:c&&(0,r.jsxs)(s.Zp,{ref:a,id:"boundary",className:(0,i.cn)("bg-card relative gap-0 overflow-hidden rounded-none rounded-b-xl p-0 shadow-sm transition-all duration-300"),children:[(0,r.jsx)("div",{className:(0,i.cn)("z-20 flex w-full flex-none items-center justify-center border-b border-neutral-200 bg-white p-2 text-black dark:border-neutral-800 dark:bg-black dark:text-white"),children:(0,r.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,r.jsx)(tq,{editor:c})})}),(0,r.jsxs)(o.F,{className:(0,i.cn)("ext-base bg-background/20 border-input focus-within:ring-ring focus-within:border-ring h-[600px] w-full transition-all focus-within:ring-1"),children:[(0,r.jsx)(l.$Z,{editor:c,className:"relative flex-1"}),(0,r.jsx)(eV,{editor:c,appendTo:a}),(0,r.jsx)(t7,{editor:c,appendTo:a}),(0,r.jsx)(t6,{editor:c,appendTo:a}),(0,r.jsx)(tK,{editor:c,appendTo:a})]})]})})}},44838:(e,t,a)=>{a.d(t,{I:()=>u,M5:()=>f,SQ:()=>d,_2:()=>h,dc:()=>o,lp:()=>m,lv:()=>p,nV:()=>g,rI:()=>s,ty:()=>c});var r=a(95155);a(12115);var n=a(48698),l=a(13052),i=a(59434);function s({...e}){return(0,r.jsx)(n.bL,{"data-slot":"dropdown-menu",...e})}function o({...e}){return(0,r.jsx)(n.ZL,{"data-slot":"dropdown-menu-portal",...e})}function c({...e}){return(0,r.jsx)(n.l9,{"data-slot":"dropdown-menu-trigger",...e})}function d({className:e,sideOffset:t=4,...a}){return(0,r.jsx)(n.ZL,{children:(0,r.jsx)(n.UC,{"data-slot":"dropdown-menu-content",sideOffset:t,className:(0,i.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...a})})}function u({...e}){return(0,r.jsx)(n.YJ,{"data-slot":"dropdown-menu-group",...e})}function h({className:e,inset:t,variant:a="default",...l}){return(0,r.jsx)(n.q7,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":a,className:(0,i.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...l})}function m({className:e,inset:t,...a}){return(0,r.jsx)(n.JU,{"data-slot":"dropdown-menu-label","data-inset":t,className:(0,i.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...a})}function p({...e}){return(0,r.jsx)(n.Pb,{"data-slot":"dropdown-menu-sub",...e})}function g({className:e,inset:t,children:a,...s}){return(0,r.jsxs)(n.ZP,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:(0,i.cn)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...s,children:[a,(0,r.jsx)(l.A,{className:"ml-auto size-4"})]})}function f({className:e,...t}){return(0,r.jsx)(n.G5,{"data-slot":"dropdown-menu-sub-content",className:(0,i.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...t})}},46102:(e,t,a)=>{a.d(t,{Bc:()=>i,ZI:()=>c,k$:()=>o,m_:()=>s});var r=a(95155);a(12115);var n=a(89613),l=a(59434);function i({delayDuration:e=0,...t}){return(0,r.jsx)(n.Kq,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function s({...e}){return(0,r.jsx)(i,{children:(0,r.jsx)(n.bL,{"data-slot":"tooltip",...e})})}function o({...e}){return(0,r.jsx)(n.l9,{"data-slot":"tooltip-trigger",...e})}function c({className:e,sideOffset:t=0,children:a,...i}){return(0,r.jsx)(n.ZL,{children:(0,r.jsxs)(n.UC,{"data-slot":"tooltip-content",sideOffset:t,className:(0,l.cn)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs ",e),...i,children:[a,(0,r.jsx)(n.i3,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}},66424:(e,t,a)=>{a.d(t,{F:()=>i});var r=a(95155);a(12115);var n=a(47655),l=a(59434);function i({className:e,children:t,...a}){return(0,r.jsxs)(n.bL,{type:"auto","data-slot":"scroll-area",className:(0,l.cn)("relative",e),...a,children:[(0,r.jsx)(n.LM,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),(0,r.jsx)(s,{orientation:"vertical"}),(0,r.jsx)(s,{orientation:"horizontal"}),(0,r.jsx)(n.OK,{})]})}function s({className:e,orientation:t="vertical",...a}){return(0,r.jsx)(n.VM,{"data-slot":"scroll-area-scrollbar",orientation:t,className:(0,l.cn)("flex touch-none p-px transition-colors select-none","vertical"===t&&"h-full w-2.5 border-l border-l-transparent","horizontal"===t&&"",e),...a,children:(0,r.jsx)(n.lr,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}},74260:(e,t,a)=>{a.r(t),a.d(t,{default:()=>c});var r=a(95155),n=a(6874),l=a.n(n),i=a(12115),s=a(35695),o=a(20408);function c({href:e,children:t,target:a,rel:n,prefetch:c=!1,onClick:d,onMouseEnter:u,onTouchStart:h,...m}){let{settings:p}=(0,o.t)(),g=(0,s.useRouter)(),f=(0,s.usePathname)(),b=((0,i.useRef)(!1),"string"==typeof e&&(e.startsWith("http")||e.startsWith("//"))),x=p?.linkBehavior==="new-tab"?"_blank":"_self",v=a||(b?"_blank":x),k=(0,i.useCallback)(()=>{},[e,b,g]),j=(0,i.useCallback)(e=>{k(),u?.(e)},[u,k]),A=(0,i.useCallback)(e=>{k(),h?.(e)},[h,k]),w=(0,i.useCallback)(t=>{if(d?.(t),t.defaultPrevented)return;let a="string"==typeof e?e:e.toString();if(a.split("?")[0].split("#")[0]===f){t.preventDefault(),window.location.href=a;return}window.__pageType&&"category"!==window.__pageType&&(t.preventDefault(),window.location.href=a)},[d,e,f]);return(0,r.jsx)(l(),{href:e,target:v,rel:n||("_blank"===v?"noopener noreferrer":void 0),prefetch:c,onClick:w,onMouseEnter:j,onTouchStart:A,...m,children:t})}}}]);
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.