PageSourceSearch

https://expenseincms.netlify.app/_next/static/chunks/pages/blog-c6ff865b1b8c7d4b.js

js expenseincms.netlify.app collected 2026-10-03 10:43:42 UTC 12,089 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[195],{7286:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/blog",function(){return s(6201)}])},9161:function(e,t,s){"use strict";s.d(t,{Z:function(){return m}});var n=s(5893),l=s(7294),a=s(1163),i=s(455),r=s(1664),c=s.n(r),o=s(2884),d=e=>{let{article:t,dateOptions:s,category:l}=e;return(0,n.jsx)("div",{className:"col-sm-6 col-lg-4 mb-3 mb-sm-8",children:(0,n.jsxs)("article",{className:"card h-100",children:[(0,n.jsxs)("div",{className:"card-img-top position-relative",children:[(0,n.jsx)(o.Z,{image:t.content.featured_image,newSizes:[240,290,330,350,540],classes:"card-img-top",sizes:"(min-width: 1200px) 350px, (min-width: 992px) 290px, (min-width: 768px) 330px, (min-width: 576px) 240px, 540px",height:.7}),(0,n.jsx)("figure",{className:"ie-curved-y position-absolute right-0 bottom-0 left-0 mb-n1",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 1920 100.1",children:(0,n.jsx)("path",{fill:"#fff",d:"M0,0c0,0,934.4,93.4,1920,0v100.1H0L0,0z"})})})]}),(0,n.jsxs)("div",{className:"card-body",children:[(0,n.jsx)("h3",{children:(0,n.jsx)(c(),{href:"/blog/".concat(l?l.slug:"uncategorized","/").concat(t.slug),prefetch:!1,className:"text-inherit",children:t.name})}),(0,i.sY)(t.content.excerpt)]}),(0,n.jsx)("div",{className:"card-footer border-0 pt-0",children:(0,n.jsx)("div",{className:"align-items-center",children:(0,n.jsx)("div",{className:"d-flex justify-content-start text-muted font-size-1 ml-2",children:new Date(t.first_published_at?t.first_published_at:t.created_at).toLocaleDateString("en-US",s)})})})]})})},h=e=>{let{article:t,dateOptions:s,category:l}=e;return(0,n.jsx)("div",{className:"col-sm-6 col-lg-4 mb-3 mb-sm-8",children:(0,n.jsxs)("article",{className:"card bg-primary text-white h-100",children:[(0,n.jsxs)("div",{className:"card-body p-4 p-lg-5",children:[(0,n.jsx)("span",{className:"badge badge-light py-2 px-3 mb-5",children:"Featured"}),(0,n.jsx)("h3",{className:"h2",children:(0,n.jsx)(c(),{href:"/blog/".concat(l.slug,"/").concat(t.slug),className:"text-white",children:t.name})}),(0,i.sY)(t.content.excerpt)]}),(0,n.jsx)("div",{className:"card-footer bg-primary border-0 pt-0 px-5 pb-5",children:(0,n.jsx)("div",{className:"align-items-center",children:(0,n.jsx)("div",{className:"d-flex justify-content-start text-white-70 font-size-1 ml-2",children:new Date(t.first_published_at).toLocaleDateString("en-US",s)})})})]})})};s(4181);var m=e=>{let{filteredArticles:t,articlesParams:s,setFilteredArticles:i,query:r,categories:c,dateOptions:o,preview:m,excludeIds:u}=e,[x,g]=(0,l.useState)(2),p=(0,a.useRouter)(),v=async()=>{let e={starts_with:"blog/posts/",per_page:9,sort_by:"first_published_at:desc",page:x,resolve_relations:"post.categories"};r.search&&(e.search_term=r.search),r.category&&(e["filter_query[categories][any_in_array]"]=r.category),m?(e.version="draft",e.token="KPIEH9iDXqpO2YeYbVfCkwtt"):e.token="QvmXWzIXWQBGE0ew0Ptm6gtt",u&&!r.search&&(e.excluding_ids=u.join(",")),fetch("https://api.storyblok.com/v2/cdn/stories/?"+new URLSearchParams(e)).then(e=>e.json()).then(e=>{let s=e.stories.map(t=>(t.content.categories=e.rels.filter(e=>e.uuid==t.content.categories),t));i(t.concat(s)),g(x+1),console.log("new articles added, page: "+x)}).catch(()=>{console.error("Error in search fetch from Storyblok API")})};return(0,l.useEffect)(()=>(g(2),()=>{}),[p.query.search]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"row mb-3",children:[r&&0==t.length&&(0,n.jsx)("p",{children:"No articles found"}),t.map((e,t)=>{let s=(null==e?void 0:e.content.categories)&&(null==e?void 0:e.content.categories.length)>=1?null==e?void 0:e.content.categories[0].slug:"general-articles",l=c.find(e=>(null==e?void 0:e.slug)==s);return(null==e?void 0:e.featured)?(0,n.jsx)(h,{article:e,dateOptions:o,category:l},"".concat(t,"-").concat(e.id)):(0,n.jsx)(d,{article:e,dateOptions:o,category:l},"".concat(t,"-").concat(e.id))})]}),t.length<s.total&&(0,n.jsx)("button",{type:"button",className:"btn btn-outline-primary",onClick:()=>v(),children:"Load More"})]})}},3055:function(e,t,s){"use strict";var n=s(5893);s(1664),t.Z=e=>{var t;let{blok:s}=e;return(0,n.jsx)("div",{className:"container space-top-2 space-bottom-1",children:(0,n.jsxs)("div",{className:"w-md-80 w-lg-75 text-center mx-md-auto mt-4",children:[(null===(t=s.content)||void 0===t?void 0:t.description)&&(0,n.jsx)("nav",{"aria-label":"breadcrumb",children:(0,n.jsxs)("ol",{className:"breadcrumb justify-content-center mb-0",children:[(0,n.jsx)("li",{className:"breadcrumb-item",children:(0,n.jsx)("a",{href:"/blog",children:"Blog"})}),(0,n.jsx)("li",{className:"breadcrumb-item active",children:s.name})]})}),(0,n.jsx)("h1",{children:s.heading?s.heading:s.name}),(0,n.jsx)("p",{children:s.sub_heading?s.sub_heading:s.content.description})]})})}},185:function(e,t){"use strict";t.Z=function(){var e,t,s,n;let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=arguments.length>1?arguments[1]:void 0,i=(null==l?void 0:null===(e=l.content)||void 0===e?void 0:e.meta_title)?l.content.meta_title:null,r=(null==l?void 0:null===(t=l.content)||void 0===t?void 0:t.meta_description)?l.content.meta_description:null,c=(null==l?void 0:null===(s=l.content)||void 0===s?void 0:s.og_image)?l.content.og_image.filename:null,o=(null==l?void 0:null===(n=l.content)||void 0===n?void 0:n.og_image)?l.content.og_image.alt:null,d=Object.assign({},i&&{title:i,openGraph:{title:i}},r&&{description:r,openGraph:{description:r}},c&&{openGraph:{images:[{url:c,alt:o}]}},a&&a);return d}},6201:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSG:function(){return _},default:function(){return y}});var n=s(5893),l=s(9008),a=s.n(l),i=s(2308),r=s(3277),c=s(5203),o=s(7294),d=s(1163),h=s(1664),m=s.n(h),u=s(455),x=s(3055),g=s(9161),p=s(2884);s(4181);let v=()=>{let e=(0,d.useRouter)(),t=t=>{t.preventDefault();let s=document.getElementById("blog-search-input").value;e.push({query:{search:s}})};return(0,n.jsxs)("form",{className:"input-group input-group-sm input-group-merge input-group-flush",onSubmit:e=>t(e),children:[(0,n.jsx)("input",{type:"input",id:"blog-search-input",className:"form-control",placeholder:"Search articles","aria-label":"Search articles","aria-describedby":"searchLabel"}),(0,n.jsx)("div",{className:"input-group-append",onClick:e=>t(e),style:{cursor:"pointer"},children:(0,n.jsx)("div",{className:"input-group-text",id:"searchLabel",children:(0,n.jsx)("i",{className:"fas fa-search"})})})]})};var f=e=>{var t,s,l,a;let{blok:i,articlesData:r=null,categories:c=null,preview:h=!1}=e,[f,j]=(0,o.useState)(!1),[b,N]=(0,o.useState)(!1),[w,_]=(0,o.useState)({per_page:r.per_page,total:r.total}),y=(0,d.useRouter)(),S=null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.stories,k=S[0],E=S.filter(e=>e.id!==k.id),z=(null==k?void 0:k.content.categories)&&(null==k?void 0:null===(s=k.content.categories)||void 0===s?void 0:s.length)>=1?null==k?void 0:null===(a=k.content)||void 0===a?void 0:null===(l=a.c
1ategories[0])||void 0===l?void 0:l.slug:"general-articles",q=c.find(e=>e.slug==z),Z={year:"numeric",month:"long",day:"numeric"},[L,P]=(0,o.useState)(E),D=e=>{let t={starts_with:"blog/posts/",per_page:9,sort_by:"first_published_at:desc",page:1,resolve_relations:"post.categories"};e.search&&(t.search_term=e),h?(t.version="draft",t.token="KPIEH9iDXqpO2YeYbVfCkwtt"):t.token="QvmXWzIXWQBGE0ew0Ptm6gtt",fetch("https://api.storyblok.com/v2/cdn/stories/?"+new URLSearchParams(t)).then(e=>(_({...w,total:e.headers.get("total")}),e.json())).then(e=>{let t=e.stories.map(t=>(t.content.categories=e.rels.filter(e=>e.uuid==t.content.categories),t));P(t),N(!1)}).catch(()=>{console.error("Error in search fetch from Storyblok API"),N(!1)})};return(0,o.useEffect)(()=>(console.log("in use effect",y.query.search),y.query.search?(N(!0),j(!0),P([]),D(y.query.search)):(j(!1),N(!1),P(E)),()=>{}),[y.query.search,r]),(0,n.jsxs)(n.Fragment,{children:[!f&&(0,n.jsx)(x.Z,{blok:i}),(0,n.jsxs)("div",{className:"container space-top-md-2 space-bottom-2 space-bottom-lg-3",children:[(0,n.jsxs)("div",{className:"row justify-content-lg-between align-items-lg-center mb-7",children:[(0,n.jsx)("div",{className:"col-lg-8 mb-5 mb-lg-0",children:f?(0,n.jsx)(m(),{href:"/blog",className:"text-muted",children:(0,n.jsx)("i",{className:"fas fa-arrow-left fa-lg"})}):(0,n.jsxs)("div",{className:"row text-center ",children:[(0,n.jsx)("div",{className:"col-md-1",children:(0,n.jsx)("span",{className:"d-block mr-sm-3 mb-2 mb-sm-1",children:"Topics:"})}),(0,n.jsx)("div",{className:"col-md-11",children:(0,n.jsx)("div",{className:"pl-3 text-md-left",children:c.map(e=>(0,n.jsx)(m(),{href:"/blog/".concat(e.slug),className:"btn btn-xs btn-soft-secondary btn-pill mx-sm-1 mb-1",children:e.name},e.id))})})]})}),(0,n.jsx)("div",{className:"col-lg-4",children:(0,n.jsx)(v,{})})]}),!f&&(0,n.jsx)("article",{className:"card mb-11",children:(0,n.jsxs)("div",{className:"row no-gutters",children:[(0,n.jsx)("div",{className:"col-lg-8",children:(0,n.jsxs)("div",{className:"position-relative overflow-hidden h-100",children:[(0,n.jsx)(p.Z,{image:k.content.featured_image,newSizes:[510,740,1020,1240,1480],sizes:"(min-width: 1200px) 740px, (min-width: 992px) 620px, (min-width: 768px) 690px, 510px",height:.5,classes:"card-img h-100 fit-cover"}),(0,n.jsx)("figure",{className:"d-none d-lg-block",children:(0,n.jsx)("svg",{className:"ie-curved-x position-absolute top-0 right-0 bottom-0 mr-n1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 100.1 1920",height:"101%",children:(0,n.jsx)("path",{fill:"#fff",d:"M0,1920c0,0,93.4-934.4,0-1920h100.1v1920H0z"})})}),(0,n.jsx)("figure",{className:"d-lg-none mb-n1",children:(0,n.jsx)("svg",{className:"ie-curved-y position-absolute right-0 bottom-0 left-0",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 1920 100.1",children:(0,n.jsx)("path",{fill:"#fff",d:"M0,0c0,0,934.4,93.4,1920,0v100.1H0L0,0z"})})})]})}),(0,n.jsx)("div",{className:"col-lg-4",children:(0,n.jsxs)("div",{className:"card-body d-flex flex-column h-100 p-4 p-lg-5",children:[(0,n.jsx)("h2",{children:(0,n.jsx)(m(),{href:"/blog/".concat(q?q.slug:"uncategorized","/").concat(k.slug),className:"text-inherit",children:k.name})}),(0,u.sY)(k.content.excerpt),(0,n.jsx)("div",{className:"align-items-center mt-auto",children:(0,n.jsx)("div",{className:"d-flex justify-content-start text-muted font-size-1 ml-2",children:new Date(k.first_published_at?k.first_published_at:k.created_at).toLocaleDateString("en-US",Z)})})]})})]})}),(0,n.jsx)("div",{className:"row mb-5",children:(0,n.jsx)("div",{className:"col-6",children:(0,n.jsx)("h2",{className:"h3 mb-0",children:y.query.search?(0,n.jsxs)(n.Fragment,{children:["Showing search results for: ",(0,n.jsx)("span",{className:"text-primary",children:y.query.search})]}):"Latest News"})})}),b?(0,n.jsx)("div",{class:"d-flex justify-content-center",children:(0,n.jsx)("div",{class:"spinner-border",role:"status",children:(0,n.jsx)("span",{class:"sr-only",children:"Loading..."})})}):(0,n.jsx)(g.Z,{filteredArticles:L,articlesParams:w,setFilteredArticles:P,query:{search:y.query.search,c
1ategory:""},categories:c,dateOptions:Z,preview:h,excludeIds:[k.id]})]})]})},j=s(729),b=s(2962),N=s(185),w=s(5308),_=!0;function y(e){let{story:t,articlesData:s,categories:l,global:o,preview:h,extraData:m}=e;t=(0,w.Z)(t,h);let u=(0,d.useRouter)();if(u.isFallback)return(0,n.jsx)(c.Z,{});let x="true"==m.noindex?{noindex:!0,nofollow:!0}:null,g=(0,N.Z)(t,x),p="https://www.expensein.com/".concat(t.full_slug.replace(/\/+$/,""));return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a(),{children:[(0,n.jsxs)("title",{children:[t?t.name:"ExpenseIn Blog"," | ExpenseIn"]}),(0,n.jsx)(r.Z,{preview:h})]}),(0,n.jsx)(b.PB,{...g,canonical:p}),(0,n.jsx)(i.Z,{layout:t.content.layout,global:o,preview:h,story:t,children:(0,n.jsxs)("main",{children:[s.data.stories.length>=2&&(0,n.jsx)(f,{blok:t.content,articlesData:s,categories:l,preview:h}),(0,n.jsx)(j.Z,{})]})})]})}}},function(e){e.O(0,[164,89,10,776,774,888,179],function(){return e(e.s=7286)}),_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.