1import{r as e}from"./rolldown-runtime-BYbx6iT9.js";import{G as t,H as n,K as r,T as i,_ as a,at as o,t as s}from"./vue.esm-bundler-CWyflgh3.js";import{t as c}from"./_plugin-vue_export-helper-BDLDbliA.js";import{t as l}from"./FilterComponent-s0I45BWP.js";import{t as u}from"./modes-DIJxqa1U.js";import{Bs as d,Ts as f,rr as p,ws as m}from"./app-9S6z4Irq.js";s();var h=`All States`,g=i({components:{FilterComponent:l},props:{collapsed:{type:Boolean,default:!0},disabled:{type:Boolean},disabledMessage:{type:String,default:`Upgrade to filter`},mode:{type:String,default:u[0],validator(e){return u.includes(e)}},modelValue:{type:null,default:void 0},multiSelect:{type:Boolean,default:!0},prop:{type:String,default:`states`},useStore:{type:Boolean,default:!1}},emits:[`update:modelValue`],data(){return{loading:!1,showDropdown:!1,states:[],STATES_PLACEHOLDER:h}},computed:{plan(){return m().props.auth.plan},filters(){return this.useStore?p().filters:this.modelValue},isActive(){return this.showDropdown||!!this.filters?.states},valueLabel(){let e=this.filters?.states?.split(`,`)??[],t=this.states.filter(({value:t})=>e?.includes(t)).map(e=>e.label).join(`, `);return this.isActive?e.length===1?t:`Selected ${e.length} States`:`All States`}},created(){this.getData()},methods:{getData(){let e=this.filters?.states?.split(`,`);this.loading=!0,this.$http.get(`/resource/trending-topics/locations`,{cached:!0}).then(({data:t})=>{this.states=d([...t.states],t=>({label:t||``,value:t,selected:e?.includes(t)}))}).finally(()=>{this.loading=!1})},reset(){f.reload({data:{states:void 0}})}}}),_=e({default:()=>y});s();function v(e,i,s,c,l,u){let d=r(`FilterComponent`);return n(),a(d,{active:e.isActive,collapsed:e.collapsed,data:e.states,loading:e.loading,mode:e.mode,"multi-select":e.multiSelect,name:e.mode===`dropdown`?e.valueLabel:`States`,"show-apply":``,placeholder:`All States`,type:e.multiSelect?`multi-select`:`single-select`,"value-label":e.valueLabel,prop:e.prop,"model-value":e.modelValue,"use-store":e.useStore,"onUpdate:modelValue":i[0]||=t=>e.$emit(`update:modelValue`,t),onReset:e.reset},{target:o(()=>[t(e.$slots,`default`)]),_:3},8,[`active`,`collapsed`,`data`,`loading`,`mode`,`multi-select`,`name`,`type`,`value-label`,`prop`,`model-value`,`use-store`,`onReset`])}var y=c(g,[[`render`,v]]);export{_ as n,y 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.