1import{Pt as e}from"./Cqksm9lV.js";import{r as t}from"./DcbrWFll.js";var n=class{projectQuery;schemaQuery;contentsQuery;cmsContentCache;constructor(e,t,n,r){this.projectQuery=t,this.schemaQuery=n,this.contentsQuery=e,this.cmsContentCache=r}findContentBySlug(e,t){return this.contentsQuery.findPublishedContentBySlug(e,t,this.cmsContentCache)}findPublishedContent(e,t){return this.contentsQuery.findPublishedContent(e,t,this.cmsContentCache)}subscribeProject(e){return this.projectQuery.findSubScribe(e)}subscribeSchema(e,t){return this.schemaQuery.findSubscribe(e,t)}subscribeContents(e,t){return this.contentsQuery.findSubscribe(e,t)}},r;function i(e,t,i,a){r=new n(e,t,i,a)}var a=()=>r;function o(e,t,r,i){return new n(e,t,r,i)}var s={AND:`and`,OR:`or`},c={EQUAL:`equals`,NOT_EQUAL:`not_equals`,GREATER_THAN:`gt`,GREATER_THAN_OR_EQUAL:`gte`,LESS_THAN:`lt`,LESS_THAN_OR_EQUAL:`lte`};function l(e){return typeof e==`object`&&!!e}function u(e){return typeof e==`string`}function d(e){return!!e&&Array.isArray(e)&&e.every(u)}function f(e){return typeof e==`boolean`}function p(e){return Object.values(c).includes(e)}function m(e){return l(e)?u(e.filterKey)&&![`boolean`,`number`].some(t=>t===e?.type):!1}var h=e=>x.isSearchFilter(e)||!e.dynamicValue?!1:e.dynamicValue.includes(`,`),g=(e,t,n)=>({type:n,filterKey:e,value:t}),_=(e,t,n,r)=>({type:n,filterKey:e,value:t,operator:r}),v=(e,t)=>({type:`boolean`,filterKey:e,value:t}),y=(e,t,n)=>({type:`number`,filterKey:e,value:t,operator:n}),b=e=>{if(x.isSearchFilter(e)||!e.dynamicValue)return e;if(x.isBooleanFilter(e))return v(e.filterKey,e.dynamicValue===`true`);if(x.isNumberFilter(e))return y(e.filterKey,Number(e.dynamicValue));if(h(e)){let n=t(e.dynamicValue.split(`,`)).sort();return n.length===1?g(e.filterKey,n[0],e?.type):_(e.filterKey,n,e?.type,e?.operator)}return g(e.filterKey,e.dynamicValue,e?.type)},x={isCmsQueryFilter(e){return[x.isSearchFilter,x.isCategoryFilter,x.isMultiValueCategoryFilter,x.isBooleanFilter,x.isNumberFilter].some(t=>t(e))},isCmsQueryCompositeFilters(e){return Array.isArray(e)&&e.every(this.isCmsQueryFilter)},isCategoryFilter(e){return l(e)?m(e)&&!d(e.value):!1},isMultiValueCategoryFilter(e){return l(e)?m(e)&&d(e.value):!1},isSearchFilter(e){if(!l(e))return!1;let t=`type`in e&&e.type===`search`;return`value`in e&&u(e.value)&&t},isBooleanFilter(e){if(!l(e))return!1;let t=`type`in e&&e.type===`boolean`,n=!(`value`in e)||f(e.value);return t&&n},isNumberFilter(e){return l(e)?e.type===`number`:!1},isFilterOperator(e){return u(e)&&p(e)},hasSearchFilter(e){return!!e.find(e=>x.isSearchFilter(e))}};function S(){let t=e(!1);return typeof window<`u`&&(`ontouchstart`in window||navigator.maxTouchPoints>0||window.matchMedia(`(pointer:coarse)`).matches)&&(t.value=!0),{isTouchDevice:t}}export{b as a,i as c,c as i,x as n,a as o,s as r,o as s,S 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.