PageSourceSearch

https://koala.sh/_next/static/chunks/pages/library-b58ad36033cba99b.js

js koala.sh collected 2026-10-02 02:20:36 UTC 40,944 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5175],{97030:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/library",function(){return n(25144)}])},522:function(e,t,n){"use strict";var r=n(828),i=n(85893),a=n(66692),s=n(70256),l=n(75012),o=n(50629),c=n(41664),d=n.n(c);function u(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}var m={info:{bg:"bg-blue-50",text:"text-blue-700",link:"text-blue-700 hover:text-blue-600",action:"focus:ring-blue-600 hover:bg-blue-100",icon:(0,i.jsx)(a.Z,{className:"h-5 w-5 text-blue-400","aria-hidden":"true"})},error:{bg:"bg-red-50",text:"text-red-800",link:"text-red-800 hover:text-red-700",action:"focus:ring-red-600 hover:bg-red-100",icon:(0,i.jsx)(s.Z,{className:"h-5 w-5 text-red-400","aria-hidden":"true"})},success:{bg:"bg-green-50",text:"text-green-800",link:"text-green-800 hover:text-green-700",action:"focus:ring-green-600 hover:bg-green-100",icon:(0,i.jsx)(l.Z,{className:"h-5 w-5 text-green-400","aria-hidden":"true"})},warning:{bg:"bg-yellow-50",text:"text-yellow-800",link:"text-yellow-800 hover:text-yellow-700",action:"focus:ring-yellow-600 hover:bg-yellow-100",icon:(0,i.jsx)(o.Z,{className:"h-5 w-5 text-yellow-400","aria-hidden":"true"})}};t.Z=function(e){var t=e.message,n=e.linkHref,a=e.linkText,s=e.center,l=e.type,o=void 0===l?"info":l,c=e.title,h=e.body,x=e.actions,f=e.className;return x?(0,i.jsx)("div",{className:u("rounded-md p-4",f,m[o].bg),children:(0,i.jsxs)("div",{className:"flex",children:[(0,i.jsx)("div",{className:"flex-shrink-0",children:m[o].icon}),(0,i.jsxs)("div",{className:"ml-3",children:[c&&(0,i.jsx)("h3",{className:u("text-sm mb-2 font-medium",m[o].text),children:c}),(0,i.jsx)("div",{className:u("text-sm",m[o].text),children:(0,i.jsx)("div",{children:h})}),(0,i.jsx)("div",{className:"mt-4",children:(0,i.jsx)("div",{className:"-mx-2 -my-1.5 flex gap-3",children:Object.entries(x).map(function(e,t){var n=(0,r.Z)(e,2),a=n[0],s=n[1];return(0,i.jsx)("button",{onClick:function(){s&&s()},type:"button",className:u("rounded-md px-2 py-1.5 text-sm font-medium focus:outline-none",m[o].text,m[o].action),children:a},t)})})})]})]})}):(0,i.jsx)("div",{className:u("rounded-md p-4",m[o].bg),children:(0,i.jsxs)("div",{className:"flex ".concat(void 0!==s&&s?"items-center":""),children:[(0,i.jsx)("div",{className:"flex-shrink-0",children:m[o].icon}),(0,i.jsxs)("div",{className:"ml-3 flex-1 md:flex md:justify-between",children:[(0,i.jsx)("div",{className:u("text-sm",m[o].text),children:t}),n&&a&&(0,i.jsx)("p",{className:"mt-3 text-sm md:mt-0 md:ml-6",children:(0,i.jsxs)(d(),{href:n,className:u("whitespace-nowrap font-medium",m[o].link),children:[a,(0,i.jsx)("span",{"aria-hidden":"true",children:" →"})]})})]})]})})}},16805:function(e,t,n){"use strict";var r=n(85893),i=n(67294),a=n(11355),s=n(98831),l=n(26126),o=n(31415),c=n(66217);t.Z=function(e){var t=e.show,n=e.children,d=e.onClose,u=e.isLoading,m=e.title,h=e.widthClassName,x=e.hideSave,f=e.disableContainerPadding,g=void 0!==f&&f,b=e.onAfterLeave,p=e.saveLabel,v=e.dark,j=void 0!==v&&v,y=(0,i.useRef)(null);return(0,r.jsx)(a.u.Root,{show:t,as:i.Fragment,beforeEnter:function(){y.current&&(y.current.style.overflow="auto")},afterLeave:void 0===b?function(){}:b,children:(0,r.jsxs)(s.V,{as:"div",className:"relative z-50",onClose:function(){d({saved:!1})},children:[(0,r.jsx)(a.u.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,r.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),(0,r.jsx)("div",{className:"fixed inset-0 z-10",ref:y,children:(0,r.jsx)("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:(0,r.jsx)(a.u.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,r.jsxs)(s.V.Panel,{className:"relative transform overflow-y-visible rounded-lg ".concat(j?"bg-gray-800 text-gray-200":"bg-white"," text-left shadow-xl transition-all sm:my-8 sm:w-full ").concat(void 0===h?"sm:max-w-sm":h," ").concat(!g&&"px-4 pb-4 pt-5 sm:p-6"),children:[(0,r.jsx)("div",{className:(0,
1c.Z)("absolute right-0 hidden pt-4 sm:block",g?"top-[-52px]":"top-0 pr-4"),children:(0,r.jsxs)("button",{tabIndex:-1,type:"button",onClick:function(){return d({saved:!1})},className:(0,c.Z)("rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",g?"text-white hover:text-gray-200":j?"bg-gray-800 text-gray-400 hover:text-gray-200":"bg-white text-gray-400 hover:text-gray-500"),children:[(0,r.jsx)("span",{className:"sr-only",children:"Close"}),(0,r.jsx)(o.Z,{"aria-hidden":"true",className:"".concat(g?"h-8 w-8":"h-6 w-6")})]})}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"text-left",children:[m&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.V.Title,{as:"h3",className:"text-base font-semibold leading-6 ".concat(j?"text-white":"text-gray-900"),children:m}),(0,r.jsx)("div",{className:"h-2"})]}),(0,r.jsx)("div",{children:n})]})}),!(void 0!==x&&x)&&(0,r.jsx)("div",{className:"mt-5 sm:mt-6 flex justify-end",children:(0,r.jsxs)("button",{onClick:function(){return d({saved:!0})},type:"button",className:"ml-4 inline-flex justify-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600",children:[u&&(0,r.jsx)(l.Z,{svgClass:"w-4 h-4 fill-gray-600 text-blue-400",text:"Saving..."}),!u&&(void 0===p?"Save":p)]})})]})})})})]})})}},37152:function(e,t,n){"use strict";var r=n(47568),i=n(97582),a=n(85893),s=n(67294),l=n(11355),o=n(98831),c=n(25652),d=n(26126);t.Z=function(e){var t,n=e.children,u=e.show,m=e.onClose,h=void 0!==m&&m,x=e.onSave,f=void 0!==x&&x,g=e.isLoading,b=void 0!==g&&g,p=e.sliderTitle,v=e.size;return(0,a.jsx)(l.u.Root,{show:u,as:s.Fragment,children:(0,a.jsx)(o.V,{as:"div",className:"relative z-50",onClose:h,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.u.Child,{as:s.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),(0,a.jsx)("div",{className:"fixed inset-0 overflow-hidden",children:(0,a.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,a.jsx)("div",{className:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10 sm:pl-16",children:(0,a.jsx)(l.u.Child,{as:s.Fragment,enter:"transform transition ease-in-out duration-300",enterFrom:"translate-x-full",enterTo:"translate-x-0",leave:"transform transition ease-in-out duration-300",leaveFrom:"translate-x-0",leaveTo:"translate-x-full",children:(0,a.jsx)(o.V.Panel,{className:"pointer-events-auto w-screen ".concat(void 0===v?"max-w-md":v),children:(0,a.jsxs)("form",{className:"flex h-full flex-col divide-y divide-gray-200 bg-white shadow-xl",onSubmit:(t=(0,r.Z)(function(e){return(0,i.__generator)(this,function(t){return e.preventDefault(),f&&f(),[2]})}),function(e){return t.apply(this,arguments)}),children:[(0,a.jsxs)("div",{className:"h-0 flex-1 overflow-y-auto",children:[(0,a.jsx)("div",{className:"bg-blue-700 px-4 py-6 sm:px-6",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(o.V.Title,{className:"text-base font-semibold leading-6 text-white",children:void 0===p?"Update Section":p}),(0,a.jsx)("div",{className:"ml-3 flex h-7 items-center",children:(0,a.jsxs)("button",{type:"button",className:"rounded-md bg-blue-700 text-blue-200 hover:text-white focus:outline-none focus:ring-2 focus:ring-white",onClick:function(){return h()},children:[(0,a.jsx)("span",{className:"sr-only",children:"Close panel"}),(0,a.jsx)(c.Z,{className:"h-6 w-6","aria-hidden":"true"})]})})]})}),(0,a.jsx)("div",{className:"flex flex-1 flex-col justify-between",children:(0,a.jsx)("div",{className:"divide-y divide-gray-200 px-4 sm:px-6",children:(0,a.jsx)("div",{className:"space-y-6 pb-5 pt-6",children:n})})})]}),(0,a.jsxs)("div",{className:"flex flex-shrink-0 justify-end px-4 py-4",children:[h&&(0,a.jsx)("button",{type:"button",className:"rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:function(){h()},children:"Cancel"}),f&&(0,a.jsxs)("button",{type:"submit",className:"ml-4 inline-flex justify-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600",children:[b&&(0,a.jsx)(d.Z,{svgClass:"w-4 h-4 fill-gray-600 text-blue-400",text:"Saving..."}),!b&&"Save"]})]})]})})})})})})]})})})}},62387:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(85893),i=n(41664),a=n.n(i),s=n(11163),l=n(84053),o=[{name:"Generate",href:"/writer",anonymous:!0},{name:"Bulk",href:"/writer?bulk=true"},{name:"Library",href:"/library"},{name:"Queue",href:"/queued-articles"}];function c(){var e=(0,s.useRouter)().asPath||"",t=(0,l.useUser)(),n=(null==t?void 0:t.is_anonymous)===!0?o.filter(function(e){return e.anonymous}):o;return n.length<2?null:(0,r.jsx)("div",{className:"border-b border-gray-800/80 -mx-4 sm:-mx-6 md:-mx-8 mb-8",children:(0,r.jsx)("nav",{className:"px-4 sm:px-6 md:px-8 flex gap-1","aria-label":"Writer",children:n.map(function(t){var n="/writer"
1===t.href?"/writer"===e||e.startsWith("/writer")&&!e.includes("bulk=true"):"/writer?bulk=true"===t.href?e.startsWith("/writer")&&e.includes("bulk=true"):e.startsWith(t.href);return(0,r.jsxs)(a(),{href:t.href,className:n?"relative px-3 py-2.5 text-sm font-semibold text-white":"relative px-3 py-2.5 text-sm font-medium text-gray-400 hover:text-gray-200 transition-colors",children:[t.name,n&&(0,r.jsx)("span",{className:"absolute left-0 right-0 -bottom-px h-0.5 bg-blue-400 rounded-t"})]},t.href)})})})}},25144:function(e,t,n){"use strict";n.r(t);var r=n(47568),i=n(26042),a=n(69396),s=n(828),l=n(36305),o=n(97582),c=n(85893),d=n(9008),u=n.n(d),m=n(41664),h=n.n(m),x=n(57460),f=n.n(x),g=n(11163),b=n(67294),p=n(84053),v=n(96402),j=n(52051),y=n(25652),w=n(77e3),N=n(78017),Z=n(7266),_=n(26126),k=n(75012),C=n(23157),S=n(37152),F=n(522),A=n(16805),L=n(62387),T=n(10907),I=n(71387),P=function(e){return(e||"").split(" ").map(function(e){return e.charAt(0)}).join("").substring(0,5)};function E(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}var W=function(e){var t,n=e.articles,i=e.setIsEditingArticle,a=e.setArticles,d=e.supabase,u=e.projects,m=e.onArticlesUpdate,x=e.filteredByProject,g=e.brandFilter,p=(0,s.Z)((0,b.useState)([]),2),w=p[0],N=p[1],Z=(0,s.Z)((0,b.useState)(!1),2),_=Z[0],k=Z[1],S=(0,s.Z)((0,b.useState)(null),2),F=S[0],L=S[1],T=(0,s.Z)((0,b.useState)(!1),2),I=T[0],P=T[1],W=(0,s.Z)((0,b.useState)(!1),2),q=W[0],B=W[1],U=(0,s.Z)((0,b.useState)("ready"),2),R=U[0],O=U[1];(0,b.useEffect)(function(){if("error"===R||"success"===R){var e=setTimeout(function(){O("ready")},1e4);return function(){return clearTimeout(e)}}},[R]);var z=(t=(0,r.Z)(function(e){var t,n;return(0,o.__generator)(this,function(r){switch(r.label){case 0:if(t=e.saved,B(""),P(!0),!t)return[3,2];return[4,d.rpc("update_project_id_for_articles",{payload:{articleIds:w.map(function(e){return e.id}),projectId:F}})];case 1:if(n=r.sent().error)return P(!1),[2,B(n.message)];m(),N([]),r.label=2;case 2:return P(!1),k(!1),[2]}})}),function(e){return t.apply(this,arguments)});function V(){return(V=(0,r.Z)(function(){function e(){return(e=(0,r.Z)(function(){var e,t,n,r,i,a,s,l,c,u;return(0,o.__generator)(this,function(o){switch(o.label){case 0:return e=d.from("articles").select("id").is("deleted_at",null),x&&e.eq("project_id",x.id),"none"===g?e.is("settings->>brandId",null):g&&e.eq("settings->>brandId",g),[4,e];case 1:if(n=(t=o.sent()).data,r=t.error)throw r;i=[],a=0,o.label=2;case 2:if(!(a<n.length))return[3,5];return s=n.slice(a,a+200).map(function(e){return e.id}),[4,d.from("articles").select("id, title, created_at, html").in("id",s)];case 3:if(c=(l=o.sent()).data,u=l.error)throw u;i=i.concat(c),o.label=4;case 4:return a+=200,[3,2];case 5:var m,h,b,p,v;return m=i,h=f().unparse(m),b=new Blob([h],{type:"text/csv;charset=utf-8;"}),p=document.createElement("a"),v=URL.createObjectURL(b),p.setAttribute("href",v),p.setAttribute("download","articles.csv"),document.body.appendChild(p),p.click(),document.body.removeChild(p),[2]}})})).apply(this,arguments)}return(0,o.__generator)(this,function(t){switch(t.label){case 0:O("loading"),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,function(){return e.apply(this,arguments)}()];case 2:return t.sent(),O("success"),[3,4];case 3:return t.sent(),O("error"),[3,4];case 4:return[2]}})})).apply(this,arguments)}return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(A.Z,{isLoading:I,show:_,onClose:z,title:"Move Selected Articles",children:[(0,c.jsx)("p",{className:"mb-2 text-red-500 whitespace-normal overflow-hidden",children:q}),(0,c.jsx)(C.default,{isClearable:!0,id:"project-name",placeholder:"No Folder",options:u.map(function(e){return{value:e.id,label:e.name}}),onChange:function(e){L((null==e?void 0:e.value)||null)},classNamePrefix:"react-select-project-clearable"})]}),(0,c.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,c.jsxs)("div",{className:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8",children:[(0,c.jsxs)("div",{className:"mb-4",children:[0===w.length&&(0,c.jsx)("div",{className:"flex gap-4",children:(0,c.jsxs)("button",{disabled:"ready"!==R,className:E("text-sm","loading"===R&&"cursor-not-allowed text-blue-400","ready"===R&&"text-blue-400 hover:text-blue-600","error"===R&&"text-red-400","success"===R&&"text-green-400"),onClick:function(){!function(){V.apply(this,arguments)}()},children:["loading"===R&&(0,c.jsx)(c.Fragment,{children:"Loading..."}),"ready"===R&&(0,c.jsxs)(c.Fragment,{children:["Export"," ",x?"All Articles in Folder":"Entire Library"]}),"error"===R&&(0,c.jsx)(c.Fragment,{children:"Error"}),"success"===R&&(0,c.jsx)(c.Fragment,{children:"Done! Please check your downloads"})]})}),w.length>0&&(0,c.jsxs)("div",{className:"flex gap-4",children:[(0,c.jsxs)("span",{className:"text-gray-300 text-sm",children:[w.length," selected"]}),(0,c.jsx)("button",{className:"text-sm text-blue-400 hover:text-blue-600",onClick:function(){N([])},children:"Deselect"}),(0,c.jsx)("button",{onClick:function(){k(!0)},className:"text-sm text-blue-400 hover:text-blue-600",children:"Move"})]})]}),(0,c.jsxs)("table",{className:"min-w-full divide-y divide-gray-700",children:[(0,c.jsx)("thead",{children:(0,c.jsxs)("tr",{children:[(0,c.jsx)("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-white w-8 pl-0",children:(0,c.jsx)("div",{className:"flex items-center",children:(0,c.jsx)("input",{checked:Boolean(n.length===w.length),onChange:function(e){e.target.checked?N(n):N([])}
1,type:"checkbox",className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-600 cursor-pointer"})})}),(0,c.jsx)("th",{scope:"col",className:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-white sm:pl-0",children:"Article"}),(0,c.jsx)("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-white",children:"Created At"}),(0,c.jsx)("th",{scope:"col",className:"px-3 py-3.5 text-left text-sm font-semibold text-white w-12",children:"\xa0"})]})}),(0,c.jsx)("tbody",{className:"divide-y divide-gray-800",children:n.map(function(e){var t,s;return(0,c.jsxs)("tr",{className:"group",children:[(0,c.jsx)("td",{children:(0,c.jsx)("div",{className:"flex items-center",children:(0,c.jsx)("input",{checked:Boolean(w.find(function(t){return t.id===e.id})),onChange:function(t){t.target.checked?N(function(t){return(0,l.Z)(t).concat([e])}):N(function(t){return t.filter(function(t){return t.id!==e.id})})},type:"checkbox",className:"h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-600 cursor-pointer"})})}),(0,c.jsx)("td",{className:"whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-white sm:pl-0 overflow-hidden",children:(0,c.jsx)(h(),{href:"/article?articleId="+e.id,className:"hover:text-gray-300 group flex items-center",children:(0,c.jsx)("div",{className:"truncate max-w-[300px]",children:e.title})},e.id)}),(0,c.jsx)("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-300",children:(0,c.jsx)(v.Z,{date:e.created_at,minPeriod:60})}),(0,c.jsx)("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-300",children:(0,c.jsxs)("div",{className:"flex flex-grow-0 text-right ml-auto items-center",children:[(0,c.jsx)(j.Z,{className:"h-5 w-5 mr-1 text-gray-300 hover:text-white opacity-0 group-hover:opacity-100 cursor-pointer","aria-hidden":"true",onClick:(t=(0,r.Z)(function(t){return(0,o.__generator)(this,function(n){return t.preventDefault(),i(e),[2]})}),function(e){return t.apply(this,arguments)})}),(0,c.jsx)(y.Z,{className:"h-6 w-6 text-gray-300 hover:text-white ml-auto opacity-0 group-hover:opacity-100 cursor-pointer","aria-hidden":"true",onClick:(s=(0,r.Z)(function(t){return(0,o.__generator)(this,function(r){switch(r.label){case 0:if(t.preventDefault(),!window.confirm("Are you sure you want to delete this article?"))return[2];return[4,d.from("articles").update({deleted_at:new Date}).eq("id",e.id)];case 1:return r.sent(),a((0,l.Z)(n.filter(function(t){return t.id!==e.id}))),[2]}})}),function(e){return s.apply(this,arguments)})})]})})]},e.id)})})]})]})})]})};t.default=function(){var e,t,n,d,m,x,f=(0,s.Z)((0,b.useState)([]),2),v=f[0],A=f[1],q=(0,s.Z)((0,b.useState)(!0),2),B=q[0],U=q[1],R=(0,s.Z)((0,b.useState)(!1),2),O=R[0],z=R[1],V=(0,s.Z)((0,b.useState)(!1),2),D=V[0],M=V[1],H=(0,s.Z)((0,b.useState)(!1),2),Q=H[0],J=H[1],K=(0,s.Z)((0,b.useState)(!1),2),X=K[0],Y=K[1],G=(0,s.Z)((0,b.useState)(!1),2),$=G[0],ee=G[1],et=(0,s.Z)((0,b.useState)(!1),2),en=et[0],er=et[1],ei=(0,s.Z)((0,b.useState)(!0),2),ea=ei[0],es=ei[1],el=(0,s.Z)((0,b.useState)([]),2),eo=el[0],ec=el[1],ed=(0,s.Z)((0,b.useState)([]),2),eu=ed[0],em=ed[1],eh=(0,s.Z)((0,b.useState)(""),2),ex=eh[0],ef=eh[1],eg=(0,s.Z)((0,b.useState)(""),2),eb=eg[0],ep=eg[1],ev=(0,s.Z)((0,b.useState)(null),2),ej=ev[0],ey=ev[1],ew=(0,s.Z)((0,b.useState)([]),2),eN=ew[0],eZ=ew[1],e_=(0,s.Z)((0,b.useState)(null),2),ek=e_[0],eC=e_[1],eS=(0,p.useSupabaseClient)(),eF=(0,p.useUser)(),eA=(0,p.useSessionContext)().isLoading,eL=(0,g.useRouter)();(0,b.useEffect)(function(){eA||eF||eL.replace("/writer")},[eA,eF,eL]),(0,b.useEffect)(function(){if(eF){var e,t,n,s=(e=(0,r.Z)(function(){var e,t,n;return(0,o.__generator)(this,function(r){switch(r.label){case 0:return U(!0),[4,eS.from("projects").select().eq("user_id",eF.id).order("created_at",{ascending:!1})];case 1:return t=(e=r.sent()).data,n=e.error,t&&ec(t.map(function(e){var t;return(0,a.Z)((0,i.Z)({},e),{bgColor:null==e?void 0:null===(t=e.settings)||void 0===t?void 0:t.bgColor,initials:P(e.name)})})),n&&ep(n.message),U(!1),[2]}})}),function(){return e.apply(this,arguments)}),l=(t=(0,r.Z)(function(){var e,t,n;return(0,o.__generator)(this,function(r){switch(r.label){case 0:return[4,eS.from("integrations").select().match({user_id:eF.id})];case 1:if(t=(e=r.sent()).data,n=e.error,t)return[2,A(t)];return[2,ep(n.message)]}})}),function(){return t.apply(this,arguments)}),c=(n=(0,r.Z)(function(){var e,t,n,r;return(0,o.__generator)(this,function(i){switch(i.label){case 0:return[4,eS.from("brands").select("id, name, business_name").eq("user_id",eF.id).order("created_at",{ascending:!1})];case 1:eZ(e=i.sent().data||[]),t="string"==typeof eL.query.brand?eL.query.brand:null,n=null;try{n=localStorage.getItem("koala_library_brand_".concat(eF.id))}catch(e){}return("none"===(r=t||n)||e.some(function(e){return e.id===r}))&&eC(r),[2]}})}),function(){return n.apply(this,arguments)});s(),l(),c()}},[null==eF?void 0:eF.id]),(0,b.useEffect)(function(){if(eF){try{ek?localStorage.setItem("koala_library_brand_".concat(eF.id),ek):localStorage.removeItem("koala_library_brand_".concat(eF.id))}catch(e){}(null==ej?void 0:ej.brand_id)&&ek!==ej.brand_id&&ey(null)}},[ek]),(0,b.useEffect)(function(){eT()},[null==eF?void 0:eF.id,ej,ek]);var eT=function(){if(em([]),ep(""),eF){var e;(e=(0,r.Z)(function(){var e,t,n,r;return(0,o.__generator)(this,function(a){switch(a.label){case 0:return es(!0),e=eS.from("articles").select("id,title,created_at,project_id").match((0,i.Z)({user_id:eF.id},ej&&{project_id:ej.id})).is("deleted_at",null),"none"===ek?e=e.is("settings->>brandId",null):ek&&(e=e.eq("settings->>brandId",ek)),[4,e.limit(5e3).order("created_at",{ascending:!1})];case 1:return n=(t=a.sent()).data,r=t.error,n?em(n):ep(r.message),es(!1),[2]}})}),function(){return e.apply(this,arguments)})()}},eI=(e=(0,r.Z)(function(){var e,t,n,r,s,l,c;return(0,o.__generator)(this,function(o){switch(o.label){case 0:return ep(""),ee(!0),delete(e=(0,i.Z)({},X)).bgColor,delete e.initials,[4,eS.from("projects").update(e).eq("id",X.id).select().single()];
1case 1:return n=(t=o.sent()).data,r=t.error,n&&(ec(function(e){return e.map(function(e){if(e.id===n.id){var t;return(0,a.Z)((0,i.Z)({},n),{bgColor:null==n?void 0:null===(t=n.settings)||void 0===t?void 0:t.bgColor,initials:P(n.name)})}return e})}),l="defaultProjectKoalaWriter-".concat(eF.id),(null==(c=JSON.parse(localStorage.getItem(l)))?void 0:null===(s=c.value)||void 0===s?void 0:s.id)===n.id&&eP(l,{label:n.name,value:n})),r&&ep(r.message),ee(!1),[2]}})}),function(){return e.apply(this,arguments)}),eP=function(e,t){localStorage.setItem(e,JSON.stringify(t))},eE=(t=(0,r.Z)(function(){var e,t,n;return(0,o.__generator)(this,function(r){switch(r.label){case 0:return ep(""),ee(!0),[4,eS.from("articles").update(en).eq("id",en.id).select("id,created_at,title,project_id").single()];case 1:if(t=(e=r.sent()).data,n=e.error,t){if((null==ej?void 0:ej.id)&&(null==ej?void 0:ej.id)!==t.project_id)return em(function(e){return e.filter(function(e){return e.id!==t.id})}),ee(!1),[2];em(function(e){return e.map(function(e){return e.id===t.id?t:e})})}return n&&ep(n.message),ee(!1),[2]}})}),function(){return t.apply(this,arguments)}),eW=(n=(0,r.Z)(function(e){var t,n,r;return(0,o.__generator)(this,function(s){switch(s.label){case 0:if(Q||!(null==e?void 0:e.name))return[2];return ep(""),J(!0),[4,eS.from("projects").insert((0,a.Z)((0,i.Z)({},e),{user_id:eF.id})).select().single()];case 1:return n=(t=s.sent()).data,r=t.error,n&&ec(function(e){var t;return[(0,a.Z)((0,i.Z)({},n),{bgColor:null==n?void 0:null===(t=n.settings)||void 0===t?void 0:t.bgColor,initials:P(n.name)})].concat((0,l.Z)(e))}),r&&ep(r.message),J(!1),[2]}})}),function(e){return n.apply(this,arguments)});return eL.isReady&&eF&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(u(),{children:[(0,c.jsx)("title",{children:"Library"},"title"),(0,c.jsx)("meta",{name:"robots",content:"noindex"})]}),(0,c.jsxs)(S.Z,{show:Boolean(X),onClose:function(){Y(!1)},onSave:(0,r.Z)(function(){return(0,o.__generator)(this,function(e){switch(e.label){case 0:return[4,eI()];case 1:return e.sent(),Y(!1),[2]}})}),isLoading:$,sliderTitle:"Update Folder",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"project-name",className:"block text-sm font-medium leading-6 text-gray-900",children:"Folder Name"}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)("input",{type:"text",required:!0,name:"project-name",id:"project-name",className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6",value:null==X?void 0:X.name,onChange:function(e){Y(function(t){return(0,a.Z)((0,i.Z)({},t),{name:e.target.value})})}})})]}),eN.length>0&&(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"project-brand",className:"block text-sm font-medium leading-6 text-gray-900",children:"Brand"}),(0,c.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"Scoped folders appear when the Library is filtered to that brand. Leave empty to show the folder everywhere."}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)(C.default,{id:"project-brand",isClearable:!0,placeholder:"No brand (shows everywhere)",value:eN.filter(function(e){return e.id===(null==X?void 0:X.brand_id)}).map(function(e){return{value:e.id,label:e.business_name||e.name}}),options:eN.map(function(e){return{value:e.id,label:e.business_name||e.name}}),onChange:function(e){Y(function(t){var n;return(0,a.Z)((0,i.Z)({},t),{brand_id:null!==(n=null==e?void 0:e.value)&&void 0!==n?n:null})})},classNamePrefix:"react-select-project-clearable"})})]}),(0,c.jsx)(F.Z,{message:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"mb-4",children:[(0,c.jsx)("strong",{children:"Optional:"})," You can set an Integrated Account and/or a Webhook URL for the folder."]}),(0,c.jsxs)("ul",{className:"list-disc mb-4",children:[(0,c.jsx)("li",{className:"mb-2",children:"The Integrated Account will automatically create a draft for every article created in this folder"}),(0,c.jsx)("li",{children:"The Webhook URL notifies third-party software like Zapier of new articles. For signed requests, automatic retries and reuse across folders, create a Custom Webhook integration and pick it as the Integrated Account instead"})]}),(0,c.jsx)("div",{children:"Note that these actions only apply to newly created articles. Moving an existing article to a new folder will not create a draft or fire the webhook."})]})}),v.length>0&&(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"integrated-account",className:"block text-sm font-medium leading-6 text-gray-900",children:"Integrated Account"}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)(C.default,{id:"project-name",isClearable:!0,value:v.filter(function(e){return e.id===X.integration_id}).map(function(e){return{value:e.id,label:e.website||e.username}}),options:v.map(function(e){return{value:e.id,label:e.website||e.username}}),onChange:function(e){Y(function(t){var n;return(0,a.Z)((0,i.Z)({},t),{integration_id:null!==(n=null==e?void 0:e.value)&&void 0!==n?n:null})})},classNamePrefix:"react-select-project-clearable"})})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"project-webhook-url",className:"block text-sm font-medium leading-6 text-gray-900",children:"Webhook URL"}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)("input",{type:"url",name:"project-webhook-url",id:"project-webhook-url",className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6",placeholder:"https://example.com/hooks/koala",value:(null==X?void 0:X.webhook_url)||"",onChange:function(e){Y(function(t){return(0,a.Z)((0,i.Z)({},t),{webhook_url:e.target.value})})}})}),(0,c.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"Every article created in this folder is POSTed here. Leave empty to disable. For signed requests, retries and reuse across folders, create a Custom Webhook integration instead and select it above."})]})]}),(0,c.jsxs)(S.Z,{show:Boolean(en),onClose:function(){er(!1)},onSave:(0,r.Z)(function(){return(0,o.__generator)(this,function(e){switch(e.label){case 0:return[4,eE()];case 1:return e.sent(),er(!1),[2]}})}),isLoading:$,sliderTitle:"Update Article",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"article-title",className:"block text-sm font-medium leading-6 text-gray-900",children:"Article Title"}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)("input",{type:"text",name:"article-title",id:"article-title",className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6",value:(null==en?void 0:en.title)||"",onChange:function(e){er(function(t){return(0,a.Z)((0,i.Z)({},t),{title:e.target.value})})}})})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"project-name",className:"block text-sm font-medium leading-6 text-gray-900",children:"Folder Name"}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)(C.default,{isClearable:!0,id:"project-name",value:eo.filter(function(e){return e.id===en.project_id}).map(function(e){return{value:e.id,label:e.name}}),options:eo.map(function(e){return{value:e.id,label:e.name}}),onChange:function(e){er(function(t){var n;return(0,a.Z)((0,i.Z)({},t),{project_id:null!==(n=null==e?void 0:e.value)&&void 0!==n?n:null})})},classNamePrefix:"react-select-project-clearable"})})]})]}),(0,c.jsxs)(S.Z,{show:Boolean(D),onClose:function(){M(!1)},onSave:(0,r.Z)(function(){return(0,o.__generator)(this,function(e){switch(e.label){case 0:return[4,eW(D)];case 1:return e.sent(),M(!1),[2]}})}),isLoading:Q,sliderTitle:"Create Folder",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"project-name",className:"block text-sm font-medium leading-6 text-gray-900",placeholder:"Folder Name",children:"Folder Name"}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)("input",{type:"text",required:!0,name:"project-name",id:"project-name",className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6",value:null==D?void 0:D.name,onChange:function(e){M(function(t){return(0,a.Z)((0,i.Z)({},t),{name:e.target.value})})}})})]}),eN.length>0&&(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"project-brand",className:"block text-sm font-medium leading-6 text-gray-900",children:"Brand"}),(0,c.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"Scoped folders appear when the Library is filtered to that brand. Leave empty to show the folder everywhere."}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)(C.default,{id:"project-brand",isClearable:!0,placeholder:"No brand (shows everywhere)",value:eN.filter(function(e){return e.id===(null==D?void 0:D.brand_id)}).map(function(e){return{value:e.id,label:e.business_name||e.name}}),options:eN.map(function(e){return{value:e.id,label:e.business_name||e.name}}),onChange:function(e){M(function(t){var n;return(0,a.Z)((0,i.Z)({},t),{brand_id:null!==(n=null==e?void 0:e.value)&&void 0!==n?n:null})})},classNamePrefix:"react-select-project-clearable"})})]}),(0,c.jsx)(F.Z,{message:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"mb-4",children:[(0,c.jsx)("strong",{children:"Optional:"})," You can set an Integrated Account and/or a Webhook URL for the folder."]}
1),(0,c.jsxs)("ul",{className:"list-disc mb-4",children:[(0,c.jsx)("li",{className:"mb-2",children:"The Integrated Account will automatically create a draft for every article created in this folder"}),(0,c.jsx)("li",{children:"The Webhook URL notifies third-party software like Zapier of new articles. For signed requests, automatic retries and reuse across folders, create a Custom Webhook integration and pick it as the Integrated Account instead"})]}),(0,c.jsx)("div",{children:"Note that these actions only apply to newly created articles. Moving an existing article to a new folder will not create a draft or fire the webhook."})]})}),v.length>0&&(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"integrated-account",className:"block text-sm font-medium leading-6 text-gray-900",children:"Integrated Account"}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)(C.default,{id:"project-name",value:v.filter(function(e){return e.id===D.integration_id}).map(function(e){return{value:e.id,label:e.website||e.username}}),options:v.map(function(e){return{value:e.id,label:e.website||e.username}}),onChange:function(e){M(function(t){return(0,a.Z)((0,i.Z)({},t),{integration_id:e.value})})},classNamePrefix:"react-select-project"})})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("label",{htmlFor:"new-project-webhook-url",className:"block text-sm font-medium leading-6 text-gray-900",children:"Webhook URL"}),(0,c.jsx)("div",{className:"mt-2",children:(0,c.jsx)("input",{type:"url",name:"new-project-webhook-url",id:"new-project-webhook-url",placeholder:"https://example.com/hooks/koala",className:"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6",value:(null==D?void 0:D.webhook_url)||"",onChange:function(e){M(function(t){return(0,a.Z)((0,i.Z)({},t),{webhook_url:e.target.value})})}})}),(0,c.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"Optional. Every article created in this folder is POSTed here."})]})]}),(0,c.jsxs)("div",{className:"mx-auto mt-10 mb-12",style:{maxWidth:"800px"},children:[(0,c.jsx)(L.Z,{}),(0,c.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,c.jsx)("h1",{className:"text-3xl md:text-4xl font-bold text-white",children:"Library"}),(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[(0,c.jsx)(h(),{href:"/editor",className:"inline-flex items-center rounded-md border border-gray-600 px-2.5 py-1.5 text-sm font-semibold text-gray-200 hover:border-gray-500 hover:bg-gray-800",children:"Write from scratch"}),(0,c.jsxs)("button",{type:"button",className:"inline-flex items-center gap-x-1.5 rounded-md px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 bg-green-600 hover:bg-green-500 focus-visible:outline-green-600",onClick:function(){M({name:"",webhook_url:"",settings:{bgColor:(0,T.m)()},integration_id:null,brand_id:ek&&"none"!==ek?ek:null})},children:[(0,c.jsx)(w.Z,{className:"w-5 h-5 -ml-0.5","aria-hidden":"true"}),"Create Folder"]})]})]}),eb&&(0,c.jsx)("p",{className:"text-red-400 mb-6",children:eb}),eN.length>0&&(0,c.jsxs)("div",{className:"mb-6 flex items-center gap-3",children:[(0,c.jsx)("span",{className:"text-sm text-gray-400 shrink-0",children:"Brand"}),(0,c.jsx)("div",{className:"w-72",children:(0,c.jsx)(C.default,{isClearable:!0,placeholder:"All brands",styles:(0,I.Q)(),classNamePrefix:"react-select-brand-filter",value:"none"===ek?{value:"none",label:"No brand"}:eN.filter(function(e){return e.id===ek}).map(function(e){return{value:e.id,label:e.business_name||e.name}})[0]||null,options:(0,l.Z)(eN.map(function(e){return{value:e.id,label:e.business_name||e.name}})).concat([{value:"none",label:"No brand"}]),onChange:function(e){return eC(null!==(x=null==e?void 0:e.value)&&void 0!==x?x:null)}})})]}),!B&&eo.length>0&&(0,c.jsx)("div",{className:"mb-8",children:(0,c.jsx)("ul",{role:"list",className:"mt-3 grid grid-cols-1 gap-5 sm:grid-cols-2 sm:gap-6 lg:grid-cols-2",children:eo.filter(function(e){return!ek||("none"===ek?!e.brand_id:!e.brand_id||e.brand_id===ek)}).sort(function(e,t){if(ek&&"none"!==ek){var n=e.brand_id===ek?0:1,r=t.brand_id===ek?0:1;if(n!==r)return n-r}return 0}).map(function(e){var t,n;return(0,c.jsx)("li",{children:(0,c.jsxs)("div",{onClick:function(){ey((null==ej?void 0:ej.id)===e.id?null:e)},className:"col-span-1 flex rounded-md shadow-sm overflow-hidden cursor-pointer hover:opacity-90",children:[(0,c.jsx)("div",{className:E("flex w-16 flex-shrink-0 items-center justify-center text-sm font-medium text-white uppercase"),style:{backgroundColor:(null==ej?void 0:ej.id)===e.id?"rgb(22, 163, 74)":e.bgColor},children:(null==ej?void 0:ej.id)===e.id?(0,c.jsx)(k.Z,{className:"h-6 w-6"}):e.initials}),(0,c.jsxs)("div",{className:E("flex flex-1 items-center justify-between truncate text-white",(null==ej?void 0:ej.id)===e.id?"bg-gray-500":"bg-gray-600"),children:[(0,c.jsxs)("div",{className:"flex-1 min-w-0 px-4 py-4 min-h-[72px] flex flex-col justify-center",children:[(0,c.jsx)("span",{className:"font-semibold text-sm truncate",children:e.name}),e.brand_id&&((t=eN.find(function(t){return t.id===e.brand_id}))?(0,c.jsx)("span",{className:"mt-0.5 text-xs text-gray-400 truncate",children:t.business_name||t.name}):null)]}),(0,c.jsx)("div",{className:"flex-shrink-0 pr-2",onClick:function(t){t.stopPropagation(),Y(e)},children:(0,c.jsxs)("button",{type:"button",className:"inline-flex h-8 w-8 items-center justify-center hover:text-gray-300",children:[(0,c.jsx)("span",{className:"sr-only",children:"Open options"}),(0,c.jsx)(j.Z,{className:"h-5 w-5","aria-hidden":"true"})]})}),(0,c.jsx)("div",{className:"flex-shrink-0 pr-2",onClick:(n=(0,r.Z)(function(t){var n,r,i,a;return(0,o.__generator)(this,function(s){switch(s.label){case 0:if(t.stopPropagation(),z(e),!window.confirm("Are you sure you want to permanently delete this folder? This action cannot be undone."))return[3,3];return[4,eS.from("articles").update({project_id:null}).match({project_id:e.id,user_id:eF.id})];case 1:return(n=s.sent().error)&&ep(n.message),[4,eS.from("projects").delete().eq("id",e.id).select()];case 2:i=(r=s.sent()).data,a=r.error,i?(ec(eo.filter(function(t){return t.id!==e.id})),localStorage.removeItem("defaultProjectKoalaWriter-".concat(eF.id))):ep(a.message),s.label=3;case 3:return z(!1),[2]}})}),function(e){return n.apply(this,arguments)}),children:(0,c.jsxs)("button",{type:"button",className:"inline-flex h-8 w-8 items-center justify-center hover:text-gray-300",children:[(null==O?void 0:O.id)===e.id&&(0,c.jsx)(_.Z,{text:!1}),(null==O?void 0:O.id)!==e.id&&(0,c.jsx)(N.Z,{className:"h-5 w-5","aria-hidden":"true"})]})})]})]})},e.id)})})}),(B||ea)&&(0,c.jsx)("div",{className:"w-full flex justify-center",children:(0,c.jsx)(_.Z,{text:!1,svgClass:"w-12 h-12"})}),!ea&&!B&&eu.length>0&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"relative mb-4",children:[(0,c.jsx)(Z.Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-500 pointer-events-none"}),(0,c.jsx)("input",{type:"text",value:ex,onChange:function(e){return ef(e.target.value)},placeholder:"Search articles by title...",className:"w-full rounded-md border border-gray-700 bg-gray-800/40 pl-9 pr-9 py-2 text-sm text-gray-100 placeholder-gray-500 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"}),ex&&(0,c.jsx)("button",{type:"button",onClick:function(){return ef("")},"aria-label":"Clear search",className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-300",children:(0,c.jsx)(y.Z,{className:"h-4 w-4"})})]}),(m=(d=ex.trim().toLowerCase())?eu.filter(function(e){return(e.title||"").toLowerCase().includes(d)}):eu,d&&0===m.length?(0,c.jsxs)("div",{className:"text-gray-400 text-sm py-8 text-center",children:['No articles matching "',ex,'".']}):(0,c.jsx)(W,{articles:m,setIsEditingArticle:er,setArticles:em,supabase:eS,projects:eo,onArticlesUpdate:function(){eT()},filteredByProject:ej,brandFilter:ek}))]}),!ea&&0===eu.length&&(0,c.jsx)("div",{className:"text-gray-300 text-lg",children:"No articles found."})]})]})}},66217:function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}n.d(t,{Z:function(){return r}})},10907:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r=function(){var e=["#22c55e","#eab308","#9333ea","#db2777","#84cc16","#06b6d4","#0ea5e9","#f43f5e","#d946ef"];return e[Math.floor(Math.random()*e.length)]}},71387:function(e,t,n){"use strict";n.d(t,{Q:function(){return a}});var r=n(26042),i=n(69396),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size,n="sm"===(void 0===t?"md":t);return{control:function(e){return(0,i.Z)((0,r.Z)({},e),{borderWidth:1,backgroundColor:n?"#111827":"#1a232a",marginBottom:0,boxShadow:"none",borderColor:n?"#4b5563":"#6b7280",minHeight:n?"34px":e.minHeight,fontSize:n?"0.875rem":e.fontSize,"&:hover":{borderColor:n?"#6b7280":"#9ca3af"}})},valueContainer:function(e){return(0,i.Z)((0,r.Z)({},e),{padding:n?"2px 8px":e.padding})},indicatorsContainer:function(e){return(0,r.Z)({},e,n&&{height:"32px"})},menu:function(e){return(0,i.Z)((0,r.Z)({},e),{backgroundColor:n?"#111827":"#1a232a",border:"1px solid #6b7280",fontSize:n?"0.875rem":e.fontSize})},option:function(e,t){return(0,i.Z)((0,r.Z)({},e),{backgroundColor:t.isSelected?"#3b82f6":t.isFocused?"#374151":n?"#111827":"#1a232a",color:"#e5e7eb","&:hover":{backgroundColor:"#374151"}})},singleValue:function(e){return(0,i.Z)((0,r.Z)({},e),{color:"#e5e7eb"})},placeholder:function(e){return(0,i.Z)((0,r.Z)({},e),{color:"#9ca3af"})},input:function(e){return(0,i.Z)((0,r.Z)({},e),{color:"#e5e7eb"})}}}}},function(e){e.O(0,[8664,4237,7106,9774,2888,179],function(){return e(e.s=97030)}),_N_E=e.O()}]);

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.