1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1472],{47829:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/content-library",function(){return s(97359)}])},99818:function(e,t,s){"use strict";s.d(t,{P:function(){return n}});var l=s(85893);function n(e){let{text:t,ctaText:s}=e,n=String(t||""),a=/^(of|and|or|the|a|an|to|in|on|for|with|from|by|as|at|into|over|under|between)$/i,r=/^[A-Z][a-z'â-]*$/,i=/^(Introduction|Conclusion|Final\s+Thoughts)$/i;function o(e){let t=e.trim();if(!t||i.test(t)||/[.?!:]$/.test(t)||t.length<3||t.length>90)return!1;let s=t.split(/\s+/),l=s.filter(e=>r.test(e)).length;return(l+s.filter(e=>a.test(e)).length)/Math.max(s.length,1)>=.7&&l>=3&&s.length<=12}let c="(Download(?:\\s+now)?|Get(?:\\s+started)?|Grab|Sign\\s*up|Register|Join|Start|Try|Book|Request|See|Explore|Learn\\s*more|Talk|Schedule|Subscribe|Contact|Buy|Shop|Claim|Watch|Read|Click(?:\\s+here)?|Tap(?:\\s+here)?)",d=RegExp("^".concat(c,"\\b"),"i"),x=RegExp("([.!?])\\s+(".concat(c,"\\b[^\\n]*?)$"),"i"),m=s&&s.trim()||"[INSERT YOUR CALL TO ACTION HERE]",u=n.split("\n").map(e=>e.replace(/\s+$/,"")),h=[];for(let e=0;e<u.length;e++){let t=(u[e]||"").trim(),s=(u[e+1]||"").trim();if(t&&s&&o(t)&&!/[.?!]$/.test(t)){let l=function(e){let t=(e||"").trim().split(/\s+/);return t.length>=2&&a.test(t[0])&&r.test(t[1])?{prefix:"".concat(t[0]," ").concat(t[1]),remainder:t.slice(2).join(" ").trim()}:null}(s);if(l){h.push("".concat(t," ").concat(l.prefix)),l.remainder&&h.push(l.remainder),e++;continue}}h.push(t)}let g=e=>e.replace(/([.?!])\s+(?=[A-Z][a-z]+(?:\s+[A-Z][a-z]+){2,})/g,"$1\n"),p=h.flatMap(e=>g(e).split("\n")),b=(p=p.map(e=>{let t=(e||"").trim(),s=t.match(x);return s?t.slice(0,s.index+1).trim():d.test(t)?"":t})).some(e=>d.test((e||"").trim())||x.test(e||"")),f=p.some(e=>(e||"").trim()===m);b||f||p.push("",m);let j=[],y=[],v=!1,N=()=>{if(!y.length)return;let e=y.join(" ");(e=e.replace(/^(In\s+conclusion|In\s+summary|To\s+conclude|In\s+the\s+final\s+stretch\s+of\s+our\s+discussion)[,:-]\s*/i,"")).trim().length&&j.push((0,l.jsx)("p",{className:"mb-4 leading-relaxed text-gray-700",children:w(e)},j.length)),y=[]},w=e=>{let t;let s=[],n=/\*\*([^*]+)\*\*/g,a=0;for(;null!==(t=n.exec(e));)t.index>a&&s.push(e.slice(a,t.index)),s.push((0,l.jsx)("strong",{className:"font-bold text-gray-900",children:t[1]},s.length)),a=n.lastIndex;return a<e.length&&s.push(e.slice(a)),s.length>0?s:[e]},C=e=>{let t=e.trim().split(/\s+/);for(;t.length>2&&a.test(t[t.length-1]);)t.pop();return t.join(" ")},S=p.findIndex(e=>(e||"").trim().length>0);if(-1!==S){let e=p[S]||"";e.startsWith("# ")&&(e=e.slice(2)),j.push((0,l.jsx)("h1",{className:"text-3xl font-bold mb-6 mt-8 text-gray-900 leading-tight",children:w(C(e.trim()))},j.length)),p[S]="",v=!0}let k=(e,t,s,l)=>{let n=e.trim();return!(!n||i.test(n)||/[.?!:]$/.test(n))&&o(n)&&(t||s||l)};for(let e=0;e<p.length;e++){let t=(p[e]||"").trim();if(!t){N(),v=!1;continue}if(t.startsWith("### ")){let e=C(t.slice(4).trim());if(!i.test(e)){N(),j.push((0,l.jsx)("h3",{className:"text-lg font-semibold mb-3 mt-5 text-gray-900 leading-tight",children:w(e)},j.length)),v=!0;continue}}if(t.startsWith("## ")){let e=C(t.slice(3).trim());if(!i.test(e)){N(),j.push((0,l.jsx)("h2",{className:"text-xl font-semibold mb-3 mt-6 text-gray-900 leading-tight",children:w(e)},j.length)),v=!0;continue}}if(t.startsWith("# ")){let e=C(t.slice(2).trim());if(!i.test(e)){N(),j.push((0,l.jsx)("h1",{className:"text-3xl font-bold mb-6 mt-8 text-gray-900 leading-tight",children:w(e)},j.length)),v=!0;continue}}if(k(t,0===e||0===(p[e-1]||"").trim().length,v,e>0&&/[.!?]$/.test((p[e-1]||"").trim()))){N(),j.push((0,l.jsx)("h2",{className:"text-xl font-semibold mb-3 mt-6 text-gray-900 leading-tight",children:w(C(t))},j.length)),v=!0;continue}y.push(t),v=!1}return N(),(0,l.jsx)("div",{children:j})}s(67294)},89346:function(e,t,s){"use strict";s.d(t,{Ol:function(){return a},Zb:function(){return n},aY:function(){return i},ll:function(){return r}});var l=s(85893);s(67294);let n=e=>{let{children:t,className:s="",...n}=e;return(0,l.jsx)("div",{className:"bg-white rounded-lg shadow ".concat(s),...n,children:t})},a=e=>{let{children:t,className:s="",...n}=e;return(0,l.jsx)("div",{className:"p-6 pb-0 ".concat(s),...n,children:t})},r=e=>{let{children:t,className:s="",...n}=e;return(0,l.jsx)("h3",{className:"text-lg font-medium ".concat(s),...n,children:t})},i=e=>{let{children:t,className:s="",...n}=e;return(0,l.jsx)("div",{className:"p-6 ".concat(s),...n,children:t})}},97359:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return $}});var l=s(85893),n=s(67294),a=s(89346),r=s(2553),i=s(71601),o=s(18289),c=s(37864),d=s(21603),x=s(70088),m=s(43283),u=s(12779),h=s(23346),g=s(33058),p=s(26286),b=s(36127),f=s(47935),j=s(72887),y=s(33243),v=s(61535),N=s(13410),w=s(80507),C=s(41664),S=s.n(C),k=s(50897),T=s(36197),Z=s(82126),E=s(8267),F=s(86691),P=s(43832),O=s(15928),R=s(60641),L=e=>{let{children:t}=e,{isAuthenticated:s,loading:a,user:r,login:i,register:o}
1=(0,T.a)(),[c,d]=(0,n.useState)(!0),[x,m]=(0,n.useState)(!1),[u,h]=(0,n.useState)(""),[g,p]=(0,n.useState)(""),[b,f]=(0,n.useState)(""),[j,y]=(0,n.useState)(""),[v,N]=(0,n.useState)(!1),w=async e=>{e.preventDefault(),N(!0),y("");try{c?await i(g,b):await o(u,g,b)}catch(e){y(e.message||"Failed to authenticate")}finally{N(!1)}};return a||s?a||!s?(0,l.jsx)("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center",children:(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)(R.Z,{className:"w-8 h-8 text-blue-600 mx-auto mb-4 animate-spin"}),(0,l.jsx)("p",{className:"text-gray-600",children:"Loading..."})]})}):(0,l.jsx)(l.Fragment,{children:t}):(0,l.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-blue-50 via-white to-purple-50 flex items-start justify-center pt-8 p-4",children:(0,l.jsx)("div",{className:"w-full max-w-lg",children:(0,l.jsxs)("div",{className:"bg-white rounded-2xl shadow-xl p-8 md:p-12 border border-gray-100",children:[(0,l.jsxs)("div",{className:"text-center mb-8",children:[(0,l.jsx)("div",{className:"w-16 h-16 bg-blue-600 rounded-full flex items-center justify-center mx-auto mb-4",children:(0,l.jsx)(Z.Z,{className:"w-8 h-8 text-white"})}),(0,l.jsx)("h1",{className:"text-3xl font-bold text-gray-800 mb-2",children:c?"Welcome Back":"Start Your Free Trial"}),(0,l.jsx)("p",{className:"text-lg text-gray-700",children:c?"Sign in to continue to your account":"Get 7 days of full access to Skribil. No credit card required."})]}),!c&&(0,l.jsx)("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4 mb-6 text-left",children:(0,l.jsxs)("div",{className:"text-green-700 text-sm space-y-1",children:[(0,l.jsx)("p",{children:"â
Full access to all branding + content tools"}),(0,l.jsx)("p",{children:"â
Strategy-backed AI you can trust"}),(0,l.jsx)("p",{children:"â
Cancel anytime during trial"})]})}),(0,l.jsxs)("form",{onSubmit:w,className:"space-y-6",children:[!c&&(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Name"}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(E.Z,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),(0,l.jsx)("input",{id:"name",type:"text",value:u,onChange:e=>h(e.target.value),className:"w-full pl-12 pr-4 py-3 border border-gray-300 rounded-xl shadow-sm focus:ring-blue-500 focus:border-blue-500 text-center",placeholder:"",required:!c})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email Address"}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(F.Z,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),(0,l.jsx)("input",{id:"email",type:"email",value:g,onChange:e=>p(e.target.value),className:"w-full pl-12 pr-4 py-3 border border-gray-300 rounded-xl shadow-sm focus:ring-blue-500 focus:border-blue-500 text-center",placeholder:"",required:!0})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 mb-2",children:"Password"}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(Z.Z,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-gray-400"}),(0,l.jsx)("input",{id:"password",type:x?"text":"password",value:b,onChange:e=>f(e.target.value),className:"w-full pl-12 pr-12 py-3 border border-gray-300 rounded-xl shadow-sm focus:ring-blue-500 focus:border-blue-500 text-center",placeholder:"",required:!0}),(0,l.jsx)("button",{type:"button",onClick:()=>m(!x),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-gray-600",children:x?(0,l.jsx)(P.Z,{className:"w-5 h-5"}):(0,l.jsx)(O.Z,{className:"w-5 h-5"})})]})]}),j&&(0,l.jsx)("p",{className:"text-red-500 text-sm text-center",children:j}),(0,l.jsx)("button",{type:"submit",disabled:v,className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold py-4 rounded-xl transition duration-300 text-lg",children:v?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(R.Z,{className:"w-5 h-5 animate-spin mr-2 inline"}),c?"Signing in...":"Starting Your Trial..."]}):c?"Sign In":"Start Free Trial"})]}),(0,l.jsx)("div",{className:"mt-6 text-center",children:(0,l.jsxs)("p",{className:"text-gray-600",children:[c?"Don't have an account?":"Already have an account?",(0,l.jsx)("button",{type:"button",onClick:()=>{d(!c),y(""),h(""),p(""),f("")},className:"ml-2 text-blue-600 hover:text-blue-700 font-medium",children:c?"Sign up":"Sign in"})]})}),!c&&(0,l.jsx)("div",{className:"text-center mt-6",children:(0,l.jsxs)("p",{className:"text-gray-600 text-sm",children:["Ready to upgrade to a paid subscription?"," ",(0,l.jsx)("button",{type:"button",onClick:()=>{window.location.href="/profile"},className:"text-blue-600 hover:text-blue-700 font-semibold underline bg-transparent border-none cursor-pointer",children:"Click here!"})]})})]})})})},z=s(86082),I=s(99818),U=e=>{let{generatedContent:t,contentType:s}=e;"string"==typeof t&&t.startsWith("{")&&(t=JSON.parse(t));let{showNotification:n}=(0,N.l)(),r=(e,t)=>{navigator.clipboard.writeText(t),n("".concat(e," post copied to clipboard!"),"success")};return(0,l.jsxs)("div",{className:"space-y-6",children:["object"==typeof t&&(null==t?void 0:t.type)==="social-media"&&(0,l.jsx)("div",{className:"space-y-6",children:Object.entries(t.socialPosts||{}).map(e=>{var t;let[s,n]=e;return(0,l.jsxs)(a.Zb,{children:[(0,l.jsx)(a.Ol,{children:(0,l.jsxs)(a.ll,{className:"capitalize flex items-center",children:[(0,l.jsx)(z.Z,{className:"w-5 h-5 mr-2"}),s," Posts (",(null===(t=n.variations)||void 0===t?void 0:t.length)||0," ","variations)"]})}),(0,l.jsx)(a.aY,{children:(0,l.jsx)("div",{className:"space-y-4",children:(n.variations||[]).map((e,t)=>{var n;return(0,l.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,l.jsxs)("div",{className:"flex justify-between items-start mb-3",children:[(0,l.jsxs)("div",{className:"text-sm text-gray-600",children:[(0,l.jsxs)("span",{className:"font-medium",children:["Variation ",e.id||t+1]}
1),e.approach&&(0,l.jsxs)("span",{className:"ml-2 text-gray-500",children:["(",e.approach,")"]}),(0,l.jsxs)("span",{className:"ml-2",children:[e.characterCount||(null===(n=e.content)||void 0===n?void 0:n.length)||0," ","characters"]})]}),(0,l.jsx)("button",{onClick:()=>r(s,e.content),className:"text-blue-600 hover:text-blue-800",children:(0,l.jsx)(o.Z,{className:"w-4 h-4"})})]}),(0,l.jsx)("div",{className:"whitespace-pre-wrap text-gray-800 leading-relaxed",children:e.content})]},e.id||t)})})})]},s)})}),(null==s?void 0:s.id)==="press-release"&&"string"==typeof t&&(0,l.jsxs)(a.Zb,{children:[(0,l.jsx)(a.Ol,{children:(0,l.jsxs)(a.ll,{className:"flex justify-between items-center",children:[(0,l.jsx)("span",{children:generatedTitle}),(0,l.jsx)("div",{className:"flex space-x-2",children:(0,l.jsxs)("button",{onClick:()=>setIsEditingContent(!isEditingContent),className:"px-3 py-1 text-sm border rounded-md flex items-center transition-colors ".concat(isEditingContent?"bg-blue-600 text-white border-blue-600":"border-gray-300 hover:bg-gray-50"),children:[(0,l.jsx)("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),isEditingContent?"Save Changes":"Edit Text"]})})]})}),(0,l.jsx)(a.aY,{children:isEditingContent?(0,l.jsx)("textarea",{value:t,onChange:e=>setGeneratedContent(e.target.value),className:"w-full h-96 p-4 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 resize-none",style:{fontFamily:'Calibri, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif',lineHeight:"1.6",fontSize:"11pt"}}):(0,l.jsx)("div",{className:"bg-white p-8 rounded-lg border border-gray-200 shadow-sm prose prose-lg max-w-none",children:t.split("\n").map((e,t)=>e.includes("FOR IMMEDIATE RELEASE")||e.includes("About ")||e.includes("Media contact:")?(0,l.jsx)("p",{className:"font-bold text-lg mb-2 mt-4",children:e},t):e.trim()?(0,l.jsx)("p",{className:"mb-4 leading-relaxed",children:e},t):(0,l.jsx)("br",{},t))})})]}),(null==s?void 0:s.id)==="email"&&"string"==typeof t&&(0,l.jsxs)(a.Zb,{children:[(0,l.jsx)(a.Ol,{children:(0,l.jsxs)(a.ll,{className:"flex justify-between items-center",children:[(0,l.jsx)("span",{children:generatedTitle}),(0,l.jsx)("div",{className:"flex space-x-2",children:(0,l.jsxs)("button",{onClick:()=>setIsEditingContent(!isEditingContent),className:"px-3 py-1 text-sm border rounded-md flex items-center transition-colors ".concat(isEditingContent?"bg-blue-600 text-white border-blue-600":"border-gray-300 hover:bg-gray-50"),children:[(0,l.jsx)("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),isEditingContent?"Save Changes":"Edit Text"]})})]})}),(0,l.jsx)(a.aY,{children:isEditingContent?(0,l.jsx)("textarea",{value:t,onChange:e=>setGeneratedContent(e.target.value),className:"w-full h-96 p-4 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 resize-none",style:{fontFamily:'Calibri, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif',lineHeight:"1.6",fontSize:"11pt"}}):(0,l.jsx)("div",{className:"whitespace-pre-wrap text-gray-700 leading-relaxed",children:t})})]}),(null==s?void 0:s.id)!=="press-release"&&(null==s?void 0:s.id)!=="case-study"&&(null==s?void 0:s.id)!=="social-posts"&&(null==s?void 0:s.id)!=="email"&&"string"==typeof t&&(0,l.jsx)(a.aY,{children:(0,l.jsx)("div",{className:"prose max-w-none",children:(0,l.jsx)(I.P,{text:t})})})]})};let D={"blog-post":{label:"Blog Post",icon:r.Z,color:"text-blue-600 bg-blue-50"},"Blog Post":{label:"Blog Post",icon:r.Z,color:"text-blue-600 bg-blue-50"},"Blog Posts":{label:"Blog Post",icon:r.Z,color:"text-blue-600 bg-blue-50"},"blog-posts":{label:"Blog Post",icon:r.Z,color:"text-blue-600 bg-blue-50"},email:{label:"Email",icon:r.Z,color:"text-green-600 bg-green-50"},Email:{label:"Email",icon:r.Z,color:"text-green-600 bg-green-50"},"email-sequence":{label:"Email Sequence",icon:r.Z,color:"text-green-600 bg-green-50"},"single-email":{label:"Single Email",icon:r.Z,color:"text-green-600 bg-green-50"},"social-post":{label:"Social Post",icon:i.Z,color:"text-pink-600 bg-pink-50"},"Social Posts":{label:"Social Post",icon:i.Z,color:"text-pink-600 bg-pink-50"},"social-posts":{label:"Social Posts",icon:i.Z,color:"text-pink-600 bg-pink-50"},"landing-page":{label:"Landing Page",icon:r.Z,color:"text-purple-600 bg-purple-50"},"Landing Page":{label:"Landing Page",icon:r.Z,color:"text-purple-600 bg-purple-50"},"case-study":{label:"Case Study",icon:r.Z,color:"text-orange-600 bg-orange-50"},"Case Study":{label:"Case Study",icon:r.Z,color:"text-orange-600 bg-orange-50"},"press-release":{label:"Press Release",icon:r.Z,color:"text-red-600 bg-red-50"},"Press Release":{label:"Press Release",icon:r.Z,color:"text-red-600 bg-red-50"},generated:{label:"Generated",icon:r.Z,color:"text-gray-600 bg-gray-50"},modified:{label:"Modified",icon:r.Z,color:"text-gray-600 bg-gray-50"},"keyword-research":{label:"Keyword Research",icon:r.Z,color:"text-gray-600 bg-gray-50"},other:{label:"Other",icon:r.Z,color:"text-gray-600 bg-gray-50"}},A=(e,t)=>
1{if("social-posts"===t)try{let t;try{t=JSON.parse(e)}catch(t){return e}if(null==t?void 0:t.socialPosts){var s,l,n;let e=Object.keys(t.socialPosts||{});return(null===(n=t.socialPosts[e[0]])||void 0===n?void 0:null===(l=n.variations)||void 0===l?void 0:null===(s=l[0])||void 0===s?void 0:s.content)||"Social posts content"}}catch(e){return"Social posts content"}if("object"==typeof e&&null!==e&&(console.log("\uD83D\uDCE6 Found object, content field:",e.content),e.content))return e.content;if("string"==typeof e&&e.startsWith("{"))try{let t=JSON.parse(e);if(console.log("\uD83D\uDCDD Parsed JSON:",t),t.content)return t.content}catch(e){console.error("Failed to parse JSON:",e)}return console.log("â©ï¸ Returning original content"),e},B=()=>{var e,t,s,i,N;let{user:C}=(0,T.a)(),{items:Z,stats:E,isLoading:F,deleteContent:P,toggleFavorite:O,searchContent:R,exportLibrary:L,importLibrary:z}=(0,v.mL)(),[I,B]=(0,n.useState)(""),[$,J]=(0,n.useState)({}),[W,_]=(0,n.useState)("grid"),[G,M]=(0,n.useState)(null),[Y,H]=(0,n.useState)(!1),[q,V]=(0,n.useState)([]),[Q,X]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=R(I,$);console.log("results >>>>>",e),V(e)},[I,$,Z,R]);let K=async(e,t)=>{try{await navigator.clipboard.writeText(e),console.log('\uD83D\uDCCB Copied "'.concat(t,'" to clipboard'))}catch(e){console.error("Failed to copy content:",e)}},ee=async e=>{var t;let s=null===(t=e.target.files)||void 0===t?void 0:t[0];if(s){try{await z(s)}catch(e){console.error("Import failed:",e)}e.target.value=""}},et=(e,t)=>{try{let s="social-posts"===e.contentType?"social-posts":"".concat(e.title||"content");switch(t){case"txt":{let t=new Blob(["string"==typeof e.content?e.content.replace(/^#+\s*/gm,"").replace(/\*\*/g,""):JSON.stringify(e.content,null,2)],{type:"text/plain"});es(t,"".concat(s,".txt"));break}case"pdf":{let t=e.content;"social-posts"===e.contentType&&(t=Object.keys(JSON.parse(e.content).socialPosts||{}).map(t=>"## ".concat(t.toUpperCase(),":\n").concat(JSON.parse(e.content).socialPosts[t].variations.map((e,t)=>"\n### Variation ".concat(t+1,":\n ").concat(e.content)).join("\n\n"))).join("\n\n\n")),(0,k.Fk)(t,"".concat(s,".pdf"));break}case"docx":{let t="string"==typeof e.content?e.content.replace(/^#+\s*/gm,"").replace(/\*\*/g,""):JSON.stringify(e.content,null,2);(0,k.uk)(t,"".concat(s,".docx"))}}X(!1),console.log('â
Exported "'.concat(e.title,'" as ').concat(t.toUpperCase()))}catch(e){console.error("Export failed:",e),alert("Export failed. Please try again.")}},es=(e,t)=>{let s=URL.createObjectURL(e),l=document.createElement("a");l.href=s,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(s)},el=e=>{var t,s;if(!e.contentType)return console.error("â ERROR: item.contentType is missing!",e),null;let n=D[e.contentType];n||(console.warn("â ï¸ Unknown contentType: ".concat(e.contentType,", using 'other' config.")),n=D.other);let r=n.icon;return(0,l.jsxs)(a.Zb,{className:"relative group hover:shadow-md transition-all cursor-pointer",onClick:()=>M(e),children:[(0,l.jsx)(a.Ol,{className:"pb-2",children:(0,l.jsxs)("div",{className:"flex items-start justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-2 flex-1 min-w-0",children:[(0,l.jsx)("div",{className:"p-1.5 rounded-lg ".concat(n.color),children:(0,l.jsx)(r,{className:"w-4 h-4"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)(a.ll,{className:"text-sm font-medium line-clamp-2 text-gray-900",children:"social-posts"===e.contentType?"Social Posts: ".concat(Object.keys((null===(t=JSON.parse(e.content))||void 0===t?void 0:t.socialPosts)||{}).join(" | ")):null===(s=e.title)||void 0===s?void 0:s.replaceAll("*","")}),(0,l.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[n.label," ⢠",e.wordCount," words"]})]})]}),(0,l.jsx)("div",{className:"flex items-center space-x-1 opacity-0 group-hover:opacity-100 transition-opacity",children:er?(0,l.jsx)("button",{onClick:t=>{t.stopPropagation(),K(e.content,e.title)},className:"p-1 text-gray-400 hover:text-blue-500 rounded",children:(0,l.jsx)(o.Z,{className:"w-4 h-4"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{onClick:t=>{t.stopPropagation(),K(e.content,e.title)},className:"p-1 text-gray-400 hover:text-blue-500 rounded",children:(0,l.jsx)(o.Z,{className:"w-4 h-4"})}),(0,l.jsx)("button",{onClick:t=>{t.stopPropagation(),P(e.id)},className:"p-1 text-gray-400 hover:text-red-500 rounded",children:(0,l.jsx)(c.Z,{className:"w-4 h-4"})})]})})]})}),(0,l.jsxs)(a.aY,{className:"pt-0",children:[(0,l.jsxs)("p",{className:"text-sm text-gray-600 line-clamp-3 mb-3",children:[String(A(e.content||"",e.contentType)).replace(/^#+\s*/gm,"").replace(/\*\*/g,"").substring(0,150),"..."]}),(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[(0,l.jsx)("span",{children:(0,w.Q)(new Date(e.createdAt),{addSuffix:!0})}),e.tags&&e.tags.length>0&&(0,l.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,l.jsx)(d.Z,{className:"w-3 h-3"}),(0,l.jsx)("span",{children:e.tags.length})]})]})]})]},e.id)},en=e=>{if(!e.contentType)return console.error("â LIST ERROR: item.contentType is missing!",e),null;let t=D[e.contentType];
1if(!t)return console.warn("â ï¸ Unknown contentType: ".concat(e.contentType,", using 'other' config.")),null;let s=t.icon;return(0,l.jsxs)("div",{className:"flex items-center p-4 border-b border-gray-100 hover:bg-gray-50 cursor-pointer group",onClick:()=>M(e),children:[(0,l.jsx)("div",{className:"p-2 rounded-lg ".concat(t.color," mr-4"),children:(0,l.jsx)(s,{className:"w-4 h-4"})}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("h3",{className:"text-sm font-medium text-gray-900 truncate",children:e.title}),(0,l.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[t.label," ⢠",e.wordCount," words â¢"," ",(0,w.Q)(new Date(e.createdAt),{addSuffix:!0})]})]}),(0,l.jsxs)("div",{className:"flex items-center space-x-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[!er&&e.isFavorite&&(0,l.jsx)(x.Z,{className:"w-4 h-4 text-yellow-500 fill-current"}),(0,l.jsx)("button",{onClick:t=>{t.stopPropagation(),K(e.content,e.title)},className:"p-1 text-gray-400 hover:text-blue-500 rounded",children:(0,l.jsx)(o.Z,{className:"w-4 h-4"})}),!er&&(0,l.jsx)("button",{onClick:t=>{t.stopPropagation(),P(e.id)},className:"p-1 text-gray-400 hover:text-red-500 rounded",children:(0,l.jsx)(c.Z,{className:"w-4 h-4"})})]})]},e.id)},ea=null!==(N=null==C?void 0:null===(e=C.stripeInfo)||void 0===e?void 0:e.status)&&void 0!==N?N:null==C?void 0:C.status;console.log("subscriptionStatus",ea);let er="active"!==ea&&"trialing"!==ea;return console.log("isReadOnly",er),(0,l.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[er&&(0,l.jsx)("div",{className:"mb-6 p-4 rounded-lg border border-yellow-300 bg-yellow-50 text-yellow-900",children:(0,l.jsxs)("div",{className:"flex items-start",children:[(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("h3",{className:"font-semibold",children:"Read-only mode"}),(0,l.jsxs)("p",{className:"text-sm mt-1",children:["Your subscription is ",ea||"inactive",". You can view and export your saved content, but creating or modifying content requires an active subscription."]})]}),(0,l.jsx)(S(),{href:"/profile",className:"ml-4 px-3 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 text-sm",children:"Upgrade"})]})}),(0,l.jsxs)("div",{className:"mb-8",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h1",{className:"text-3xl font-bold text-gray-900",children:"Content Library"}),(0,l.jsx)("p",{className:"text-gray-600 mt-2",children:"Manage and organize your saved content"})]}),(0,l.jsxs)("div",{className:"flex items-center space-x-3",children:[!er&&(0,l.jsxs)("label",{className:"cursor-pointer",children:[(0,l.jsx)("input",{type:"file",accept:".json",onChange:ee,className:"hidden"}),(0,l.jsxs)("div",{className:"flex items-center space-x-2 px-3 py-2 border border-gray-300 rounded-lg hover:bg-gray-50",children:[(0,l.jsx)(m.Z,{className:"w-4 h-4"}),(0,l.jsx)("span",{className:"text-sm",children:"Import"})]})]}),(0,l.jsxs)("button",{onClick:L,className:"flex items-center space-x-2 px-3 py-2 border border-gray-300 rounded-lg hover:bg-gray-50",children:[(0,l.jsx)(u.Z,{className:"w-4 h-4"}),(0,l.jsx)("span",{className:"text-sm",children:"Export"})]})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-6",children:[(0,l.jsx)(a.Zb,{className:"p-4",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(r.Z,{className:"w-8 h-8 text-blue-500 mr-3"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-2xl font-bold text-gray-900",children:E.total}),(0,l.jsx)("p",{className:"text-sm text-gray-600",children:"Total Items"})]})]})}),(0,l.jsx)(a.Zb,{className:"p-4",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(h.Z,{className:"w-8 h-8 text-green-500 mr-3"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-2xl font-bold text-gray-900",children:E.recentlyAdded}),(0,l.jsx)("p",{className:"text-sm text-gray-600",children:"This Week"})]})]})}),(0,l.jsx)(a.Zb,{className:"p-4",children:(0,l.jsxs)("div",{className:"flex items-center",children:[(0,l.jsx)(g.Z,{className:"w-8 h-8 text-purple-500 mr-3"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-2xl font-bold text-gray-900",children:E.totalWords.toLocaleStr
1ing()}),(0,l.jsx)("p",{className:"text-sm text-gray-600",children:"Total Words"})]})]})})]})]}),(0,l.jsx)(a.Zb,{className:"p-4 mb-6 bg-gradient-to-r from-blue-50 to-indigo-50 border-blue-200",children:(0,l.jsx)("div",{className:"flex items-center justify-between",children:(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"p-2 bg-blue-100 rounded-lg",children:(0,l.jsx)(p.Z,{className:"w-5 h-5 text-blue-600"})}),(0,l.jsx)("div",{children:(0,l.jsxs)("p",{className:"text-gray-900 font-medium",children:["Looking for your brand strategy & messaging?"," ",(0,l.jsx)(S(),{href:"/review-program",className:"text-blue-600 hover:text-blue-700 underline",children:"Review and edit your framework"})," ","or"," ",(0,l.jsx)(S(),{href:"/brand-compass",className:"text-blue-600 hover:text-blue-700 underline",children:"view your Brand Compass"}),"."]})})]})})}),(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsxs)("div",{className:"flex items-center space-x-4 mb-4",children:[(0,l.jsxs)("div",{className:"flex-1 relative",children:[(0,l.jsx)(b.Z,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),(0,l.jsx)("input",{type:"text",placeholder:"Search your content...",value:I,onChange:e=>B(e.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]}),(0,l.jsxs)("button",{onClick:()=>H(!Y),className:"flex items-center space-x-2 px-3 py-2 border rounded-lg ".concat(Y?"bg-blue-50 border-blue-300":"border-gray-300 hover:bg-gray-50"),children:[(0,l.jsx)(f.Z,{className:"w-4 h-4"}),(0,l.jsx)("span",{className:"text-sm",children:"Filters"})]}),(0,l.jsxs)("div",{className:"flex items-center border border-gray-300 rounded-lg",children:[(0,l.jsx)("button",{onClick:()=>_("grid"),className:"p-2 ".concat("grid"===W?"bg-blue-50 text-blue-600":"text-gray-400"),children:(0,l.jsx)(j.Z,{className:"w-4 h-4"})}),(0,l.jsx)("button",{onClick:()=>_("list"),className:"p-2 ".concat("list"===W?"bg-blue-50 text-blue-600":"text-gray-400"),children:(0,l.jsx)(y.Z,{className:"w-4 h-4"})})]})]}),Y&&(0,l.jsx)(a.Zb,{className:"p-4 mb-4",children:(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Content Type"}),(0,l.jsxs)("select",{value:$.contentType||"",onChange:e=>J(t=>({...t,contentType:e.target.value||void 0})),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",children:[(0,l.jsx)("option",{value:"",children:"All Types"}),Object.entries(D).map(e=>{let[t,s]=e;return(0,l.jsx)("option",{value:t,children:s.label},t)})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Category"}),(0,l.jsxs)("select",{value:$.category||"",onChange:e=>J(t=>({...t,category:e.target.value||void 0})),className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",children:[(0,l.jsx)("option",{value:"",children:"All Categories"}),(0,l.jsx)("option",{value:"general",children:"General"}),(0,l.jsx)("option",{value:"campaign",children:"Campaign"}),(0,l.jsx)("option",{value:"template",children:"Template"})]})]}),(0,l.jsx)("div",{className:"flex items-end",children:(0,l.jsxs)("label",{className:"flex items-center",children:[(0,l.jsx)("input",{type:"checkbox",checked:$.favoritesOnly||!1,onChange:e=>J(t=>({...t,favoritesOnly:e.target.checked||void 0})),className:"mr-2"}),(0,l.jsx)("span",{className:"text-sm text-gray-700",children:"Favorites Only"})]})})]})})]}),F?(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"}),(0,l.jsx)("p",{className:"text-gray-600 mt-4",children:"Loading your content..."})]}):0===q.length?(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)(r.Z,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),(0,l.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:0===Z.length?"No content saved yet":"No content matches your search"}),(0,l.jsx)("p",{className:"text-gray-600 mb-6",children:0===Z.length?"Start creating content and save it to your library to see it here.":"Try adjusting your search terms or filters."}),0===Z.length&&(er?(0,l.jsx)(S(),{href:"/profile",children:(0,l.jsx)("button",{className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:"Upgrade to Create Content"})}):(0,l.jsx)(S(),{href:"/content-creator",children:(0,l.jsx)("button",{className:"px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:"Create Content"})}))]}):(0,l.jsx)("div",{className:"grid"===W?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"bg-white rounded-lg border border-gray-200",children:q.map(e=>"grid"===W?el(e):en(e))}),G&&(0,l.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:(0,l.jsxs)("div",{className:"bg-white rounded-lg max-w-4xl w-full max-h-[90vh] overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between p-6 border-b",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"social-posts"===G.contentType?"Social Posts: ".concat(Object.keys((null===(t=JSON.parse(G.content))||void 0===t?void 0:t.socialPosts)||{}).join(" | ")):null===(s=G.title)||void 0===s?void 0:s.replaceAll("*","")}),(0,l.jsxs)("p",{className:"text-sm text-gray-600 mt-1",children:[(null===(i=D[G.contentType])||void 0===i?void 0:i.label)||"Unknown Type"," ","⢠",G.wordCount," words ⢠Created"," ",(0,w.Q)(new Date(G.createdAt),{addSuffix:!0})]})]}),(0,l.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsxs)("button",{onClick:()=>X(!Q),className:"flex items-center space-x-2 px-3 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200",children:[(0,l.jsx)(u.Z,{className:"w-4 h-4"}),(0,l.jsx)("span",{className:"text-sm",children:"Export"})]}),Q&&(0,l.jsxs)("div",{className:"absolute right-0 mt-2 w-48 bg-white border rounded-md shadow-lg z-10",children:[(0,l.jsx)("button",{onClick:()=>et(G,"txt"),className:"block w-full text-left px-4 py-2 text-sm hover:bg-gray-100",children:"Plain Text (.txt)"}),(0,l.jsx)("button",{onClick:()=>et(G,"pdf"),className:"block w-full text-left px-4 py-2 text-sm hover:bg-gray-100",children:"PDF (.pdf)"}),(0,l.jsx)("button",{onClick:()=>et(G,"docx"),className:"block w-full text-left px-4 py-2 text-sm hover:bg-gray-100",children:"Word (.docx)"})]})]}),(0,l.jsx)("button",{onClick:()=>M(null),className:"p-2 text-gray-400 hover:text-gray-600 rounded-lg",children:"\xd7"})]})]}),(0,l.jsx)("div",{className:"px-6 overflow-y-auto max-h-[calc(90vh-200
1px)]",children:(0,l.jsx)("div",{className:"bg-white",style:{fontFamily:'Calibri, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif',lineHeight:"1.6",fontSize:"11pt"},children:(0,l.jsx)(U,{generatedContent:"string"==typeof G.content?G.content:JSON.stringify(G.content,null,2),contentType:G.contentType})})}),(0,l.jsxs)("div",{className:"flex items-center justify-between p-6 border-t bg-gray-50",children:[(0,l.jsx)("div",{className:"flex items-center space-x-4"}),(0,l.jsxs)("div",{className:"flex items-center space-x-3",children:["social-posts"!==G.contentType?(0,l.jsxs)("button",{onClick:()=>K(G.content,G.title),className:"flex items-center space-x-2 px-4 py-2 bg-blue-100 text-blue-700 rounded-lg hover:bg-blue-200",children:[(0,l.jsx)(o.Z,{className:"w-4 h-4"}),(0,l.jsx)("span",{className:"text-sm",children:"Copy Content"})]}):null,!er&&(0,l.jsxs)("button",{onClick:()=>{P(G.id),M(null)},className:"flex items-center space-x-2 px-4 py-2 bg-red-100 text-red-700 rounded-lg hover:bg-red-200",children:[(0,l.jsx)(c.Z,{className:"w-4 h-4"}),(0,l.jsx)("span",{className:"text-sm",children:"Delete"})]})]})]})]})})]})};var $=()=>(0,l.jsx)(N.J,{children:(0,l.jsx)(L,{children:(0,l.jsx)(B,{})})})},50897:function(e,t,s){"use strict";s.d(t,{Fk:function(){return d},JM:function(){return r},QM:function(){return a},mo:function(){return i},uk:function(){return o}});var l=s(91819),n=s(18344);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.txt";x(e,t,"text/plain")}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.md";x(e,t,"text/markdown")}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.html";x(e,t,"text/html")}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.docx",s=[];e.split(/\n/).forEach(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e||"";if(/^# (.*)/.test(t))s.push(new n.nvN({text:t.replace(/^# /,"")||"",heading:n.y5t.HEADING_1}));else if(/^## (.*)/.test(t))s.push(new n.nvN({text:t.replace(/^## /,"")||"",heading:n.y5t.HEADING_2}));else if(/^- /.test(t))s.push(new n.nvN({children:[new n.hal(t.replace(/^- /,"")||"")],bullet:{level:0}}));else if(/\*\*(.*?)\*\*/.test(t)){let e=[],l=t;for(;l.length>0;){let t=l.match(/\*\*(.*?)\*\*/);if(t&&void 0!==t.index)t.index>0&&e.push(new n.hal(l.slice(0,t.index)||"")),e.push(new n.hal({text:t[1]||"",bold:!0})),l=l.slice(t.index+t[0].length)||"";else{e.push(new n.hal(l||""));break}}s.push(new n.nvN({children:e}))}else""!==t.trim()?s.push(new n.nvN({children:[new n.hal(t)]})):s.push(new n.nvN(""))});let l=new n.BBB({sections:[{properties:{},children:s}]});n.UDs.toBlob(l).then(e=>{let s=URL.createObjectURL(e),l=document.createElement("a");l.href=s,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(s)})}function c(e){return e.replace(/[\u{1F300}-\u{1F9FF}]|[\u{1F600}-\u{1F64F}]|[\u{1F680}-\u{1F6FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]/gu,"").replace(/\s+/g," ").trim()}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"document.pdf",s=new l.default({unit:"pt",format:"a4"}),n=s.internal.pageSize.height,a=40;s.setFont("helvetica"),s.setFontSize(12),e.split(/\n/).forEach(e=>{if(/^# (.*)/.test(e)){a>n-60&&(s.addPage(),a=40),s.setFontSize(28),s.setFont("helvetica","bold");let t=c(e.replace(/^# /,"").replace(/\*\*(.*?)\*\*/g,"$1"));s.splitTextToSize(t,515).forEach(e=>{s.text(e,40,a),a+=27}),a+=15,s.setFontSize(12),s.setFont("helvetica","normal")}else if(/^## (.*)/.test(e)){a>n-60&&(s.addPage(),a=40),s.setFontSize(20),s.setFont("helvetica","bold");let t=c(e.replace(/^## /,"").replace(/\*\*(.*?)\*\*/g,"$1"));s.splitTextToSize(t,515).forEach(e=>{s.text(e,40,a),a+=23.400000000000002}),a+=10,s.setFontSize(12),s.setFont("helvetica","normal")}else if(/^### (.*)/.test(e)){a>n-60&&(s.addPage(),a=40),s.setFontSize(16),s.setFont("helvetica","normal");let t=c(e.replace(/^### /,"").replace(/\*\*(.*?)\*\*/g,"$1"));s.splitTextToSize(t,515).forEach(e=>{s.text(e,40,a),a+=23.400000000000002}),a+=10,s.setFontSize(12),s.setFont("helvetica","normal")}else if(/^- /.test(e)){a>n-40&&(s.addPage(),a=40),s.setFont("helvetica","normal");let t=c(e.replace(/^- /,"").replace(/\*\*(.*?)\*\*/g,"$1"));
1s.splitTextToSize("⢠".concat(t),495).forEach((e,t)=>{s.text(e,50,a),a+=18}),a+=2}else if(/^\d+\. /.test(e)){a>n-40&&(s.addPage(),a=40),s.setFont("helvetica","normal");let t=c(e.replace(/^\d+\. /,"").replace(/\*\*(.*?)\*\*/g,"$1"));s.splitTextToSize(t,495).forEach((e,t)=>{s.text(e,50,a),a+=18}),a+=2}else if(""!==e.trim()){if(a>n-40&&(s.addPage(),a=40),s.setFont("helvetica","normal"),/\*\*(.*?)\*\*/.test(e)||/\*(.*?)\*/.test(e)){let t=c(e.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1"));s.splitTextToSize(t,515).forEach(e=>{s.text(e,40,a),a+=18}),a+=4}else{let t=c(e);s.splitTextToSize(t,515).forEach(e=>{s.text(e,40,a),a+=18}),a+=4}s.setFont("helvetica","normal")}else a+=9}),s.save(t)}function x(e,t,s){let l=new Blob([e],{type:s}),n=URL.createObjectURL(l),a=document.createElement("a");a.href=n,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(n)}}},function(e){e.O(0,[7257,7847,3412,3e3,2888,9774,179],function(){return e(e.s=47829)}),_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.