PageSourceSearch

https://m.wingu.se/packs/accounts_typed-AgBHJ2f3.js

js wingu.se collected 2026-09-29 15:09:58 UTC 12,857 bytes, 8 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/packs/database-D_1Mbg_g.js","/packs/rolldown-runtime-C0FnF6B9.js","/packs/immutable.es-tL0E-S7u.js","/packs/locale-D-1rLaCQ.js","/packs/utils-B19lL5A9.js","/packs/_rolldown_dynamic_import_helper-CIAwlR2T.js","/packs/preload-helper-HclGiUj8.js","/packs/intl-localematcher-DRXXZd2Y.js","/packs/fast-memoize-tJqGINKI.js"])))=>i.map(i=>d[i]);
2import{o as e,t}from"./rolldown-runtime-C0FnF6B9.js";import{t as n}from"./preload-helper-HclGiUj8.js";import{l as r,p as i,y as a}from"./initial_state-DnZ5UeDQ.js";import{a as o,i as s,o as c,r as l,s as ee}from"./api-CGawW2vu.js";import{a as te,n as u}from"./redux-toolkit.modern-DNDb-du5.js";import{a as d,n as ne,t as re}from"./typed_functions-Whap35TF.js";import{i as ie,l as ae}from"./immutable.es-tL0E-S7u.js";import{n as oe}from"./utils-B19lL5A9.js";import{n as f}from"./emoji-C0EOJ-dP.js";var p=e=>s(`v1/accounts`,{id:e}),se=(e,t)=>c(`v1/accounts/${e}/note`,{comment:t}),ce=(e,t)=>c(`v1/accounts/${e}/follow`,{...t}),le=e=>c(`v1/accounts/${e}/remove_from_followers`),ue=e=>s(`v1/accounts/${e}/featured_tags`),de=()=>s(`v1/featured_tags`),fe=e=>c(`v1/featured_tags`,{name:e}),pe=e=>l(`v1/featured_tags/${e}`),me=()=>s(`v1/featured_tags/suggestions`),he=e=>s(`v1/accounts/${e}/endorsements`),ge=e=>s(`v1/accounts/familiar_followers`,{id:e}),_e=()=>s(`v1/profile`),ve=e=>o(`v1/profile`,e),ye=()=>l(`v1/profile/avatar`),be=()=>l(`v1/profile/header`),xe=(e,t)=>c(`v1/accounts/${e}/email_subscriptions`,{email:t}),m=t(((e,t)=>{var n=/["'&<>]/;t.exports=r;function r(e){var t=``+e,r=n.exec(t);if(!r)return t;var i,a=``,o=0,s=0;for(o=r.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:i=`&quot;`;break;case 38:i=`&amp;`;break;case 39:i=`&#39;`;break;case 60:i=`&lt;`;break;case 62:i=`&gt;`;break;default:continue}s!==o&&(a+=t.substring(s,o)),s=o+1,a+=i}return s===o?a:a+t.substring(s,o)}}));ae();var h=ie({shortcode:``,static_url:``,url:``,category:``,featured:!1,visible_in_picker:!1}),g=e(m());function _(e){return{...e,titleHtml:(0,g.default)(e.title)}}var Se={expired:!1,multiple:!1,voters_count:0,votes_count:0,voted:!1,own_votes:[]};function v(e,t){return{...Se,...e,emojis:e.emojis.map(e=>h(e)),options:e.options.map((n,r)=>{let i={...n,voted:e.own_votes?.includes(r)||!1,titleHtml:(0,g.default)(n.title)},a=t?.options[r];if(a?.translation&&a.title===i.title){let{translation:e}=a;i.translation=_(e)}return i})}}var y=u(`accounts/importAccounts`),Ce=oe(`actions`);async function b(e){if(e.length===0)return;let{searchCustomEmojisByShortcodes:t,clearCache:r}=await n(async()=>{let{searchCustomEmojisByShortcodes:e,clearCache:t}=await import(`./database-D_1Mbg_g.js`).then(e=>e.t);return{searchCustomEmojisByShortcodes:e,clearCache:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),i=await t(e.map(e=>e.shortcode));i.length>0&&i.length<e.length&&(await r(`custom`),await f(),Ce(`Custom emojis updated, reloaded cache and picker data.`))}var we=new DOMParser;function Te(e){let t={...e};return t.filter=t.filter.id,t}function x(e){let t=document.createElement(`div`);return t.innerHTML=e,t.querySelector(`.quote-inline`)?.remove(),t.innerHTML}function S(e,t,{bogusQuotePolicy:n=!1}){let i={...e};if(n&&(i.quote_approval=null),i.account=e.account.id,e.reblog&&e.reblog.id&&(i.reblog=e.reblog.id),(e.quote?.quoted_status??e.quote?.quoted_status_id)&&(i.quote={...e.quote,quoted_status:e.quote.quoted_status?.id??e.quote?.quoted_status_id}),e.poll&&e.poll.id&&(i.poll=e.poll.id),e.card&&(i.card={...e.card,authors:e.card.authors.map(e=>({...e,accountId:e.account?.id,account:void 0}))}),e.filtered&&(i.filtered=e.filtered.map(Te)),t&&t.get(`content`)===i.content&&t.get(`spoiler_text`)===i.spoiler_text)i.search_index=t.get(`search_index`),i.contentHtml=t.get(`contentHtml`),i.spoilerHtml=t.get(`spoilerHtml`),i.spoiler_text=t.get(`spoiler_text`),i.hidden=t.get(`hidden`),t.get(`translation`)&&(i.translation=t.get(`translation`));else{i.spoiler_text&&!i.content&&!i.quote&&(i.content=i.spoiler_text,i.spoiler_text=``);let t=i.spoiler_text||``,n=[t,e.content].concat(e.poll&&e.poll.options?e.poll.options.map(e=>e.title):[],e.media_attachments.map(e=>e.description)).join(`
3
4`).replace(/<br\s*\/?>/g,`
5`).replace(/<\/p><p>/g,`
6
7`);i.search_index=we.parseFromString(n,`text/html`).documentElement.textContent,i.contentHtml=i.content,i.spoilerHtml=(0,g.default)(t),i.hidden=r?!1:t.length>0||i.sensitive,i.quote&&(i.contentHtml=x(i.contentHtml)),i.url&&!(i.url.startsWith(`http://`)||i.url.startsWith(`https://`))&&(i.url=null),i.url||=i.uri,i.media_attachments.forEac
7h(e=>{e.remote_url&&!(e.remote_url.startsWith(`http://`)||e.remote_url.startsWith(`https://`))&&(e.remote_url=null)})}if(t){i.quote_approval||=t.get(`quote_approval`);let e=t.get(`media_attachments`);i.media_attachments&&e&&i.media_attachments.forEach(t=>{let n=e.find(e=>e.get(`id`)===t.id);n&&n.get(`description`)===t.description&&(t.translation=n.get(`translation`))})}return i}function C(e,t){let n={detected_source_language:e.detected_source_language,language:e.language,provider:e.provider,contentHtml:e.content,spoilerHtml:(0,g.default)(e.spoiler_text),spoiler_text:e.spoiler_text};return t.get(`quote`)&&(n.contentHtml=x(n.contentHtml)),n}function w(e){let t={...e};return t.contentHtml=t.content,t.emojis&&b(t.emojis),t}var T=u(`poll/importMultiple`),E=e=>c(`v1/collections`,e),D=({id:e,...t})=>ee(`v1/collections/${e}`,t),O=e=>l(`v1/collections/${e}`),Ee=e=>s(`v1/collections/${e}`),De=e=>s(`v1/accounts/${e}/collections`),Oe=e=>s(`v1/accounts/${e}/in_collections`),ke=(e,t)=>c(`v1/collections/${e}/items`,{account_id:t}),Ae=(e,t)=>
7l(`v1/collections/${e}/items/${t}`),je=(e,t)=>c(`v1/collections/${e}/items/${t}/revoke`);function Me(e,t){let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}var k=`_\\u00b7\\u200c`,A=`\\p{L}\\p{M}`,j=`\\p{L}\\p{M}\\p{N}\\p{Pc}`,Ne=()=>{try{return RegExp(`(?:^|[^\\/\\)\\w])#(([${j}_][${j}${k}]*[${A}${k}][${j}${k}]*[${j}_])|([${j}_]*[${A}][${j}_]*))`,`iu`)}catch{return/(?:^|[^/)\w])#(\w*[a-zA-Z·]\w*)/i}},Pe=()=>{try{return RegExp(`^(([${j}_][${j}${k}]*[${A}${k}][${j}${k}]*[${j}_])|([${j}_]*[${A}][${j}_]*))$`,`iu`)}catch{return/^(\w*[a-zA-Z·]\w*)$/i}},Fe=Ne(),Ie=Pe(),M=e=>e.startsWith(`#`)||e.startsWith(`#`)?e.slice(1):e,N=e=>{if(!e)return``;let t=/\s+$/.exec(e)?.[0]??``;return`#${M(e.trimEnd()).split(/\s+/).filter(e=>e.length>0).map((e,t)=>t===0?e:e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(``)}${t}`},Le=e=>/[^a-zA-Z0-9# ]/.test(e),P={collections:{},createdBy:{},featuring:{},editor:{id:null,name:``,description:``,topic:``,language:i?.compose.default_language??`en`,discoverable:!0,sensitive:!1,items:[]}},F=te({name:`collections`,initialState:P,reducers:{init(e,t){let n=t.payload;e.editor={id:n.id,name:n.name,description:n.description??``,topic:N(n.tag?.name??``),language:n.language??``,discoverable:n.discoverable,sensitive:n.sensitive,items:K(n.items)}},reset(e,t){e.editor=t.payload===void 0?P.editor:{...P.editor,items:[t.payload]}},updateEditorField(e,t){let{field:n,value:r}=t.payload;e.editor[n]=r},importFetchedCollections(e,t){t.payload.forEach(t=>{e.collections[t.id]=t})}},extraReducers(e){e.addCase(L.pending,(e,t)=>{let{accountId:n}=t.meta.arg;e.createdBy[n]??={status:`loading`,collectionIds:[]},e.createdBy[n].status=`loading`}),e.addCase(L.rejected,(e,t)=>{let{accountId:n}=t.meta.arg;e.createdBy[n]={status:`error`,collectionIds:[]}}),e.addCase(L.fulfilled,(e,t)=>{let{collections:n}=t.payload,r=e.collections,i=[];n.forEach(e=>{let{id:t}=e;r[t]=e,i.push(t)}),e.collections=r,e.createdBy[t.meta.arg.accountId]={collectionIds:i,status:`idle`}}),e.addCase(R.pending,(e,t)=>{let{accountId:n}=t.meta.arg;e.featuring[n]??={status:`loading`,collectionIds:[]},e.featuring[n].status=`loading`}),e.addCase(R.rejected,(e,t)=>{let{accountId:n}=t.meta.arg;e.featuring[n]={status:`error`,collectionIds:[]}}),e.addCase(R.fulfilled,(e,t)=>{let{collections:n}=t.payload,r=e.collections,i=[];n.forEach(e=>{let{id:t}=e;r[t]=e,i.push(t)}),e.collections=r,e.featuring[t.meta.arg.accountId]={collectionIds:i,status:`idle`}}),e.addCase(z.fulfilled,(e,t)=>{let{collection:n}=t.payload;e.collections[n.id]=n}),e.addCase(V.fulfilled,(e,t)=>{let{collection:n}=t.payload;e.collections[n.id]=n,e.editor=P.editor}),e.addCase(H.fulfilled,(e,t)=>{let{collectionId:n}=t.meta.arg;if(delete e.collections[n],a){let t=e.createdBy[a]?.collectionIds;t&&=t.filter(e=>e!==n)}}),e.addCase(B.fulfilled,(e,t)=>{let{collection:n}=t.payload;e.collections[n.id]=n,e.editor=P.editor,e.createdBy[n.account_id]?e.createdBy[n.account_id]?.collectionIds.unshift(n.id):e.createdBy[n.account_id]={collectionIds:[n.id],status:`idle`}}),e.addCase(U.fulfilled,(e,t)=>{let{collection_item:n}=t.payload,{collectionId:r}=t.meta.arg,i=e.collections[r];i&&(i.items.push(n),i.item_count++)});let t=(e,t)=>{let{itemId:n,collectionId:r}=t.meta.arg,i=e.collections[r];i&&(i.items=i.items.filter(e=>e.id!==n),i.item_count--)};e.addCase(W.fulfilled,t),e.addCase(G.fulfilled,t)}});async function I(e,t){let n=e.flatMap(e=>e.items.slice(0,3).map(e=>e.account_id)).filter(e=>!!e);if(n.length>0){let e=Me(n,40);await Promise.allSettled(e.map(e=>t(ft({accountIds:e}))))}}var L=d(`${F.name}/fetchCollectionsCreatedByAccount`,({accountId:e})=>De(e),async({collections:e},{dispatch:t})=>{await I(e,t)}),R=d(`${F.name}/fetchCollectionsFeaturingAccount`,({accountId:e})=>Oe(e),async({collections:e},{dispatch:t})=>{await I(e,t)}),z=d(`${F.name}/fetchCollection`,({collectionId:e})=>Ee(e),(e,{dispatch:t})=>(e.accounts.length>0&&t(X(e.accounts)),e)),B=d(`${F.name}/createCollection`,({payload:e})=>E(e)),V=d(`${F.name}/updateCollection`,({payload:e})=>D(e)),H=d(`${F.name}/deleteCollection`,({collectionId:e})=>O(e)),U=d(`${F.name}/addCollectionItem`,({collectionId:e,accountId:t})=>ke(e,t)),W=d(`${F.name}
7/removeCollectionItem`,({collectionId:e,itemId:t})=>Ae(e,t)),G=re(`${F.name}/revokeCollectionInclusion`,({collectionId:e,itemId:t})=>je(e,t)),Re=F.reducer,ze=F.actions,Be=F.actions.updateEditorField,Ve=F.actions.importFetchedCollections,He=ne([(e,t)=>t,(e,t,n)=>e.collections[n],e=>e.collections.collections],(e,t,n)=>{let r=e?t[e]:null;if(!r)return{status:`error`,collections:[]};let{status:i,collectionIds:a}=r;return{status:i,collections:a.map(e=>n[e]).filter(e=>!!e)}}),Ue=e=>!!e.account_id&&(e.state===`accepted`||e.state===`pending`),K=e=>e?.map(({account_id:e,state:t})=>({account_id:e,state:t})).filter(Ue)??[],We=`STATUS_IMPORT`,q=`STATUSES_IMPORT`,J=`FILTERS_IMPORT`;function Y(e,t){e.every(e=>e.id!==t.id)&&e.push(t)}function Ge(e){return{type:q,statuses:e}}function Ke(e){return{type:J,filters:e}}function qe(e){return X([e])}function X(e){let t=[];function n(e){Y(t,e),e.moved&&n(e.moved),e.emojis&&e.username===e.acct&&b(e.emojis)}return e.forEach(n),y({accounts:t})}function Je(e,t={}){return Z([e],t)}function Z(e,t={}){return(n,r)=>{let i=[],a=[],o=[],s=[],c=[];function l(e){Y(a,S(e,r().getIn([`statuses`,e.id]),t)),Y(i,e.account),e.filtered&&e.filtered.forEach(e=>Y(s,e.filter)),e.reblog?.id&&l(e.reblog),e.quote?.quoted_status&&l(e.quote.quoted_status),e.poll?.id&&Y(o,v(e.poll,r().polls[e.poll.id])),e.tagged_collections.length&&e.tagged_collections.forEach(e=>Y(c,e)),e.card&&e.card.authors.forEach(e=>e.account&&Y(i,e.account)),e.emojis&&e.account.username===e.account.acct&&b(e.emojis)}e.forEach(l),n(T({polls:o})),n(X(i)),n(Ge(a)),n(Ke(s)),I(c,n)}}var Ye=u(`accounts/revealAccount`);function Q(e){return{payload:{...e,skipLoading:!0}}}var Xe=u(`accounts/followAccount/SUCCESS`,Q),Ze=u(`accounts/unfollowAccount/SUCCESS`,Q),Qe=u(`accounts/followRequestAuthorize/SUCCESS`),$e=u(`accounts/followRequestReject/SUCCESS`),et=u(`accounts/follow/REQUEST`,Q),tt=u(`accounts/follow/FAIL`,Q),$=u(`accounts/unfollow/REQUEST`,Q),nt=u(`accounts/unfollow/FAIL`,Q),rt=u(`accounts/block/SUCCESS`),it=u(`accounts/unblock/SUCCESS`),at=u(`accounts/mute/SUCCESS`),ot=u(`accounts/unmute/SUCCESS`),st=u(`accounts/pin/SUCCESS`),ct=u(`accounts/unpin/SUCCESS`),lt=u(`relationships/fetch/SUCCESS`,Q),ut=d(`accounts/remove_from_followers`,({accountId:e})=>le(e),e=>({relationship:e})),dt=d(`accounts/endorsements`,({accountId:e})=>he(e),(e,{dispatch:t})=>(t(X(e)),e)),ft=d(`accounts/multi_accounts`,({accountIds:e})=>p(e),(e,{dispatch:t})=>(t(X(e)),e));export{_ as $,H as A,V as B,X as C,ze as D,U as E,K as F,Le as G,Fe as H,Ve as I,T as J,N as K,W as L,z as M,L as N,Re as O,R as P,v as Q,G as R,qe as S,Z as T,Ie as U,Be as V,j as W,C as X,w as Y,y as Z,ot as _,tt as a,ce as at,q as b,at as c,ue as ct,ut as d,ve as dt,h as et,Ye as f,fe as ft,Ze as g,$ as h,lt as i,be as it,I as j,B as k,st as l,_e as lt,nt as m,xe as mt,rt as n,pe as nt,et as o,de as ot,it as p,se as pt,M as q,dt as r,ye as rt,Xe as s,ge as st,Qe as t,m as tt,$e as u,me as ut,ct as v,Je as w,We as x,J as y,He as z};
8//# sourceMappingURL=accounts_typed-AgBHJ2f3.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.