PageSourceSearch

https://www.caryspotlight.com/assets/useCommunityActionBase-hxxvQypu.js

js caryspotlight.com collected 2026-09-24 13:28:57 UTC 1,432 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c20eb93f-c9b5-50f8-84e7-cf087dbfca1e")}catch(e){}}();
3import{t as e}from"./useTranslation-xRzBcOIb.js";import{n as t}from"./dist-DaRpaGs2.js";import{n}from"./CsrfContext-ByWWfcRz.js";import{t as r}from"./useMutation-sej49wS6.js";var i=class extends Error{toast;constructor(e){super(e?.message??`Community action failed`),this.name=`ActionError`,this.toast=e}},a=async(e,t,n=``)=>{let r=await fetch(e,{method:`POST`,headers:{Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded;charset=UTF-8`,...n?{"X-CSRF-Token":n}:{}},body:new URLSearchParams(t)}),a=await r.json().catch(()=>null);if(!r.ok)throw new i(a?.toast);return a??{}},o=({buildRequest:o,onMutate:s,onError:c,onSuccess:l,onSettled:u,showSuccessToast:d=!0})=>{let{t:f}=e(),p=n();return r({mutationFn:e=>{let{path:t,fields:n}=o(e);return a(t,n,p)},onMutate:s,onError:(e,n,r)=>{c?.(e,n,r);let a=e instanceof i?e.toast:void 0;t.error(a?.message??f(`community.action_menu.generic_error`))},onSuccess:(e,n,r)=>{l?.(e,n,r),d&&e.toast&&t.success(e.toast.message)},onSettled:u})};export{o as t};
4//# sourceMappingURL=useCommunityActionBase-hxxvQypu.js.map
5//# debugId=c20eb93f-c9b5-50f8-84e7-cf087dbfca1e

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.