PageSourceSearch

https://www.rosersbergsslott.se/wp-content/themes/meetingselection…/load-more-posts.min.js?ver=1.0.78.504

js rosersbergsslott.se collected 2026-09-25 00:06:23 UTC 3,121 bytes, 2 lines download raw bytes

1document.addEventListener("alpine:init",()=>{const t=t=>({id:t.id,post_type:t.post_type,title:t.title,label:t.label,link_text:t.link_text,excerpt:t.excerpt,url:t.url,target:t.target,thumbnail:(t.thumbnail||"").replace(/\bauto,\s?/g,""),tag:t.tag,price:t.price,price_from:t.price_from,publish_date:t.publish_date,start_date:t.start_date,end_date:t.end_date,time:t.time,unpublish_date:t.unpublish_date,blog_id:t.blog_id,blog_name:t.blog_name,blog_color:t.blog_color,location_name:t.location_name||"",location_address:t.location_address||"",schema:t.schema||null});Alpine.data("loadMorePosts",s=>({posts:Array.isArray(s.initialPosts)?s.initialPosts.map(t):[],paged:Array.isArray(s.initialPosts)?2:1,hasMore:!Array.isArray(s.initialPosts)||(s.totalPosts||0)>s.initialPosts.length,noResults:Array.isArray(s.initialPosts)&&0===s.initialPosts.length,showStatic:Array.isArray(s.initialPosts)&&s.initialPosts.length>0,currentPost:s.currentPost||"",postType:s.postType||"",postsPerPage:s.postsPerPage||12,totalPosts:s.totalPosts||0,categoryFilter:"all_categories",tagFilter:"all_tags",searchQuery:"",initialCategories:s.initialCategories||"",initialTags:s.initialTags||"",isCalendar:s.isCalendar||!1,schemaId:s.schemaId||`posts-schema-${Math.random().toString(36).slice(2)}`,schemaEl:null,async fetchPosts(s=!1){s&&(this.paged=1,this.posts=[],this.hasMore=!0,this.noResults=!1);let e=new FormData;
1e.append("action","load_more_posts"),e.append("paged",this.paged),e.append("posts_per_page",this.postsPerPage),e.append("category",this.categoryFilter),e.append("tag",this.tagFilter),e.append("initial_categories",this.initialCategories),e.append("initial_tags",this.initialTags),e.append("search",this.searchQuery),e.append("is_calendar",this.isCalendar?1:0),e.append("current_post",this.currentPost),this.isCalendar||e.append("post_type",this.postType);let i=await fetch(appAjax.ajax_url,{method:"POST",body:e}),a=await i.json();if((s||0===this.totalPosts)&&(this.totalPosts=a.total_posts),0===a.posts.length)this.hasMore=!1,this.noResults=1===this.paged;else{const s=new Set(this.posts.map(t=>t.id));a.posts=a.posts.filter(t=>!s.has(t.id)),this.posts.push(...a.posts.map(t)),this.updateSchema(),this.paged++,this.noResults=!1,this.posts.length>=this.totalPosts&&(this.hasMore=!1)}},loadMore(){this.showStatic=!1,this.fetchPosts()},filterPosts(){this.showStatic=!1,this.fetchPosts(!0)},setCategoryFilter(t){this.categoryFilter=t,this.filterPosts()},setTagFilter(t){this.tagFilter=t,this.filterPosts()},updateSchema(){this.schemaEl||(this.schemaEl=document.getElementById(this.schemaId)),this.schemaEl||(this.schemaEl=document.createElement("script"),this.schemaEl.type="application/ld+json",this.schemaEl.id=this.schemaId,document.head.appendChild(this.schemaEl));const t=this.posts.filter(t=>t.schema);this.schemaEl.text=JSON.stringify({"@context":"https://schema.org","@type":"ItemList",itemListElement:t.map((t,s)=>({"@type":"ListItem",position:s+1,url:t.url||"",item:t.schema}))})},init(){Array.isArray(s.initialPosts)?this.posts.length&&this.updateSchema():this.loadMore()}}))});
2//# sourceMappingURL=load-more-posts.min.js.map

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.