PageSourceSearch

https://libertycountyfl.org/scripts/954.js

js libertycountyfl.org collected 2026-10-09 17:00:45 UTC 6,242 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[954],{262:function(e,t){t.A=(e,t)=>{const r=e.__vccOpts||e;for(const[e,n]of t)r[e]=n;return r}},954:function(e,t,r){r.r(t),r.d(t,{default:function(){return X}});var n=r(726);function l(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var s={key:0,class:"mt-6 bg-white p-4 md:p-8"},a={class:"w-full flex flex-row gap-8 md:gap-4 py-1"},u={class:""},o={key:0,class:"flex flex-col md:flex-row gap-2 md:gap-8 my-4"},c={class:"flex items-center gap-2 md:py-1"},d={key:0,class:"cursor-pointer font-semibold leading-none"},f=["onUpdate:modelValue"],p={key:1},m=["href","target"],h={class:"flex gap-2"},y={key:0,class:"flex-shrink-0 mt-2"},g=["src"],b={key:1,class:"w-6 h-6 flex items-center justify-center text-xl rounded"},v=["innerHTML"],k=["innerHTML"],x={class:"text-gray-500 italix text-xs block"},E=["innerHTML"],w=["innerHTML"],C={key:2,class:"h-4 sm:pb-1"},L={key:2};var F={name:"Search Results",props:{phrase:{type:String,default:""}},data:function(){return{loaded:!1,results:[],active:[],availableFilters:[],selectedFilters:{},filtering:!1,filterLabels:{page:"Pages & Information",event:"Events",announcement:"Announcements",post:"News",person:"People",attachment:"Media & Files"}}},watch:{phrase:function(e,t){this.getPosts()}},computed:{filteredResults:function(){var e=this;return this.results.filter(function(t){return 1==e.selectedFilters[t.subtype]})}},mounted:function(){this.getPosts()},methods:{toggleFilter:function(){this.filtering=!this.filtering},iconEmoji:function(e){switch(e){case"pdf":case"word":return"📝";case"image":return"🖼️";case"audio":return"🎵";case"video":return"🎬";case"excel":return"📊";case"archive":return"🗜️";case"text":return"📄";default:return"🔗"}},iconEmojiFromMime:function(e,t){if(e&&"string"==typeof e){var r=e.toLowerCase();if(r.includes("pdf"))return"📝";if(r.startsWith("image/"))return"🖼️";if(r.startsWith("audio/"))return"🎵";if(r.startsWith("video/"))return"🎬";if(r.includes("excel")||r.includes("spreadsheet")||r.includes("sheet"))return"📊";if(r.includes("word")||r.includes("msword")||r.includes("officedocument"))return"📝";if(r.includes("zip")||r.includes("compressed")||r.includes("archive"))return"🗜️";if(r.startsWith("text/"))return"📄"}return this.iconEmoji(t)},getPosts:function(){var e=this;this.loaded=!1,fetch("/wp-json/kma/v1/site-search?q="+encodeURIComponent(this.phrase)).then(function(e){return e.json()}).then(function(t){e.results=(Array.isArray(t)?t:[]).map(function(e){return{id:e.id,title:e.title,url:e.url,subtype:e.subtype,_embedded:{self:[{excerpt:{rendered:e.excerpt||""}}]},file:e.file||null,mime_type:e.mime_type||e.mime||null,file_icon:e.file_icon||null,seo:e.seo||null,acf:e.acf||null,meta:e.meta||null}}),e.availableFilters=[],e.results.forEach(function(t){e.availableFilters.includes(t.subtype)||e.availableFilters.push(t.subtype)})}).catch(function(e){console.error("Search fetch error:",e)}).finally(function(){e.loaded=!0,e.availableFilters.forEach(function(t){e.selectedFilters[t]=!0})})}}};const _=(0,r(262).A)(F,[["render",function(e,t,r,i,F,_){return F.loaded?((0,n.uX)(),(0,n.CE)("div",s,[(0,n.Lk)("div",a,[(0,n.Lk)("p",null,"showing "+(0,n.v_)(F.results.length)+" results...",1),(0,n.Lk)("button",{class:"content-link ml-auto",onClick:t[0]||(t[0]=function(){return _.toggleFilter&&_.toggleFilter.apply(_,arguments)})},[t[1]||(t[1]=(0,n.eW)("Filter Results ",-1)),(0,n.Lk)("span",u,(0,n.v_)(F.filtering?" - ":" + "),1)])]),F.filtering?((0,n.uX)(),(0,n.CE)("div",o,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(F.filterLabels,function(e,t){return(0,n.uX)(),(0,n.CE)("div",c,[F.availableFilters.includes(t)?((0,n.uX)(),(0,n.CE)("label",d,[(0,n.bo)((0,n.Lk)("input",{type:"checkbox","onUpdate:modelValue":function(e){return F.selectedFilters[t]=e},class:""},null,8,f),[[n.lH,F.selectedFilters[t]]]),(0,n.eW)(" "+(0,n.v_)(e),1)])):(0,n.Q3)("",!0)])}),256))])):(0,n.Q3)("",!0),_.filteredResults.length>0?((0,n.uX)(),(0,n.CE)("div",p,[((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(_.filteredResults,function(e){return(0,n.uX)(),(0,n.CE)("a",{href:e.url,target:"attachment"==e.subtype?"_blank":"_self",key:e.id,class:"group block w-full border-t pt-4 flex items-start gap-4"},[(0,n.Lk)("div",null,[(0,n.Lk)("div",h,["attachment"===e.subtype?((0,n.uX)(),(0,n.CE)("div",y,["attachment"===e.subtype&&e.mime_type&&e.mime_type.startsWith("image")?((0,n.uX)(),(0,n.CE)("img",{key:0,src:e.f
1ile,alt:"",class:"w-6 h-6 object-cover rounded"},null,8,g)):((0,n.uX)(),(0,n.CE)("div",b,(0,n.v_)(_.iconEmojiFromMime(e.mime_type,e.file_icon)),1))])):(0,n.Q3)("",!0),e.title?((0,n.uX)(),(0,n.CE)("h3",{key:1,innerHTML:e.title,class:"block text-xl md:text-3xl text-primary-dark font-condensed font-bold group-hover:underline"},null,8,v)):(0,n.Q3)("",!0)]),(0,n.Lk)("span",{class:"inline-block text-xs text-gray-800 leading-none p-1 uppercase border",innerHTML:e.subtype},null,8,k),(0,n.Lk)("em",x,(0,n.v_)(e.url),1),e.seo.description?((0,n.uX)(),(0,n.CE)("div",{key:0,class:"prose prose-p:leading-normal max-w-5xl pb-4",innerHTML:e.seo.description},null,8,E)):e._embedded.self[0].excerpt?((0,n.uX)(),(0,n.CE)("div",{key:1,class:"prose prose-p:leading-normal max-w-5xl pb-4",innerHTML:e._embedded.self[0].excerpt.rendered},null,8,w)):((0,n.uX)(),(0,n.CE)("div",C))])],8,m)}),128))])):((0,n.uX)(),(0,n.CE)("div",L,l(t[2]||(t[2]=[(0,n.Lk)("div",{class:"prose md:prose-lg md:px-8 md:pt-4"},[(0,n.Lk)("p",null,"There are no pages that match your search criteria.")],-1)]))))])):(0,n.Q3)("",!0)}]]);var X=_}}]);

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.