PageSourceSearch

https://magnit.ru/_nuxt/DKdpSZCp2.js

js magnit.ru collected 2026-10-01 11:27:18 UTC 5,494 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`2026.10.1-10.31`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`7faf4b06-9294-473f-be78-2156cb5c1beb`,e._sentryDebugIdIdentifier=`sentry-dbid-7faf4b06-9294-473f-be78-2156cb5c1beb`)}catch{}})();import{Mn as e}from"./BoFV2f97.js";import{Ht as t,g as n,vn as r}from"./PBU-S3O7.js";import{d as i}from"./DczwZSaO.js";import{n as a}from"./CQDJnWnH.js";import{t as o}from"./D7_W5SKU.js";import{A as s,I as c,L as l,M as u,N as d,O as f,P as ee,R as te,j as p,k as m,z as h}from"./BLicfrKr.js";import{Z as g}from"./BkRh9FcJ.js";import{c as _,d as v,l as y,s as b,u as x}from"./BlsHmvsw.js";import"./B68XmXU6.js";var S=`lp_spc`,C=a(`subscription`,()=>{let{isAuthorized:a,userId:C}=o(),w=0,T=r({subscribe:`initial`,unsubscribe:`initial`,checkPromocodeStatus:`initial`,subscriptionStatus:`initial`,unsubscribeConfirmContent:`initial`,fetchSettings:`initial`,updateSettings:`initial`,restore:`initial`,tariffs:`initial`,getTariff:`initial`,changeTariff:`initial`}),E=r(null),D=e(S,null),O=r(D.value),k=r(null),A=r(null),j=r(null),M=r(null),N=r(null),P=r(null),F=r(null),I=r(null),L=r(null),R=r(null),z=()=>{w+=1,E.value=null,j.value=null,M.value=null,N.value=null,D.value=null,O.value=null,k.value=null,A.value=null,L.value=null,$(),R.value=null,T.value={subscribe:`initial`,unsubscribe:`initial`,checkPromocodeStatus:`initial`,subscriptionStatus:`initial`,unsubscribeConfirmContent:`initial`,fetchSettings:`initial`,updateSettings:`initial`,restore:`initial`,tariffs:`initial`,getTariff:`initial`,changeTariff:`initial`}};t([a,C],()=>z(),{flush:`sync`});let B=()=>{R.value=null,I.value=null},V=async()=>{let e=w;T.value.subscriptionStatus=`pending`;try{let t=await s({permissions:{jwt:!0}});if(e!==w)return;E.value=t,T.value.subscriptionStatus=`success`}catch{if(e!==w)return;T.value.subscriptionStatus=`error`}},H=async e=>{let t=w;T.value.checkPromocodeStatus=`pending`,A.value=null;try{let n=await c({subscriptionPromoCode:e},{permissions:{jwt:!0}});if(t!==w)return;k.value=n.reward??null,O.value=e,D.value=e,T.value.checkPromocodeStatus=`success`}catch(e){if(t!==w)return;k.value=null;let n=e,r=n&&typeof n==`object`&&`data`in n?n.data:null;A.value=r&&typeof r==`object`&&`message`in r?r.message:null,T.value.checkPromocodeStatus=`error`}},U=()=>{O.value=null,k.value=null,D.value=null},W=async(e,t,n)=>{let r=w;T.value.subscribe=`pending`,B();let a={paymentId:e,promocode:t};n&&(a.tariffId=n);let o=await i(`subscribe:${e}${t}`,()=>te(a,{permissions:{jwt:!0}}));r===w&&(R.value=o.error.value?.statusCode===403?_:b,T.value.subscribe=o.error.value?`error`:`success`)},G=async()=>{let e=w;T.value.restore=`pending`,B();try{let t=await f({permissions:{jwt:!0}});if(e!==w)return;E.value=t,T.value.restore=`success`}catch{if(e!==w)return;T.value.restore=`error`}},K=async()=>{let e=w;T.value.unsubscribe=`pending`,B();try{if(await u({permissions:{jwt:!0}}),e!==w)return;T.value.unsubscribe=`success`}catch(t){if(e!==w)return;R.value=t.statusCode===406?x:y,T.value.unsubscribe=`error`}},q=async(e,t)=>{let n=w;T.value.updateSettings=`pending`,B();try{let r={selectedPayRule:e};t&&(r.paymentMethodId=t);let i=await l(r,{permissions:{jwt:!0}});if(n!==w)return;E.value=i,T.value.updateSettings=`success`}catch{if(n!==w)return;R.value=v,T.value.updateSettings=`error`}},J=n(()=>[g.Subscribed,g.TrialPeriod,g.ScheduledForCancellation].includes(E.value?.currentStatus??g.NotSubscribed)),Y=n(()=>E.value?.currentStatus===g.TrialPeriod),X=async()=>{let e=w;T.value.unsubscribeConfirmContent=`pending`;try{let t=await d({permissions:{jwt:!0}});if(e!==w)return;L.value=t,T.value.unsubscribeConfirmContent=`success`}catch{if(e!==w)return;T.value.unsubscribeConfirmContent=`error`}},Z=async()=>{let e=w;T.value.fetchSettings=`pending`;try{let t=await m({permissions:{jwt:!0}});if(e!==w)return;j.value=t,T.value.fetchSettings=`success`}catch{if(e!==w)return;T.value.fetchSettings=`error`}},ne=async()=>{let e=w;T.value.tariffs=`pending`;try{let t=await p({permissions:{jwt:!0}});if(e!==w)return;M.value=t,T.value.tariffs=`success`}catch{if(e!==w)return;T.value.tariffs=`error`}},re=async(e,t)=>{let n=w;T.value.changeTariff=`pending`,B();try{let r=await h({tariffId:e,isForce:t},{permissions:{jwt:!0}});if(n!==w)return;$();let i=!!r.payload.currentPriceMonthly;!t&&i?P.value={...r.payload,tariffId:e}:F.value=r.payload,T.value.changeTariff=`success`}catch(r){if(n!==w)return;$(),I.value={code:r.data?.code??`Unknown`,tariffId:e,isForce:t},T.value.changeTariff=`error`}},Q=()=>{N.value=null},$=()=>{P.value=null,F.value=null,I.value=null};return{isTrialPeriod:Y,isSubscribed:J,subscriptionStatus:E,status:T,settings:j,error:R,fetchSub
1scriptionStatus:V,fetchUnsubscribeConfirmContent:X,checkSubscriptionPromocode:H,currentSubscriptionPromocode:O,currentPromocodeInfo:k,currentPromocodeError:A,unsubscribeConfirmContent:L,tariffs:M,tariff:N,changeTariffConfirmInfo:P,changeTariffConfirmResult:F,changeTariffErrorCode:I,$reset:z,subscribe:W,unsubscribe:K,clearPromocode:U,clearError:B,updateSettings:q,fetchSettings:Z,restore:G,fetchTariffs:ne,fetchTariff:async e=>{let t=w;Q(),T.value.getTariff=`pending`;try{let n=await ee(e,{permissions:{jwt:!0}});if(t!==w)return;N.value=n,T.value.getTariff=`success`}catch{if(t!==w)return;T.value.getTariff=`error`}},clearTariff:Q,changeTariff:re,clearChangeTariffInfo:$}});export{C 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.