PageSourceSearch

https://static.aclj.org/app/assets/search-content-gwPnTLPU.js

js aclj.org collected 2026-10-02 02:21:39 UTC 4,128 bytes, 1 lines download raw bytes

1import{_ as e,d as t,n,r,s as i,t as a}from"./registry-BClMXjSj.js";import{t as o}from"./const-element-DZ_2STjZ.js";import{t as s}from"./text-input-CrDI2Z-O.js";import{t as c}from"./render-tag-D9LZGhou.js";import{t as l}from"./image-widget-qHr91Wa3.js";import{a as u,f as d,g as f}from"./sharedFunctions-D2YmzN2V.js";import{t as p}from"./of-fallback-FhCWdzuk.js";var m=r(),h=e(c()),g=e(o()),_=e(i()),v=e(p()),y=e(n()),b=a(),x=e(t()),S=`jh`,C=(0,m.t)(S),w=(0,g.default)(`span`,{class:`headerResults`},1).t(`Results`),T=(0,g.default)(`span`,null,1).t(`← Newer`),E=(0,g.default)(`span`,null,1).t(`Older →`);(0,b.r)(S,()=>C);var D={onCreate(e){this.state={items:[],submitting:!1,pageNum:1,contentType:``,query:``}},onMount(){let e={q:this.qs(`q`),p:parseInt(this.qs(`p`))};if((isNaN(e.p)||e.p<1)&&(this.state.pageNum=1),e.q!==void 0&&e.q!==``){let e={q:this.qs(`q`),p:parseInt(this.qs(`p`))};this.state.query=e.q,this.state.pageNum=e.p,this.state.query!==null&&!isNaN(this.state.pageNum)&&this.doSearch(this.state.pageNum)}},doSearch(e,t){if(t!==void 0&&t.preventDefault(),this.state.submitting)return;this.state.submitting=!0,typeof e==`number`&&(this.state.pageNum=e),this.state.query=document.getElementById(`SearchQuery`).value;let n=`/find?q=${this.state.query}&p=${this.state.pageNum}`;fetch(n).then(e=>e.json()).then(e=>{this.state.items=[...e],this.setStateDirty(`items`)}),document.getElementById(`SearchContent`).scrollIntoView(!0),this.updateUrlIfNeeded(),this.state.submitting=!1},updateUrlIfNeeded(){let e=window.location.pathname,t=window.location.origin+`/search?q=`+this.state.query+`&p=`+this.state.pageNum;e!==t&&history.pushState({},``,t)},qs(e){e=e.replace(/[*+?^$.\[\]{}()|\\\/]/g,`\\$&`);var t=location.search.match(RegExp(`[?&]`+e+`=([^&]+)(&|$)`));return t&&decodeURIComponent(t[1].replace(/\+/g,` `))},getContentType(e){switch(e){case`RadioShow`:return`Radio Show`;case`PressRelease`:return`Press Release`;case`MediaMention`:return`Media Mention`;default:return e}}};C._=(0,y.default)(function(e,t,n,r,i,a){if(t.be(`div`,{id:`SearchContent`},`0`,r,null,1),t.be(`div`,{class:`flex fdc`},`1`,r,null,1),t.be(`div`,{class:`searchSection flex ac jc`},`2`,r,null,1),t.be(`form`,{role:`search`,method:`GET`,class:`flex fdr cm8 xs12`},`3`,r,null,0,{onsubmit:n.d(`submit`,`doSearch`,!1,[1])}),(0,h.default)(s,{name:`search`,placeholder:`Search ACLJ Content`,value:e.query.q,class:`c9`,id:`SearchQuery`},t,n,`4`),t.be(`button`,{type:`submit`,class:`searchButton c3 flex jc ac`},`5`,r,null,0,{onclick:n.d(`click`,`doSearch`,!1,[1])}),t.t(`Search`,r),t.ee(),t.ee(),t.ee(),i.items.length!==0){t.be(`div`,{class:`resultsSection`},`6`,r,null,1),t.n(w,r),t.be(`div`,{class:`results`},`8`,r,null,1);{let e=0;for(let a of(0,v.default)(i.items)){let i=`[${e++}]`;t.be(`a`,{href:`${a.route}`,class:`searchItem`},`9`+i,r,null,0);{let e=a.image;t.be(`div`,{class:`flex jc wrap`},`10`+i,r,null,1),e&&(t.be(`div`,{class:`flex imageContainer aspect aspect-50 c12 cm3`},`11`+i,r,null,1),(0,h.default)(l,{image:{url:d(a),formats:a.imageFormats},alt:a.title,lazy:!1},t,n,`12`+i),t.ee()),t.be(`div`,{class:(0,_.default)([`flex fdc c12`,e?`cm9`:`c12`])},`13`+i,r,null,1),a.legalCaseName&&(t.be(`span`,{style:`font-size:12px; font-style: italic`},`14`+i,r,null,1),t.t(a.legalCaseName,r),t.ee()),t.be(`div`,{class:`searchItemTitle`},`15`+i,r,null,1),t.t(a.title,r),t.ee(),t.be(`div`,{class:`flex`},`16`+i,r,null,1),t.be(`span`,{class:`searchItemContentType`},`17`+i,r,null,1),t.t(r.getContentType(a.contentType),r),t.ee(),t.be(`span`,null,`18`+i,r,null,0),t.t(f(a,!0),r),t.ee(),t.ee(),a.copy&&(t.be(`div`,{class:`copySummary`},`19`+i,r,null,1),t.t(u(a.copy,300),r),t.ee()),t.ee(),t.ee()}t.ee()}}t.ee(),t.be(`div`,{class:(0,_.default)([`flex`,i.pageNum>1?`jsb`:`je`])},`20`,r,null,1),i.pageNum>1&&(t.be(`div`,{class:`pageButton`},`21`,r,null,1,{onclick:n.d(`click`,`doSearch`,!1,[i.pageNum-1])}),t.n(T,r),t.ee()),i.items.length===20&&(t.be(`div`,{class:`pageButton`},`23`,r,null,1,{onclick:n.d(`click`,`doSearch`,!1,[i.pageNum+1])}),t.n(E,r),t.ee()),t.ee(),t.ee()}t.ee(),t.ee()},{t:S},D),C.Component=(0,x.default)(D,C._);export{C as t};

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.