1"use strict";(self.webpackChunkalphabet=self.webpackChunkalphabet||[]).push([[1449,1689,1874,6365,7277,8891],{8891:function(e,t,a){a.r(t);var r=a(4848),l=a(4164),i=a(2330);t.default=function(e){const{article:t,isHighlight:a=!1}=e,s=(0,i.K_)();return(0,r.jsxs)("article",{className:(0,l.A)("cmp-blog-article",{highlight:a}),children:[(0,r.jsx)("a",{href:t.url,className:"cmp-blog-article__link"}),(0,r.jsx)("div",{className:"cmp-blog-article__image-wrapper",children:t.image&&(0,r.jsx)("img",{src:t.image,alt:t.title,className:"cmp-blog-article__image",loading:"lazy"})}),(0,r.jsxs)("div",{className:"cmp-blog-article__content",children:[t.category&&(0,r.jsxs)("div",{className:"cmp-blog-article__header",children:[a&&(0,r.jsx)("span",{className:"cmp-blog-article__tag cmp-blog-article__tag--highlight",children:s("blogFilter.highlight")}),(0,r.jsx)("a",{href:`${window.location.pathname}?q=${t.category.key}`,className:"cmp-blog-article__tag",children:t.category.value}),(0,r.jsx)("span",{className:"cmp-blog-article__icon","aria-hidden":"true",children:(0,r.jsx)("span",{className:"icon","data-icon":"arrow_up_right_lt"})})]}),(0,r.jsx)("h3",{className:"cmp-blog-article__title",children:t.title}),t.description&&(0,r.jsx)("p",{className:"cmp-blog-article__description",children:t.description}),t.formattedDate&&(0,r.jsxs)("div",{className:"cmp-blog-article__date","data-sly-test":"${article.publishedDate}",children:[(0,r.jsx)("span",{className:"cmp-blog-article__date-label",children:s("blogFilter.published")}),(0,r.jsx)("time",{dateTime:t.publishedDate??"",children:t.formattedDate??""})]})]})]})}},1449:function(e,t,a){a.r(t);var r=a(4848),l=a(6540),i=a(55),s=a(2330),n=a(6365),c=a(8891),o=a(1874);t.default=function(){const{state:e}=(0,n.useBlogFilter)(),t=(0,i.EL)(),a=(0,s.K_)(),g=(0,l.useMemo)(()=>1===e.currentPage?e.highlights.length>0:e.highlights.length>0&&!t.hideHighlight,[e.highlights,e.currentPage]);return(0,r.jsxs)(r.Fragment,{children:[g&&(0,r.jsx)("div",{className:"cmp-blog-filter__highlights",children:e.highlights.map(e=>(0,r.jsx)(c.default,{article:e,isHighlight:!0},e.url))}),(0,r.jsx)(o.default,{onTop:g}),e.articles.length>0&&(0,r.jsx)("div",{className:"cmp-blog-filter__articles",children:e.articles.map(e=>(0,r.jsx)(c.default,{article:e},e.url))}),!g&&0===e.articles.length&&!e.isLoading&&(0,r.jsx)("div",{className:"cmp-blog-filter__empty",children:(0,r.jsx)("p",{children:a("blogFilter.noArticlesFound")})})]})}},1689:function(e,t,a){a.r(t);var r=a(4848),l=a(6540),i=a(2330),s=a(2592),n=a(6365),c=a(8638);t.default=function(){const{state:e,actions:t}=(0,n.useBlogFilter)(),a=(0,i.K_)(),o=(0,l.useRef)(null),[g,d]=(0,l.useState)(!1),u=(0,s.Ay)("device","max"),p=e=>{t.setSelectedCategory(e),u||setTimeout(()=>{(0,c.P)(".cmp-blog-filter__highlights",".cmp-blog-filter__articles")},100),d(!1)},h=[{key:null,value:a("blogFilter.viewAll")},...e.categories];return(0,r.jsxs)("div",{className:"cmp-blog-filter__sidebar",children:[(0,r.jsx)("p",{className:"cmp-blog-filter__sidebar-subtitle",children:a("blogFilter.blogCategories")}),(0,r.jsxs)("nav",{className:"cmp-blog-filter__sidebar-nav","aria-label":a("blogFilter.blogCategories"),children:[(0,r.jsxs)("ul",{ref:o,className:"cmp-blog-filter__sidebar-list cmp-blog-filter__sidebar-list--desktop",children:[(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:(0,c.t)("q",null),className:"cmp-blog-filter__sidebar-item "+(null===e.selectedCategory?"cmp-blog-filter__sidebar-item--active":""),onClick:e=>{e.preventDefault(),p(null)},children:a("blogFilter.viewAll")})}),e.categories.map(t=>(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:(0,c.t)("q",t.key),className:"cmp-blog-filter__sidebar-item "+(e.selectedCategory?.key===t.key?"cmp-blog-filter__sidebar-item--active":""),onClick:e=>{e.preventDefault(),p(t)},children:t.value})},t.key))]}),(0,r.jsxs)("ul",{className:"cmp-blog-filter__sidebar-list cmp-blog-filter__sidebar-list--mobile",children:[(0,r.jsx)("li",{className:"cmp-blog-filter__sidebar-accordion-trigger",children:(0,r.jsxs)("button",{type:"button",className:"cmp-blog-filter__sidebar-item cmp-blog-filter__sidebar-item--active cmp-blog-filter__sidebar-item--trigger",onClick:()=>{d(e=>!e)},"aria-expanded":g,"aria-controls":"category-accordion-content",children:[(0,r.jsx)("span",{className:"cmp-blog-filter__sidebar-tr
1igger-text",children:null===e.selectedCategory?a("blogFilter.viewAll"):e.selectedCategory.value}),(0,r.jsx)("span",{className:"icon cmp-blog-filter__sidebar-trigger-icon "+(g?"toggle cmp-blog-filter__sidebar-trigger-icon--open":""),"data-icon":"arrow_chevron_down_lt","aria-hidden":"true"})]})}),(0,r.jsx)("li",{id:"category-accordion-content",className:"cmp-blog-filter__sidebar-accordion-content "+(g?"cmp-blog-filter__sidebar-accordion-content--open":""),children:(0,r.jsx)("ul",{className:"cmp-blog-filter__sidebar-accordion-list",children:h.map(t=>{const a=null===t.key&&null===e.selectedCategory||null!==t.key&&null!==e.selectedCategory&&e.selectedCategory.key===t.key;return(0,r.jsx)("li",{children:(0,r.jsx)("a",{href:(0,c.t)("q",t.key),className:"cmp-blog-filter__sidebar-item "+(a?"cmp-blog-filter__sidebar-item--active":""),onClick:e=>{e.preventDefault(),p(null===t.key?null:t)},children:t.value})},t.key??"all")})})})]})]})]})}},1874:function(e,t,a){a.r(t);var r=a(4848),l=a(4164),i=a(2330),s=a(4445),n=a(6365),c=a(8638);t.default=function(e){const{onTop:t=!1,withScrollToTop:a=!1}=e,{state:o,actions:g}=(0,n.useBlogFilter)(),d=(0,i.K_)(),u=Math.ceil(o.totalCount/o.itemsPerPage);if(u<=1)return null;function p(e){a&&(0,c.P)(".cmp-blog-filter__articles"),e>=1&&e<=u&&(0,s.k)(()=>{g.setCurrentPage(e)})}const h=o.currentPage-1,_=o.currentPage+1,m=o.currentPage>1?(0,c.t)("page",h):"#",f=o.currentPage<u?(0,c.t)("page",_):"#";return(0,r.jsxs)("nav",{className:(0,l.A)("cmp-blog-filter__pagination",{"cmp-blog-filter__pagination--on-top":t}),"aria-label":d("blogFilter.pagination"),children:[(0,r.jsx)("a",{className:"cmp-blog-filter__pagination-button cmp-blog-filter__pagination-button--prev "+(o.currentPage<=1?"cmp-blog-filter__pagination-button--disabled":""),href:m,onClick:e=>{o.currentPage<=1?e.preventDefault():(e.preventDefault(),p(h),e.currentTarget.focus())},"aria-label":d("blogFilter.previousPage"),"aria-disabled":o.currentPage<=1,children:(0,r.jsx)("span",{className:"icon","data-icon":"arrow_chevron_left_lt","aria-hidden":"true"})}),(0,r.jsx)("div",{className:"cmp-blog-filter__pagination-pages",children:function(){const e=[];if(u<=5)for(let t=1;t<=u;t++)e.push(t);else{e.push(1),o.currentPage>3&&e.push("...");const t=Math.max(2,o.currentPage-1),a=Math.min(u-1,o.currentPage+1);for(let r=t;r<=a;r++)e.push(r);o.currentPage<u-2&&e.push("..."),e.push(u)}return e.map((e,t)=>{if("..."===e)return(0,r.jsx)("span",{className:"cmp-blog-filter__pagination-ellipsis",children:"..."},`ellipsis-${t}`);const a=e,l=a===o.currentPage,i=(0,c.t)("page",a);return(0,r.jsx)("a",{href:i,className:"cmp-blog-filter__pagination-page "+(l?"cmp-blog-filter__pagination-page--active":""),onClick:e=>{e.preventDefault(),p(a)},"aria-label":`${d("blogFilter.page")} ${a}`,"aria-current":l?"page":void 0,children:a},a)})}()}),(0,r.jsx)("a",{className:"cmp-blog-filter__pagination-button cmp-blog-filter__pagination-button--next "+(o.currentPage>=u?"cmp-blog-filter__pagination-button--disabled":""),href:f,onClick:e=>{o.currentPage>=u?e.preventDefault():(e.preventDefault(),p(_),e.currentTarget.focus())},"aria-label":d("blogFilter.nextPage"),"aria-disabled":o.currentPage>=u,children:(0,r.jsx)("span",{className:"icon","data-icon":"arrow_chevron_right_lt","aria-hidden":"true"})})]})}},7277:function(e,t,a){a.r(t);var r=a(4848),l=a(55),i=a(2330),s=a(1449),n=a(1689),c=a(1874),o=a(6365);function g(){const{state:e}=(0,o.useBlogFilter)(),t=(0,i.K_)(),{title:a}=(0,l.EL)(),g=e.articles.length>0||e.highlights.length>0;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{className:"cmp-blog-filter__title",children:a}),(0,r.jsxs)("div",{className:"cmp-blog-filter__container",children:[(0,r.jsx)(n.default,{}),(0,r.jsx)("div",{className:"cmp-blog-filter__content",children:(0,r.jsxs)("div",{className:"cmp-blog-filter__content-wrapper",children:[e.isLoading&&!g&&(0,r.jsx)("div",{className:"cmp-blog-filter__loading",children:(0,r.jsx)("p",{children:t("blogFilter.loadingArticles")})}),e.error&&(0,r.jsx)("div",{className:"cmp-blog-filter__error",children:(0,r.jsxs)("p",{children:[t("blogFilter.error")," ",e.error]})}),(g||!e.isLoading)&&!e.error&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.default,{}),(0,r.jsx)(c.default,{withScrollToTop:!0})]})]})})]})]})}t.default=function(){const e=(0,l.EL)(),t=parseInt(e.itemsPerPage||"6",10);return(0,r.jsx)(o.BlogFilterProvider,{apiPath:e.path,itemsPerPage:t,children:(0,r.jsx)(g,{})})}},6365:function(e,t,a){a.r(t),a.d(t,{BlogFilterProvider:function(){return d},useBlogFilter:function(){return u}});var r=a(4848),l=a(6540),i=a(4445),s=a(7069);class n{constructor(e){this.apiPath=e}async searchBlogs(e,t){try{const a=new URLSearchParams;e&&a.append("category",e.key),a.append("page",t.toString());const r=await fetch(`${this.apiPath}.blog-search.json?${a}`);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return await r.json()}catch(a){throw a}}}function c(e){const t=new URLSearchParams(window.location.search),a=t.get("q"),r=t.get("page"),l=r?parseInt(r,10):1;return{isLoading:!1,error:null,articles:[],highlights:[],categories:[],selectedCategory:a?{key:a,value:a}:null,currentPage:!isNaN(l)&&l>0?l:1,totalCount:0,itemsPerPage:e}}function o(e,t){switch(t.type){case"SET_LOADING":return{...e,isLoading:t.payload};case"SET_ERROR":return{...e,error:t.payload};case"SET_ARTICLES":return{...e,articles:t.payload};case"SET_HIGHLIGHTS":return{...e,highlights:t.payload};case"SET_CATEGORIES":return{...e,categories:t.payload};case"SET_SELECTED_CATEGORY":return{...e,selectedCategory:t.payload,currentPage:1};case"SYNC_SELECTED_CATEGORY":return{...e,selectedCategory:t.payload};case"SET_CURRENT_PAGE":return{...e,currentPage:t.payload};case"SET_TOTAL_COUNT":return{...e,totalCount:t.payload};default:return e}}const g=(0,l.createContext)(null);function d(e){const{children:t,apiPath:a,itemsPerPage:d}=e,{setParams:u}=(0,s.B)(),[p,h]=(0,l.useReducer)(o,d,c),_=new n(a),m=(0,l.useRef)(!0),f=(0,l.useRef)(p.selectedCategory?.key??null),b={setLoading:e=>{h({type:"SET_LOADING",payload:e})},setError:e=>{h({type:"SET_ERROR",payload:e})},setArticles:e=>{h({type:"SET_ARTICLES",payload:e})},setHighlights:e=>{h({type:"SET_HIGHLIGHTS",payload:e})},setCategories:e=>{h({type:"SET_CATEGORIES",payload:e})},setSelectedCategory:e=>{h({type:"SET_SELECTED_CATEGORY",payload:e}),u({q:e?[e.key]:[],page:[]})},setCurrentPage:e=>{h({type:"SET_CURRENT_PAGE",payload:e}),u({q:p.selectedCategory?[p.selectedCategory.key]:[],page:e>1?[String(e)]:[]})},loadBlogs:async()=>{h({type:"SET_LOADING",payload:!0}),h({type:"SET_ERROR",payload:null});try{const e=await _.searchBlogs(p.selectedCategory,p.currentPage),t=p.selectedCategory?.key??null,a=f.current!==t,r=()=>{if(h({type:"SET_HIGHLIGHTS",payload:e.highlights}),h({type:"SET_ARTICLES",payload:e.articles}),h({type:"SET_CATEGORIES",payload:e.categories}),h({type:"SET_TOTAL_COUNT",payload:e.totalCount}),null!==t){const a=e.categories.find(e=>e.key===t);a&&h({type:"SYNC_SELECTED_CATEGORY",payload:a})}f.current=t};a&&!m.current?(0,i.k)(r):r()}catch(e){h({type:"SET_ERROR",payload:e instanceof Error?e.message:"Failed to load blogs"})}finally{h({type:"SET_LOADING",payload:!1})}}};return(0,l.useEffect)(()=>{b.loadBlogs().then(()=>{m.current=!1,f.current=p.selectedCategory?.key??null})},[]),(0,l.useEffect)(()=>{m.current||b.loadBlogs()},[p.selectedCategory?.key,p.currentPage]),(0,r.jsx)(g.Provider,{value:{state:p,actions:b},children:t})}function u(){const e=(0,l.useContext)(g);if(!e)throw new Error("useBlogFilter must be used within a BlogFilterProvider");return e}},8638:function(e,t,a){function r(e,t){const a=new URL(window.location.href);return null===t||""===t||"number"===typeof t&&1===t?a.searchParams.delete(e):a.searchParams.set(e,String(t)),a.pathname+a.search}function l(e,t){const a=document.querySelector(e)||document.querySelector(t||"");if(!a)return;const r=a.getBoundingClientRect().top+window.pageYOffset-90;window.scrollTo({top:r,behavior:"smooth"})}a.d(t,{P:function(){return l},t:function(){return r}})},7069:function(e,t,a){a.d(t,{B:function(){return i},c:function(){return l}});var r=a(6540);const l=()=>{const[e,t]=(0,r.useState)(new URLSearchParams(window.location.search));(0,r.useEffect)(()=>{const e=()=>t(new URLSearchParams(window.location.search));return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},[]);return{getParam:t=>e.get(t)}},i=()=>({setParams:(0,r.useCallback)(e=>{const t=new URLSearchParams(window.location.search);Object.keys(e).forEach(a=>{e[a]?.length?t.set(a,e[a]):t.delete(a)});const a=Array.from(t).length>0;window.history.pushState({},"",`${window.location.pathname}${a?`?${t.toString()}`:""}`)},[])})}}]);
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.