PageSourceSearch

https://xn--80aaaf3bi1ahsd.xn--80asehdb/_nuxt/DnVkiJZQ.js

js xn--80aaaf3bi1ahsd.xn--80asehdb collected 2026-10-01 16:39:51 UTC 3,727 bytes, 1 lines download raw bytes

1import{H as d,I as a,z as h}from"./Cpx8uuql.js";import{u as g}from"./DTc6zK_f.js";const m=d("login",{state:()=>({authorizeToken:!1,loginInfo:{}}),getters:{getAuthorizeToken:t=>t.authorizeToken,getLoginInfo:t=>t.loginInfo,getUnicUserRole:t=>{const{userName:n,token:e,services:o,organizations:r}=t.loginInfo,i=o?.length===1?o[0].id:null,s=r?.length===1?r[0].id:null;return i&&r.length<2?{userName:n,token:e,serviceId:i,organizationId:s}:null}},actions:{getToken(){h("time_token_die").value?this.authorizeToken=!0:this.authorizeToken=!1},async sendConfirmationCode(t){const{public:n}=a();return await $fetch(`${n.API_URL}/Auth/SendConfirmationCode`,{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},body:JSON.stringify({login:t})}).catch(e=>{throw e})},async confirmLogin(t){const{public:n}=a();return await $fetch(`${n.API_URL}/Auth/ConfirmLogin`,{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},body:JSON.stringify(t)}).then(e=>{const{userName:o,token:r,organizations:i,services:s}=e;return this.loginInfo.userName=o,this.loginInfo.token=r,this.loginInfo.organizations=i,this.loginInfo.services=s,e}).catch(e=>{throw e})},async login(t){const{public:n}=a(),{notify:e}=g();return await $fetch(`${n.API_URL}/Auth/Authenticate`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json;charset=UTF-8"},body:JSON.stringify(t),onResponseError({response:o}){o.status===500&&e({type:"error",title:"Непредвиденная ошибка"})}}).then(o=>{const{userName:r,token:i,organizations:s,services:c}=o;return this.loginInfo.userName=r,this.loginInfo.token=i,this.loginInfo.organizations=s,this.loginInfo.services=c,o}).catch(o=>{throw o})},async prepareBank(t){const{public:n}=a();return await $fetch(`${n.API_URL}/Oidc/prepare/${t}`,{retry:0,onResponse({response:e}){return h("rquid",{maxAge:1800}).value=e.headers.get("rquid"),window.location.replace(e._data.webAuthorizationUri)}}).catch(e=>{throw e})},async loginBank({state:t,code:n,rquid:e,bank:o}){const{public:r}=a();return await $fetch(`${r.API_URL}/Oidc/complete/${o}`,{query:{state:t,code:n},headers:{rquid:e}}).then(i=>{const{userName:s,token:c,organizations:u,services:l}=i;return this.loginInfo.userName=s,this.loginInfo.token=c,this.loginInfo.organizations=u,this.loginInfo.services=l,i}).catch(i=>{throw i})},async accountAuthorize(t){const{public:n}=a();return await $fetch(`${n.API_URL}/Auth/Authorize`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json;charset=UTF-8"},body:JSON.stringify(t)}).then(()=>{const e={tokenName:"",redirectUrl:"",dateExp:Math.floor(Date.now()/1e3)+2592e3};switch(t.serviceId){case 1:e.tokenName="time_token_die",e.redirectUrl=n.PERSONAL_URL;break;case 2:e.tokenName="time_token_die_adminOrg",e.redirectUrl=n.ORG_ADMIN_URL;break;case 3:e.tokenName="time_token_die_supplier",e.redirectUrl=n.SUPPLIER_ADMIN_URL;break}if(e.tokenName){const o=h(e.tokenName,{maxAge:2592e3,domain:n.COOKIE_URL});o.value=String(e.dateExp)}window.location.replace(e.redirectUrl)})},async registerUser(t){const{public:n}=a();return await $fetch(`${n.API_URL}/Auth/Register`,{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},body:JSON.stringify(t)}).catch(e=>{throw e})},async sendResetPasswordCode(t){const{public:n}=a();return await $fetch(`${n.API_URL}/Auth/sendResetPasswordCode`,{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},body:JSON.stringify(t)}).catch(e=>{throw e})},async resetPassword(t){const{public:n}=a();return await $fetch(`${n.API_URL}/Auth/ResetPassword`,{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8"},body:JSON.stringify(t)}).catch(e=>{throw e})}}});export{m as u};

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.