1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`12c0da2a-9b5b-4253-ba3c-48b2fd44d5c7`,e._sentryDebugIdIdentifier=`sentry-dbid-12c0da2a-9b5b-4253-ba3c-48b2fd44d5c7`)}catch{}})();import{$t as e,At as t,Ft as n,Hn as r,In as i,It as a,Mt as o,Pn as s,Tn as c,i as l,jt as u,kt as d,mn as f,wt as p}from"./dist-DViRp4pB.js";import{a as m}from"./helpers-BbGwLwYt.js";import{t as h}from"./useFeature-BghRU3ys.js";import{t as g}from"./auth-Duc6VjE7.js";import{s as _}from"./vue-router-D7hTbeZt.js";import{n as v,t as y}from"./WidgetLink-BgKL3Jva.js";var b=r({default:()=>w}),x={class:`h3`},S={class:`grid grid-cols-4 border-t border-gray-200 p-2 text-blue-700`},C=17667072e5,w={__name:`TrendingWidgetApp`,props:{widgetClass:{type:String,default:``},clickIdContext:{type:String,default:``},impressionId:{type:String,default:`trending-threads`}},setup(r){let b=g().check(),w=r,T=c([]),E=c(!1),D=c(!1),O=c(null),k=c(!0),A=c(null),j=()=>{if(E.value||!k.value)return;let e=new URL(`/api/v3/trending`,l?.location.origin);E.value=!0,O.value&&e.searchParams.set(`cursor`,O.value),A.value&&e.searchParams.set(`point_in_time_at`,A.value),axios.get(e.toString()).then(e=>{T.value.push(...e.data.data),O.value=e.data.meta.next_cursor,A.value=e.data.meta.point_in_time_at,k.value=!!O.value}).catch(()=>{D.value=!0,k.value=!1}).finally(()=>{E.value=!1})},M=e=>{b||(e.preventDefault(),_({promptCode:`im-on`,promptType:`register`,dataId:`trending-box-button-im-on`,redirectUrl:`/talk/my-lists/threads-im-on`}))},N=e=>{let t=e.toLowerCase().split(` `).join(`-`);return m({prefix:!b&&t===`im-on`?`sign_up_login_trigger`:`trending_box_engagement`,value:e,suffix:`trending-box-button`,context:w.clickIdContext})};return(r,c)=>(e(),t(v,{"widget-name":`trending`,class:i(w.widgetClass),"click-id-context":w.clickIdContext,"data-impression-id":w.impressionId,"has-error":D.value,"is-server-loading":E.value,items:T.value,"more-to-load":k.value,"per-page":7,onRefreshData:j},{title:f(()=>[d(`span`,x,[c[0]||=n(` Trending `,-1),Date.now()<C?(e(),o(p,{key:0},[n(`ð`)],64)):u(``,!0)])]),links:f(()=>[d(`div`,S,[a(y,{name:`My feed`,url:`/talk/my-feed`,icon:`comment-plus`,"data-click-id":N(`feed`)},null,8,[`data-click-id`]),a(y,{name:`Topics`,url:`/talk`,icon:`bars`,"data-click-id":N(`topics`)},null,8,[`data-click-id`]),a(y,{name:`Active`,url:`/talk/active`,icon:`comments`,"data-click-id":N(`active`)},null,8,[`data-click-id`]),a(y,{name:s(h)(`my-posts-button-text`)?`My posts`:`I'm on`,url:`/talk/my-lists/threads-im-on`,icon:`thumbtack`,"data-click-id":N(`im on`),onClick:M},null,8,[`name`,`data-click-id`])])]),_:1},8,[`class`,`click-id-context`,`data-impression-id`,`has-error`,`is-server-loading`,`items`,`more-to-load`]))}};export{w as n,b as t}; 2//# sourceMappingURL=TrendingWidgetApp-Bjoa1fzJ.js.map
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.