PageSourceSearch

https://www.lsgeotar.ru/assets/useMedDRASearchBarProps-5trdonkS.js

js lsgeotar.ru collected 2026-10-02 06:57:06 UTC 2,165 bytes, 1 lines download raw bytes

1import{j as r}from"./jsx-runtime-B56eCBol.js";import{r as x}from"./loader-Cqyox1Tj.js";import{u as j,p as v}from"./OneTimeNotice-1xMXomMr.js";import{J as p,c as y,m as C,e as k}from"./index-CUz0Qfsh.js";import{D as A}from"./siteRoutes-BrWVF6Zw.js";import{L as N}from"./LinkButton-Dh9mcdT8.js";import{B as L}from"./Title-DHXIYq04.js";import{C as S}from"./CloseButton-vUbp6Vyo.js";const b=({levels:e,className:i,onChange:s,disallowLLT:o})=>{const[c,a]=x.useState(!1),d=r.jsxs("div",{className:"flex items-baseline justify-center gap-4 py-4 text-xs text-gray-600 xs:justify-end",children:[r.jsx("div",{children:"Искать в"}),p.filter(t=>e.includes(t)).join(", "),r.jsx(N,{onClick:()=>a(!0),size:"xs",children:"Изменить"})]}),m=r.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-4 py-6 xs:justify-start xs:gap-6 xs:py-8",children:[r.jsx("div",{className:"hidden xs:block",children:"Искать в:"}),r.jsx(L.Group,{className:"gap-2",children:p.filter(t=>t!=="LLT"||!o).map(t=>{const l=e.includes(t);return r.jsx(L,{size:"compact-sm",color:"deepBlue.4",variant:l?"filled":"outline",classNames:{label:"px-4"},onClick:()=>{const n=l?e.filter(u=>u!==t):[...e,t];n.length&&s(n)},children:t},t)})}),r.jsx(S,{className:"ml-auto",onClick:()=>a(!1)})]});return r.jsx("div",{className:y("border-gray-200 px-6 text-sm",i),children:c?m:d})};function z(e){const{userProfile:i,setUserProfile:s}=j(),{settings:{meddra:o}}=i,c=(e==null?void 0:e.userProfileKey)??"autoCompleteLevels",[a,d]=x.useState(()=>w({userLevels:o[c],...e})),m=l=>{d(l),s(v(i,n=>{n.settings.meddra[c]=l}))},t=x.useCallback((l,n,u)=>{if(n.length!==1||n[0]!=="meddra")throw"Unexpected category for MedDRA search: "+n[0];const g=a.map(f=>C[f].level.toString());return k.autocompleteMeddraGet(l,g,void 0,u).then(f=>f.data.items)},[a]);return{getSuggestionId:A,autoCompleteApi:t,autoCompleteApiDeps:a,allowSearchAll:!1,optionsHeader:r.jsx(b,{levels:a,onChange:m,disallowLLT:e==null?void 0:e.disallowLLT})}}const h=[...p].filter(e=>e!=="LLT");function w({userLevels:e=[],disallowLLT:i}){let s=e;return s.length||(s=h),i&&(s=s.filter(o=>o!=="LLT")),s.length||(s=h),s}export{z 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.