1import{m as l}from"./module.esm-S4M4TpEG.js";l.data("blogCategories",()=>({categoriesPerPage:4,totalCategories:0,currentlyVisible:0,isLoading:!1,error:null,init(){try{this.totalCategories=parseInt(this.$el.dataset.totalCategories)||0;const t=parseInt(this.$el.dataset.categoriesPerPage)||4;this.categoriesPerPage=t;const e=this.$el.querySelectorAll(".blog-category:not(.hidden)");this.currentlyVisible=e.length,this.totalCategories<0&&(this.showError("Invalid total categories count"),this.totalCategories=0)}catch(t){console.error("blogCategories: Error during initialization:",t),this.showError("Failed to initialize category loading"),this.totalCategories=0,this.currentlyVisible=0}},async loadMore(){if(!this.isLoading){this.isLoading=!0,this.error=null;try{let t=this.$el;if(t&&t.tagName==="BUTTON"&&(t=t.closest('[x-data="blogCategories"]')||t.closest("[x-data]")),!t)throw new Error("Container with x-data not found");const e=t.querySelectorAll(".blog-category.hidden");if(e.length===0)return;const i=Array.from(e).slice(0,this.categoriesPerPage);if(i.length===0)return;await new Promise(o=>setTimeout(o,200));let r=0;if(i.forEach((o,a)=>{try{o.classList.remove("hidden"),r++}catch(n){console.warn(`Failed to show category ${a}:`,n)}}),r===0)throw new Error("Failed to show any categories");this.currentlyVisible+=r;const s=t.querySelectorAll(".blog-category:not(.hidden)").length;s!==this.currentlyVisible&&(console.warn("State inconsistency detected, correcting..."),this.currentlyVisible=s),this.announce(`Loaded ${r} more categories. ${this.currentlyVisible} of ${this.totalCategories} categories now visible.`)}catch(t){console.error("blogCategories: Error loading more categories:",t),this.showError("Failed to load more categories. Please try again.")}finally{this.isLoading=!1}}},get showLoadMoreButton(){return this.error||this.currentlyVisible>=this.totalCategories?!1:this.totalCategories>this.categoriesPerPage&&this.currentlyVisible<this.totalCategories},get hasError(){return this.error!==null},get loadMoreButtonText(){return this.isLoading?"Loading...":"Load More"},get loadMoreButtonClass(){const t="button button-outline load-more button--light";return this.isLoading?`${t} opacity-50 cursor-not-allowed`:t},showError(t){this.error=t,this.announce(`Error: ${t}`),setTimeout(()=>{this.error=null},5e3)},clearError(){this.error=null},announce(t){const e=document.createElement("div");e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.setAttribute("role","status"),e.setAttribute("class","sr-only"),e.textContent=t,document.body.appendChild(e),setTimeout(()=>{document.body.contains(e)&&document.body.removeChild(e)},1e3)}}));
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.