elcrm 0.6.6 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -6178,7 +6178,7 @@ const be = {};
|
|
|
6178
6178
|
function Jo(e) {
|
|
6179
6179
|
const [t, n] = g.useState({}), s = g.useRef(e);
|
|
6180
6180
|
return be.u = (r) => {
|
|
6181
|
-
s.current[r.name]
|
|
6181
|
+
s.current = { ...s.current, [r.name]: r.value };
|
|
6182
6182
|
}, be.r = () => {
|
|
6183
6183
|
n(Date.now());
|
|
6184
6184
|
}, s.current;
|
package/dist/index.umd.js
CHANGED
|
@@ -28,4 +28,4 @@ Check the top-level render call using <`+v+">.")}return p}}function qn(s,p){{if(
|
|
|
28
28
|
<%s {...props} />
|
|
29
29
|
React keys must be passed directly to JSX without using spread:
|
|
30
30
|
let props = %s;
|
|
31
|
-
<%s key={someKey} {...props} />`,Bt,ke,ss,ke),Xn[ke+Bt]=!0}}return s===i?ns(V):ts(V),V}}function as(s,p,v){return Qn(s,p,v,!0)}function is(s,p,v){return Qn(s,p,v,!1)}var rs=is,os=as;Fe.Fragment=i,Fe.jsx=rs,Fe.jsxs=os}()),Fe}process.env.NODE_ENV==="production"?lt.exports=Ka():lt.exports=Wa();var a=lt.exports;const Va={notice:"_notice_820sc_2",error:"_error_820sc_9",success:"_success_820sc_12",remark:"_remark_820sc_15",copy:"_copy_820sc_18","show-notice":"_show-notice_820sc_1","hide-notice":"_hide-notice_820sc_1"};let fe={};function Ua(){let[e,t]=m.useState([]);return fe.set=n=>{t([...e,n])},fe.del=n=>{t(e.filter(i=>i.key!==n))},e.length===0?"":a.jsx("ul",{className:Va.notice,children:e.map(n=>n.item)})}function $e({data:e}){let[t,n]=m.useState("show");m.useEffect(()=>{setTimeout(function(){n("hide")},1800),setTimeout(function(){fe.del(e.key)},2500)},[e.key]);let i,r;switch(e.type){case"error":i=a.jsx(he.error,{}),r="Ошибка:";break;case"success":i=a.jsx(he.success,{}),r="Информация:";break;case"copy":i=a.jsx(he.success,{}),r="Копирование:";break;case"remark":i=a.jsx(he.success,{}),r="Подсказка:";break;default:i=a.jsx(he.success,{}),r="Предупреждение:";break}return a.jsxs("li",{className:"item "+e.type,"data-status":t,children:[i,a.jsx("b",{children:r}),a.jsx("p",{children:e.text})]})}function Ya(e){let t=Date.now(),n={key:t,...e};fe.set({item:a.jsx($e,{data:n},t),key:t})}function Ha(e){let t=Date.now(),n={key:t,text:e,type:"error"};fe.set({item:a.jsx($e,{data:n},t),key:t})}function qa(e){let t=Date.now(),n={key:t,text:e,type:"success"};fe.set({item:a.jsx($e,{data:n},t),key:t})}function Ja(e){let t=Date.now(),n={key:t,text:e,type:"remark"};fe.set({item:a.jsx($e,{data:n},t),key:t})}function Xa(e){let t=Date.now(),n={key:t,text:e,type:"copy"};fe.set({item:a.jsx($e,{data:n},t),key:t})}const he={};he.error=()=>a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[a.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#bb2014"}),a.jsx("path",{d:"M8.96967 8.96967C9.26256 8.67678 9.73744 8.67678 10.0303 8.96967L12 10.9394L13.9697 8.96969C14.2626 8.6768 14.7374 8.6768 15.0303 8.96969C15.3232 9.26258 15.3232 9.73746 15.0303 10.0303L13.0607 12L15.0303 13.9697C15.3232 14.2625 15.3232 14.7374 15.0303 15.0303C14.7374 15.3232 14.2625 15.3232 13.9696 15.0303L12 13.0607L10.0304 15.0303C9.73746 15.3232 9.26258 15.3232 8.96969 15.0303C8.6768 14.7374 8.6768 14.2626 8.96969 13.9697L10.9394 12L8.96967 10.0303C8.67678 9.73744 8.67678 9.26256 8.96967 8.96967Z",fill:"#fff"})]}),he.success=()=>a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[a.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#367738"}),a.jsx("path",{d:"M16.0303 8.96967C16.3232 9.26256 16.3232 9.73744 16.0303 10.0303L11.0303 15.0303C10.7374 15.3232 10.2626 15.3232 9.96967 15.0303L7.96967 13.0303C7.67678 12.7374 7.67678 12.2626 7.96967 11.9697C8.26256 11.6768 8.73744 11.6768 9.03033 11.9697L10.5 13.4393L14.9697 8.96967C15.2626 8.67678 15.7374 8.67678 16.0303 8.96967Z",fill:"#fff"})]});const en={alerts:"_alerts_1pds5_1",menuAnimation:"_menuAnimation_1pds5_1",menuItemAnimation:"_menuItemAnimation_1pds5_1","--body":"_--body_1pds5_103",allert:"_allert_1pds5_111","--form":"_--form_1pds5_111",al:"_al_1pds5_1"};let Le={};function Qa(){let[e,t]=m.useState("");return Le.set=n=>t(n),Le.del=()=>t(""),a.jsx(a.Fragment,{children:e})}const ei=({data:e,callback:t})=>(e.button=e.button===void 0?"Подтвердить":e.button,a.jsxs("div",{className:en.alerts,children:[a.jsxs("dl",{children:[a.jsx("dt",{children:e.title}),a.jsx("dd",{children:e.text}),a.jsx("ul",{children:a.jsx("button",{"data-color":e.color||"blue",onClick:()=>{t(),Le.del()},children:e.button})})]}),a.jsx("div",{className:"--body",onClick:Le.del})]}));function ti(e,t){Le.set(a.jsx(ei,{data:e,callback:t}))}const we={Send:Ya,Error:Ha,Remark:Ja,Success:qa,Copy:Xa},Be={Path:va,setPage:ca,getPage:zt,usePage:da,setModule:ua,getModule:Ot,useModule:_a,setTabs:ma,getTabs:Ke,useTabs:fa,useId:pa,setId:ha,subId:xa,getId:ga};function ni(){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[a.jsx("path",{d:"M5.15837 11.491C5.08489 12.887 5.16936 14.373 3.92213 15.3084C3.34164 15.7438 3 16.427 3 17.1527C3 18.1508 3.7818 19 4.8 19H19.2C20.2182 19 21 18.1508 21 17.1527C21 16.427 20.6584 15.7438 20.0779 15.3084C18.8306 14.373 18.9151 12.887 18.8416 11.491C18.6501 7.85223 15.6438 5 12 5C8.35617 5 5.34988 7.85222 5.15837 11.491Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),a.jsx("path",{d:"M10.5 3.125C10.5 3.95343 11.1716 5 12 5C12.8284 5 13.5 3.95343 13.5 3.125C13.5 2.29657 12.8284 2 12 2C11.1716 2 10.5 2.29657 10.5 3.125Z",stroke:"currentColor",strokeWidth:"1",fill:"none"}),a.jsx("path",{d:"M15 19C15 20.6569 13.6569 22 12 22C10.3431 22 9 20.6569 9 19",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}function ai(){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[a.jsx("path",{d:"M4.4094 11.4516C4.62188 7.41446 7.95728 4.25 12 4.25C16.0427 4.25 19.3781 7.41446 19.5906 11.4516C19.5997 11.6241 19.6064 11.7893 19.6129 11.9485C19.6351 12.49 19.6544 12.9615 19.7525 13.4133C19.8698 13.9531 20.0867 14.3775 20.5279 14.7084C21.2972 15.2854 21.75 16.191 21.75 17.1527C21.75 18.534 20.6628 19.75 19.2 19.75H4.8C3.33719 19.75 2.25 18.534 2.25 17.1527C2.25 16.191 2.70278 15.2854 3.47213 14.7084C3.91329 14.3775 4.13025 13.9531 4.24749 13.4133C4.34561 12.9615 4.3649 12.49 4.38705 11.9485V11.9485L4.38705 11.9485C4.39356 11.7893 4.40032 11.6241 4.4094 11.4516Z",fill:"#141B34"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5286 1.37434C10.9737 1.08296 11.517 1 12 1C12.483 1 13.0263 1.08296 13.4714 1.37434C13.9652 1.69759 14.25 2.22083 14.25 2.875C14.25 3.47116 14.017 4.09375 13.6626 4.57057C13.3138 5.03989 12.7415 5.5 12 5.5C11.2585 5.5 10.6862 5.03989 10.3374 4.57057C9.98299 4.09375 9.75 3.47116 9.75 2.875C9.75 2.22083 10.0348 1.69759 10.5286 1.37434Z",fill:"#141B34"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C9.55228 18 10 18.4477 10 19C10 20.1046 10.8954 21 12 21C13.1046 21 14 20.1046 14 19C14 18.4477 14.4477 18 15 18C15.5523 18 16 18.4477 16 19C16 21.2091 14.2091 23 12 23C9.79086 23 8 21.2091 8 19C8 18.4477 8.44772 18 9 18Z",fill:"#141B34"})]})}function ii(){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M8.85746 12.5061C6.36901 10.6456 4.59564 8.59915 3.62734 7.44867C3.3276 7.09253 3.22938 6.8319 3.17033 6.3728C2.96811 4.8008 2.86701 4.0148 3.32795 3.5074C3.7889 3 4.60404 3 6.23433 3H17.7657C19.396 3 20.2111 3 20.672 3.5074C21.133 4.0148 21.0319 4.8008 20.8297 6.37281C20.7706 6.83191 20.6724 7.09254 20.3726 7.44867C19.403 8.60062 17.6261 10.6507 15.1326 12.5135C14.907 12.6821 14.7583 12.9567 14.7307 13.2614C14.4837 15.992 14.2559 17.4876 14.1141 18.2442C13.8853 19.4657 12.1532 20.2006 11.226 20.8563C10.6741 21.2466 10.0043 20.782 9.93278 20.1778C9.79643 19.0261 9.53961 16.6864 9.25927 13.2614C9.23409 12.9539 9.08486 12.6761 8.85746 12.5061Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})}const ri={n:"_n_euuvm_1"};let Pe={},Re=[];const oi=(e,t)=>{switch(t.type){case"open":return{...e,open:t.open};case"view":return{...e,view:e.view===t.view?null:t.view};case"add":return{...e,news:[...e.news,t.data],active:!0};case"news":return{...e,news:t.data,active:t.data.length!==0};case"hide":let n=e.news.filter(r=>r.id!==t.id);return{...e,news:n,active:n.length!==0};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let r in i)i[r]!=="999"&&(e.active=!0);return Pe.get(i,e.active),{...e,take:i,active:e.active};case"exit":return e;default:throw new Error}};function si(e){Pe.fn({action:"add",data:e})}function li(e){Pe.fn({action:"add",data:e})}function di(e){Pe.fn({action:"new",data:e})}function ci(e){Pe.fn=e}function _i(){const[e,t]=m.useReducer(oi,{open:!1,active:!1,news:[],take:{}});le.useListener("bell",async i=>{console.log(i)}),ci(async i=>{switch(console.log(i),i.action){case"add":Re.push(i.data);break}}),m.useEffect(()=>{(async()=>{let i=await le.Send({type:"module",module:"M00",query:"x0054",array:["M01","M02"]});console.log(i);for(let r in i)switch(r){case"news":t({type:"news",data:i.news});break;case"M01":i[r].forEach(o=>{Re.push({module:"M01",type:1,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break;case"M02":i[r].forEach(o=>{Re.push({module:"M02",type:117,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break}})(),setInterval(()=>{Re.forEach((i,r)=>{t({type:"add",data:{module:i.module,type:i.type,id:i.id,datetime:i.datetime,txt:i.title}}),i.datetime<new Date().getTime()&&Re.splice(r,1)})},6e4)},[]);let n=async i=>{t({type:"hide",id:i.id})};return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ri.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?a.jsx(ai,{}):a.jsx(ni,{})}),e.open?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),a.jsxs("div",{className:"notify-m",children:[a.jsx("div",{className:"notify-l",children:e.news.map((i,r)=>a.jsx(ui,{data:i,dispatch:t},r))}),a.jsx("div",{className:"notify-b",onClick:n,children:"История"})]})]}):""]})}const ui=({data:e,dispatch:t})=>{let n=async i=>{console.log(i),t({type:"hide",id:i.id});let r=await le.Send({type:"module",module:"M00",query:"x0055",data:{id:i.id,type:i.type,db:i.db}});console.log(r)};return a.jsxs("div",{className:"notify-i",children:[a.jsx("div",{className:"--icon","data-icon":e.type}),a.jsxs("div",{className:"--body",children:[a.jsx("div",{className:"--name",children:e.type}),a.jsx("div",{className:"--text",children:e.txt})]}),a.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>n(e),children:" "})]})},fi="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2xldCBhPVtdLHM9bnVsbDtvbmNvbm5lY3Q9ZnVuY3Rpb24obCl7dmFyIHQ9bC5zb3VyY2U7YS5wdXNoKHQpO2NvbnN0IG49ZT0+e3MhPT1udWxsJiZzLnJlYWR5U3RhdGU9PT0xP3Muc2VuZChKU09OLnN0cmluZ2lmeShlKSk6dC5wb3N0TWVzc2FnZSh7dHlwZToibm9TZW5kIn0pfTtsZXQgcj1lPT57aWYocyE9PW51bGwmJnMucmVhZHlTdGF0ZT09PTEpcmV0dXJuIHQucG9zdE1lc3NhZ2Uoe3R5cGU6InRydWUifSk7ZS5say5hZGRyZXNzPT09ImxvY2FsaG9zdCI/cz1uZXcgV2ViU29ja2V0KGB3czovL2xvY2FsaG9zdDoke2UubGsuc29ja2V0KzF9YCk6cz1uZXcgV2ViU29ja2V0KCJ3c3M6Ly8iK2UubGsuYWRkcmVzcysiOiIrKGUubGsuc29ja2V0KzEpKSxzLm9uZXJyb3I9KCk9PnQucG9zdE1lc3NhZ2Uoe3R5cGU6ImVycm9yIn0pLHMub25vcGVuPSgpPT57bih7dHlwZToiY29ubmVjdCIsdWtleTplLnVrZXl9KX0scy5vbm1lc3NhZ2U9bz0+e2xldCBjPUpTT04ucGFyc2Uoby5kYXRhKTthLmZvckVhY2goZD0+e2QucG9zdE1lc3NhZ2UoYyl9KX0scy5vbmNsb3NlPSgpPT50LnBvc3RNZXNzYWdlKHt0eXBlOiJjbG9zZWQifSl9O3Qub25tZXNzYWdlPWZ1bmN0aW9uKGUpe3N3aXRjaChlLmRhdGEudHlwZSl7Y2FzZSJsZW5ndGgiOnJldHVybiB0LnBvc3RNZXNzYWdlKGEubGVuZ3RoKTtjYXNlImFsbCI6cmV0dXJuIGEuZm9yRWFjaChvPT5vLnBvc3RNZXNzYWdlKHthbGw6YS5sZW5ndGh9KSk7Y2FzZSJzZW5kIjpyZXR1cm4gbihlLmRhdGEuanNvbik7Y2FzZSJjb25uZWN0IjpyZXR1cm4gcihlLmRhdGEpO2RlZmF1bHQ6dC5wb3N0TWVzc2FnZSh7dHlwZToiZGVmYXVsdCIsZGF0YTplLmRhdGEuanNvbn0pfX19fSkoKTsK";function mi(e){return new SharedWorker("data:text/javascript;base64,"+fi,{name:e==null?void 0:e.name})}function pi(e){let t={},n={};e.data.forEach(r=>{t[r.id]={s:r.v,n:r.a},n[r.id]=r});let i={...De(),901:t};Gt(n),Ie(i)}function xi(){let e=Kt(),t={};return Object.keys(e).forEach(n=>{t[e[n].id]={},t[e[n].id].name=e[n].a}),t}let re={},U={},Ve=["filter","online","users","company","select","setting","info","job"];function hi(){const[e,t]=m.useState(!1),[n,i]=m.useState(!1);function r(o){const d=new mi;re.laodData=l=>{let _=Ve.indexOf(l);_>=0&&Ve.splice(_,1),Ve.length===0&&t(!0)},re.send=l=>{d.port.postMessage({type:"send",json:l})},d.port.onmessage=l=>{let _=l.data;_.type==="error"&&i(!0),_.type==="true"&&t(!0),_.type==="closed"&&d.port.postMessage({type:"connect",ukey:o,lk:it()}),Ve.length!==0&&re.laodData(_.type),U[_.type]&&U[_.type](_)},d.port.postMessage({type:"connect",ukey:o,lk:it()})}return[r,e,n]}U.module=e=>{re[e.listen]!==void 0&&(re[e.listen](e),delete re[e.listen])},U.bell=di,U.company=pi,U.info=e=>{let t={};t.db=e.db,t.id=e.data.id,t.job=e.data.job,t.login=e.data.login,t.name=e.data.p02,t.patronymic=e.data.p03,t.surname=e.data.p01,t.email=e.data.email,t.admin=e.data.menu.includes("99"),Wt(t),At(e.data.menu)},U.version=async e=>{We.version.Server(e.data)},U.online=async e=>{},U.offline=async e=>{},U.chat=e=>{switch(console.log(e.data.action),e.data.action){case"new_message":Be.getModule();break;case"view_message":Be.getModule();break;case"write_message":Be.getModule();break}console.log(e)},U.users=e=>{console.log("users",e);let t={};e.data.forEach(i=>{let r=i.p01+" "+i.p02+" "+i.p03,o=i.p01+" "+i.p02.substring(0,1)+"."+i.p03.substring(0,1)+".",d=i.p01.substring(0,1)+""+i.p02.substring(0,1)+i.p03.substring(0,1);t[i.id]={id:i.id,admin:i.m.includes("99"),ava:JSON.parse(i.a),job:i.j,login:"",online:{time:i.o,status:0},sts:i.s,nameFull:r,name:o,number:d}});let n={...De(),user:t};Ie(n)},U.api=e=>{let t={};e.data.forEach(n=>{t[n.api]={key:n.key,p01:n.p01,p02:n.p02}})},U.delete=()=>{te()},U.select=e=>{let t={...De()};e.data.forEach(n=>{t[n.n]=JSON.parse(n.s)}),Ie(t)},U.job=e=>{let t={...De()},n={};Object.keys(e.data).forEach(i=>{n[i]={s:1,n:e.data[i]}}),t[1]=n,Ie(t)},U.setting=e=>{ba(e.data)},U.app=()=>{};const gi=(e,t)=>{re[e]=t},vi=(e,t)=>{re[e](t)};function bi(e){let t="_"+String(Math.random()).substring(2,7);return new Promise(n=>{re[t]=i=>{i.error!==void 0?n({error:i.error}):n(i.data),delete re[t]},e={...e,listen:t},e.type="modules",re.send(e)})}const le={useConnect:hi,useListener:gi,setListener:vi,Send:bi};function ki(e,t){t===void 0?(t=e,e=new Date):e=new Date(e);let n={yyyy:e.getFullYear(),yy:(""+e.getFullYear()).slice(-2),mm:("0"+(e.getMonth()+1)).slice(-2),dd:("0"+e.getDate()).slice(-2),HH:("0"+e.getHours()).slice(-2),MM:("0"+e.getMinutes()).slice(-2),SS:("0"+e.getSeconds()).slice(-2),__:" ",_:" "};for(const i in n)t=t.replace(i,n[i]);return t}function yi(e){let t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],n=new Date(e);return{day:(""+n.getFullYear()).slice(-2)+""+("0"+(n.getMonth()+1)).slice(-2)+("0"+n.getDate()).slice(-2),name:n.getDate()+" "+t[n.getMonth()]}}const wi=e=>{function t(I,M){var w,z,L;I=I??"",M=M??1;for(var w=[],L=0,z=I.length;L<z;)w.push(I.slice(L,L+=M));return w}function n(I,M){var w=[2,0,1,1,1,2];return M[I>4&&I<20?2:w[Math.min(I,5)]]}var i={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},r,o,d,l,S,_,c,k,u,f,x,h;u=parseFloat(e).toFixed(2).split("."),_=u[0],l=u[1];var g=12-_.length;if(g<0)return!1;for(var k=[];g--;)k.push("0");_=k.join("")+_;var S=[];if(_>0){f=t(_,3);for(var y=-1;y<f.length;y++)if(c=f[y],c>0&&(x=t(c,1),r=parseInt(x[0]),o=parseInt(x[1]),d=parseInt(x[2]),S.push(i.a100[r-1]),h=y+1==3?"a2":"a1",o>1?S.push(i.a20[o-2]+(d>0?" "+i[h][d-1]:"")):S.push(o>0?i.a10[d]:i[h][d-1]),f.length>y+1)){var C=i["u"+(y+1)];S.push(n(c,C))}}else S.push(i.null);return S.push(n(_,i.ur)),S.push(l+" "+n(l,i.uc)),S.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function Ci(e){let t=-1,n=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do e=e/1024,t++;while(e>1024);return Math.max(e,.1).toFixed(1)+n[t]}function ji(e){let t={};return t["application/atom+xml"]="atom",t["application/json"]="json",t["application/javascript"]="js",t["application/ogg"]="ogg",t["application/pdf"]="pdf",t["application/soap+xml"]="soap",t["application/font-woff"]="woff",t["application/xhtml+xml"]="xml",t["application/xml-dtd"]="dtd",t["application/xop+xml"]="xop",t["application/zip"]="zip",t["application/gzip"]="gzip",t["application/x-bittorrent"]="bittorrent",t["application/x-tex"]="tex",t["application/xml"]="xml",t["application/msword"]="doc",t["image/svg+xml"]="svg",t[e]}function Si(e,t,n,i){let r={sexM:"m",sexF:"f",gcaseIm:"nominative",gcaseNom:"nominative",gcaseRod:"genitive",gcaseGen:"genitive",gcaseDat:"dative",gcaseVin:"accusative",gcaseAcc:"accusative",gcaseTvor:"instrumentative",gcaseIns:"instrumentative",gcasePred:"prepositional",gcasePos:"prepositional",rules:{lastName:{exceptions:[" дюма,тома,дега,люка,ферма,гамарра,петипа,шандра . . . . ."," гусь,ремень,камень,онук,богода,нечипас,долгопалец,маненок,рева,кива . . . . ."," вий,сой,цой,хой -я -ю -я -ем -е"],suffixes:["f б,в,г,д,ж,з,й,к,л,м,н,п,р,с,т,ф,х,ц,ч,ш,щ,ъ,ь . . . . .","f ска,цка -ой -ой -ую -ой -ой","f ая --ой --ой --ую --ой --ой"," ская --ой --ой --ую --ой --ой","f на -ой -ой -у -ой -ой"," иной -я -ю -я -ем -е"," уй -я -ю -я -ем -е"," ца -a -е -у -ей -е"," рих а у а ом е"," ия . . . . ."," иа,аа,оа,уа,ыа,еа,юа,эа . . . . ."," их,ых . . . . ."," о,е,э,и,ы,у,ю . . . . ."," ова,ева -ой -ой -у -ой -ой"," га,ка,ха,ча,ща,жа -и -е -у -ой -е"," ца -и -е -у -ей -е"," а -ы -е -у -ой -е"," ь -я -ю -я -ем -е"," ия -и -и -ю -ей -и"," я -и -е -ю -ей -е"," ей -я -ю -я -ем -е"," ян,ан,йн а у а ом е"," ынец,обец --ца --цу --ца --цем --це"," онец,овец --ца --цу --ца --цом --це"," ц,ч,ш,щ а у а ем е"," ай -я -ю -я -ем -е"," гой,кой -го -му -го --им -м"," ой -го -му -го --ым -м"," ах,ив а у а ом е"," ший,щий,жий,ний --его --ему --его -м --ем"," кий,ый --ого --ому --ого -м --ом"," ий -я -ю -я -ем -и"," ок --ка --ку --ка --ком --ке"," ец --ца --цу --ца --цом --це"," в,н а у а ым е"," б,г,д,ж,з,к,л,м,п,р,с,т,ф,х а у а ом е"]},firstName:{exceptions:[" лев --ьва --ьву --ьва --ьвом --ьве"," павел --ла --лу --ла --лом --ле","m шота . . . . .","m пётр ---етра ---етру ---етра ---етром ---етре","f рашель,нинель,николь,габриэль,даниэль . . . . ."],suffixes:[" е,ё,и,о,у,ы,э,ю . . . . .","f б,в,г,д,ж,з,й,к,л,м,н,п,р,с,т,ф,х,ц,ч,ш,щ,ъ . . . . .","f ь -и -и . ю -и","m ь -я -ю -я -ем -е"," га,ка,ха,ча,ща,жа -и -е -у -ой -е"," ша -и -е -у -ей -е"," а -ы -е -у -ой -е"," ия -и -и -ю -ей -и"," я -и -е -ю -ей -е"," ей -я -ю -я -ем -е"," ий -я -ю -я -ем -и"," й -я -ю -я -ем -е"," б,в,г,д,ж,з,к,л,м,н,п,р,с,т,ф,х,ц,ч а у а ом е"]},middleName:{suffixes:[" ич а у а ем е"," на -ы -е -у -ой -е"]}},initialized:!1,init:function(){this.initialized||(this.prepareRules(),this.initialized=!0)},prepareRules:function(){for(var d in this.rules)for(var l in this.rules[d])for(var _=0,c=this.rules[d][l].length;_<c;_++)this.rules[d][l][_]=this.rule(this.rules[d][l][_])},rule:function(d){var l=d.match(/^\s*([fm]?)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/);return l?{sex:l[1],test:l[2].split(","),mods:[l[3],l[4],l[5],l[6],l[7]]}:!1},word:function(d,l,_,c){if(c===this.gcaseNom)return d;if(d.match(/[-]/)){for(var u=d.split("-"),f=0,x=u.length;f<x;f++)u[f]=this.word(u[f],l,_,c);return u.join("-")}if(d.match(/^[А-ЯЁ]\.?$/i))return d;this.init();var h=this.rules[_];let g;return h.exceptions&&(g=this.pick(d,l,c,h.exceptions,!0),g)?g:(g=this.pick(d,l,c,h.suffixes,!1),g||d)},pick:function(d,l,_,c,u){let f=d.toLowerCase();for(var x=0,h=c.length;x<h;x++)if(this.ruleMatch(f,l,c[x],u))return this.applyMod(d,_,c[x]);return!1},ruleMatch:function(d,l,_,c){if(_.sex===this.sexM&&l===this.sexF||_.sex===this.sexF&&l!==this.sexF)return!1;for(var u=0,f=_.test.length;u<f;u++){var x=c?d:d.substr(Math.max(d.length-_.test[u].length,0));if(x===_.test[u])return!0}return!1},applyMod:function(d,l,_){let c;switch(l){case this.gcaseNom:c=".";break;case this.gcaseGen:c=_.mods[0];break;case this.gcaseDat:c=_.mods[1];break;case this.gcaseAcc:c=_.mods[2];break;case this.gcaseIns:c=_.mods[3];break;case this.gcasePos:c=_.mods[4];break}for(var u=0,f=c.length;u<f;u++){var x=c.substr(u,1);switch(x){case".":break;case"-":d=d.substr(0,d.length-1);break;default:d+=x}}return d},getSex:()=>{if(r.mn.length>2)switch(r.mn.substr(r.mn.length-2)){case"ич":return"m";case"на":return"f"}return""},fullName:d=>((r.fullNameSurnameLast?"":r.lastName(d)+" ")+r.firstName(d)+" "+r.middleName(d)+(r.fullNameSurnameLast?" "+r.lastName(d):"")).replace(/^ +| +$/g,""),lastName:d=>r.word(r.ln,r.sex,"lastName",d),firstName:d=>r.word(r.fn,r.sex,"firstName",d),middleName:d=>r.word(r.mn,r.sex,"middleName",d)};if(typeof t>"u"){var o=e.match(/^\s*(\S+)(\s+(\S+)(\s+(\S+))?)?\s*$/);if(!o)return"Cannot parse supplied name";o[5]&&o[3].match(/(ич|на)$/)&&!o[5].match(/(ич|на)$/)?(e=o[5],t=o[1],n=o[3],r.fullNameSurnameLast=!0):(e=o[1],t=o[3],n=o[5])}return r.ln=e,r.fn=t||"",r.mn=n||"",r.sex=i||r.getSex(),r}function Ei(e){let t=e.split(" ");switch(t.length){case 2:return t[0]+" "+t[1].substring(0,1)+".";case 3:return t[0]+" "+t[1].substring(0,1)+"."+t[2].substring(0,1)+".";default:return e}}function Ni(e){return{1:{val:"01",name:"Январь",names:"Января",abc:"Янв"},2:{val:"02",name:"Февраль",names:"Февраля",abc:"Февр"},3:{val:"03",name:"Март",names:"Марта",abc:"Март"},4:{val:"04",name:"Апрель",names:"Апреля",abc:"Апр"},5:{val:"05",name:"Май",names:"Мая",abc:"Май"},6:{val:"06",name:"Июнь",names:"Июня",abc:"Июнь"},7:{val:"07",name:"Июль",names:"Июля",abc:"Июль"},8:{val:"08",name:"Август",names:"Августа",abc:"Авг"},9:{val:"09",name:"Сентябрь",names:"Сентебря",abc:"Сент"},10:{val:"10",name:"Октябрь",names:"Октября",abc:"Окт"},11:{val:"11",name:"Ноябрь",names:"Ноября",abc:"Нояб"},12:{val:"12",name:"Декабрь",names:"Декабря",abc:"Дек"}}[e]}function Ti(e){return parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function Ii(e,t){let n=t+"";for(;n.length<e;)n="0"+n;return n}function Di(e,t,n){let i=t/e*n;return(typeof i!="number"||i===1/0)&&(i=0),parseFloat(i).toFixed(1)}function Mi(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Fi(e,t){e=Math.abs(e)%100;let n=e%10;return e>10&&e<20?t[2]:n>1&&n<5?t[1]:n===1?t[0]:t[2]}const A={Date:ki,MoneyString:wi,DateSort:yi,Size:Ci,TypeFiles:ji,Cases:Si,Initials:Ei,Month:Ni,Money:Ti,Number:Ii,Percent:Di,CapitalizeFirstLetter:Mi,DeclensionWord:Fi};function $i({children:e}){return a.jsx("div",{className:"l",children:a.jsx("ul",{children:e})})}const oe={white:"_white_11p39_14",black:"_black_11p39_26",shake:"_shake_11p39_1",modal:"_modal_11p39_73",o:"_o_11p39_83",w:"_w_11p39_14",h:"_h_11p39_107",l:"_l_11p39_121",t:"_t_11p39_159",m:"_m_11p39_73",x:"_x_11p39_167",s:"_s_11p39_177",c:"_c_11p39_182",f:"_f_11p39_187",btn:"_btn_11p39_230",g:"_g_11p39_243","size-a":"_size-a_11p39_296","size-s":"_size-s_11p39_300","size-m":"_size-m_11p39_304","size-l":"_size-l_11p39_308","size-x":"_size-x_11p39_312","size-f":"_size-f_11p39_316",confirm:"_confirm_11p39_322",cancel:"_cancel_11p39_327",disabled:"_disabled_11p39_332",await:"_await_11p39_339",active:"_active_11p39_389",coincidence:"_coincidence_11p39_395",sa:"_sa_11p39_431",ss:"_ss_11p39_435",sm:"_sm_11p39_439",sl:"_sl_11p39_443",sx:"_sx_11p39_447",sf:"_sf_11p39_451"};function Li({children:e}){return a.jsx("div",{className:oe.s,children:e})}function Bi({children:e,className:t}){let n={};return t&&(n.className=t),a.jsx("div",{"data-form":"outline",...n,children:a.jsx("ul",{children:e})})}function Pi({children:e}){return a.jsx("div",{className:oe.c,children:e})}const tn={btn:"_btn_1hz2s_6",confirm:"_confirm_1hz2s_19"};function nn({onClick:e,onSend:t,label:n,onRef:i}){let[r,o]=m.useState(!1);const d=()=>{if(e)return e();r||(o(!0),t&&t(o))};return a.jsx("button",{ref:i,className:[tn.btn,tn.confirm].join(" "),onClick:d,children:r?"Ожидайте":n})}let Ce={};function Ri({config:e}){let[t,n]=m.useState([]);return Ce.x=()=>{n([])},Ce.config=e,Ce.add=i=>{n([...t,i])},a.jsx(a.Fragment,{children:t.map(i=>i)})}function zi({title:e,children:t,button:n,tabs:i,size:r="m",menu:o}){const[d,l]=m.useState(!0),_=m.useRef(),c=f=>{if(n){if(n.onClick)return f(!1),n.onClick({setOpen:l});if(n.onSend)return n.onSend({setOpen:l,disabled:f})}},u=()=>{_.current.setAttribute("shake",!0),setTimeout(()=>{_.current.setAttribute("shake",!1)},1e3)};return a.jsx(a.Fragment,{children:d?a.jsxs("div",{className:`${oe.modal} ${oe.white}`,children:[a.jsx("div",{className:oe.o,onClick:u}),a.jsxs("div",{className:[oe.w,oe[`s${r}`]].join(" "),ref:_,children:[a.jsxs("div",{className:oe.h,children:[a.jsx("div",{className:oe.t,children:e}),a.jsxs("div",{className:oe.m,children:[i&&a.jsx("nav",{children:i.map((f,x)=>a.jsx("span",{onClick:f.onClick,className:f.active?"active":"",children:f.name},x))}),o]}),a.jsx("div",{className:oe.x,onClick:()=>{l(!1)},children:a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M19.0005 4.99988L5.00045 18.9999M5.00045 4.99988L19.0005 18.9999",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t,n!==void 0?a.jsx(nn,{label:n.label,onSend:c}):""]})]}):""})}function Oi(e){Ce.add(a.jsx(Ai,{children:e},String(Date.now())))}function Ai({children:e}){return a.jsx(a.Fragment,{children:e})}function Zi(e){if(e.target.classList[0]!=="modal")return;let t=e.target.children[0];t.setAttribute("shake",!0),setTimeout(()=>{t.setAttribute("shake",!1)},1e3)}function Gi({type:e,name:t,params:n}){let[i,r]=m.useState(null);return m.useEffect(()=>{Ce.config(e,t,n,r)},[n.id]),a.jsx(a.Fragment,{children:i})}function Ki(e,t,n){Ce.config(e,t,n)}const Ue={List:$i,Scroll:Li,Main:zi,Add:Oi,Icon:Gi,Open:Ki,Shake:Zi,Form:Bi,Center:Pi};function an({text:e,type:t,button:n}){let[i,r]=m.useState(!1),o={active:t};const d=()=>{if(n){if(n.onClick)return n.onClick({});if(n.onSend)return i?void 0:(r(!0),n.onSend(r))}};return a.jsxs("div",{className:en.al,...o,children:[a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",clipRule:"evenodd",children:a.jsx("path",{fill:"#fff",d:"M10.362 2.015C11.4264 1.66167 12.5736 1.66167 13.638 2.015C14.6981 2.36687 15.5304 3.20141 16.3665 4.37395C17.1999 5.5426 18.1208 7.17206 19.3078 9.2725L19.3544 9.35496C20.5417 11.4557 21.4625 13.0851 22.0364 14.4065C22.613 15.7343 22.9002 16.8807 22.6711 17.9821C22.4403 19.0911 21.8714 20.0995 21.0428 20.8617C20.2162 21.622 19.0907 21.9428 17.6736 22.0968C16.2645 22.25 14.4212 22.25 12.0488 22.25H11.9513C9.57882 22.25 7.73554 22.25 6.32642 22.0968C4.90927 21.9428 3.78379 21.622 2.95722 20.8617C2.12862 20.0995 1.55968 19.0911 1.32895 17.9821C1.0998 16.8807 1.387 15.7343 1.96365 14.4065C2.53752 13.0851 3.45835 11.4557 4.64558 9.35495L4.69218 9.2725L4.69218 9.27249C5.87921 7.17206 6.80008 5.5426 7.63347 4.37395C8.46963 3.20141 9.30194 2.36687 10.362 2.015ZM11 17C11 16.4477 11.4457 16 11.9955 16H12.0045C12.5543 16 13 16.4477 13 17C13 17.5523 12.5543 18 12.0045 18H11.9955C11.4457 18 11 17.5523 11 17ZM11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V9C13 8.44772 12.5523 8 12 8C11.4477 8 11 8.44772 11 9V13Z"})}),a.jsx("span",{children:e}),n&&a.jsx("button",{onClick:d,children:n.label})]})}const J={h:"_h_1usnu_1",g:"_g_1usnu_11",hr:"_hr_1usnu_16",hl:"_hl_1usnu_28",t:"_t_1usnu_40",s:"_s_1usnu_60",u:"_u_1usnu_69",o:"_o_1usnu_76",l:"_l_1usnu_105",hh:"_hh_1usnu_115",c:"_c_1usnu_128",loadingB:"_loadingB_1usnu_1",m:"_m_1usnu_180",ul:"_ul_1usnu_196",f:"_f_1usnu_226"},rn=({title:e,left:t,right:n,children:i})=>a.jsxs("div",{className:J.h,children:[a.jsx("div",{className:J.t,children:e}),t&&a.jsx("div",{className:J.hl,children:t}),n&&a.jsx("div",{className:J.hr,children:n}),i]}),on=({children:e,...t})=>a.jsx("div",{className:J.l,children:e}),sn=({children:e})=>a.jsx("div",{className:J.s,children:e}),ln=({children:e,edit:t})=>{const n={};return t&&(n.edit=""),console.log(n),a.jsx("div",{...n,className:J.f,children:e})};function dn({children:e}){return a.jsx("div",{className:J.g,children:e})}const dt={Header:rn,Section:sn,Group:dn,Form:ln,List:on,A:an,U:({children:e})=>a.jsx("div",{className:J.u,children:e}),G:dn,C:({children:e})=>a.jsx("div",{className:J.c,children:e}),L:on,O:({children:e,className:t,title:n})=>a.jsxs("div",{className:[J.o,t].join(" "),children:[n&&a.jsx("div",{className:J.hh,children:n}),e]}),S:sn,H:rn,M:({children:e})=>a.jsx("div",{className:J.m,children:e}),F:ln},Wi=(e,t)=>{switch(t.type){case"load":return{...e,list:t.list.reverse(),load:!1};case"id":return{...e,id:t.id};case"add":return{...e,list:[t.data,...e.list]};case"update":return{...e,list:e.list.map(n=>n.id===t.data.id?Object.assign({},n,{[t.data.name]:t.data.value}):n),temp:e.temp.map(n=>n.id===t.data.id?Object.assign({},n,{[t.data.name]:t.data.value}):n)};case"view":return{...e,view:e.view==="card"?"item":"card"};case"revers":return{...e,list:[...e.list.reverse()],temp:[...e.temp.reverse()],revers:!e.revers};case"delete":return{...e,list:e.list.filter(n=>n.id!==t.id)};case"edit":return{...e,list:e.list.map(n=>n.id===t.j.item?Object.assign({},n,{[t.j.name]:t.j.value}):n)};default:return e}},Vi=()=>({load:!0,list:[],name:"Файлы",add:!1,search:!1,revers:!0}),Ui=()=>{let[e,t]=m.useState([]);return a.jsx(a.Fragment,{children:e.length!==0?a.jsxs("div",{className:"upload view",children:[a.jsxs("div",{className:"--head",children:[a.jsx("b",{children:"Загрузки"}),a.jsx("i",{className:"x",onClick:()=>t([]),"data-icon":"F038"})]}),a.jsx("div",{className:"--list",children:e.map(n=>n)})]}):""})},Yi=({id:e,name:t,listen:n,dir:i})=>{t=t||"Файлы";const[r,o]=m.useReducer(Wi,{},Vi);console.log(n);const d=()=>{Ue.Add(a.jsx(Hi,{dir:i,dispatch:o,id:e},new Date().getTime()))};return m.useEffect(()=>{(async()=>{let l=await le.Send({type:"module",module:"M09",query:"x0900",data:{dir:i,id:e}});o({type:"load",list:l})})()},[e,i]),a.jsxs(dt.O,{children:[" ",a.jsx(dt.H,{title:t,right:a.jsx("i",{className:"f025","data-icon":"C005 25 pointer","data-color":"_b5b9cc :506290",onClick:d}),left:a.jsx("i",{className:"f025","data-icon":"E009 25","data-color":"_2196f3"})}),a.jsx("ul",{"data-empty":"Файлов нет",className:"files_list",children:r.load?a.jsxs("div",{"type-load":"load",children:[a.jsx("i",{}),a.jsx("i",{}),a.jsx("i",{})]}):r.list.length===0?a.jsx(a.Fragment,{}):r.list.map((l,_)=>a.jsx(qi,{dispatch:o,data:l},_))})]})},Hi=({id:e,dir:t,dispatch:n})=>{let[i,r]=m.useState(!0),o=m.useRef(null),d=c=>{c.preventDefault(),c.stopPropagation()},l=c=>{},_=c=>{};return m.useEffect(()=>{let c=o.current;["dragenter","dragover","dragleave","drop"].forEach(u=>{c.addEventListener(u,d,!1),document.body.addEventListener(u,d,!1)}),["dragenter","dragover"].forEach(u=>{c.addEventListener(u,l,!1)}),["dragleave","drop"].forEach(u=>{c.addEventListener(u,_,!1)})},[]),a.jsx(a.Fragment,{children:i?a.jsx(a.Fragment,{children:a.jsx("div",{className:"modal o ",onClick:Ue.Shake,children:a.jsxs("div",{className:"b",children:[a.jsx("div",{className:"h",children:"Загрузка файлов"}),a.jsx("div",{className:"x","data-icon":"F038",onClick:()=>{r(!1)}}),a.jsxs("div",{className:"upload",ref:o,children:[a.jsx("input",{type:"file",id:"fileElem",name:"files",multiple:!0}),a.jsx("dd",{}),a.jsx("i",{"data-icon":"F061"})]})]})},new Date().getTime())}):""})},qi=({data:e,dispatch:t})=>{let n=async()=>{let o=await(await fetch(st.url().files+"/yandex/data/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ne.getSSID()||""}})).blob();if(o.size!==2){let d=new Blob([o],{type:o.type});d=URL.createObjectURL(d);let l=document.createElement("a");l.setAttribute("href",d),l.setAttribute("download",e.name),l.click()}},i=async()=>{(await(await fetch(st.url().files+"/yandex/delete/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ne.getSSID()||""}})).json()).status==="success"&&(t({type:"delete",id:e.id}),we.Send({type:"success",text:"Файл успешно удалён"}))};return a.jsxs("li",{children:[a.jsx("div",{className:"f035",children:A.TypeFiles(e.type)}),a.jsx("div",{className:"f100",children:A.Date(e.uDate,"dd.mm.yy")}),a.jsx("div",{className:"f000",children:e.name}),a.jsxs("div",{className:"f050 flex button",children:[a.jsx("i",{className:"f025","data-icon":"F060 35 pointer","data-color":"_b5b9cc :4CAF50",onClick:n}),a.jsx("i",{className:"f025","data-icon":"F048 35 pointer","data-color":"_b5b9cc :FF9800",onClick:i})]}),a.jsx("div",{className:"f080",children:A.Size(e.size)})]})},Ye={setSetting:ka,getSetting:ya};let Z={};Z.list=Ia(),Z.active=null;const Ji=()=>{var r;let[e,t]=m.useState([]),[n,i]=m.useState(Ye.getSetting("s03"));return m.useEffect(()=>{(async()=>{let o=Object.keys(Z.list);if(o.length!==0){let d=[];o.forEach((l,_)=>{d.push({item:a.jsx(ct,{data:Z.list[l]},Z.list[l].id),link:Z.list[l].link})}),t(d)}})()},[]),Z.active=o=>{var d;i(o),(d=document.querySelector("app-body"))==null||d.setAttribute("bookmarks",o===1?"bottom":"")},Z.set=o=>{t([...e,{item:a.jsx(ct,{data:o},o.id),link:o.link}])},Z.del=o=>{e.forEach((d,l)=>{d.link===o&&e.splice(l,1)}),t([...e])},(r=document.querySelector("app-body"))==null||r.setAttribute("bookmarks",n===1&&e.length!==0?"bottom":""),n!==0?a.jsx(a.Fragment,{children:e.length!==0?a.jsx("div",{className:"bookmarks",children:e.map(o=>o.item)}):""}):""},Xi=({id:e,type:t,name:n})=>{let i=t+"-"+e,[r,o]=m.useState(Z.list[i]!==void 0);m.useEffect(()=>{o(Z.list[i]!==void 0)},[i]);let d=()=>{Z.list[i]!==void 0?(Z.del(i),delete Z.list[i],Vt(Z.list),o(!1),we.Send({type:"success",text:"Запись удален из закладок"})):(Z.list[i]={id:e,name:n,type:t,link:i},Z.set(Z.list[i]),Vt(Z.list),o(!0),we.Send({type:"success",text:"Запись добавлен в закладки"}))};return a.jsx(a.Fragment,{children:Ye.getSetting("s03")!==0?a.jsx("i",{"data-icon":"C018","data-color":r?"_F44333 :F44333":"_b5b9cc :F44333",onClick:d}):""})},ct=({data:e})=>{let t=i=>{i.preventDefault(),delete Z.list[e.link],Z.del(e.link)},n=()=>{Be.setId(e.id)};return a.jsx("span",{onContextMenu:t,onClick:n,children:e.name})},Qi=e=>{Z.active(e)},R={},_t={},b={};b.config={iceServers:[{url:"stun:stun.l.google.com:19302"}]},b.constraints={optional:[{DtlsSrtpKeyAgreement:!0}]},b.other=[],b.users={},b.asset=0,b.remoute=!1,b.stream=null,b.user=0,b.connect=!1,b.offer=null,b.btnRefuse=null,b.time=!1;let ge;ge=document.createElement("audio"),ge.setAttribute("autoplay","true"),ge.setAttribute("muted","true"),R.start=async e=>{b.rtc=new RTCPeerConnection(b.config),b.other=[],b.remoute=!1,b.rtc.onicecandidate=n=>{n.candidate&&b.other.push(n.candidate)},b.rtc.ontrack=n=>{if(n.streams&&n.streams[0])ge.srcObject=n.streams[0];else{console.log(!1);let i=new MediaStream(n.track);ge.srcObject=i}};const t=await navigator.mediaDevices.getUserMedia({video:!1,audio:{echoCancellation:!1,autoGainControl:!0}});t.getTracks().forEach(n=>{b.rtc.addTrack(n,t)}),b.rtc.onconnectionstatechange=()=>{console.log(b.rtc.connectionState),b.rtc.connectionState},b.rtc.ontrack=async n=>{if(n.streams&&n.streams[0])ge.srcObject=n.streams[0];else{console.log(!1);let i=new MediaStream(n.track);ge.srcObject=i}},b.rtc.onaddstream=n=>{console.log(n)},b.rtc.onnegotiationneeded=n=>{console.log(n)},b.rtc.oniceconnectionstatechange=n=>{console.log(n.target)},b.rtc.onsignalingstatechange=n=>{console.log(n.target.connectionState)},b.rtc.onicegatheringstatechange=n=>{console.log(n)},b.rtc.onicecandidateerror=n=>{console.log(n)},b.rtc.ondatachannel=n=>{console.log(n)},console.log(b.rtc),b.rtc.onerror=n=>{console.log("error",n)},e()},R.useListener=e=>{_t.rtc=e},R.setListener=e=>{_t.rtc&&_t.rtc(e)},R.callTo=async e=>{R.start(async()=>{const t=await b.rtc.createOffer();await b.rtc.setLocalDescription(t),b.uid=e,le.Send({type:"module",module:"M00",query:"x0050",data:{type:"offer",offer:btoa(JSON.stringify(t)),user:b.uid}})})},R.callIn=async e=>{console.log("callIn"),b.asset=e.id,b.offer=e.offer,b.uid=e.id},R.callRise=async()=>{R.start(async()=>{b.rtc.setRemoteDescription(new RTCSessionDescription(JSON.parse(atob(b.offer))));const e=await b.rtc.createAnswer();await b.rtc.setLocalDescription(e),le.Send({type:"module",module:"M00",query:"x0050",data:{type:"answer",answer:btoa(JSON.stringify(e)),user:b.uid}}),console.log("согласилась")})},R.callOk=async e=>{b.asset=e.id;const t=new RTCSessionDescription(JSON.parse(atob(e.answer)));await b.rtc.setRemoteDescription(t),console.log("ok"),le.Send({type:"module",module:"M00",query:"x0050",data:{type:"IceCandidate",candidate:JSON.parse(JSON.stringify(b.other)),user:b.uid,send:!0}})},R.IceCandidate=async e=>{console.log(e),console.log("candidate"),e.candidate.forEach(t=>{b.rtc.addIceCandidate(new RTCIceCandidate(t))}),e.send&&le.Send({type:"module",module:"M00",query:"x0050",data:{type:"IceCandidate",candidate:JSON.parse(JSON.stringify(b.other)),user:b.uid,send:!1}})},R.callFrom=async()=>{},R.callNo=()=>{console.log("Пользователь не в сети или отклонил"),b.asset=0,b.time=!1,b.rtc&&b.rtc.close(),R.setListener({type:"state",data:"closed"})},R.callOf=()=>{b.asset=0,b.time=!1,b.rtc.close()},R.callRefuser=async()=>{le.Send({type:"module",module:"M00",query:"x0050",data:{type:"callRefuser",user:b.uid}}),b.asset=0,b.time=!1,b.rtc&&b.rtc.close()},R.Run=async e=>{R[e.data.type]&&R[e.data.type](e.data)};let ze={};function er(){let[e,t]=m.useState([]),n=m.useRef(null);return m.useEffect(()=>{},[]),ze.set=i=>{t([...e,i])},ze.del=()=>{t([])},ze.audio=(i,r)=>{n.current.volume=.5,n.current.loop=r,n.current.src="/audio/"+i,n.current.muted=!1},a.jsxs(a.Fragment,{children:[e.map(i=>i.item),a.jsx("audio",{id:"audio",ref:n,autoPlay:!0,muted:!0})]})}function tr(e,t){let n=new Date().getTime();ze.set({item:a.jsx(nr,{type:t,id:e},n),key:n})}function nr({id:e,type:t}){const[n,i]=m.useState({}),[r,o]=m.useState(t);console.log(r),m.useEffect(()=>{i(ne.getSelect("user")[e])},[]),console.log(r),R.useListener(_=>{switch(_.type){case"state":o(_.data)}});const d=()=>{switch(r){case"out":return a.jsx("span",{onClick:()=>{R.callTo(n.id),o("call")},children:a.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})});case"in":return a.jsxs(a.Fragment,{children:[a.jsx("span",{onClick:l,children:a.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M 27.9999 51.9063 C 41.0546 51.9063 51.9063 41.0781 51.9063 28 C 51.9063 14.9453 41.0312 4.0937 27.9765 4.0937 C 14.8983 4.0937 4.0937 14.9453 4.0937 28 C 4.0937 41.0781 14.9218 51.9063 27.9999 51.9063 Z M 19.5858 38.4063 C 18.4843 38.4063 17.5936 37.5156 17.5936 36.4141 C 17.5936 35.8750 17.8280 35.4063 18.2030 35.0547 L 25.1874 28.0234 L 18.2030 20.9922 C 17.8280 20.6641 17.5936 20.1719 17.5936 19.6328 C 17.5936 18.5547 18.4843 17.6875 19.5858 17.6875 C 20.1249 17.6875 20.5936 17.8984 20.9452 18.2734 L 27.9765 25.2812 L 35.0546 18.25 C 35.4530 17.8281 35.8749 17.6406 36.3905 17.6406 C 37.4921 17.6406 38.3827 18.5312 38.3827 19.6094 C 38.3827 20.1484 38.1952 20.5937 37.7968 20.9688 L 30.7655 28.0234 L 37.7733 35.0078 C 38.1249 35.3828 38.3593 35.8516 38.3593 36.4141 C 38.3593 37.5156 37.4687 38.4063 36.3671 38.4063 C 35.8046 38.4063 35.3358 38.1719 34.9843 37.8203 L 27.9765 30.7890 L 20.9921 37.8203 C 20.6405 38.1953 20.1249 38.4063 19.5858 38.4063 Z"})})}),a.jsx("span",{onClick:R.callRise,children:a.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})})]});case"call":return a.jsx("span",{onClick:()=>R.callNo(n.id),children:a.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M 27.9999 51.9063 C 41.0546 51.9063 51.9063 41.0781 51.9063 28 C 51.9063 14.9453 41.0312 4.0937 27.9765 4.0937 C 14.8983 4.0937 4.0937 14.9453 4.0937 28 C 4.0937 41.0781 14.9218 51.9063 27.9999 51.9063 Z M 19.5858 38.4063 C 18.4843 38.4063 17.5936 37.5156 17.5936 36.4141 C 17.5936 35.8750 17.8280 35.4063 18.2030 35.0547 L 25.1874 28.0234 L 18.2030 20.9922 C 17.8280 20.6641 17.5936 20.1719 17.5936 19.6328 C 17.5936 18.5547 18.4843 17.6875 19.5858 17.6875 C 20.1249 17.6875 20.5936 17.8984 20.9452 18.2734 L 27.9765 25.2812 L 35.0546 18.25 C 35.4530 17.8281 35.8749 17.6406 36.3905 17.6406 C 37.4921 17.6406 38.3827 18.5312 38.3827 19.6094 C 38.3827 20.1484 38.1952 20.5937 37.7968 20.9688 L 30.7655 28.0234 L 37.7733 35.0078 C 38.1249 35.3828 38.3593 35.8516 38.3593 36.4141 C 38.3593 37.5156 37.4687 38.4063 36.3671 38.4063 C 35.8046 38.4063 35.3358 38.1719 34.9843 37.8203 L 27.9765 30.7890 L 20.9921 37.8203 C 20.6405 38.1953 20.1249 38.4063 19.5858 38.4063 Z"})})});case"closed":return a.jsx("span",{onClick:()=>{R.callTo(n.id),o("call")},children:a.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})})}},l=()=>{R.callRefuser(n.id),ze.del()};return a.jsx("div",{className:"web-phone white",children:a.jsxs("div",{className:"w",children:[a.jsx("div",{className:"x","data-icon":"F038",onClick:l}),a.jsx("div",{className:"a"}),a.jsx("div",{className:"n",children:n.name}),a.jsx("div",{className:"b",children:d()})]})})}const ut={};function ar(e){ut.add(e)}function ir({color:e,size:t,name:n}){return a.jsx("svg",{width:t,height:t,color:e,children:a.jsx("use",{href:`#${n}`})})}function rr(){let[e,t]=m.useState([]);if(ut.x=()=>{t([])},ut.add=i=>{t(i)},e.length===0)return"";const n={sprite:""};return a.jsx("svg",{...n,xmlns:"http://www.w3.org/2000/svg",children:e.map((i,r)=>a.jsx("symbol",{id:i.name,viewBox:"0 0 24 24",fillRule:"evenodd",clipRule:"evenodd",children:a.jsx(i.path,{})},r))})}const ft={};function or(e,t){ft[e]=t}function sr(e,t){ft[e]!==void 0&&ft[e](t)}const me={};function lr(e,t){const[n,i]=m.useState(t);return m.useEffect(()=>{if(me[e])return me[e].push(i);me[e]=[i]},[]),[n]}function dr(e,t){if(me[e])return me[e].push(t);me[e]=[t]}function cr(e,t){me[e]&&me[e].forEach(n=>n(t))}const ve={setListener:sr,useListener:or,setEmitter:cr,useEmitter:lr,subEmitter:dr};function _r(){let[e,t]=m.useState([]);return ve.useListener("form",n=>{t([n])}),a.jsx(a.Fragment,{children:e.map(n=>n)})}const cn=({children:e,config:t})=>(F.New(t.crypto),t.defaultModule&&ea(t.defaultModule),na(a.jsxs(a.Fragment,{children:[a.jsx(Ri,{config:t.modal}),a.jsx(Ua,{}),a.jsx(Qa,{}),a.jsx(Ui,{}),a.jsx(rr,{}),a.jsx(_r,{}),a.jsx(er,{}),a.jsx(Ji,{}),e]}))),ur=({children:e,...t})=>a.jsx("menu",{children:e}),fr=({children:e,...t})=>a.jsxs("header",{children:["xz",e]}),mr={payment:"_payment_1lxfv_1"};function pr(){let[e,t]=m.useState({});return!e.active&&!e.payment?"":a.jsx("div",{className:mr.payment,children:"Истек срок оплаты! Доступ доступен до 16.04.2024"})}const xr=({children:e,...t})=>{let n={};return n.enCode=i=>JSON.stringify(i).toString(),n.deCode=i=>JSON.parse(i),a.jsxs("div",{className:"app",children:[a.jsx(pr,{}),a.jsx(ur,{}),a.jsx(fr,{}),a.jsx(cn,{config:{modal:{},crypto:n}}),e]})},_n=({list:e,onClick:t,active:n,size:i,view:r})=>a.jsx("nav",{children:a.jsx("ul",{className:[i,r].join(" "),children:e.map(o=>a.jsx(hr,{onClick:t,active:n,label:o.label,link:o.link},o.link))})}),hr=({onClick:e,label:t,link:n,active:i})=>a.jsx("li",{"tabs-active":String(i===n),onClick:()=>e(n),children:t});_n.defaultProps={size:"M",view:"H"};const gr=({title:e="",button:t,description:n="",children:i})=>a.jsxs("fieldset",{children:[e&&a.jsxs("legend",{children:[e,t&&a.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),a.jsx("ul",{children:i}),n&&a.jsx("article",{children:n})]}),vr={setting:"_setting_dva4m_2"},br=({children:e})=>a.jsx("div",{className:vr.setting,children:e}),kr=({label:e,children:t})=>{let[n,i]=m.useState(!1);return a.jsxs("li",{"data-item":"accordion",children:[a.jsxs("dl",{onClick:()=>i(!n),children:[a.jsx("dt",{children:e}),a.jsx("dd",{children:a.jsx("div",{"data-close":String(n)})})]}),n&&a.jsx("div",{children:t})]})},yr=({label:e,onClick:t,button:n})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{role:"button",onClick:()=>t(),children:n})]})}),un={Switch:({active:e,onClick:t})=>(console.log(e),e=typeof e=="number"?!!e:e,a.jsx("div",{role:"switch",onClick:()=>{console.log("Wewew"),t()},"aria-checked":e?"true":"false"}))},wr={Accordion:kr,Button:yr,Switch:({label:e,onClick:t,active:n})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{children:a.jsx(un.Switch,{onClick:t,active:n})})]})}),Info:({label:e,info:t})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:n})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{children:t})]})})};function fn({list:e,onClick:t,active:n,size:i,view:r}){return a.jsx("nav",{children:a.jsx("ul",{className:[i,r].join(" "),children:e.map(o=>a.jsx(Cr,{onClick:t,active:n,label:o.label,link:o.link},o.link))})})}const Cr=({onClick:e,label:t,link:n,active:i})=>a.jsx("li",{"tabs-active":String(i===n),onClick:()=>e(n),children:t});fn.defaultProps={size:"M",view:"H"};const jr={Section:gr,Main:br,Item:wr,Tabs:fn},Sr={Icon:Xi,Item:ct,Active:Qi},Er={Send:ti,Line:an};function Nr(){return a.jsx("svg",{viewBox:"0 0 462.86 359.96",children:a.jsx("path",{d:"M210.5,307.78c-27,35.41-58.14,58-120.55,50.84-1-.12-1.58-.39-1.58-2V327.87c0-1.32.51-2.12,1.85-2,100.39-1,88.17-63.46,74.8-90.94-47.3-97.28-14.46-166.27,20.26-205.14,14.1-16.37,50.53-42,128.07-23.24,9.1,2,30.51,7.8,24.46,11.38C317.5,30,297.66,68.33,295,73.12c-3.62,6.59-6.26,13.17-4.57,14.13,2.37,1.35,3.5-1.56,6.58-7.91C319.78,34.41,366-22.76,402.78,37.68a1.14,1.14,0,0,1,.09.26c9.3,56.05,30.57,228.62-97.76,224.22-23.38-2-28.82-22-32.57-18.89-3.36,3,10,21.4,32.76,23.19C448.18,270.75,411.55,66.74,407.79,41.91a1.41,1.41,0,0,1,0-.3c2-7.32,129.15,17.47,112.77,158.08,4.82,6.57,10.89,10,18.7,16.08l.13.07c8.9,3.67,10.46,12.06,11.43,18.88a63.15,63.15,0,0,1-.14,15.49c-10.48-4.62-22.74-10.11-22.26-22.53.43-12,7.35-5.21-8.8-14.22a.69.69,0,0,0-1,.57c-.33,3.87-2.7,14.69-3,16.59v0c-4.64,17-16.59,86-18.41,99.58-.77,5.7-4.94,10.41-11.4,10.39l-56.71.18c-7.73.22-9.57-7.9-10.27-11.89-2.7-15.31-4.08-29.7-4.18-29.67-20.24,9.26-108.69,3.08-108.69,3.27V330c-.29,7.56-4.51,15.26-11.74,15.32l-52.87,1c-10.36.1-13.85-1.67-15.5-11.87-2.08-13.08-1-34.26-5.32-37.43-2,1.84-8.33,8.11-10,10.83M196.16,203q9.57,0,11.42-7.72c2.18-9.07-5.66-17.7-14.77-15.68-4.95,1.11-7.53,4.94-7.53,11.53C185.28,199,188.94,203,196.16,203Z",transform:"translate(-88.37 0)"})})}const Tr={Logo:Nr,Sprite:ar,Symbol:ir},Ir={sort:"_sort_1yrvt_1"};let He={};function Dr(e,t){switch(t.type){case"active":let n="<";return e.active===t.data&&(n=e.sort==="<"?">":"<"),He.get({active:t.data,sort:n},!1),Zt({active:t.data,sort:n}),{...e,active:t.data,sort:n};default:throw new Error}}function Mr(){const[e,t]=m.useReducer(Dr,rt()===void 0?{active:1,sort:"<"}:rt());return a.jsxs("div",{className:Ir.sort,children:[a.jsx("i",{"data-color":e.active===1?"_506290":"_b5b9cc","data-icon":e.active===1?e.sort==="<"?"F073":"F072":"F071",onClick:()=>t({type:"active",data:1})}),a.jsx("i",{"data-color":e.active===2?"_506290":"_b5b9cc","data-icon":e.active===2?e.sort==="<"?"F066":"F067":"F074",onClick:()=>t({type:"active",data:2})}),a.jsx("i",{"data-color":e.active===3?"_506290":"_b5b9cc","data-icon":e.active===3?e.sort==="<"?"F068":"F069":"F070",onClick:()=>t({type:"active",data:3})})]})}function Fr(e){He.get=e}function $r(e){He.set(e)}function Lr(e,t,n){let i=1,r=0,o={},d=50;o[i]=[];let l={},_="s1a";switch(l.s1a=(c,u)=>u.s1-c.s1,l.s1d=(c,u)=>c.s1-u.s1,l.s2a=(c,u)=>c.s2-u.s2,l.s2d=(c,u)=>u.s2-c.s2,l.s3a=(c,u)=>c.s3.localeCompare(u.s3),l.s3d=(c,u)=>u.s3.localeCompare(c.s3),n.active){case 1:_=n.sort===">"?"s1d":"s1a";break;case 2:_=n.sort===">"?"s2d":"s2a";break;case 3:_=n.sort===">"?"s3d":"s3a";break}return t.sort(l[_]).forEach(c=>{r++,r<=d||(i++,r=1,o[i]=[]),o[i].push(e[c.id])}),{data:o}}function Br(e){He.count(e)}const Pr={Init:Mr,useValue:Fr,Set:$r,Run:Lr,Count:Br},qe={},mn={};function Rr(e){const[t,n]=m.useState({}),i=async r=>{n(Object.keys(qe).reduce((o,d)=>(o?o[d]=qe[d].all:o={},o),{}))};return m.useEffect(()=>{e.forEach(r=>qe[r]={all:0}),mn.menu=i,i()},[e]),t}function zr(e,t){switch(typeof t){case"number":qe[e].all+=t,mn.menu();break}}const Or={useMenu:Rr,setUpdate:zr};class Ar{constructor(t="el",n="db"){Pt(this,"storeName");Pt(this,"_dbp");this.storeName=n,this._dbp=new Promise((i,r)=>{const o=indexedDB.open(t,1);o.onerror=()=>r(o.error),o.onsuccess=()=>i(o.result),o.onupgradeneeded=()=>{o.result.createObjectStore(n)}})}_withIDBStore(t,n){return this._dbp.then(i=>new Promise((r,o)=>{const d=i.transaction(this.storeName,t);d.oncomplete=()=>r(),d.onabort=d.onerror=()=>o(d.error),n(d.objectStore(this.storeName))}))}}let mt,G={};const je=()=>(mt||(mt=new Ar),mt),pe=(e,t,n=je())=>n._withIDBStore("readwrite",i=>{G[e]=t,i.put(F.enCode(t),e)}),de=(e,t=je())=>G[e]===void 0?new Promise((n,i)=>{let r;t._withIDBStore("readonly",o=>{r=o.get(e)}).then(()=>{if(r.result!==void 0){let o=F.deCode(r.result);G[e]=o,n(o)}else n({})})}):G[e],Zr=(e,t=je())=>t._withIDBStore("readwrite",n=>{n.delete(e)}),pt=(e=je())=>e._withIDBStore("readwrite",t=>{t.clear()}),Gr={id:async(e,t,n)=>{let i=await de(t);if(n!==void 0)n({type:"load",base:i});else return i[e]},get:de,set:pe,add:async(e,t,n,i)=>{let r,o;o=await de(n),o[e.id]=e,await pe(n,o),r!==null&&(r=await de(t),r[e.id]=e.eDate,await pe(t,r)),i!==void 0&&i({type:"load",page:r,base:o})},del:Zr,upd:(e,t,n,i=je())=>{if(G[e]===void 0)return new Promise((r,o)=>{let d;i._withIDBStore("readonly",l=>{d=l.get(e)}).then(()=>{if(d.result!==void 0){let l=F.deCode(d.result);G[e]=l,G[e][t.id]={...G[e][t.id],...t.data},i.put(F.enCode(G[e]),e),r({})}else r({})})});if(G[e][t.id]!==void 0)return G[e][t.id]={...G[e][t.id],...t.data},n!==void 0&&G[n]!==void 0?G[n][t.id]!==void 0&&(G[n][t.id]=t.data.eDate):G[n]=[],delete G[e][t.id].$_item,delete G[e][t.id].$_send,i._withIDBStore("readwrite",r=>{r.put(F.enCode(G[e]),e),n!==void 0&&r.put(F.enCode(G[n]),n)})},key:(e=je())=>{const t=[];return e._withIDBStore("readonly",n=>{(n.openKeyCursor||n.openCursor).call(n).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)},load:e=>G[e],split:(e,t,n=[],i={})=>{let r=n.length!==0,o=[],d=i.sort,l=Object.keys(i).length!==0,_=Object.keys(i),c=Object.keys(e),u=1,f=[],x={};x[u]=[];let h=k=>{let S="";if(n.forEach(y=>{S+=t[k][y]}),l){let y={};_.forEach(C=>{y[C]=t[k][C]});for(let C in d)t[k][d[C]]===void 0&&(pt(),location.reload()),C==="s1"&&(y[C]=new Date(t[k][d[C]]).getTime()),C==="s2"&&(y[C]=t[k][d[C]]),C==="s3"&&(y[C]=t[k][d[C]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:k,text:S,...y})}else o.push({id:k,text:S})},g=k=>{};return c.forEach(k=>{f.push(t[k])}),f.forEach(k=>{k===void 0?(pt(),location.reload()):(r&&h(k.id),l&&g(k.id))}),{list:x,search:o,filter:i}},clear:pt,updAll:async(e,t,n,i)=>{let r=await de(t),o=await de(n);for(let d in e)o[d]=e[d],r[d]=e[d].eDate;await pe(t,r),await pe(n,o),i!==void 0&&i({type:"load",page:r,base:o})},delAll:async(e,t,n,i)=>{let r=await de(t),o=await de(n);e.forEach(d=>delete r[d]),await pe(t,r),i!==void 0&&i({type:"load",page:r,base:o})},delList:async(e,t,n)=>{let i=await de(t);e.forEach(r=>delete i[r]),await pe(t,i)},addList:async(e,t,n)=>{let i=await de(t);e.forEach(r=>i[r.id]=r.eDate),await pe(t,i)}},Kr={useKey:(e,t)=>{const n=[];t=t.map(i=>i.charCodeAt(0)),document.onkeydown=function(i){n.push(i.keyCode);for(var r=0;r<t.length;r++)if(n.indexOf(t[r])==-1)return;e(),n.length=0},document.onkeyup=function(i){n.length=0}}},Wr={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function pn({children:e}){return a.jsx("ul",{className:J.ul,children:e})}function Vr(e,t){switch(t.type){case"load":return{...e,load:t.load,wait:!1,item:1,data:t.data,list:t.data[1],size:Object.keys(t.data).length};case"update":let n=Object.keys(e.data).length,i=e.item+1;return i=n<i?1:i,e.item===i?e:{...e,wait:e.size===i,item:i,list:[...e.list,...e.data[i]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function xn(e){const t=m.useRef(null),[n,i]=m.useReducer(Vr,{load:!1,list:[],data:{},item:1,wait:!1,size:0});m.useEffect(()=>{},[]),m.useEffect(()=>{t.current.scrollTop=0,e.list!==null&&i({type:"load",load:!0,data:e.list})},[e.load]);let r=()=>{t.current.scrollHeight-t.current.scrollTop-300<=t.current.clientHeight&&!n.wait&&i({type:"update"})};return a.jsx("div",{className:Wr.s,ref:t,onScroll:r,children:a.jsx(pn,{"el-empty":"Данные не найдены",children:n.load&&n.list!==void 0?n.list.map(o=>a.jsx(e.item,{data:o},o.id)):a.jsxs("div",{"data-load":"load",children:[a.jsx("i",{}),a.jsx("i",{}),a.jsx("i",{})]})})})}const Ur={Scrolling:xn},Yr={Widget:Yi},hn=({onClick:e,active:t})=>(t=!!t,a.jsx("div",{role:"switch",onClick:()=>e,"aria-checked":`${t?"true":"false"}`}));let be={};be.KeyDown=e=>{e.key==="Enter"&&e.preventDefault()},be.PasteOne=e=>{e.preventDefault(),navigator.clipboard.readText().then(t=>{t=t.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,t)}).catch(t=>{})},be.Focus=e=>{e.target.textContent.length===0&&(e.target.innerHTML="<br>")},be.Blur=e=>{e.target.scrollLeft=0,e.target.querySelector("br")!==null&&e.target.querySelector("br").remove()};function Oe({value:e,onValue:t,name:n,placeholder:i="",title:r="",error:o="",hide:d=!1,edit:l=!0,active:_=!0,after:c="",show:u=!0,view:f,onBlur:x,onSave:h,className:g=""}){let k=!!(d&&(e===""||e===void 0)),S=z=>{t&&t({value:z.target.textContent,name:n})},y=z=>{z.key==="Enter"&&z.preventDefault()},C=z=>{},I=z=>{z.preventDefault(),navigator.clipboard.writeText(z.target.textContent).then(function(){we.Copy("Данные в буфер обмене")},function(O){console.error("Async: Could not copy text: ",O)})};if(!(l&&_)&&!u||!(l&&_)&&k)return"";const M={};M.field="input",g&&(M.className=g);const w={};i&&(w.placeholder=i),w.edit=(l&&_)+"";const L=z=>{be.Blur(z),h&&h({value:z.target.textContent,name:n})};return a.jsxs("dl",{...M,children:[r?a.jsx("dt",{children:r}):"",a.jsx("dd",{onPaste:C,onInput:S,onBlur:L,onKeyDown:y,onContextMenu:I,contentEditable:l&&_?"plaintext-only":"false",suppressContentEditableWarning:!0,...w,children:e}),o?a.jsx("em",{children:o}):""]})}function gn({onClick:e,onSend:t,name:n,onRef:i}){let[r,o]=m.useState(!1);const d=()=>{if(e)return e();r||(o(!0),t&&t(o))};return a.jsx("button",{ref:i,"data-form":"button",className:r?"btn await":"btn confirm pointer",onClick:d,children:r?"Ожидайте":n})}function vn({value:e,onValue:t,onActive:n,data:i,name:r,view:o,edit:d=!0,active:l=!0,placeholder:_="Введите сообщение"}){const c=m.useRef({value:e,timerId:null,shift:!1,send:!0}),u=()=>{c.current.value.length>0?c.current.send&&(n(!0),c.current.send=!1,c.current.timerId=setTimeout(()=>{c.current.send=!0},3e3)):n(!1)},f=y=>{c.current.value=y.target.textContent,u()},x=y=>{y.keyCode===16&&(c.current.shift=!0),y.keyCode===13&&!c.current.shift&&(y.preventDefault(),c.current.value.length!==0&&(y.target.textContent="",i&&i(c.current.value),t&&t(c.current.value),c.current.value="",n(!1)))},h=y=>{y.keyCode===16&&(c.current.shift=!1)},g=y=>{y.preventDefault(),navigator.clipboard.readText().then(C=>{window.document.execCommand("insertText",!1,C)}).catch(C=>{})},k=()=>{n(!1)},S={spellCheck:"true"};return _&&(S.placeholder=_),d&&l&&(S.contentEditable="plaintext-only"),a.jsx("dl",{"data-form":"message",children:a.jsx("dd",{onPaste:g,onInput:f,onKeyUp:h,onKeyDown:x,onBlur:k,...S,suppressContentEditableWarning:!0,children:e})})}function bn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,r=e.placeholder!==void 0?e.placeholder:"",o=_=>{e.onValue({value:_.target.textContent,name:e.name})},d=_=>{_.key==="Enter"&&_.preventDefault()},l=_=>{_.preventDefault(),navigator.clipboard.readText().then(c=>{window.document.execCommand("insertText",!1,c)}).catch(c=>{console.log("Something went wrong",c)})};return a.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),a.jsx("dd",{onPaste:l,onInput:o,onKeyDown:d,contentEditable:n&&i?"plaintext-only":"false","data-placeholder":r,suppressContentEditableWarning:!0,children:e.value})]})}function kn({value:e,onValue:t,placeholder:n="",name:i}){let r=(h,g)=>Number(Math.round(h+Math.random()*(g-h))),o=m.useRef(null),d=m.useRef(null),l=r(1e4,99999),_=h=>{h.key!=="Backspace"&&(h.key==="Enter"&&h.preventDefault(),h.target.textContent.length===5&&h.preventDefault(),/\d/.test(h.key)||h.preventDefault())},c=h=>{t({value:Number(h.target.textContent)===l,name:i})},u=h=>{h.preventDefault(),navigator.clipboard.readText().then(g=>{window.document.execCommand("insertText",!1,g.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(g=>{console.log("Something went wrong",g)})};m.useEffect(()=>{const h=o.current,g=h.getContext("2d");g.clearRect(0,0,h.width,h.height),g.font="30px brush script mt",g.fillStyle="#eee",g.textAlign="center",g.fillText(l,50,27),d.current.textContent=""},[l]);const f={};f.field="captcha";const x={};return n&&(x.placeholder=n),a.jsxs("dl",{...f,children:[a.jsx("dd",{ref:d,onPaste:u,onInput:c,onBlur:be.Blur,onKeyDown:_,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,...x}),a.jsx("canvas",{ref:o,width:"100",height:"35"})]})}function yn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"",i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},r=c=>{c.preventDefault(),c.target.textContent=c.target.textContent.slice(-1).replace(/[^+\d]/g,"");let u=window.getSelection(),f=c.target.textContent.length;if(i[c.target.id]=c.target.textContent,i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6,u.collapse(c.target.firstChild,1),f===0){c.target.blur(),c.target.focus();return}c.target.nextSibling!=null&&c.target.nextSibling.focus()},o=c=>{if(c.key==="Enter"&&c.preventDefault(),c.key==="Backspace"){if(c.preventDefault(),c.target.textContent="",i[c.target.id]="",c.target.previousSibling!=null){let u=c.target.previousSibling.id.slice(1);c.target.previousSibling.textContent="",i["n"+u]="",c.target.previousSibling.focus()}i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6}},d=c=>{if(e.real)e.onValue({value:i.code,name:e.name});else if(i.code.length===6&&(e.onValue({value:i.code,name:e.name}),e.empty)){i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let u=1;u<=6;u++){let f=document.getElementById("n"+u);f&&(f.textContent="")}}},l=c=>{c.target.textContent=""},_=c=>{c.preventDefault()};return a.jsxs("dl",{"data-form":"code",children:[t(),a.jsxs("div",{children:[a.jsx("dd",{id:"n1",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0}),a.jsx("dd",{id:"n2",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0}),a.jsx("dd",{id:"n3",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0}),a.jsx("dd",{id:"n4",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0}),a.jsx("dd",{id:"n5",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0}),a.jsx("dd",{id:"n6",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0})]}),n()]})}function wn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"";e.edit!==void 0&&e.edit,e.active!==void 0&&e.active;let[i,r]=m.useState(e.value),o=d=>{let l=d.target.getAttribute("set-color");r(l),e.onValue({value:l,name:e.name})};return a.jsx(a.Fragment,{children:e.view==="icon"?a.jsx("i",{"data-icon":"F043"}):a.jsxs("dl",{children:[t(),a.jsxs("dd",{"el-val":i,children:[a.jsx("em",{onClick:o,"set-color":"0"}),a.jsx("em",{onClick:o,"set-color":"1"}),a.jsx("em",{onClick:o,"set-color":"2"}),a.jsx("em",{onClick:o,"set-color":"3"}),a.jsx("em",{onClick:o,"set-color":"4"}),a.jsx("em",{onClick:o,"set-color":"5"})]}),n()]})})}const Se={o:"_o_ff5dx_1",c:"_c_ff5dx_11"};function xt(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"",i=e.edit!==void 0?e.edit:!0,r=e.active!==void 0?e.active:!0,o=e.placeholder!==void 0?e.placeholder:"",[d,l]=m.useState(e.value===void 0?new Date:e.value),_=!i&&r;m.useEffect(()=>{l(e.value===void 0?new Date:e.value)},[e.value]);let c=h=>{l(h),e.onValue({value:h,name:e.name})},u=h=>{const g=h.target.getBoundingClientRect(),k=g.left,S=g.top;ve.setListener("form",a.jsx(Hr,{position:{x:k,y:S},onValue:c,date:d},new Date().getTime()))};const f={};f.field="input";const x={};return o&&(x.placeholder=o),_?a.jsx(a.Fragment,{}):a.jsx(a.Fragment,{children:e.view==="icon"?a.jsx("i",{"data-icon":"F043",className:"pointer","data-color":"_b5b9cc :506290",onClick:u}):a.jsxs("dl",{...f,children:[t(),a.jsx("dd",{onClick:u,...x,"data-edit":(i&&r)+"",children:A.Date(d,"dd.mm.yyyy")}),n()]})})}const Hr=e=>{let[t,n]=m.useState(!0),i=new Date,r=new Date(e.date),o={y:parseInt(i.getFullYear()),d:parseInt(i.getDate()),m:parseInt(i.getMonth())+1},d={y:parseInt(r.getFullYear()),d:parseInt(r.getDate()),m:parseInt(r.getMonth())+1},[l,_]=m.useState({y:d.y,m:d.m}),c=w=>{let L=w.getDay();return L===0&&(L=7),L-1},u=["пн","вт","ср","чт","пт","сб","вс"],f=l.m-1,x=new Date(l.y,f),h=[];for(let w=0;w<c(x);w++)h.push(0);for(;x.getMonth()===f;)h.push(x.getDate()),x.setDate(x.getDate()+1);let g=()=>{n(!1)},k=()=>{C(l.m+1,l.y)},S=()=>{C(l.m-1,l.y)},y=w=>{e.onValue(l.y+"-"+A.Number(2,l.m)+"-"+A.Number(2,w)),g()},C=(w,L)=>{L=w>12?L+1:w<1?L-1:L,w=w>12?1:w<1?12:w,_({y:L,m:w})},I=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,M=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return a.jsx(a.Fragment,{children:t?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Se.o,onClick:()=>g()},new Date().getTime()),a.jsxs("div",{className:Se.c,style:{top:I+"px",left:M+"px"},children:[a.jsxs("s",{children:[a.jsx("i",{"data-icon":"F021",onClick:()=>S()}),a.jsxs("h2",{children:[A.Month(l.m).name," ",l.y]}),a.jsx("i",{"data-icon":"F022",onClick:()=>k()})]}),a.jsxs("div",{children:[u.map((w,L)=>a.jsx("p",{children:w},"v"+L)),h.map((w,L)=>a.jsx("span",{children:w!==0?a.jsx("b",{color:o.y===l.y&&o.m===l.m&&o.d===w?"_FFEB3B":"",onClick:()=>y(w),children:w}):a.jsx("p",{})},L))]})]})]}):""})};function ht({value:e,onValue:t,name:n,placeholder:i="",title:r,error:o,hide:d=!1,edit:l=!0,show:_=!0,active:c=!0,after:u="",view:f}){let[x,h]=m.useState(e),g=k=>{Ue.Open("M13","Regulations",S=>{h(S)})};return d?a.jsx(a.Fragment,{}):a.jsxs("dl",{"data-form":"select","data-view":f,children:[r?a.jsx("dt",{children:r}):"",a.jsx("dd",{onClick:g,"data-edit":(l&&c)+"","data-placeholder":i,"data-after":u,children:x}),o?a.jsx("dt",{children:o}):""]})}function gt(e){let t=e.value,n=f=>e.type==="multi"?f.replace(/[^+\d.+-]/g,""):f.replace(/[^+\d.]/g,""),i=(f,x)=>{let h=document.createRange(),g=window.getSelection();h.setStart(x.childNodes[0],f),h.collapse(!0),g.removeAllRanges(),g.addRange(h),x.focus()},r=f=>{e.onValue({value:n(f.target.textContent),name:e.name}),f.target.textContent=n(f.target.textContent),f.target.textContent.length>0&&i(f.target.textContent.length,f.target)},o=f=>{f.target.textContent===""&&(f.target.textContent=0),e.onValue({value:n(f.target.textContent),name:e.name}),f.target.textContent=A.Money(f.target.textContent)},d=f=>{f.target.textContent=n(f.target.textContent)},l=f=>{f.key==="Enter"&&f.preventDefault()},_=f=>{f.preventDefault(),navigator.clipboard.readText().then(x=>{x=x.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,x)}).catch(x=>{console.log("Something went wrong",x)})},c=()=>e.title?a.jsx("dt",{children:e.title}):"",u=()=>e.error?a.jsx("em",{children:e.error}):"";return a.jsxs("dl",{"data-form":"input",children:[c(),a.jsx("dd",{onInput:r,onPaste:_,onBlur:o,onKeyDown:l,onFocus:d,contentEditable:!0,suppressContentEditableWarning:!0,"e-after":e.after,children:A.Money(t)}),u()]})}function Cn({value:e,onValue:t,name:n,view:i,error:r,edit:o=!0,active:d=!0,title:l,placeholder:_="",after:c}){let[u,f]=m.useState(e);m.useEffect(()=>{f(e)},[e]);let x=k=>{f(k),t&&t({value:k,name:n})},h=k=>{if(!o||!d)return;const S=k.target.getBoundingClientRect(),y=S.left,C=S.top;ve.setListener("form",a.jsx(qr,{position:{x:y,y:C},onValue:x,date:u},new Date().getTime()))};const g={};return _&&(g.placeholder=_),a.jsx(a.Fragment,{children:i==="icon"?a.jsx("i",{"data-icon":"F043",onClick:h}):a.jsxs("dl",{children:[l&&a.jsx("dt",{children:l}),a.jsx("dd",{onClick:h,...g,children:A.Date(u,"mm.yyyy")}),r&&a.jsx("em",{children:r})]})})}const qr=e=>{let[t,n]=m.useState(!0),i=new Date,r=new Date(e.date),o={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},d={y:parseInt(r.getFullYear()),m:parseInt(r.getMonth())+1},[l,_]=m.useState(d.y),c=()=>{n(!1)},u=()=>{_(l+1)},f=()=>{_(l-1)},x=y=>{e.onValue(l+"-"+A.Number(2,y)),c()},h=y=>o.y===d.y&&o.m===y?"_FFEB3B":"",g=Array(12).fill("").map((y,C)=>C+1),k=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,S=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return a.jsx(a.Fragment,{children:t?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Se.o,onClick:()=>c()},new Date().getTime()),a.jsxs("div",{className:Se.c,style:{top:k+"px",left:S+"px"},children:[a.jsxs("s",{children:[a.jsx("i",{"data-icon":"F021",onClick:()=>f()}),a.jsx("h2",{children:l}),a.jsx("i",{"data-icon":"F022",onClick:()=>u()})]}),a.jsx("div",{children:g.map((y,C)=>a.jsx("span",{onClick:()=>{x(y)},color:h(y),children:a.jsx("b",{children:A.Month(y).abc})},C))})]})]}):""})};function jn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"",[i,r]=m.useState(!1),o=e.edit!==void 0?e.edit:!0,d=e.active!==void 0?e.active:!0,_=!!(e.hide&&(e.value===""||e.value===void 0))&&!(o&&d);i=o?!0:i;let c=e.placeholder!==void 0?e.placeholder:"Заметка пуста",u=k=>{e.onValue({value:k.target.innerText,name:e.name})},f=k=>{k.preventDefault(),navigator.clipboard.readText().then(S=>{window.document.execCommand("insertText",!1,S)}).catch(S=>{console.log("Something went wrong",S)})},x=k=>{o||r(!i)};const h={};h.field="notes",e.className&&(h.className=e.className);const g={};return c&&(g.placeholder=c),_?a.jsx(a.Fragment,{}):a.jsxs("dl",{...h,children:[t(),a.jsx("dd",{onPaste:f,onInput:u,contentEditable:o&&d?"plaintext-only":"false","data-edit":(o&&d)+"","data-open":""+i,...g,onDoubleClick:x,suppressContentEditableWarning:!0,children:e.value}),n()]})}function vt({onValue:e,active:t,max:n,edit:i,title:r,error:o,show:d,hide:l,value:_,placeholder:c,className:u,name:f,after:x,view:h}){let g=()=>r?a.jsx("dt",{children:r}):"",k=()=>o?a.jsx("em",{children:o}):"";i=i!==void 0?i:!0,t=t!==void 0?t:!0,l=!!(l&&(_===""||_===void 0))&&!(i&&t),c=c!==void 0?c:"",n=n!==void 0?n:99;let y=!1,C=O=>{e&&e({value:O.target.textContent,name:f})},I=O=>{if(!(y&&O.which===86)){if(O.which===17||O.which===91)return y=!0;O.key!=="Backspace"&&(O.target.textContent.length===n&&O.preventDefault(),O.key==="Enter"&&O.preventDefault(),isNaN(parseInt(String.fromCharCode(O.which)))&&O.preventDefault())}},M=O=>{if(O.which===17||O.which===91)return y=!1},w=O=>{O.preventDefault(),navigator.clipboard.readText().then(H=>{H=H.replace(/\D/g,""),console.log(H),window.document.execCommand("insertText",!1,""+H.replace(/\D/g,""))}).catch(H=>{console.log("Something went wrong",H)})};const L={};L.field="input",u&&(L.className=u);let z={};return i&&t?(z.edit="true",z.contentEditable="plaintext-only"):z.contentEditable="false",c&&(z.placeholder=c),x&&(z.after=x),l?a.jsx(a.Fragment,{}):a.jsxs("dl",{...L,children:[g(),a.jsx("dd",{...z,onPaste:w,onInput:C,onKeyDown:I,onKeyUp:M,suppressContentEditableWarning:!0,children:_}),k()]})}function Sn({value:e,onValue:t,name:n,placeholder:i="",className:r,title:o,error:d,edit:l=!0,active:_=!0,reload:c=!1,after:u=""}){let f=S=>{t&&t({value:S.target.textContent,name:n,reload:c})},x=S=>{S.key==="Enter"&&S.preventDefault()},h=S=>{S.preventDefault(),navigator.clipboard.readText().then(y=>{window.document.execCommand("insertText",!1,y.replace(/(\r\n|\n|\r)/gm," "))}).catch(y=>{console.log("Something went wrong",y)})};const g={};g.field="password",r&&(g.className=r);const k={};return i&&(k.placeholder=i),a.jsxs("dl",{...g,children:[o?a.jsx("dt",{children:o}):"",a.jsx("dd",{onPaste:h,onInput:f,onKeyDown:x,onBlur:be.Blur,contentEditable:l&&_?"plaintext-only":"false",...k,suppressContentEditableWarning:!0,children:e}),d?a.jsx("em",{children:d}):""]})}const bt={0:{name:"Heard Island and Mcdonald Islands",dial_code:"+0",code:"HM",mask:"+0(___) ___-__-__"},1:{name:"United States",dial_code:"+1",code:"US",mask:"+1(___) ___-__-__"},7:{name:"Russia",dial_code:"+7",code:"RU",mask:"+7(___) ___-__-__"},20:{name:"Egypt",dial_code:"+20",code:"EG",mask:"+20(___) ___-__-__"},27:{name:"South Africa",dial_code:"+27",code:"ZA",mask:"+27(___) __-__-__"},30:{name:"Greece",dial_code:"+30",code:"GR",mask:"+30(___) ___-__-__"},31:{name:"Netherlands",dial_code:"+31",code:"NL",mask:"+31(___) __-__-__"},32:{name:"Belgium",dial_code:"+32",code:"BE",mask:"+32(___) __-__-__"},33:{name:"France",dial_code:"+33",code:"FR",mask:"+33(___) __-__-__"},34:{name:"Spain",dial_code:"+34",code:"ES",mask:"+34(___) __-__-__"},36:{name:"Hungary",dial_code:"+36",code:"HU",mask:"+36(___) __-__-__"},39:{name:"Italy",dial_code:"+39",code:"IT",mask:"+39(___) ___-__-__"},40:{name:"Romania",dial_code:"+40",code:"RO",mask:"+40(___) __-__-__"},41:{name:"Switzerland",dial_code:"+41",code:"CH",mask:"+41(___) __-__-__"},43:{name:"Austria",dial_code:"+43",code:"AT",mask:"+43(__) ___-__-__"},44:{name:"United Kingdom",dial_code:"+44",code:"GB",mask:"+44(___) ___-__-__"},45:{name:"Denmark",dial_code:"+45",code:"DK",mask:"+45(__) __-__-__"},46:{name:"Sweden",dial_code:"+46",code:"SE",mask:"+46(___) __-__-__"},47:{name:"Svalbard and Jan Mayen",dial_code:"+47",code:"SJ",mask:"+47(__) __-__-__"},48:{name:"Poland",dial_code:"+48",code:"PL",mask:"+48(__) __-__-__"},49:{name:"Germany",dial_code:"+49",code:"DE",mask:"+49(___) ___-__-__"},51:{name:"Peru",dial_code:"+51",code:"PE",mask:"+51(___) __-__-__"},52:{name:"Mexico",dial_code:"+52",code:"MX",mask:"+52(__-__) ___-__-__"},53:{name:"Cuba",dial_code:"+53",code:"CU",mask:"+53(__) __-__-__"},54:{name:"Argentina",dial_code:"+54",code:"AR",mask:"+54(__-__) ___-__-__"},55:{name:"Brazil",dial_code:"+55",code:"BR",mask:"+55(___) ___-__-__"},56:{name:"Chile",dial_code:"+56",code:"CL",mask:"+56(___) __-__-__"},57:{name:"Colombia",dial_code:"+57",code:"CO",mask:"+57(___) ___-__-__"},58:{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",code:"VE",mask:"+58(___) ___-__-__"},60:{name:"Malaysia",dial_code:"+60",code:"MY",mask:"+60(___) __-__-__"},61:{name:"Cocos (Keeling) Islands",dial_code:"+61",code:"CC",mask:"+61(___) ___-__-__"},62:{name:"Indonesia",dial_code:"+62",code:"ID",mask:"+62(___) __-__-__"},63:{name:"Philippines",dial_code:"+63",code:"PH",mask:"+63(___) ___-__-__"},64:{name:"Pitcairn",dial_code:"+64",code:"PN",mask:"+64(___) __-__-__"},65:{name:"Singapore",dial_code:"+65",code:"SG",mask:"+65(__) __-__-__"},66:{name:"Thailand",dial_code:"+66",code:"TH",mask:"+66(___) __-__-__"},77:{name:"Kazakhstan",dial_code:"+77",code:"KZ",mask:"+77(__) ___-__-__"},81:{name:"Japan",dial_code:"+81",code:"JP",mask:"+81(___) ___-__-__"},82:{name:"Korea, Republic of South Korea",dial_code:"+82",code:"KR",mask:"+82(___) ___-__-__"},84:{name:"Vietnam",dial_code:"+84",code:"VN",mask:"+84(___) __-__-__"},86:{name:"China",dial_code:"+86",code:"CN",mask:"+86(__-__) ___-__-__"},90:{name:"Turkey",dial_code:"+90",code:"TR",mask:"+90(___) ___-__-__"},91:{name:"India",dial_code:"+91",code:"IN",mask:"+91(___) ___-__-__"},92:{name:"Pakistan",dial_code:"+92",code:"PK",mask:"+92(___) ___-__-__"},93:{name:"Afghanistan",dial_code:"+93",code:"AF",mask:"+93(__) ___-__-__"},94:{name:"Sri Lanka",dial_code:"+94",code:"LK",mask:"+94(___) __-__-__"},95:{name:"Myanmar",dial_code:"+95",code:"MM",mask:"+95(___) ___-__-__"},98:{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",code:"IR",mask:"+98(___) ___-__-__"},211:{name:"South Sudan",dial_code:"+211",code:"SS",mask:"+211(___) ___-__-__"},212:{name:"Morocco",dial_code:"+212",code:"MA",mask:"+212(___) __-__-__"},213:{name:"Algeria",dial_code:"+213",code:"DZ",mask:"+213(__) ___-__-__"},216:{name:"Tunisia",dial_code:"+216",code:"TN",mask:"+216(__) __-__-__"},218:{name:"Libyan Arab Jamahiriya",dial_code:"+218",code:"LY",mask:"+218(___) ___-__-__"},220:{name:"Gambia",dial_code:"+220",code:"GM",mask:"+220(___) __-__"},221:{name:"Senegal",dial_code:"+221",code:"SN",mask:"+221(___) __-__-__"},222:{name:"Mauritania",dial_code:"+222",code:"MR",mask:"+222(__) __-__-__"},223:{name:"Mali",dial_code:"+223",code:"ML",mask:"+223(__) __-__-__"},224:{name:"Guinea",dial_code:"+224",code:"GN",mask:"+224(__) __-__-__"},225:{name:"Cote d'Ivoire",dial_code:"+225",code:"CI",mask:"+225(__) __-__-__"},226:{name:"Burkina Faso",dial_code:"+226",code:"BF",mask:"+226(__) __-__-__"},227:{name:"Niger",dial_code:"+227",code:"NE",mask:"+227(__) __-__-__"},228:{name:"Togo",dial_code:"+228",code:"TG",mask:"+228(__) __-__-__"},229:{name:"Benin",dial_code:"+229",code:"BJ",mask:"+229(__) __-__-__"},230:{name:"Mauritius",dial_code:"+230",code:"MU",mask:"+230(___) __-__"},231:{name:"Liberia",dial_code:"+231",code:"LR",mask:"+231(___) __-__"},232:{name:"Sierra Leone",dial_code:"+232",code:"SL",mask:"+232(__) __-__-__"},233:{name:"Ghana",dial_code:"+233",code:"GH",mask:"+233(___) __-__-__"},234:{name:"Nigeria",dial_code:"+234",code:"NG",mask:"+234(___) ___-__-__"},235:{name:"Chad",dial_code:"+235",code:"TD",mask:"+235(__) __-__-__"},236:{name:"Central African Republic",dial_code:"+236",code:"CF",mask:"+236(__) __-__-__"},237:{name:"Cameroon",dial_code:"+237",code:"CM",mask:"+237(__) __-__-__"},238:{name:"Cape Verde",dial_code:"+238",code:"CV",mask:"+238(___) __-__"},239:{name:"Sao Tome and Principe",dial_code:"+239",code:"ST",mask:"+239(___) ___-__-__"},240:{name:"Equatorial Guinea",dial_code:"+240",code:"GQ",mask:"+240(___) __-__-__"},241:{name:"Gabon",dial_code:"+241",code:"GA",mask:"+241(__) __-__-__"},242:{name:"Congo",dial_code:"+242",code:"CG",mask:"+242(___) __-__-__"},243:{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",code:"CD",mask:"+243(___) ___-__-__"},244:{name:"Angola",dial_code:"+244",code:"AO",mask:"+244(__) ___-__-__"},245:{name:"Guinea-Bissau",dial_code:"+245",code:"GW",mask:"+245(___) __-__"},246:{name:"British Indian Ocean Territory",dial_code:"+246",code:"IO",mask:"+246(___) ___-__-__"},248:{name:"Seychelles",dial_code:"+248",code:"SC",mask:"+248(___) ___-__-__"},249:{name:"Sudan",dial_code:"+249",code:"SD",mask:"+249(___) __-__-__"},250:{name:"Rwanda",dial_code:"+250",code:"RW",mask:"+250(___) __-__-__"},251:{name:"Ethiopia",dial_code:"+251",code:"ET",mask:"+251(___) __-__-__"},252:{name:"Somalia",dial_code:"+252",code:"SO",mask:"+252(___) ___-__-__"},253:{name:"Djibouti",dial_code:"+253",code:"DJ",mask:"+253(___) ___-__-__"},254:{name:"Kenya",dial_code:"+254",code:"KE",mask:"+254(___) __-__-__"},255:{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",code:"TZ",mask:"+255(___) __-__-__"},256:{name:"Uganda",dial_code:"+256",code:"UG",mask:"+256(___) __-__-__"},257:{name:"Burundi",dial_code:"+257",code:"BI",mask:"+257(__) __-__-__"},258:{name:"Mozambique",dial_code:"+258",code:"MZ",mask:"+258(___) __-__-__"},260:{name:"Zambia",dial_code:"+260",code:"ZM",mask:"+260(___) __-__-__"},261:{name:"Madagascar",dial_code:"+261",code:"MG",mask:"+261(___) __-__-__"},262:{name:"Reunion",dial_code:"+262",code:"RE",mask:"+262(___) __-__-__"},263:{name:"Zimbabwe",dial_code:"+263",code:"ZW",mask:"+263(___) __-__-__"},264:{name:"Namibia",dial_code:"+264",code:"NA",mask:"+264(___) __-__-__"},265:{name:"Malawi",dial_code:"+265",code:"MW",mask:"+265(___) __-__-__"},266:{name:"Lesotho",dial_code:"+266",code:"LS",mask:"+266(__) __-__-__"},267:{name:"Botswana",dial_code:"+267",code:"BW",mask:"+267(__) __-__-__"},268:{name:"Swaziland",dial_code:"+268",code:"SZ",mask:"+268(___) ___-__-__"},269:{name:"Comoros",dial_code:"+269",code:"KM",mask:"+269(___) __-__"},290:{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",code:"SH",mask:"+290(___) ___-__-__"},291:{name:"Eritrea",dial_code:"+291",code:"ER",mask:"+291(___) ___-__-__"},297:{name:"Aruba",dial_code:"+297",code:"AW",mask:"+297(_) __-__-__"},298:{name:"Faroe Islands",dial_code:"+298",code:"FO",mask:"+298(__) __-__"},299:{name:"Greenland",dial_code:"+299",code:"GL",mask:"+299(__) __-__"},345:{name:"Cayman Islands",dial_code:"+ 345",code:"KY",mask:"+345(___) ___-__-__"},350:{name:"Gibraltar",dial_code:"+350",code:"GI",mask:"+350(__) __-__-__"},351:{name:"Portugal",dial_code:"+351",code:"PT",mask:"+351(___) __-__-__"},352:{name:"Luxembourg",dial_code:"+352",code:"LU",mask:"+352(___) __-__-__"},353:{name:"Ireland",dial_code:"+353",code:"IE",mask:"+353(___) __-__-__"},354:{name:"Iceland",dial_code:"+354",code:"IS",mask:"+354(___) __-__"},355:{name:"Albania",dial_code:"+355",code:"AL",mask:"+355(__) ___-__-__"},356:{name:"Malta",dial_code:"+356",code:"MT",mask:"+356(__) __-__-__"},357:{name:"Cyprus",dial_code:"+357",code:"CY",mask:"+357(__) __-__-__"},358:{name:"Finland",dial_code:"+358",code:"FI",mask:"+358(___) __-__-__"},359:{name:"Bulgaria",dial_code:"+359",code:"BG",mask:"+359(___) __-__-__"},370:{name:"Lithuania",dial_code:"+370",code:"LT",mask:"+370(_) ___-__-__"},371:{name:"Latvia",dial_code:"+371",code:"LV",mask:"+371(__) __-__-__"},372:{name:"Estonia",dial_code:"+372",code:"EE",mask:"+372(__) __-__-__"},373:{name:"Moldova",dial_code:"+373",code:"MD",mask:"+373(__) __-__-__"},374:{name:"Armenia",dial_code:"+374",code:"AM",mask:"+374(_) ___-__-__"},375:{name:"Belarus",dial_code:"+375",code:"BY",mask:"+375(__) ___-__-__"},376:{name:"Andorra",dial_code:"+376",code:"AD",mask:"+376(_) _-__-__"},377:{name:"Monaco",dial_code:"+377",code:"MC",mask:"+377(___) __-__-__"},378:{name:"San Marino",dial_code:"+378",code:"SM",mask:"+378(__) __-__-__"},379:{name:"Holy See (Vatican City State)",dial_code:"+379",code:"VA",mask:"+379(___) ___-__-__"},380:{name:"Ukraine",dial_code:"+380",code:"UA",mask:"+380(__) ___-__-__"},381:{name:"Serbia",dial_code:"+381",code:"RS",mask:"+381(__) __-__-__"},382:{name:"Montenegro",dial_code:"+382",code:"ME",mask:"+382(___) ___-__-__"},383:{name:"Kosovo",dial_code:"+383",code:"XK",mask:"+383(___) __-__"},385:{name:"Croatia",dial_code:"+385",code:"HR",mask:"+385(__) __-__-__"},386:{name:"Slovenia",dial_code:"+386",code:"SI",mask:"+386(__) __-__-__"},387:{name:"Bosnia and Herzegovina",dial_code:"+387",code:"BA",mask:"+387(__) __-__-__"},389:{name:"Macedonia",dial_code:"+389",code:"MK",mask:"+389(__) __-__-__"},420:{name:"Czech Republic",dial_code:"+420",code:"CZ",mask:"+420(___) __-__-__"},421:{name:"Slovakia",dial_code:"+421",code:"SK",mask:"+421(___) __-__-__"},423:{name:"Liechtenstein",dial_code:"+423",code:"LI",mask:"+423(___) __-__-__"},500:{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",code:"GS",mask:"+500(___) ___-__-__"},501:{name:"Belize",dial_code:"+501",code:"BZ",mask:"+501(___) __-__"},502:{name:"Guatemala",dial_code:"+502",code:"GT",mask:"+502(__) __-__-__"},503:{name:"El Salvador",dial_code:"+503",code:"SV",mask:"+503(__) __-__-__"},504:{name:"Honduras",dial_code:"+504",code:"HN",mask:"+504(__) __-__-__"},505:{name:"Nicaragua",dial_code:"+505",code:"NI",mask:"+505(__) __-__-__"},506:{name:"Costa Rica",dial_code:"+506",code:"CR",mask:"+506(__) __-__-__"},507:{name:"Panama",dial_code:"+507",code:"PA",mask:"+507(__) __-__-__"},508:{name:"Saint Pierre and Miquelon",dial_code:"+508",code:"PM",mask:"+508(___) ___-__-__"},509:{name:"Haiti",dial_code:"+509",code:"HT",mask:"+509(__) __-__-__"},590:{name:"Saint Martin",dial_code:"+590",code:"MF",mask:"+590(___) __-__-__"},591:{name:"Bolivia, Plurinational State of bolivia",dial_code:"+591",code:"BO",mask:"+591(__) __-__-__"},592:{name:"Guyana",dial_code:"+592",code:"GY",mask:"+592(___) ___-__-__"},593:{name:"Ecuador",dial_code:"+593",code:"EC",mask:"+593(___) __-__-__"},594:{name:"French Guiana",dial_code:"+594",code:"GF",mask:"+594(___) __-__-__"},595:{name:"Paraguay",dial_code:"+595",code:"PY",mask:"+595(___) __-__-__"},596:{name:"Martinique",dial_code:"+596",code:"MQ",mask:"+596(___) __-__-__"},597:{name:"Suriname",dial_code:"+597",code:"SR",mask:"+597(___) __-__"},598:{name:"Uruguay",dial_code:"+598",code:"UY",mask:"+598(__) __-__-__"},599:{name:"Netherlands Antilles",dial_code:"+599",code:"AN",mask:"+599(__) __-__-__"},670:{name:"Timor-Leste",dial_code:"+670",code:"TL",mask:"+670(__) __-__-__"},672:{name:"Norfolk Island",dial_code:"+672",code:"NF",mask:"+672(___) ___-__-__"},673:{name:"Brunei Darussalam",dial_code:"+673",code:"BN",mask:"+673(___) __-__"},674:{name:"Nauru",dial_code:"+674",code:"NR",mask:"+674(___) __-__"},675:{name:"Papua New Guinea",dial_code:"+675",code:"PG",mask:"+675(___) __-__"},676:{name:"Tonga",dial_code:"+676",code:"TO",mask:"+676(___) __-__"},677:{name:"Solomon Islands",dial_code:"+677",code:"SB",mask:"+677(___) __-__"},678:{name:"Vanuatu",dial_code:"+678",code:"VU",mask:"+678(___) __-__"},679:{name:"Fiji",dial_code:"+679",code:"FJ",mask:"+679(___) __-__"},680:{name:"Palau",dial_code:"+680",code:"PW",mask:"+680(___) ___-__-__"},681:{name:"Wallis and Futuna",dial_code:"+681",code:"WF",mask:"+681(___) ___-__-__"},682:{name:"Cook Islands",dial_code:"+682",code:"CK",mask:"+682(_) __-__"},683:{name:"Niue",dial_code:"+683",code:"NU",mask:"+683(___) ___-__-__"},685:{name:"Samoa",dial_code:"+685",code:"WS",mask:"+685(__) __-__"},686:{name:"Kiribati",dial_code:"+686",code:"KI",mask:"+686(___) ___-__-__"},687:{name:"New Caledonia",dial_code:"+687",code:"NC",mask:"+687(__) __-__"},688:{name:"Tuvalu",dial_code:"+688",code:"TV",mask:"+688(___) ___-__-__"},689:{name:"French Polynesia",dial_code:"+689",code:"PF",mask:"+689(__) __-__"},690:{name:"Tokelau",dial_code:"+690",code:"TK",mask:"+690(___) ___-__-__"},691:{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",code:"FM",mask:"+691(___) ___-__-__"},692:{name:"Marshall Islands",dial_code:"+692",code:"MH",mask:"+692(___) ___-__-__"},850:{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",code:"KP",mask:"+850(___) ___-__-__"},852:{name:"Hong Kong",dial_code:"+852",code:"HK",mask:"+852(__) __-__-__"},853:{name:"Macao",dial_code:"+853",code:"MO",mask:"+853(__) __-__-__"},855:{name:"Cambodia",dial_code:"+855",code:"KH",mask:"+855(__) __-__-__"},856:{name:"Laos",dial_code:"+856",code:"LA",mask:"+856(___) ___-__-__"},880:{name:"Bangladesh",dial_code:"+880",code:"BD",mask:"+880(___) ___-__-__"},886:{name:"Taiwan",dial_code:"+886",code:"TW",mask:"+886(___) __-__-__"},960:{name:"Maldives",dial_code:"+960",code:"MV",mask:"+960(___) __-__"},961:{name:"Lebanon",dial_code:"+961",code:"LB",mask:"+961(__) __-__-__"},962:{name:"Jordan",dial_code:"+962",code:"JO",mask:"+962(___) __-__-__"},963:{name:"Syrian Arab Republic",dial_code:"+963",code:"SY",mask:"+963(___) __-__-__"},964:{name:"Iraq",dial_code:"+964",code:"IQ",mask:"+964(___) ___-__-__"},965:{name:"Kuwait",dial_code:"+965",code:"KW",mask:"+965(__) __-__-__"},966:{name:"Saudi Arabia",dial_code:"+966",code:"SA",mask:"+966(___) __-__-__"},967:{name:"Yemen",dial_code:"+967",code:"YE",mask:"+967(___) __-__-__"},968:{name:"Oman",dial_code:"+968",code:"OM",mask:"+968(__) __-__-__"},970:{name:"Palestinian Territory, Occupied",dial_code:"+970",code:"PS",mask:"+970(___) __-__-__"},971:{name:"United Arab Emirates",dial_code:"+971",code:"AE",mask:"+971(___) __-__-__"},972:{name:"Israel",dial_code:"+972",code:"IL",mask:"+972(___) __-__-__"},973:{name:"Bahrain",dial_code:"+973",code:"BH",mask:"+973(__) __-__-__"},974:{name:"Qatar",dial_code:"+974",code:"QA",mask:"+974(__) __-__-__"},975:{name:"Bhutan",dial_code:"+975",code:"BT",mask:"+975(__) __-__-__"},976:{name:"Mongolia",dial_code:"+976",code:"MN",mask:"+976(__) __-__-__"},977:{name:"Nepal",dial_code:"+977",code:"NP",mask:"+977(___) ___-__-__"},992:{name:"Tajikistan",dial_code:"+992",code:"TJ",mask:"+992(___) __-__-__"},993:{name:"Turkmenistan",dial_code:"+993",code:"TM",mask:"+993(__) __-__-__"},994:{name:"Azerbaijan",dial_code:"+994",code:"AZ",mask:"+994(__) ___-__-__"},995:{name:"Georgia",dial_code:"+995",code:"GE",mask:"+995(___) __-__-__"},996:{name:"Kyrgyzstan",dial_code:"+996",code:"KG",mask:"+996(___) __-__-__"},998:{name:"Uzbekistan",dial_code:"+998",code:"UZ",mask:"+998(___) __-__-__"},1242:{name:"Bahamas",dial_code:"+1242",code:"BS",mask:"+1242(___) __-__"},1246:{name:"Barbados",dial_code:"+1246",code:"BB",mask:"+1246(___) __-__"},1264:{name:"Anguilla",dial_code:"+1264",code:"AI",mask:"+1264(___) ___-__-__"},1268:{name:"Antigua and Barbuda",dial_code:"+1268",code:"AG",mask:"+1268(_) __-__"},1284:{name:"Virgin Islands, British",dial_code:"+1284",code:"VG",mask:"+1284(___) __-__"},1340:{name:"Virgin Islands, U.S.",dial_code:"+1340",code:"VI",mask:"+1340(___) ___-__-__"},1441:{name:"Bermuda",dial_code:"+1441",code:"BM",mask:"+1441(___) __-__"},1473:{name:"Grenada",dial_code:"+1473",code:"GD",mask:"+1473(___) __-__"},1649:{name:"Turks and Caicos Islands",dial_code:"+1649",code:"TC",mask:"+1649(___) ___-__-__"},1664:{name:"Montserrat",dial_code:"+1664",code:"MS",mask:"+1664(___) ___-__-__"},1670:{name:"Northern Mariana Islands",dial_code:"+1670",code:"MP",mask:"+1670(___) ___-__-__"},1671:{name:"Guam",dial_code:"+1671",code:"GU",mask:"+1671(___) ___-__-__"},1684:{name:"American Samoa",dial_code:"+1684",code:"AS",mask:"+1684(___) ___-__-__"},1758:{name:"Saint Lucia",dial_code:"+1758",code:"LC",mask:"+1758(___) __-__"},1767:{name:"Dominica",dial_code:"+1767",code:"DM",mask:"+1767(___) __-__"},1784:{name:"Saint Vincent and the Grenadines",dial_code:"+1784",code:"VC",mask:"+1784(___) __-__"},1849:{name:"Dominican Republic",dial_code:"+1849",code:"DO",mask:"+1849(___) ___-__-__"},1868:{name:"Trinidad and Tobago",dial_code:"+1868",code:"TT",mask:"+1868(___) __-__"},1869:{name:"Saint Kitts and Nevis",dial_code:"+1869",code:"KN",mask:"+1869(___) __-__"},1876:{name:"Jamaica",dial_code:"+1876",code:"JM",mask:"+1876(___) __-__"},1939:{name:"Puerto Rico",dial_code:"+1939",code:"PR",mask:"+1939(___) ___-__-__"}};function kt({value:e,onValue:t,name:n,placeholder:i="",title:r="",error:o="",hide:d=!1,edit:l=!0,active:_=!0,after:c="",show:u=!0,view:f,className:x=""}){l=l!==void 0?l:!0,_=_!==void 0?_:!0,d=!!(d&&(e===""||e===void 0))&&!(l&&_),m.useRef(null);let g="+_(___) ___-__-__",k=!0,S=0,y=(Y,P)=>{let se=document.createRange(),W=window.getSelection();se.setStart(P.childNodes[0],Y),se.collapse(!0),W.removeAllRanges(),W.addRange(se),P.focus()},C=Y=>{Y.preventDefault(),navigator.clipboard.readText().then(P=>{window.document.execCommand("insertText",!1,P)}).catch(P=>{console.log("Something went wrong",P)})},I=Y=>{let P=0,se="",W=Y.replace(/\D/g,"");W===""&&(k=!0);let ce=W.split(""),X="";ce.forEach(Je=>{k&&(X+=Je,bt[X]!==void 0&&k?(k=!1,g=bt[X].mask.replace(new RegExp("[0-9]","g"),"_"),se=bt[X].code):(k&&(S=(""+X).length,g=`+${X}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),se=""),S>(""+X).length&&(k=!0,g=`+${X}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),se="")))});let Ae=g.replace(/\D/g,"");return Ae.length>=W.length&&(W=Ae),{q:g.replace(/[_\d]/g,function(){return W.charAt(P++)||"_"}),i:P,v:W,f:se}},M=Y=>{Y.preventDefault(),navigator.clipboard.writeText(Y.target.textContent.replace(/\D/g,"")).then(function(){we.Copy("Данные в буфер обмене")},function(P){console.error("Async: Could not copy text: ",P)})},w=I(e),L=Y=>{let P=I(Y.target.textContent);Y.target.textContent=P.q,P.i=P.q.lastIndexOf(P.v.substr(-1)),P.i<P.q.length&&P.q!==g?P.i++:P.i=P.q.indexOf("_"),y(P.i,Y.target),t&&t({value:P.q.replace(/\D/g,""),name:n})},z=Y=>{Y.key==="Enter"&&Y.preventDefault()};const O={};O.field="input",x&&(O.className=x);let H={};return l&&_?(H.edit="true",H.contentEditable="plaintext-only"):H.contentEditable="false",i&&(H.placeholder=i),c&&(H.after=c),d?a.jsx(a.Fragment,{}):a.jsxs("dl",{...O,children:[r&&a.jsx("dt",{children:r}),a.jsx("dd",{...H,onPaste:C,onInput:L,onKeyDown:z,onContextMenu:M,suppressContentEditableWarning:!0,children:w.q}),o&&a.jsx("em",{children:o})]})}const En=e=>{let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,r=e.placeholder!==void 0?e.placeholder:"",o=0,d=()=>{clearTimeout(o),o=setTimeout(()=>console.log("rerrwere"),1e3)},l=u=>{u.key==="Enter"&&u.preventDefault()},_=u=>{u.preventDefault(),navigator.clipboard.readText().then(f=>{window.document.execCommand("insertText",!1,f)}).catch(f=>{console.log("Something went wrong",f)})};const c={};return r&&(c.placeholder=r),a.jsxs("dl",{"data-form":"input",children:[t(),a.jsx("dd",{onPaste:_,onInput:d,onKeyDown:l,contentEditable:n&&i?"plaintext-only":"false",...c,suppressContentEditableWarning:!0,children:e.value})]})};function yt({title:e,error:t,edit:n=!0,active:i=!0,hide:r,value:o="0",onValue:d,options:l,placeholder:_="",name:c,after:u,view:f}){const x=m.useRef();r=!!(r&&(o===""||l[o].n===void 0))&&!(n&&i);let g=o!==void 0&&o!==""?l[o].n:o,k=I=>{x.current.textContent=l[I].n,d&&d({value:I,name:c})},S=I=>{if(!(n&&i))return;const M=I.target.getBoundingClientRect();ve.setListener("form",a.jsx(Jr,{parent:M,onValue:k,view:f,options:l},new Date().getTime()))},y={field:"select"},C={onClick:S};return n&&i&&(C.edit="true"),_&&(C.placeholder=_),u&&(C.after=u),r?"":a.jsxs("dl",{...y,children:[e&&a.jsx("dt",{children:e}),a.jsx("dd",{...C,ref:x,children:g}),t&&a.jsx("em",{children:t})]})}const Jr=({onValue:e,parent:t,view:n,options:i})=>{let[r,o]=m.useState(!0),d=()=>{o(!1)},l=u=>{o(!1),e(u)},_=window.innerHeight-t.y+t.height<320?t.y-312:t.y+33,c=window.innerWidth-t.x<265?t.x-235:t.x;return a.jsx(a.Fragment,{children:r?a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-select":"backdrop",onClick:d},new Date().getTime()),a.jsx("div",{"data-select":"background "+n,style:{top:_+"px",left:c+"px",width:t.width},children:a.jsx("ul",{children:Object.keys(i).map((u,f)=>i[u].s===1?a.jsx("li",{onClick:()=>{l(u)},children:i[u].n},f):"")})})]}):""})};function wt(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"",i=e.edit!==void 0?e.edit:!0,r=e.active!==void 0?e.active:!0,d=!!(e.hide&&(e.default===""||e.options[e.default]===void 0))&&!(i&&r),l=e.placeholder!==void 0?e.placeholder:"",_=h=>{u(e.options[h]),e.onValue({value:h,name:e.name})},[c,u]=m.useState(e.default!==void 0?e.options[e.default]:e.default),f=h=>{if(!(i&&r))return;const g=h.target.getBoundingClientRect();ve.setListener("form",a.jsx(Xr,{parent:g,onValue:_,view:e.view,options:e.options},new Date().getTime()))};const x={};return l&&(x.placeholder=l),d?a.jsx(a.Fragment,{}):a.jsxs("dl",{"data-form":"select",children:[t(),a.jsx("dd",{onClick:f,"data-edit":(i&&r)+"",...x,children:c}),n()]})}const Xr=({onValue:e,parent:t,view:n,options:i})=>{let[r,o]=m.useState(!0),d=()=>{o(!1)},l=f=>{o(!1),e(f)},_=Object.keys(i).length*36,c=window.innerHeight-t.y+t.height<_?t.y-(_-33):t.y+33,u=window.innerWidth-t.x<265?t.x-235:t.x;return a.jsx(a.Fragment,{children:r?a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-select":"backdrop",onClick:d},new Date().getTime()),a.jsx("div",{"data-select":"background "+n,style:{top:c+"px",left:u+"px",width:t.width},children:a.jsx("ul",{children:Object.keys(i).map((f,x)=>a.jsx("li",{onClick:()=>{l(f)},children:i[f]},x))})})]}):""})};function Ct({set:e,value:t,onValue:n,name:i,placeholder:r="",title:o="",error:d="",hide:l=!1,edit:_=!0,show:c=!0,active:u=!0,after:f="",view:x,item:h,className:g=""}){let k={};switch(e){case"Input":return a.jsx(Oe,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g});case"Select":return h&&(k=ne.getSelect(parseInt(h))?ne.getSelect(parseInt(h)):{0:{s:"1",n:"не известно"}}),a.jsx(yt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g,options:k});case"Users":return ne.getSelect("user"),a.jsx(wt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g,options:k});case"Date":return a.jsx(xt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g});case"Phone":return a.jsx(kt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g});case"Number":return a.jsx(vt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g});case"Money":return a.jsx(gt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g});case"Modal":return a.jsx(ht,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g})}}function Nn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"",i=e.edit!==void 0?e.edit:!0,r=e.active!==void 0?e.active:!0,o=e.placeholder!==void 0?e.placeholder:"",d=c=>{e.onValue({value:c.target.innerText,name:e.name})},l=c=>{c.preventDefault(),navigator.clipboard.readText().then(u=>{window.document.execCommand("insertText",!1,u)}).catch(u=>{console.log("Something went wrong",u)})};const _={};return o&&(_.placeholder=o),a.jsxs("dl",{children:[t(),a.jsx("dd",{onPaste:l,className:e.className,ref:e.useRef,onInput:d,contentEditable:i&&r?"plaintext-only":"false",..._,suppressContentEditableWarning:!0,children:e.value}),n()]})}function Tn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"";e.edit!==void 0&&e.edit,e.active!==void 0&&e.active;let i=e.placeholder!==void 0?e.placeholder:"",r=A.Date(e.value===void 0?new Date:e.value,"HH:MM"),o=m.useRef(null),d=u=>{o.current.textContent=u,e.onValue&&e.onValue({value:u,name:e.name})},l=u=>{e.onSave&&e.onSave({value:u,name:e.name})},_=u=>{const f=u.target.getBoundingClientRect(),x=f.left,h=f.top;ve.setListener("form",a.jsx(Qr,{position:{x,y:h},onSave:l,onValue:d,date:r},new Date().getTime()))};const c={};return i&&(c.placeholder=i),a.jsx(a.Fragment,{children:e.view==="icon"?a.jsx("i",{"data-icon":"F043",onClick:_}):a.jsxs("dl",{children:[t(),a.jsx("dd",{onClick:_,ref:o,...c,children:r}),n()]})})}const Qr=e=>{let t=e.date.split(":"),n={h:A.Number(2,t[0]),m:A.Number(2,t[1])},i="hour",[r,o]=m.useState({}),d=!1,l=0,_=0,c={body:m.useRef(null),time:m.useRef(null),hour:m.useRef(null),timeText:m.useRef(null),hourText:m.useRef(null)};m.useEffect(()=>{o(c.body.current.getBoundingClientRect()),c.hour.current.style.transform="rotate("+n.h*15+"deg)",c.time.current.style.transform="rotate("+n.m*6+"deg)"},[c.body,c.hour,c.time,n.m,n.h]);let u=()=>{d=!0},f=()=>{d=!1,i=i==="hour"?"time":"hour",c.body.current.setAttribute("active",i)},x=I=>{if(d){let w=Math.atan2(I.pageX-(r.x+78),I.pageY-(r.y+78))*(180/Math.PI)*-1+180;c[i].current.style.transform="rotate("+w+"deg)",i==="hour"?(n={...n,h:A.Number(2,parseInt(String(w/15),10))},c.hourText.current.textContent=n.h):(n={...n,m:A.Number(2,parseInt(String(w/6),10))},c.timeText.current.textContent=n.m),e.onValue(n.h+":"+n.m)}},h=I=>{if(i==="hour")if(I.deltaY>0){l+=I.deltaY;let M=parseInt(String(l/50));if(_!==M){_=M;let w=parseInt(n.h,10)+1;w=w>23?0:w,n={...n,h:A.Number(2,w)},c.hourText.current.textContent=n.h,c[i].current.style.transform="rotate("+n.h*15+"deg)"}}else{l-=I.deltaY;let M=parseInt(String(l/50));if(_!==M){_=M;let w=parseInt(n.h,10)-1;w=w<0?23:w,n={...n,h:A.Number(2,w)},c.hourText.current.textContent=n.h,c[i].current.style.transform="rotate("+n.h*15+"deg)"}}else if(I.deltaY>0){l+=I.deltaY;let M=parseInt(String(l/50));if(_!==M){_=M;let w=parseInt(n.m,10)+1;w=w>59?0:w,n={...n,m:A.Number(2,w)},c.timeText.current.textContent=n.m,c[i].current.style.transform="rotate("+n.m*6+"deg)"}}else{l-=I.deltaY;let M=parseInt(String(l/50));if(_!==M){_=M;let w=parseInt(n.m,10)-1;w=w<0?59:w,n={...n,m:A.Number(2,w)},c.timeText.current.textContent=n.m,c[i].current.style.transform="rotate("+n.m*6+"deg)"}}e.onValue(n.h+":"+n.m)},[g,k]=m.useState(!0),S=()=>{k(!1),e.onSave(n.h+":"+n.m)},y=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,C=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return a.jsx(a.Fragment,{children:g?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Se.o,onClick:()=>S()},new Date().getTime()),a.jsx("div",{className:Se.c,onMouseDown:u,onMouseUp:f,onMouseMove:x,onWheel:h,ref:c.body,style:{top:y+"px",left:C+"px"},children:"xxxx"})]}):""})};function In({onValue:e,label:t,value:n,className:i,name:r,reload:o}){n=!!n;const[d,l]=m.useState(n),_=()=>{let f=!d;console.log(f),e({name:r,value:f,reload:o}),l(f)},c={};c.field="check",i&&(c.className=i);const u={};return d&&(u.active=""),a.jsxs("dl",{...c,children:[t?a.jsx("dt",{children:t}):"",a.jsx("dd",{...u,onClick:_})]})}const Ee={};function eo(e){const[t,n]=m.useState({}),i=m.useRef(e);return Ee.u=r=>{i.current[r.name]=r.value},Ee.r=()=>{n(Date.now())},i.current}function to(e){Ee.u(e),e.reload&&Ee.r()}function no(){Ee.r&&Ee.r()}const ao={Color:wn,Date:xt,Code:yn,Check:In,Switch:hn,Input:Oe,Button:gn,Message:vn,Generator:bn,Captcha:kn,Modal:ht,Money:gt,Month:Cn,Notes:jn,Number:vt,Password:Sn,Phone:kt,Search:En,Select:yt,Set:Ct,Textarea:Nn,Time:Tn,Users:wt,String:Oe,Form:Ct,runReload:no,useData:eo,setValue:to},io={Color:wn,Date:xt,Code:yn,Check:In,Switch:hn,Input:Oe,Button:gn,Message:vn,Generator:bn,Captcha:kn,Modal:ht,Money:gt,Month:Cn,Notes:jn,Number:vt,Password:Sn,Phone:kt,Search:En,Select:yt,Set:Ct,Textarea:Nn,Time:Tn,Users:wt,String:Oe},Dn={spinner:"_spinner_1ul0m_1",l:"_l_1ul0m_75",loadingB:"_loadingB_1ul0m_1"};function ro(){return a.jsx("div",{className:Dn.spinner,children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:a.jsx("path",{d:"M264,492a22.2,22.2,0,0,0,22-22V411a22.2,22.2,0,0,0-22-22H236a22.2,22.2,0,0,0-22,22v59a22.2,22.2,0,0,0,22,22Zm74-134a23.9,23.9,0,0,0-6,16,20.35,20.35,0,0,0,6,15l42,42q7,7,16,7,10,0,16-7l20-20a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16l-42-42q-7-7-16-7-8,0-15,7ZM163,389a18.94,18.94,0,0,0,7-15q0-9-7-16l-20-20q-7-7-16-7-8,0-15,7L70,380q-7,7-7,16a18.94,18.94,0,0,0,7,15l20,20q7,7,16,7a18.94,18.94,0,0,0,15-7ZM112,237a22.2,22.2,0,0,0-22-22H31a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,9,237v28a21.17,21.17,0,0,0,6.5,15.5A21.17,21.17,0,0,0,31,287H90a22.2,22.2,0,0,0,22-22Zm358,50a22.2,22.2,0,0,0,22-22V237a22.2,22.2,0,0,0-22-22H411a22.2,22.2,0,0,0-22,22v28a22.2,22.2,0,0,0,22,22ZM163,142q7-7,7-15.5T163,111L121,69q-7-7-15-7-7,0-16,7L70,89q-7,7-7,16a18.94,18.94,0,0,0,7,15l42,42a18.94,18.94,0,0,0,15,7q10,0,16-7Zm269-22a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16L412,69q-7-7-16-7-7,0-16,7l-42,42q-7,8-7,16t7,15l21,20a18.94,18.94,0,0,0,15,7q10,0,16-7Zm-168-9a22.06,22.06,0,0,0,15.5-6q6.5-6,6.5-16V30a21.17,21.17,0,0,0-6.5-15.5A21.17,21.17,0,0,0,264,8H236a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,214,30V89q0,10,6.5,16a22.06,22.06,0,0,0,15.5,6Z",transform:"translate(-9 -8)"})})})}function oo(){return a.jsxs("div",{className:Dn.l,children:[a.jsx("i",{}),a.jsx("i",{}),a.jsx("i",{})]})}const so={Spinner:ro,Inline:oo},lo={s:"_s_t9swc_1"};let jt;function co(){let e=r=>{jt(r.target.textContent)},t=r=>{r.key==="Enter"&&r.preventDefault()},n=r=>{r.preventDefault(),navigator.clipboard.readText().then(o=>{window.document.execCommand("insertText",!1,o)}).catch(o=>{console.log("Something went wrong",o)})};const i={};return i.placeholder="Что искать?",a.jsx("div",{className:lo.s,onPaste:n,onInput:e,onKeyDown:t,contentEditable:"true",...i,suppressContentEditableWarning:!0})}function _o(e,t,n){let i=[],r=1,o=0,d={},l=50;return d[r]=[],e.forEach(_=>{_.text.toLowerCase().indexOf(t)>-1&&i.push(_.id)}),i.forEach(_=>{o++,o<=l||(r++,o=1,d[r]=[]),d[r].push(n[_])}),d}function uo(e){jt=e}function fo(e){jt=e}const mo={Field:co,Run:_o,Get:uo,useValue:fo},po={f:"_f_q3r0i_1"};let ae={};function xo(e,t){switch(t.type){case"open":return{...e,open:t.open};case"view":return{...e,view:e.view===t.view?null:t.view};case"data":let n={};return Object.keys(t.data).forEach(r=>{r!=="sort"&&(n[r]=t.data[r],e.take[r]="999")}),{...e,data:n,take:e.take};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let r in i)i[r]!=="999"&&(e.active=!0);return ae.get(i,e.active),{...e,take:i,active:e.active};case"exit":for(let r in e.take)e.take[r]="999";return ae.get&&ae.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function ho(){const[e,t]=m.useReducer(xo,{open:!1,view:null,data:{},take:{},size:0,active:!1});return ae.set=n=>{t({type:"data",data:n})},ae.count=n=>{t({type:"size",size:n})},ae.reset=()=>{t({type:"exit"})},a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:po.f,onClick:()=>{t({type:"open",open:!0})},children:[a.jsx(ii,{}),e.active&&a.jsxs("i",{children:[e.size,"1"]})]}),e.open?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),a.jsxs("div",{className:"filter m",children:[a.jsx("div",{className:"filter l",children:Object.keys(e.data).map(n=>a.jsx(yo,{data:n,dispatch:t,state:e},n))}),a.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):a.jsx(a.Fragment,{})]})}function go(e){ae.get=e}function vo(e){ae.set!==void 0&&ae.set(e)}function bo(e){ae.reset!==void 0&&ae.reset(e)}function ko(e,t,n,i){let r=[],o=1,d=0,l={},_=50;return l[o]=[],i===!0&&(Object.keys(t).forEach(c=>{Number.parseInt(t[c])!==999&&(e=e.filter(u=>Number.parseInt(u[c])===Number.parseInt(t[c])))}),Mn(e.length)),e.forEach(c=>{r.push(c.id)}),r.forEach(c=>{d++,d<=_||(o++,d=1,l[o]=[]),l[o].push(n[c])}),l}function Mn(e){ae.count(e)}function yo({data:e,state:t,dispatch:n}){let i=()=>{n({type:"view",view:e})},r=()=>{n({type:"take",list:e,take:"999"})};return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"filter s",children:[a.jsxs("div",{onClick:i,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?a.jsx("div",{onClick:r,className:"filter x","data-icon":"F038"}):""]}),a.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,d)=>a.jsx(wo,{data:t.data[e].list[o],head:e,type:o,dispatch:n,state:t},d))})]})}function wo({data:e,head:t,state:n,dispatch:i,type:r}){if(r!=="999"&&e.count===void 0)return"";const o=()=>{i({type:"take",list:t,take:r})};return a.jsxs("div",{className:"filter a",onClick:o,"set-active":(n.take[t]===r)+"",children:[e.name,a.jsx("div",{className:"filter e",children:e.count})]})}const Co={Button:ho,useValue:go,Set:vo,Run:ko,Count:Mn,Reset:bo},jo={Bell:_i,Send:li,Add:si},Fn={p:"_p_djnh1_1",l:"_l_djnh1_38"};function So(e){let t=3,n=e.page,i=e.count,r=[],o=()=>{r.push({page:1}),r.push({text:"..."})},d=()=>{r.push({text:"..."}),r.push({page:i})},l=(_,c)=>{for(let u=_;u<c;u++)r.push({page:u})};return i<t*2+6?l(1,i+1):n<t*2+1?(l(1,t*2+4),d()):n>i-t*2?(t=i>1e4?1:t,o(),l(i-t*2-2,i+1)):(t=i>1e4?1:t,o(),l(n-t,n+t+1),d()),r.length===1?a.jsx(a.Fragment,{}):a.jsxs("div",{className:Fn.p,children:[a.jsx("i",{onClick:()=>e.onChangePage(n-1),children:a.jsx("svg",{viewBox:"0 0 24 24",children:a.jsx("path",{d:"M8.19486 5.40705C8.52237 4.96235 9.14837 4.86736 9.59306 5.19488C9.93847 5.44927 10.2668 5.70372 10.5528 5.92689C11.1236 6.3724 11.8882 6.98573 12.6556 7.65208C13.4181 8.31412 14.2064 9.04815 14.8119 9.73344C15.1136 10.0749 15.3911 10.4279 15.5986 10.7721C15.7895 11.0888 16 11.524 16 12.0001C16 12.4762 15.7895 12.9115 15.5986 13.2282C15.3911 13.5724 15.1136 13.9253 14.8119 14.2668C14.2064 14.9521 13.4181 15.6861 12.6556 16.3482C11.8882 17.0145 11.1236 17.6278 10.5528 18.0734C10.2668 18.2965 9.93847 18.551 9.59307 18.8054C9.14837 19.1329 8.52237 19.0379 8.19486 18.5932C8.0632 18.4144 7.99983 18.2064 8.00001 18.0002L8 12.0001L8 6.00007C7.99983 5.79387 8.0632 5.58581 8.19486 5.40705Z"})})}),r.map((_,c)=>{console.log(_,e);const u={};return _.page&&(u.onClick=()=>e.onChangePage(_.page)),_.page===e.page&&(u.active=""),m.createElement("span",{...u,key:c},_.page||_.text)}),a.jsx("i",{onClick:()=>e.onChangePage(n+1),children:a.jsx("svg",{viewBox:"0 0 24 24",children:a.jsx("path",{d:"M8.19486 5.40705C8.52237 4.96235 9.14837 4.86736 9.59306 5.19488C9.93847 5.44927 10.2668 5.70372 10.5528 5.92689C11.1236 6.3724 11.8882 6.98573 12.6556 7.65208C13.4181 8.31412 14.2064 9.04815 14.8119 9.73344C15.1136 10.0749 15.3911 10.4279 15.5986 10.7721C15.7895 11.0888 16 11.524 16 12.0001C16 12.4762 15.7895 12.9115 15.5986 13.2282C15.3911 13.5724 15.1136 13.9253 14.8119 14.2668C14.2064 14.9521 13.4181 15.6861 12.6556 16.3482C11.8882 17.0145 11.1236 17.6278 10.5528 18.0734C10.2668 18.2965 9.93847 18.551 9.59307 18.8054C9.14837 19.1329 8.52237 19.0379 8.19486 18.5932C8.0632 18.4144 7.99983 18.2064 8.00001 18.0002L8 12.0001L8 6.00007C7.99983 5.79387 8.0632 5.58581 8.19486 5.40705Z"})})})]})}function Eo(e,t){switch(t.type){case"load":return{...e,load:t.load,wait:!1,data:t.data,list:t.data[e.page],size:Object.keys(t.data).length};case"page":return{...e,page:t.page,list:e.data[t.page]};default:throw new Error}}function $n({load:e,list:t,item:n}){const i=m.useRef(null),[r,o]=m.useReducer(Eo,{load:!1,list:[],data:{},page:1,wait:!1,item:n});console.log("load",e),m.useEffect(()=>{t!==null&&o({type:"load",load:e,data:t})},[e]);let d=l=>{if(l===0)return l=1;if(l>r.size)return l=r.size;o({type:"page",page:l})};return m.useEffect(()=>{},[r]),console.log(r),a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Fn.l,ref:i,children:a.jsx(pn,{"el-empty":"Данные не найдены",children:r.load&&r.list!==void 0?r.list.map(l=>a.jsx(r.item,{data:l},l.id)):a.jsxs("div",{"type-data":"load",children:[a.jsx("i",{}),a.jsx("i",{}),a.jsx("i",{})]})})}),r.load&&r.list!==void 0?a.jsx(So,{page:r.page,count:r.size,onChangePage:d}):a.jsx(a.Fragment,{})]})}const No={Pagination:$n};function To({head:e,load:t,list:n,item:i}){const r=e;return a.jsxs(a.Fragment,{children:[a.jsx(r,{}),Ye.getSetting("s05")===1?a.jsx($n,{list:n,load:t,item:i}):a.jsx(xn,{list:n,load:t,item:i})]})}function Io(e,t){switch(t.type){case"load":return{...e,time:Date.now(),load:t.load,list:t.list,temp:t.temp};case"filter":return{...e,list:t.list,filter:t.active,band:t.band,time:Date.now()};case"search":return{...e,time:Date.now(),list:t.list};case"triage":return{...e,time:Date.now(),list:t.list,sort:t.sort};case"noload":return{...e,load:!0,time:Date.now()};default:throw new Error}}const St={};function Do(e){St.get=e}function Mo(e){St.get&&St.get(e)}const Fo={View:To,Reducer:Io,useValue:Do,setValue:Mo},$o={Get:xi},Lo={Open:tr};j.Action=un,j.Alert=Er,j.Api=st,j.Badge=Or,j.Bookmarks=Sr,j.Browser=xr,j.Button=nn,j.Company=$o,j.Component=dt,j.DataBase=Gr,j.Event=ve,j.Files=Yr,j.Filter=Co,j.Form=ao,j.Format=A,j.HotKey=Kr,j.Icon=Tr,j.Init=cn,j.Input=io,j.List=Fo,j.Loading=so,j.Modal=Ue,j.Notice=we,j.Notifications=jo,j.Pagination=No,j.Phone=Lo,j.Router=Be,j.Scrolling=Ur,j.Search=mo,j.Setting=jr,j.Sistym=We,j.Socket=le,j.Store=ne,j.Tabs=_n,j.Triage=Pr,j.User=Ye,j.WebRTC=R,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
|
|
31
|
+
<%s key={someKey} {...props} />`,Bt,ke,ss,ke),Xn[ke+Bt]=!0}}return s===i?ns(V):ts(V),V}}function as(s,p,v){return Qn(s,p,v,!0)}function is(s,p,v){return Qn(s,p,v,!1)}var rs=is,os=as;Fe.Fragment=i,Fe.jsx=rs,Fe.jsxs=os}()),Fe}process.env.NODE_ENV==="production"?lt.exports=Ka():lt.exports=Wa();var a=lt.exports;const Va={notice:"_notice_820sc_2",error:"_error_820sc_9",success:"_success_820sc_12",remark:"_remark_820sc_15",copy:"_copy_820sc_18","show-notice":"_show-notice_820sc_1","hide-notice":"_hide-notice_820sc_1"};let fe={};function Ua(){let[e,t]=m.useState([]);return fe.set=n=>{t([...e,n])},fe.del=n=>{t(e.filter(i=>i.key!==n))},e.length===0?"":a.jsx("ul",{className:Va.notice,children:e.map(n=>n.item)})}function $e({data:e}){let[t,n]=m.useState("show");m.useEffect(()=>{setTimeout(function(){n("hide")},1800),setTimeout(function(){fe.del(e.key)},2500)},[e.key]);let i,r;switch(e.type){case"error":i=a.jsx(he.error,{}),r="Ошибка:";break;case"success":i=a.jsx(he.success,{}),r="Информация:";break;case"copy":i=a.jsx(he.success,{}),r="Копирование:";break;case"remark":i=a.jsx(he.success,{}),r="Подсказка:";break;default:i=a.jsx(he.success,{}),r="Предупреждение:";break}return a.jsxs("li",{className:"item "+e.type,"data-status":t,children:[i,a.jsx("b",{children:r}),a.jsx("p",{children:e.text})]})}function Ya(e){let t=Date.now(),n={key:t,...e};fe.set({item:a.jsx($e,{data:n},t),key:t})}function Ha(e){let t=Date.now(),n={key:t,text:e,type:"error"};fe.set({item:a.jsx($e,{data:n},t),key:t})}function qa(e){let t=Date.now(),n={key:t,text:e,type:"success"};fe.set({item:a.jsx($e,{data:n},t),key:t})}function Ja(e){let t=Date.now(),n={key:t,text:e,type:"remark"};fe.set({item:a.jsx($e,{data:n},t),key:t})}function Xa(e){let t=Date.now(),n={key:t,text:e,type:"copy"};fe.set({item:a.jsx($e,{data:n},t),key:t})}const he={};he.error=()=>a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[a.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#bb2014"}),a.jsx("path",{d:"M8.96967 8.96967C9.26256 8.67678 9.73744 8.67678 10.0303 8.96967L12 10.9394L13.9697 8.96969C14.2626 8.6768 14.7374 8.6768 15.0303 8.96969C15.3232 9.26258 15.3232 9.73746 15.0303 10.0303L13.0607 12L15.0303 13.9697C15.3232 14.2625 15.3232 14.7374 15.0303 15.0303C14.7374 15.3232 14.2625 15.3232 13.9696 15.0303L12 13.0607L10.0304 15.0303C9.73746 15.3232 9.26258 15.3232 8.96969 15.0303C8.6768 14.7374 8.6768 14.2626 8.96969 13.9697L10.9394 12L8.96967 10.0303C8.67678 9.73744 8.67678 9.26256 8.96967 8.96967Z",fill:"#fff"})]}),he.success=()=>a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[a.jsx("path",{d:"M12 22C7.28595 22 4.92893 22 3.46447 20.5355C2 19.0711 2 16.714 2 12C2 7.28595 2 4.92893 3.46447 3.46447C4.92893 2 7.28595 2 12 2C16.714 2 19.0711 2 20.5355 3.46447C22 4.92893 22 7.28595 22 12C22 16.714 22 19.0711 20.5355 20.5355C19.0711 22 16.714 22 12 22Z",fill:"#367738"}),a.jsx("path",{d:"M16.0303 8.96967C16.3232 9.26256 16.3232 9.73744 16.0303 10.0303L11.0303 15.0303C10.7374 15.3232 10.2626 15.3232 9.96967 15.0303L7.96967 13.0303C7.67678 12.7374 7.67678 12.2626 7.96967 11.9697C8.26256 11.6768 8.73744 11.6768 9.03033 11.9697L10.5 13.4393L14.9697 8.96967C15.2626 8.67678 15.7374 8.67678 16.0303 8.96967Z",fill:"#fff"})]});const en={alerts:"_alerts_1pds5_1",menuAnimation:"_menuAnimation_1pds5_1",menuItemAnimation:"_menuItemAnimation_1pds5_1","--body":"_--body_1pds5_103",allert:"_allert_1pds5_111","--form":"_--form_1pds5_111",al:"_al_1pds5_1"};let Le={};function Qa(){let[e,t]=m.useState("");return Le.set=n=>t(n),Le.del=()=>t(""),a.jsx(a.Fragment,{children:e})}const ei=({data:e,callback:t})=>(e.button=e.button===void 0?"Подтвердить":e.button,a.jsxs("div",{className:en.alerts,children:[a.jsxs("dl",{children:[a.jsx("dt",{children:e.title}),a.jsx("dd",{children:e.text}),a.jsx("ul",{children:a.jsx("button",{"data-color":e.color||"blue",onClick:()=>{t(),Le.del()},children:e.button})})]}),a.jsx("div",{className:"--body",onClick:Le.del})]}));function ti(e,t){Le.set(a.jsx(ei,{data:e,callback:t}))}const we={Send:Ya,Error:Ha,Remark:Ja,Success:qa,Copy:Xa},Be={Path:va,setPage:ca,getPage:zt,usePage:da,setModule:ua,getModule:Ot,useModule:_a,setTabs:ma,getTabs:Ke,useTabs:fa,useId:pa,setId:ha,subId:xa,getId:ga};function ni(){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[a.jsx("path",{d:"M5.15837 11.491C5.08489 12.887 5.16936 14.373 3.92213 15.3084C3.34164 15.7438 3 16.427 3 17.1527C3 18.1508 3.7818 19 4.8 19H19.2C20.2182 19 21 18.1508 21 17.1527C21 16.427 20.6584 15.7438 20.0779 15.3084C18.8306 14.373 18.9151 12.887 18.8416 11.491C18.6501 7.85223 15.6438 5 12 5C8.35617 5 5.34988 7.85222 5.15837 11.491Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),a.jsx("path",{d:"M10.5 3.125C10.5 3.95343 11.1716 5 12 5C12.8284 5 13.5 3.95343 13.5 3.125C13.5 2.29657 12.8284 2 12 2C11.1716 2 10.5 2.29657 10.5 3.125Z",stroke:"currentColor",strokeWidth:"1",fill:"none"}),a.jsx("path",{d:"M15 19C15 20.6569 13.6569 22 12 22C10.3431 22 9 20.6569 9 19",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}function ai(){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",children:[a.jsx("path",{d:"M4.4094 11.4516C4.62188 7.41446 7.95728 4.25 12 4.25C16.0427 4.25 19.3781 7.41446 19.5906 11.4516C19.5997 11.6241 19.6064 11.7893 19.6129 11.9485C19.6351 12.49 19.6544 12.9615 19.7525 13.4133C19.8698 13.9531 20.0867 14.3775 20.5279 14.7084C21.2972 15.2854 21.75 16.191 21.75 17.1527C21.75 18.534 20.6628 19.75 19.2 19.75H4.8C3.33719 19.75 2.25 18.534 2.25 17.1527C2.25 16.191 2.70278 15.2854 3.47213 14.7084C3.91329 14.3775 4.13025 13.9531 4.24749 13.4133C4.34561 12.9615 4.3649 12.49 4.38705 11.9485V11.9485L4.38705 11.9485C4.39356 11.7893 4.40032 11.6241 4.4094 11.4516Z",fill:"#141B34"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5286 1.37434C10.9737 1.08296 11.517 1 12 1C12.483 1 13.0263 1.08296 13.4714 1.37434C13.9652 1.69759 14.25 2.22083 14.25 2.875C14.25 3.47116 14.017 4.09375 13.6626 4.57057C13.3138 5.03989 12.7415 5.5 12 5.5C11.2585 5.5 10.6862 5.03989 10.3374 4.57057C9.98299 4.09375 9.75 3.47116 9.75 2.875C9.75 2.22083 10.0348 1.69759 10.5286 1.37434Z",fill:"#141B34"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C9.55228 18 10 18.4477 10 19C10 20.1046 10.8954 21 12 21C13.1046 21 14 20.1046 14 19C14 18.4477 14.4477 18 15 18C15.5523 18 16 18.4477 16 19C16 21.2091 14.2091 23 12 23C9.79086 23 8 21.2091 8 19C8 18.4477 8.44772 18 9 18Z",fill:"#141B34"})]})}function ii(){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M8.85746 12.5061C6.36901 10.6456 4.59564 8.59915 3.62734 7.44867C3.3276 7.09253 3.22938 6.8319 3.17033 6.3728C2.96811 4.8008 2.86701 4.0148 3.32795 3.5074C3.7889 3 4.60404 3 6.23433 3H17.7657C19.396 3 20.2111 3 20.672 3.5074C21.133 4.0148 21.0319 4.8008 20.8297 6.37281C20.7706 6.83191 20.6724 7.09254 20.3726 7.44867C19.403 8.60062 17.6261 10.6507 15.1326 12.5135C14.907 12.6821 14.7583 12.9567 14.7307 13.2614C14.4837 15.992 14.2559 17.4876 14.1141 18.2442C13.8853 19.4657 12.1532 20.2006 11.226 20.8563C10.6741 21.2466 10.0043 20.782 9.93278 20.1778C9.79643 19.0261 9.53961 16.6864 9.25927 13.2614C9.23409 12.9539 9.08486 12.6761 8.85746 12.5061Z",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})})}const ri={n:"_n_euuvm_1"};let Pe={},Re=[];const oi=(e,t)=>{switch(t.type){case"open":return{...e,open:t.open};case"view":return{...e,view:e.view===t.view?null:t.view};case"add":return{...e,news:[...e.news,t.data],active:!0};case"news":return{...e,news:t.data,active:t.data.length!==0};case"hide":let n=e.news.filter(r=>r.id!==t.id);return{...e,news:n,active:n.length!==0};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let r in i)i[r]!=="999"&&(e.active=!0);return Pe.get(i,e.active),{...e,take:i,active:e.active};case"exit":return e;default:throw new Error}};function si(e){Pe.fn({action:"add",data:e})}function li(e){Pe.fn({action:"add",data:e})}function di(e){Pe.fn({action:"new",data:e})}function ci(e){Pe.fn=e}function _i(){const[e,t]=m.useReducer(oi,{open:!1,active:!1,news:[],take:{}});le.useListener("bell",async i=>{console.log(i)}),ci(async i=>{switch(console.log(i),i.action){case"add":Re.push(i.data);break}}),m.useEffect(()=>{(async()=>{let i=await le.Send({type:"module",module:"M00",query:"x0054",array:["M01","M02"]});console.log(i);for(let r in i)switch(r){case"news":t({type:"news",data:i.news});break;case"M01":i[r].forEach(o=>{Re.push({module:"M01",type:1,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break;case"M02":i[r].forEach(o=>{Re.push({module:"M02",type:117,id:o.id,datetime:new Date(o.tDate).getTime(),txt:o.p01})});break}})(),setInterval(()=>{Re.forEach((i,r)=>{t({type:"add",data:{module:i.module,type:i.type,id:i.id,datetime:i.datetime,txt:i.title}}),i.datetime<new Date().getTime()&&Re.splice(r,1)})},6e4)},[]);let n=async i=>{t({type:"hide",id:i.id})};return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:ri.n,onClick:()=>{t({type:"open",open:!0})},children:e.active?a.jsx(ai,{}):a.jsx(ni,{})}),e.open?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"notify-o",onClick:()=>{t({type:"open",open:!1})}}),a.jsxs("div",{className:"notify-m",children:[a.jsx("div",{className:"notify-l",children:e.news.map((i,r)=>a.jsx(ui,{data:i,dispatch:t},r))}),a.jsx("div",{className:"notify-b",onClick:n,children:"История"})]})]}):""]})}const ui=({data:e,dispatch:t})=>{let n=async i=>{console.log(i),t({type:"hide",id:i.id});let r=await le.Send({type:"module",module:"M00",query:"x0055",data:{id:i.id,type:i.type,db:i.db}});console.log(r)};return a.jsxs("div",{className:"notify-i",children:[a.jsx("div",{className:"--icon","data-icon":e.type}),a.jsxs("div",{className:"--body",children:[a.jsx("div",{className:"--name",children:e.type}),a.jsx("div",{className:"--text",children:e.txt})]}),a.jsx("div",{className:"--hide","data-icon":"F038",onClick:()=>n(e),children:" "})]})},fi="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2xldCBhPVtdLHM9bnVsbDtvbmNvbm5lY3Q9ZnVuY3Rpb24obCl7dmFyIHQ9bC5zb3VyY2U7YS5wdXNoKHQpO2NvbnN0IG49ZT0+e3MhPT1udWxsJiZzLnJlYWR5U3RhdGU9PT0xP3Muc2VuZChKU09OLnN0cmluZ2lmeShlKSk6dC5wb3N0TWVzc2FnZSh7dHlwZToibm9TZW5kIn0pfTtsZXQgcj1lPT57aWYocyE9PW51bGwmJnMucmVhZHlTdGF0ZT09PTEpcmV0dXJuIHQucG9zdE1lc3NhZ2Uoe3R5cGU6InRydWUifSk7ZS5say5hZGRyZXNzPT09ImxvY2FsaG9zdCI/cz1uZXcgV2ViU29ja2V0KGB3czovL2xvY2FsaG9zdDoke2UubGsuc29ja2V0KzF9YCk6cz1uZXcgV2ViU29ja2V0KCJ3c3M6Ly8iK2UubGsuYWRkcmVzcysiOiIrKGUubGsuc29ja2V0KzEpKSxzLm9uZXJyb3I9KCk9PnQucG9zdE1lc3NhZ2Uoe3R5cGU6ImVycm9yIn0pLHMub25vcGVuPSgpPT57bih7dHlwZToiY29ubmVjdCIsdWtleTplLnVrZXl9KX0scy5vbm1lc3NhZ2U9bz0+e2xldCBjPUpTT04ucGFyc2Uoby5kYXRhKTthLmZvckVhY2goZD0+e2QucG9zdE1lc3NhZ2UoYyl9KX0scy5vbmNsb3NlPSgpPT50LnBvc3RNZXNzYWdlKHt0eXBlOiJjbG9zZWQifSl9O3Qub25tZXNzYWdlPWZ1bmN0aW9uKGUpe3N3aXRjaChlLmRhdGEudHlwZSl7Y2FzZSJsZW5ndGgiOnJldHVybiB0LnBvc3RNZXNzYWdlKGEubGVuZ3RoKTtjYXNlImFsbCI6cmV0dXJuIGEuZm9yRWFjaChvPT5vLnBvc3RNZXNzYWdlKHthbGw6YS5sZW5ndGh9KSk7Y2FzZSJzZW5kIjpyZXR1cm4gbihlLmRhdGEuanNvbik7Y2FzZSJjb25uZWN0IjpyZXR1cm4gcihlLmRhdGEpO2RlZmF1bHQ6dC5wb3N0TWVzc2FnZSh7dHlwZToiZGVmYXVsdCIsZGF0YTplLmRhdGEuanNvbn0pfX19fSkoKTsK";function mi(e){return new SharedWorker("data:text/javascript;base64,"+fi,{name:e==null?void 0:e.name})}function pi(e){let t={},n={};e.data.forEach(r=>{t[r.id]={s:r.v,n:r.a},n[r.id]=r});let i={...De(),901:t};Gt(n),Ie(i)}function xi(){let e=Kt(),t={};return Object.keys(e).forEach(n=>{t[e[n].id]={},t[e[n].id].name=e[n].a}),t}let re={},U={},Ve=["filter","online","users","company","select","setting","info","job"];function hi(){const[e,t]=m.useState(!1),[n,i]=m.useState(!1);function r(o){const d=new mi;re.laodData=l=>{let _=Ve.indexOf(l);_>=0&&Ve.splice(_,1),Ve.length===0&&t(!0)},re.send=l=>{d.port.postMessage({type:"send",json:l})},d.port.onmessage=l=>{let _=l.data;_.type==="error"&&i(!0),_.type==="true"&&t(!0),_.type==="closed"&&d.port.postMessage({type:"connect",ukey:o,lk:it()}),Ve.length!==0&&re.laodData(_.type),U[_.type]&&U[_.type](_)},d.port.postMessage({type:"connect",ukey:o,lk:it()})}return[r,e,n]}U.module=e=>{re[e.listen]!==void 0&&(re[e.listen](e),delete re[e.listen])},U.bell=di,U.company=pi,U.info=e=>{let t={};t.db=e.db,t.id=e.data.id,t.job=e.data.job,t.login=e.data.login,t.name=e.data.p02,t.patronymic=e.data.p03,t.surname=e.data.p01,t.email=e.data.email,t.admin=e.data.menu.includes("99"),Wt(t),At(e.data.menu)},U.version=async e=>{We.version.Server(e.data)},U.online=async e=>{},U.offline=async e=>{},U.chat=e=>{switch(console.log(e.data.action),e.data.action){case"new_message":Be.getModule();break;case"view_message":Be.getModule();break;case"write_message":Be.getModule();break}console.log(e)},U.users=e=>{console.log("users",e);let t={};e.data.forEach(i=>{let r=i.p01+" "+i.p02+" "+i.p03,o=i.p01+" "+i.p02.substring(0,1)+"."+i.p03.substring(0,1)+".",d=i.p01.substring(0,1)+""+i.p02.substring(0,1)+i.p03.substring(0,1);t[i.id]={id:i.id,admin:i.m.includes("99"),ava:JSON.parse(i.a),job:i.j,login:"",online:{time:i.o,status:0},sts:i.s,nameFull:r,name:o,number:d}});let n={...De(),user:t};Ie(n)},U.api=e=>{let t={};e.data.forEach(n=>{t[n.api]={key:n.key,p01:n.p01,p02:n.p02}})},U.delete=()=>{te()},U.select=e=>{let t={...De()};e.data.forEach(n=>{t[n.n]=JSON.parse(n.s)}),Ie(t)},U.job=e=>{let t={...De()},n={};Object.keys(e.data).forEach(i=>{n[i]={s:1,n:e.data[i]}}),t[1]=n,Ie(t)},U.setting=e=>{ba(e.data)},U.app=()=>{};const gi=(e,t)=>{re[e]=t},vi=(e,t)=>{re[e](t)};function bi(e){let t="_"+String(Math.random()).substring(2,7);return new Promise(n=>{re[t]=i=>{i.error!==void 0?n({error:i.error}):n(i.data),delete re[t]},e={...e,listen:t},e.type="modules",re.send(e)})}const le={useConnect:hi,useListener:gi,setListener:vi,Send:bi};function ki(e,t){t===void 0?(t=e,e=new Date):e=new Date(e);let n={yyyy:e.getFullYear(),yy:(""+e.getFullYear()).slice(-2),mm:("0"+(e.getMonth()+1)).slice(-2),dd:("0"+e.getDate()).slice(-2),HH:("0"+e.getHours()).slice(-2),MM:("0"+e.getMinutes()).slice(-2),SS:("0"+e.getSeconds()).slice(-2),__:" ",_:" "};for(const i in n)t=t.replace(i,n[i]);return t}function yi(e){let t=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],n=new Date(e);return{day:(""+n.getFullYear()).slice(-2)+""+("0"+(n.getMonth()+1)).slice(-2)+("0"+n.getDate()).slice(-2),name:n.getDate()+" "+t[n.getMonth()]}}const wi=e=>{function t(I,M){var w,z,L;I=I??"",M=M??1;for(var w=[],L=0,z=I.length;L<z;)w.push(I.slice(L,L+=M));return w}function n(I,M){var w=[2,0,1,1,1,2];return M[I>4&&I<20?2:w[Math.min(I,5)]]}var i={null:"ноль",a1:["один","два","три","четыре","пять","шесть","семь","восемь","девять"],a2:["одна","две","три","четыре","пять","шесть","семь","восемь","девять"],a10:["десять","одиннадцать","двенадцать","тринадцать","четырнадцать","пятнадцать","шестнадцать","семнадцать","восемнадцать","девятнадцать"],a20:["двадцать","тридцать","сорок","пятьдесят","шестьдесят","семьдесят","восемьдесят","девяносто"],a100:["сто","двести","триста","четыреста","пятьсот","шестьсот","семьсот","восемьсот","девятьсот"],uc:["копейка","копейки","копеек"],ur:["рубль","рубля","рублей"],u3:["тысяча","тысячи","тысяч"],u2:["миллион","миллиона","миллионов"],u1:["миллиард","миллиарда","миллиардов"]},r,o,d,l,S,_,c,k,u,f,x,h;u=parseFloat(e).toFixed(2).split("."),_=u[0],l=u[1];var g=12-_.length;if(g<0)return!1;for(var k=[];g--;)k.push("0");_=k.join("")+_;var S=[];if(_>0){f=t(_,3);for(var y=-1;y<f.length;y++)if(c=f[y],c>0&&(x=t(c,1),r=parseInt(x[0]),o=parseInt(x[1]),d=parseInt(x[2]),S.push(i.a100[r-1]),h=y+1==3?"a2":"a1",o>1?S.push(i.a20[o-2]+(d>0?" "+i[h][d-1]:"")):S.push(o>0?i.a10[d]:i[h][d-1]),f.length>y+1)){var C=i["u"+(y+1)];S.push(n(c,C))}}else S.push(i.null);return S.push(n(_,i.ur)),S.push(l+" "+n(l,i.uc)),S.join(" ").replace(RegExp(" {2,}","g")," ").trimLeft()};function Ci(e){let t=-1,n=[" kB"," MB"," GB"," TB","PB","EB","ZB","YB"];do e=e/1024,t++;while(e>1024);return Math.max(e,.1).toFixed(1)+n[t]}function ji(e){let t={};return t["application/atom+xml"]="atom",t["application/json"]="json",t["application/javascript"]="js",t["application/ogg"]="ogg",t["application/pdf"]="pdf",t["application/soap+xml"]="soap",t["application/font-woff"]="woff",t["application/xhtml+xml"]="xml",t["application/xml-dtd"]="dtd",t["application/xop+xml"]="xop",t["application/zip"]="zip",t["application/gzip"]="gzip",t["application/x-bittorrent"]="bittorrent",t["application/x-tex"]="tex",t["application/xml"]="xml",t["application/msword"]="doc",t["image/svg+xml"]="svg",t[e]}function Si(e,t,n,i){let r={sexM:"m",sexF:"f",gcaseIm:"nominative",gcaseNom:"nominative",gcaseRod:"genitive",gcaseGen:"genitive",gcaseDat:"dative",gcaseVin:"accusative",gcaseAcc:"accusative",gcaseTvor:"instrumentative",gcaseIns:"instrumentative",gcasePred:"prepositional",gcasePos:"prepositional",rules:{lastName:{exceptions:[" дюма,тома,дега,люка,ферма,гамарра,петипа,шандра . . . . ."," гусь,ремень,камень,онук,богода,нечипас,долгопалец,маненок,рева,кива . . . . ."," вий,сой,цой,хой -я -ю -я -ем -е"],suffixes:["f б,в,г,д,ж,з,й,к,л,м,н,п,р,с,т,ф,х,ц,ч,ш,щ,ъ,ь . . . . .","f ска,цка -ой -ой -ую -ой -ой","f ая --ой --ой --ую --ой --ой"," ская --ой --ой --ую --ой --ой","f на -ой -ой -у -ой -ой"," иной -я -ю -я -ем -е"," уй -я -ю -я -ем -е"," ца -a -е -у -ей -е"," рих а у а ом е"," ия . . . . ."," иа,аа,оа,уа,ыа,еа,юа,эа . . . . ."," их,ых . . . . ."," о,е,э,и,ы,у,ю . . . . ."," ова,ева -ой -ой -у -ой -ой"," га,ка,ха,ча,ща,жа -и -е -у -ой -е"," ца -и -е -у -ей -е"," а -ы -е -у -ой -е"," ь -я -ю -я -ем -е"," ия -и -и -ю -ей -и"," я -и -е -ю -ей -е"," ей -я -ю -я -ем -е"," ян,ан,йн а у а ом е"," ынец,обец --ца --цу --ца --цем --це"," онец,овец --ца --цу --ца --цом --це"," ц,ч,ш,щ а у а ем е"," ай -я -ю -я -ем -е"," гой,кой -го -му -го --им -м"," ой -го -му -го --ым -м"," ах,ив а у а ом е"," ший,щий,жий,ний --его --ему --его -м --ем"," кий,ый --ого --ому --ого -м --ом"," ий -я -ю -я -ем -и"," ок --ка --ку --ка --ком --ке"," ец --ца --цу --ца --цом --це"," в,н а у а ым е"," б,г,д,ж,з,к,л,м,п,р,с,т,ф,х а у а ом е"]},firstName:{exceptions:[" лев --ьва --ьву --ьва --ьвом --ьве"," павел --ла --лу --ла --лом --ле","m шота . . . . .","m пётр ---етра ---етру ---етра ---етром ---етре","f рашель,нинель,николь,габриэль,даниэль . . . . ."],suffixes:[" е,ё,и,о,у,ы,э,ю . . . . .","f б,в,г,д,ж,з,й,к,л,м,н,п,р,с,т,ф,х,ц,ч,ш,щ,ъ . . . . .","f ь -и -и . ю -и","m ь -я -ю -я -ем -е"," га,ка,ха,ча,ща,жа -и -е -у -ой -е"," ша -и -е -у -ей -е"," а -ы -е -у -ой -е"," ия -и -и -ю -ей -и"," я -и -е -ю -ей -е"," ей -я -ю -я -ем -е"," ий -я -ю -я -ем -и"," й -я -ю -я -ем -е"," б,в,г,д,ж,з,к,л,м,н,п,р,с,т,ф,х,ц,ч а у а ом е"]},middleName:{suffixes:[" ич а у а ем е"," на -ы -е -у -ой -е"]}},initialized:!1,init:function(){this.initialized||(this.prepareRules(),this.initialized=!0)},prepareRules:function(){for(var d in this.rules)for(var l in this.rules[d])for(var _=0,c=this.rules[d][l].length;_<c;_++)this.rules[d][l][_]=this.rule(this.rules[d][l][_])},rule:function(d){var l=d.match(/^\s*([fm]?)\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*$/);return l?{sex:l[1],test:l[2].split(","),mods:[l[3],l[4],l[5],l[6],l[7]]}:!1},word:function(d,l,_,c){if(c===this.gcaseNom)return d;if(d.match(/[-]/)){for(var u=d.split("-"),f=0,x=u.length;f<x;f++)u[f]=this.word(u[f],l,_,c);return u.join("-")}if(d.match(/^[А-ЯЁ]\.?$/i))return d;this.init();var h=this.rules[_];let g;return h.exceptions&&(g=this.pick(d,l,c,h.exceptions,!0),g)?g:(g=this.pick(d,l,c,h.suffixes,!1),g||d)},pick:function(d,l,_,c,u){let f=d.toLowerCase();for(var x=0,h=c.length;x<h;x++)if(this.ruleMatch(f,l,c[x],u))return this.applyMod(d,_,c[x]);return!1},ruleMatch:function(d,l,_,c){if(_.sex===this.sexM&&l===this.sexF||_.sex===this.sexF&&l!==this.sexF)return!1;for(var u=0,f=_.test.length;u<f;u++){var x=c?d:d.substr(Math.max(d.length-_.test[u].length,0));if(x===_.test[u])return!0}return!1},applyMod:function(d,l,_){let c;switch(l){case this.gcaseNom:c=".";break;case this.gcaseGen:c=_.mods[0];break;case this.gcaseDat:c=_.mods[1];break;case this.gcaseAcc:c=_.mods[2];break;case this.gcaseIns:c=_.mods[3];break;case this.gcasePos:c=_.mods[4];break}for(var u=0,f=c.length;u<f;u++){var x=c.substr(u,1);switch(x){case".":break;case"-":d=d.substr(0,d.length-1);break;default:d+=x}}return d},getSex:()=>{if(r.mn.length>2)switch(r.mn.substr(r.mn.length-2)){case"ич":return"m";case"на":return"f"}return""},fullName:d=>((r.fullNameSurnameLast?"":r.lastName(d)+" ")+r.firstName(d)+" "+r.middleName(d)+(r.fullNameSurnameLast?" "+r.lastName(d):"")).replace(/^ +| +$/g,""),lastName:d=>r.word(r.ln,r.sex,"lastName",d),firstName:d=>r.word(r.fn,r.sex,"firstName",d),middleName:d=>r.word(r.mn,r.sex,"middleName",d)};if(typeof t>"u"){var o=e.match(/^\s*(\S+)(\s+(\S+)(\s+(\S+))?)?\s*$/);if(!o)return"Cannot parse supplied name";o[5]&&o[3].match(/(ич|на)$/)&&!o[5].match(/(ич|на)$/)?(e=o[5],t=o[1],n=o[3],r.fullNameSurnameLast=!0):(e=o[1],t=o[3],n=o[5])}return r.ln=e,r.fn=t||"",r.mn=n||"",r.sex=i||r.getSex(),r}function Ei(e){let t=e.split(" ");switch(t.length){case 2:return t[0]+" "+t[1].substring(0,1)+".";case 3:return t[0]+" "+t[1].substring(0,1)+"."+t[2].substring(0,1)+".";default:return e}}function Ni(e){return{1:{val:"01",name:"Январь",names:"Января",abc:"Янв"},2:{val:"02",name:"Февраль",names:"Февраля",abc:"Февр"},3:{val:"03",name:"Март",names:"Марта",abc:"Март"},4:{val:"04",name:"Апрель",names:"Апреля",abc:"Апр"},5:{val:"05",name:"Май",names:"Мая",abc:"Май"},6:{val:"06",name:"Июнь",names:"Июня",abc:"Июнь"},7:{val:"07",name:"Июль",names:"Июля",abc:"Июль"},8:{val:"08",name:"Август",names:"Августа",abc:"Авг"},9:{val:"09",name:"Сентябрь",names:"Сентебря",abc:"Сент"},10:{val:"10",name:"Октябрь",names:"Октября",abc:"Окт"},11:{val:"11",name:"Ноябрь",names:"Ноября",abc:"Нояб"},12:{val:"12",name:"Декабрь",names:"Декабря",abc:"Дек"}}[e]}function Ti(e){return parseFloat(e).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g,"$1 ")}function Ii(e,t){let n=t+"";for(;n.length<e;)n="0"+n;return n}function Di(e,t,n){let i=t/e*n;return(typeof i!="number"||i===1/0)&&(i=0),parseFloat(i).toFixed(1)}function Mi(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Fi(e,t){e=Math.abs(e)%100;let n=e%10;return e>10&&e<20?t[2]:n>1&&n<5?t[1]:n===1?t[0]:t[2]}const A={Date:ki,MoneyString:wi,DateSort:yi,Size:Ci,TypeFiles:ji,Cases:Si,Initials:Ei,Month:Ni,Money:Ti,Number:Ii,Percent:Di,CapitalizeFirstLetter:Mi,DeclensionWord:Fi};function $i({children:e}){return a.jsx("div",{className:"l",children:a.jsx("ul",{children:e})})}const oe={white:"_white_11p39_14",black:"_black_11p39_26",shake:"_shake_11p39_1",modal:"_modal_11p39_73",o:"_o_11p39_83",w:"_w_11p39_14",h:"_h_11p39_107",l:"_l_11p39_121",t:"_t_11p39_159",m:"_m_11p39_73",x:"_x_11p39_167",s:"_s_11p39_177",c:"_c_11p39_182",f:"_f_11p39_187",btn:"_btn_11p39_230",g:"_g_11p39_243","size-a":"_size-a_11p39_296","size-s":"_size-s_11p39_300","size-m":"_size-m_11p39_304","size-l":"_size-l_11p39_308","size-x":"_size-x_11p39_312","size-f":"_size-f_11p39_316",confirm:"_confirm_11p39_322",cancel:"_cancel_11p39_327",disabled:"_disabled_11p39_332",await:"_await_11p39_339",active:"_active_11p39_389",coincidence:"_coincidence_11p39_395",sa:"_sa_11p39_431",ss:"_ss_11p39_435",sm:"_sm_11p39_439",sl:"_sl_11p39_443",sx:"_sx_11p39_447",sf:"_sf_11p39_451"};function Li({children:e}){return a.jsx("div",{className:oe.s,children:e})}function Bi({children:e,className:t}){let n={};return t&&(n.className=t),a.jsx("div",{"data-form":"outline",...n,children:a.jsx("ul",{children:e})})}function Pi({children:e}){return a.jsx("div",{className:oe.c,children:e})}const tn={btn:"_btn_1hz2s_6",confirm:"_confirm_1hz2s_19"};function nn({onClick:e,onSend:t,label:n,onRef:i}){let[r,o]=m.useState(!1);const d=()=>{if(e)return e();r||(o(!0),t&&t(o))};return a.jsx("button",{ref:i,className:[tn.btn,tn.confirm].join(" "),onClick:d,children:r?"Ожидайте":n})}let Ce={};function Ri({config:e}){let[t,n]=m.useState([]);return Ce.x=()=>{n([])},Ce.config=e,Ce.add=i=>{n([...t,i])},a.jsx(a.Fragment,{children:t.map(i=>i)})}function zi({title:e,children:t,button:n,tabs:i,size:r="m",menu:o}){const[d,l]=m.useState(!0),_=m.useRef(),c=f=>{if(n){if(n.onClick)return f(!1),n.onClick({setOpen:l});if(n.onSend)return n.onSend({setOpen:l,disabled:f})}},u=()=>{_.current.setAttribute("shake",!0),setTimeout(()=>{_.current.setAttribute("shake",!1)},1e3)};return a.jsx(a.Fragment,{children:d?a.jsxs("div",{className:`${oe.modal} ${oe.white}`,children:[a.jsx("div",{className:oe.o,onClick:u}),a.jsxs("div",{className:[oe.w,oe[`s${r}`]].join(" "),ref:_,children:[a.jsxs("div",{className:oe.h,children:[a.jsx("div",{className:oe.t,children:e}),a.jsxs("div",{className:oe.m,children:[i&&a.jsx("nav",{children:i.map((f,x)=>a.jsx("span",{onClick:f.onClick,className:f.active?"active":"",children:f.name},x))}),o]}),a.jsx("div",{className:oe.x,onClick:()=>{l(!1)},children:a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",children:a.jsx("path",{d:"M19.0005 4.99988L5.00045 18.9999M5.00045 4.99988L19.0005 18.9999",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),t,n!==void 0?a.jsx(nn,{label:n.label,onSend:c}):""]})]}):""})}function Oi(e){Ce.add(a.jsx(Ai,{children:e},String(Date.now())))}function Ai({children:e}){return a.jsx(a.Fragment,{children:e})}function Zi(e){if(e.target.classList[0]!=="modal")return;let t=e.target.children[0];t.setAttribute("shake",!0),setTimeout(()=>{t.setAttribute("shake",!1)},1e3)}function Gi({type:e,name:t,params:n}){let[i,r]=m.useState(null);return m.useEffect(()=>{Ce.config(e,t,n,r)},[n.id]),a.jsx(a.Fragment,{children:i})}function Ki(e,t,n){Ce.config(e,t,n)}const Ue={List:$i,Scroll:Li,Main:zi,Add:Oi,Icon:Gi,Open:Ki,Shake:Zi,Form:Bi,Center:Pi};function an({text:e,type:t,button:n}){let[i,r]=m.useState(!1),o={active:t};const d=()=>{if(n){if(n.onClick)return n.onClick({});if(n.onSend)return i?void 0:(r(!0),n.onSend(r))}};return a.jsxs("div",{className:en.al,...o,children:[a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",fillRule:"evenodd",clipRule:"evenodd",children:a.jsx("path",{fill:"#fff",d:"M10.362 2.015C11.4264 1.66167 12.5736 1.66167 13.638 2.015C14.6981 2.36687 15.5304 3.20141 16.3665 4.37395C17.1999 5.5426 18.1208 7.17206 19.3078 9.2725L19.3544 9.35496C20.5417 11.4557 21.4625 13.0851 22.0364 14.4065C22.613 15.7343 22.9002 16.8807 22.6711 17.9821C22.4403 19.0911 21.8714 20.0995 21.0428 20.8617C20.2162 21.622 19.0907 21.9428 17.6736 22.0968C16.2645 22.25 14.4212 22.25 12.0488 22.25H11.9513C9.57882 22.25 7.73554 22.25 6.32642 22.0968C4.90927 21.9428 3.78379 21.622 2.95722 20.8617C2.12862 20.0995 1.55968 19.0911 1.32895 17.9821C1.0998 16.8807 1.387 15.7343 1.96365 14.4065C2.53752 13.0851 3.45835 11.4557 4.64558 9.35495L4.69218 9.2725L4.69218 9.27249C5.87921 7.17206 6.80008 5.5426 7.63347 4.37395C8.46963 3.20141 9.30194 2.36687 10.362 2.015ZM11 17C11 16.4477 11.4457 16 11.9955 16H12.0045C12.5543 16 13 16.4477 13 17C13 17.5523 12.5543 18 12.0045 18H11.9955C11.4457 18 11 17.5523 11 17ZM11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V9C13 8.44772 12.5523 8 12 8C11.4477 8 11 8.44772 11 9V13Z"})}),a.jsx("span",{children:e}),n&&a.jsx("button",{onClick:d,children:n.label})]})}const J={h:"_h_1usnu_1",g:"_g_1usnu_11",hr:"_hr_1usnu_16",hl:"_hl_1usnu_28",t:"_t_1usnu_40",s:"_s_1usnu_60",u:"_u_1usnu_69",o:"_o_1usnu_76",l:"_l_1usnu_105",hh:"_hh_1usnu_115",c:"_c_1usnu_128",loadingB:"_loadingB_1usnu_1",m:"_m_1usnu_180",ul:"_ul_1usnu_196",f:"_f_1usnu_226"},rn=({title:e,left:t,right:n,children:i})=>a.jsxs("div",{className:J.h,children:[a.jsx("div",{className:J.t,children:e}),t&&a.jsx("div",{className:J.hl,children:t}),n&&a.jsx("div",{className:J.hr,children:n}),i]}),on=({children:e,...t})=>a.jsx("div",{className:J.l,children:e}),sn=({children:e})=>a.jsx("div",{className:J.s,children:e}),ln=({children:e,edit:t})=>{const n={};return t&&(n.edit=""),console.log(n),a.jsx("div",{...n,className:J.f,children:e})};function dn({children:e}){return a.jsx("div",{className:J.g,children:e})}const dt={Header:rn,Section:sn,Group:dn,Form:ln,List:on,A:an,U:({children:e})=>a.jsx("div",{className:J.u,children:e}),G:dn,C:({children:e})=>a.jsx("div",{className:J.c,children:e}),L:on,O:({children:e,className:t,title:n})=>a.jsxs("div",{className:[J.o,t].join(" "),children:[n&&a.jsx("div",{className:J.hh,children:n}),e]}),S:sn,H:rn,M:({children:e})=>a.jsx("div",{className:J.m,children:e}),F:ln},Wi=(e,t)=>{switch(t.type){case"load":return{...e,list:t.list.reverse(),load:!1};case"id":return{...e,id:t.id};case"add":return{...e,list:[t.data,...e.list]};case"update":return{...e,list:e.list.map(n=>n.id===t.data.id?Object.assign({},n,{[t.data.name]:t.data.value}):n),temp:e.temp.map(n=>n.id===t.data.id?Object.assign({},n,{[t.data.name]:t.data.value}):n)};case"view":return{...e,view:e.view==="card"?"item":"card"};case"revers":return{...e,list:[...e.list.reverse()],temp:[...e.temp.reverse()],revers:!e.revers};case"delete":return{...e,list:e.list.filter(n=>n.id!==t.id)};case"edit":return{...e,list:e.list.map(n=>n.id===t.j.item?Object.assign({},n,{[t.j.name]:t.j.value}):n)};default:return e}},Vi=()=>({load:!0,list:[],name:"Файлы",add:!1,search:!1,revers:!0}),Ui=()=>{let[e,t]=m.useState([]);return a.jsx(a.Fragment,{children:e.length!==0?a.jsxs("div",{className:"upload view",children:[a.jsxs("div",{className:"--head",children:[a.jsx("b",{children:"Загрузки"}),a.jsx("i",{className:"x",onClick:()=>t([]),"data-icon":"F038"})]}),a.jsx("div",{className:"--list",children:e.map(n=>n)})]}):""})},Yi=({id:e,name:t,listen:n,dir:i})=>{t=t||"Файлы";const[r,o]=m.useReducer(Wi,{},Vi);console.log(n);const d=()=>{Ue.Add(a.jsx(Hi,{dir:i,dispatch:o,id:e},new Date().getTime()))};return m.useEffect(()=>{(async()=>{let l=await le.Send({type:"module",module:"M09",query:"x0900",data:{dir:i,id:e}});o({type:"load",list:l})})()},[e,i]),a.jsxs(dt.O,{children:[" ",a.jsx(dt.H,{title:t,right:a.jsx("i",{className:"f025","data-icon":"C005 25 pointer","data-color":"_b5b9cc :506290",onClick:d}),left:a.jsx("i",{className:"f025","data-icon":"E009 25","data-color":"_2196f3"})}),a.jsx("ul",{"data-empty":"Файлов нет",className:"files_list",children:r.load?a.jsxs("div",{"type-load":"load",children:[a.jsx("i",{}),a.jsx("i",{}),a.jsx("i",{})]}):r.list.length===0?a.jsx(a.Fragment,{}):r.list.map((l,_)=>a.jsx(qi,{dispatch:o,data:l},_))})]})},Hi=({id:e,dir:t,dispatch:n})=>{let[i,r]=m.useState(!0),o=m.useRef(null),d=c=>{c.preventDefault(),c.stopPropagation()},l=c=>{},_=c=>{};return m.useEffect(()=>{let c=o.current;["dragenter","dragover","dragleave","drop"].forEach(u=>{c.addEventListener(u,d,!1),document.body.addEventListener(u,d,!1)}),["dragenter","dragover"].forEach(u=>{c.addEventListener(u,l,!1)}),["dragleave","drop"].forEach(u=>{c.addEventListener(u,_,!1)})},[]),a.jsx(a.Fragment,{children:i?a.jsx(a.Fragment,{children:a.jsx("div",{className:"modal o ",onClick:Ue.Shake,children:a.jsxs("div",{className:"b",children:[a.jsx("div",{className:"h",children:"Загрузка файлов"}),a.jsx("div",{className:"x","data-icon":"F038",onClick:()=>{r(!1)}}),a.jsxs("div",{className:"upload",ref:o,children:[a.jsx("input",{type:"file",id:"fileElem",name:"files",multiple:!0}),a.jsx("dd",{}),a.jsx("i",{"data-icon":"F061"})]})]})},new Date().getTime())}):""})},qi=({data:e,dispatch:t})=>{let n=async()=>{let o=await(await fetch(st.url().files+"/yandex/data/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ne.getSSID()||""}})).blob();if(o.size!==2){let d=new Blob([o],{type:o.type});d=URL.createObjectURL(d);let l=document.createElement("a");l.setAttribute("href",d),l.setAttribute("download",e.name),l.click()}},i=async()=>{(await(await fetch(st.url().files+"/yandex/delete/"+e.id,{headers:{"Content-type":"application/json;charset=utf-8",SSID:ne.getSSID()||""}})).json()).status==="success"&&(t({type:"delete",id:e.id}),we.Send({type:"success",text:"Файл успешно удалён"}))};return a.jsxs("li",{children:[a.jsx("div",{className:"f035",children:A.TypeFiles(e.type)}),a.jsx("div",{className:"f100",children:A.Date(e.uDate,"dd.mm.yy")}),a.jsx("div",{className:"f000",children:e.name}),a.jsxs("div",{className:"f050 flex button",children:[a.jsx("i",{className:"f025","data-icon":"F060 35 pointer","data-color":"_b5b9cc :4CAF50",onClick:n}),a.jsx("i",{className:"f025","data-icon":"F048 35 pointer","data-color":"_b5b9cc :FF9800",onClick:i})]}),a.jsx("div",{className:"f080",children:A.Size(e.size)})]})},Ye={setSetting:ka,getSetting:ya};let Z={};Z.list=Ia(),Z.active=null;const Ji=()=>{var r;let[e,t]=m.useState([]),[n,i]=m.useState(Ye.getSetting("s03"));return m.useEffect(()=>{(async()=>{let o=Object.keys(Z.list);if(o.length!==0){let d=[];o.forEach((l,_)=>{d.push({item:a.jsx(ct,{data:Z.list[l]},Z.list[l].id),link:Z.list[l].link})}),t(d)}})()},[]),Z.active=o=>{var d;i(o),(d=document.querySelector("app-body"))==null||d.setAttribute("bookmarks",o===1?"bottom":"")},Z.set=o=>{t([...e,{item:a.jsx(ct,{data:o},o.id),link:o.link}])},Z.del=o=>{e.forEach((d,l)=>{d.link===o&&e.splice(l,1)}),t([...e])},(r=document.querySelector("app-body"))==null||r.setAttribute("bookmarks",n===1&&e.length!==0?"bottom":""),n!==0?a.jsx(a.Fragment,{children:e.length!==0?a.jsx("div",{className:"bookmarks",children:e.map(o=>o.item)}):""}):""},Xi=({id:e,type:t,name:n})=>{let i=t+"-"+e,[r,o]=m.useState(Z.list[i]!==void 0);m.useEffect(()=>{o(Z.list[i]!==void 0)},[i]);let d=()=>{Z.list[i]!==void 0?(Z.del(i),delete Z.list[i],Vt(Z.list),o(!1),we.Send({type:"success",text:"Запись удален из закладок"})):(Z.list[i]={id:e,name:n,type:t,link:i},Z.set(Z.list[i]),Vt(Z.list),o(!0),we.Send({type:"success",text:"Запись добавлен в закладки"}))};return a.jsx(a.Fragment,{children:Ye.getSetting("s03")!==0?a.jsx("i",{"data-icon":"C018","data-color":r?"_F44333 :F44333":"_b5b9cc :F44333",onClick:d}):""})},ct=({data:e})=>{let t=i=>{i.preventDefault(),delete Z.list[e.link],Z.del(e.link)},n=()=>{Be.setId(e.id)};return a.jsx("span",{onContextMenu:t,onClick:n,children:e.name})},Qi=e=>{Z.active(e)},R={},_t={},b={};b.config={iceServers:[{url:"stun:stun.l.google.com:19302"}]},b.constraints={optional:[{DtlsSrtpKeyAgreement:!0}]},b.other=[],b.users={},b.asset=0,b.remoute=!1,b.stream=null,b.user=0,b.connect=!1,b.offer=null,b.btnRefuse=null,b.time=!1;let ge;ge=document.createElement("audio"),ge.setAttribute("autoplay","true"),ge.setAttribute("muted","true"),R.start=async e=>{b.rtc=new RTCPeerConnection(b.config),b.other=[],b.remoute=!1,b.rtc.onicecandidate=n=>{n.candidate&&b.other.push(n.candidate)},b.rtc.ontrack=n=>{if(n.streams&&n.streams[0])ge.srcObject=n.streams[0];else{console.log(!1);let i=new MediaStream(n.track);ge.srcObject=i}};const t=await navigator.mediaDevices.getUserMedia({video:!1,audio:{echoCancellation:!1,autoGainControl:!0}});t.getTracks().forEach(n=>{b.rtc.addTrack(n,t)}),b.rtc.onconnectionstatechange=()=>{console.log(b.rtc.connectionState),b.rtc.connectionState},b.rtc.ontrack=async n=>{if(n.streams&&n.streams[0])ge.srcObject=n.streams[0];else{console.log(!1);let i=new MediaStream(n.track);ge.srcObject=i}},b.rtc.onaddstream=n=>{console.log(n)},b.rtc.onnegotiationneeded=n=>{console.log(n)},b.rtc.oniceconnectionstatechange=n=>{console.log(n.target)},b.rtc.onsignalingstatechange=n=>{console.log(n.target.connectionState)},b.rtc.onicegatheringstatechange=n=>{console.log(n)},b.rtc.onicecandidateerror=n=>{console.log(n)},b.rtc.ondatachannel=n=>{console.log(n)},console.log(b.rtc),b.rtc.onerror=n=>{console.log("error",n)},e()},R.useListener=e=>{_t.rtc=e},R.setListener=e=>{_t.rtc&&_t.rtc(e)},R.callTo=async e=>{R.start(async()=>{const t=await b.rtc.createOffer();await b.rtc.setLocalDescription(t),b.uid=e,le.Send({type:"module",module:"M00",query:"x0050",data:{type:"offer",offer:btoa(JSON.stringify(t)),user:b.uid}})})},R.callIn=async e=>{console.log("callIn"),b.asset=e.id,b.offer=e.offer,b.uid=e.id},R.callRise=async()=>{R.start(async()=>{b.rtc.setRemoteDescription(new RTCSessionDescription(JSON.parse(atob(b.offer))));const e=await b.rtc.createAnswer();await b.rtc.setLocalDescription(e),le.Send({type:"module",module:"M00",query:"x0050",data:{type:"answer",answer:btoa(JSON.stringify(e)),user:b.uid}}),console.log("согласилась")})},R.callOk=async e=>{b.asset=e.id;const t=new RTCSessionDescription(JSON.parse(atob(e.answer)));await b.rtc.setRemoteDescription(t),console.log("ok"),le.Send({type:"module",module:"M00",query:"x0050",data:{type:"IceCandidate",candidate:JSON.parse(JSON.stringify(b.other)),user:b.uid,send:!0}})},R.IceCandidate=async e=>{console.log(e),console.log("candidate"),e.candidate.forEach(t=>{b.rtc.addIceCandidate(new RTCIceCandidate(t))}),e.send&&le.Send({type:"module",module:"M00",query:"x0050",data:{type:"IceCandidate",candidate:JSON.parse(JSON.stringify(b.other)),user:b.uid,send:!1}})},R.callFrom=async()=>{},R.callNo=()=>{console.log("Пользователь не в сети или отклонил"),b.asset=0,b.time=!1,b.rtc&&b.rtc.close(),R.setListener({type:"state",data:"closed"})},R.callOf=()=>{b.asset=0,b.time=!1,b.rtc.close()},R.callRefuser=async()=>{le.Send({type:"module",module:"M00",query:"x0050",data:{type:"callRefuser",user:b.uid}}),b.asset=0,b.time=!1,b.rtc&&b.rtc.close()},R.Run=async e=>{R[e.data.type]&&R[e.data.type](e.data)};let ze={};function er(){let[e,t]=m.useState([]),n=m.useRef(null);return m.useEffect(()=>{},[]),ze.set=i=>{t([...e,i])},ze.del=()=>{t([])},ze.audio=(i,r)=>{n.current.volume=.5,n.current.loop=r,n.current.src="/audio/"+i,n.current.muted=!1},a.jsxs(a.Fragment,{children:[e.map(i=>i.item),a.jsx("audio",{id:"audio",ref:n,autoPlay:!0,muted:!0})]})}function tr(e,t){let n=new Date().getTime();ze.set({item:a.jsx(nr,{type:t,id:e},n),key:n})}function nr({id:e,type:t}){const[n,i]=m.useState({}),[r,o]=m.useState(t);console.log(r),m.useEffect(()=>{i(ne.getSelect("user")[e])},[]),console.log(r),R.useListener(_=>{switch(_.type){case"state":o(_.data)}});const d=()=>{switch(r){case"out":return a.jsx("span",{onClick:()=>{R.callTo(n.id),o("call")},children:a.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})});case"in":return a.jsxs(a.Fragment,{children:[a.jsx("span",{onClick:l,children:a.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M 27.9999 51.9063 C 41.0546 51.9063 51.9063 41.0781 51.9063 28 C 51.9063 14.9453 41.0312 4.0937 27.9765 4.0937 C 14.8983 4.0937 4.0937 14.9453 4.0937 28 C 4.0937 41.0781 14.9218 51.9063 27.9999 51.9063 Z M 19.5858 38.4063 C 18.4843 38.4063 17.5936 37.5156 17.5936 36.4141 C 17.5936 35.8750 17.8280 35.4063 18.2030 35.0547 L 25.1874 28.0234 L 18.2030 20.9922 C 17.8280 20.6641 17.5936 20.1719 17.5936 19.6328 C 17.5936 18.5547 18.4843 17.6875 19.5858 17.6875 C 20.1249 17.6875 20.5936 17.8984 20.9452 18.2734 L 27.9765 25.2812 L 35.0546 18.25 C 35.4530 17.8281 35.8749 17.6406 36.3905 17.6406 C 37.4921 17.6406 38.3827 18.5312 38.3827 19.6094 C 38.3827 20.1484 38.1952 20.5937 37.7968 20.9688 L 30.7655 28.0234 L 37.7733 35.0078 C 38.1249 35.3828 38.3593 35.8516 38.3593 36.4141 C 38.3593 37.5156 37.4687 38.4063 36.3671 38.4063 C 35.8046 38.4063 35.3358 38.1719 34.9843 37.8203 L 27.9765 30.7890 L 20.9921 37.8203 C 20.6405 38.1953 20.1249 38.4063 19.5858 38.4063 Z"})})}),a.jsx("span",{onClick:R.callRise,children:a.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})})]});case"call":return a.jsx("span",{onClick:()=>R.callNo(n.id),children:a.jsx("svg",{className:"red",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M 27.9999 51.9063 C 41.0546 51.9063 51.9063 41.0781 51.9063 28 C 51.9063 14.9453 41.0312 4.0937 27.9765 4.0937 C 14.8983 4.0937 4.0937 14.9453 4.0937 28 C 4.0937 41.0781 14.9218 51.9063 27.9999 51.9063 Z M 19.5858 38.4063 C 18.4843 38.4063 17.5936 37.5156 17.5936 36.4141 C 17.5936 35.8750 17.8280 35.4063 18.2030 35.0547 L 25.1874 28.0234 L 18.2030 20.9922 C 17.8280 20.6641 17.5936 20.1719 17.5936 19.6328 C 17.5936 18.5547 18.4843 17.6875 19.5858 17.6875 C 20.1249 17.6875 20.5936 17.8984 20.9452 18.2734 L 27.9765 25.2812 L 35.0546 18.25 C 35.4530 17.8281 35.8749 17.6406 36.3905 17.6406 C 37.4921 17.6406 38.3827 18.5312 38.3827 19.6094 C 38.3827 20.1484 38.1952 20.5937 37.7968 20.9688 L 30.7655 28.0234 L 37.7733 35.0078 C 38.1249 35.3828 38.3593 35.8516 38.3593 36.4141 C 38.3593 37.5156 37.4687 38.4063 36.3671 38.4063 C 35.8046 38.4063 35.3358 38.1719 34.9843 37.8203 L 27.9765 30.7890 L 20.9921 37.8203 C 20.6405 38.1953 20.1249 38.4063 19.5858 38.4063 Z"})})});case"closed":return a.jsx("span",{onClick:()=>{R.callTo(n.id),o("call")},children:a.jsx("svg",{className:"green",width:"50px",height:"50px",viewBox:"0 0 56 56",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("path",{d:"M 27.9999 51.9062 C 41.0546 51.9062 51.9063 41.0547 51.9063 28.0000 C 51.9063 14.9219 41.0312 4.0938 27.9765 4.0938 C 14.8983 4.0938 4.0937 14.9219 4.0937 28.0000 C 4.0937 41.0547 14.9218 51.9062 27.9999 51.9062 Z M 21.8827 33.8360 C 16.0702 28.0469 12.3671 20.6640 16.7499 16.2813 C 17.0077 16.0234 17.2890 15.7656 17.5468 15.5078 C 18.8827 14.2422 20.1718 14.3125 21.3202 15.9297 L 24.3671 20.2656 C 25.3983 21.7656 25.1405 22.6094 24.0390 23.7813 L 23.0780 24.8360 C 22.7265 25.1640 22.8671 25.6094 23.0312 25.8906 C 23.4765 26.7344 24.7421 28.2344 26.1014 29.5938 C 27.5077 31.0000 28.9374 32.1953 29.8280 32.6875 C 30.1562 32.875 30.6249 32.9219 30.9296 32.6406 L 31.9374 31.6797 C 33.0624 30.5781 33.9765 30.2969 35.4296 31.3281 C 37.4452 32.7578 38.6640 33.6016 39.8593 34.4219 C 41.3358 35.5000 41.6874 36.8360 40.1874 38.1953 C 39.9296 38.4531 39.6952 38.7344 39.4374 38.9922 C 35.0546 43.3516 27.6952 39.6484 21.8827 33.8360 Z"})})})}},l=()=>{R.callRefuser(n.id),ze.del()};return a.jsx("div",{className:"web-phone white",children:a.jsxs("div",{className:"w",children:[a.jsx("div",{className:"x","data-icon":"F038",onClick:l}),a.jsx("div",{className:"a"}),a.jsx("div",{className:"n",children:n.name}),a.jsx("div",{className:"b",children:d()})]})})}const ut={};function ar(e){ut.add(e)}function ir({color:e,size:t,name:n}){return a.jsx("svg",{width:t,height:t,color:e,children:a.jsx("use",{href:`#${n}`})})}function rr(){let[e,t]=m.useState([]);if(ut.x=()=>{t([])},ut.add=i=>{t(i)},e.length===0)return"";const n={sprite:""};return a.jsx("svg",{...n,xmlns:"http://www.w3.org/2000/svg",children:e.map((i,r)=>a.jsx("symbol",{id:i.name,viewBox:"0 0 24 24",fillRule:"evenodd",clipRule:"evenodd",children:a.jsx(i.path,{})},r))})}const ft={};function or(e,t){ft[e]=t}function sr(e,t){ft[e]!==void 0&&ft[e](t)}const me={};function lr(e,t){const[n,i]=m.useState(t);return m.useEffect(()=>{if(me[e])return me[e].push(i);me[e]=[i]},[]),[n]}function dr(e,t){if(me[e])return me[e].push(t);me[e]=[t]}function cr(e,t){me[e]&&me[e].forEach(n=>n(t))}const ve={setListener:sr,useListener:or,setEmitter:cr,useEmitter:lr,subEmitter:dr};function _r(){let[e,t]=m.useState([]);return ve.useListener("form",n=>{t([n])}),a.jsx(a.Fragment,{children:e.map(n=>n)})}const cn=({children:e,config:t})=>(F.New(t.crypto),t.defaultModule&&ea(t.defaultModule),na(a.jsxs(a.Fragment,{children:[a.jsx(Ri,{config:t.modal}),a.jsx(Ua,{}),a.jsx(Qa,{}),a.jsx(Ui,{}),a.jsx(rr,{}),a.jsx(_r,{}),a.jsx(er,{}),a.jsx(Ji,{}),e]}))),ur=({children:e,...t})=>a.jsx("menu",{children:e}),fr=({children:e,...t})=>a.jsxs("header",{children:["xz",e]}),mr={payment:"_payment_1lxfv_1"};function pr(){let[e,t]=m.useState({});return!e.active&&!e.payment?"":a.jsx("div",{className:mr.payment,children:"Истек срок оплаты! Доступ доступен до 16.04.2024"})}const xr=({children:e,...t})=>{let n={};return n.enCode=i=>JSON.stringify(i).toString(),n.deCode=i=>JSON.parse(i),a.jsxs("div",{className:"app",children:[a.jsx(pr,{}),a.jsx(ur,{}),a.jsx(fr,{}),a.jsx(cn,{config:{modal:{},crypto:n}}),e]})},_n=({list:e,onClick:t,active:n,size:i,view:r})=>a.jsx("nav",{children:a.jsx("ul",{className:[i,r].join(" "),children:e.map(o=>a.jsx(hr,{onClick:t,active:n,label:o.label,link:o.link},o.link))})}),hr=({onClick:e,label:t,link:n,active:i})=>a.jsx("li",{"tabs-active":String(i===n),onClick:()=>e(n),children:t});_n.defaultProps={size:"M",view:"H"};const gr=({title:e="",button:t,description:n="",children:i})=>a.jsxs("fieldset",{children:[e&&a.jsxs("legend",{children:[e,t&&a.jsx("div",{role:"button-outline",onClick:()=>t.onClick(),children:t.label})," "]}),a.jsx("ul",{children:i}),n&&a.jsx("article",{children:n})]}),vr={setting:"_setting_dva4m_2"},br=({children:e})=>a.jsx("div",{className:vr.setting,children:e}),kr=({label:e,children:t})=>{let[n,i]=m.useState(!1);return a.jsxs("li",{"data-item":"accordion",children:[a.jsxs("dl",{onClick:()=>i(!n),children:[a.jsx("dt",{children:e}),a.jsx("dd",{children:a.jsx("div",{"data-close":String(n)})})]}),n&&a.jsx("div",{children:t})]})},yr=({label:e,onClick:t,button:n})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{role:"button",onClick:()=>t(),children:n})]})}),un={Switch:({active:e,onClick:t})=>(console.log(e),e=typeof e=="number"?!!e:e,a.jsx("div",{role:"switch",onClick:()=>{console.log("Wewew"),t()},"aria-checked":e?"true":"false"}))},wr={Accordion:kr,Button:yr,Switch:({label:e,onClick:t,active:n})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{children:a.jsx(un.Switch,{onClick:t,active:n})})]})}),Info:({label:e,info:t})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{role:"info",children:t})]})}),Select:({label:e,active:t,options:n})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{role:"info",children:t})]})}),Component:({label:e,children:t})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{children:t})]})}),Node:({label:e,children:t})=>a.jsx("li",{children:a.jsxs("dl",{children:[a.jsx("dt",{children:e}),a.jsx("dd",{children:t})]})})};function fn({list:e,onClick:t,active:n,size:i,view:r}){return a.jsx("nav",{children:a.jsx("ul",{className:[i,r].join(" "),children:e.map(o=>a.jsx(Cr,{onClick:t,active:n,label:o.label,link:o.link},o.link))})})}const Cr=({onClick:e,label:t,link:n,active:i})=>a.jsx("li",{"tabs-active":String(i===n),onClick:()=>e(n),children:t});fn.defaultProps={size:"M",view:"H"};const jr={Section:gr,Main:br,Item:wr,Tabs:fn},Sr={Icon:Xi,Item:ct,Active:Qi},Er={Send:ti,Line:an};function Nr(){return a.jsx("svg",{viewBox:"0 0 462.86 359.96",children:a.jsx("path",{d:"M210.5,307.78c-27,35.41-58.14,58-120.55,50.84-1-.12-1.58-.39-1.58-2V327.87c0-1.32.51-2.12,1.85-2,100.39-1,88.17-63.46,74.8-90.94-47.3-97.28-14.46-166.27,20.26-205.14,14.1-16.37,50.53-42,128.07-23.24,9.1,2,30.51,7.8,24.46,11.38C317.5,30,297.66,68.33,295,73.12c-3.62,6.59-6.26,13.17-4.57,14.13,2.37,1.35,3.5-1.56,6.58-7.91C319.78,34.41,366-22.76,402.78,37.68a1.14,1.14,0,0,1,.09.26c9.3,56.05,30.57,228.62-97.76,224.22-23.38-2-28.82-22-32.57-18.89-3.36,3,10,21.4,32.76,23.19C448.18,270.75,411.55,66.74,407.79,41.91a1.41,1.41,0,0,1,0-.3c2-7.32,129.15,17.47,112.77,158.08,4.82,6.57,10.89,10,18.7,16.08l.13.07c8.9,3.67,10.46,12.06,11.43,18.88a63.15,63.15,0,0,1-.14,15.49c-10.48-4.62-22.74-10.11-22.26-22.53.43-12,7.35-5.21-8.8-14.22a.69.69,0,0,0-1,.57c-.33,3.87-2.7,14.69-3,16.59v0c-4.64,17-16.59,86-18.41,99.58-.77,5.7-4.94,10.41-11.4,10.39l-56.71.18c-7.73.22-9.57-7.9-10.27-11.89-2.7-15.31-4.08-29.7-4.18-29.67-20.24,9.26-108.69,3.08-108.69,3.27V330c-.29,7.56-4.51,15.26-11.74,15.32l-52.87,1c-10.36.1-13.85-1.67-15.5-11.87-2.08-13.08-1-34.26-5.32-37.43-2,1.84-8.33,8.11-10,10.83M196.16,203q9.57,0,11.42-7.72c2.18-9.07-5.66-17.7-14.77-15.68-4.95,1.11-7.53,4.94-7.53,11.53C185.28,199,188.94,203,196.16,203Z",transform:"translate(-88.37 0)"})})}const Tr={Logo:Nr,Sprite:ar,Symbol:ir},Ir={sort:"_sort_1yrvt_1"};let He={};function Dr(e,t){switch(t.type){case"active":let n="<";return e.active===t.data&&(n=e.sort==="<"?">":"<"),He.get({active:t.data,sort:n},!1),Zt({active:t.data,sort:n}),{...e,active:t.data,sort:n};default:throw new Error}}function Mr(){const[e,t]=m.useReducer(Dr,rt()===void 0?{active:1,sort:"<"}:rt());return a.jsxs("div",{className:Ir.sort,children:[a.jsx("i",{"data-color":e.active===1?"_506290":"_b5b9cc","data-icon":e.active===1?e.sort==="<"?"F073":"F072":"F071",onClick:()=>t({type:"active",data:1})}),a.jsx("i",{"data-color":e.active===2?"_506290":"_b5b9cc","data-icon":e.active===2?e.sort==="<"?"F066":"F067":"F074",onClick:()=>t({type:"active",data:2})}),a.jsx("i",{"data-color":e.active===3?"_506290":"_b5b9cc","data-icon":e.active===3?e.sort==="<"?"F068":"F069":"F070",onClick:()=>t({type:"active",data:3})})]})}function Fr(e){He.get=e}function $r(e){He.set(e)}function Lr(e,t,n){let i=1,r=0,o={},d=50;o[i]=[];let l={},_="s1a";switch(l.s1a=(c,u)=>u.s1-c.s1,l.s1d=(c,u)=>c.s1-u.s1,l.s2a=(c,u)=>c.s2-u.s2,l.s2d=(c,u)=>u.s2-c.s2,l.s3a=(c,u)=>c.s3.localeCompare(u.s3),l.s3d=(c,u)=>u.s3.localeCompare(c.s3),n.active){case 1:_=n.sort===">"?"s1d":"s1a";break;case 2:_=n.sort===">"?"s2d":"s2a";break;case 3:_=n.sort===">"?"s3d":"s3a";break}return t.sort(l[_]).forEach(c=>{r++,r<=d||(i++,r=1,o[i]=[]),o[i].push(e[c.id])}),{data:o}}function Br(e){He.count(e)}const Pr={Init:Mr,useValue:Fr,Set:$r,Run:Lr,Count:Br},qe={},mn={};function Rr(e){const[t,n]=m.useState({}),i=async r=>{n(Object.keys(qe).reduce((o,d)=>(o?o[d]=qe[d].all:o={},o),{}))};return m.useEffect(()=>{e.forEach(r=>qe[r]={all:0}),mn.menu=i,i()},[e]),t}function zr(e,t){switch(typeof t){case"number":qe[e].all+=t,mn.menu();break}}const Or={useMenu:Rr,setUpdate:zr};class Ar{constructor(t="el",n="db"){Pt(this,"storeName");Pt(this,"_dbp");this.storeName=n,this._dbp=new Promise((i,r)=>{const o=indexedDB.open(t,1);o.onerror=()=>r(o.error),o.onsuccess=()=>i(o.result),o.onupgradeneeded=()=>{o.result.createObjectStore(n)}})}_withIDBStore(t,n){return this._dbp.then(i=>new Promise((r,o)=>{const d=i.transaction(this.storeName,t);d.oncomplete=()=>r(),d.onabort=d.onerror=()=>o(d.error),n(d.objectStore(this.storeName))}))}}let mt,G={};const je=()=>(mt||(mt=new Ar),mt),pe=(e,t,n=je())=>n._withIDBStore("readwrite",i=>{G[e]=t,i.put(F.enCode(t),e)}),de=(e,t=je())=>G[e]===void 0?new Promise((n,i)=>{let r;t._withIDBStore("readonly",o=>{r=o.get(e)}).then(()=>{if(r.result!==void 0){let o=F.deCode(r.result);G[e]=o,n(o)}else n({})})}):G[e],Zr=(e,t=je())=>t._withIDBStore("readwrite",n=>{n.delete(e)}),pt=(e=je())=>e._withIDBStore("readwrite",t=>{t.clear()}),Gr={id:async(e,t,n)=>{let i=await de(t);if(n!==void 0)n({type:"load",base:i});else return i[e]},get:de,set:pe,add:async(e,t,n,i)=>{let r,o;o=await de(n),o[e.id]=e,await pe(n,o),r!==null&&(r=await de(t),r[e.id]=e.eDate,await pe(t,r)),i!==void 0&&i({type:"load",page:r,base:o})},del:Zr,upd:(e,t,n,i=je())=>{if(G[e]===void 0)return new Promise((r,o)=>{let d;i._withIDBStore("readonly",l=>{d=l.get(e)}).then(()=>{if(d.result!==void 0){let l=F.deCode(d.result);G[e]=l,G[e][t.id]={...G[e][t.id],...t.data},i.put(F.enCode(G[e]),e),r({})}else r({})})});if(G[e][t.id]!==void 0)return G[e][t.id]={...G[e][t.id],...t.data},n!==void 0&&G[n]!==void 0?G[n][t.id]!==void 0&&(G[n][t.id]=t.data.eDate):G[n]=[],delete G[e][t.id].$_item,delete G[e][t.id].$_send,i._withIDBStore("readwrite",r=>{r.put(F.enCode(G[e]),e),n!==void 0&&r.put(F.enCode(G[n]),n)})},key:(e=je())=>{const t=[];return e._withIDBStore("readonly",n=>{(n.openKeyCursor||n.openCursor).call(n).onsuccess=function(){this.result&&(t.push(this.result.key),this.result.continue())}}).then(()=>t)},load:e=>G[e],split:(e,t,n=[],i={})=>{let r=n.length!==0,o=[],d=i.sort,l=Object.keys(i).length!==0,_=Object.keys(i),c=Object.keys(e),u=1,f=[],x={};x[u]=[];let h=k=>{let S="";if(n.forEach(y=>{S+=t[k][y]}),l){let y={};_.forEach(C=>{y[C]=t[k][C]});for(let C in d)t[k][d[C]]===void 0&&(pt(),location.reload()),C==="s1"&&(y[C]=new Date(t[k][d[C]]).getTime()),C==="s2"&&(y[C]=t[k][d[C]]),C==="s3"&&(y[C]=t[k][d[C]].replace(/[^a-zа-яё]/gi,"").substring(0,1));o.push({id:k,text:S,...y})}else o.push({id:k,text:S})},g=k=>{};return c.forEach(k=>{f.push(t[k])}),f.forEach(k=>{k===void 0?(pt(),location.reload()):(r&&h(k.id),l&&g(k.id))}),{list:x,search:o,filter:i}},clear:pt,updAll:async(e,t,n,i)=>{let r=await de(t),o=await de(n);for(let d in e)o[d]=e[d],r[d]=e[d].eDate;await pe(t,r),await pe(n,o),i!==void 0&&i({type:"load",page:r,base:o})},delAll:async(e,t,n,i)=>{let r=await de(t),o=await de(n);e.forEach(d=>delete r[d]),await pe(t,r),i!==void 0&&i({type:"load",page:r,base:o})},delList:async(e,t,n)=>{let i=await de(t);e.forEach(r=>delete i[r]),await pe(t,i)},addList:async(e,t,n)=>{let i=await de(t);e.forEach(r=>i[r.id]=r.eDate),await pe(t,i)}},Kr={useKey:(e,t)=>{const n=[];t=t.map(i=>i.charCodeAt(0)),document.onkeydown=function(i){n.push(i.keyCode);for(var r=0;r<t.length;r++)if(n.indexOf(t[r])==-1)return;e(),n.length=0},document.onkeyup=function(i){n.length=0}}},Wr={s:"_s_18bde_1",loadingB:"_loadingB_18bde_1",ul:"_ul_18bde_31"};function pn({children:e}){return a.jsx("ul",{className:J.ul,children:e})}function Vr(e,t){switch(t.type){case"load":return{...e,load:t.load,wait:!1,item:1,data:t.data,list:t.data[1],size:Object.keys(t.data).length};case"update":let n=Object.keys(e.data).length,i=e.item+1;return i=n<i?1:i,e.item===i?e:{...e,wait:e.size===i,item:i,list:[...e.list,...e.data[i]]};case"clear":return{load:!1,list:[],data:{},item:1,wait:!1,size:0};default:throw new Error}}function xn(e){const t=m.useRef(null),[n,i]=m.useReducer(Vr,{load:!1,list:[],data:{},item:1,wait:!1,size:0});m.useEffect(()=>{},[]),m.useEffect(()=>{t.current.scrollTop=0,e.list!==null&&i({type:"load",load:!0,data:e.list})},[e.load]);let r=()=>{t.current.scrollHeight-t.current.scrollTop-300<=t.current.clientHeight&&!n.wait&&i({type:"update"})};return a.jsx("div",{className:Wr.s,ref:t,onScroll:r,children:a.jsx(pn,{"el-empty":"Данные не найдены",children:n.load&&n.list!==void 0?n.list.map(o=>a.jsx(e.item,{data:o},o.id)):a.jsxs("div",{"data-load":"load",children:[a.jsx("i",{}),a.jsx("i",{}),a.jsx("i",{})]})})})}const Ur={Scrolling:xn},Yr={Widget:Yi},hn=({onClick:e,active:t})=>(t=!!t,a.jsx("div",{role:"switch",onClick:()=>e,"aria-checked":`${t?"true":"false"}`}));let be={};be.KeyDown=e=>{e.key==="Enter"&&e.preventDefault()},be.PasteOne=e=>{e.preventDefault(),navigator.clipboard.readText().then(t=>{t=t.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,t)}).catch(t=>{})},be.Focus=e=>{e.target.textContent.length===0&&(e.target.innerHTML="<br>")},be.Blur=e=>{e.target.scrollLeft=0,e.target.querySelector("br")!==null&&e.target.querySelector("br").remove()};function Oe({value:e,onValue:t,name:n,placeholder:i="",title:r="",error:o="",hide:d=!1,edit:l=!0,active:_=!0,after:c="",show:u=!0,view:f,onBlur:x,onSave:h,className:g=""}){let k=!!(d&&(e===""||e===void 0)),S=z=>{t&&t({value:z.target.textContent,name:n})},y=z=>{z.key==="Enter"&&z.preventDefault()},C=z=>{},I=z=>{z.preventDefault(),navigator.clipboard.writeText(z.target.textContent).then(function(){we.Copy("Данные в буфер обмене")},function(O){console.error("Async: Could not copy text: ",O)})};if(!(l&&_)&&!u||!(l&&_)&&k)return"";const M={};M.field="input",g&&(M.className=g);const w={};i&&(w.placeholder=i),w.edit=(l&&_)+"";const L=z=>{be.Blur(z),h&&h({value:z.target.textContent,name:n})};return a.jsxs("dl",{...M,children:[r?a.jsx("dt",{children:r}):"",a.jsx("dd",{onPaste:C,onInput:S,onBlur:L,onKeyDown:y,onContextMenu:I,contentEditable:l&&_?"plaintext-only":"false",suppressContentEditableWarning:!0,...w,children:e}),o?a.jsx("em",{children:o}):""]})}function gn({onClick:e,onSend:t,name:n,onRef:i}){let[r,o]=m.useState(!1);const d=()=>{if(e)return e();r||(o(!0),t&&t(o))};return a.jsx("button",{ref:i,"data-form":"button",className:r?"btn await":"btn confirm pointer",onClick:d,children:r?"Ожидайте":n})}function vn({value:e,onValue:t,onActive:n,data:i,name:r,view:o,edit:d=!0,active:l=!0,placeholder:_="Введите сообщение"}){const c=m.useRef({value:e,timerId:null,shift:!1,send:!0}),u=()=>{c.current.value.length>0?c.current.send&&(n(!0),c.current.send=!1,c.current.timerId=setTimeout(()=>{c.current.send=!0},3e3)):n(!1)},f=y=>{c.current.value=y.target.textContent,u()},x=y=>{y.keyCode===16&&(c.current.shift=!0),y.keyCode===13&&!c.current.shift&&(y.preventDefault(),c.current.value.length!==0&&(y.target.textContent="",i&&i(c.current.value),t&&t(c.current.value),c.current.value="",n(!1)))},h=y=>{y.keyCode===16&&(c.current.shift=!1)},g=y=>{y.preventDefault(),navigator.clipboard.readText().then(C=>{window.document.execCommand("insertText",!1,C)}).catch(C=>{})},k=()=>{n(!1)},S={spellCheck:"true"};return _&&(S.placeholder=_),d&&l&&(S.contentEditable="plaintext-only"),a.jsx("dl",{"data-form":"message",children:a.jsx("dd",{onPaste:g,onInput:f,onKeyUp:h,onKeyDown:x,onBlur:k,...S,suppressContentEditableWarning:!0,children:e})})}function bn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,r=e.placeholder!==void 0?e.placeholder:"",o=_=>{e.onValue({value:_.target.textContent,name:e.name})},d=_=>{_.key==="Enter"&&_.preventDefault()},l=_=>{_.preventDefault(),navigator.clipboard.readText().then(c=>{window.document.execCommand("insertText",!1,c)}).catch(c=>{console.log("Something went wrong",c)})};return a.jsxs("dl",{"data-form":"input","type-data":"generator",children:[t(),a.jsx("dd",{onPaste:l,onInput:o,onKeyDown:d,contentEditable:n&&i?"plaintext-only":"false","data-placeholder":r,suppressContentEditableWarning:!0,children:e.value})]})}function kn({value:e,onValue:t,placeholder:n="",name:i}){let r=(h,g)=>Number(Math.round(h+Math.random()*(g-h))),o=m.useRef(null),d=m.useRef(null),l=r(1e4,99999),_=h=>{h.key!=="Backspace"&&(h.key==="Enter"&&h.preventDefault(),h.target.textContent.length===5&&h.preventDefault(),/\d/.test(h.key)||h.preventDefault())},c=h=>{t({value:Number(h.target.textContent)===l,name:i})},u=h=>{h.preventDefault(),navigator.clipboard.readText().then(g=>{window.document.execCommand("insertText",!1,g.replace(/(\r\n|\n|\r)/gm," ").replace(/[^0-9]/g,"").substring(0,5))}).catch(g=>{console.log("Something went wrong",g)})};m.useEffect(()=>{const h=o.current,g=h.getContext("2d");g.clearRect(0,0,h.width,h.height),g.font="30px brush script mt",g.fillStyle="#eee",g.textAlign="center",g.fillText(l,50,27),d.current.textContent=""},[l]);const f={};f.field="captcha";const x={};return n&&(x.placeholder=n),a.jsxs("dl",{...f,children:[a.jsx("dd",{ref:d,onPaste:u,onInput:c,onBlur:be.Blur,onKeyDown:_,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,...x}),a.jsx("canvas",{ref:o,width:"100",height:"35"})]})}function yn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"",i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""},r=c=>{c.preventDefault(),c.target.textContent=c.target.textContent.slice(-1).replace(/[^+\d]/g,"");let u=window.getSelection(),f=c.target.textContent.length;if(i[c.target.id]=c.target.textContent,i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6,u.collapse(c.target.firstChild,1),f===0){c.target.blur(),c.target.focus();return}c.target.nextSibling!=null&&c.target.nextSibling.focus()},o=c=>{if(c.key==="Enter"&&c.preventDefault(),c.key==="Backspace"){if(c.preventDefault(),c.target.textContent="",i[c.target.id]="",c.target.previousSibling!=null){let u=c.target.previousSibling.id.slice(1);c.target.previousSibling.textContent="",i["n"+u]="",c.target.previousSibling.focus()}i.code=i.n1+""+i.n2+i.n3+i.n4+i.n5+i.n6}},d=c=>{if(e.real)e.onValue({value:i.code,name:e.name});else if(i.code.length===6&&(e.onValue({value:i.code,name:e.name}),e.empty)){i={n1:"",n2:"",n3:"",n4:"",n5:"",n6:"",code:""};for(let u=1;u<=6;u++){let f=document.getElementById("n"+u);f&&(f.textContent="")}}},l=c=>{c.target.textContent=""},_=c=>{c.preventDefault()};return a.jsxs("dl",{"data-form":"code",children:[t(),a.jsxs("div",{children:[a.jsx("dd",{id:"n1",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0}),a.jsx("dd",{id:"n2",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0}),a.jsx("dd",{id:"n3",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0}),a.jsx("dd",{id:"n4",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0}),a.jsx("dd",{id:"n5",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0}),a.jsx("dd",{id:"n6",onKeyDown:o,onKeyUp:d,onFocus:l,onPaste:_,onInput:r,contentEditable:!0})]}),n()]})}function wn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"";e.edit!==void 0&&e.edit,e.active!==void 0&&e.active;let[i,r]=m.useState(e.value),o=d=>{let l=d.target.getAttribute("set-color");r(l),e.onValue({value:l,name:e.name})};return a.jsx(a.Fragment,{children:e.view==="icon"?a.jsx("i",{"data-icon":"F043"}):a.jsxs("dl",{children:[t(),a.jsxs("dd",{"el-val":i,children:[a.jsx("em",{onClick:o,"set-color":"0"}),a.jsx("em",{onClick:o,"set-color":"1"}),a.jsx("em",{onClick:o,"set-color":"2"}),a.jsx("em",{onClick:o,"set-color":"3"}),a.jsx("em",{onClick:o,"set-color":"4"}),a.jsx("em",{onClick:o,"set-color":"5"})]}),n()]})})}const Se={o:"_o_ff5dx_1",c:"_c_ff5dx_11"};function xt(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"",i=e.edit!==void 0?e.edit:!0,r=e.active!==void 0?e.active:!0,o=e.placeholder!==void 0?e.placeholder:"",[d,l]=m.useState(e.value===void 0?new Date:e.value),_=!i&&r;m.useEffect(()=>{l(e.value===void 0?new Date:e.value)},[e.value]);let c=h=>{l(h),e.onValue({value:h,name:e.name})},u=h=>{const g=h.target.getBoundingClientRect(),k=g.left,S=g.top;ve.setListener("form",a.jsx(Hr,{position:{x:k,y:S},onValue:c,date:d},new Date().getTime()))};const f={};f.field="input";const x={};return o&&(x.placeholder=o),_?a.jsx(a.Fragment,{}):a.jsx(a.Fragment,{children:e.view==="icon"?a.jsx("i",{"data-icon":"F043",className:"pointer","data-color":"_b5b9cc :506290",onClick:u}):a.jsxs("dl",{...f,children:[t(),a.jsx("dd",{onClick:u,...x,"data-edit":(i&&r)+"",children:A.Date(d,"dd.mm.yyyy")}),n()]})})}const Hr=e=>{let[t,n]=m.useState(!0),i=new Date,r=new Date(e.date),o={y:parseInt(i.getFullYear()),d:parseInt(i.getDate()),m:parseInt(i.getMonth())+1},d={y:parseInt(r.getFullYear()),d:parseInt(r.getDate()),m:parseInt(r.getMonth())+1},[l,_]=m.useState({y:d.y,m:d.m}),c=w=>{let L=w.getDay();return L===0&&(L=7),L-1},u=["пн","вт","ср","чт","пт","сб","вс"],f=l.m-1,x=new Date(l.y,f),h=[];for(let w=0;w<c(x);w++)h.push(0);for(;x.getMonth()===f;)h.push(x.getDate()),x.setDate(x.getDate()+1);let g=()=>{n(!1)},k=()=>{C(l.m+1,l.y)},S=()=>{C(l.m-1,l.y)},y=w=>{e.onValue(l.y+"-"+A.Number(2,l.m)+"-"+A.Number(2,w)),g()},C=(w,L)=>{L=w>12?L+1:w<1?L-1:L,w=w>12?1:w<1?12:w,_({y:L,m:w})},I=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,M=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return a.jsx(a.Fragment,{children:t?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Se.o,onClick:()=>g()},new Date().getTime()),a.jsxs("div",{className:Se.c,style:{top:I+"px",left:M+"px"},children:[a.jsxs("s",{children:[a.jsx("i",{"data-icon":"F021",onClick:()=>S()}),a.jsxs("h2",{children:[A.Month(l.m).name," ",l.y]}),a.jsx("i",{"data-icon":"F022",onClick:()=>k()})]}),a.jsxs("div",{children:[u.map((w,L)=>a.jsx("p",{children:w},"v"+L)),h.map((w,L)=>a.jsx("span",{children:w!==0?a.jsx("b",{color:o.y===l.y&&o.m===l.m&&o.d===w?"_FFEB3B":"",onClick:()=>y(w),children:w}):a.jsx("p",{})},L))]})]})]}):""})};function ht({value:e,onValue:t,name:n,placeholder:i="",title:r,error:o,hide:d=!1,edit:l=!0,show:_=!0,active:c=!0,after:u="",view:f}){let[x,h]=m.useState(e),g=k=>{Ue.Open("M13","Regulations",S=>{h(S)})};return d?a.jsx(a.Fragment,{}):a.jsxs("dl",{"data-form":"select","data-view":f,children:[r?a.jsx("dt",{children:r}):"",a.jsx("dd",{onClick:g,"data-edit":(l&&c)+"","data-placeholder":i,"data-after":u,children:x}),o?a.jsx("dt",{children:o}):""]})}function gt(e){let t=e.value,n=f=>e.type==="multi"?f.replace(/[^+\d.+-]/g,""):f.replace(/[^+\d.]/g,""),i=(f,x)=>{let h=document.createRange(),g=window.getSelection();h.setStart(x.childNodes[0],f),h.collapse(!0),g.removeAllRanges(),g.addRange(h),x.focus()},r=f=>{e.onValue({value:n(f.target.textContent),name:e.name}),f.target.textContent=n(f.target.textContent),f.target.textContent.length>0&&i(f.target.textContent.length,f.target)},o=f=>{f.target.textContent===""&&(f.target.textContent=0),e.onValue({value:n(f.target.textContent),name:e.name}),f.target.textContent=A.Money(f.target.textContent)},d=f=>{f.target.textContent=n(f.target.textContent)},l=f=>{f.key==="Enter"&&f.preventDefault()},_=f=>{f.preventDefault(),navigator.clipboard.readText().then(x=>{x=x.replace(/^\s*/,"").replace(/\s*$/,""),window.document.execCommand("insertText",!1,x)}).catch(x=>{console.log("Something went wrong",x)})},c=()=>e.title?a.jsx("dt",{children:e.title}):"",u=()=>e.error?a.jsx("em",{children:e.error}):"";return a.jsxs("dl",{"data-form":"input",children:[c(),a.jsx("dd",{onInput:r,onPaste:_,onBlur:o,onKeyDown:l,onFocus:d,contentEditable:!0,suppressContentEditableWarning:!0,"e-after":e.after,children:A.Money(t)}),u()]})}function Cn({value:e,onValue:t,name:n,view:i,error:r,edit:o=!0,active:d=!0,title:l,placeholder:_="",after:c}){let[u,f]=m.useState(e);m.useEffect(()=>{f(e)},[e]);let x=k=>{f(k),t&&t({value:k,name:n})},h=k=>{if(!o||!d)return;const S=k.target.getBoundingClientRect(),y=S.left,C=S.top;ve.setListener("form",a.jsx(qr,{position:{x:y,y:C},onValue:x,date:u},new Date().getTime()))};const g={};return _&&(g.placeholder=_),a.jsx(a.Fragment,{children:i==="icon"?a.jsx("i",{"data-icon":"F043",onClick:h}):a.jsxs("dl",{children:[l&&a.jsx("dt",{children:l}),a.jsx("dd",{onClick:h,...g,children:A.Date(u,"mm.yyyy")}),r&&a.jsx("em",{children:r})]})})}const qr=e=>{let[t,n]=m.useState(!0),i=new Date,r=new Date(e.date),o={y:parseInt(i.getFullYear()),m:parseInt(i.getMonth())+1},d={y:parseInt(r.getFullYear()),m:parseInt(r.getMonth())+1},[l,_]=m.useState(d.y),c=()=>{n(!1)},u=()=>{_(l+1)},f=()=>{_(l-1)},x=y=>{e.onValue(l+"-"+A.Number(2,y)),c()},h=y=>o.y===d.y&&o.m===y?"_FFEB3B":"",g=Array(12).fill("").map((y,C)=>C+1),k=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,S=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return a.jsx(a.Fragment,{children:t?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Se.o,onClick:()=>c()},new Date().getTime()),a.jsxs("div",{className:Se.c,style:{top:k+"px",left:S+"px"},children:[a.jsxs("s",{children:[a.jsx("i",{"data-icon":"F021",onClick:()=>f()}),a.jsx("h2",{children:l}),a.jsx("i",{"data-icon":"F022",onClick:()=>u()})]}),a.jsx("div",{children:g.map((y,C)=>a.jsx("span",{onClick:()=>{x(y)},color:h(y),children:a.jsx("b",{children:A.Month(y).abc})},C))})]})]}):""})};function jn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"",[i,r]=m.useState(!1),o=e.edit!==void 0?e.edit:!0,d=e.active!==void 0?e.active:!0,_=!!(e.hide&&(e.value===""||e.value===void 0))&&!(o&&d);i=o?!0:i;let c=e.placeholder!==void 0?e.placeholder:"Заметка пуста",u=k=>{e.onValue({value:k.target.innerText,name:e.name})},f=k=>{k.preventDefault(),navigator.clipboard.readText().then(S=>{window.document.execCommand("insertText",!1,S)}).catch(S=>{console.log("Something went wrong",S)})},x=k=>{o||r(!i)};const h={};h.field="notes",e.className&&(h.className=e.className);const g={};return c&&(g.placeholder=c),_?a.jsx(a.Fragment,{}):a.jsxs("dl",{...h,children:[t(),a.jsx("dd",{onPaste:f,onInput:u,contentEditable:o&&d?"plaintext-only":"false","data-edit":(o&&d)+"","data-open":""+i,...g,onDoubleClick:x,suppressContentEditableWarning:!0,children:e.value}),n()]})}function vt({onValue:e,active:t,max:n,edit:i,title:r,error:o,show:d,hide:l,value:_,placeholder:c,className:u,name:f,after:x,view:h}){let g=()=>r?a.jsx("dt",{children:r}):"",k=()=>o?a.jsx("em",{children:o}):"";i=i!==void 0?i:!0,t=t!==void 0?t:!0,l=!!(l&&(_===""||_===void 0))&&!(i&&t),c=c!==void 0?c:"",n=n!==void 0?n:99;let y=!1,C=O=>{e&&e({value:O.target.textContent,name:f})},I=O=>{if(!(y&&O.which===86)){if(O.which===17||O.which===91)return y=!0;O.key!=="Backspace"&&(O.target.textContent.length===n&&O.preventDefault(),O.key==="Enter"&&O.preventDefault(),isNaN(parseInt(String.fromCharCode(O.which)))&&O.preventDefault())}},M=O=>{if(O.which===17||O.which===91)return y=!1},w=O=>{O.preventDefault(),navigator.clipboard.readText().then(H=>{H=H.replace(/\D/g,""),console.log(H),window.document.execCommand("insertText",!1,""+H.replace(/\D/g,""))}).catch(H=>{console.log("Something went wrong",H)})};const L={};L.field="input",u&&(L.className=u);let z={};return i&&t?(z.edit="true",z.contentEditable="plaintext-only"):z.contentEditable="false",c&&(z.placeholder=c),x&&(z.after=x),l?a.jsx(a.Fragment,{}):a.jsxs("dl",{...L,children:[g(),a.jsx("dd",{...z,onPaste:w,onInput:C,onKeyDown:I,onKeyUp:M,suppressContentEditableWarning:!0,children:_}),k()]})}function Sn({value:e,onValue:t,name:n,placeholder:i="",className:r,title:o,error:d,edit:l=!0,active:_=!0,reload:c=!1,after:u=""}){let f=S=>{t&&t({value:S.target.textContent,name:n,reload:c})},x=S=>{S.key==="Enter"&&S.preventDefault()},h=S=>{S.preventDefault(),navigator.clipboard.readText().then(y=>{window.document.execCommand("insertText",!1,y.replace(/(\r\n|\n|\r)/gm," "))}).catch(y=>{console.log("Something went wrong",y)})};const g={};g.field="password",r&&(g.className=r);const k={};return i&&(k.placeholder=i),a.jsxs("dl",{...g,children:[o?a.jsx("dt",{children:o}):"",a.jsx("dd",{onPaste:h,onInput:f,onKeyDown:x,onBlur:be.Blur,contentEditable:l&&_?"plaintext-only":"false",...k,suppressContentEditableWarning:!0,children:e}),d?a.jsx("em",{children:d}):""]})}const bt={0:{name:"Heard Island and Mcdonald Islands",dial_code:"+0",code:"HM",mask:"+0(___) ___-__-__"},1:{name:"United States",dial_code:"+1",code:"US",mask:"+1(___) ___-__-__"},7:{name:"Russia",dial_code:"+7",code:"RU",mask:"+7(___) ___-__-__"},20:{name:"Egypt",dial_code:"+20",code:"EG",mask:"+20(___) ___-__-__"},27:{name:"South Africa",dial_code:"+27",code:"ZA",mask:"+27(___) __-__-__"},30:{name:"Greece",dial_code:"+30",code:"GR",mask:"+30(___) ___-__-__"},31:{name:"Netherlands",dial_code:"+31",code:"NL",mask:"+31(___) __-__-__"},32:{name:"Belgium",dial_code:"+32",code:"BE",mask:"+32(___) __-__-__"},33:{name:"France",dial_code:"+33",code:"FR",mask:"+33(___) __-__-__"},34:{name:"Spain",dial_code:"+34",code:"ES",mask:"+34(___) __-__-__"},36:{name:"Hungary",dial_code:"+36",code:"HU",mask:"+36(___) __-__-__"},39:{name:"Italy",dial_code:"+39",code:"IT",mask:"+39(___) ___-__-__"},40:{name:"Romania",dial_code:"+40",code:"RO",mask:"+40(___) __-__-__"},41:{name:"Switzerland",dial_code:"+41",code:"CH",mask:"+41(___) __-__-__"},43:{name:"Austria",dial_code:"+43",code:"AT",mask:"+43(__) ___-__-__"},44:{name:"United Kingdom",dial_code:"+44",code:"GB",mask:"+44(___) ___-__-__"},45:{name:"Denmark",dial_code:"+45",code:"DK",mask:"+45(__) __-__-__"},46:{name:"Sweden",dial_code:"+46",code:"SE",mask:"+46(___) __-__-__"},47:{name:"Svalbard and Jan Mayen",dial_code:"+47",code:"SJ",mask:"+47(__) __-__-__"},48:{name:"Poland",dial_code:"+48",code:"PL",mask:"+48(__) __-__-__"},49:{name:"Germany",dial_code:"+49",code:"DE",mask:"+49(___) ___-__-__"},51:{name:"Peru",dial_code:"+51",code:"PE",mask:"+51(___) __-__-__"},52:{name:"Mexico",dial_code:"+52",code:"MX",mask:"+52(__-__) ___-__-__"},53:{name:"Cuba",dial_code:"+53",code:"CU",mask:"+53(__) __-__-__"},54:{name:"Argentina",dial_code:"+54",code:"AR",mask:"+54(__-__) ___-__-__"},55:{name:"Brazil",dial_code:"+55",code:"BR",mask:"+55(___) ___-__-__"},56:{name:"Chile",dial_code:"+56",code:"CL",mask:"+56(___) __-__-__"},57:{name:"Colombia",dial_code:"+57",code:"CO",mask:"+57(___) ___-__-__"},58:{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",code:"VE",mask:"+58(___) ___-__-__"},60:{name:"Malaysia",dial_code:"+60",code:"MY",mask:"+60(___) __-__-__"},61:{name:"Cocos (Keeling) Islands",dial_code:"+61",code:"CC",mask:"+61(___) ___-__-__"},62:{name:"Indonesia",dial_code:"+62",code:"ID",mask:"+62(___) __-__-__"},63:{name:"Philippines",dial_code:"+63",code:"PH",mask:"+63(___) ___-__-__"},64:{name:"Pitcairn",dial_code:"+64",code:"PN",mask:"+64(___) __-__-__"},65:{name:"Singapore",dial_code:"+65",code:"SG",mask:"+65(__) __-__-__"},66:{name:"Thailand",dial_code:"+66",code:"TH",mask:"+66(___) __-__-__"},77:{name:"Kazakhstan",dial_code:"+77",code:"KZ",mask:"+77(__) ___-__-__"},81:{name:"Japan",dial_code:"+81",code:"JP",mask:"+81(___) ___-__-__"},82:{name:"Korea, Republic of South Korea",dial_code:"+82",code:"KR",mask:"+82(___) ___-__-__"},84:{name:"Vietnam",dial_code:"+84",code:"VN",mask:"+84(___) __-__-__"},86:{name:"China",dial_code:"+86",code:"CN",mask:"+86(__-__) ___-__-__"},90:{name:"Turkey",dial_code:"+90",code:"TR",mask:"+90(___) ___-__-__"},91:{name:"India",dial_code:"+91",code:"IN",mask:"+91(___) ___-__-__"},92:{name:"Pakistan",dial_code:"+92",code:"PK",mask:"+92(___) ___-__-__"},93:{name:"Afghanistan",dial_code:"+93",code:"AF",mask:"+93(__) ___-__-__"},94:{name:"Sri Lanka",dial_code:"+94",code:"LK",mask:"+94(___) __-__-__"},95:{name:"Myanmar",dial_code:"+95",code:"MM",mask:"+95(___) ___-__-__"},98:{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",code:"IR",mask:"+98(___) ___-__-__"},211:{name:"South Sudan",dial_code:"+211",code:"SS",mask:"+211(___) ___-__-__"},212:{name:"Morocco",dial_code:"+212",code:"MA",mask:"+212(___) __-__-__"},213:{name:"Algeria",dial_code:"+213",code:"DZ",mask:"+213(__) ___-__-__"},216:{name:"Tunisia",dial_code:"+216",code:"TN",mask:"+216(__) __-__-__"},218:{name:"Libyan Arab Jamahiriya",dial_code:"+218",code:"LY",mask:"+218(___) ___-__-__"},220:{name:"Gambia",dial_code:"+220",code:"GM",mask:"+220(___) __-__"},221:{name:"Senegal",dial_code:"+221",code:"SN",mask:"+221(___) __-__-__"},222:{name:"Mauritania",dial_code:"+222",code:"MR",mask:"+222(__) __-__-__"},223:{name:"Mali",dial_code:"+223",code:"ML",mask:"+223(__) __-__-__"},224:{name:"Guinea",dial_code:"+224",code:"GN",mask:"+224(__) __-__-__"},225:{name:"Cote d'Ivoire",dial_code:"+225",code:"CI",mask:"+225(__) __-__-__"},226:{name:"Burkina Faso",dial_code:"+226",code:"BF",mask:"+226(__) __-__-__"},227:{name:"Niger",dial_code:"+227",code:"NE",mask:"+227(__) __-__-__"},228:{name:"Togo",dial_code:"+228",code:"TG",mask:"+228(__) __-__-__"},229:{name:"Benin",dial_code:"+229",code:"BJ",mask:"+229(__) __-__-__"},230:{name:"Mauritius",dial_code:"+230",code:"MU",mask:"+230(___) __-__"},231:{name:"Liberia",dial_code:"+231",code:"LR",mask:"+231(___) __-__"},232:{name:"Sierra Leone",dial_code:"+232",code:"SL",mask:"+232(__) __-__-__"},233:{name:"Ghana",dial_code:"+233",code:"GH",mask:"+233(___) __-__-__"},234:{name:"Nigeria",dial_code:"+234",code:"NG",mask:"+234(___) ___-__-__"},235:{name:"Chad",dial_code:"+235",code:"TD",mask:"+235(__) __-__-__"},236:{name:"Central African Republic",dial_code:"+236",code:"CF",mask:"+236(__) __-__-__"},237:{name:"Cameroon",dial_code:"+237",code:"CM",mask:"+237(__) __-__-__"},238:{name:"Cape Verde",dial_code:"+238",code:"CV",mask:"+238(___) __-__"},239:{name:"Sao Tome and Principe",dial_code:"+239",code:"ST",mask:"+239(___) ___-__-__"},240:{name:"Equatorial Guinea",dial_code:"+240",code:"GQ",mask:"+240(___) __-__-__"},241:{name:"Gabon",dial_code:"+241",code:"GA",mask:"+241(__) __-__-__"},242:{name:"Congo",dial_code:"+242",code:"CG",mask:"+242(___) __-__-__"},243:{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",code:"CD",mask:"+243(___) ___-__-__"},244:{name:"Angola",dial_code:"+244",code:"AO",mask:"+244(__) ___-__-__"},245:{name:"Guinea-Bissau",dial_code:"+245",code:"GW",mask:"+245(___) __-__"},246:{name:"British Indian Ocean Territory",dial_code:"+246",code:"IO",mask:"+246(___) ___-__-__"},248:{name:"Seychelles",dial_code:"+248",code:"SC",mask:"+248(___) ___-__-__"},249:{name:"Sudan",dial_code:"+249",code:"SD",mask:"+249(___) __-__-__"},250:{name:"Rwanda",dial_code:"+250",code:"RW",mask:"+250(___) __-__-__"},251:{name:"Ethiopia",dial_code:"+251",code:"ET",mask:"+251(___) __-__-__"},252:{name:"Somalia",dial_code:"+252",code:"SO",mask:"+252(___) ___-__-__"},253:{name:"Djibouti",dial_code:"+253",code:"DJ",mask:"+253(___) ___-__-__"},254:{name:"Kenya",dial_code:"+254",code:"KE",mask:"+254(___) __-__-__"},255:{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",code:"TZ",mask:"+255(___) __-__-__"},256:{name:"Uganda",dial_code:"+256",code:"UG",mask:"+256(___) __-__-__"},257:{name:"Burundi",dial_code:"+257",code:"BI",mask:"+257(__) __-__-__"},258:{name:"Mozambique",dial_code:"+258",code:"MZ",mask:"+258(___) __-__-__"},260:{name:"Zambia",dial_code:"+260",code:"ZM",mask:"+260(___) __-__-__"},261:{name:"Madagascar",dial_code:"+261",code:"MG",mask:"+261(___) __-__-__"},262:{name:"Reunion",dial_code:"+262",code:"RE",mask:"+262(___) __-__-__"},263:{name:"Zimbabwe",dial_code:"+263",code:"ZW",mask:"+263(___) __-__-__"},264:{name:"Namibia",dial_code:"+264",code:"NA",mask:"+264(___) __-__-__"},265:{name:"Malawi",dial_code:"+265",code:"MW",mask:"+265(___) __-__-__"},266:{name:"Lesotho",dial_code:"+266",code:"LS",mask:"+266(__) __-__-__"},267:{name:"Botswana",dial_code:"+267",code:"BW",mask:"+267(__) __-__-__"},268:{name:"Swaziland",dial_code:"+268",code:"SZ",mask:"+268(___) ___-__-__"},269:{name:"Comoros",dial_code:"+269",code:"KM",mask:"+269(___) __-__"},290:{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",code:"SH",mask:"+290(___) ___-__-__"},291:{name:"Eritrea",dial_code:"+291",code:"ER",mask:"+291(___) ___-__-__"},297:{name:"Aruba",dial_code:"+297",code:"AW",mask:"+297(_) __-__-__"},298:{name:"Faroe Islands",dial_code:"+298",code:"FO",mask:"+298(__) __-__"},299:{name:"Greenland",dial_code:"+299",code:"GL",mask:"+299(__) __-__"},345:{name:"Cayman Islands",dial_code:"+ 345",code:"KY",mask:"+345(___) ___-__-__"},350:{name:"Gibraltar",dial_code:"+350",code:"GI",mask:"+350(__) __-__-__"},351:{name:"Portugal",dial_code:"+351",code:"PT",mask:"+351(___) __-__-__"},352:{name:"Luxembourg",dial_code:"+352",code:"LU",mask:"+352(___) __-__-__"},353:{name:"Ireland",dial_code:"+353",code:"IE",mask:"+353(___) __-__-__"},354:{name:"Iceland",dial_code:"+354",code:"IS",mask:"+354(___) __-__"},355:{name:"Albania",dial_code:"+355",code:"AL",mask:"+355(__) ___-__-__"},356:{name:"Malta",dial_code:"+356",code:"MT",mask:"+356(__) __-__-__"},357:{name:"Cyprus",dial_code:"+357",code:"CY",mask:"+357(__) __-__-__"},358:{name:"Finland",dial_code:"+358",code:"FI",mask:"+358(___) __-__-__"},359:{name:"Bulgaria",dial_code:"+359",code:"BG",mask:"+359(___) __-__-__"},370:{name:"Lithuania",dial_code:"+370",code:"LT",mask:"+370(_) ___-__-__"},371:{name:"Latvia",dial_code:"+371",code:"LV",mask:"+371(__) __-__-__"},372:{name:"Estonia",dial_code:"+372",code:"EE",mask:"+372(__) __-__-__"},373:{name:"Moldova",dial_code:"+373",code:"MD",mask:"+373(__) __-__-__"},374:{name:"Armenia",dial_code:"+374",code:"AM",mask:"+374(_) ___-__-__"},375:{name:"Belarus",dial_code:"+375",code:"BY",mask:"+375(__) ___-__-__"},376:{name:"Andorra",dial_code:"+376",code:"AD",mask:"+376(_) _-__-__"},377:{name:"Monaco",dial_code:"+377",code:"MC",mask:"+377(___) __-__-__"},378:{name:"San Marino",dial_code:"+378",code:"SM",mask:"+378(__) __-__-__"},379:{name:"Holy See (Vatican City State)",dial_code:"+379",code:"VA",mask:"+379(___) ___-__-__"},380:{name:"Ukraine",dial_code:"+380",code:"UA",mask:"+380(__) ___-__-__"},381:{name:"Serbia",dial_code:"+381",code:"RS",mask:"+381(__) __-__-__"},382:{name:"Montenegro",dial_code:"+382",code:"ME",mask:"+382(___) ___-__-__"},383:{name:"Kosovo",dial_code:"+383",code:"XK",mask:"+383(___) __-__"},385:{name:"Croatia",dial_code:"+385",code:"HR",mask:"+385(__) __-__-__"},386:{name:"Slovenia",dial_code:"+386",code:"SI",mask:"+386(__) __-__-__"},387:{name:"Bosnia and Herzegovina",dial_code:"+387",code:"BA",mask:"+387(__) __-__-__"},389:{name:"Macedonia",dial_code:"+389",code:"MK",mask:"+389(__) __-__-__"},420:{name:"Czech Republic",dial_code:"+420",code:"CZ",mask:"+420(___) __-__-__"},421:{name:"Slovakia",dial_code:"+421",code:"SK",mask:"+421(___) __-__-__"},423:{name:"Liechtenstein",dial_code:"+423",code:"LI",mask:"+423(___) __-__-__"},500:{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",code:"GS",mask:"+500(___) ___-__-__"},501:{name:"Belize",dial_code:"+501",code:"BZ",mask:"+501(___) __-__"},502:{name:"Guatemala",dial_code:"+502",code:"GT",mask:"+502(__) __-__-__"},503:{name:"El Salvador",dial_code:"+503",code:"SV",mask:"+503(__) __-__-__"},504:{name:"Honduras",dial_code:"+504",code:"HN",mask:"+504(__) __-__-__"},505:{name:"Nicaragua",dial_code:"+505",code:"NI",mask:"+505(__) __-__-__"},506:{name:"Costa Rica",dial_code:"+506",code:"CR",mask:"+506(__) __-__-__"},507:{name:"Panama",dial_code:"+507",code:"PA",mask:"+507(__) __-__-__"},508:{name:"Saint Pierre and Miquelon",dial_code:"+508",code:"PM",mask:"+508(___) ___-__-__"},509:{name:"Haiti",dial_code:"+509",code:"HT",mask:"+509(__) __-__-__"},590:{name:"Saint Martin",dial_code:"+590",code:"MF",mask:"+590(___) __-__-__"},591:{name:"Bolivia, Plurinational State of bolivia",dial_code:"+591",code:"BO",mask:"+591(__) __-__-__"},592:{name:"Guyana",dial_code:"+592",code:"GY",mask:"+592(___) ___-__-__"},593:{name:"Ecuador",dial_code:"+593",code:"EC",mask:"+593(___) __-__-__"},594:{name:"French Guiana",dial_code:"+594",code:"GF",mask:"+594(___) __-__-__"},595:{name:"Paraguay",dial_code:"+595",code:"PY",mask:"+595(___) __-__-__"},596:{name:"Martinique",dial_code:"+596",code:"MQ",mask:"+596(___) __-__-__"},597:{name:"Suriname",dial_code:"+597",code:"SR",mask:"+597(___) __-__"},598:{name:"Uruguay",dial_code:"+598",code:"UY",mask:"+598(__) __-__-__"},599:{name:"Netherlands Antilles",dial_code:"+599",code:"AN",mask:"+599(__) __-__-__"},670:{name:"Timor-Leste",dial_code:"+670",code:"TL",mask:"+670(__) __-__-__"},672:{name:"Norfolk Island",dial_code:"+672",code:"NF",mask:"+672(___) ___-__-__"},673:{name:"Brunei Darussalam",dial_code:"+673",code:"BN",mask:"+673(___) __-__"},674:{name:"Nauru",dial_code:"+674",code:"NR",mask:"+674(___) __-__"},675:{name:"Papua New Guinea",dial_code:"+675",code:"PG",mask:"+675(___) __-__"},676:{name:"Tonga",dial_code:"+676",code:"TO",mask:"+676(___) __-__"},677:{name:"Solomon Islands",dial_code:"+677",code:"SB",mask:"+677(___) __-__"},678:{name:"Vanuatu",dial_code:"+678",code:"VU",mask:"+678(___) __-__"},679:{name:"Fiji",dial_code:"+679",code:"FJ",mask:"+679(___) __-__"},680:{name:"Palau",dial_code:"+680",code:"PW",mask:"+680(___) ___-__-__"},681:{name:"Wallis and Futuna",dial_code:"+681",code:"WF",mask:"+681(___) ___-__-__"},682:{name:"Cook Islands",dial_code:"+682",code:"CK",mask:"+682(_) __-__"},683:{name:"Niue",dial_code:"+683",code:"NU",mask:"+683(___) ___-__-__"},685:{name:"Samoa",dial_code:"+685",code:"WS",mask:"+685(__) __-__"},686:{name:"Kiribati",dial_code:"+686",code:"KI",mask:"+686(___) ___-__-__"},687:{name:"New Caledonia",dial_code:"+687",code:"NC",mask:"+687(__) __-__"},688:{name:"Tuvalu",dial_code:"+688",code:"TV",mask:"+688(___) ___-__-__"},689:{name:"French Polynesia",dial_code:"+689",code:"PF",mask:"+689(__) __-__"},690:{name:"Tokelau",dial_code:"+690",code:"TK",mask:"+690(___) ___-__-__"},691:{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",code:"FM",mask:"+691(___) ___-__-__"},692:{name:"Marshall Islands",dial_code:"+692",code:"MH",mask:"+692(___) ___-__-__"},850:{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",code:"KP",mask:"+850(___) ___-__-__"},852:{name:"Hong Kong",dial_code:"+852",code:"HK",mask:"+852(__) __-__-__"},853:{name:"Macao",dial_code:"+853",code:"MO",mask:"+853(__) __-__-__"},855:{name:"Cambodia",dial_code:"+855",code:"KH",mask:"+855(__) __-__-__"},856:{name:"Laos",dial_code:"+856",code:"LA",mask:"+856(___) ___-__-__"},880:{name:"Bangladesh",dial_code:"+880",code:"BD",mask:"+880(___) ___-__-__"},886:{name:"Taiwan",dial_code:"+886",code:"TW",mask:"+886(___) __-__-__"},960:{name:"Maldives",dial_code:"+960",code:"MV",mask:"+960(___) __-__"},961:{name:"Lebanon",dial_code:"+961",code:"LB",mask:"+961(__) __-__-__"},962:{name:"Jordan",dial_code:"+962",code:"JO",mask:"+962(___) __-__-__"},963:{name:"Syrian Arab Republic",dial_code:"+963",code:"SY",mask:"+963(___) __-__-__"},964:{name:"Iraq",dial_code:"+964",code:"IQ",mask:"+964(___) ___-__-__"},965:{name:"Kuwait",dial_code:"+965",code:"KW",mask:"+965(__) __-__-__"},966:{name:"Saudi Arabia",dial_code:"+966",code:"SA",mask:"+966(___) __-__-__"},967:{name:"Yemen",dial_code:"+967",code:"YE",mask:"+967(___) __-__-__"},968:{name:"Oman",dial_code:"+968",code:"OM",mask:"+968(__) __-__-__"},970:{name:"Palestinian Territory, Occupied",dial_code:"+970",code:"PS",mask:"+970(___) __-__-__"},971:{name:"United Arab Emirates",dial_code:"+971",code:"AE",mask:"+971(___) __-__-__"},972:{name:"Israel",dial_code:"+972",code:"IL",mask:"+972(___) __-__-__"},973:{name:"Bahrain",dial_code:"+973",code:"BH",mask:"+973(__) __-__-__"},974:{name:"Qatar",dial_code:"+974",code:"QA",mask:"+974(__) __-__-__"},975:{name:"Bhutan",dial_code:"+975",code:"BT",mask:"+975(__) __-__-__"},976:{name:"Mongolia",dial_code:"+976",code:"MN",mask:"+976(__) __-__-__"},977:{name:"Nepal",dial_code:"+977",code:"NP",mask:"+977(___) ___-__-__"},992:{name:"Tajikistan",dial_code:"+992",code:"TJ",mask:"+992(___) __-__-__"},993:{name:"Turkmenistan",dial_code:"+993",code:"TM",mask:"+993(__) __-__-__"},994:{name:"Azerbaijan",dial_code:"+994",code:"AZ",mask:"+994(__) ___-__-__"},995:{name:"Georgia",dial_code:"+995",code:"GE",mask:"+995(___) __-__-__"},996:{name:"Kyrgyzstan",dial_code:"+996",code:"KG",mask:"+996(___) __-__-__"},998:{name:"Uzbekistan",dial_code:"+998",code:"UZ",mask:"+998(___) __-__-__"},1242:{name:"Bahamas",dial_code:"+1242",code:"BS",mask:"+1242(___) __-__"},1246:{name:"Barbados",dial_code:"+1246",code:"BB",mask:"+1246(___) __-__"},1264:{name:"Anguilla",dial_code:"+1264",code:"AI",mask:"+1264(___) ___-__-__"},1268:{name:"Antigua and Barbuda",dial_code:"+1268",code:"AG",mask:"+1268(_) __-__"},1284:{name:"Virgin Islands, British",dial_code:"+1284",code:"VG",mask:"+1284(___) __-__"},1340:{name:"Virgin Islands, U.S.",dial_code:"+1340",code:"VI",mask:"+1340(___) ___-__-__"},1441:{name:"Bermuda",dial_code:"+1441",code:"BM",mask:"+1441(___) __-__"},1473:{name:"Grenada",dial_code:"+1473",code:"GD",mask:"+1473(___) __-__"},1649:{name:"Turks and Caicos Islands",dial_code:"+1649",code:"TC",mask:"+1649(___) ___-__-__"},1664:{name:"Montserrat",dial_code:"+1664",code:"MS",mask:"+1664(___) ___-__-__"},1670:{name:"Northern Mariana Islands",dial_code:"+1670",code:"MP",mask:"+1670(___) ___-__-__"},1671:{name:"Guam",dial_code:"+1671",code:"GU",mask:"+1671(___) ___-__-__"},1684:{name:"American Samoa",dial_code:"+1684",code:"AS",mask:"+1684(___) ___-__-__"},1758:{name:"Saint Lucia",dial_code:"+1758",code:"LC",mask:"+1758(___) __-__"},1767:{name:"Dominica",dial_code:"+1767",code:"DM",mask:"+1767(___) __-__"},1784:{name:"Saint Vincent and the Grenadines",dial_code:"+1784",code:"VC",mask:"+1784(___) __-__"},1849:{name:"Dominican Republic",dial_code:"+1849",code:"DO",mask:"+1849(___) ___-__-__"},1868:{name:"Trinidad and Tobago",dial_code:"+1868",code:"TT",mask:"+1868(___) __-__"},1869:{name:"Saint Kitts and Nevis",dial_code:"+1869",code:"KN",mask:"+1869(___) __-__"},1876:{name:"Jamaica",dial_code:"+1876",code:"JM",mask:"+1876(___) __-__"},1939:{name:"Puerto Rico",dial_code:"+1939",code:"PR",mask:"+1939(___) ___-__-__"}};function kt({value:e,onValue:t,name:n,placeholder:i="",title:r="",error:o="",hide:d=!1,edit:l=!0,active:_=!0,after:c="",show:u=!0,view:f,className:x=""}){l=l!==void 0?l:!0,_=_!==void 0?_:!0,d=!!(d&&(e===""||e===void 0))&&!(l&&_),m.useRef(null);let g="+_(___) ___-__-__",k=!0,S=0,y=(Y,P)=>{let se=document.createRange(),W=window.getSelection();se.setStart(P.childNodes[0],Y),se.collapse(!0),W.removeAllRanges(),W.addRange(se),P.focus()},C=Y=>{Y.preventDefault(),navigator.clipboard.readText().then(P=>{window.document.execCommand("insertText",!1,P)}).catch(P=>{console.log("Something went wrong",P)})},I=Y=>{let P=0,se="",W=Y.replace(/\D/g,"");W===""&&(k=!0);let ce=W.split(""),X="";ce.forEach(Je=>{k&&(X+=Je,bt[X]!==void 0&&k?(k=!1,g=bt[X].mask.replace(new RegExp("[0-9]","g"),"_"),se=bt[X].code):(k&&(S=(""+X).length,g=`+${X}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),se=""),S>(""+X).length&&(k=!0,g=`+${X}_(___) ___-__-__`.replace(new RegExp("[0-9]","g"),"_"),se="")))});let Ae=g.replace(/\D/g,"");return Ae.length>=W.length&&(W=Ae),{q:g.replace(/[_\d]/g,function(){return W.charAt(P++)||"_"}),i:P,v:W,f:se}},M=Y=>{Y.preventDefault(),navigator.clipboard.writeText(Y.target.textContent.replace(/\D/g,"")).then(function(){we.Copy("Данные в буфер обмене")},function(P){console.error("Async: Could not copy text: ",P)})},w=I(e),L=Y=>{let P=I(Y.target.textContent);Y.target.textContent=P.q,P.i=P.q.lastIndexOf(P.v.substr(-1)),P.i<P.q.length&&P.q!==g?P.i++:P.i=P.q.indexOf("_"),y(P.i,Y.target),t&&t({value:P.q.replace(/\D/g,""),name:n})},z=Y=>{Y.key==="Enter"&&Y.preventDefault()};const O={};O.field="input",x&&(O.className=x);let H={};return l&&_?(H.edit="true",H.contentEditable="plaintext-only"):H.contentEditable="false",i&&(H.placeholder=i),c&&(H.after=c),d?a.jsx(a.Fragment,{}):a.jsxs("dl",{...O,children:[r&&a.jsx("dt",{children:r}),a.jsx("dd",{...H,onPaste:C,onInput:L,onKeyDown:z,onContextMenu:M,suppressContentEditableWarning:!0,children:w.q}),o&&a.jsx("em",{children:o})]})}const En=e=>{let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=e.edit!==void 0?e.edit:!0,i=e.active!==void 0?e.active:!0,r=e.placeholder!==void 0?e.placeholder:"",o=0,d=()=>{clearTimeout(o),o=setTimeout(()=>console.log("rerrwere"),1e3)},l=u=>{u.key==="Enter"&&u.preventDefault()},_=u=>{u.preventDefault(),navigator.clipboard.readText().then(f=>{window.document.execCommand("insertText",!1,f)}).catch(f=>{console.log("Something went wrong",f)})};const c={};return r&&(c.placeholder=r),a.jsxs("dl",{"data-form":"input",children:[t(),a.jsx("dd",{onPaste:_,onInput:d,onKeyDown:l,contentEditable:n&&i?"plaintext-only":"false",...c,suppressContentEditableWarning:!0,children:e.value})]})};function yt({title:e,error:t,edit:n=!0,active:i=!0,hide:r,value:o="0",onValue:d,options:l,placeholder:_="",name:c,after:u,view:f}){const x=m.useRef();r=!!(r&&(o===""||l[o].n===void 0))&&!(n&&i);let g=o!==void 0&&o!==""?l[o].n:o,k=I=>{x.current.textContent=l[I].n,d&&d({value:I,name:c})},S=I=>{if(!(n&&i))return;const M=I.target.getBoundingClientRect();ve.setListener("form",a.jsx(Jr,{parent:M,onValue:k,view:f,options:l},new Date().getTime()))},y={field:"select"},C={onClick:S};return n&&i&&(C.edit="true"),_&&(C.placeholder=_),u&&(C.after=u),r?"":a.jsxs("dl",{...y,children:[e&&a.jsx("dt",{children:e}),a.jsx("dd",{...C,ref:x,children:g}),t&&a.jsx("em",{children:t})]})}const Jr=({onValue:e,parent:t,view:n,options:i})=>{let[r,o]=m.useState(!0),d=()=>{o(!1)},l=u=>{o(!1),e(u)},_=window.innerHeight-t.y+t.height<320?t.y-312:t.y+33,c=window.innerWidth-t.x<265?t.x-235:t.x;return a.jsx(a.Fragment,{children:r?a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-select":"backdrop",onClick:d},new Date().getTime()),a.jsx("div",{"data-select":"background "+n,style:{top:_+"px",left:c+"px",width:t.width},children:a.jsx("ul",{children:Object.keys(i).map((u,f)=>i[u].s===1?a.jsx("li",{onClick:()=>{l(u)},children:i[u].n},f):"")})})]}):""})};function wt(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"",i=e.edit!==void 0?e.edit:!0,r=e.active!==void 0?e.active:!0,d=!!(e.hide&&(e.default===""||e.options[e.default]===void 0))&&!(i&&r),l=e.placeholder!==void 0?e.placeholder:"",_=h=>{u(e.options[h]),e.onValue({value:h,name:e.name})},[c,u]=m.useState(e.default!==void 0?e.options[e.default]:e.default),f=h=>{if(!(i&&r))return;const g=h.target.getBoundingClientRect();ve.setListener("form",a.jsx(Xr,{parent:g,onValue:_,view:e.view,options:e.options},new Date().getTime()))};const x={};return l&&(x.placeholder=l),d?a.jsx(a.Fragment,{}):a.jsxs("dl",{"data-form":"select",children:[t(),a.jsx("dd",{onClick:f,"data-edit":(i&&r)+"",...x,children:c}),n()]})}const Xr=({onValue:e,parent:t,view:n,options:i})=>{let[r,o]=m.useState(!0),d=()=>{o(!1)},l=f=>{o(!1),e(f)},_=Object.keys(i).length*36,c=window.innerHeight-t.y+t.height<_?t.y-(_-33):t.y+33,u=window.innerWidth-t.x<265?t.x-235:t.x;return a.jsx(a.Fragment,{children:r?a.jsxs(a.Fragment,{children:[a.jsx("div",{"data-select":"backdrop",onClick:d},new Date().getTime()),a.jsx("div",{"data-select":"background "+n,style:{top:c+"px",left:u+"px",width:t.width},children:a.jsx("ul",{children:Object.keys(i).map((f,x)=>a.jsx("li",{onClick:()=>{l(f)},children:i[f]},x))})})]}):""})};function Ct({set:e,value:t,onValue:n,name:i,placeholder:r="",title:o="",error:d="",hide:l=!1,edit:_=!0,show:c=!0,active:u=!0,after:f="",view:x,item:h,className:g=""}){let k={};switch(e){case"Input":return a.jsx(Oe,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g});case"Select":return h&&(k=ne.getSelect(parseInt(h))?ne.getSelect(parseInt(h)):{0:{s:"1",n:"не известно"}}),a.jsx(yt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g,options:k});case"Users":return ne.getSelect("user"),a.jsx(wt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g,options:k});case"Date":return a.jsx(xt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g});case"Phone":return a.jsx(kt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g});case"Number":return a.jsx(vt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g});case"Money":return a.jsx(gt,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g});case"Modal":return a.jsx(ht,{title:o,show:c,hide:l,view:x,edit:_,active:u,value:t,onValue:n,name:i,placeholder:r,className:g})}}function Nn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"",i=e.edit!==void 0?e.edit:!0,r=e.active!==void 0?e.active:!0,o=e.placeholder!==void 0?e.placeholder:"",d=c=>{e.onValue({value:c.target.innerText,name:e.name})},l=c=>{c.preventDefault(),navigator.clipboard.readText().then(u=>{window.document.execCommand("insertText",!1,u)}).catch(u=>{console.log("Something went wrong",u)})};const _={};return o&&(_.placeholder=o),a.jsxs("dl",{children:[t(),a.jsx("dd",{onPaste:l,className:e.className,ref:e.useRef,onInput:d,contentEditable:i&&r?"plaintext-only":"false",..._,suppressContentEditableWarning:!0,children:e.value}),n()]})}function Tn(e){let t=()=>e.title?a.jsx("dt",{children:e.title}):"",n=()=>e.error?a.jsx("em",{children:e.error}):"";e.edit!==void 0&&e.edit,e.active!==void 0&&e.active;let i=e.placeholder!==void 0?e.placeholder:"",r=A.Date(e.value===void 0?new Date:e.value,"HH:MM"),o=m.useRef(null),d=u=>{o.current.textContent=u,e.onValue&&e.onValue({value:u,name:e.name})},l=u=>{e.onSave&&e.onSave({value:u,name:e.name})},_=u=>{const f=u.target.getBoundingClientRect(),x=f.left,h=f.top;ve.setListener("form",a.jsx(Qr,{position:{x,y:h},onSave:l,onValue:d,date:r},new Date().getTime()))};const c={};return i&&(c.placeholder=i),a.jsx(a.Fragment,{children:e.view==="icon"?a.jsx("i",{"data-icon":"F043",onClick:_}):a.jsxs("dl",{children:[t(),a.jsx("dd",{onClick:_,ref:o,...c,children:r}),n()]})})}const Qr=e=>{let t=e.date.split(":"),n={h:A.Number(2,t[0]),m:A.Number(2,t[1])},i="hour",[r,o]=m.useState({}),d=!1,l=0,_=0,c={body:m.useRef(null),time:m.useRef(null),hour:m.useRef(null),timeText:m.useRef(null),hourText:m.useRef(null)};m.useEffect(()=>{o(c.body.current.getBoundingClientRect()),c.hour.current.style.transform="rotate("+n.h*15+"deg)",c.time.current.style.transform="rotate("+n.m*6+"deg)"},[c.body,c.hour,c.time,n.m,n.h]);let u=()=>{d=!0},f=()=>{d=!1,i=i==="hour"?"time":"hour",c.body.current.setAttribute("active",i)},x=I=>{if(d){let w=Math.atan2(I.pageX-(r.x+78),I.pageY-(r.y+78))*(180/Math.PI)*-1+180;c[i].current.style.transform="rotate("+w+"deg)",i==="hour"?(n={...n,h:A.Number(2,parseInt(String(w/15),10))},c.hourText.current.textContent=n.h):(n={...n,m:A.Number(2,parseInt(String(w/6),10))},c.timeText.current.textContent=n.m),e.onValue(n.h+":"+n.m)}},h=I=>{if(i==="hour")if(I.deltaY>0){l+=I.deltaY;let M=parseInt(String(l/50));if(_!==M){_=M;let w=parseInt(n.h,10)+1;w=w>23?0:w,n={...n,h:A.Number(2,w)},c.hourText.current.textContent=n.h,c[i].current.style.transform="rotate("+n.h*15+"deg)"}}else{l-=I.deltaY;let M=parseInt(String(l/50));if(_!==M){_=M;let w=parseInt(n.h,10)-1;w=w<0?23:w,n={...n,h:A.Number(2,w)},c.hourText.current.textContent=n.h,c[i].current.style.transform="rotate("+n.h*15+"deg)"}}else if(I.deltaY>0){l+=I.deltaY;let M=parseInt(String(l/50));if(_!==M){_=M;let w=parseInt(n.m,10)+1;w=w>59?0:w,n={...n,m:A.Number(2,w)},c.timeText.current.textContent=n.m,c[i].current.style.transform="rotate("+n.m*6+"deg)"}}else{l-=I.deltaY;let M=parseInt(String(l/50));if(_!==M){_=M;let w=parseInt(n.m,10)-1;w=w<0?59:w,n={...n,m:A.Number(2,w)},c.timeText.current.textContent=n.m,c[i].current.style.transform="rotate("+n.m*6+"deg)"}}e.onValue(n.h+":"+n.m)},[g,k]=m.useState(!0),S=()=>{k(!1),e.onSave(n.h+":"+n.m)},y=window.innerHeight-e.position.y+33<320?e.position.y-312:e.position.y+33,C=window.innerWidth-e.position.x<265?e.position.x-235:e.position.x;return a.jsx(a.Fragment,{children:g?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Se.o,onClick:()=>S()},new Date().getTime()),a.jsx("div",{className:Se.c,onMouseDown:u,onMouseUp:f,onMouseMove:x,onWheel:h,ref:c.body,style:{top:y+"px",left:C+"px"},children:"xxxx"})]}):""})};function In({onValue:e,label:t,value:n,className:i,name:r,reload:o}){n=!!n;const[d,l]=m.useState(n),_=()=>{let f=!d;console.log(f),e({name:r,value:f,reload:o}),l(f)},c={};c.field="check",i&&(c.className=i);const u={};return d&&(u.active=""),a.jsxs("dl",{...c,children:[t?a.jsx("dt",{children:t}):"",a.jsx("dd",{...u,onClick:_})]})}const Ee={};function eo(e){const[t,n]=m.useState({}),i=m.useRef(e);return Ee.u=r=>{i.current={...i.current,[r.name]:r.value}},Ee.r=()=>{n(Date.now())},i.current}function to(e){Ee.u(e),e.reload&&Ee.r()}function no(){Ee.r&&Ee.r()}const ao={Color:wn,Date:xt,Code:yn,Check:In,Switch:hn,Input:Oe,Button:gn,Message:vn,Generator:bn,Captcha:kn,Modal:ht,Money:gt,Month:Cn,Notes:jn,Number:vt,Password:Sn,Phone:kt,Search:En,Select:yt,Set:Ct,Textarea:Nn,Time:Tn,Users:wt,String:Oe,Form:Ct,runReload:no,useData:eo,setValue:to},io={Color:wn,Date:xt,Code:yn,Check:In,Switch:hn,Input:Oe,Button:gn,Message:vn,Generator:bn,Captcha:kn,Modal:ht,Money:gt,Month:Cn,Notes:jn,Number:vt,Password:Sn,Phone:kt,Search:En,Select:yt,Set:Ct,Textarea:Nn,Time:Tn,Users:wt,String:Oe},Dn={spinner:"_spinner_1ul0m_1",l:"_l_1ul0m_75",loadingB:"_loadingB_1ul0m_1"};function ro(){return a.jsx("div",{className:Dn.spinner,children:a.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 483 484",children:a.jsx("path",{d:"M264,492a22.2,22.2,0,0,0,22-22V411a22.2,22.2,0,0,0-22-22H236a22.2,22.2,0,0,0-22,22v59a22.2,22.2,0,0,0,22,22Zm74-134a23.9,23.9,0,0,0-6,16,20.35,20.35,0,0,0,6,15l42,42q7,7,16,7,10,0,16-7l20-20a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16l-42-42q-7-7-16-7-8,0-15,7ZM163,389a18.94,18.94,0,0,0,7-15q0-9-7-16l-20-20q-7-7-16-7-8,0-15,7L70,380q-7,7-7,16a18.94,18.94,0,0,0,7,15l20,20q7,7,16,7a18.94,18.94,0,0,0,15-7ZM112,237a22.2,22.2,0,0,0-22-22H31a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,9,237v28a21.17,21.17,0,0,0,6.5,15.5A21.17,21.17,0,0,0,31,287H90a22.2,22.2,0,0,0,22-22Zm358,50a22.2,22.2,0,0,0,22-22V237a22.2,22.2,0,0,0-22-22H411a22.2,22.2,0,0,0-22,22v28a22.2,22.2,0,0,0,22,22ZM163,142q7-7,7-15.5T163,111L121,69q-7-7-15-7-7,0-16,7L70,89q-7,7-7,16a18.94,18.94,0,0,0,7,15l42,42a18.94,18.94,0,0,0,15,7q10,0,16-7Zm269-22a20.35,20.35,0,0,0,6-15,23.9,23.9,0,0,0-6-16L412,69q-7-7-16-7-7,0-16,7l-42,42q-7,8-7,16t7,15l21,20a18.94,18.94,0,0,0,15,7q10,0,16-7Zm-168-9a22.06,22.06,0,0,0,15.5-6q6.5-6,6.5-16V30a21.17,21.17,0,0,0-6.5-15.5A21.17,21.17,0,0,0,264,8H236a21.17,21.17,0,0,0-15.5,6.5A21.17,21.17,0,0,0,214,30V89q0,10,6.5,16a22.06,22.06,0,0,0,15.5,6Z",transform:"translate(-9 -8)"})})})}function oo(){return a.jsxs("div",{className:Dn.l,children:[a.jsx("i",{}),a.jsx("i",{}),a.jsx("i",{})]})}const so={Spinner:ro,Inline:oo},lo={s:"_s_t9swc_1"};let jt;function co(){let e=r=>{jt(r.target.textContent)},t=r=>{r.key==="Enter"&&r.preventDefault()},n=r=>{r.preventDefault(),navigator.clipboard.readText().then(o=>{window.document.execCommand("insertText",!1,o)}).catch(o=>{console.log("Something went wrong",o)})};const i={};return i.placeholder="Что искать?",a.jsx("div",{className:lo.s,onPaste:n,onInput:e,onKeyDown:t,contentEditable:"true",...i,suppressContentEditableWarning:!0})}function _o(e,t,n){let i=[],r=1,o=0,d={},l=50;return d[r]=[],e.forEach(_=>{_.text.toLowerCase().indexOf(t)>-1&&i.push(_.id)}),i.forEach(_=>{o++,o<=l||(r++,o=1,d[r]=[]),d[r].push(n[_])}),d}function uo(e){jt=e}function fo(e){jt=e}const mo={Field:co,Run:_o,Get:uo,useValue:fo},po={f:"_f_q3r0i_1"};let ae={};function xo(e,t){switch(t.type){case"open":return{...e,open:t.open};case"view":return{...e,view:e.view===t.view?null:t.view};case"data":let n={};return Object.keys(t.data).forEach(r=>{r!=="sort"&&(n[r]=t.data[r],e.take[r]="999")}),{...e,data:n,take:e.take};case"size":return{...e,size:t.size};case"take":let i={[t.list]:t.take};i={...e.take,...i},e.active=!1;for(let r in i)i[r]!=="999"&&(e.active=!0);return ae.get(i,e.active),{...e,take:i,active:e.active};case"exit":for(let r in e.take)e.take[r]="999";return ae.get&&ae.get([],!1),{...e,size:0,active:!1,take:e.take,open:!1};default:throw new Error}}function ho(){const[e,t]=m.useReducer(xo,{open:!1,view:null,data:{},take:{},size:0,active:!1});return ae.set=n=>{t({type:"data",data:n})},ae.count=n=>{t({type:"size",size:n})},ae.reset=()=>{t({type:"exit"})},a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:po.f,onClick:()=>{t({type:"open",open:!0})},children:[a.jsx(ii,{}),e.active&&a.jsxs("i",{children:[e.size,"1"]})]}),e.open?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"filter o",onClick:()=>{t({type:"open",open:!1})}}),a.jsxs("div",{className:"filter m",children:[a.jsx("div",{className:"filter l",children:Object.keys(e.data).map(n=>a.jsx(yo,{data:n,dispatch:t,state:e},n))}),a.jsx("div",{className:"filter b",onClick:()=>{t({type:"exit"})},children:"Убрать фильтер"})]})]}):a.jsx(a.Fragment,{})]})}function go(e){ae.get=e}function vo(e){ae.set!==void 0&&ae.set(e)}function bo(e){ae.reset!==void 0&&ae.reset(e)}function ko(e,t,n,i){let r=[],o=1,d=0,l={},_=50;return l[o]=[],i===!0&&(Object.keys(t).forEach(c=>{Number.parseInt(t[c])!==999&&(e=e.filter(u=>Number.parseInt(u[c])===Number.parseInt(t[c])))}),Mn(e.length)),e.forEach(c=>{r.push(c.id)}),r.forEach(c=>{d++,d<=_||(o++,d=1,l[o]=[]),l[o].push(n[c])}),l}function Mn(e){ae.count(e)}function yo({data:e,state:t,dispatch:n}){let i=()=>{n({type:"view",view:e})},r=()=>{n({type:"take",list:e,take:"999"})};return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"filter s",children:[a.jsxs("div",{onClick:i,children:[" ",t.data[e].name," "]}),t.take[e]!=="999"?a.jsx("div",{onClick:r,className:"filter x","data-icon":"F038"}):""]}),a.jsx("div",{className:"filter u","set-active":(t.view===e)+"",children:Object.keys(t.data[e].list).map((o,d)=>a.jsx(wo,{data:t.data[e].list[o],head:e,type:o,dispatch:n,state:t},d))})]})}function wo({data:e,head:t,state:n,dispatch:i,type:r}){if(r!=="999"&&e.count===void 0)return"";const o=()=>{i({type:"take",list:t,take:r})};return a.jsxs("div",{className:"filter a",onClick:o,"set-active":(n.take[t]===r)+"",children:[e.name,a.jsx("div",{className:"filter e",children:e.count})]})}const Co={Button:ho,useValue:go,Set:vo,Run:ko,Count:Mn,Reset:bo},jo={Bell:_i,Send:li,Add:si},Fn={p:"_p_djnh1_1",l:"_l_djnh1_38"};function So(e){let t=3,n=e.page,i=e.count,r=[],o=()=>{r.push({page:1}),r.push({text:"..."})},d=()=>{r.push({text:"..."}),r.push({page:i})},l=(_,c)=>{for(let u=_;u<c;u++)r.push({page:u})};return i<t*2+6?l(1,i+1):n<t*2+1?(l(1,t*2+4),d()):n>i-t*2?(t=i>1e4?1:t,o(),l(i-t*2-2,i+1)):(t=i>1e4?1:t,o(),l(n-t,n+t+1),d()),r.length===1?a.jsx(a.Fragment,{}):a.jsxs("div",{className:Fn.p,children:[a.jsx("i",{onClick:()=>e.onChangePage(n-1),children:a.jsx("svg",{viewBox:"0 0 24 24",children:a.jsx("path",{d:"M8.19486 5.40705C8.52237 4.96235 9.14837 4.86736 9.59306 5.19488C9.93847 5.44927 10.2668 5.70372 10.5528 5.92689C11.1236 6.3724 11.8882 6.98573 12.6556 7.65208C13.4181 8.31412 14.2064 9.04815 14.8119 9.73344C15.1136 10.0749 15.3911 10.4279 15.5986 10.7721C15.7895 11.0888 16 11.524 16 12.0001C16 12.4762 15.7895 12.9115 15.5986 13.2282C15.3911 13.5724 15.1136 13.9253 14.8119 14.2668C14.2064 14.9521 13.4181 15.6861 12.6556 16.3482C11.8882 17.0145 11.1236 17.6278 10.5528 18.0734C10.2668 18.2965 9.93847 18.551 9.59307 18.8054C9.14837 19.1329 8.52237 19.0379 8.19486 18.5932C8.0632 18.4144 7.99983 18.2064 8.00001 18.0002L8 12.0001L8 6.00007C7.99983 5.79387 8.0632 5.58581 8.19486 5.40705Z"})})}),r.map((_,c)=>{console.log(_,e);const u={};return _.page&&(u.onClick=()=>e.onChangePage(_.page)),_.page===e.page&&(u.active=""),m.createElement("span",{...u,key:c},_.page||_.text)}),a.jsx("i",{onClick:()=>e.onChangePage(n+1),children:a.jsx("svg",{viewBox:"0 0 24 24",children:a.jsx("path",{d:"M8.19486 5.40705C8.52237 4.96235 9.14837 4.86736 9.59306 5.19488C9.93847 5.44927 10.2668 5.70372 10.5528 5.92689C11.1236 6.3724 11.8882 6.98573 12.6556 7.65208C13.4181 8.31412 14.2064 9.04815 14.8119 9.73344C15.1136 10.0749 15.3911 10.4279 15.5986 10.7721C15.7895 11.0888 16 11.524 16 12.0001C16 12.4762 15.7895 12.9115 15.5986 13.2282C15.3911 13.5724 15.1136 13.9253 14.8119 14.2668C14.2064 14.9521 13.4181 15.6861 12.6556 16.3482C11.8882 17.0145 11.1236 17.6278 10.5528 18.0734C10.2668 18.2965 9.93847 18.551 9.59307 18.8054C9.14837 19.1329 8.52237 19.0379 8.19486 18.5932C8.0632 18.4144 7.99983 18.2064 8.00001 18.0002L8 12.0001L8 6.00007C7.99983 5.79387 8.0632 5.58581 8.19486 5.40705Z"})})})]})}function Eo(e,t){switch(t.type){case"load":return{...e,load:t.load,wait:!1,data:t.data,list:t.data[e.page],size:Object.keys(t.data).length};case"page":return{...e,page:t.page,list:e.data[t.page]};default:throw new Error}}function $n({load:e,list:t,item:n}){const i=m.useRef(null),[r,o]=m.useReducer(Eo,{load:!1,list:[],data:{},page:1,wait:!1,item:n});console.log("load",e),m.useEffect(()=>{t!==null&&o({type:"load",load:e,data:t})},[e]);let d=l=>{if(l===0)return l=1;if(l>r.size)return l=r.size;o({type:"page",page:l})};return m.useEffect(()=>{},[r]),console.log(r),a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Fn.l,ref:i,children:a.jsx(pn,{"el-empty":"Данные не найдены",children:r.load&&r.list!==void 0?r.list.map(l=>a.jsx(r.item,{data:l},l.id)):a.jsxs("div",{"type-data":"load",children:[a.jsx("i",{}),a.jsx("i",{}),a.jsx("i",{})]})})}),r.load&&r.list!==void 0?a.jsx(So,{page:r.page,count:r.size,onChangePage:d}):a.jsx(a.Fragment,{})]})}const No={Pagination:$n};function To({head:e,load:t,list:n,item:i}){const r=e;return a.jsxs(a.Fragment,{children:[a.jsx(r,{}),Ye.getSetting("s05")===1?a.jsx($n,{list:n,load:t,item:i}):a.jsx(xn,{list:n,load:t,item:i})]})}function Io(e,t){switch(t.type){case"load":return{...e,time:Date.now(),load:t.load,list:t.list,temp:t.temp};case"filter":return{...e,list:t.list,filter:t.active,band:t.band,time:Date.now()};case"search":return{...e,time:Date.now(),list:t.list};case"triage":return{...e,time:Date.now(),list:t.list,sort:t.sort};case"noload":return{...e,load:!0,time:Date.now()};default:throw new Error}}const St={};function Do(e){St.get=e}function Mo(e){St.get&&St.get(e)}const Fo={View:To,Reducer:Io,useValue:Do,setValue:Mo},$o={Get:xi},Lo={Open:tr};j.Action=un,j.Alert=Er,j.Api=st,j.Badge=Or,j.Bookmarks=Sr,j.Browser=xr,j.Button=nn,j.Company=$o,j.Component=dt,j.DataBase=Gr,j.Event=ve,j.Files=Yr,j.Filter=Co,j.Form=ao,j.Format=A,j.HotKey=Kr,j.Icon=Tr,j.Init=cn,j.Input=io,j.List=Fo,j.Loading=so,j.Modal=Ue,j.Notice=we,j.Notifications=jo,j.Pagination=No,j.Phone=Lo,j.Router=Be,j.Scrolling=Ur,j.Search=mo,j.Setting=jr,j.Sistym=We,j.Socket=le,j.Store=ne,j.Tabs=_n,j.Triage=Pr,j.User=Ye,j.WebRTC=R,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
|