1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[404],{9681:function(t,e,n){Promise.resolve().then(n.t.bind(n,231,23)),Promise.resolve().then(n.bind(n,5028))},7138:function(t,e,n){"use strict";n.d(e,{default:function(){return o.a}});var r=n(231),o=n.n(r)},357:function(t,e,n){"use strict";var r,o;t.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(o=n.g.process)?void 0:o.env)?n.g.process:n(8081)},8081:function(t){!function(){var e={229:function(t){var e,n,r,o=t.exports={};function i(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function c(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var l=[],s=!1,u=-1;function d(){s&&r&&(s=!1,r.length?l=r.concat(l):u=-1,l.length&&f())}function f(){if(!s){var t=c(d);s=!0;for(var e=l.length;e;){for(r=l,l=[];++u<e;)r&&r[u].run();u=-1,e=l.length}r=null,s=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function h(){}o.nextTick=function(t){var e=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];l.push(new p(t,e)),1!==l.length||s||c(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(t){return[]},o.binding=function(t){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}},a=!0;try{e[t](i,i.exports,r),a=!1}finally{a&&delete n[t]}return i.exports}r.ab="//";var o=r(229);t.exports=o}()},5028:function(t,e,n){"use strict";n.d(e,{default:function(){return y}});var r,o,i,a,c=n(7437),l=n(2265);function s(){var t;return t="object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments),function(t){var e=[];if(0===t.length)return"";if("string"!=typeof t[0])throw TypeError("Url must be a string. Received "+t[0]);if(t[0].match(/^[^/:]+:\/*$/)&&t.length>1){var n=t.shift();t[0]=n+t[0]}t[0].match(/^file:\/\/\//)?t[0]=t[0].replace(/^([^/:]+):\/*/,"$1:///"):t[0]=t[0].replace(/^([^/:]+):\/*/,"$1://");for(var r=0;r<t.length;r++){var o=t[r];if("string"!=typeof o)throw TypeError("Url must be a string. Received "+o);""!==o&&(r>0&&(o=o.replace(/^[\/]+/,"")),o=r<t.length-1?o.replace(/[\/]+$/,""):o.replace(/[\/]+$/,"/"),e.push(o))}var i=e.join("/"),a=(i=i.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return a.shift()+(a.length>0?"?":"")+a.join("&")}(t)}var u=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function c(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,c)}l((r=r.apply(t,e||[])).next())})},d=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(l){return function(c){if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}},f=function(t,e,n){if(n||2==arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))},p=n(2399);let h=(i=void 0===(o=(r={blogId:p.ob}).baseUrl)?"https://www.wisp.blog":o,a=r.blogId,{getPosts:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return u(void 0,f([],t,!0),void 0,function(t){var e,n=void 0===t?{}:t,r=n.page,o=n.limit,c=n.tags,l=n.query;return d(this,function(t){switch(t.label){case 0:return e=new URLSearchParams,r&&e.append("page",r.toString()),o&&e.append("limit",o.toString()),l&&e.append("query",l.toString()),c&&c.length&&c.forEac
1h(function(t){return e.append("tag",t)}),[4,fetch(s(i,"/api/v1/".concat(a,"/posts?").concat(e.toString())))];case 1:return[4,t.sent().json()];case 2:return[2,t.sent()]}})})},getPost:function(t){return u(void 0,void 0,void 0,function(){return d(this,function(e){switch(e.label){case 0:return[4,fetch(s(i,"/api/v1/".concat(a,"/posts/").concat(t)))];case 1:return[4,e.sent().json()];case 2:return[2,e.sent()]}})})},getRelatedPosts:function(t){return u(void 0,[t],void 0,function(t){var e=t.slug,n=t.limit,r=void 0===n?5:n;return d(this,function(t){switch(t.label){case 0:return[4,fetch(s(i,"/api/v1/".concat(a,"/posts/").concat(e,"/related?limit=").concat(r)))];case 1:return[4,t.sent().json()];case 2:return[2,t.sent()]}})})},getCtas:function(t){return u(void 0,[t],void 0,function(t){var e=t.slug,n=t.limit,r=void 0===n?1:n;return d(this,function(t){switch(t.label){case 0:return[4,fetch(s(i,"/api/v1/".concat(a,"/posts/").concat(e,"/ctas?limit=").concat(r)))];case 1:return[4,t.sent().json()];case 2:return[2,t.sent()]}})})},getTags:function(t,e){return u(void 0,void 0,void 0,function(){var n;return d(this,function(r){switch(r.label){case 0:return n=new URLSearchParams,t&&n.append("page",t.toString()),e&&n.append("limit",e.toString()),[4,fetch(s(i,"/api/v1/".concat(a,"/tags?").concat(n.toString())))];case 1:return[4,r.sent().json()];case 2:return[2,r.sent()]}})})},getContents:function(t){return u(void 0,[t],void 0,function(t){var e,n=t.contentTypeSlug,r=t.page,o=t.limit;return d(this,function(t){switch(t.label){case 0:return e=new URLSearchParams,r&&e.append("page",r.toString()),o&&e.append("limit",o.toString()),[4,fetch(s(i,"/api/v1/".concat(a,"/contents/").concat(n,"?").concat(e.toString())))];case 1:return[4,t.sent().json()];case 2:return[2,t.sent()]}})})},getContent:function(t){return u(void 0,[t],void 0,function(t){var e=t.contentTypeSlug,n=t.contentSlug;return d(this,function(t){switch(t.label){case 0:return[4,fetch(s(i,"/api/v1/".concat(a,"/contents/").concat(e,"/").concat(n)))];case 1:return[4,t.sent().json()];case 2:return[2,t.sent()]}})})},getComments:function(t){return u(void 0,[t],void 0,function(t){var e,n=t.slug,r=t.page,o=t.limit;return d(this,function(t){switch(t.label){case 0:return e=new URLSearchParams,r&&e.append("page",r.toString()),o&&e.append("limit",o.toString()),[4,fetch(s(i,"/api/v1/".concat(a,"/posts/").concat(n,"/comments?").concat(e.toString())))];case 1:return[4,t.sent().json()];case 2:return[2,t.sent()]}})})},createComment:function(t){return u(void 0,void 0,void 0,function(){return d(this,function(e){switch(e.label){case 0:return[4,fetch(s(i,"/api/v1/".concat(a,"/comments")),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})];case 1:return[4,e.sent().json()];case 2:return[2,e.sent()]}})})}});var g=n(1828),m=n(5595),v=n(1387);n(6648);var x=n(5052),w=t=>{let{blogs:e}=t;return(0,c.jsx)("div",{className:"flex flex-col gap-8",children:e.map(t=>(0,c.jsxs)("div",{className:"flex items-center sm:flex-row-reverse flex-col gap-4 break-words",children:[(0,c.jsx)(v.Z,{href:"".concat(p.$w.blog,"/").concat(t.slug),className:"h-60 relative max-w-80 size-full border-gray border-2 rounded-xl overflow-hidden",children:t.image?(0,c.jsx)(x.Z,{alt:t.title,className:"object-cover size-full",src:t.image}):(0,c.jsx)(x.Z,{src:"/placeholder.png",alt:t.title||"placeholder image"})}),(0,c.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:col-span-2 flex-1",children:[(null==t?void 0:t.tags)&&(null==t?void 0:t.tags.length)?(0,c.jsx)("div",{className:"text-sm text-muted-foreground flex items-center flex-wrap gap-2",children:t.tags.map(t=>(0,c.jsx)("div",{className:"line-clamp-1 rounded-full py-1 px-3 uppercase text-xs bg-indigo-600 text-white",children:t.name.replace(/-/g," ")},t.id))}):null,(0,c.jsx)("h2",{className:"font-sans font-semibold tracking-tight text-primary text-xl md:text-2xl",children:(0,c.jsx)(v.Z,{href:"".concat(p.$w.blog,"/").concat(t.slug),children:t.title})}),(0,c.jsx)("div",{className:"text-sm tracking-tight text-muted-foreground",children:(0,m.p6)((null==t?void 0:t.publishedAt)||(null==t?void 0:t.updatedAt))}),(0,c.jsx)("div",{className:"prose lg:prose-lg leading-relaxed md:text-base line-clamp-2 md:line-clamp-4 text-muted-foreground",children:t.description})]})]},t.id))})},b=n(403);function y(t){var e,n;let{showLoadMore:r=!0,blogPosts:o}=t,[i,a]=(0,l.useState)((null==o?void 0:null===(e=o.pagination)||void 0===e?void 0:e.page)||1),[s,u]=(0,l.useState)(null==o?void 0:o.posts),d=async()=>{let t=i+1;a(t);let e=await h.getPosts({page:t,limit:p.LE});(null==e?void 0:e.posts)&&(null==e?void 0:e.posts.length)&&u([...s,...e.posts])};return(0,c.jsxs)("div",{className:"flex flex-col items-center justify-between gap-20",children:[(0,c.jsx)("div",{className:"w-full block sm:hidden",children:(0,c.jsx)(b.default,{blogs:s})}
1),(0,c.jsx)("div",{className:"w-full max-w-5xl mx-auto sm:block hidden",children:(0,c.jsx)(w,{blogs:s})}),r&&(null==o?void 0:null===(n=o.pagination)||void 0===n?void 0:n.nextPage)?(0,c.jsx)(g.Z,{background:"dark",onClick:d,className:"mt-2 z-40 relative border !rounded-full px-6 py-[6px] hover:text-white hover:bg-indigo-600",children:"Load more"}):null]})}},403:function(t,e,n){"use strict";var r=n(7437);n(2265);var o=n(2399),i=n(5595),a=n(1387),c=n(5052);e.default=t=>{let{showDescription:e=!0,blogs:n}=t;return(0,r.jsx)("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-3 sm:grid-cols-2",children:n.map(t=>(0,r.jsxs)("div",{className:"flex flex-col break-words",children:[(0,r.jsx)(a.Z,{href:"".concat(o.$w.blog,"/").concat(t.slug),className:"max-h-[260px] h-60 relative size-full border-gray border-2 rounded-xl overflow-hidden",children:t.image?(0,r.jsx)(c.Z,{alt:t.title,className:"object-cover size-full",src:t.image}):(0,r.jsx)(c.Z,{src:"/placeholder.png",alt:t.title||"placeholder image"})}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:col-span-2 mt-4",children:[(null==t?void 0:t.tags)&&(null==t?void 0:t.tags.length)?(0,r.jsx)("div",{className:"text-sm text-muted-foreground flex items-center flex-wrap gap-2",children:t.tags.map(t=>(0,r.jsx)("div",{className:"line-clamp-1 rounded-full py-1 px-3 uppercase text-xs bg-indigo-600 text-white",children:t.name.replace(/-/g," ")},t.id))}):null,(0,r.jsx)("h2",{className:"font-sans font-semibold tracking-tight text-primary text-xl md:text-xl",children:(0,r.jsx)(a.Z,{href:"".concat(o.$w.blog,"/").concat(t.slug),children:t.title})}),(0,r.jsx)("div",{className:"text-sm tracking-tight text-muted-foreground",children:(0,i.p6)((null==t?void 0:t.publishedAt)||(null==t?void 0:t.updatedAt))}),e?(0,r.jsx)("div",{className:"prose lg:prose-lg leading-relaxed md:text-base line-clamp-4 text-muted-foreground",children:t.description}):null]})]},t.id))})}},1828:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(7437);function o(t){let{background:e,type:n="button",children:o,rounded:i,disabled:a,outline:c,className:l,...s}=t;return(0,r.jsx)("button",{...s,type:n,disabled:a,className:"".concat("dark"==e?"bg-primary text-primary-white":""," ").concat(a?"bg-gray text-[#757575]":""," ").concat(i?"rounded-full":"rounded-[3px]"," ").concat(c?"border-2 border-primary":""," ").concat(l),children:o})}n(2265)},5052:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(7437),o=n(6648);function i(t){let{src:e,alt:n,className:i,fill:a=!0}=t;return(0,r.jsx)(o.default,{...t,src:e||"/placeholder.svg",alt:n||e,blurDataURL:e||"/placeholder.svg",placeholder:"blur",fill:a,className:"absolute inset-0 h-full w-full max-w-full object-cover ".concat(i),sizes:"(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 100vw"})}},5595:function(t,e,n){"use strict";n.d(e,{Dy:function(){return x},Lr:function(){return s},PV:function(){return f},Rq:function(){return w},ei:function(){return c},gR:function(){return u},gS:function(){return m},l5:function(){return b},l9:function(){return d},mP:function(){return l},p6:function(){return y},qW:function(){return v},r4:function(){return i},ty:function(){return h},uq:function(){return a},x6:function(){return g},yx:function(){return p}});var r=n(8726),o=n(2399);let i=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!!t&&(/^https?:\/\/(?:www\.)?threads\.net\/(?:t\/[\w-]+\/?|@[\w-]+\/post\/[\w-]+\/?)(?:\?.*)?$/.test(t)||/^https?:\/\/(?:www\.)?instagram\.com\/p\/[\w-]+\/?(?:\?.*)?$/.test(t))},a=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t){if("threads"===e)return/^https?:\/\/(?:www\.)?threads\.(?:net|com)\/(?:@[\w.-]+\/post\/[\w-]+(?:\/media)?|t\/[\w-]+)\/?(?:\?.*)?$/.test(t);if("instagram"===e)return(n?/^https?:\/\/(?:www\.)?instagram\.com\/(?:reel\/[\w-]+\/?|reels\/[\w-]+\/?|stories\/[\w.-]+\/[\d]+\/?|p\/[\w-]+\/?)(?:\?.*)?$/:/^https?:\/\/(?:www\.)?instagram\.com\/(?:reel\/[\w-]+\/?|[\w.-]+\/(?:reel|p)\/[\w-]+\/?|p\/[\w-]+\/?)(?:\?.*)?$/).test(t)}return!1},c=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!t)return"";
1try{let e=new URL(t.trim()).pathname.split("/").filter(Boolean),n=e[e.length-1];return"media"===n.toLowerCase()&&e.length>1&&(n=e[e.length-2]),n||""}catch(t){return console.log("\uD83D\uDE80 ~ getThreadsIdFromURL ~ e:",t),""}},l=t=>["instagram","threads"].includes(t),s=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{title:o.iC,url:o.JF};navigator.share&&navigator.share(t).then(()=>{}).catch(console.error)},u=async()=>await navigator.clipboard.readText().then(t=>t).catch(t=>{console.error("Failed to read from clipboard: ",t)}),d=async function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return await navigator.clipboard.writeText(t).then(n=>{void 0!==e&&"function"==typeof e&&e(t)}).catch(t=>{console.error("Failed to write to clipboard: ",t)})},f=t=>{let{message:e,position:n="bottom-center",duration:o=5e3,type:i="error"}=t,a={position:n,duration:o,style:{borderRadius:"10px",background:"#333",color:"#fff"}};"success"===i?r.toast.success(e,a):r.toast.error(e,a)},p=t=>{if(void 0===t)return"-";t*=1e3;let e=Math.floor((new Date().getTime()-t)/1e3),n=e/31536e3;return n>1?Math.floor(n)+"y":(n=e/2592e3)>1?Math.floor(n)+"m":(n=e/86400)>1?Math.floor(n)+"d":(n=e/3600)>1?Math.floor(n)+"h":(n=e/60)>1?Math.floor(n)+"m":Math.floor(e)+"s"},h=()=>{if(o.uu){let t=document.getElementsByName(o.uu);t&&t.length&&t[0].focus()}},g=t=>t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),m=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t){let n=document.createElement("a");n.href="".concat(t,"&dl=1"),e&&(n.download=e),document.body.appendChild(n),n.click(),window.URL.revokeObjectURL(t),n.remove()}},v=()=>window.scroll({top:0,left:0}),x=()=>(Date.now||(Date.now=function(){return new Date().getTime()}),Date.now()),w=/(https?:\/\/)?(www\.)?[^\s]+\.[^\s]+/g,b=t=>{if(t){let e=t;return e.startsWith("http")||(e="https://"+t),'<a\n className="text-indigo-600 hover:underline"\n target="_blank"\n href="'.concat(e,'"\n >').concat(t,"</a>")}},y=t=>t?new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):null}},function(t){t.O(0,[231,726,648,399,971,23,744],function(){return t(t.s=9681)}),_N_E=t.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.