1import{It as e,T as t}from"./DidYC9GO.js";import{c as n,i as r,r as i}from"./Bf67HQJN.js";import{t as a}from"./D8kiqmnt.js";import{t as o}from"./DMnIBBRt.js";import{t as s}from"./NzWF0iQb.js";import{t as c}from"./DIxZDrAq.js";import{t as l}from"./DSr_lfFX.js";import{t as u}from"./OBmz3jT8.js";function d(e){var t=e==null?0:e.length;return t?l(e,1,t):[]}var f={content:``},p=o(`modal`,()=>{let t=e(!1),n=e(f),r=e([]),i=e(!1);function a(e){return r.value.some(t=>t.content.includes(e))}function o(e){t.value=!0,n.value=c(r.value)||e,r.value=[...r.value,e]}function s(){r.value.length!==0&&(t.value=r.value.length!==1,n.value=r.value.length===1?f:u(r.value)||f,r.value=d(r.value))}function l(e){i.value=e}function p(e){return o(e)}function m(){return n.value.callback&&n.value.callback(),s()}function h(){l(!0)}function g(){l(!1)}return{isVisible:t,modalData:n,modalDatum:r,isSuccessful:i,isModalOnQueueOrActive:a,enqueue:o,dequeue:s,show:p,close:m,success:h,cancel:g}}),m={root:[`favorites`],offerIdList:e=>[...m.root,`offer-id-list`,e]},h=`favorite_offers`,g={per:999999};function _(e){return typeof e==`number`}async function v(){return((await s.get(`favorite_offers`,g))?.favoriteOffers??[]).map(e=>e.offerId).filter(_)}var y=r(e=>({key:m.offerIdList(e),query:v}));async function b(e){await s.post(h,{offer_id:e})}async function x(e){await s.delete(`${h}/${e}`)}var S=i(()=>{let{user:e,isLoggedIn:r}=a(),i=t(()=>r.value?e.value?.id??0:0),o=n(()=>({...y(i.value),enabled:i.value>0})),s=t(()=>i.value>0?o.data.value??[]:[]),c=t(()=>s.value.length);function l(e){return s.value.includes(e)}return{userId:i,favoriteOfferIdList:s,favoriteOffersCount:c,isFavoriteOffer:l,isLoading:o.isLoading,hasFailed:t(()=>o.status.value===`error`)}});export{p as a,m as i,x as n,b as r,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.