PageSourceSearch

https://smartybot.ai/_next/static/chunks/7307.494834ba3fc1faab.js

js smartybot.ai collected 2026-10-05 15:08:40 UTC 7,705 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="aa321246-dfac-44ed-a53f-f832ecc7e24e",e._sentryDebugIdIdentifier="sentry-dbid-aa321246-dfac-44ed-a53f-f832ecc7e24e")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7307],{27307:function(e,t,n){n.r(t);var a=n(85893),o=n(67294),r=n(48583),s=n(5152),i=n.n(s),c=n(91819),d=n(85945),l=n(36492),u=n(48228),m=n(36720),p=n(11163),g=n(9264),f=n(58192),h=n(69876),v=n(20966),j=n(96768),x=n(78402),b=n(9564),L=n(15285),y=n(21351),_=n(47769),w=n(64668),C=n(18241);let k=i()(()=>n.e(2302).then(n.bind(n,52302)),{loadableGenerated:{webpack:()=>[52302]}}),D=i()(()=>Promise.resolve().then(n.bind(n,16881)),{loadableGenerated:{webpack:()=>[16881]},ssr:!1});t.default=e=>{var t,n,s;let{tabs:i,focusedTabId:S,updateTab:Z,onDragTab:E,isShared:H}=e,{enqueueSnackbar:N}=(0,m.Ds)(),{query:{id:T}}=(0,p.useRouter)(),{t:A}=(0,g.$G)(),{documentLimitation:I}=(0,C.Z)(),O=(0,f.U0)(),[F,M]=(0,o.useState)(!1),[R,G]=(0,r.KO)(b.NF),P=(0,r.Dv)(b.lv),J=(0,d.NL)(),Q=(0,o.useMemo)(()=>i.length>1,[i]),{data:q,isFetching:U}=(0,l.a)({queryFn:e=>y.Z.get("".concat(_.b.documentsAPI).concat(e.queryKey[1],"/")),queryKey:["document_".concat(S),S],refetchOnWindowFocus:!1,enabled:!!S,onError:e=>{var t;return N(null!==(n=null===(t=e.response.data)||void 0===t?void 0:t.detail)&&void 0!==n?n:"Error",{variant:"error"})}}),{mutate:z}=(0,u.D)({mutationFn:e=>{let{id:t,data:n}=e;return y.Z.put("".concat(_.b.documentsAPI).concat(t,"/update/"),n)},onError:e=>{N(e.response.data.detail,{variant:"error"})},onSuccess:e=>{J.setQueryData(["document_".concat(null==q?void 0:q.data.id)],{data:{...document,...e.data}})}}),{mutate:B}=(0,u.D)({mutationFn:e=>y.Z.delete("".concat(_.b.documentsAPI).concat(e,"/delete/")),onError:e=>{N(e.response.data.detail,{variant:"error"})}}),{mutate:K,isLoading:W}=(0,u.D)({mutationFn:e=>y.Z.post(_.b.createDocumentAPI,e),onError:e=>{var t,n;let a=null!==(n=e.response.data.error||e.response.data.detail||(null===(t=e.response.data.project)||void 0===t?void 0:t[0]))&&void 0!==n?n:"Error";O.capture("Document creation failure",{message:a}),N(a,{variant:"error"})},onSuccess:e=>{O.capture("Document creation succeed");let t=J.getQueryData(["single_project_".concat(T)]),n=JSON.parse(JSON.stringify(t));n.data.document_set=[...n.data.document_set,e.data],J.setQueryData(["single_project_".concat(T)],n),Z(e.data.id,"create"),N(A("new_document_created"),{variant:"success"})}}),Y=(0,o.useMemo)(()=>!H&&(I?i.length<I:i.length<35),[H,I,i]);return P?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Z,{boxName:"document",tabs:i,activeTab:null!==(s=null===(t=i.find(e=>e.id==S))||void 0===t?void 0:t.id)&&void 0!==s?s:"0",onTabChange:e=>Z(e),handleCreateNewTab:Y?()=>{let e={project:T,name:"New doc",content:w.Z};K(e)}:void 0,onRename:(e,t)=>{let n=J.getQueryData(["single_project_".concat(T)]),a=JSON.parse(JSON.stringify(n)),o=a.data.document_set.findIndex(e=>e.id===t);a.data.document_set[o]={id:t,name:e},J.setQueryData(["single_project_".concat(T)],a),z({id:t,data:{name:e}})},onDelete:Q?e=>{M(!0)}:void 0,onDuplicate:Y?()=>{let e={project:null==q?void 0:q.data.related_project.id,name:"".concat(null==q?void 0:q.data.name," (copy)"),content:null==q?void 0:q.data.content};K(e)}:void 0,onExportToPDF:e=>{q&&function(e,t){var n;let a=new c.kH({orientation:"p",unit:"px",format:"a3",compress:!0}),o=((n=document.createElement("div")).style.width="600px",n.style.fontSize="14px",n.innerHTML=e,n);a.setFontSize(6),a.html(o,{autoPaging:"text",margin:[12,12,12,12],width:500,callback:e=>{e.save(t)}})}(null==q?void 0:q.data.content,q.data.name)},loadingCreate:W,tabsOrder:null==P?void 0:P.documentsOrder,onDragTab:E,children:U?(0,a.jsx)(k,{}):(0,a.jsx)(L.Z,{handleUpdateDocument:e=>{q&&z({id:q.data.id,data:{content:e}})},documentContent:null==q?void 0:q.data.content,tempContent:R,handleClearTemp:()=>G("")})}),(0,a.jsx)(D,{opened:!!F,onClose:()=>M(!1),onDelete:()=>{var e;let t=J.getQueryData(["single_project_".concat(T)]),n=JSON.parse(JSON.stringify(t)),a=n.data.document_set.filter(e=>e.id!=(null==P?void 0:P.focused_document));
1n={data:{...n.data,document_set:a}},J.setQueryData(["single_project_".concat(T)],n),Z(n.data.document_set[0].id,"delete"),B(null!==(e=null==P?void 0:P.focused_document)&&void 0!==e?e:""),M(!1),N(A("item_deleted",{item:A("item")}),{variant:"success"})}})]}):(0,a.jsx)(h.k,{w:"100%",h:"100%",justify:"center",align:"center",children:(0,a.jsx)(v.a,{size:(0,j.h)(40)})})}},15285:function(e,t,n){var a=n(85893),o=n(67294),r=n(96486),s=n(27662),i=n(14953),c=n(37446),d=n(12806),l=n(54929),u=n(50601),m=n(48510),p=n(96279),g=n(41705),f=n(18151),h=n(64668),v=n(79325);t.Z=e=>{let{documentContent:t,handleUpdateDocument:n,tempContent:j,handleClearTemp:x}=e,[b,L]=(0,o.useState)(t),[y,_]=(0,o.useState)(),w=(0,o.useCallback)(e=>{null!=e?_(e):_(void 0)},[]),C=(0,o.useRef)(void 0);(0,o.useEffect)(()=>{let e=(0,r.debounce)(n,1e3);return e(null!=b?b:""),()=>e.cancel()},[b]);let k=(0,s.jE)({extensions:[l.Z,m.Z,i.r,g.Z,f.Z,u.ZP.configure({HTMLAttributes:{class:"custom_selection"}}),p.Z.configure({types:["heading","paragraph"]})],content:b||h.Z,onUpdate:e=>{e.editor.isActive("highlight")||L(e.editor.getHTML())}});(0,o.useEffect)(()=>{if(k&&j){k.getHTML()==h.Z&&k.commands.clearContent();let e=document.createElement("br");e.innerHTML=j;let{selection:t,schema:n,tr:a}=k.state,o=d.aw.fromSchema(n).parseSlice(e),r=a.insert(t.anchor,o.content);k.view.dispatch(r),x()}},[k,j]);let D=()=>{var e,t;k&&(k.commands.setTextSelection({...C.current}),k.commands.unsetHighlight(),null==window||null===(e=window.getSelection)||void 0===e||null===(t=e.call(window))||void 0===t||t.removeAllRanges())};return(0,a.jsxs)(c.L,{editor:k,styles:e=>({root:{border:"unset",flex:1,overflowY:"auto","&::-webkit-scrollbar":{width:"0.5rem",bordeRadius:"1rem"},"&::-webkit-scrollbar-track":{backgroundColor:e.colors.gray[2]},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colors.dark[1],borderRadius:"1rem"}},toolbar:{top:0}}),children:[(0,a.jsxs)(c.L.Toolbar,{sticky:!0,stickyOffset:60,children:[(0,a.jsxs)(c.L.ControlsGroup,{children:[(0,a.jsx)(c.L.Bold,{}),(0,a.jsx)(c.L.Italic,{}),(0,a.jsx)(c.L.Underline,{}),(0,a.jsx)(c.L.Strikethrough,{}),(0,a.jsx)(c.L.ClearFormatting,{}),(0,a.jsx)(c.L.Code,{})]}),(0,a.jsxs)(c.L.ControlsGroup,{children:[(0,a.jsx)(c.L.H1,{}),(0,a.jsx)(c.L.H2,{}),(0,a.jsx)(c.L.H3,{}),(0,a.jsx)(c.L.H4,{})]}),(0,a.jsxs)(c.L.ControlsGroup,{children:[(0,a.jsx)(c.L.Blockquote,{}),(0,a.jsx)(c.L.Hr,{}),(0,a.jsx)(c.L.BulletList,{}),(0,a.jsx)(c.L.OrderedList,{}),(0,a.jsx)(c.L.Subscript,{}),(0,a.jsx)(c.L.Superscript,{})]}),(0,a.jsxs)(c.L.ControlsGroup,{children:[(0,a.jsx)(c.L.Link,{}),(0,a.jsx)(c.L.Unlink,{})]}),(0,a.jsxs)(c.L.ControlsGroup,{children:[(0,a.jsx)(c.L.AlignLeft,{}),(0,a.jsx)(c.L.AlignCenter,{}),(0,a.jsx)(c.L.AlignJustify,{}),(0,a.jsx)(c.L.AlignRight,{})]})]}),k&&(0,a.jsx)(s.NM,{editor:k,children:(0,a.jsx)(v.Z,{target:y,onClickAI:()=>{if(!k)return;k.chain().focus().setHighlight().run();let{from:e,to:t}=k.state.selection;C.current={from:e,to:t}},onCloseModal:D,editor:!0,onInsert:e=>{if(!k)return;let t=document.createElement("br");t.innerHTML=e;let{selection:n,schema:a,tr:o}=k.state,r=d.aw.fromSchema(a).parseSlice(t),s=o.insert(n.anchor,r.content);k.view.dispatch(s),D()},onReplace:e=>{if(!k)return;let{from:t,to:n}=k.state.selection;k.chain().deleteRange({from:t,to:n}).run(),k.chain().insertContentAt(t,e).run(),D()}})}),(0,a.jsx)(c.L.Content,{ref:w})]})}},64668:function(e,t){t.Z='<h2 style="text-align: center">Welcome to Content Copilot</h2>'}}]);

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.